Vehicle data clustering method and vehicle trajectory restoration method

By using the similarity information of multiple clustering results in vehicle data clustering for iterative updates, the problem of low clustering accuracy of vehicle data is solved, and the accuracy of vehicle trajectory restoration is improved.

CN113378658BActive Publication Date: 2025-03-18SHANGHAI SENSETIME INTELLIGENT TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110565614.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-24
Publication Date
2025-03-18
Estimated Expiration
2041-05-24

AI Technical Summary

Technical Problem

In the prior art, the accuracy of vehicle data clustering processing is low, resulting in poor performance of vehicle trajectory restoration.

Method used

By obtaining multiple clustering results and their corresponding restore trajectory information, the candidate cluster set is determined from other clustering results based on the similarity between the target clustering results and other clustering results, and the target clustering results are updated based on the similarity between the restore trajectory information of each candidate clustering result in the candidate clustering set and the restore trajectory information of the target clustering results.

Benefits of technology

The accuracy of vehicle data clustering processing is improved, the accuracy of vehicle trajectory restoration is enhanced, and the effect of downstream tasks is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113378658B_ABST
    Figure CN113378658B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of computer technology, and specifically provides a vehicle data clustering method and a vehicle trajectory restoration method. The vehicle data clustering method includes: obtaining at least two clustering results obtained according to vehicle data clustering processing, and restored trajectory information corresponding to each of the clustering results; for any target clustering result among the at least two clustering results, based on the similarity between the target clustering result and other clustering results, determining a candidate clustering set from the other clustering results; wherein the other clustering results are clustering results other than the target clustering result among the at least two clustering results; based on the restored trajectory information of each candidate clustering result in the candidate clustering set and the similarity with the restored trajectory information of the target clustering result, updating the target clustering result. The disclosed method improves the clustering accuracy of vehicle data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a vehicle data clustering method and a vehicle trajectory restoration method. Background Art

[0002] Vehicle trajectory restoration technology can be used to obtain the trajectory of vehicles running in the city, so as to perceive and analyze traffic data. Common applications include high-speed vehicle detection and vehicle driving behavior analysis. The vision-based vehicle trajectory restoration system needs to cluster the vehicle data first. In related technologies, the accuracy of vehicle data clustering is low. Summary of the invention

[0003] In order to improve the accuracy of vehicle data clustering processing, the embodiments of the present disclosure provide a vehicle data clustering method and device, a vehicle trajectory restoration method and device, an electronic device, and a storage medium.

[0004] In a first aspect, an embodiment of the present disclosure provides a vehicle data clustering method, comprising:

[0005] Acquire at least two clustering results obtained according to the vehicle data clustering process, and restored trajectory information corresponding to each of the clustering results;

[0006] For any target clustering result among the at least two clustering results, based on the similarity between the target clustering result and the other clustering results, determine a candidate clustering set from the other clustering results; wherein the other clustering results are clustering results other than the target clustering result among the at least two clustering results;

[0007] Based on the similarity between the restored trajectory information of each candidate clustering result in the candidate clustering set and the restored trajectory information of the target clustering result, the target clustering result is updated.

[0008] In some implementations, determining a candidate cluster set from the other clustering results comprises:

[0009] Obtaining a first cluster center of the target clustering result and a second cluster center of each other clustering result;

[0010] Obtaining a first similarity set according to the similarity between the first cluster center and each of the second cluster centers;

[0011] Other clustering results corresponding to a preset number of similarities are determined from the first similarity set to obtain the candidate clustering set.

[0012] In some implementations, the vehicle data includes vehicle information and license plate information, and the step of obtaining the cluster center of each clustering result includes:

[0013] For each clustering result, a cluster center of the clustering result is determined based on the vehicle information and license plate information included in the clustering result.

[0014] In some implementations, updating the target clustering result based on the similarity between the restored trajectory information of each candidate clustering result in the candidate clustering set and the restored trajectory information of the target clustering result includes:

[0015] For each candidate clustering result in the candidate clustering set, based on the similarity between the restored trajectory information of the candidate clustering result and the restored trajectory information of the target clustering result, the candidate clustering result and the target clustering result are merged to obtain an updated target clustering result.

[0016] In some implementations, the merging of the candidate clustering result and the target clustering result includes:

[0017] In response to the candidate clustering result including a vehicle data, and the similarity between the spatiotemporal information of the vehicle data and the spatiotemporal information of the restored trajectory information of the target clustering result is not less than a first similarity threshold, merging the candidate clustering result and the target clustering result;

[0018] In some implementations, the merging of the candidate clustering result and the target clustering result includes:

[0019] In response to the candidate clustering result including at least two vehicle data, and the similarity between the first restored trajectory information corresponding to the target clustering result and the second restored trajectory information corresponding to the at least two vehicle data is not less than a second similarity threshold, the candidate clustering result and the target clustering result are merged.

[0020] In some implementations, after updating the target clustering result, the method further includes:

[0021] For each clustering result, obtaining each vehicle data included in the clustering result;

[0022] For each vehicle data, the confidence score of the vehicle data is updated based on the spatiotemporal information of the vehicle data to obtain an updated confidence score; the confidence score represents the similarity between the vehicle data and the clustering result corresponding to the vehicle data;

[0023] In response to the updated confidence score being less than a preset score threshold, the vehicle data is removed from the clustering result.

[0024] In some implementations, for each vehicle data, updating the confidence score of the vehicle data based on the spatiotemporal information of the vehicle data includes:

[0025] Determine, based on the spatiotemporal information of the vehicle data, a distance set between the vehicle data and other vehicle data in the clustering result to which the vehicle data belongs;

[0026] Determining a confidence weight of the vehicle data according to a minimum distance in the distance set;

[0027] The confidence score of the vehicle is updated according to the confidence weight.

[0028] In some implementations, obtaining at least two clustering results obtained by clustering the vehicle data includes:

[0029] Acquire each vehicle data to be processed; the vehicle data includes a vehicle image and vehicle information and license plate information extracted from the vehicle image;

[0030] Determining a candidate image set based on the vehicle information and the license plate information;

[0031] Based on the similarity between each candidate image in the candidate image set and the vehicle image, clustering processing is performed on the vehicle data to be processed to obtain the at least two clustering results.

[0032] In some implementations, clustering the to-be-processed images based on the similarity between each candidate image in the candidate image set and the vehicle image includes:

[0033] Based on the vehicle information and the license plate information, determining a second similarity set between the candidate images in the candidate image set and the vehicle image;

[0034] In response to a maximum similarity in the second similarity set being not less than a preset threshold, clustering the vehicle data into a category to which the candidate image corresponding to the maximum similarity belongs;

[0035] and / or,

[0036] In response to a maximum similarity in the second similarity set being less than a preset threshold, clustering the vehicle data into a newly added category.

[0037] In a second aspect, an embodiment of the present disclosure provides a vehicle trajectory restoration method, comprising:

[0038] According to the updated target clustering result, the restored trajectory information corresponding to the target clustering result is updated; the updated target clustering result is obtained according to the vehicle data clustering method described in any implementation manner of the first aspect;

[0039] Based on the updated target clustering result and the restored trajectory information, the steps of determining the candidate clustering set from the other clustering results and updating the target clustering result are repeatedly performed until a convergence condition is met.

[0040] In some implementations, obtaining restoration trajectory information corresponding to the clustering result includes:

[0041] Obtain road network data and clustering results;

[0042] For each clustering result, based on the spatiotemporal information of each vehicle data included in the clustering result and the road network data, determining a trajectory point corresponding to each vehicle data on the road network corresponding to the road network data;

[0043] According to the spatiotemporal information of the vehicle data corresponding to each trajectory point, the restored trajectory information corresponding to the clustering result is obtained.

[0044] In some implementations, obtaining road network data includes:

[0045] Obtain original road network data and clustering results;

[0046] Based on the spatiotemporal information of the vehicle data included in each clustering result, the original road network data is preprocessed to obtain the road network data.

[0047] In a third aspect, the present disclosure provides a vehicle data clustering device, including:

[0048] A first acquisition module is configured to acquire at least two clustering results obtained according to the vehicle data clustering process, and restored trajectory information corresponding to each of the clustering results;

[0049] A determination module, configured to determine, for any target clustering result among the at least two clustering results, a candidate clustering set from the other clustering results based on a similarity between the target clustering result and the other clustering results; wherein the other clustering results are clustering results other than the target clustering result among the at least two clustering results;

[0050] The clustering update module is configured to update the target clustering result based on the similarity between the restored trajectory information of each candidate clustering result in the candidate clustering set and the restored trajectory information of the target clustering result.

[0051] In some implementations, the determining module is specifically configured to:

[0052] Obtaining a first cluster center of the target clustering result and a second cluster center of each other clustering result;

[0053] Obtaining a first similarity set according to the similarity between the first cluster center and each of the second cluster centers;

[0054] Other clustering results corresponding to a preset number of similarities are determined from the first similarity set to obtain the candidate clustering set.

[0055] In some implementations, the vehicle data includes vehicle information and license plate information, and the determination module is specifically configured to:

