Image aggregation method and system
Through real-time feature structuring and density clustering, combined with merge-find technology, image archiving is performed in batches, which solves the problems of low real-time performance and multiple files for one person in existing technologies, and realizes efficient and reliable image archiving and real-name processing.
Patent Information
- Application Number
- CN202210963416.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-11
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-08-11
AI Technical Summary
Existing image aggregation technology cannot meet real-time requirements under low computing power conditions. It requires a static database for aggregation, and there is a problem of multiple files for one person, and it cannot provide complete trajectory data.
Real-time feature structuring, density clustering and union-find technology are used to perform clustering and comparison in batches, reducing the number of comparisons with the static database. Discrete points and classes are archived through the dynamic database, and files of the same object are merged and processed with real names.
It achieves high real-time file aggregation, reduces computing power consumption, supports offline real-name registration, solves the problem of multiple files for one person, and provides reliable trajectory data for subsequent big data analysis.
Smart Images

Figure CN115495606B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to an image aggregation method and system. Background Art
[0002] In the security field, with the development of image recognition technology, a large amount of portrait trajectory data is generated daily. The ability to compare each image alone consumes a large amount of comparison computing resources. Due to the diversity of image collection environments, comparison omissions are often caused. Therefore, the concept of image clustering has been proposed. Image clustering is a crucial data processing step. The effectiveness of clustering affects the accuracy, reliability, and real-time performance of various subsequent big data tactics. However, existing image clustering technologies require a large amount of comparison computing power to achieve both real-time and accuracy. Under low computing power, processing takes at least T+1 cycles, which cannot meet users' real-time requirements. Clustering also requires a static database and suffers from the serious problem of multiple files for one person, making it impossible to provide a complete trajectory for subsequent tactical mining. Summary of the Invention
[0003] In order to solve the technical problems existing in the prior art, such as low real-time performance, requiring T+1 day to trigger archiving, high computing power consumption, and all images being compared 1:N, requiring a static database for archiving, and the serious problem of multiple files for one person, the present invention proposes an image archiving method and system to solve the above technical problems.
[0004] According to a first aspect of the present invention, a method for image aggregation is proposed, comprising:
[0005] S1: Real-time acquisition of images for feature structuring and attribute recognition, filtering out images that do not meet the image quality score;
[0006] S2: Divide and group the images according to their spatiotemporal information, and cluster them in batches. First, use density clustering, and then use union-find to merge within the batch.
[0007] S3: For discrete points that cannot be clustered by batch clustering and the clusters formed by batch clustering, they are compared with the dynamic database and archived separately;
[0008] S4: Merge the files of the same object, traverse all files and compare them with the static base database, and real-name the files that are not real-named.
[0009] In some specific embodiments, performing clustering in batches in S2 specifically includes:
[0010] S21: density clustering using DBSCAN algorithm;
[0011] S22: Calculate the average vector of the clustering results to obtain the cluster center;
[0012] S23: Find the cluster centers whose similarity rankings are higher than the first threshold, and perform a union-find operation.
[0013] In some specific embodiments, the union-find operation in S23 includes:
[0014] S231: Initialize each class as a set, and traverse to determine whether the root node to which the elements in the set belong belongs to the majority class;
[0015] S232: In response to the element root node being the majority class, find the root nodes of other unprocessed elements, and if the two elements meet a correlation threshold, merge the sets containing the two elements.
[0016] In some specific embodiments, S3 specifically includes: performing a 1:N comparison between discrete points that cannot be clustered by batch clustering and the dynamic base database to determine whether there are archives that meet the search threshold, and selecting different thresholds based on the attributes of the discrete points and the attributes of the compared archives to determine whether they meet the archiving requirements; performing a 1:N comparison between the classes formed by batch clustering and the dynamic base database to determine whether there are archives that meet the search threshold, and selecting different thresholds based on the attributes of the classes and the attributes of the compared archives to determine whether they meet the archiving requirements. If not, and the identity cannot be confirmed, a new archive is added.
[0017] In some specific embodiments, merging archives of the same object in S4 specifically includes: determining a pre-merged archive; concurrent 1:N query to obtain results that meet the search threshold for each class and store the results in a pre-processing array; determining the maximum sample archive and merging and sorting it; threshold pruning to obtain a final merged list that can be directly processed.
[0018] In some specific embodiments, determining the pre-merged archives includes: screening out archives whose archive sample number is greater than a first sample threshold, and counting the number of archives DN without a last merge time field in the screening results; judging whether DN exceeds a first archive number DNT threshold, and if so, taking out DNT archives that meet the above conditions; if not, taking out DN archives that meet the above conditions, and screening out archives whose absolute value of the time difference between the last merge time and the current time point exceeds the first time difference threshold, sorting the archives in ascending order according to the last merge time, taking out the DNT-DN archives before the sorting, and merging them with the DN archives.
[0019] In some specific embodiments, determining the maximum sample file specifically includes: traversing all preprocessing arrays, determining the file with the largest sample in the current file and its neighbor files, and judging whether the file with the largest sample is the current file. If not, updating the file with the largest sample to the key file, taking out the values of all the original neighbor files and using the current file as the value, merging the value results of the same key and removing duplicates, and sorting the results in descending order according to the number of samples of the key.
[0020] In some specific embodiments, threshold pruning specifically includes: initializing an elimination list, traversing the sorted preprocessing array, in response to the current key not existing in the elimination list, obtaining the corresponding threshold according to the archive attribute corresponding to the key and adding the key to the elimination list, traversing the value array under the key, in response to the current value not existing in the elimination list and meeting the comparison threshold, retaining the value and adding it to the elimination list, and outputting a pre-merged list.
[0021] In some specific embodiments, the real-name verification of unauthenticated files in S4 specifically includes: determining the pre-identity landing file, traversing the pre-identity landing file and taking the file type center feature for comparison with the static base database; in response to the comparison result being greater than the first landing threshold score, or the comparison result being less than the first landing threshold score but greater than the second landing threshold score, and the highest similarity with the file photo is the same ID photo and the comparison result is greater than the third landing threshold score, taking the identity with the highest similarity for landing; in response to the existence of the same ID card, recording the pre-merged identity file, taking the file with the largest number of samples as the main file, merging the small file into the large file, and updating the last file update time; triggering identity merging, scanning the pre-merged file list for merging.
[0022] In some specific embodiments, determining the pre-identity landing profile specifically includes: screening out profiles whose profile sample number is greater than a second sample threshold, and counting the number of profiles DN' without the last landing time field in the screening results; judging whether DN' exceeds the second profile number DNT' threshold, and if so, taking out DNT' profiles that meet the above conditions; if not, taking out DN' profiles that meet the above conditions, and screening out profiles whose absolute value of the time difference between the last landing time and the current time point exceeds the second time difference threshold, sorting the profiles in ascending order according to the last merge time, taking out the DNT'-DN' profiles before the sorting, and merging them with the DN' profiles.
[0023] According to a second aspect of the present invention, a computer-readable storage medium is provided, on which one or more computer programs are stored. When the one or more computer programs are executed by a computer processor, any one of the above methods is implemented.
[0024] According to a third aspect of the present invention, an image aggregation system is provided, the system comprising:
[0025] Image acquisition unit: configured to acquire images in real time for feature structuring and attribute recognition, and filter out images that do not meet the image quality score;
[0026] Image clustering unit: This unit is used to segment and group images based on spatiotemporal information, and cluster them in batches. It first uses density clustering and then uses union-find to merge images within the batch.
[0027] Archiving unit: configured to compare and archive discrete points that cannot be clustered by batch clustering and classes formed by batch clustering with the dynamic database;
[0028] Identity landing unit: It is configured to merge files of the same object, traverse all files for comparison with the static base database, and authenticate files that have not been authenticated.
[0029] This invention proposes an image clustering method and system. This system achieves clustering through a multi-step, interconnected and complementary approach, offering high real-time performance and minute-level clustering. It eliminates the need for a 1:N analysis of all images, instead performing batch clustering followed by out-of-batch comparison and archiving, significantly reducing comparison computing power. Pre-clustering is possible without a static database, and offline real-name verification is supported. A post-merger approach similar to clustering is employed to address the issue of multiple archives per person. This invention provides excellent data service support for subsequent big data analysis and directly provides users with reliable, one-file archival tracking information for each person. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated into and constitute a part of this specification. The accompanying drawings illustrate the embodiments and, together with the description, serve to explain the principles of the invention. Other embodiments and many of the intended advantages of the embodiments will be readily apparent as they become better understood by reference to the following detailed description. Other features, objects, and advantages of the present application will become more apparent upon reading the detailed description of the non-limiting embodiments made with reference to the following drawings:
[0031] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0032] Figure 2 This is a flow chart of an image aggregation method according to an embodiment of the present application;
[0033] Figure 3 This is a schematic diagram of the main process of an image aggregation method according to a specific embodiment of the present application;
[0034] Figure 4 This is a schematic diagram of a union-find flow chart of a specific embodiment of the present application;
[0035] Figure 5 It is a flowchart of direct filing of a specific embodiment of the present application;
[0036] Figure 6 This is a flowchart of out-of-batch merging in a specific embodiment of the present application;
[0037] Figure 7 This is a flowchart of a post-merger of a specific embodiment of the present application;
[0038] Figure 8 This is a flowchart of determining a pre-merged file according to a specific embodiment of the present application;
[0039] Figure 9 is a flowchart of determining the maximum sample file according to a specific embodiment of the present application;
[0040] Figure 10 This is a flowchart of threshold pruning in a specific embodiment of the present application;
[0041] Figure 11 This is a flowchart of identity implementation in a specific embodiment of the present application;
[0042] Figure 12 This is a flowchart of determining a pre-identity landing profile according to a specific embodiment of the present application;
[0043] Figure 13 This is a framework diagram of an image archiving system according to an embodiment of the present application;
[0044] Figure 14 It is a structural diagram of a computer system suitable for implementing the electronic device of the embodiment of the present application. DETAILED DESCRIPTION
[0045] The present application will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely for the purpose of explaining the relevant invention and are not intended to limit the invention. It should also be noted that, for ease of description, only portions relevant to the relevant invention are shown in the accompanying drawings.
[0046] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0047] Figure 1 An exemplary system architecture 100 is shown to which an image archiving method according to an embodiment of the present application can be applied.
[0048] like Figure 1As shown, system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. Network 104 is a medium for providing communication links between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links or fiber optic cables.
[0049] Users can use terminal devices 101, 102, 103 to interact with server 105 via network 104 to receive or send messages, etc. Various applications can be installed on terminal devices 101, 102, 103, such as data processing applications, data visualization applications, web browser applications, etc.
[0050] Terminal devices 101, 102, and 103 can be hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices, including but not limited to smartphones, tablet computers, laptop computers, and desktop computers. When terminal devices 101, 102, and 103 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software programs or software modules (for example, software or software modules used to provide distributed services), or as a single software program or software module. No specific limitations are given here.
[0051] The server 105 may be a server that provides various services, such as a background information processing server that supports the mapping table data displayed on the terminal devices 101, 102, and 103. The background information processing server may process the obtained logical address and generate a processing result.
[0052] It should be noted that the method provided in the embodiment of the present application can be executed by the server 105 or by the terminal devices 101, 102, and 103. The corresponding device is generally set in the server 105 and can also be set in the terminal devices 101, 102, and 103.
[0053] It should be noted that the server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software or software modules (e.g., software or software modules for providing distributed services), or as a single software or software module. No specific limitations are given here.
[0054] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0055] According to an image aggregation method according to an embodiment of the present application, Figure 2 FIG. 1 shows a flow chart of an image aggregation method according to an embodiment of the present application. Figure 2 As shown, the method includes:
[0056] S201: Acquire images in real time for feature structuring and attribute recognition, and filter out images that do not meet the image quality score.
[0057] S202: The images are divided and grouped according to their spatiotemporal information, and clustered in batches. Density clustering is first used for clustering, and then union-find is used for merging within the batch.
[0058] In a specific embodiment, clustering in batches specifically includes the following steps:
[0059] S21: density clustering using DBSCAN algorithm;
[0060] S22: Calculate the average vector of the clustering results to obtain the cluster center;
[0061] S23: Find the cluster centers whose similarity rankings are higher than the first threshold, and perform a union-find operation.
[0062] The union-find operation specifically includes:
[0063] S231: Initialize each class as a set, and traverse to determine whether the root node to which the elements in the set belong belongs to the majority class;
[0064] S232: In response to the element root node being the majority class, find the root nodes of other unprocessed elements, and if the two elements meet a correlation threshold, merge the sets containing the two elements.
[0065] S203: For discrete points that cannot be clustered by batch clustering and the classes formed by batch clustering, they are compared with the dynamic base database and archived respectively.
[0066] In a specific embodiment, the discrete points that cannot be clustered by batch clustering are compared with the dynamic base database in a 1:N manner to determine whether there are archives that meet the search threshold, and different thresholds are selected based on the attributes of the discrete points and the attributes of the compared archives to determine whether they meet the archiving requirements; the classes formed by batch clustering are compared with the dynamic base database in a 1:N manner to determine whether there are archives that meet the search threshold, and different thresholds are selected based on the attributes of the classes and the attributes of the compared archives to determine whether they meet the archiving requirements. If not, and the identity cannot be confirmed, a new archive is added.
[0067] S204: Merge the files of the same object, traverse all the files and compare them with the static base database, and perform real-name registration on the unnamed files.
[0068] In a specific embodiment, merging archives of the same object specifically includes: determining pre-merge archives; concurrently performing 1:N queries to obtain results that meet a search threshold for each class and storing the results in a pre-processing array; determining the maximum sample archive, merging and sorting the archives; and threshold pruning to obtain a final, directly processable merge list. Determining the pre-merge archives includes: screening out archives whose sample count is greater than a first sample threshold, counting the number of archives (DN) without a last merge time field in the screening results; determining whether DN exceeds a first archive number (DNT) threshold, and if so, extracting DNT archives that meet the above conditions; if not, extracting DN archives that meet the above conditions, screening out archives whose absolute time difference between the last merge time and the current time point exceeds the first time difference threshold, sorting the archives in ascending order by last merge time, extracting DNT-DN archives before the sorting, and merging them with the DN archives. Determining the largest sample archive specifically includes: traversing all preprocessing arrays, determining the archive with the largest sample in the current archive and its neighbor archives, and judging whether the archive with the largest sample is the current archive. If not, updating the archive with the largest sample to the key archive, taking out the values of all the original neighbor archives and using the current archive as the value, merging the value results of the same key and removing duplicates, and sorting the results in descending order by the number of samples of the key. Threshold pruning specifically includes: initializing the elimination list, traversing the sorted preprocessing array, in response to the current key not existing in the elimination list, obtaining the corresponding threshold according to the archive attribute corresponding to the key and adding the key to the elimination list, traversing the value array under the key, in response to the current value not existing in the elimination list and meeting the comparison threshold, retaining the value and adding it to the elimination list, and outputting the pre-merged list.
[0069] In a specific embodiment, the real-name conversion of unauthenticated files specifically includes: determining the pre-identity landing file, traversing the pre-identity landing file and taking the file type center feature for comparison with the static base database; in response to the comparison result being greater than the first landing threshold score, or the comparison result being less than the first landing threshold score but greater than the second landing threshold score, and the highest similarity with the file photo is the same ID photo and the comparison result is greater than the third landing threshold score, taking the identity with the highest similarity for landing; in response to the existence of the same ID card, recording the pre-merged identity file, taking the file with the largest number of samples as the main file, merging the small file into the large file, and updating the last file update time; triggering the identity merge, scanning the pre-merged file list for merging. Among them, determining the pre-identity landing files specifically includes: screening out files whose file sample number is greater than the second sample threshold, and counting the number of files DN' without the last landing time field in the screening results; judging whether DN' exceeds the second file number DNT' threshold, if so, taking out DNT' files that meet the above conditions; if not, taking out DN' files that meet the above conditions, and screening out files whose absolute value of the time difference between the last landing time and the current time point exceeds the second time difference threshold, sorting the files in ascending order according to the last merge time, taking out the DNT'-DN' files before the sorting, and merging them with the DN' files.
[0070] Continue to refer Figure 3 , Figure 3 A schematic diagram of the main process of an image aggregation method according to a specific embodiment of the present application is shown as follows: Figure 3 As shown, the method mainly includes the following steps:
[0071] Step 301: Acquire images in real time for feature structuring and attribute recognition, and filter out images that do not meet the image quality score.
[0072] Step 302: Segment and group the images according to their temporal and spatial information;
[0073] Step 303: Call the batch clustering module to perform clustering in batches, first use density clustering for coarse clustering, and then use union-find to merge within the batch.
[0074] Step 304: For the obtained discrete points and classes, the direct archiving module, the out-of-batch merging module and the dynamic base database are respectively called to compare and archive them.
[0075] Step 305: Call the post-merge module to cluster the files and merge the files of the same object.
[0076] Step 306: Call the identity landing module, traverse all files and compare them with the static database to confirm the identity.
[0077] In a specific embodiment, the main process of batch clustering in the batch clustering module in step 303 is: first use the DBSCAN algorithm to perform density clustering; calculate the average vector of the clustering results to obtain the cluster center; find the cluster center that is in the top 1024 of each cluster and is greater than the first threshold; and perform a union-find operation. Among them, the union-find requirements of this application must comply with the principle that minority clusters are not merged with minority clusters, and minority clusters do not actively merge with majority clusters. Only the majority cluster is merged with the minority cluster and the majority cluster is merged with the majority cluster. Among them, the majority cluster refers to the cluster with more than N samples in the cluster, and the opposite is the minority cluster. The specific union-find operation process is shown in Figure 4 as a schematic diagram of the union-find process according to a specific embodiment of the present application, which specifically includes the following processes:
[0078] Step 401: Initialize each cluster as a set, where the elements in the set are clusters. That is, initialize the cluster of each point to itself.
[0079] Step 402: Traverse and determine the root node to which the element belongs.
[0080] Step 403: Determine whether the element belongs to the majority class. If so, proceed to step 404; if not, proceed to step 407.
[0081] Step 404: Find the root node to which other unprocessed elements belong.
[0082] Step 405: Determine whether the two meet the correlation threshold. If so, proceed to step 406; if not, proceed to step 407.
[0083] Step 406: Merge the sets of the two elements into one, and then use the earliest root node as the root node.
[0084] Step 407: Determine whether the traversal is finished, if so, then finish, if not, return to step 402 to continue the traversal.
[0085] In a specific embodiment, the direct archiving module in step 304 mainly processes the discrete points that cannot be clustered by batch clustering and performs 1:N matching with the dynamic base database. First, it determines whether there are files that meet the search threshold, and then selects different thresholds based on the attributes of the discrete points and the attributes of the compared files to determine whether they meet the archiving requirements. The specific process is as follows: Figure 5 The flowchart of direct archiving according to a specific embodiment of the present application is shown, including the following steps:
[0086] Step 501: traverse all discrete points and perform 1:N search with the dynamic database.
[0087] Step 502: Determine whether there are files that meet the search threshold. If so, proceed to step 503. If not, proceed to step 504, do not directly archive, and push back to the clustering queue.
[0088] Step 503: Obtain data such as masks, age, gender, number of samples, etc. of the corresponding file.
[0089] Step 505: Determine whether the mask is worn. If so, proceed to step 507 using the mask comparison threshold; if not, proceed to step 506 using the comparison threshold for male, female, old, and young
[0090] Step 508: Determine whether it is greater than the first threshold of the corresponding type. If so, proceed to step 509 to archive. If not, proceed to step 504 without directly archiving and push back to the clustering queue.
[0091] In a specific embodiment, the out-of-batch merging module in step 304 mainly processes the class formed by batch clustering and performs 1:N matching with the dynamic base database. First, it determines whether there is a file that meets the search threshold, and selects different thresholds based on the attributes of the class and the attributes of the compared file to determine whether it meets the archiving requirements. If not, the identity landing module is called. If still no match is found, a new file is added. The specific process is as follows. Figure 6 The flowchart of out-of-batch merging according to a specific embodiment of the present application is shown, including the following steps:
[0092] Step 601: traverse all classes and use the class center to perform 1:N search with the dynamic base database.
[0093] Step 602: Determine whether there is a file that meets the search threshold. If so, proceed to step 603. If not, proceed to step 608 to call the identity landing module for real-name verification.
[0094] Step 603: Obtain the mask, age, gender, sample and other data of the corresponding file.
[0095] Step 604: Determine whether a mask is worn. If so, proceed to step 606 using the mask comparison threshold. If not, proceed to step 605 using the ratio threshold of male, female, old and young.
[0096] Step 607: Determine whether it is greater than the first threshold of the corresponding type. If so, proceed to step 610 for archiving. If not, proceed to step 608 to call the identity landing module for real-name verification.
[0097] Step 609: Determine whether the real-name registration is successful. If so, proceed to step 610 to archive the information. If not, proceed to step 611 to add a new file for an unknown person.
[0098] In a specific embodiment, the merging module in step 305 mainly handles the problem of multiple files for one person, clusters and merges the files to reduce the problem of multiple files for one person. Figure 7 The flowchart of post-merging according to a specific embodiment of the present application is shown, including the following steps:
[0099] Step 701: Determine a pre-merge file.
[0100] Step 702: Concurrent 1:N queries are performed to obtain the results that meet the search threshold for each class, and the results are stored in the pre-processing array in the form of {key: [value1, ..., valueN]}.
[0101] Step 703: Determine the largest sample file and merge and sort it.
[0102] Step 704: Threshold pruning to obtain a final merged list that can be directly processed.
[0103] In a specific embodiment, the specific process of determining the pre-merged archive in step 701 is as follows: Figure 8 The flowchart of determining a pre-merged archive according to a specific embodiment of the present application is shown, including the following steps:
[0104] Step 801: Filter out files whose file sample number is greater than a first sample threshold (eg, 10).
[0105] Step 802: Count the number of files DN without the "Last Merge Time" field in the above filtering results.
[0106] Step 803 : Determine whether DN exceeds a first file number DNT threshold. If so, proceed to step 804 to retrieve DNT files that meet the above conditions. If not, proceed to step 805 .
[0107] Step 805: Retrieve DN files that meet the above conditions.
[0108] Step 806: Filter out the files whose absolute time difference between the “last merge time” and the current time point exceeds a first time difference threshold (eg, 2 days).
[0109] Step 807: Sort the files in ascending order by the last merge time.
[0110] Step 808: Take out the DNT-DN (DNT minus DN) files before sorting and merge them with the previous DN files.
[0111] In a specific embodiment, the specific process of determining the maximum sample file in step 703 is as follows: Figure 9 The flowchart of determining the maximum sample archive according to a specific embodiment of the present application is shown, including the following steps:
[0112] Step 901: Traverse all pre-processing arrays.
[0113] Step 902: Determine the file with the largest sample among the current file and its neighboring files.
[0114] Step 903: Determine whether the file with the largest sample is the current file. If so, proceed to step 904 without processing. If not, proceed to step 905.
[0115] Step 905: Update the sample maximum file to the key file, retrieve all the original neighbor file values, and use the current file as the value.
[0116] Step 906: Determine whether the traversal is complete, if so, proceed to step 907.
[0117] Step 907: Merge the value results with the same key and remove duplicates.
[0118] Step 908: Sort the results in descending order by the number of samples of key.
[0119] In a specific embodiment, the specific process of threshold pruning in step 704 is as follows: Figure 10 The flowchart of threshold pruning according to a specific embodiment of the present application is shown, including the following steps:
[0120] Step 1001: Initialize the elimination list.
[0121] Step 1002: Traverse the sorted pre-processed array.
[0122] Step 1003: Determine whether the current key exists in the elimination list. If so, proceed to step 1004 to eliminate the data. If not, proceed to step 1006.
[0123] Step 1006: Obtain the corresponding threshold value from the corresponding threshold table according to the mask, age and other attributes of the key corresponding file, and add the key to the elimination list.
[0124] Step 1007: Traverse the value array under the key.
[0125] Step 1008: Determine whether the current value exists in the elimination list. If so, proceed to step 1012 to eliminate the value data. If not, proceed to step 1009.
[0126] Step 1009: Determine whether the comparison threshold is met. If not, proceed to step 1012 to eliminate the value data; if so, proceed to step 1010.
[0127] Step 1010: Keep the value and add it to the elimination list.
[0128] Step 1011: Determine whether the traversal is complete. If so, proceed to step 1005. If not, return to step 1007 and continue traversing the value array under the key.
[0129] Step 1005: Determine whether the traversal is complete. If so, output the pre-merged list. If not, return to step 1002 and continue traversing the sorted pre-processed array.
[0130] In a specific embodiment, the identity landing module in step 306 mainly processes the real-name registration of unreal-name files. The specific process is as follows Figure 11 The flowchart of identity landing according to a specific embodiment of the present application is shown, including the following steps:
[0131] Step 1111: Scan mango to confirm the pre-identity landing file.
[0132] Step 1102: Traverse the above result file.
[0133] Step 1103: Take the central features of the archive class to compare with the static base database.
[0134] Step 1104: Determine whether there is a score greater than the first landing threshold score (such as 90 points). If not, proceed to step 1105; if so, proceed to step 1106.
[0135] Step 1105: Determine whether the score is greater than the second landing threshold (such as 85 points), and the highest similarity between the file photos is the same ID photo, and the threshold is greater than the third landing threshold (such as 92 points). If so, proceed to step 1106. If not, determine whether the traversal is completed.
[0136] Step 1106: select the identity with the highest similarity for landing.
[0137] Step 1107: Determine whether the same ID card exists. If not, proceed to step 1108 to update only the Mongo profile identity information. If so, proceed to step 1109 to record the pre-merged identity profiles. The profile with the larger number of samples is used as the primary profile, and the smaller profiles are merged into the larger profile.
[0138] Step 1110: Update the last file update time.
[0139] Step 1111: When the traversal is completed, identity merging is triggered, the pre-merged identity profile list is scanned for merging, and the ES image attribution profile information is updated.
[0140] In a specific embodiment, the specific process of determining the pre-identity landing file in step 1111 is as follows: Figure 12 The flowchart of determining a pre-identity landing profile according to a specific embodiment of the present application is shown, including the following steps:
[0141] Step 1201: Filter out files whose file sample number is greater than a second sample threshold (eg, 10).
[0142] Step 1202: Count the number of files DN' without the "last landing time" field in the above screening results.
[0143] Step 1203 : Determine whether DN′ exceeds a second file number DNT′ threshold. If so, proceed to step 1204 to retrieve DNT′ files that meet the above conditions. If not, proceed to step 1205 .
[0144] Step 1205: Retrieve DN' files that meet the above conditions.
[0145] Step 1206: Filter out the files whose absolute time difference between the “last landing time” and the current time point exceeds a second time difference threshold (eg, 2 days).
[0146] Step 1207: Sort the files in ascending order by the last merge time.
[0147] Step 1208: Take out DNT'-DN' (DNT' minus DN') files before sorting and merge them with the previous DN' files.
[0148] In the above embodiments, a dynamic base database refers to a data set whose picture set will change, and a static base database refers to a data set whose picture set will not change. In the above embodiments, the threshold values not illustrated, such as the association threshold value, the search threshold value, etc., have a threshold range taken from the interval [0, 1]. The above threshold values can be set according to actual requirements.
[0149] The image clustering method proposed in this paper is highly real-time, with minute-level clustering performance. It can also perform clustering without a static database. By using batch clustering, the computational power required for comparison with a static database is significantly reduced. This method provides excellent data service support for subsequent big data analysis and directly provides users with reliable, individual file tracking information.
[0150] Continue to refer Figure 13 , Figure 13 The framework diagram of an image archiving system according to an embodiment of the present application is shown. The system specifically includes a picture acquisition unit 1301, a picture clustering unit 1302, an archiving unit 1303 and an identity landing unit 1304. Among them, the picture acquisition unit 1301 is configured to acquire pictures in real time for feature structuring and attribute recognition, and filter pictures that do not meet the picture quality score; the picture clustering unit 1302 is configured to segment and group pictures according to time and space information, cluster them in batches, first cluster them using density clustering, and then merge them within the batch using union-find; the archiving unit 1303 is configured to compare and archive discrete points that cannot be clustered by batch clustering and classes formed by batch clustering with the dynamic base database respectively; the identity landing unit 1304 is configured to merge archives of the same object, traverse all archives for comparison with the static base database, and real-name the unnamed archives.
[0151] Reference below Figure 14 , which shows a structural diagram of a computer system suitable for implementing an electronic device of an embodiment of the present application. Figure 14 The electronic device shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0152] like Figure 14 As shown, computer system 1400 includes a central processing unit (CPU) 1401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1402 or a program loaded from a storage unit 1408 into a random access memory (RAM) 1403. Various programs and data required for the operation of system 1400 are also stored in RAM 1403. CPU 1401, ROM 1402, and RAM 1403 are connected to each other via a bus 1404. An input / output (I / O) interface 1405 is also connected to bus 1404.
[0153] The following components are connected to the I / O interface 1405: an input section 1406 including a keyboard, a mouse, and the like; an output section 1407 including a liquid crystal display (LCD) and speakers; a storage section 1408 including a hard disk; and a communication section 1409 including a network interface card such as a LAN card or a modem. The communication section 1409 performs communication processing via a network such as the Internet. A drive 1410 is also connected to the I / O interface 1405 as needed. Removable media 1411, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 1410 as needed, so that computer programs read therefrom can be installed in the storage section 1408 as needed.
[0154] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart 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 carried on a computer-readable storage medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1409, and / or installed from the removable medium 1411. When the computer program is executed by the central processing unit (CPU) 1401, the above-mentioned functions defined in the method of the present application are executed. It should be noted that the computer-readable storage medium of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium that can transmit, propagate, or transfer a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0155] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0156] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two 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 box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0157] The modules described in the embodiments of the present application may be implemented in software or hardware.
[0158] As another aspect, the present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or it may exist independently and not be assembled into the electronic device. The above computer-readable storage medium carries one or more programs. When the above one or more programs are executed by the electronic device, the electronic device: acquires images in real time for feature structuring and attribute recognition, and filters images that do not meet the image quality score; divides and groups images according to spatiotemporal information, clusters them in batches, first clusters them using density clustering, and then merges them within the batch using union-find; for discrete points that cannot be clustered by batch clustering and classes formed by batch clustering, they are compared and archived with the dynamic database respectively; merges files of the same object, traverses all files and compares them with the static database, and real-names the unnamed files.
[0159] The above description is merely a preferred embodiment of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned inventive concept. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. An image aggregation method, characterized in that: include: S1: Real-time acquisition of images for feature structuring and attribute recognition, filtering out images that do not meet the image quality score; S2: The images are divided and grouped according to their spatiotemporal information, and clustered in batches. First, density clustering is used for clustering, and then union-find is used for merging within the batch. S3: For discrete points that cannot be clustered by batch clustering and the clusters formed by batch clustering, they are compared with the dynamic database and archived; S4: Merge files of the same object, traverse all files and compare them with the static database, and verify the names of files that have not been verified; The S3 specifically includes: performing a 1:N comparison on the discrete points that cannot be clustered by batch clustering and the dynamic base database to determine whether there are files that meet the search threshold, and selecting different thresholds according to the attributes of the discrete points and the attributes of the compared files to determine whether they meet the archiving requirements; performing a 1:N comparison on the classes formed by batch clustering and the dynamic base database to determine whether there are files that meet the search threshold, and selecting different thresholds according to the attributes of the classes and the attributes of the compared files to determine whether they meet the archiving requirements; if not and the identity cannot be confirmed, adding a new file; Merging archives of the same object in S4 specifically includes: determining pre-merged archives; concurrent 1:N queries to obtain results that meet the search threshold for each class and store the results in a preprocessing array; determining the maximum sample archive, merging and sorting it; threshold pruning to obtain a final merged list that can be directly processed. The determining pre-merged archives includes: screening out archives whose archive sample number is greater than a first sample threshold, counting the number of archives DN without a last merge time field in the screening results; judging whether DN exceeds a first archive number DNT threshold, and if so, taking out DNT archives that meet the above conditions; if not, taking out DN archives that meet the above conditions, and screening out archives whose absolute value of the time difference between the last merge time and the current time point exceeds the first time difference threshold, sorting the archives in ascending order according to the last merge time, taking out DNT-DN archives before the sorting, and merging them with the DN archives.
2. The image aggregation method according to claim 1, characterized in that: The clustering in batches in S2 specifically includes: S21: density clustering using DBSCAN algorithm; S22: Calculate the average vector of the clustering results to obtain the cluster center; S23: Find the cluster centers whose similarity rankings are higher than the first threshold, and perform a union-find operation.
3. The image aggregation method according to claim 2, characterized in that: The union-find operation in S23 includes: S231: Initialize each class as a set, and traverse to determine whether the root node to which the elements in the set belong belongs to the majority class; S232: In response to the element root node being the majority class, find the root nodes of other unprocessed elements, and if the two elements meet a correlation threshold, merge the sets containing the two elements.
4. The image aggregation method according to claim 1, characterized in that: The method of determining the maximum sample file specifically includes: traversing all preprocessing arrays, determining the file with the largest sample in the current file and its neighboring files, and judging whether the file with the largest sample is the current file; if not, updating the file with the largest sample to the key file, taking out the values of all the original neighboring files and using the current file as the value, merging the value results of the same key and removing duplicates, and arranging the results in descending order according to the number of samples of the key.
5. The image aggregation method according to claim 1, characterized in that: The threshold pruning specifically includes: initializing the elimination list, traversing the sorted preprocessing array, in response to the current key not existing in the elimination list, obtaining the corresponding threshold according to the archive attribute corresponding to the key and adding the key to the elimination list, traversing the value array under the key, in response to the current value not existing in the elimination list and meeting the comparison threshold, retaining the value and adding it to the elimination list, and outputting the pre-merged list.
6. The image aggregation method according to claim 1, characterized in that: The real-name verification of the unauthenticated file in S4 specifically includes: determining the pre-identity landing file, traversing the pre-identity landing file and taking the file type center feature for comparison with the static base database; in response to the comparison result being greater than the first landing threshold score, or the comparison result being less than the first landing threshold score but greater than the second landing threshold score, and the highest similarity with the file photo is the same ID photo and the comparison result is greater than the third landing threshold score, taking the identity with the highest similarity for landing; in response to the existence of the same ID card, recording the pre-merged identity file, taking the file with the largest number of samples as the main file, merging the small file into the large file, and updating the last file update time; triggering identity merging, scanning the pre-merged file list for merging.
7. The image aggregation method according to claim 6, characterized in that: The method of determining the pre-identity landing profile specifically includes: screening out profiles whose profile sample number is greater than a second sample threshold, and counting the number of profiles DN' without a last landing time field in the screening results; determining whether DN' exceeds a second profile number DNT' threshold, and if so, taking out DNT' profiles that meet the above conditions; if not, taking out DN' profiles that meet the above conditions, and screening out profiles whose absolute value of the time difference between the last landing time and the current time point exceeds the second time difference threshold, sorting the profiles in ascending order according to the last merge time, taking out the DNT'-DN' profiles before the sorting, and merging them with the DN' profiles.
8. A computer-readable storage medium having one or more computer programs stored thereon, characterized in that: When the one or more computer programs are executed by a computer processor, the method according to any one of claims 1 to 7 is implemented.
9. An image aggregation system, characterized in that: The system comprises: Image acquisition unit: configured to acquire images in real time for feature structuring and attribute recognition, and filter out images that do not meet the image quality score; Image clustering unit: configured to segment and group the images according to spatiotemporal information, cluster them in batches, first cluster them using density clustering, and then merge them within the batch using union-find; Archiving unit: configured to compare and archive discrete points that cannot be clustered by batch clustering and classes formed by batch clustering with the dynamic database; Identity landing unit: Configured to merge files of the same object, traverse all files for comparison with the static base database, and authenticate files that have not been authenticated; The archiving unit specifically includes: performing a 1:N comparison on the discrete points that cannot be clustered by batch clustering and the dynamic base database to determine whether there are archives that meet the search threshold, and selecting different thresholds according to the attributes of the discrete points and the attributes of the compared archives to determine whether they meet the archiving requirements; performing a 1:N comparison on the classes formed by batch clustering and the dynamic base database to determine whether there are archives that meet the search threshold, and selecting different thresholds according to the attributes of the classes and the attributes of the compared archives to determine whether they meet the archiving requirements; if not and the identity cannot be confirmed, adding a new archive; Merging archives of the same object in the identity landing unit specifically includes: determining pre-merged archives; concurrent 1:N queries to obtain results that meet the search threshold for each class and store the results in a preprocessing array; determining the maximum sample archive, merging and sorting it; threshold pruning to obtain a final merged list that can be directly processed, wherein determining the pre-merged archives includes: screening out archives whose archive sample number is greater than a first sample threshold, counting the number of archives DN without a last merge time field in the screening results; judging whether DN exceeds a first archive number DNT threshold, and if so, taking out DNT archives that meet the above conditions; if not, taking out DN archives that meet the above conditions, and screening out archives whose absolute value of the time difference between the last merge time and the current time point exceeds the first time difference threshold, sorting the archives in ascending order according to the last merge time, taking out DNT-DN archives before the sorting, and merging them with the DN archives.
Citation Information
Patent Citations
Dynamic face clustering method, device and equipment and storage medium
CN111242040A
Identity archiving method and device, electronic equipment and storage medium
CN113887366A