Portrait aggregation method and apparatus, electronic device, and storage medium

By performing 1:N retrieval and dynamic library management for facial image aggregation in an edge computing environment, the problem of low efficiency and high cost of facial image aggregation in lightweight scenarios is solved, achieving efficient and economical file management, which is suitable for police terminals with limited resources.

CN120596693BActive Publication Date: 2026-01-13E SURFING VISION TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511114078.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-11
Publication Date
2026-01-13
Estimated Expiration
2045-08-11

Smart Images

  • Figure CN120596693B_ABST
    Figure CN120596693B_ABST
Patent Text Reader

Abstract

The present application relates to a portrait clustering method, device, electronic device and storage medium, wherein the portrait clustering method comprises: acquiring snapshot face data and acquiring a preset portrait static library; the portrait static library stores a plurality of initial portrait base maps carrying archive identifiers; based on the snapshot face data, the portrait static library is searched and processed, and according to the search result, a plurality of first target portrait base maps matched with the snapshot face data in the initial portrait base maps are determined; based on the archive identifiers carried by each first target portrait base map, a sub-archive list is generated; the corresponding historical merging record of the sub-archive list is queried, and a merged archive is established according to the query result of the historical merging record, and a clustering result of the snapshot face data is generated. Through the present application, the problem of low portrait clustering efficiency and high cost in the lightweight scene is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computer vision, and in particular to a portrait archiving method and device, an electronic device, and a storage medium. BACKGROUND

[0002] In the field of public security, face data archiving technology based on a view library has become the core support for realizing personnel trajectory tracking, key target control, and other practical applications. In related technologies, a scheme based on deep learning face feature extraction combined with a distributed big data component (such as Hadoop / Spark) is generally used, and massive snapshot data is clustered and analyzed by an AI algorithm to realize archive merging. However, the above-mentioned method relies on a distributed computing framework to build a clustering engine and needs to deploy a big data analysis component, which has high system architecture complexity, resulting in low archiving efficiency and a sharp increase in operation and maintenance costs, and is not suitable for lightweight deployment requirements of edge computing nodes or small and medium-sized police terminals.

[0003] At present, there is no effective solution to the problem of low portrait archiving efficiency and high cost in the related art in a lightweight scenario. SUMMARY

[0004] Embodiments of the present application provide a portrait archiving method, device, electronic device, and storage medium to at least solve the problem of low portrait archiving efficiency and high cost in the related art in a lightweight scenario.

[0005] In a first aspect, the embodiments of the present application provide a portrait archiving method, which comprises:

[0006] Obtaining snapshot face data and a preset portrait static library; the portrait static library stores a plurality of initial portrait base images carrying archive identifiers;

[0007] Based on the snapshot face data, performing retrieval processing from the portrait static library, and determining a plurality of first target portrait base images in the initial portrait base images that match the snapshot face data according to a retrieval result;

[0008] Based on the archive identifiers carried by each of the first target portrait base images, generating a sub-archive list;

[0009] Querying historical merging records corresponding to the sub-archive list, and establishing a merged archive according to a query result of the historical merging records to generate an archiving result of the snapshot face data.

[0010] In some embodiments, the establishing a merged archive according to a query result of the historical merging records comprises:

[0011] In a case where the query result indicates that the historical merge record is missing, a new merge profile is established based on the profile identifiers in the sub-profile list, and a new merge record is generated based on the established new merge profile; the new merge record is stored in a dynamic library, and the dynamic library is associated with the portrait static library.

[0012] In some embodiments, the establishing the merge profile according to the query result of the historical merge record comprises:

[0013] In a case where the historical merge record is queried and it is detected based on the historical merge record that the sub-profile list exists in a plurality of historical merge profiles, a number of profile markers in the sub-profile list that are merged into the same historical merge profile is determined, and a difference profile marker in the sub-profile list is determined according to the number of profile markers.

[0014] The difference profile marker is subjected to secondary merging to generate the merge profile.

[0015] In some embodiments, the secondary merging of the difference profile marker to generate the merge profile comprises:

[0016] A difference portrait base image carrying the difference profile marker is extracted from the portrait static library.

[0017] Based on the difference portrait base image, a retrieval process is performed on the portrait static library, and a plurality of second target portrait base images that match the difference portrait base image in the initial portrait base image are determined according to a retrieval result.