[0056] For each clustering result, a cluster center of the clustering result is determined based on the vehicle information and license plate information included in the clustering result.

[0057] In some implementations, the cluster update module is specifically configured to:

[0058] For each candidate clustering result in the candidate clustering set, based on the similarity between the restored trajectory information of the candidate clustering result and the restored trajectory information of the target clustering result, the candidate clustering result and the target clustering result are merged to obtain an updated target clustering result.

[0059] In some implementations, the cluster update module is specifically configured to:

[0060] In response to the candidate clustering result including a vehicle data, and the spatiotemporal information similarity between the vehicle data and the spatiotemporal information of the restored trajectory information of the target clustering result is not less than a first similarity threshold, the candidate clustering result and the target clustering result are merged.

[0061] In some implementations, the cluster update module is specifically configured to:

[0062] In response to the candidate clustering result including at least two vehicle data, and the similarity between the first restored trajectory information corresponding to the target clustering result and the second restored trajectory information corresponding to the at least two vehicle data is not less than a second similarity threshold, the candidate clustering result and the target clustering result are merged.

[0063] In some implementations, the vehicle data clustering device further includes:

[0064] A second acquisition module is configured to acquire, for each clustering result, each vehicle data included in the clustering result;

[0065] A score updating module is configured to update the confidence score of each vehicle data based on the spatiotemporal information of the vehicle data to obtain an updated confidence score; the confidence score represents the similarity between the vehicle data and the clustering result corresponding to the vehicle data;

[0066] The removal module is configured to remove the vehicle data from the clustering result in response to the updated confidence score being less than a preset score threshold.

[0067] In some implementations, the score updating module is specifically configured to:

[0068] Determine, based on the spatiotemporal information of the vehicle data, a distance set between the vehicle data and other vehicle data in the clustering result to which the vehicle data belongs;

[0069] Determining a confidence weight of the vehicle data according to a minimum distance in the distance set;

[0070] The confidence score of the vehicle is updated according to the confidence weight.

[0071] In some implementations, the first acquisition module is specifically configured to:

[0072] Acquire each vehicle data to be processed; the vehicle data includes a vehicle image and vehicle information and license plate information extracted from the vehicle image;

[0073] Determining a candidate image set based on the vehicle information and the license plate information;

[0074] Based on the similarity between each candidate image in the candidate image set and the vehicle image, clustering processing is performed on the vehicle data to be processed to obtain the at least two clustering results.

[0075] In some implementations, the first acquisition module is specifically configured to:

[0076] Based on the vehicle information and the license plate information, determining a second similarity set between the candidate images in the candidate image set and the vehicle image;

[0077] In response to a maximum similarity in the second similarity set being not less than a preset threshold, clustering the vehicle data into a category to which the candidate image corresponding to the maximum similarity belongs;

[0078] and / or,

[0079] In response to a maximum similarity in the second similarity set being less than a preset threshold, clustering the vehicle data into a newly added category.

[0080] In a fourth aspect, an embodiment of the present disclosure provides a vehicle trajectory restoration device, comprising:

[0081] A trajectory updating module is configured to update the restored trajectory information corresponding to the target clustering result according to the updated target clustering result; the updated target clustering result is obtained according to the vehicle data clustering method described in any implementation of the first aspect;

[0082] The loop iteration module is configured to repeatedly perform the steps of determining the candidate clustering set from the other clustering results and updating the target clustering result based on the updated target clustering result and the restored trajectory information until a convergence condition is met.

[0083] In some implementations, the first acquisition module is specifically configured to:

[0084] Obtain road network data and clustering results;

[0085] For each clustering result, based on the spatiotemporal information of each vehicle data included in the clustering result and the road network data, determining a trajectory point corresponding to each vehicle data on the road network corresponding to the road network data;

[0086] According to the spatiotemporal information of the vehicle data corresponding to each trajectory point, the restored trajectory information corresponding to the clustering result is obtained.

[0087] In some implementations, the first acquisition module is specifically configured to:

[0088] Obtain original road network data and clustering results;

[0089] Based on the spatiotemporal information of the vehicle data included in each clustering result, the original road network data is preprocessed to obtain the road network data.

[0090] In a fifth aspect, an embodiment of the present disclosure provides an electronic device, including:

[0091] Processor; and

[0092] A memory stores computer instructions that can be read by the processor. When the computer instructions are read, the processor executes the method according to any one of the embodiments of the first aspect or the second aspect.

[0093] In a sixth aspect, an embodiment of the present disclosure provides a storage medium for storing computer-readable instructions, wherein the computer-readable instructions are used to enable a computer to execute the method described in any embodiment of the first aspect or the second aspect.

[0094] The vehicle data clustering method of the disclosed embodiment includes obtaining clustering results obtained according to vehicle data clustering processing and restored trajectory information corresponding to each clustering result, determining a candidate clustering set from other clustering results based on the similarity between the target clustering result and other clustering results, and updating the target clustering result based on the similarity between the restored trajectory information of each candidate clustering result in the candidate clustering set and the restored trajectory information of the target clustering result. The disclosed method feeds back and updates the clustering results according to the restored trajectory information, thereby reducing the diffusion problem caused by clustering, improving the clustering accuracy, and further improving the accuracy of trajectory restoration. BRIEF DESCRIPTION OF THE DRAWINGS

[0095] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0096] Figure 1 is a flowchart of a vehicle data clustering method according to some embodiments of the present disclosure.

[0097] Figure 2 is a flowchart of a vehicle data clustering method according to some embodiments of the present disclosure.

[0098] Figure 3 is a flowchart of a vehicle data clustering method according to some embodiments of the present disclosure.

[0099] Figure 4 is a flowchart of a vehicle data clustering method according to some embodiments of the present disclosure.

[0100] Figure 5 is a flowchart of a vehicle data clustering method according to some embodiments of the present disclosure.

[0101] Figure 6 is a flowchart of a vehicle data clustering method according to some embodiments of the present disclosure.

[0102] Figure 7 is a flowchart of a vehicle data clustering method according to some embodiments of the present disclosure.

[0103] Figure 8 is a flowchart of a vehicle data clustering method according to some embodiments of the present disclosure.

[0104] Fig. 9 is a flowchart of a vehicle data clustering method according to some embodiments of the present disclosure.

[0105] Fig.10It is a flowchart of a vehicle trajectory restoration method according to some embodiments of the present disclosure.

[0106] Fig.11 It is a schematic diagram of the principle of the vehicle trajectory restoration method in some embodiments of the present disclosure.

[0107] Fig.12 It is a system framework diagram according to some implementation modes of the present disclosure.

[0108] Fig.13 It is a block diagram of a vehicle data clustering device according to some embodiments of the present disclosure.

[0109] Fig.14 It is a block diagram of a vehicle data clustering device according to some embodiments of the present disclosure.

[0110] Fig.15 It is a block diagram of a vehicle trajectory restoration device according to some embodiments of the present disclosure.

[0111] Fig.16 It is a block diagram of a computer system structure suitable for implementing the method disclosed in the present invention. DETAILED DESCRIPTION

[0112] The technical solution of the present disclosure will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described implementation is a part of the implementation of the present disclosure, rather than all the implementations. Based on the implementation in the present disclosure, all other implementations obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure. In addition, the technical features involved in the different implementations of the present disclosure described below can be combined with each other as long as they do not conflict with each other.

[0113] Vehicle trajectory restoration technology is one of the important topics for realizing smart transportation and improving urban operation efficiency. Vehicle trajectory restoration can be used to obtain the trajectory of vehicles running in the city, so as to perceive and analyze traffic data. Common applications include high-speed vehicle detection and vehicle driving behavior analysis.

[0114] Vehicle trajectory restoration is based on the data collected by road traffic cameras. It clusters the captured images of road vehicles and uses the feature information of the images to track the vehicles with a single camera or match them across cameras, thereby achieving trajectory restoration. In related technologies, the performance of vehicle trajectory restoration is poor, which leads to poor results in downstream tasks.

[0115] Based on the defects existing in the above-mentioned related technologies, the embodiments of the present disclosure provide a vehicle trajectory restoration method, device, electronic device and storage medium, aiming to improve the accuracy of vehicle clustering processing and trajectory restoration.

[0116] The embodiments of the present disclosure provide a vehicle data clustering method, which can be applied to any system device suitable for implementation, such as a user terminal device, a vehicle-mounted terminal device, a server or other processing device, and can be executed by a processor of the device. Figure 1 Some embodiments of vehicle trajectory restoration disclosed in the present invention are shown below. Figure 1 Provide detailed explanation.

[0117] like Figure 1 As shown, in some embodiments, the vehicle data clustering method of the present disclosure example includes:

[0118] S110, obtaining at least two clustering results obtained according to the vehicle data clustering process, and restored trajectory information corresponding to each clustering result.

[0119] Specifically, vehicle data refers to traffic data containing vehicles collected by image acquisition devices on the road network, for example, video streams or frame image data captured by cameras at intersections.

