Incremental clustering, target retrieval, file merging methods, devices and storage media
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-01
- Publication Date
- 2026-08-14
AI Technical Summary
[0003]传统的基于目标特征相似度(如人脸特征相似度)进行增量聚类的档案合并方法,通常会面临较多高分负例、低分正例的情况,这严重影响增量聚类的精度和召回率,使得城市级监控数据使用受限
[0016]本发明在目标特征的基础上引入了目标空间行为分布这一新的判断特征,将目标特征相似度和目标空间行为分布相似度进行融合得到目标相似度,作为增量聚类的判断依据。通过本发明的方法,在增量聚类过程中可以增强低分正例及抑制高分负例,从而提升了增量聚类的精度和召回率。同时,本发明的方法可以兼容现有的基于目标特征相似度进行聚类的应用框架,使本发明的方法具有较高的适用性,并且本发明的方法计算简单,运算速度快,基本不影响系统的数据处理效率,在大规模、长时间的城市级聚类场景中,本发明的效果更优。
Smart Images

Figure CN117197511B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data management technology, and specifically provides an incremental clustering, target retrieval, and file merging method, device, and storage medium. Background Technology
[0002] In city-level security video surveillance systems, due to factors such as the spatial location, target angle, and image quality of images captured by image acquisition equipment, multiple files of the same person may appear in the city-level surveillance data archive within the same time period. Furthermore, considering the real-time nature of video data processing, video data for a specific time period is often processed periodically to generate a city-level surveillance data archive for that time period, which is then merged into the historical archive. Accordingly, city-level surveillance data archive management requires merging multiple files of the same target within a single city-level surveillance data archive, as well as multiple files of the same target within multiple city-level surveillance data archives corresponding to different time periods, to reduce the data volume and improve the accuracy of the archive data.
[0003] Traditional incremental clustering methods for merging archives based on target feature similarity (such as facial feature similarity) often encounter a large number of high-scoring negative examples and low-scoring positive examples. This severely impacts the accuracy and recall of incremental clustering, limiting the use of city-level surveillance data. Considering that most people's activity spatial trajectories are usually within a relatively fixed range and exhibit a certain periodic repetition over time, how to incorporate target spatial behavioral distribution features into existing target feature-based incremental clustering techniques has become an urgent problem to be solved.
[0004] Accordingly, a new solution is needed in this field to address the aforementioned problems. Summary of the Invention
[0005] The present invention aims to solve or partially solve the above-mentioned technical problem, namely, how to combine target features and target spatial behavior distribution features for incremental target clustering.
[0006] In a first aspect, the present invention proposes an incremental clustering method, the method comprising: Obtain the first target cluster data corresponding to the first target and the second target cluster data corresponding to the second target, respectively; Based on the first target clustering data and the second target clustering data, the target feature similarity between the first target and the second target is obtained; Based on the first target clustering data and the second target clustering data, the similarity of the target spatial behavior distribution between the first target and the second target can be directly obtained, or the similarity of the target spatial behavior distribution can be obtained when the target feature similarity is greater than or equal to the target feature similarity threshold. Based on the target feature similarity and the target spatial behavior distribution similarity, the target similarity between the first target and the second target is obtained; When the target similarity is greater than or equal to the cluster merging threshold, the first target cluster data and the second target cluster data are merged.
[0007] In one embodiment of the above incremental clustering method, the method for obtaining the similarity of the target spatial behavior distribution includes: The spatial behavior distribution of the first target is obtained based on the spatial location information in the first target clustering data; The spatial behavior distribution of the second target is obtained based on the spatial location information in the second target clustering data; Based on the first target spatial behavior distribution and the second target spatial behavior distribution, the similarity of the target spatial behavior distribution is obtained.
[0008] In one embodiment of the above incremental clustering method, the method for obtaining the similarity of the target spatial behavior distribution further includes: Based on the Gaussian mixture model, the spatial behavior distribution of the first target and the spatial behavior distribution of the second target are obtained.
[0009] In one embodiment of the above incremental clustering method, the method for obtaining the similarity of the target spatial behavior distribution further includes: Based on any one of JS divergence, KL divergence, cross entropy, and Wasserstein distance, obtain the spatial behavior distribution similarity value between the first target spatial behavior distribution and the second target spatial behavior distribution; The similarity metric of the spatial behavior distribution is normalized to obtain the similarity of the target spatial behavior distribution.
[0010] In one embodiment of the above incremental clustering method, "obtaining the target feature similarity between the first target and the second target based on the first target clustering data and the second target clustering data" includes: Obtain the first target feature data of the first target in the first target clustering data; Obtain the second target feature data of the second target from the second target clustering data; The similarity of the target features is obtained based on either cosine distance or Euclidean distance.
[0011] In one embodiment of the above incremental clustering method, "obtaining the target similarity between the first target and the second target based on the target feature similarity and the target spatial behavior distribution similarity" includes: The target similarity is obtained by weighted fusion of the target feature similarity and the target spatial behavior distribution similarity.
[0012] In a second aspect, the present invention proposes a target retrieval method, the method comprising: Based on the incremental clustering method described in any of the above schemes, the target similarity between the first target and the second target is obtained; When the target similarity is greater than or equal to the same target discrimination threshold, the first target and the second target are the same target.
[0013] In a third aspect, the present invention proposes a file merging method, wherein the first target clustering data is the first target file corresponding to the first target, and the second target clustering data is the second target file corresponding to the second target, the method comprising: Based on the incremental clustering method described in any of the above schemes, the target similarity between the first target and the second target is obtained; When the target similarity is greater than or equal to the file merging threshold, the first target file and the second target file are merged.
[0014] In a fourth aspect, the present invention provides a computer device comprising a processor and a storage device, the storage device being adapted to store a plurality of program codes, the program codes being adapted to be loaded and run by the processor to perform the incremental clustering method described in any of the above schemes, or the target retrieval method described in the above schemes, or the file merging method described in the above schemes.
[0015] In a fifth aspect, the present invention provides a storage medium suitable for storing multiple lines of program code, which are adapted to be loaded and run by the processor to perform the incremental clustering method described in any of the above schemes, or the target retrieval method described in the above schemes, or the file merging method described in the above schemes.
[0016] This invention introduces a new judgment feature—target spatial behavior distribution—in addition to target features. It fuses target feature similarity and target spatial behavior distribution similarity to obtain target similarity, which serves as the criterion for incremental clustering. Through this method, low-scoring positive examples are enhanced and high-scoring negative examples are suppressed during incremental clustering, thereby improving the accuracy and recall of incremental clustering. Furthermore, this method is compatible with existing application frameworks based on target feature similarity clustering, making it highly applicable. The method is computationally simple and fast, with minimal impact on system data processing efficiency. In large-scale, long-term city-level clustering scenarios, this invention demonstrates superior performance. Attached Figure Description
[0017] The disclosure of this invention will become more readily understood with reference to the accompanying drawings. It will be readily understood by those skilled in the art that these drawings are for illustrative purposes only and are not intended to limit the scope of protection of this invention.
[0018] Figure 1 This is a flowchart of the main steps of the incremental clustering method in an embodiment of the present invention.
[0019] Figure 2 This is an embodiment of the present invention. Figure 1 Detailed flowchart of step S103.
[0020] Figure 3 This is a flowchart of the main steps of an incremental clustering method according to another embodiment of the present invention.
[0021] Figure 4 This is a schematic diagram of the main structure of the computer device according to an embodiment of the present invention. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention. Those skilled in the art can make adjustments as needed to adapt to specific application scenarios.
[0024] First read Figure 1 , Figure 1 This is a flowchart illustrating the main steps of the incremental clustering method in an embodiment of the present invention. Figure 1As shown, the incremental clustering method of the present invention includes: Step S101: Obtain the first target clustering data corresponding to the first target and the second target clustering data corresponding to the second target, respectively; Step S102: Based on the first target clustering data and the second target clustering data, obtain the target feature similarity between the first target and the second target; Step S103: Based on the first target clustering data and the second target clustering data, obtain the similarity of the target spatial behavior distribution between the first target and the second target; Step S104: Based on the similarity of target features and the similarity of target spatial behavior distribution, obtain the target similarity between the first target and the second target; Step S105: When the target similarity is greater than or equal to the cluster merging threshold, merge the first target cluster data and the second target cluster data.
[0025] In an embodiment of the present invention, the first clustering data is city-level video surveillance data for a first time period after human image clustering has been completed, and the second clustering data is city-level video surveillance data for a second time period after human image clustering has been completed. The first time period and the second time period are different.
[0026] As an example, the first time period is the historical period before 00:00 on AAAA year BB month CC day, and the second time period is the period between 00:00 on AAAA year BB month CC day and 00:00 on AAAA year BB month DD day. Accordingly, the first cluster data is city-level video surveillance data with completed facial image clustering before 00:00 on AAAA year BB month CC day, and the second cluster data is city-level video surveillance data with completed facial image clustering between 00:00 on AAAA year BB month CC day and 00:00 on AAAA year BB month DD day.
[0027] In step S101, the first target can be any selected person target in the first cluster data, and the first target cluster data is the image cluster data corresponding to the person target (first target) in the first cluster data. Using the method of the present invention, after determining the first target and the first target cluster data corresponding to the first target, it is possible to search in the second cluster data for image cluster data that can be merged with the first target cluster data. Therefore, the second target is any person target in the second cluster data, and correspondingly, the second target cluster data is the image cluster data corresponding to the person target (second target) in the second cluster data.
[0028] In embodiments of the present invention, the facial image clustering data is the clustering result obtained by clustering facial feature data. The facial image clustering data (including first target clustering data and second target clustering data) typically includes the following additional information: person ID, and information such as the time, spatial location, and image quality corresponding to each video image (sample image) for that person ID. Preferably, the spatial location information in the above-mentioned additional information is typically the geographic latitude and longitude coordinates of the image acquisition device's installation location.
[0029] This invention does not limit the methods for face recognition and feature extraction in video surveillance data, or the methods for clustering based on face features. As examples, the HOG method, CNN network, etc. can be used for face recognition and feature extraction, and the k-means clustering method can be used for face clustering. Those skilled in the art can use other methods to complete the image clustering work of video surveillance data.
[0030] In step S102, the first target feature data in the first target clustering data can be selected from the facial feature data extracted from the image with the best image quality; or it can be based on the facial feature data extracted from a preset number of images with the best image quality, such as extracting the facial feature data from each image separately and then taking the average of the feature data in each dimension of the facial feature data. The second target feature data in the second target clustering data is obtained in the same way.
[0031] The target feature distance (e.g., cosine distance) between the second target feature data and the second target feature data is calculated, and after normalizing the target feature distance, the target feature similarity between the first target feature data and the second target feature data is obtained. In the embodiments of the present invention, the value range of the target feature similarity is [0,1], and the larger the value, the more similar the first target and the second target are.
[0032] It should be noted that those skilled in the art can also use methods such as Euclidean distance and Mahalanobis distance to obtain the target feature similarity between the first target feature data and the second target feature data.
[0033] Next, combine Figure 2 Detailed explanation of the specific implementation method of step S103, such as Figure 2 As shown, methods for obtaining the similarity of target spatial behavior distributions include: Step S1031: Model the spatial location information in the first target clustering data based on the Gaussian mixture model to obtain the spatial behavior distribution of the first target; Step S1032: Model the spatial location information in the second target clustering data based on the Gaussian mixture model to obtain the spatial behavior distribution of the second target; Step S1033: Obtain the JS divergence between the first target spatial behavior distribution and the second target spatial behavior distribution; Step S1034: Normalize the JS divergence to obtain the similarity of the target space behavior distribution.
[0034] In step S1031, the spatial location distribution of the first target's activity space is modeled based on the spatial location information (latitude and longitude coordinates of the image acquisition device's installation location) in the first target clustering data, thereby obtaining the spatial behavior distribution of the first target. Preferably, a Gaussian mixture model is used for spatial location distribution modeling.
[0035] In step S1032, similarly, the spatial location distribution of the activity space of the second target is modeled based on the spatial location information (latitude and longitude coordinates of the installation location of the image acquisition device) in the second target clustering data, thereby obtaining the spatial behavior distribution of the second target. Preferably, a Gaussian mixture model is used for spatial location distribution modeling.
[0036] It should be noted that the Gaussian Mixture Model (GMM) is a clustering method based on a probability density function. It assumes that each cluster is a mixture of multiple Gaussian distributions. The goal of GMM is to estimate the model parameters by maximizing the likelihood function, including the mean, variance, and mixing coefficients of each Gaussian distribution, as well as the probability that a data point belongs to each cluster.
[0037] Gross Matrix Models (GMMs) can be applied in many fields, particularly in handling complex data distributions and discovering patterns and regularities within data. For example, in data mining applications, GMMs can be used to perform cluster analysis on data, thereby revealing patterns and regularities. In embodiments of this invention, GMMs can be used to obtain the distribution patterns of the target activity space, which can then be used as one of the criteria for determining whether clustering and merging are feasible.
[0038] This invention does not limit the methods for implementing Gaussian mixture models. As an example, the Gaussian Mixture class provided in the scikit-learn library in Python can be used to quickly construct and train a GMM model. Those skilled in the art can also choose other methods to implement Gaussian mixture models according to the actual situation.
[0039] In step S1033, in order to evaluate the similarity between the activity space range of the first target and the activity space range of the second target, preferably, the similarity between the spatial behavior distributions of the first target and the spatial behavior distributions of the second target is obtained based on JS divergence.
[0040] In step S1034, after obtaining the JS divergence value (spatial behavior distribution similarity measure) between the first target spatial behavior distribution and the second target spatial behavior distribution, it is necessary to normalize the JS divergence value to obtain the normalized target spatial behavior distribution similarity. As an example, using... The JS divergence value x is measured, where, The similarity of the target space behavior distribution is denoted by α, which is a normalization decay factor. α is usually obtained based on experimental experience, and in this embodiment of the invention, the value of α is 0.3.
[0041] At this point, the numerical range of the similarity of the spatial behavior distribution of the targets is between 0 and 1. The larger the value, the more similar the spatial behavior distribution between the first target and the second target.
[0042] It should be noted that those skilled in the art can also use methods such as KL divergence, cross-entropy, and Wasserstein distance to obtain the similarity between the target spatial behavior distributions of the first and second targets.
[0043] In the embodiments of the present invention, considering that the activity spatial trajectory of most people is usually within a relatively fixed range and has a certain periodic repetition in time, the similarity of target features is considered not only in the target similarity discrimination, but also in the similarity of target spatial behavior distribution. The similarity of target spatial behavior distribution is used as a supplement to the similarity of target features, and the similarity of target spatial behavior distribution and target features are fused to obtain the target similarity.
[0044] In step S104, the target spatial behavior distribution similarity and target feature similarity are weighted and fused to obtain the target similarity of the present invention, as shown in Equation 1:
[0045] In Equation 1, y represents the target similarity, γ represents the feature similarity weighting factor, and s represents the target feature similarity. The similarity of the target spatial behavior distribution is γ. The value of γ is usually obtained based on experimental experience; in the embodiments of this invention, the value of γ is 0.7.
[0046] In step S105, the target similarity and the cluster merging threshold are compared. When the target similarity is greater than or equal to the cluster merging threshold, the first target cluster data and the second target cluster data are merged. Specifically, this includes merging the sample data (video images and related information) in the first target cluster data and the second target cluster data into new target cluster data; and assigning a new personnel ID to the merged target cluster data according to user settings, or continuing to use the personnel ID of the first target, or continuing to use the personnel ID of the second target, etc.
[0047] At this point, the spatial location information in the new target clustering data will also be updated, and correspondingly, the target spatial behavior distribution corresponding to the new target clustering data will also be updated. Therefore, as incremental clustering proceeds, the spatial location information in the target clustering data continuously changes, and its corresponding target spatial behavior distribution will also be continuously updated.
[0048] It should be noted that the cluster merging threshold is often related to the application scenario, the method of obtaining the target features, the normalization method, etc., and is usually obtained through experimental statistics based on the actual scenario. In this embodiment of the invention, the cluster merging threshold is set to 0.45.
[0049] The method of this invention addresses the problem of low-scoring positive examples and high-scoring negative examples in traditional incremental clustering based on target feature similarity. It introduces a new judgment feature, the target spatial behavior distribution, on the basis of target features, which can enhance low-scoring positive examples and suppress high-scoring negative examples, thereby improving the clustering effect. In particular, the effect of this invention is better in large-scale, long-term city-level clustering scenarios.
[0050] In another embodiment, such as Figure 3 As shown, after obtaining the first target cluster data corresponding to the first target and the second target cluster data corresponding to the second target in step S101, the target feature similarity in step S102 and the target spatial behavior distribution similarity in step S103 are designed to be executed simultaneously. After obtaining the results of the target feature similarity and the target spatial behavior distribution similarity, the target similarity is calculated in step S104.
[0051] It should be noted that, as Figure 1 The execution order of steps S102 and S103 shown can also be changed. Without deviating from the principle of the present invention, those skilled in the art can make corresponding adjustments according to the actual situation, and the technical solutions after these changes will fall within the protection scope of the present invention.
[0052] In another embodiment, according to user settings, after obtaining the target feature similarity in step S102, step S103 is not directly executed to obtain the target spatial behavior distribution similarity. Instead, the target feature similarity is first compared with a target feature similarity threshold. Step S103 is only executed when the target feature similarity is greater than or equal to the target feature similarity threshold. This can eliminate some targets with large feature differences in advance, reducing the number of targets for which target spatial behavior distribution similarity needs to be obtained, thereby improving the processing speed of incremental clustering.
[0053] The target feature similarity threshold is related to the selection of target features and is determined through experiments based on actual conditions. As an example, the target feature similarity threshold can be set to 0.5.
[0054] It should be noted that the method of the present invention is not only applicable to the scenario in the above embodiments where the first target and the second target belong to different cluster data (e.g., the first target belongs to the first cluster data corresponding to the first time period, and the second target belongs to the second cluster data corresponding to the second time period); it is also applicable to the scenario where the first target and the second target belong to the same cluster data (e.g., the first target and the second target both belong to the first cluster data corresponding to the first time period), that is, to determine whether the cluster data of two targets with different IDs in a cluster data can be merged.
[0055] It should be noted that the incremental clustering method of the present invention is also applicable to non-human targets, as long as the target's activity space trajectory is usually within a relatively fixed range and has a certain periodic repetition in time.
[0056] As an example, the application scenario is wildlife video surveillance, where the video surveillance data consists of video data of animal activities within a certain area. As another example, the target for incremental clustering is a specific elephant. In this case, the target features can be selected from the elephant's full-body features. Since the elephant's activity range is relatively fixed and exhibits a certain periodic repetition over time, the incremental clustering method of this invention can also be used to process whether clustered video data from different time periods (or the same time period) and targets with different IDs (different elephant IDs) can be merged.
[0057] Furthermore, the present invention also provides a target retrieval method. As an example, target B is a target in the second clustering data described above. The user needs to query whether target B exists in the first clustering data, and what related data target B is. At this time, target A is any target in the first clustering data. According to the incremental clustering method of the above embodiment, the target similarity between target B and target A is obtained and compared with a common target discrimination threshold. When the target similarity is greater than or equal to the common target discrimination threshold, target B and target A are the same target, and the user can then obtain the related data of target B in the first clustering data.
[0058] Furthermore, the present invention also provides a file merging method. As an example, the first file is the first clustering data in the above embodiments, the first target file is the first target clustering data corresponding to the first target in the above embodiments; the second file is the second clustering data in the above embodiments, and the second target file is the second target clustering data corresponding to the second target in the above embodiments.
[0059] Users need to periodically merge recent city video surveillance data (second archive) that has completed facial image clustering into historical city video surveillance data (first archive) that has also completed facial image clustering. Similarly, the archive information for both the first and second archives includes: person ID, the time, spatial location, and image quality of each video image (sample image) corresponding to that person ID.
[0060] According to the incremental clustering method in the above embodiments, the target similarity between the first target and the second target is obtained and compared with the file merging threshold. When the target similarity is greater than or equal to the file merging threshold, the first target file and the second target file are merged.
[0061] It should be noted that the threshold for identifying the same target and the threshold for merging files can be set using the same method as described above for clustering merging thresholds. For example, the threshold for identifying the same target can be set to 0.45, and the threshold for merging files can also be set to 0.45.
[0062] It should be noted that the target retrieval method and the file merging method are also applicable to non-human targets, such as animal targets like elephants in the aforementioned embodiments.
[0063] Furthermore, the present invention also provides a computer device. Figure 4 This is a schematic diagram of the main structure of a computer device according to an embodiment of the present invention. Figure 4 As shown, the computer device mainly includes a storage device 11 and a processor 12. The storage device 11 can be configured to store programs for executing the incremental clustering method, target retrieval method, or file merging method of the above-described method embodiments. The processor 12 can be configured to execute the programs stored in the storage device. These programs include, but are not limited to, programs for executing the incremental clustering method, target retrieval method, or file merging method of the above-described method embodiments. For ease of explanation, only the parts related to the embodiments of the present invention are shown. For specific technical details not disclosed, please refer to the method section of the embodiments of the present invention.
[0064] In embodiments of the present invention, the computer device may be a control device comprising various computer devices. In some possible implementations, the computer device may include multiple storage devices 11 and multiple processors 12. The program executing the incremental clustering method, target retrieval method, or file merging method of the above method embodiments may be divided into multiple subroutines, each subroutine may be loaded and run by a processor to execute different steps of the incremental clustering method, target retrieval method, or file merging method of the above method embodiments. Specifically, each subroutine may be stored in different storage devices 11, and each processor 12 may be configured to execute programs in one or more storage devices 11 to jointly implement the incremental clustering method, target retrieval method, or file merging method of the above method embodiments, that is, each processor 12 executes different steps of the incremental clustering method, target retrieval method, or file merging method of the above method embodiments to jointly implement the incremental clustering method, target retrieval method, or file merging method of the above method embodiments.
[0065] The aforementioned multiple processors 12 may be processors deployed on the same device. For example, the aforementioned computer device may be a high-performance device composed of multiple processors, and the aforementioned multiple processors 12 may be processors configured on that high-performance device. Alternatively, the aforementioned multiple processors 12 may be processors deployed on different devices. For example, the aforementioned computer device may be a server cluster, and the aforementioned multiple processors 12 may be processors on different servers within the server cluster.
[0066] Furthermore, the present invention also provides a storage medium that can be configured to store a program for executing the incremental clustering method, target retrieval method, or file merging method of the above-described method embodiments. This program can be loaded and run by a processor to implement the aforementioned incremental clustering method, target retrieval method, or file merging method. For ease of explanation, only the parts related to the embodiments of the present invention are shown; for specific technical details not disclosed, please refer to the method section of the embodiments of the present invention. The storage medium can be a storage device comprising various computer devices. Optionally, in the embodiments of the present invention, the storage medium is a non-transitory read-write storage medium.
[0067] Those skilled in the art will recognize that the method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of electronic hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in electronic hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the invention.
[0068] It should be noted that the terms "first," "second," and other ordinal numbers in the specification, claims, and accompanying drawings of this invention are used only to distinguish similar objects and are not intended to describe or indicate a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein.
[0069] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will all fall within the scope of protection of the present invention.
Claims
1. An incremental clustering method, characterized in that, The method includes: Obtain the first target cluster data corresponding to the first target and the second target cluster data corresponding to the second target, respectively; Based on the first target clustering data and the second target clustering data, the target feature similarity between the first target and the second target is obtained; Based on the first target clustering data and the second target clustering data, the similarity of the target spatial behavior distribution between the first target and the second target can be directly obtained, or the similarity of the target spatial behavior distribution can be obtained when the target feature similarity is greater than or equal to the target feature similarity threshold. Based on the target feature similarity and the target spatial behavior distribution similarity, the target similarity between the first target and the second target is obtained; When the target similarity is greater than or equal to the clustering merging threshold, the first target cluster data and the second target cluster data are merged. The method for obtaining the similarity of the target spatial behavior distribution includes: Based on the spatial location information in the first target clustering data, the spatial behavior distribution of the first target is obtained through a Gaussian mixture model; Based on the spatial location information in the second target clustering data, the spatial behavior distribution of the second target is obtained through a Gaussian mixture model; Based on the first target spatial behavior distribution and the second target spatial behavior distribution, the similarity of the target spatial behavior distribution is obtained.
2. The incremental clustering method according to claim 1, characterized in that, The method for obtaining the similarity of the target spatial behavior distribution further includes: Based on any one of JS divergence, KL divergence, cross entropy, and Wasserstein distance, obtain the spatial behavior distribution similarity value between the first target spatial behavior distribution and the second target spatial behavior distribution; The spatial behavior distribution similarity metric is normalized to obtain the target spatial behavior distribution similarity.
3. The incremental clustering method according to claim 1, characterized in that, "Obtaining the target feature similarity between the first target and the second target based on the first target clustering data and the second target clustering data" includes: Obtain the first target feature data of the first target in the first target clustering data; Obtain the second target feature data of the second target from the second target clustering data; The similarity of the target features is obtained based on either cosine distance or Euclidean distance.
4. The incremental clustering method according to any one of claims 1 to 3, characterized in that, "Obtaining target similarity between the first target and the second target based on the target feature similarity and the target spatial behavior distribution similarity" includes: The target similarity is obtained by weighted fusion of the target feature similarity and the target spatial behavior distribution similarity.
5. A target retrieval method, characterized in that, The method includes: The incremental clustering method according to any one of claims 1 to 4 is used to obtain the target similarity between the first target and the second target; When the target similarity is greater than or equal to the same target discrimination threshold, the first target and the second target are the same target.
6. A method for merging archives, wherein first target clustering data consists of first target archives corresponding to a first target, and second target clustering data consists of second target archives corresponding to a second target, characterized in that, The method includes: The target similarity between the first target and the second target is obtained based on the incremental clustering method according to any one of claims 1 to 4; When the target similarity is greater than or equal to the file merging threshold, the first target file and the second target file are merged.
7. A computer device, characterized in that, The computer device includes a processor and a storage device, characterized in that the storage device is adapted to store a plurality of program codes, the program codes being adapted to be loaded and run by the processor to perform the incremental clustering method of any one of claims 1 to 4, or the target retrieval method of claim 5, or the file merging method of claim 6.
8. A storage medium, characterized in that, The storage medium is adapted to store multiple lines of program code, which are adapted to be loaded and run by a processor to perform the incremental clustering method of any one of claims 1 to 4, the target retrieval method of claim 5, or the file merging method of claim 6.
Citation Information
Patent Citations
Vehicle data clustering method and vehicle trajectory restoration method
CN113378658A