[0018] It is detected whether the first target portrait base image exists in the second target portrait base image, and if so, the difference profile marker is subjected to secondary merging into the historical merge profile based on a detection result to generate the merge profile.

[0019] In some embodiments, the obtaining of the preset portrait static library comprises:

[0020] An initial snapshot portrait is received.

[0021] A base image quality of the initial snapshot portrait is detected.

[0022] An initial portrait base image with a base image quality higher than a preset quality threshold in the initial snapshot portrait is stored in a database to construct the portrait static library.

[0023] In some embodiments, the storing of the initial portrait base image with the base image quality higher than the preset quality threshold in the database comprises:

[0024] A first initial portrait base image is determined from the initial snapshot portrait.

[0025] receiving a current snapshot portrait, in a case that a bottom map quality of the current snapshot portrait is higher than the quality threshold, storing the current snapshot portrait into the portrait static library, and matching the current snapshot portrait with initial portrait bottom maps in the database, and updating a merge record based on a matching result; wherein a quantity of initial portrait bottom maps carrying a same archive identifier in the portrait static library is less than or equal to a preset bottom map threshold.

[0026] In some embodiments, the acquiring snapshot face data comprises:

[0027] acquiring the snapshot face data uploaded by the snapshot camera; the snapshot face data is obtained by image processing of an initial snapshot image collected by the snapshot camera, and is generated based on structured data.

[0028] In a second aspect, an embodiment of the present application provides a portrait archive gathering device, comprising:

[0029] an acquisition module, configured to acquire snapshot face data and a preset portrait static library; the portrait static library stores a plurality of initial portrait bottom maps carrying archive identifiers;

[0030] a search module, configured to perform search processing on the portrait static library based on the snapshot face data, and determine a plurality of first target portrait bottom maps in the initial portrait bottom maps that match the snapshot face data according to a search result;

[0031] a sub-list module, configured to generate a sub-archive list based on archive identifiers carried by each of the first target portrait bottom maps;

[0032] an archive gathering module, configured to query historical merge records corresponding to the sub-archive list, and establish a merge archive according to a query result of the historical merge records, and generate an archive gathering result of the snapshot face data.

[0033] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the portrait archive gathering method of the first aspect when executing the computer program.

[0034] In a fourth aspect, an embodiment of the present application provides a storage medium, which stores a computer program executable by a processor to implement the portrait archive gathering method of the first aspect.

[0035] Compared with the related art, the portrait aggregation method, device, electronic device and storage medium provided by the embodiments of the present application have the advantages that by acquiring snapshot face data and acquiring a preset portrait static library, the portrait static library stores a plurality of initial portrait base maps carrying archive identifiers; based on the snapshot face data, the initial portrait base maps are searched from the portrait static library, and according to the search result, a plurality of first target portrait base maps matching the snapshot face data in the initial portrait base maps are determined; based on the archive identifiers carried by each first target portrait base map, a sub-archive list is generated; a historical merging record corresponding to the sub-archive list is queried, and a merged archive is established according to the query result of the historical merging record, and an aggregation result of the snapshot face data is generated.

[0036] In the foregoing manner, the dependence on deep learning model training and large-scale labeled data is reduced, and the efficiency and economy of feature matching are improved. Ultimately, the balance between system complexity and real-time performance is achieved under the premise of ensuring the aggregation accuracy, which provides low-latency and high-availability portrait archive management support for personnel trajectory analysis, key control and other businesses, and is particularly suitable for resource-limited edge computing scenarios, effectively solving the problems of low portrait aggregation efficiency and high cost in lightweight scenarios.

[0037] Details of one or more embodiments of the present application are presented in the following drawings and description to make other features, objects and advantages of the present application more apparent. BRIEF DESCRIPTION OF DRAWINGS

[0038] The drawings described herein are intended to provide further understanding of the present application, form a part of the present application, and the illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:

[0039] Figure 1 is a hardware structure block diagram of a terminal according to a portrait aggregation method of an embodiment of the present application;

[0040] Figure 2 is a flowchart of a portrait aggregation method according to an embodiment of the present application;

[0041] Figure 3 is a schematic diagram of an archive merging process according to an embodiment of the present application;

[0042] Figure 4 is a flowchart of another portrait aggregation method according to an embodiment of the present application;

[0043] Figure 5 is a flowchart of an archive merging method according to an embodiment of the present application;