[0120] The vehicle data includes vehicle images collected by multiple cameras on urban roads. Multiple clustering results are obtained by clustering the vehicle images. Each clustering result includes at least one vehicle data. The vehicle data in the same clustering result represent the collected data of the same vehicle at different times or locations. That is, the "one vehicle one category" clustering process is implemented in the embodiments of the present disclosure.

[0121] Regarding the specific process of clustering processing, this disclosure is as follows: Figure 2 This will be described in the implementation method and will not be expanded here.

[0122] In some embodiments, the vehicle data includes not only the vehicle image captured by the camera, but also the spatiotemporal information corresponding to the vehicle image. For example, the spatiotemporal information may include the location of the camera that captured the vehicle image and the time when the vehicle image was captured.

[0123] After obtaining the clustering results, for a certain clustering result, based on the above, it can be known that each vehicle data in the clustering result represents the data of the same vehicle at different locations or at different times. Therefore, based on the spatiotemporal information of each vehicle data and the road network data, the movement trajectory of the vehicle can be restored to obtain the restored trajectory information corresponding to the clustering result.

[0124] Regarding the specific process of trajectory restoration, the present disclosure is as follows: Figure 5 This will be described in the implementation method and will not be expanded here.

[0125] Based on the above, it can be known that by clustering the data of each vehicle, multiple clustering results can be obtained. By performing trajectory restoration on each clustering result, the restored trajectory information corresponding to each clustering result can be obtained. Thus, each clustering result and its corresponding restored trajectory information can be obtained.

[0126] S120: For any target clustering result among the at least two clustering results, based on the similarity between the target clustering result and the other clustering results, determine a candidate clustering set from the other clustering results.

[0127] It is worth noting that after the clustering results are obtained in step S110, the restored trajectory information obtained based on the clustering results can be used for downstream tasks, such as realizing the target vehicle escape detection, vehicle driving behavior analysis and other tasks based on the restored trajectory. However, through research, it is found that in practice, the clustering results obtained by clustering processing often have problems with noise and diffusion. For example, multiple vehicle data belonging to the same vehicle may be scattered in two or even more clustering results after clustering processing, resulting in poor trajectory restoration performance of the vehicle, and then poor results of downstream tasks.

[0128] Based on this discovery, in the disclosed embodiment, the restored trajectory information obtained according to the clustering results is used to feed the trajectory information back to the upstream clustering results, and the clustering results are iteratively updated. The restored trajectory information can be iteratively updated again based on the updated clustering results, thereby improving the accuracy of clustering and trajectory restoration, and further improving the effect of downstream tasks. This is described in detail below.

[0129] Specifically, in step S120, taking one of the multiple clustering results as an example, the clustering result is defined as a target clustering result, and the clustering results other than the clustering result are defined as other clustering results.

[0130] For a clustering result, the cluster center represents the average attribute of the clustering result. For example, the feature average of each vehicle data included in the clustering result is calculated, and the feature average can be used as the cluster center of the clustering result. In the embodiment of the present disclosure, the specific process of obtaining the cluster center of each clustering result is as follows: Figure 4 This will be described in the implementation method and will not be expanded here.

[0131] When calculating the similarity between two clustering results, the similarity between the two clustering results can be determined based on the distance between the cluster centers of the two clustering results.

[0132] In the disclosed embodiment, the similarities between the target clustering result and each other clustering result are determined respectively, and multiple similarities can be obtained. It can be understood that the higher the similarity, the higher the possibility that the two clustering results belong to the same vehicle, and vice versa, the lower the similarity, the lower the possibility that the two clustering results belong to the same vehicle.

[0133] Therefore, in order to simplify the amount of data, in the embodiment of the present disclosure, based on the similarity of the clustering results, a preset number of candidate clustering results are screened from all other clustering results to form a candidate clustering set.

[0134] In one example, the target clustering result and each other clustering result can be sorted from high to low according to the similarity between them, and the first preset number n candidate clustering results with the highest similarity are selected, and these n candidate clustering results form a candidate clustering set. The value of the preset number n can be selected according to the specific scenario requirements, and this disclosure does not limit it.

[0135] It can be understood that the n candidate clustering results with the highest similarity represent the highest possibility of belonging to the same vehicle as the target clustering result. Therefore, in this embodiment, only some clustering results with higher similarity are used to form a candidate clustering set, which reduces the amount of data to be processed later and improves calculation efficiency.

[0136] S130 , updating the target clustering result based on the similarity between the restored trajectory information of each candidate clustering result in the candidate clustering set and the restored trajectory information of the target clustering result.

[0137] Specifically, the candidate clustering set includes multiple candidate clustering results. For each candidate clustering result, it is necessary to further determine whether the candidate clustering result belongs to the same vehicle as the target clustering result, so as to feedback and update the target clustering result.

[0138] Combined with the above, the restored trajectory information corresponding to the clustering result represents the trajectory information of each vehicle data mapped to the road network. For different vehicle data belonging to the same vehicle scattered in two clustering results, the restored trajectory information corresponding to the two clustering results should have a high similarity in time and space. Therefore, the similarity between the two clustering results can be determined by the similarity between each restored trajectory information and the restored trajectory information of the target clustering result.

[0139] For example, a similarity threshold can be predetermined based on prior knowledge or a limited number of experiments. When the similarity between the restored trajectory information of a candidate clustering result and the restored trajectory information of the target clustering result exceeds the similarity threshold, it means that the candidate clustering result and the target clustering result belong to the same vehicle, so the candidate clustering result and the target clustering result can be merged. Otherwise, it means that the candidate clustering result and the target clustering result do not belong to the same vehicle and do not need to be merged.

[0140] In some embodiments, when determining the similarity between the restored trajectory information of a candidate clustering result in the candidate clustering set and the restored trajectory information of the target clustering result, it can be divided into two cases according to the number of vehicle data included in the candidate clustering result: 1) When the candidate clustering result contains only one vehicle data, its restored trajectory information is actually only one trajectory point, so the similarity with the restored trajectory information of the target clustering result can be determined based on the spatiotemporal information of the vehicle data. 2) When the candidate clustering result includes two or more vehicle data, that is, the restored trajectory information corresponding to the candidate clustering result is a path trajectory, the similarity between the path trajectory information and the restored trajectory information of the target clustering result can be calculated by a related algorithm. Figure 7 The detailed description will be given in the implementation method and will not be expanded here.

[0141] After the above merging process is performed on each candidate clustering result in the candidate clustering set, that is, the vehicle data belonging to the same vehicle scattered in different clustering results are merged into the same clustering result, the clustering result is updated.

[0142] It can be understood that in some embodiments, after obtaining the updated clustering results, the restored trajectory information can be iteratively updated again through the trajectory restoration algorithm based on the updated clustering results, that is, the steps of merging and trajectory restoration are cyclically executed until the convergence condition is met. This disclosure is specifically described below and will not be expanded here.

[0143] From the above, it can be seen that the vehicle data clustering method of the embodiment of the present disclosure uses the restored trajectory information to feedback and update the clustering results, thereby reducing the diffusion problem caused by clustering, improving clustering accuracy, and further facilitating subsequent vehicle trajectory restoration.

[0144] In some embodiments, the example of the present disclosure provides a vehicle trajectory restoration method, which can realize vehicle trajectory restoration based on the clustering results obtained by the vehicle data clustering method of the example of the present disclosure. The vehicle data clustering method and the vehicle trajectory restoration method are described simultaneously in the following of the present disclosure.

[0145] The vehicle trajectory restoration method of the embodiment of the present disclosure can be mainly divided into three stages: clustering processing, trajectory restoration and iterative updating. In the clustering processing stage, clustering processing is performed based on multiple input vehicle data to output various clustering results. In the trajectory restoration stage, vehicle trajectory restoration of each clustering result is achieved based on each clustering result and road network data, and restored trajectory information is output. In the iterative updating stage, the clustering results are iteratively updated based on the restored trajectory information, and the restored trajectory information is iteratively updated based on the updated clustering results. The method of the embodiment of the present disclosure is described below based on this framework.

[0146] 1. Clustering processing stage:

[0147] like Figure 2 As shown, in some embodiments, the vehicle data clustering method disclosed herein includes:

[0148] S210: Acquire vehicle data to be processed.

[0149] In the embodiment of the present disclosure, the vehicle data may be data collected by a camera at a road junction, for example. For one vehicle data, it includes a vehicle image and spatiotemporal information corresponding to the vehicle image, and the spatiotemporal information may include the acquisition time and acquisition location of the vehicle image.

[0150] In some implementations, for image data captured by a camera, a single frame of the image often includes multiple vehicles, and the image segmentation algorithm can be used to segment each vehicle to obtain vehicle data including only one vehicle.

[0151] For a vehicle data, feature information included in the vehicle image can be obtained by extracting features from the vehicle image. In the embodiment of the present disclosure, vehicle information and license plate information are obtained by extracting features from the vehicle image. Vehicle information may refer to vehicle features of the vehicle, such as vehicle ReID (Re-identification) feature information. License plate information may refer to vehicle license plate features, such as license plate feature information and license plate text information.

[0152] In one example, the vehicle information and license plate information of the target vehicle can be extracted through a neural network, and the neural network can include one or more combinations of target detection networks such as CNN (Convolutional Neural Networks), RCNN (Region-CNN), Fast RCNN, etc., so as to extract vehicle feature information and license plate feature information. The neural network can also include one or more combinations of text detection networks such as CTPN (Connectionist Text Proposal Network), TextCNN (Text Convolutional Network), TextRNN (Text Recurrent Convolutional Network), etc., so as to extract license plate text information.

[0153] In one example, the vehicle data to be processed comes from 24-hour video data from 673 cameras at 1,106 intersections in a city. By processing the video data, several vehicle data containing vehicle images can be obtained. By extracting features from the vehicle images, the vehicle information and license plate information corresponding to the vehicle images can be obtained.

[0154] That is, in the embodiment of the present disclosure, each vehicle data includes a vehicle image, spatiotemporal information of the vehicle image, vehicle information obtained based on the vehicle image, and license plate information.

[0155] S220: Determine a candidate image set based on the vehicle information and the license plate information.

[0156] Specifically, for each vehicle data, clustering processing can be performed on the vehicle data in a pre-established database based on the vehicle information and license plate information extracted from the vehicle image.

[0157] In the disclosed embodiment, in order to improve the search efficiency of clustering processing, the clustering result is not directly obtained from the database based on the vehicle information and license plate information, but first a candidate image set including a preset number of candidate images is obtained from the database, and then the clustering result of the vehicle data is determined based on the candidate image set. Thus, the calculation amount of clustering processing can be reduced and the efficiency of clustering processing can be improved through the search process of combining rough search with fine search.

[0158] In the following, a vehicle data is taken as an example, the vehicle corresponding to the vehicle data is defined as the target vehicle, and the vehicle image included in the vehicle data is defined as the image to be processed. Based on this, the clustering processing process in the example of the present disclosure is described in detail.

[0159] In one example, the vehicle information and license plate information of the image to be processed can be used to perform similarity matching on the target vehicle in a pre-established database, thereby obtaining a preset number of images before similarity sorting as a candidate image set.

[0160] It can be understood that vehicle data is pre-stored in the database, and the similarity between the image to be processed and each image in the database is obtained based on the vehicle information and license plate information of the image to be processed and the vehicle images stored in the database. The process of determining the candidate image set is specifically described in the following embodiments of the present disclosure, which will not be described in detail here.

[0161] S230 , based on the similarity between each candidate image in the candidate image set and the vehicle image, cluster the vehicle data to be processed to obtain a clustering result.

[0162] After obtaining the candidate image set from the database, similarity calculation can be performed based on the image to be processed and the candidate images in the candidate image set to obtain a clustering result.

[0163] The candidate image set includes multiple candidate images and a cluster category corresponding to each candidate image. The images included in the same cluster category represent images of the same vehicle, that is, images of the vehicle collected at different collection positions or at different collection times.

[0164] In one example, similarity processing can be performed on the image to be processed and the candidate images based on the vehicle information and license plate information to obtain the similarity between the image to be processed and each candidate image, and clustering processing can be performed based on the similarity between the image to be processed and each candidate image to obtain the clustering result of the image to be processed.

[0165] Re-identification (ReID) is also called re-identification, which refers to the use of computer vision technology to determine whether a specific target exists in an image or video sequence. An important feature of ReID is cross-camera recognition, which is very useful for restoring vehicle trajectories across cameras.

[0166] In some embodiments, the vehicle information described in the embodiments of the present disclosure includes ReID feature information, which can characterize the appearance features of the vehicle. The license plate information includes the license plate feature information and license plate text information of the target vehicle, the license plate feature information characterizes the appearance features of the vehicle's license plate, and the license plate text information characterizes the vehicle's license plate number.

[0167] Figure 3 The process of clustering the image to be processed in some embodiments of the present disclosure is shown in FIG. Figure 3 Provide explanation.

[0168] like Figure 3 As shown, in some embodiments, the vehicle data clustering method disclosed herein includes:

[0169] S310. Determine a first preset number of first image sets according to vehicle information.

[0170] S320: Determine a second preset number of second image sets according to the license plate information.

[0171] S330: Obtain a candidate image set according to the first image set and the second image set.

[0172] In the embodiment of the present disclosure, a candidate image set including a preset number of candidate images may be first obtained from a database using a rough search module, and then a clustering result of the image to be processed may be determined in the candidate image set using a fine search module.

[0173] Specifically, based on the similarity between the vehicle information of the target vehicle and the vehicle information of each image in the database, the similarity can be sorted from high to low, and the first M images with higher similarity can be selected as the first image set. Similarly, based on the similarity between the license plate information of the target vehicle and the license plate information of each image in the database, the similarity can be sorted from high to low, and the first N images with higher similarity can be selected as the second image set. M and N can be the same or different, and the present disclosure does not limit this.

[0174] In one example, cosine similarity may be used to calculate the similarity between vehicle information or license plate information of two images.

[0175] In one example, the vehicle information includes ReID feature information, and the license plate information includes license plate feature information. Based on the ReID feature information, 64 images are determined from the database as the first image set, and based on the license plate feature information, 64 images are determined from the database as the second image set.

[0176] Combining the above, it can be seen that the first image set represents the image set in the database that is most similar to the vehicle information of the target vehicle, and the second image set represents the image set in the database that is most similar to the license plate information of the target vehicle. After obtaining the first image set and the second image set, the first image set and the second image set can be taken as a union to obtain a candidate image set for a rough search.

[0177] Still using the above example, the first image set includes 64 images that are most similar to the vehicle information of the target vehicle, and the second image set includes 64 images that are most similar to the license plate information of the target vehicle. After the first image set and the second image set are combined, a candidate image set with a maximum of 128 candidate images is obtained.

[0178] After obtaining the candidate image set, the refined search module can perform clustering processing on the images to be processed according to the candidate images in the candidate image set. Figure 4 The specific process of clustering processing in the method of some embodiments of the present disclosure is shown in FIG.

[0179] like Figure 4 As shown, in some embodiments, the vehicle data clustering method disclosed herein includes:

[0180] S410: Determine a second similarity set between a candidate image in the candidate image set and the image to be processed based on the vehicle information and the license plate information.

[0181] S420: In response to the maximum similarity in the second similarity set being not less than a preset threshold, clustering the vehicle data into the category to which the candidate image corresponding to the maximum similarity belongs.

[0182] S430: In response to the maximum similarity in the second similarity set being less than a preset threshold, clustering the vehicle data into a newly added category.

[0183] In some embodiments, the similarity between each candidate image in the candidate image set and the image to be processed can be calculated based on the vehicle information and the license plate information, thereby obtaining a second similarity set. Specifically, for any candidate image, the joint similarity with the cluster center of the cluster result where the candidate image is located can be calculated based on the ReID feature information, license plate feature information, and license plate text information of the image to be processed, and the joint similarity represents the similarity between the candidate image and the image to be processed.

[0184] In one example, the ReID feature information of the cluster center can be expressed as:

[0185]

[0186] In formula (1), N represents the number of vehicle data in the clustering result, f represents the ReID feature of the cluster center, and f i represents vehicle characteristics, and n represents the normalization parameter.

[0187] Similarly, the license plate feature information of the cluster center can be expressed as:

[0188]

[0189] In formula (2), M represents the number of vehicle data with license plates in the clustering results, g represents the license plate feature of the cluster center, and g i represents the feature information of the license plate, and n represents the normalization parameter.

[0190] The above formula can be used to calculate the cluster center corresponding to each clustering result. For any candidate image, the cluster center feature of the clustering result where it is located can be compared with the image to be processed for similarity, and the joint similarity of the two images can be obtained by combining the license plate text information. In an example, the joint similarity S can be expressed as:

[0191]

[0192] In formula (3), S represents the joint similarity, S f represents the similarity of vehicle ReID feature information, S g Indicates the similarity of license plate feature information. S D Indicates the license plate text edit distance, that is, the similarity of the license plate text information. In the example of formula (3), 0.2 represents the weight of the similarity of the vehicle ReID feature information, and 0.8 represents the weight of the similarity of the license plate feature information. It can be understood that in other examples, the weight values ​​of the two can also be other values, and this example does not limit this.

[0193] The joint similarity between each candidate image and the image to be processed can be calculated by formula (3). After determining the similarity between each candidate image in the candidate image set and the image to be processed, all similarities can be taken as a set to obtain a second similarity set.

[0194] It can be understood that each element in the second similarity set represents the joint similarity between the candidate image and the image to be processed, and the maximum similarity value indicates that the candidate image and the image to be processed have the highest joint similarity, that is, the two images are most likely to belong to the same vehicle.

[0195] Therefore, in some embodiments, the maximum similarity in the second similarity set may be compared with a preset threshold. The preset threshold represents a threshold value for determining that the target vehicle and the vehicle included in the candidate image are the same vehicle, and the preset threshold may be predetermined based on a limited number of experiments, or may be obtained by neural network training, or may be dynamically adjusted based on historical data, and the present disclosure does not impose any limitation on this.