[0044] Figure 6 is a structure block diagram of a portrait aggregation device according to an embodiment of the present application. DETAILED DESCRIPTION

[0045] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application. Furthermore, it is understood that although the efforts made in such a development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, modifications to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.

[0046] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.

[0047] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application means two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The terms “first,” “second,” “third,” etc., used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.

[0048] The method embodiments provided in this example can be executed on a terminal, computer, or similar computing device. Taking running on a terminal as an example, Figure 1 This is a hardware structure block diagram of a terminal for a facial recognition method according to an embodiment of this application. Figure 1 As shown, a terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. Optionally, the terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the terminal described above. For example, the terminal may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0049] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the portrait archiving method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thus implementing the above-described method. The memory 104 may include high-speed random access memory and non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0050] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the terminal's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0051] This embodiment provides a method for image aggregation. Figure 2 This is a flowchart of a portrait aggregation method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps:

[0052] Step S210: Acquire captured face data and obtain a preset static portrait library; the static portrait library stores multiple initial portrait base images carrying file identifiers.

[0053] To better understand this application, the application background of the portrait archiving method in this embodiment is first explained: In this context, the portrait archive base map (i.e., the above-mentioned initial portrait base map) is stored in the portrait static library. Each base map carries an archive identifier, and base maps with the same archive identifier belong to the same archive; the base maps in each archive should not exceed 5.

[0054] In the facial image aggregation process, the system first acquires the captured facial image data (i.e., the captured facial data mentioned above) through front-end acquisition devices or data interfaces, and simultaneously retrieves a pre-built static facial image library. This static library serves as a basic facial feature database, storing a standardized set of initial facial image base images formed through manual verification or historical data accumulation. Each base image in this static library is associated with a unique file identifier (such as an identity account number, file number, etc.) to identify the natural person's file to which the base image belongs, providing a benchmark data source for subsequent facial comparison.

[0055] Step S220: Based on the captured face data, perform retrieval processing from the static image database, and determine multiple first target image base images that match the captured face data in the initial image base image according to the retrieval results.

[0056] Specifically, based on the captured facial data, a 1:N search request is initiated to a pre-defined static image database. A high-speed search is performed within the static image database, calculating and ranking the matching degree between the captured facial data and all initial image backgrounds. Optionally, this search process can be as follows: First, the captured facial data and initial image backgrounds are converted into high-dimensional feature vectors (e.g., 128-dimensional encoding); then, a cosine distance or Euclidean distance model is used to calculate similarity, selecting the top N (e.g., top 10) first target image backgrounds with similarity rankings exceeding a pre-defined threshold (e.g., 90%), thus completing the initial matching between the captured facial data and the static image database.

[0057] In another embodiment, the selection method for the first target portrait background image can also be as follows: sorting the captured face data and each initial portrait background image in the static portrait library based on similarity, selecting the background images with the highest similarity ranking from each initial portrait background image according to the sorting results to form a similarity list; then, selecting background images with similarity greater than a preset threshold from the similarity list, thereby obtaining the above multiple first target portrait background images through continuous 1:N query of the static portrait library and filtering of the query list based on the preset similarity threshold.

[0058] It should also be noted that the above-mentioned preset thresholds can be dynamically set according to the actual situation. For example, when encountering occlusion scenarios, the weighting will be automatically reduced to ensure the robustness of the search results in complex real-world scenarios.

[0059] Step S230: Generate a sub-file list based on the file identifier carried by each first target portrait base image.

[0060] In this step, the metadata of the first target portrait base image obtained in step S220 is parsed, the file identifier bound to each base image is extracted, and a sub-file list is generated. This list can be stored using a lightweight data structure, supporting fast querying and comparison. It also records all candidate files that may belong to the same natural person as the currently captured face, providing a data foundation for the dynamic construction of subsequent file merging.

[0061] Step S240: Query the historical merge records corresponding to the sub-file list, and create merge files based on the query results of the historical merge records to generate the aggregated file results of the captured face data.

[0062] The process involves querying historical merge data corresponding to each file identifier in the sub-file list to determine whether the current candidate file has participated in previous merge operations. For example, implicit relationships in the sub-file list can be detected using algorithms such as graph traversal (e.g., file was merged with file c). If a valid merge record exists, the merge relationship is directly inherited. If there are unmerged independent files or files that are partially merged, the files are merged based on a dynamic merge strategy, and the currently captured face data and the matched sub-files are associated with the merged file. Finally, a clustered file result containing merge relationships, file identifiers, and captured data is generated for subsequent trajectory analysis and business applications. Simultaneously, captured face data whose background image quality reaches a preset quality threshold are updated to the static image database.