[0196] In one example, if the maximum similarity in the second similarity set is not less than a preset threshold, it means that the candidate image corresponding to the maximum similarity and the image to be processed are images of the same vehicle, that is, both are images of the target vehicle. It can be determined that the two belong to the same category, and the vehicle data corresponding to the image to be processed is clustered into this category.

[0197] In another example, if the maximum similarity in the second similarity set is less than a preset threshold, it means that the candidate image corresponding to the maximum similarity does not belong to the same vehicle as the image to be processed, and other images in the candidate image set are even less likely to belong to the same vehicle as the image to be processed. Therefore, it can be determined that the vehicle corresponding to the image to be processed is a newly appeared vehicle, and a new category is created for the vehicle data corresponding to the image to be processed.

[0198] After clustering the vehicle data to be processed through the above process, various clustering results are output, wherein each clustering result includes at least one vehicle data, and in this stage, these vehicle data can be considered to belong to the same vehicle.

[0199] From the above, it can be seen that the method of the embodiment of the present disclosure performs clustering processing on vehicle data based on multimodal information such as vehicle information and license plate information, which is conducive to eliminating the confusion error caused by the license plate text, improving the search accuracy of clustering processing, and thus improving the accuracy of trajectory restoration. In addition, when clustering vehicle data, firstly, a set of candidate images is determined by a rough search, and then a clustering result is obtained by a fine search. Compared with the joint search of the entire library of massive data, the search speed is greatly improved and the efficiency of clustering processing is improved.

[0200] 2. Trajectory restoration stage:

[0201] After obtaining each clustering result for the vehicle data clustering process, the clustering result is mapped to the road network space based on each vehicle data included in the clustering result to obtain the restored trajectory information. It can be understood that the clustering result represents a data set of the same vehicle at different times and locations, and the restored trajectory information obtained based on the vehicle data of each clustering result represents the movement trajectory of the vehicle. According to the restored trajectory information, the downstream related tasks can be executed.

[0202] Specifically, if Figure 5 As shown, in some embodiments, the vehicle trajectory restoration method disclosed herein includes:

[0203] S510: Obtain road network data and clustering results.

[0204] Specifically, the clustering results are the clustering results obtained in the aforementioned clustering processing stage, which will not be described in detail. The road network data refers to the data of road network information. For example, in the aforementioned example, the road network data is the urban road network data covering the aforementioned 1106 intersections and 673 cameras.

[0205] In some implementations, in order to improve the mapping accuracy of vehicle trajectories in the road network space, the original road network data may be preprocessed first, which can simplify the data volume of the road network data on the one hand, and on the other hand, the road network data may be completed to improve accuracy.

[0206] Specifically, if Figure 6 As shown, in some implementations, the above step S510 may include:

[0207] S511, obtaining original road network data and various clustering results.

[0208] S512: Based on the spatiotemporal information of the vehicle data included in each clustering result, the original road network data is preprocessed to obtain road network data.

[0209] Specifically, the original road network data may be urban road network data obtained through network download or other means. For the disclosed scenario, considering that the area covered by the vehicle data is relatively small, for example, the original road network data is data covering the entire city, but the vehicle data is only collected data for a part of the area. If all the road network data is used for calculation, the data volume is poor, which reduces the operation efficiency. At the same time, the original road network data may have data missing, such as road discontinuity and other problems. Therefore, the original road network data is preprocessed in the disclosed embodiment.

[0210] In some implementations, the original road network may be preprocessed based on the spatiotemporal information of the vehicle data included in each clustering result. For example, the collection location of each vehicle data may be obtained, and based on all the collection locations, the road network area covering all the collection locations may be determined from the original road network, and the data outside the area may be removed and simplified. At the same time, the missing data may be supplemented based on the spatial information of the road intersection data, thereby obtaining a continuous road network.

[0211] In one example, the input original road network data is preprocessed by the OSMnx algorithm, and simplified road network data is output.

[0212] After preprocessing the original road network data, simplified road network data can be obtained, so that trajectory recovery can be performed based on the simplified road network data.

[0213] From the above, it can be seen that the method of the embodiment of the present disclosure can complete the missing information in the original road network data by preprocessing the original road network data, and reduce the data volume and improve the system efficiency by simplifying irrelevant data.

[0214] S520. For each clustering result, based on the spatiotemporal information of each vehicle data and the road network data included in the clustering result, determine the trajectory point corresponding to each vehicle data on the road network corresponding to the road network data.

[0215] Specifically, for each clustering result, each vehicle data included therein represents the collected data of the target vehicle at a certain time and a certain location, and is thus mapped to the road network space, which corresponds to a trajectory point on the road network space.

[0216] Therefore, in the embodiment of the present disclosure, one or more discrete trajectory points can be obtained by mapping each vehicle data in the clustering result to the road network space corresponding to the road network data.

[0217] S530 , obtaining restored trajectory information corresponding to the clustering result according to the spatiotemporal information of the vehicle data corresponding to each trajectory point.

[0218] Specifically, after obtaining each discrete trajectory point, each trajectory point can be fitted in combination with the time series information, so as to restore multiple discrete trajectory points to a path trajectory.

[0219] In one example, considering the requirements of actual business scenarios on the efficiency of the trajectory restoration algorithm, a concise and efficient Hidden Markov Model (HMM) algorithm can be used for trajectory restoration.

[0220] The essence of the algorithm is to use HMM to find the most likely trajectory path on the road network, which is represented by a time information sequence corresponding to latitude and longitude / latitude and longitude. In the embodiment of the present disclosure, the discrete state of HMM is the intersection in the road network. For the position of the trajectory point corresponding to each vehicle data, the road intersection that the vehicle actually passed can be found, and then the most likely path is found through multiple trajectory points and spatiotemporal information, that is, the trajectory information is restored.

[0221] In some implementations, after obtaining the restored trajectory information, considering the discontinuity of the hidden state output by the HMM, a shortest path recovery method can be combined to smoothly restore the hidden state pairs with disconnected trajectory information, thereby obtaining continuous trajectory information.

[0222] The above-mentioned trajectory restoration process is performed for each clustering result, so as to output the restored trajectory information corresponding to each clustering result, that is, each clustering result corresponds to a restored trajectory information.

[0223] From the above, it can be seen that in the method of the example of the present disclosure, the HMM algorithm is used to restore the trajectory based on each trajectory point to improve the system efficiency, and the restored trajectory information is smoothed based on the shortest path method to obtain a complete and continuous trajectory, thereby improving the accuracy of trajectory restoration.

[0224] It is understood that the HMM algorithm in the above example is only used to illustrate the method of the present disclosure and does not limit the embodiments of the present disclosure. In other embodiments, those skilled in the art may also use other algorithms to achieve the fitting restoration of the trajectory points, and the present disclosure does not limit this.

[0225] 3. Iterative update phase:

[0226] Based on the above, it can be known that when downstream tasks are executed according to the restored trajectory information obtained in the trajectory restoration stage, the downstream tasks are not effective. The inventors have found that this is due to the diffusion problem in the initial clustering results, so the subsequent trajectory restoration performance is poor, resulting in poor downstream task effects. For example, in the clustering processing stage, multiple vehicle data belonging to the same vehicle may be scattered in two or even more clustering results after clustering processing, that is, the multiple restored trajectory information corresponding to these multiple clustering results are actually the same vehicle. However, due to the dispersion of the trajectory information, the restored trajectory information is missing, resulting in low accuracy of subsequent tasks.

[0227] Therefore, in the embodiment of the present disclosure, the restored trajectory information is used to feedback and update the initial clustering result. Figure 7 Provide specific instructions.

[0228] like Figure 7 As shown, in some embodiments, the vehicle data clustering method of the embodiment of the present disclosure includes:

[0229] S710: Obtain a first cluster center of a target clustering result and a second cluster center of each other clustering result.

[0230] Specifically, the calculation method of the cluster center of the clustering result can refer to the above Figure 4 For each clustering result, the cluster center of the target clustering result is defined as the first clustering center, and the cluster centers of the other clustering results except the target clustering result are defined as the second clustering center.

[0231] S720: Obtain a first similarity set according to the similarity between the first cluster center and each second cluster center.

[0232] Specifically, for multiple other clustering results, the similarity between each other clustering result and the cluster center of the target clustering result, that is, the similarity between the first cluster center and each second cluster center, is calculated, so that multiple similarities can be obtained, and the multiple similarities constitute a first similarity set.

[0233] It can be understood that each element in the first similarity set represents the similarity between some other clustering result and the target clustering result. The higher the similarity, the higher the possibility that the clustering result and the target clustering result belong to the same vehicle, and vice versa.

[0234] S730: Determine other clustering results corresponding to a preset number of similarities from the first similarity set to obtain a candidate clustering set.

[0235] It is worth noting that in the embodiment of the present disclosure, based on the similarity between clustering results, a candidate clustering set consisting of a preset number of candidate clustering results is screened out from other clustering results, and then the target clustering result is updated with respect to the candidate clustering results in the candidate clustering set.

[0236] In one example, the elements in the similarity set may be sorted from high to low, and then the top k similarities are screened out, and the candidate clustering results corresponding to the k similarities are combined as the candidate clustering set.

[0237] It can be understood that the k elements with the highest similarity ranking represent clustering results that are more likely to belong to the same vehicle as the target clustering result, so the clustering results corresponding to the k similarities are combined into a candidate merge set. For the remaining clustering results, since the similarity is low, no subsequent update processing is required.

[0238] It can be seen from the above that in the embodiment of the present disclosure, a preset number of clustering results with the highest similarity to a target clustering result are screened from a plurality of clustering results, thereby reducing the amount of data to be subsequently processed and improving computational efficiency.

[0239] It can be understood that for different vehicle data belonging to the same vehicle that are dispersed in two clustering results, the restored trajectory information corresponding to the two clustering results should have a high similarity in time and space. Therefore, the similarity between the two clustering results can be determined by the similarity between each restored trajectory information and the restored trajectory information of the target clustering result. After obtaining the candidate clustering set, it can be further determined whether the candidate clustering result needs to be merged with the target clustering result based on the similarity between each candidate clustering result in the candidate clustering and the target clustering result.

[0240] In an embodiment of the present disclosure, when determining the similarity between the restored trajectory information of a candidate clustering result in the candidate clustering set and the restored trajectory information of the target clustering result, it can be divided into two cases according to the number of vehicle data included in the candidate clustering result: 1) The candidate clustering result contains only one vehicle data, see the following step S740 for details. 2) The candidate clustering result contains two or more vehicle data, see the following step S750 for details.

[0241] S740: In response to the candidate clustering result including only one vehicle data, and the similarity between the spatiotemporal information of the vehicle data and the moment information of the restored trajectory information of the target clustering result is not less than a first similarity threshold, the candidate clustering result and the target clustering result are merged.

[0242] Specifically, taking a candidate clustering result in the candidate clustering set as an example, if the candidate clustering result contains only one vehicle data, then the restored trajectory information corresponding to the candidate clustering result is actually a discrete trajectory point in the road network space. In this case, the similarity between the candidate clustering result and the target clustering result is actually the possibility of the trajectory point appearing in the restored trajectory information of the target clustering result.

[0243] In this embodiment, based on the time information and space information of the trajectory point, a preset time-space threshold may be used to determine the possibility that the trajectory point appears in the restored trajectory information of the target clustering result.

[0244] In one example, the distance between two points can be determined based on the collected position information of the trajectory point and the position information of the trajectory point in the restored trajectory information of the target clustering result. At the same time, the time difference between the two points can be obtained by combining the collection time information of the two trajectory points. Therefore, the average speed of the vehicle moving from one point to another can be calculated based on the distance and time difference. The average speed can be compared with a pre-set speed threshold, which represents the speed threshold value of the vehicle moving on urban roads, and the threshold can be obtained based on prior knowledge. If the calculated average speed is greater than the speed threshold, it means that it is unreasonable for the vehicle to move from one point to another, which means that the trajectory point cannot appear in the restored trajectory information of the target clustering result, thereby determining that the similarity between the clustering result and the restored trajectory information of the target clustering result is less than the first similarity threshold, that is, the clustering result and the target clustering result do not belong to the same vehicle. The opposite is true.

[0245] S750: In response to the candidate clustering result including at least two vehicle data, and the similarity between the first restored trajectory information corresponding to the target clustering result and the second restored trajectory information corresponding to the candidate clustering result is not less than a second similarity threshold, the candidate clustering result and the target clustering result are merged.

[0246] Specifically, taking a candidate clustering result in the candidate clustering set as an example, if the candidate clustering result includes two or more vehicle data, that is, the restored trajectory information corresponding to the candidate clustering result is a trajectory path in the road network space. In this case, the similarity between the candidate clustering result and the target clustering result is the similarity of the restored trajectory information of the two.

[0247] In one example, the similarity of the two restored trajectory information may be calculated using, for example, the LCSS (longest common subsequence) algorithm. The second similarity threshold represents the threshold value of the restored trajectory belonging to the same trajectory. When the similarity is not less than the second similarity threshold, it indicates that the two restored trajectory information belong to the trajectory of the same vehicle. Otherwise, the opposite is true.

[0248] In step S740 and step S750, when it is determined that a candidate clustering result and a target clustering result belong to the same vehicle, the two clustering results are merged, that is, the candidate clustering result is merged into the target clustering result, and the target clustering result is updated.

[0249] It is worth mentioning that further research has found that although the disclosed method can effectively reduce the diffusion problem of clustering results, that is, the problem that multiple vehicle data belonging to the same vehicle are scattered in multiple clustering results, there may still be noise in the initial clustering results, which will also affect the accuracy of trajectory restoration.

[0250] For example, for a certain clustering result, if it includes vehicle data that does not belong to this category, the vehicle data will be considered noise for trajectory restoration, that is, the moving trajectory that does not belong to the target vehicle will be merged into the restored trajectory information of the target vehicle, thereby affecting the accuracy of downstream tasks.

[0251] To address this problem, in some embodiments of the present disclosure, after updating the target clustering result, each clustering result is further denoised to remove the noise in the clustering result. Figure 8 Please explain in detail.

[0252] like Figure 8 As shown, in some embodiments, the vehicle data clustering method of the present disclosure example includes:

[0253] S810: For each clustering result, obtain each vehicle data included in the clustering result.

[0254] Specifically, taking a clustering result as an example, first obtain each vehicle data included in the clustering result, and then judge each vehicle data to determine whether it belongs to the clustering result. S820: For each vehicle data, update the confidence score of the vehicle data based on the spatiotemporal information of the vehicle data to obtain an updated confidence score.

[0255] Specifically, for multiple vehicle data included in a clustering result, each vehicle data has a corresponding initial confidence score, and the confidence score represents the similarity between the vehicle data and the clustering result. For example, in some embodiments of the present disclosure, the confidence score is the aforementioned joint similarity, that is, the confidence score of the vehicle data can be obtained by the aforementioned formula (3).

[0256] In some implementations, for each vehicle data, a confidence weight of the vehicle data may be first determined based on the spatiotemporal information of the vehicle data, and then the confidence score of the vehicle data may be updated based on the confidence weight to obtain an updated confidence score.

[0257] Specifically, if Fig. 9 As shown, in some embodiments, the process of updating the confidence score in step S820 includes:

[0258] S821. Determine a distance set between the vehicle data and other vehicle data in the clustering result to which the vehicle data belongs based on the spatiotemporal information of the vehicle data.

[0259] S822. Determine the confidence weight of the vehicle data according to the minimum distance in the distance set.

[0260] S823. Update the confidence score of the vehicle according to the confidence weight.

[0261] Taking a certain clustering result as an example, the clustering result includes multiple vehicle data, wherein each vehicle data represents vehicle data collected at different times and locations, that is, each vehicle data includes different spatiotemporal information.

[0262] Take a vehicle data r in the clustering result as an example. The vehicle data r includes spatiotemporal information, that is, the location and time of collecting the vehicle data. According to the spatiotemporal information of the vehicle data r and the clustering information of other vehicle data in the clustering result, the distances between the vehicle data r and each other vehicle data can be obtained respectively, and these distances constitute a distance set.

[0263] After obtaining the distance set, the confidence weight of vehicle data r can be determined according to the minimum distance in the distance set. It can be understood that each element in the distance set represents the distance between vehicle data r and other vehicle data, and the element corresponding to the minimum distance represents the trajectory point closest to vehicle data r, so the determined confidence weight can reflect the possibility of vehicle data r appearing in the clustering result. The smaller the distance, the higher the confidence weight, and vice versa.

[0264] After the confidence weight is determined, the initial confidence score of the vehicle data r can be multiplied by the confidence weight to obtain an updated confidence score.

[0265] In one example, the vehicle data corresponding to the minimum distance in the distance set of the vehicle data r is i, and the initial confidence score of the vehicle data r is multiplied by the confidence weight to obtain the updated confidence score, which is expressed as:

[0266] S new =S*exp(-dist(r,i)) Formula (4)

[0267] In formula (4), S represents the initial confidence score S of vehicle data r new represents the updated confidence score. dist(r, i) represents the confidence weight, that is, the distance between vehicle data r and vehicle data i. exp(-dist(r, i)) represents the confidence weight.

[0268] S830: In response to the updated confidence score being less than a preset score threshold, remove the vehicle data from the clustering results.

[0269] After calculating the updated confidence score, it can be determined whether the updated confidence score is not less than the preset score threshold according to the preset score threshold. The preset score threshold indicates the threshold value for the vehicle data to belong to the clustering result. When the updated confidence score is less than the preset score threshold, it indicates that the vehicle data does not belong to the clustering result, that is, the vehicle data is noise and needs to be removed from the clustering result. When the updated confidence score is not less than the preset score threshold, it indicates that the vehicle data belongs to the clustering result and does not need to be removed from the clustering result. This continues until all vehicle data has been screened.