[0063] Through steps S210 to S240, a 1:N query based on the static portrait database is continuously performed while receiving captured face data, realizing a 1:N retrieval mechanism based on the static portrait database. Furthermore, the initial base map associated with the archive identifier is used as the reference data source, which helps to reduce the dependence on deep learning model training and large-scale labeled data, and improves the efficiency and economy of feature matching. Finally, while ensuring the accuracy of the archive aggregation, a balance between system complexity and real-time performance is achieved, providing low-latency and highly available portrait archive management support for personnel trajectory analysis, key deployment and other businesses. It is especially suitable for resource-constrained edge computing scenarios, effectively solving the problems of low efficiency and high cost of portrait archive aggregation in lightweight scenarios.

[0064] In some embodiments, the above-mentioned creation of a merged archive based on the query results of historical merged records may further include the following steps:

[0065] If the query results indicate that historical merge records are missing, a new merge file is created based on the file identifier in the sub-file list, and a new merge record is generated based on the created new merge file; the new merge record is stored in the dynamic library, which is associated with the portrait static library.

[0066] When the system identifies multiple potentially source-related files that need to be merged through the sub-file list, if the query finds that these files have no association in the historical merge records (i.e., the first time a merge is required), then the merge file creation process is initiated based on the unique identifier (such as file ID) of each file in the sub-file list:

[0067] First, the base map data, trajectory information, and file attributes of all sub-files are extracted. A feature fusion algorithm is then used to generate a merged master file. This master file inherits high-quality base maps from the sub-files (such as base maps with a resolution ≥1080P and illumination uniformity >0.7) and removes duplicates. Simultaneously, the system generates a new merge record, recording the trigger time of the merge operation, the list of sub-file IDs participating in the merge, the ID of the merged master file, and quality evaluation indicators (such as the number of merged base maps and trajectory completeness). Finally, this merge record is stored in the portrait file table in the dynamic library, which is a dynamic data set used to store real-time merge status and operation history.

[0068] In this embodiment, the dynamic library and the static image library are associated through an archive ID mapping table to ensure that the basic archive data in the static library is synchronized with the real-time merging status in the dynamic library. Thus, in subsequent 1:N searches, the dynamic library can directly provide the latest merging information, avoiding repeated searches caused by archive splitting and improving the accuracy of archive aggregation and system response efficiency.

[0069] In some embodiments, the above-mentioned creation of a merged archive based on the query results of historical merged records may further include the following steps:

[0070] If historical merge records are found, and the sub-file list is detected to exist in multiple historical merge files based on the historical merge records, determine the number of file tags in the sub-file list that will be merged into the same historical merge file, and determine the difference file tags in the sub-file list based on the number of file tags; perform a second merge on the difference file tags to generate a merged file.

[0071] Specifically, when the system queries historical merge records and detects that the current sub-file list is scattered across multiple historical merge records, it first counts the number of sub-file tags contained in each historical merge record. By comparing the differences in the number of tags in each record, sub-files that appear less frequently or in inconsistent numbers across multiple merge records are identified as discrepancy file tags. Next, a secondary merge process is initiated for these discrepancy file tags, extracting their base map data and file attributes for feature fusion to generate new merged files that inherit high-quality base maps (such as base maps with resolution ≥1080P and illumination uniformity >0.7). Finally, the file generated by the secondary merge is marked as the latest merge result, and the merge record in the dynamic library is updated. It is then linked to the static image library through a file ID mapping table to ensure that the basic data in the static library is synchronized with the dynamic merge status.

[0072] Through the above embodiments, by using similarity threshold filtering and sub-file list generation, potential source files are accurately located, avoiding the waste of computing resources caused by full data comparison. Furthermore, by combining historical merge record query and hierarchical merging strategies, the difference files are dynamically integrated and the aggregation results are updated, effectively avoiding the problem of file merging errors caused by misidentification during historical operations. This solves the problem of file dispersion in historical merge records, ensuring the accuracy of file merging, and reducing the deployment requirements of distributed computing clusters through a lightweight algorithm framework.

[0073] In some embodiments, the above-mentioned secondary merging of the difference file markers to generate a merged file may further include the following steps:

[0074] Extract the differential portrait base images carrying differential profile markers from the static portrait database; perform retrieval processing from the static portrait database based on the differential portrait base images, and determine multiple second target portrait base images that match the differential portrait base images in the initial portrait base images based on the retrieval results; detect whether the first target portrait base image exists in the second target portrait base images, and if so, merge the differential profile markers into the historical merged archives based on the detection results to generate a merged archive.

[0075] The following details the overall process of merging archives by processing discrepancy markers in a static portrait database. First, based on the aforementioned discrepancy markers, the portrait backgrounds of officials in the static database are identified. These discrepancy markers are typically caused by insufficient feature similarity or inconsistent archive attribution during historical merging processes. Next, using these discrepancy backgrounds as the query benchmark, feature comparison algorithms, such as cosine similarity or structural similarity index (SSIM), are used to analyze and retrieve multiple matching second target backgrounds from the static database, forming a potentially related archive set. Subsequently, based on these discrepancy backgrounds, high-precision retrieval processing is performed in the static database. Feature matching algorithms (such as facial feature point comparison and texture similarity calculation) are used to filter out multiple second target portrait backgrounds that highly match the discrepancy backgrounds. These backgrounds may belong to the same person but were not correctly merged historical archives. Next, it is checked whether the second target backgrounds contain a portrait background already marked as a first target. If a first target background is detected, a secondary merging process is triggered, integrating the second target backgrounds into the original archives, ultimately generating an updated merged archive.

[0076] For example, Figure 3 This is a schematic diagram of a file merging process according to an embodiment of this application, such as... Figure 3 As shown, if there are multiple files with a similarity greater than 90 in the similarity list, and the number of different file tags is greater than 1, and there are no historical merge records in the sub-file list, then a new merged file A is created, and merge records Aa and Ab are added. Additionally, if the sub-file list exists in multiple merged files (e.g., sub-lists a, b, c, with merge records Aa, Bb, Ac), then extract 5 captured portrait records from file b (the less different part), and then perform a 1:N query in the portrait database. If file a or file c is found in the sub-list with a similarity greater than 90, then file b is considered to be the same file as files a and c, and file b is added to merged file A.

[0077] The above embodiments effectively solve the problem of scattered archives caused by differences in image quality or changes in scene, and improve the accuracy and completeness of archive management.

[0078] In some embodiments, the above-mentioned acquisition of a preset static image library may further include the following steps:

[0079] Receive initial captured portraits; detect the background quality of the initial captured portraits; store the background images of the initial captured portraits with a background quality higher than a preset quality threshold in the database to build a static portrait library.

[0080] In this step, upon receiving the initial captured portrait data, the initial portrait background image is first subjected to quality inspection. High-quality background images that meet the standards are selected using preset quality assessment algorithms (such as resolution detection, illumination uniformity analysis, and blur calculation). The quality thresholds are typically set to key indicators such as resolution ≥ 1080P, illumination uniformity > 0.7, and blur < 0.3. Subsequently, the approved initial portrait background images are stored in the portrait database. These background images serve as the core content of the static portrait database, forming the basic archive data. The static database is linked to the dynamic database through an archive ID mapping table, ensuring that the basic data is synchronized with the real-time merging status. By selecting high-quality background images and building the static database, the system can provide a reliable data source for subsequent 1:N retrieval, archive merging, and difference processing, avoiding mismatches or duplicate searches caused by low-quality background images, thereby improving the overall archive aggregation accuracy and system response efficiency.

[0081] In some embodiments, storing the initial portrait base image with a base image quality higher than a preset quality threshold in the database may further include the following steps:

[0082] From the initial captured images, determine the first initial image background; receive the current captured image, and if the quality of the current captured image background is higher than the quality threshold, store the current captured image in the static image database, and match the current captured image with the initial image backgrounds in the database, updating and merging records based on the matching results; wherein, the number of initial image backgrounds with the same file identifier in the static image database is less than or equal to a preset image threshold.

[0083] This step defines the process for incremental portrait archiving based on the first initial base image. It should be noted that this embodiment uses a portrait database map as the archive cover; to avoid portrait archive loss, the first archive base image may not be of good quality, potentially leading to errors in subsequent 1:N query similarity. Therefore, when receiving the portrait data stream, the quality of the portrait image is assessed. If the quality is acceptable and the number of archive base images is less than 5, it needs to be added to the static database as the archive's portrait base image to improve the accuracy of subsequent 1:N queries.