[0270] It is understandable that the above Figure 7 and Figure 8 In the implementation, the process of merging and denoising the clustering results respectively may adopt only one of them or both at the same time, and the processing order of the two does not need to be limited. However, considering that the denoising process needs to remove data from the clustering results, preferably, the denoising process can be set after the merging process, so that the updated clustering results after the merging process can be denoised, thereby improving the denoising effect.

[0271] It is worth noting that in some embodiments of the vehicle trajectory restoration method disclosed in the present invention, after merging and / or denoising each clustering result, updated clustering results are obtained, that is, new restored trajectory information can be obtained again based on the updated clustering results, and the new restored trajectory information obtained can be fed back to update the clustering results again, that is, a cyclic iterative update process is formed.

[0272] like Fig.10 As shown, in some embodiments, the vehicle trajectory restoration method of the present disclosure example includes:

[0273] S1010: Update the restoration trajectory information corresponding to the target clustering result according to the updated target clustering result.

[0274] S1020: Based on the updated target clustering result and the restored trajectory information, repeatedly determine the candidate clustering set from other clustering results and update the target clustering result until a convergence condition is met.

[0275] For example, for a first clustering result after the initial clustering process, the first restored trajectory information can be obtained based on the first clustering result. Based on the first restored trajectory information, the method of the embodiment of the present disclosure can be used to iteratively update the first clustering result to obtain a second clustering result. After obtaining the second clustering result, the second restored trajectory information can be obtained based on the second clustering result. Based on the second restored trajectory information, the method of the embodiment of the present disclosure can be used to iteratively update the second clustering result to obtain a third clustering result... and the above process is executed in a loop.

[0276] It can be seen that in the embodiment of the present disclosure, the restored trajectory information is used to iteratively update the upstream clustering results, and the updated clustering results can iteratively update the downstream restored trajectory information, thereby forming a cyclic iterative process until the convergence condition is met.

[0277] In one example, the convergence condition is: the confidence score of all vehicle data in the clustering result is not less than a preset score threshold. That is, if there is no vehicle data that does not belong to the category in all clustering results, it can be determined that the clustering result meets the convergence condition and the iterative process is stopped.

[0278] In another example, the convergence condition is: the number of loop iterations meets a preset number threshold. That is, when the number of loop iterations of the clustering result reaches the preset number threshold, it can be determined that the clustering result meets the convergence condition, and the loop iteration process is stopped.

[0279] Of course, it can be understood that the convergence condition for the loop iteration can also be any other suitable implementation method, and those skilled in the art can set it according to the specific scenario, and the present disclosure does not limit this.

[0280] Fig.11 This is a schematic diagram of the effect of the cyclic iteration of the trajectory restoration method disclosed in an example. Fig.11 As shown, Fig.11 (a) is the original clustering result, and the discrete points in the dotted box are noise. Fig.11 (b) shows the trajectory data after denoising. It can be seen that the noise of discrete points at a longer distance is effectively removed. Fig.11(c) is the iterative update of the clustering result according to (b). It can be seen that the updated clustering result effectively eliminates the noise at the edge and obtains good trajectory point information.

[0281] From the above, it can be seen that the method of the embodiment of the present disclosure iteratively updates the upstream clustering results by restoring the trajectory information, and the updated clustering results can iteratively update the downstream restored trajectory information, thereby forming a cyclic iterative process, which can effectively improve the clustering accuracy and trajectory restoration accuracy, and thus improve the downstream task effect.

[0282] Fig.12 The system framework diagram of the vehicle trajectory restoration method disclosed in the present invention is shown as follows: Fig.12 As shown, the system mainly includes three parts: visual module, spatiotemporal module and iteration module. The visual module performs clustering processing based on multiple vehicle data input, thereby outputting various clustering results. The spatiotemporal module restores the vehicle trajectory of each clustering result based on each clustering result and the input road network data, and outputs the restored trajectory information. The iteration module performs the above-mentioned cyclic iterative update based on the input clustering results and restored trajectory information, and outputs the updated clustering results and restored trajectory information. Based on the foregoing, those skilled in the art can undoubtedly understand and fully implement Fig.12 system, no further elaboration is given here.

[0283] The present disclosure provides a vehicle data clustering device. In some embodiments, Fig.13 As shown, the vehicle data clustering device in some examples of the present disclosure includes:

[0284] A first acquisition module 11 is configured to acquire at least two clustering results obtained according to the vehicle data clustering process, and restored trajectory information corresponding to each clustering result;

[0285] The determination module 12 is configured to determine, for any target clustering result among the at least two clustering results, a candidate clustering set from the other clustering results based on the similarity between the target clustering result and the other clustering results; wherein the other clustering results are clustering results other than the target clustering result among the at least two clustering results;

[0286] The clustering update module 13 is configured to update the target clustering result based on the similarity between the restored trajectory information of each candidate clustering result in the candidate clustering set and the restored trajectory information of the target clustering result.

[0287] From the above, it can be seen that the vehicle data clustering device of the embodiment of the present disclosure uses the restored trajectory information to feedback and update the clustering results, thereby reducing the diffusion problem caused by clustering, improving clustering accuracy, and further facilitating subsequent vehicle trajectory restoration.

[0288] In some implementations, the determination module 12 is specifically configured to:

[0289] Obtain the first cluster center of the target clustering result and the second cluster center of each other clustering result;

[0290] According to the similarity between the first cluster center and each second cluster center, a first similarity set is obtained;

[0291] Other clustering results corresponding to a preset number of similarities are determined from the first similarity set to obtain a candidate clustering set.

[0292] In some implementations, the vehicle data includes vehicle information and license plate information, and the determination module 12 is specifically configured to:

[0293] For each clustering result, a cluster center of the clustering result is determined based on the vehicle information and license plate information included in the clustering result.

[0294] In some implementations, the cluster updating module 13 is specifically configured to:

[0295] For each candidate clustering result in the candidate clustering set, based on the similarity between the restored trajectory information of the candidate clustering result and the restored trajectory information of the target clustering result, the candidate clustering result and the target clustering result are merged to obtain an updated target clustering result.

[0296] In some implementations, the cluster updating module 13 is specifically configured to:

[0297] In response to the candidate clustering result including a vehicle data, and the similarity between the spatiotemporal information of the vehicle data and the spatiotemporal information of the restored trajectory information of the target clustering result is not less than a first similarity threshold, the candidate clustering result and the target clustering result are merged.

[0298] In some implementations, the cluster updating module 13 is specifically configured to:

[0299] In response to the candidate clustering result including at least two vehicle data, and the similarity between the first restored trajectory information corresponding to the target clustering result and the second restored trajectory information corresponding to the at least two vehicle data is not less than a second similarity threshold, the candidate clustering result and the target clustering result are merged.

[0300] In some embodiments, Fig.14 As shown, the vehicle data clustering device of the example of the present disclosure further includes:

[0301] The second acquisition module 21 is configured to acquire, for each clustering result, each vehicle data included in the clustering result;

[0302] The score updating module 22 is configured to update the confidence score of each vehicle data based on the spatiotemporal information of the vehicle data to obtain an updated confidence score; the confidence score indicates the similarity between the vehicle data and the clustering result corresponding to the vehicle data;

[0303] The removal module 23 is configured to remove the vehicle data from the clustering result in response to the updated confidence score being less than a preset score threshold.

[0304] In some implementations, the score updating module 22 is specifically configured to:

[0305] Determine, based on the spatiotemporal information of the vehicle data, a distance set between the vehicle data and other vehicle data in the clustering result to which the vehicle data belongs;

[0306] Determine the confidence weight of the vehicle data according to the minimum distance in the distance set;

[0307] The confidence score of the vehicle is updated according to the confidence weight.

[0308] In some implementations, the first acquisition module 11 is specifically configured to:

[0309] Acquire each vehicle data to be processed; the vehicle data includes a vehicle image and vehicle information and license plate information extracted from the vehicle image;

[0310] Determine a candidate image set based on the vehicle information and the license plate information;

[0311] Based on the similarity between each candidate image in the candidate image set and the vehicle image, clustering processing is performed on the vehicle data to be processed to obtain at least two clustering results.

[0312] In some implementations, the first acquisition module 11 is specifically configured to:

[0313] Based on the vehicle information and the license plate information, determining a second similarity set between the candidate image and the vehicle image in the candidate image set;

[0314] In response to the maximum similarity in the second similarity set being not less than a preset threshold, clustering the vehicle data into the category to which the candidate image corresponding to the maximum similarity belongs;

[0315] and / or,

[0316] In response to the maximum similarity in the second similarity set being less than a preset threshold, the vehicle data is clustered into a newly added category.

[0317] In some embodiments, Fig.15 As shown, the embodiment of the present disclosure provides a vehicle trajectory restoration device, comprising:

[0318] The trajectory updating module 31 is configured to update the restored trajectory information corresponding to the target clustering result according to the updated target clustering result; the vehicle data clustering method according to any implementation of the first aspect is obtained according to the updated target clustering result;

[0319] The loop iteration module 32 is configured to repeatedly perform the steps of determining a candidate clustering set from other clustering results and updating the target clustering result based on the updated target clustering result and the restored trajectory information until a convergence condition is met.