[0084] Specifically, during the initial capture, the system selects the first initial portrait background image that passes quality checks (e.g., resolution ≥1080p, facial feature visibility ≥90%) as the baseline file. When receiving new captured portraits, the system first performs quality checks. If the quality of the current captured background image is higher than a preset threshold, it is stored in the portrait static library. Then, it uses feature matching algorithms (e.g., facial feature point comparison, texture similarity calculation) to verify its association with the existing initial portrait background images in the static library. If the match is successful, the captured background image is bound to the file identifier of the baseline file, forming associated data under the same file. At the same time, the system dynamically counts the number of background images under this file identifier. When the number reaches a preset background image threshold (e.g., a maximum of 5 images can be stored), subsequent successfully matched captured background images will trigger an overwrite strategy (e.g., replacing the oldest or lowest quality background image) to balance file integrity and data redundancy control.

[0085] In some embodiments, the process of acquiring captured facial data may further include the following steps:

[0086] Acquire captured face data uploaded by the capture camera; captured face data is generated by the capture camera performing image processing on the initial captured image to obtain structured data, and then generating the data based on the structured data.

[0087] First, cameras deployed in public areas capture scene images in real time using high-resolution image sensors, forming initial capture images. Then, the camera's built-in image processing module preprocesses the raw images, including dynamic range adjustment (such as wide dynamic range technology), noise suppression (such as non-local mean denoising), and illumination equalization, to improve the recognition accuracy of face regions. Next, a deep learning-based face detection algorithm is used to locate face regions in the images, and the detected faces are normalized in pose using affine transformations (such as adjusting the deflection angle to within ±15°), cropping them to a fixed size (such as 128×128). The system first identifies face blocks (pixels); then, using convolutional neural networks, such as VGGFace (a face recognition model) or ArcFace (additive angular interval loss function in deep face recognition), it extracts deep features from the face blocks, generating feature vectors of 512 dimensions or higher. These vectors are then quantized and encoded (e.g., binary hashing) into structured data containing timestamps, camera IDs, feature vectors, and quality scores (e.g., sharpness ≥ 0.8, illumination uniformity ≥ 0.7). Finally, the structured data that meets the quality thresholds is packaged into a standard format (e.g., JSON or Protocol Buffers) and uploaded to the backend system via an encrypted channel using Transport Layer Security version 1.3 (TLS 1.3). This data is then matched or stored against a baseline archive in the static portrait database, providing a data foundation for subsequent archive merging, difference detection, and 1:N retrieval.

[0088] The embodiments of this application will be described and illustrated below through specific examples. Figure 4 This is a flowchart of another portrait aggregation method according to an embodiment of this application, such as... Figure 4 As shown, the process includes the following steps:

[0089] Step S401: Receive structured captured face data.

[0090] Step S402: Perform a 1:N query based on the static image database to obtain the similarity result and determine whether it exceeds the preset threshold X.

[0091] Step S403: If the similarity result indicates that the similarity between the captured face data and each initial portrait background image is less than a preset threshold X, then a new file is created for the captured face data.

[0092] Step S404: If the similarity result indicates that the similarity between one or more initial portrait background images and the captured face data is greater than or equal to a preset threshold X, then perform portrait quality detection and top N similarity list analysis.

[0093] Step S405: Determine whether the image quality of the captured face data is up to standard; if so, add an archive background image, while ensuring that the number of archive background images is less than 5 and the quality is up to standard.

[0094] Step S406: Merge files.

[0095] Step S407: Update the file records.

[0096] For the file merging process in step S406 above, please refer to [link / reference needed]. Figure 5 The process includes the following steps:

[0097] Step S501: Query the file similarity list.

[0098] Step S502: Determine whether the number of different file tags with a similarity greater than 90% is greater than 1. It should be understood that if the determination result is no, there is no need to perform the file merging operation further.

[0099] Step S503: If yes, extract files from the similarity list that have a similarity greater than 90%.

[0100] Step S504: Check if there are any historical merge records.

[0101] Step S505: If the judgment result of step S504 is negative, then create a new merge file and add a merge record.

[0102] Step S506: If the judgment result of step S504 is yes, then further determine whether there are multiple merged files.

[0103] Step S507: If the judgment result of step S506 is negative, then add the file to the merge record.

[0104] Step S508: If the judgment result of step S506 is yes, then extract the data of each sub-file record and compare the similarity, and update the file merging rules according to the data similarity of the sub-files.

[0105] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0106] This embodiment also provides a human image focusing device, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the terms "module," "unit," "subunit," etc., can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0107] Figure 6 This is a structural block diagram of a human image focusing device according to an embodiment of this application, such as... Figure 6 As shown, the device includes: an acquisition module 61, a retrieval module 62, a sublist module 63, and a file aggregation module 64; wherein:

[0108] The acquisition module 61 is used to acquire captured face data and a preset static image library; the static image library stores multiple initial image base images carrying file identifiers; the retrieval module 62 is used to perform retrieval processing from the static image library based on the captured face data, and determine multiple first target image base images in the initial image base images that match the captured face data according to the retrieval results; the sub-list module 63 is used to generate a sub-file list based on the file identifiers carried by each first target image base image; the aggregation module 64 is used to query the historical merging records corresponding to the sub-file list, and establish a merged file according to the query results of the historical merging records, generating the aggregation result of the captured face data.

[0109] In some embodiments, the above-mentioned file aggregation module 64 is also used to create a new merged file based on the file identifier in the sub-file list when the query result indicates that the historical merged record is missing, and to generate a new merged record based on the newly created merged file; the new merged record is stored in a dynamic library, which is associated with and stored independently of the portrait static library.

[0110] In some embodiments, the above-mentioned file aggregation module 64 is further configured to, when a historical merge record is found and the sub-file list is detected to exist in multiple historical merge files based on the historical merge record, determine the number of file tags in the sub-file list that are merged into the same historical merge file, and determine the difference file tags in the sub-file list based on the number of file tags; perform a second merge on the difference file tags to generate a merged file.

[0111] In some embodiments, the above-mentioned file aggregation module 64 is further used to extract differential portrait base images carrying differential file markers from the portrait static library; perform retrieval processing from the portrait static library based on the differential portrait base images, and determine multiple second target portrait base images that match the differential portrait base images in the initial portrait base images according to the retrieval results; detect whether the first target portrait base image exists in the second target portrait base images, and if so, merge the differential file markers into the historical merged archives a second time based on the detection results to generate a merged archive.

[0112] In some embodiments, the acquisition module 61 is further configured to receive the initial captured portrait; detect the background quality of the initial captured portrait; and store the initial portrait backgrounds with background quality higher than a preset quality threshold in the database to construct a static portrait library.

[0113] In some embodiments, the acquisition module 61 is further configured to determine the first initial portrait background image from the initial captured portrait; receive the current captured portrait, and if the quality of the current captured portrait background image is higher than a quality threshold, match the current captured portrait with the first initial portrait background image. If the match is successful, store the current captured portrait in the portrait static library, and the file identifier carried by the current captured portrait is the same as the file identifier carried by the first initial portrait background image; wherein the number of initial portrait background images in the portrait static library carrying the same file identifier is less than or equal to a preset background image threshold.

[0114] In some embodiments, the acquisition module 61 is further configured to acquire captured face data uploaded by the capture camera; the captured face data is generated by the capture camera performing image processing on the initial captured image to obtain structured data, and based on the structured data.

[0115] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination. Specific examples in this embodiment can be found in the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.

[0116] This embodiment also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.

[0117] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.

[0118] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0119] S1, acquire captured face data and obtain a preset static portrait library; the static portrait library stores multiple initial portrait base images with file identifiers.

[0120] S2, based on the captured face data, performs retrieval processing from the static image database, and determines multiple first target image base images that match the captured face data in the initial image base image based on the retrieval results.

[0121] S3 generates a list of sub-files based on the file identifiers carried by each first target portrait base image.

[0122] S4, query the historical merge records corresponding to the sub-file list, and create merge files based on the query results of the historical merge records to generate the aggregated file results of the captured face data.

[0123] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0124] In addition, in conjunction with the portrait aggregation method in the above embodiments, this application embodiment can provide a storage medium for implementation. The storage medium stores a computer program; when executed by a processor, the computer program implements any of the portrait aggregation methods in the above embodiments.