[0320] In some implementations, the first acquisition module 11 is specifically configured to:

[0321] Obtain road network data and clustering results;

[0322] For each clustering result, based on the spatiotemporal information of each vehicle data and the road network data included in the clustering result, determining a trajectory point corresponding to each vehicle data on the road network corresponding to the road network data;

[0323] According to the spatiotemporal information of the vehicle data corresponding to each trajectory point, the restored trajectory information corresponding to the clustering result is obtained.

[0324] In some implementations, the first acquisition module 11 is specifically configured to:

[0325] Obtain original road network data and clustering results;

[0326] Based on the spatiotemporal information of the vehicle data included in each clustering result, the original road network data is preprocessed to obtain the road network data.

[0327] In some implementations, the present disclosure provides an electronic device, including:

[0328] Processor; and

[0329] The memory stores computer instructions that can be read by the processor. When the computer instructions are read, the processor executes the method of any of the above embodiments.

[0330] In some embodiments, the present disclosure provides a storage medium for storing computer-readable instructions, where the computer-readable instructions are used to cause a computer to execute the method of any of the above embodiments.

[0331] Specifically, Fig.16 A schematic diagram of the structure of a computer system 600 suitable for implementing the method disclosed in the present invention is shown. Fig.16 The system shown can realize the corresponding functions of the above-mentioned processor and storage medium.

[0332] like Fig.16As shown, the computer system 600 includes a processor 601, which can perform various appropriate actions and processes according to the program stored in the memory 602 or the program loaded from the storage part 608 into the memory 602. Various programs and data required for the operation of the system 600 are also stored in the memory 602. The processor 601 and the memory 602 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0333] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0334] In particular, according to an embodiment of the present disclosure, the above method process can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes a program code for executing the above method. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 609, and / or installed from a removable medium 611.

[0335] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0336] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the embodiments. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. The obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.

Claims

1. A vehicle data clustering method, characterized in that: include: Acquire at least two clustering results obtained according to the vehicle data clustering process, and restored trajectory information corresponding to each of the clustering results; For any target clustering result among the at least two clustering results, based on the similarity between the target clustering result and the other clustering results, determine a candidate clustering set from the other clustering results; wherein the other clustering results are clustering results other than the target clustering result among the at least two clustering results; Based on the restored trajectory information of each candidate clustering result in the candidate clustering set and the similarity with the restored trajectory information of the target clustering result, updating the target clustering result; The obtaining of at least two clustering results obtained by clustering the vehicle data includes: Acquire each vehicle data to be processed; the vehicle data includes a vehicle image and vehicle information and license plate information extracted from the vehicle image; Determining a candidate image set based on the vehicle information and the license plate information; Based on the similarity between each candidate image in the candidate image set and the vehicle image, clustering processing is performed on the vehicle data to be processed to obtain the at least two clustering results.

2. The method according to claim 1, characterized in that The determining of a candidate cluster set from the other clustering results comprises: Obtaining a first cluster center of the target clustering result and a second cluster center of each other clustering result; Obtaining a first similarity set according to the similarity between the first cluster center and each of the second cluster centers; Other clustering results corresponding to a preset number of similarities are determined from the first similarity set to obtain the candidate clustering set.

3. The method according to claim 2, characterized in that The vehicle data includes vehicle information and license plate information, and the step of obtaining the cluster center of each clustering result includes: For each clustering result, a cluster center of the clustering result is determined based on the vehicle information and license plate information included in the clustering result.

4. The method according to claim 1, characterized in that The updating of the target clustering result based on the restored trajectory information of each candidate clustering result in the candidate clustering set and the similarity of the restored trajectory information of the target clustering result includes: For each candidate clustering result in the candidate clustering set, based on the similarity between the restored trajectory information of the candidate clustering result and the restored trajectory information of the target clustering result, the candidate clustering result and the target clustering result are merged to obtain an updated target clustering result.

5. The method according to claim 4, characterized in that The merging of the candidate clustering result and the target clustering result includes: In response to the candidate clustering result including a vehicle data, and the similarity between the spatiotemporal information of the vehicle data and the spatiotemporal information of the restored trajectory information of the target clustering result is not less than a first similarity threshold, merging the candidate clustering result and the target clustering result; and / or, In response to the candidate clustering result including at least two vehicle data, and the similarity between the first restored trajectory information corresponding to the target clustering result and the second restored trajectory information corresponding to the at least two vehicle data is not less than a second similarity threshold, the candidate clustering result and the target clustering result are merged.

6. The method according to any one of claims 1 to 5, characterized in that: After updating the target clustering result, the method further includes: For each clustering result, obtaining each vehicle data included in the clustering result; For each vehicle data, the confidence score of the vehicle data is updated based on the spatiotemporal information of the vehicle data to obtain an updated confidence score; the confidence score represents the similarity between the vehicle data and the clustering result corresponding to the vehicle data; In response to the updated confidence score being less than a preset score threshold, the vehicle data is removed from the clustering result.

7. The method according to claim 6, characterized in that For each piece of vehicle data, updating the confidence score of the vehicle data based on the spatiotemporal information of the vehicle data includes: Determine, based on the spatiotemporal information of the vehicle data, a distance set between the vehicle data and other vehicle data in the clustering result to which the vehicle data belongs; Determining a confidence weight of the vehicle data according to a minimum distance in the distance set; The confidence score of the vehicle is updated according to the confidence weight.

8. The method according to claim 1, characterized in that The clustering process of the to-be-processed images based on the similarity between each candidate image in the candidate image set and the vehicle image comprises: Based on the vehicle information and the license plate information, determining a second similarity set between the candidate images in the candidate image set and the vehicle image; In response to a maximum similarity in the second similarity set being not less than a preset threshold, clustering the vehicle data into a category to which the candidate image corresponding to the maximum similarity belongs; and / or, In response to a maximum similarity in the second similarity set being less than a preset threshold, clustering the vehicle data into a newly added category.

9. A vehicle trajectory restoration method, characterized in that: include: According to the updated target clustering result, the restoration trajectory information corresponding to the target clustering result is updated; The updated target clustering result Obtained according to the vehicle data clustering method according to any one of claims 1 to 8; Based on the updated target clustering result and the restored trajectory information, the steps of determining the candidate clustering set from the other clustering results and updating the target clustering result are repeatedly performed until a convergence condition is met.

10. The method according to claim 9, characterized in that Obtaining restoration trajectory information corresponding to the clustering result includes: Obtain road network data and clustering results; For each clustering result, based on the spatiotemporal information of each vehicle data included in the clustering result and the road network data, determining a trajectory point corresponding to each vehicle data on the road network corresponding to the road network data; According to the spatiotemporal information of the vehicle data corresponding to each trajectory point, the restored trajectory information corresponding to the clustering result is obtained.

11. The method according to claim 10, characterized in that The obtaining of road network data comprises: Obtain original road network data and clustering results; Based on the spatiotemporal information of the vehicle data included in each clustering result, the original road network data is preprocessed to obtain the road network data.

12. A vehicle data clustering device, characterized in that: include: A first acquisition module is configured to acquire at least two clustering results obtained according to the vehicle data clustering process, and restored trajectory information corresponding to each of the clustering results; A determination module, configured to determine, for any target clustering result among the at least two clustering results, a candidate clustering set from the other clustering results based on a similarity between the target clustering result and the other clustering results; wherein the other clustering results are clustering results other than the target clustering result among the at least two clustering results; A clustering update module, configured to update the target clustering result based on the similarity between the restored trajectory information of each candidate clustering result in the candidate clustering set and the restored trajectory information of the target clustering result; The first acquisition module is specifically configured as follows: Acquire each vehicle data to be processed; the vehicle data includes a vehicle image and vehicle information and license plate information extracted from the vehicle image; Determining a candidate image set based on the vehicle information and the license plate information; Based on the similarity between each candidate image in the candidate image set and the vehicle image, clustering processing is performed on the vehicle data to be processed to obtain the at least two clustering results.

13. A vehicle trajectory restoration device, characterized in that: include: A trajectory updating module is configured to update the restored trajectory information corresponding to the target clustering result according to the updated target clustering result; The updated target clustering result Obtained according to the vehicle data clustering method according to any one of claims 1 to 8; The loop iteration module is configured to repeatedly perform the steps of determining the candidate clustering set from the other clustering results and updating the target clustering result based on the updated target clustering result and the restored trajectory information until a convergence condition is met.

14. An electronic device, characterized in that: include: processor; as well as A memory storing computer instructions that can be read by the processor, when the computer instructions are read, the processor executes the method according to any one of claims 1 to 8 or any one of claims 9 to 11.

15. A storage medium, characterized in that: Used to store computer-readable instructions, wherein the computer-readable instructions are used to make a computer execute the method according to any one of claims 1 to 8 or any one of claims 9 to 11.

Citation Information

Patent Citations

  • Method of clustering motion trajectories of vehicle objects in road network space

    CN103246706A

  • Moving object track clustering method based on multi-feature fusion and clustering ensemble

    CN105843919A