[0125] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0126] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0127] Those skilled in the art should understand that the technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0128] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for image aggregation, characterized in that, The method includes: Acquire captured facial data and obtain a preset static image library; the static image library stores multiple initial image base images carrying file identifiers; Based on the captured face data, a search is performed from the static image database, and multiple first target image backgrounds that match the captured face data are determined in the initial image background image according to the search results; Based on the file identifier carried by each of the first target portrait base images, a sub-file list is generated; Query the historical merge records corresponding to the sub-file list, and create a merged file based on the query results of the historical merge records to generate the aggregated file result of the captured face data; wherein, creating a merged file based on the query results of the historical merge records includes: If the historical merge record is found, and the sub-file list is detected to exist in multiple historical merge files based on the historical merge record, the number of file tags in the sub-file list that were merged into the same historical merge file is determined, and the difference file tags in the sub-file list are determined based on the number of file tags; the difference file tags are caused by insufficient feature similarity or inconsistent file ownership during the historical merge process; Extract the base image of the different portrait carrying the difference profile marker from the static portrait library; Based on the difference portrait base image, a retrieval process is performed from the portrait static database, and multiple second target portrait base images that match the difference portrait base image in the initial portrait base image are determined according to the retrieval results; If the first target portrait image exists in the second target portrait background image, and if so, the difference file markers are merged into the historical merged file based on the detection result to generate the merged file.

2. The portrait aggregation method according to claim 1, characterized in that, The process of creating a merged archive based on the query results of historical merged records includes: If the query result indicates that the historical merged record is missing, a new merged file is created based on the file identifier in the sub-file list, and a new merged record is generated based on the created new merged file; the new merged record is stored in a dynamic library, which is associated with the portrait static library.

3. The portrait aggregation method according to claim 1, characterized in that, The process of obtaining the preset static image library includes: Receive the initial captured portrait; Detect the quality of the background image of the initially captured portrait; The initial portrait base images with a quality higher than a preset quality threshold are stored in the database to construct the portrait static library.

4. The portrait aggregation method according to claim 3, characterized in that, The step of storing the initial portrait base image with a base image quality higher than a preset quality threshold into the database includes: From the initial captured portrait, determine the first initial portrait base image; The system receives a captured portrait image. If the quality of the background image of the current captured portrait image is higher than the quality threshold, the system stores the current captured portrait image in the portrait static library and matches the current captured portrait image with the initial portrait background images in the database. The system updates and merges records based on the matching results. The number of initial portrait background images with the same file identifier in the portrait static library is less than or equal to a preset background image threshold.

5. The portrait aggregation method according to any one of claims 1 to 4, characterized in that, The acquisition of captured facial data includes: The captured face data uploaded by the capture camera is obtained; the captured face data is generated by the capture camera performing image processing on the initial captured image to obtain structured data, and based on the structured data.

6. A human image focusing device, characterized in that, include: The acquisition module is used to acquire captured face data and obtain a preset static image library; The static portrait database stores multiple initial portrait base images carrying archive identifiers; The retrieval module is used to perform retrieval processing from the static portrait database based on the captured face data, and determine multiple first target portrait background images that match the captured face data in the initial portrait background image according to the retrieval results; The sub-list module is used to generate a sub-file list based on the file identifier carried by each of the first target portrait base images; The aggregation module is used to query the historical merge records corresponding to the sub-file list, and to create merged files based on the query results of the historical merge records, generating the aggregation result of the captured face data, including: If the historical merge record is found, and the sub-file list is detected to exist in multiple historical merge files based on the historical merge record, the number of file tags in the sub-file list that were merged into the same historical merge file is determined, and the difference file tags in the sub-file list are determined based on the number of file tags; the difference file tags are caused by insufficient feature similarity or inconsistent file ownership during the historical merge process; Extract the base image of the different portrait carrying the difference profile marker from the static portrait library; Based on the difference portrait base image, a retrieval process is performed from the portrait static database, and multiple second target portrait base images that match the difference portrait base image in the initial portrait base image are determined according to the retrieval results; If the first target portrait image exists in the second target portrait background image, and if so, the difference file markers are merged into the historical merged file based on the detection result to generate the merged file.

7. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the portrait aggregation method according to any one of claims 1 to 5.

8. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the portrait aggregation method according to any one of claims 1 to 5 when it is run.

Citation Information

Patent Citations

  • Image file gathering method and system

    CN115495606A

  • Image file gathering method and device and electronic equipment

    CN119202295A