Archiving method and device for personnel data, electronic equipment and storage medium
By archiving facial and body data separately, and combining daily databases, a comprehensive facial profile database, and neighboring camera search, the problem of low recall and accuracy in existing technologies has been solved, achieving efficient personnel data archiving.
Patent Information
- Application Number
- CN202111658025.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2041-12-30
AI Technical Summary
The existing technology for personnel data archiving has low recall and accuracy, which can easily lead to multiple files for one person or loss of valid data. The existing solution is a real-time archiving strategy, which results in low recall and low accuracy.
By acquiring personnel data to be archived, determining target archiving rules and libraries based on personnel data categories, and performing archiving processing for face and body data respectively, including matching high-quality face data in the daily database and the overall face archive database, searching for similar body data across domains and neighboring mirror search, and reconnecting faces and bodies based on spatiotemporal conditions to generate the final archiving results.
It improves the recall and accuracy of data archiving, avoids multiple files for one person or loss of valid traces, ensures the uniqueness of each person's file, and improves archiving efficiency and accuracy.
Smart Images

Figure CN114443892B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data management, and in particular to a method, device, electronic device and storage medium for archiving personnel data. Background Art
[0002] Shops install cameras at key locations in shopping malls, capture faces and bodies through the cameras, identify and cluster the images, and return the file ID if it already exists. If not, it determines whether it meets the filing requirements. If not, it is discarded. If it is, a new file is created and returned with a unique ID, realizing the one-person-one-file function. The current solution is a real-time archiving strategy, which matches one by one in chronological order. If there is no match, it is discarded or added. The recall rate of this solution is low, and it is easy to cause multiple files for one person or lose valid tracks, resulting in low archiving accuracy. Summary of the Invention
[0003] The embodiment of the present invention provides a personnel data archiving method, aiming to solve the problems of low recall rate and low accuracy in existing data archiving.
[0004] In a first aspect, an embodiment of the present invention provides a method for archiving personnel data, the method comprising:
[0005] Get personnel data to be archived;
[0006] Determining a target archiving rule and a target archiving library based on the personnel data categories included in the personnel data to be archived;
[0007] Based on the target archiving rule and the target archiving library, personnel data archiving processing is performed on the personnel data to be archived to generate an archiving result of the personnel data to be archived.
[0008] Optionally, determining a target archiving rule and a target archiving library based on the personnel data category included in the personnel data to be archived includes:
[0009] If the personnel data to be archived includes facial data to be archived, determining facial archiving rules and a facial archiving library;
[0010] If the personnel data to be archived include human body data to be archived, human body archiving rules and a human body archiving library are determined.
[0011] Optionally, performing personnel data archiving processing on the personnel data to be archived based on the target archiving rule and the target archiving library to generate an archiving result of the personnel data to be archived includes:
[0012] Based on the face archiving rule and the face archiving library, performing face data archiving processing on the face data to be archived to generate a face archiving result of the face data to be archived;
[0013] Based on the human body archiving rule and the human body archiving library, performing human body data archiving processing on the human body data to be archived to generate a human body archiving result of the human body data to be archived;
[0014] Based on the preset time and space conditions, the face and body archiving results are reconnected according to the face archiving results and the body archiving results to generate the face and body archiving results.
[0015] Optionally, performing face data archiving processing on the face data to be archived based on the face archiving rule and the face archiving library to generate a face archiving result of the face data to be archived includes:
[0016] Determining whether the facial data to be archived is high-quality facial data;
[0017] If the face data to be archived is high-quality face data, searching the daily database for matching face data that matches the high-quality face data, where the daily database is a face archive database that is archived on the same day as the personnel data to be archived;
[0018] If daily database matching face data that matches the high-quality face data is searched in the daily database, the daily database archive ID corresponding to the daily database matching face data that matches the high-quality face data will be used as the archive ID of the high-quality face data, and the high-quality face data will be included in the archive corresponding to the daily database archive ID.
[0019] Optionally, performing face data archiving processing on the face data to be archived based on the face archiving rule and the face archiving library to generate a face archiving result of the face data to be archived further includes:
[0020] If the daily database does not match the daily database matching face data, searching the total database matching face data that matches the high-quality face data in the total database of face archives;
[0021] If the face data matching the total database is found in the total database of face archives, the total database archive ID corresponding to the matching face data is used as the archive ID of the high-quality face data, a new archive record of the total database archive ID is added to the daily database, and the high-quality face data is included in the archive corresponding to the daily database archive ID;
[0022] If no matching face data is found in the total face archive library, a new file is added to both the daily database and the total face archive library, and a new file ID is generated accordingly, and the high-quality face data is included in the new file.
[0023] Optionally, performing human body data archiving processing on the human body data to be archived based on the human body archiving rule and the human body archiving library to generate a human body archiving result of the human body data to be archived includes:
[0024] Searching for similar human body data having a similarity with the human body data to be archived that is higher than a preset threshold value in human body data captured by the same camera device as that used to capture the human body data to be archived within a preset time period, and if the similar human body data exists in the human body data captured by the same camera device as that used to capture the human body data to be archived within the preset time period, archiving the human body based on the similar human body data;
[0025] If the human body data captured by the same camera device as the one that captured the data of the person to be archived within a preset time period do not contain the similar human body data, then search for similar cross-domain human body data within a short period of time in a neighboring camera; if the similar cross-domain human body data exists within a short period of time in the neighboring camera, then perform human body archiving based on the similar cross-domain human body data, where the neighboring camera is a camera device within a preset geographical range as the same camera device;
[0026] If the cross-domain similar human body data does not exist in the neighboring mirror within a short period of time, a new file is created for the human body data to be archived, and a new file ID is generated at the same time.
[0027] Optionally, the preset spatiotemporal conditions include a preset time and a preset space, and the face and body reconnection is performed based on the face archiving result and the body archiving result based on the preset spatiotemporal conditions to generate the face and body archiving result, including:
[0028] Extracting face archive results and body archive results within a preset time and preset space;
[0029] Traversing the face archive library within the preset time and the preset space, and extracting the associated body data corresponding to the face data in the face archive library;
[0030] Traversing the human body data to be reconnected to determine whether there is similar human body data to be reconnected corresponding to the associated human body data; if so, determining whether the similar human body data to be reconnected belongs to human body data within the preset time and the preset space; if so, classifying the similar human body data to be reconnected into the face archiving library, wherein the human body data to be reconnected is human body data that cannot be archived according to the human body archiving rules and the human body archiving library;
[0031] If the similar human body data to be reconnected does not belong to the human body data within the preset time and the preset space, determining whether the similar human body data to be reconnected satisfies a limiting condition; if so, adding the similar human body data to be reconnected that satisfies the limiting condition to the candidate set to obtain candidate human body data;
[0032] The spatiotemporal trajectory corresponding to the associated human body data in the face archive is obtained, and the candidate human body data in the candidate set that meets the spatiotemporal trajectory is classified into the face archive.
[0033] In a second aspect, an embodiment of the present invention further provides a personnel data archiving device, the device comprising:
[0034] The acquisition module is used to obtain the personnel data to be archived;
[0035] a determination module, configured to determine a target archiving rule and a target archiving library based on the personnel data category contained in the personnel data to be archived;
[0036] The archiving module is used to perform personnel data archiving processing on the personnel data to be archived based on the target archiving rule and the target archiving library, and generate an archiving result of the personnel data to be archived.
[0037] In a third aspect, an embodiment of the present invention provides an electronic device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the computer program, the steps in the personnel data archiving method provided in the embodiment of the present invention are implemented.
[0038] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements the steps in the method for archiving personnel data provided in the embodiment of the invention.
[0039] In this embodiment of the present invention, personnel data to be archived is obtained; target archiving rules and a target archiving library are determined based on the personnel data categories contained in the personnel data to be archived; and based on the target archiving rules and the target archiving library, the personnel data to be archived is archived to generate archiving results for the personnel data to be archived. This allows for separate archiving based on faces and bodies, thereby effectively improving the recall and accuracy of data archiving. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0041] Figure 1 This is a flow chart of a personnel data archiving method provided by an embodiment of the present invention;
[0042] Figure 2 yes Figure 1 Step 103 in the embodiment provides a flow chart of a method;
[0043] Figure 3 yes Figure 2 Step 201 in the embodiment provides a flow chart of a method;
[0044] Figure 4 yes Figure 2 A flowchart of a method provided in step 202 of the embodiment;
[0045] Figure 5 This is a schematic structural diagram of a personnel data archiving device provided by an embodiment of the present invention;
[0046] Figure 6 yes Figure 5 A structural diagram provided by the archiving module in the embodiment;
[0047] Figure 7 yes Figure 6 A structural diagram of a face archiving unit provided in an embodiment;
[0048] Figure 8 yes Figure 6 A schematic diagram of a structure provided by the human body archiving unit in the embodiment;
[0049] Figure 9 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0051] See Figure 1 , Figure 1FIG. 1 is a flow chart of a method for archiving personnel data provided by an embodiment of the present invention. Figure 1 As shown, the method for archiving personnel data includes the following steps:
[0052] Step 101: Obtain personnel data to be archived.
[0053] Specifically, the above-mentioned personnel data to be archived may refer to personnel image data to be archived or personnel video data to be archived. The above-mentioned personnel data to be archived include facial data to be archived and body data to be archived. The above-mentioned facial data to be archived may refer to facial video data or facial image data to be archived, etc. The above-mentioned facial data to be archived may be obtained in real time, such as obtained by real-time capture and collection by a camera, or may be facial data stored in a database that needs to be archived. Of course, the above-mentioned body data to be archived may refer to body video data or body image data to be archived, etc. The above-mentioned body data to be archived may also be obtained in real time, such as obtained by real-time capture and collection by a camera, or may be body data stored in a database that needs to be archived.
[0054] It should be noted that when a camera captures facial data or body data of multiple people, the facial data to be archived may be multiple, and the body data to be archived may also be multiple. Of course, the multiple facial data and the multiple body data can be in the same image or in different images.
[0055] Step 102: Determine a target archiving rule and a target archiving library based on the personnel data category included in the personnel data to be archived.
[0056] The personnel data category may be facial data or body data. The target filing rule may be a facial filing rule or a body filing rule. The target filing library may be a facial filing library corresponding to the facial filing rule or a body filing library corresponding to the body filing rule.
[0057] Specifically, step 102 includes: if the personnel data to be archived includes face data to be archived, determining face archiving rules and a face archiving library; if the personnel data to be archived includes body data to be archived, determining body archiving rules and a body archiving library.
[0058] More specifically, when the personnel data to be archived is obtained, it is possible to detect whether there is facial data to be archived. For example, when an image of a person to be archived is obtained, face detection can be performed on the image to be archived. If a face is detected, it means that there is facial data to be archived in the image to be archived. If no face is detected, it means that there is no facial data to be archived in the image to be archived.
[0059] Of course, it is also possible to detect whether there is human body data to be archived. If a human body is detected, it means that there is human body data to be archived in the person image to be archived. If no human body is detected, it means that there is no human body data to be archived in the person image to be archived.
[0060] It should be noted that facial data and body data can exist simultaneously in the same person data.
[0061] When the person data to be archived is facial data, it is archived using the facial archiving rules and the facial archiving library. When the person data to be archived is body data, it is archived using the body archiving rules and the body archiving library. Of course, facial archiving can be prioritized, followed by body archiving. This ensures archiving accuracy.
[0062] Step 103: Based on the target archiving rule and the target archiving library, perform personnel data archiving processing on the personnel data to be archived, and generate an archiving result of the personnel data to be archived.
[0063] Specifically, such as Figure 2 As shown, step 103 includes:
[0064] Step 201: Based on the face archiving rules and the face archiving library, face data archiving processing is performed on the face data to be archived to generate a face archiving result for the face data to be archived.
[0065] Specifically, such as Figure 3 As shown, step 201 specifically includes the following steps:
[0066] Step 301: Determine whether the facial data to be archived is high-quality facial data.
[0067] Specifically, the high-quality facial data mentioned above refers to facial data that meets preset quality requirements, such as clear facial image data that can meet basic facial recognition requirements. It should be noted that high-quality facial data to be archived can effectively improve the recall rate and accuracy of data archiving.
[0068] In an embodiment of the present invention, when the data to be archived includes both facial data and body data of the same person, if the facial data to be archived is not high-quality, the facial archiving process can be abandoned and switched to the body data archiving process. This further improves the archiving recall and accuracy of the data.
[0069] Step 302: If the facial data to be archived is high-quality facial data, search the daily database for daily database matching facial data that matches the high-quality facial data.
[0070] The daily database is a face archive database that is archived on the same day as the personnel data to be archived, and can be a preset database for storing face files that have been successfully archived on that day.
[0071] Specifically, during the face archiving process, the high-quality face data can be compared with the face data that has been successfully archived in the daily database. Based on the comparison results, it can be determined whether there is face data in the daily database that matches the high-quality face data. If there is face data in the daily database that matches the high-quality face data, the face data will be determined as the daily database matching face data.
[0072] Of course, when comparing facial data in the daily database with high-quality facial data, we can determine whether they match by calculating their similarity. When the similarity meets the matching similarity threshold, we can determine that they are a match. The matching similarity value can be set based on the user's accuracy requirements.
[0073] Step 303: If daily database matching face data that matches the high-quality face data is searched in the daily database, the daily database archive ID corresponding to the daily database matching face data that matches the high-quality face data is used as the archive ID of the high-quality face data, and the high-quality face data is included in the archive corresponding to the daily database archive ID.
[0074] The daily archive ID is the archive ID of the archive corresponding to the facial data that has been successfully archived in the daily database. The facial data of the same person in the daily database uses the same daily archive ID. This ensures the uniqueness of each person's archive and prevents multiple archives for the same person.
[0075] Specifically, when it is determined that there is daily matching face data that matches the high-quality face data in the daily database, it can be determined that the face data to be archived has been archived before. It is only necessary to assign the daily database archive ID of the existing archive to the face data to be archived, and at the same time, directly classify the face data to be archived into the archive corresponding to the daily database archive ID, thereby realizing the face archiving of the face data to be archived.
[0076] It should be noted that the daily archive ID of the same person is unique. The daily database can store multiple people's archives, successfully archived data and corresponding daily archive IDs.
[0077] In this embodiment of the present invention, when archiving a face, data comparison is first performed in the daily database to archive the face. Since the daily database only stores the archived data and archived files for that day, the amount of search matching data is relatively small, thereby improving the efficiency of data archiving.
[0078] In the embodiment of the present invention, step 201 specifically further includes the following steps:
[0079] If there is no matching face data in the daily database, the total database matching face data that matches the high-quality face data is searched in the total database of face archives.
[0080] If matching face data is found in the face archive database, the database archive ID corresponding to the matching face data will be used as the archive ID of the high-quality face data. A new archive record of the database archive ID will be added to the daily database, and the high-quality face data will be included in the archive corresponding to the daily archive ID.
[0081] If there is no matching face data in the total face archive library, a new file will be added to both the daily database and the total face archive library, and a new file ID will be generated accordingly, and the high-quality face data will be included in the new file.
[0082] The face archive database may refer to the face archive database corresponding to the entire archiving system. The face archive database is used to store successfully archived data and files in the archiving system.
[0083] The above-mentioned database file ID is the file ID of the file corresponding to the facial data that has been successfully archived in the facial archive database. The facial data of the same person in the facial archive database uses the same database file ID. This ensures the uniqueness of each person's file and prevents the situation where one person has multiple files.
[0084] Specifically, during the face archiving process, if no corresponding file is found in the daily database, this may indicate that the face to be archived may have appeared for the first time that day and no corresponding file has been stored for that day. The high-quality face data can then be compared with the successfully archived face data in the face archive database. Based on the comparison results, it can be determined whether there is face data in the face archive database that matches the high-quality face data. If there is face data in the face archive database that matches the high-quality face data, the face data is determined to be the database matching face data.
[0085] Of course, when comparing facial data in the facial archive with high-quality facial data, we can also determine whether they match by calculating their similarity. When the similarity between the two meets the matching similarity, we can determine that they are a match. The matching similarity value can also be set according to the user's accuracy requirements.
[0086] If matching facial data is found in the facial archive database, it means that similar facial data to the high-quality facial data exists in the facial archive database, which also indirectly indicates that the high-quality facial data has been archived in the facial archive database. The archive information in the facial archive database is directly called and added to the daily database to obtain the archive record of the high-quality facial data in the daily database. At the same time, the archive ID corresponding to the matching facial data in the facial archive database is directly bound, and the high-quality facial data is classified into the archive corresponding to the archive ID. In this way, the archive that has been created in the facial archive database is recorded in the daily database, ensuring that the archives of the same person in the daily database and the facial archive database are the same.
[0087] Of course, if no facial data matching the high-quality facial data is found in either the daily database or the total facial archive, it can be further explained that neither the daily database nor the total facial archive has archival information regarding the high-quality facial data. In this case, a new archive can be re-created based on the high-quality facial data and a new archive ID can be generated, which will be stored in both the daily database and the total facial archive.
[0088] In an embodiment of the present invention, if no file corresponding to the face data to be archived is found in the daily database during the face archiving process, a further search can be performed in the overall face archive database. This avoids the situation where a new file is created after the corresponding file is not found in the daily database, which would cause duplication with files already created in the overall face archive database, further improving the accuracy and recall rate of face archiving. Of course, if no file exists in either the daily database or the overall face archive database, a new file is created for the face data to be archived and a new file ID is generated, further improving the recall rate of face archiving.
[0089] Step 202: Based on the human body archiving rules and the human body archiving library, perform human body data archiving processing on the human body data to be archived, and generate a human body archiving result of the human body data to be archived.
[0090] Specifically, when there is no face data in the personnel data to be archived, the human body data can be used for further archiving, so it is necessary to detect whether there is corresponding human body data in the personnel data to be archived. When the human body is detected, it means that there is human body data.
[0091] It should be noted that if the camera cannot capture a face, or the captured face is unclear and does not meet the face recognition requirements, but a complete human body image is captured, it can also be archived based on the captured human body.
[0092] More specifically, Figure 4 As shown, step 202 includes the following steps:
[0093] Step 401: Search for similar human body data whose similarity with the human body data to be archived is higher than a preset threshold value in the human body data captured by the same camera device as the human body data to be archived within a preset time period. If similar human body data exists in the human body data captured by the same camera device as the human body data to be archived within a preset time period, human body archiving is performed based on the similar human body data.
[0094] Step 402: If there is no similar human body data in the human body data captured by the same camera device as the human body data to be archived within a preset time period, search for cross-domain similar human body data in the adjacent camera within a short period of time. If there is cross-domain similar human body data in the adjacent camera within a short period of time, human body archiving is performed based on the cross-domain similar human body data.
[0095] The neighboring camera is a camera device that is within a preset geographical range of the same camera device.
[0096] Step 403: If there is no similar cross-domain human body data in the neighboring mirror within a short period of time, a new file is created for the human body data to be archived, and a new file ID is generated at the same time.
[0097] Among them, the human body data captured by the same camera device that captured the personnel data to be archived within a preset time period can refer to human body data captured under a single lens. Single lens means a single lens or a single camera. The above-mentioned adjacent lens is a camera device within a preset geographical range with the same camera device. It can be called an adjacent lens. The above-mentioned short time can be set according to actual requirements, such as a certain hour, a certain day, a certain week, a certain month, etc. The preset geographical range can be set according to the location distance, such as a certain road, a certain community, a certain urban area, etc.
[0098] More specifically, human body data captured by the same camera device as the person data to be archived within a preset time period is searched and compared with the human body data to be archived. If similar human body data is found, the similar human body data is associated and archived. This reduces noise interference due to time constraints.
[0099] When no similar human body data is found in the human body data captured by the same camera device within a preset time period as that of the person data to be archived, the human body data of multiple adjacent shots within a short period of time can be combined for search and comparison with the human body data to be archived, so as to facilitate the search for similar cross-domain human body data and the association and archiving of similar cross-domain human body data of adjacent shots.
[0100] If similar human body data is not found under the single lens and adjacent lenses, a new file needs to be created for the human body data to be archived, and the human body data to be archived needs to be archived.
[0101] It should be noted that the data collected by each lens carries the lens ID of the lens when it is archived. Therefore, when searching for similar human body data of a single lens and adjacent lenses, it can be done based on the lens ID carried by each human body data.
[0102] In this embodiment of the present invention, a richer collection of multi-angle human body data from a single shot and adjacent shots can be provided, facilitating subsequent cross-border reconnection. Furthermore, by incorporating neighboring cross-border search, noise is reduced after temporal and spatial constraints, enabling better association and archiving of human body data from adjacent shots. If no similar human body data is found, a new file can be created and archived, further improving data recall and accuracy.
[0103] Step 203: Based on the preset time and space conditions, the face and body archiving results are reconnected to generate the face and body archiving results.
[0104] Specifically, the preset time and space conditions include a preset time and a preset space. Step 203 further includes the following steps:
[0105] Extract the face archive results and body archive results within the preset time and preset space.
[0106] Traverse the face archive library within a preset time and preset space, and extract the associated body data corresponding to the face data in the face archive library.
[0107] Traverse the human body data to be reconnected to see if there is similar human body data to be reconnected corresponding to the associated human body data. If so, determine whether the similar human body data to be reconnected belongs to human body data within a preset time and a preset space. If so, classify the similar human body data to be reconnected into the face archive library. The human body data to be reconnected is human body data that cannot be archived according to the human body archiving rules and the human body archive library.
[0108] If the similar human body data to be reconnected does not belong to the human body data within the preset time and preset space, it is determined whether the similar human body data to be reconnected meets a limited condition. If so, the similar human body data to be reconnected that meets a limited condition is added to the alternative set to obtain alternative human body data.
[0109] The spatiotemporal trajectory corresponding to the associated human body data in the face archive library is obtained, and the candidate human body data in the candidate set that meets the spatiotemporal trajectory is classified into the face archive library.
[0110] The preset time and preset space can be manually set based on actual needs. The preset space can be set based on the lens ID of the human body data. The face archive library is a face archive library established within the preset time and preset space. The associated human body data is the human body data associated with the facial data in the face archive library. It should be noted that when a person's face is successfully archived, the human body data associated with that face is also included in the face archive library.
[0111] The above-mentioned human body data to be reconnected is human body data that cannot be archived for face or cannot be directly archived for body in the data to be archived.
[0112] The similar human body data to be reconnected may be human body data similar to the human body data associated with the face data in the face archive library in the human body data to be reconnected. There may be multiple similar human body data to be reconnected.
[0113] The above-mentioned alternative set is used to store similar human body data to be reconnected that cannot be archived through the above-mentioned embodiments. The above-mentioned one limiting condition includes a time and space restriction condition. For example, when the time and space between the similar human body data to be reconnected and the human body data in the existing archive are far apart, the similar human body data to be reconnected that meets the time and space restriction condition can be included in the corresponding archive.
[0114] More specifically, in the successfully archived face archive library, each face data is associated with successfully archived human body data. When only human body data in the data to be archived cannot be archived for face, and human body archiving cannot be performed directly, human body data archiving can be achieved based on the human body data associated with the face data in the face archive library. If similar human body data to be reconnected exists in the traversed human body data to be reconnected, and human body data in the similar human body data to be reconnected meets the preset time and preset space, then all similar human body data to be reconnected that meet the preset time and preset space can be included in the face archive library.
[0115] Of course, similar human data to be reconnected that cannot be successfully archived by combining both the face archiving results and the human body archiving results will be added to the candidate set. Then, the candidate human data in the candidate set will be archived by comparing the spatiotemporal trajectories corresponding to the associated human data in the face archiving library. This avoids archiving human data that may have a distant spatiotemporal trajectory due to human angle or position issues, further improving the recall rate and accuracy of human data.
[0116] In this embodiment of the present invention, human body archiving can be performed based on human body data associated with facial data in a face archiving library within a preset time and space. This solves the problem of archiving human body data that cannot be archived directly using facial data, and further improves the recall rate and accuracy of data archiving.
[0117] In an embodiment of the present invention, personnel data to be archived is obtained; based on the personnel data categories contained in the personnel data to be archived, a target archiving rule and a target archiving library are determined; and based on the target archiving rule and the target archiving library, the personnel data to be archived is archived to generate an archiving result for the personnel data to be archived. This allows for separate archiving based on faces and bodies, thereby effectively improving the recall and accuracy of data archiving.
[0118] It is understandable that in the specific implementation of this application, when it comes to personnel data, facial data, body data and other related data to be archived, when the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data, as well as the construction, training and use of facial archives, body archives and daily databases need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0119] It should be noted that the personnel data archiving method provided in the embodiment of the present invention can be applied to devices such as smart phones, computers, servers, etc. that can archive personnel data.
[0120] Optional, see Figure 5 , Figure 5 FIG. 1 is a schematic diagram of a structure of a personnel data archiving device provided by an embodiment of the present invention. Figure 5 As shown, the personnel data archiving device 500 includes:
[0121] Acquisition module 501, used to acquire personnel data to be archived;
[0122] A determination module 502 is configured to determine a target archiving rule and a target archiving library based on the personnel data category included in the personnel data to be archived;
[0123] The archiving module 503 is configured to perform personnel data archiving processing on the personnel data to be archived based on the target archiving rule and the target archiving library, and generate an archiving result of the personnel data to be archived.
[0124] Optionally, the determining module 502 includes:
[0125] a first determining unit, configured to determine a face archiving rule and a face archiving library if the personnel data to be archived includes face data to be archived;
[0126] The second determining unit is configured to determine a human body archiving rule and a human body archiving library if the personnel data to be archived include human body data to be archived.
[0127] Optional, such as Figure 6 As shown, the archiving module 503 includes:
[0128] The face archiving unit 5031 is used to perform face data archiving processing on the face data to be archived based on the face archiving rules and the face archiving library, and generate a face archiving result for the face data to be archived;
[0129] The human body archiving unit 5032 is used to perform human body data archiving processing on the human body data to be archived based on the human body archiving rules and the human body archiving library, and generate a human body archiving result of the human body data to be archived;
[0130] The face and body archiving unit 5033 is used to reconnect the face and body archiving results based on the preset time and space conditions and generate the face and body archiving results.
[0131] Optional, such as Figure 7 As shown, the face archiving unit 5031 includes:
[0132] The first judgment subunit 50311 is used to judge whether the facial data to be archived is high-quality facial data;
[0133] The first search subunit 50312 is configured to search a daily database for matching facial data that matches the high-quality facial data if the facial data to be archived is high-quality facial data. The daily database is a facial archive database that is archived on the same day as the person data to be archived.
[0134] The face archiving subunit 50313 is used to use the daily database archive ID corresponding to the daily database matching face data that matches the high-quality face data as the archive ID of the high-quality face data if daily database matching face data that matches the high-quality face data is searched in the daily database, and the high-quality face data is classified into the archive corresponding to the daily database archive ID.
[0135] Optionally, the face archiving unit 5031 further includes:
[0136] The second search subunit is configured to search the total database for matching face data that matches the high-quality face data in the total database of face archives if no matching face data in the daily database is found;
[0137] The first newly added subunit is used to, if matching face data is found in the face archive database, use the database archive ID corresponding to the matching face data as the archive ID of the high-quality face data, add a new archive record of the database archive ID in the daily database, and classify the high-quality face data into the archive corresponding to the daily database archive ID;
[0138] The second newly added sub-unit is used to add new files to both the daily database and the total face archive library if no matching face data is found in the total face archive library, and to generate new file IDs accordingly, and to classify high-quality face data into the new files.
[0139] Optional, such as Figure 8 As shown, the human body archiving unit 5032 includes:
[0140] The third search subunit 50321 is configured to search for similar human body data having a similarity with the human body data to be archived greater than a preset threshold value in human body data captured by the same camera device as the human body data to be archived within a preset time period, and if similar human body data exists in the human body data captured by the same camera device as the human body data to be archived within the preset time period, archiving the human body based on the similar human body data;
[0141] A neighboring camera search unit 50322 is configured to search for similar cross-domain human data in a short period of time in a neighboring camera if no similar human data exists in human data captured by the same camera device as the human data to be archived within a preset time period. If similar cross-domain human data exists in a short period of time in the neighboring camera, human archiving is performed based on the similar cross-domain human data. A neighboring camera is a camera device within a preset geographical range as the same camera device.
[0142] A subunit 50323 is established to create a new file for the human body data to be archived if there is no similar cross-domain human body data in the neighboring mirror within a short period of time, and to generate a new file ID at the same time.
[0143] Optionally, the preset time and space conditions include a preset time and a preset space, and the face and body archiving unit 5033 includes:
[0144] A first extraction subunit is used to extract face filing results and body filing results within a preset time and a preset space;
[0145] A second extraction subunit is used to traverse the face archive library within a preset time and a preset space, and extract the associated body data corresponding to the face data in the face archive library;
[0146] The second judgment subunit is used to traverse the human body data to be reconnected to see whether there is similar human body data to be reconnected corresponding to the associated human body data. If so, it is determined whether the similar human body data to be reconnected belongs to human body data within a preset time and a preset space. If so, the similar human body data to be reconnected is classified into a face archiving library, and the human body data to be reconnected is human body data that cannot be archived according to the human body archiving rules and the human body archiving library;
[0147] an adding subunit, configured to determine whether the similar human body data to be reconnected satisfies a limiting condition if the similar human body data to be reconnected does not belong to human body data within a preset time and a preset space, and if so, add the similar human body data to be reconnected that satisfies a limiting condition to a candidate set to obtain candidate human body data;
[0148] The acquisition subunit is used to obtain the spatiotemporal trajectory corresponding to the associated human body data in the face archive library, and classify the candidate human body data in the candidate set that meets the spatiotemporal trajectory into the face archive library.
[0149] It should be noted that the personnel data archiving device 500 provided in the embodiment of the present invention can be applied to devices such as smart phones, computers, servers, etc. that can archive personnel data.
[0150] The personnel data archiving device 500 provided in the embodiment of the present invention can implement each process implemented by the personnel data archiving method in the above method embodiment and can achieve the same beneficial effects. To avoid repetition, it will not be described here.
[0151] See also Figure 9 , Figure 9 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention, such as Figure 9 As shown, the electronic device 600 includes: a memory 602, a processor 601, and a computer program for a personnel data archiving method stored in the memory 602 and executable on the processor 601, wherein:
[0152] The processor 601 is configured to call the computer program stored in the memory 602 and execute the following steps:
[0153] Get personnel data to be archived;
[0154] Determine target archiving rules and target archiving library based on the personnel data categories included in the personnel data to be archived;
[0155] Based on the target archiving rules and the target archiving library, personnel data to be archived are processed to generate an archiving result of the personnel data to be archived.
[0156] The personnel data archiving method according to claim 1, wherein determining a target archiving rule and a target archiving library based on the personnel data category contained in the personnel data to be archived comprises:
[0157] If the personnel data to be archived includes facial data to be archived, determining facial archiving rules and a facial archiving library;
[0158] If the personnel data to be archived include human body data to be archived, human body archiving rules and a human body archiving library are determined.
[0159] Optionally, the processor 601 performs personnel data archiving processing based on the target archiving rule and the target archiving library to generate an archiving result of the personnel data to be archived, including:
[0160] Based on the face archiving rules and the face archiving library, face data archiving processing is performed on the face data to be archived, and a face archiving result of the face data to be archived is generated;
[0161] Based on the human body archiving rules and the human body archiving library, performing human body data archiving processing on the human body data to be archived, and generating a human body archiving result of the human body data to be archived;
[0162] Based on the preset time and space conditions, the face and body archiving results are reconnected according to the face archiving results and the body archiving results to generate the face and body archiving results.
[0163] Optionally, the processor 601 performs face data archiving processing on the face data to be archived based on the face archiving rule and the face archiving library to generate a face archiving result for the face data to be archived, including:
[0164] Determine whether the facial data to be archived is high-quality facial data;
[0165] If the face data to be archived is high-quality face data, then search the daily database for matching face data that matches the high-quality face data. The daily database is a face archive database that is archived on the same day as the personnel data to be archived.
[0166] If daily database matching face data that matches the high-quality face data is searched in the daily database, the daily database archive ID corresponding to the daily database matching face data that matches the high-quality face data will be used as the archive ID of the high-quality face data, and the high-quality face data will be included in the archive corresponding to the daily database archive ID.
[0167] Optionally, the processor 601 performs face data archiving processing on the face data to be archived based on the face archiving rule and the face archiving library to generate a face archiving result for the face data to be archived, and further includes:
[0168] If no matching face data is found in the daily database, the total database of face archives is searched for matching face data that matches the high-quality face data;
[0169] If matching face data is found in the face archive database, the database archive ID corresponding to the matching face data will be used as the archive ID of the high-quality face data. A new archive record of the database archive ID will be added to the daily database, and the high-quality face data will be included in the archive corresponding to the daily database archive ID.
[0170] If there is no matching face data in the total face archive library, a new file will be added to both the daily database and the total face archive library, and a new file ID will be generated accordingly, and the high-quality face data will be included in the new file.
[0171] Optionally, the processor 601 performs human body data archiving processing based on the human body archiving rule and the human body archiving library to generate a human body archiving result of the human body data to be archived, including:
[0172] Searching for similar human body data having a similarity with the human body data to be archived that is higher than a preset threshold value in human body data captured by the same camera device as that capturing the human body data to be archived within a preset time period; if similar human body data exists in the human body data captured by the same camera device as that capturing the human body data to be archived within the preset time period, archiving the human body based on the similar human body data;
[0173] If there is no similar human body data in the human body data captured by the same camera device within a preset time period as the human body data to be archived, then search for similar cross-domain human body data in a short period of time in the neighboring mirror. If there is similar cross-domain human body data in a short period of time in the neighboring mirror, human body archiving is performed based on the similar cross-domain human body data. The neighboring mirror is a camera device within a preset geographical range with the same camera device.
[0174] If there is no similar cross-domain human body data in the neighboring mirror within a short period of time, a new file will be created for the human body data to be archived, and a new file ID will be generated at the same time.
[0175] Optionally, the preset spatiotemporal conditions include a preset time and a preset space, and the processor 601 performs face-body reconnection based on the face archiving result and the body archiving result based on the preset spatiotemporal conditions to generate the face-body archiving result, including:
[0176] Extracting face archive results and body archive results within a preset time and preset space;
[0177] Traverse the face archive library within a preset time and preset space, and extract the associated body data corresponding to the face data in the face archive library;
[0178] Traverse the human body data to be reconnected to see if there is similar human body data to be reconnected corresponding to the associated human body data. If so, determine whether the similar human body data to be reconnected belongs to human body data within a preset time and a preset space. If so, classify the similar human body data to be reconnected into the face archive library. The human body data to be reconnected is human body data that cannot be archived according to the human body archiving rules and the human body archiving library.
[0179] If the similar human body data to be reconnected does not belong to human body data within a preset time and a preset space, determining whether the similar human body data to be reconnected satisfies a limiting condition; if so, adding the similar human body data to be reconnected that satisfies a limiting condition to a candidate set to obtain candidate human body data;
[0180] The spatiotemporal trajectory corresponding to the associated human body data in the face archive library is obtained, and the candidate human body data in the candidate set that meets the spatiotemporal trajectory is classified into the face archive library.
[0181] It should be noted that the electronic device 600 provided in the embodiment of the present invention can be applied to devices such as smart phones, computers, servers, etc. that can perform data archiving.
[0182] The electronic device 600 provided in the embodiment of the present invention can implement each process of the personnel data archiving method in the above method embodiment and can achieve the same beneficial effects. To avoid repetition, it will not be described here.
[0183] An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements the various processes of the personnel data archiving method or the application-side personnel data archiving method provided in the embodiment of the present invention, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0184] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0185] The above disclosure is merely a preferred embodiment of the present invention and certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A method for archiving personnel data, characterized in that: The following steps are involved: Get personnel data to be archived; Determining a target archiving rule and a target archiving library based on the personnel data categories included in the personnel data to be archived, wherein the personnel data categories are face data and body data; Based on the target archiving rule and the target archiving library, performing personnel data archiving processing on the personnel data to be archived to generate an archiving result of the personnel data to be archived; The determining of a target archiving rule and a target archiving library based on the personnel data category contained in the personnel data to be archived includes: If the personnel data to be archived includes facial data to be archived, determining facial archiving rules and a facial archiving library; If the personnel data to be archived includes human body data to be archived, determining a human body archiving rule and a human body archiving library; The step of performing personnel data archiving processing on the personnel data to be archived based on the target archiving rule and the target archiving library to generate an archiving result of the personnel data to be archived includes: Based on the face archiving rule and the face archiving library, performing face data archiving processing on the face data to be archived to generate a face archiving result of the face data to be archived; Based on the human body archiving rule and the human body archiving library, performing human body data archiving processing on the human body data to be archived to generate a human body archiving result of the human body data to be archived; Based on the preset time and space conditions, the face and body archiving results are reconnected according to the face archiving results and the body archiving results to generate the face and body archiving results; The preset spatiotemporal conditions include a preset time and a preset space, and the face and body archiving results are reconnected based on the face archiving results and the body archiving results to generate the face and body archiving results based on the preset spatiotemporal conditions, including: Extracting face archive results and body archive results within a preset time and preset space; Traversing the face archive library within the preset time and the preset space, and extracting the associated body data corresponding to the face data in the face archive library; Traversing the human body data to be reconnected to determine whether there is similar human body data to be reconnected corresponding to the associated human body data; if so, determining whether the similar human body data to be reconnected belongs to human body data within the preset time and the preset space; if so, classifying the similar human body data to be reconnected into the face archiving library, wherein the human body data to be reconnected is human body data that cannot be archived according to the human body archiving rules and the human body archiving library; If the similar human body data to be reconnected does not belong to the human body data within the preset time and the preset space, determining whether the similar human body data to be reconnected satisfies a limiting condition; if so, adding the similar human body data to be reconnected that satisfies the limiting condition to the candidate set to obtain candidate human body data; The spatiotemporal trajectory corresponding to the associated human body data in the face archive is obtained, and the candidate human body data in the candidate set that meets the spatiotemporal trajectory is classified into the face archive.
2. The method for archiving personnel data according to claim 1, wherein: The step of performing face data archiving processing on the face data to be archived based on the face archiving rule and the face archiving library to generate a face archiving result of the face data to be archived includes: Determining whether the facial data to be archived is high-quality facial data; If the face data to be archived is high-quality face data, searching the daily database for matching face data that matches the high-quality face data, where the daily database is a face archive database that is archived on the same day as the personnel data to be archived; If daily database matching face data that matches the high-quality face data is searched in the daily database, the daily database archive ID corresponding to the daily database matching face data that matches the high-quality face data will be used as the archive ID of the high-quality face data, and the high-quality face data will be included in the archive corresponding to the daily database archive ID.
3. The method for archiving personnel data according to claim 2, wherein: The step of performing face data archiving processing on the face data to be archived based on the face archiving rule and the face archiving library to generate a face archiving result of the face data to be archived further includes: If the daily database does not match the daily database matching face data, searching the total database matching face data that matches the high-quality face data in the total database of face archives; If the face data matching the total database is found in the total database of face archives, the total database archive ID corresponding to the matching face data is used as the archive ID of the high-quality face data, a new archive record of the total database archive ID is added to the daily database, and the high-quality face data is included in the archive corresponding to the daily database archive ID; If no matching face data is found in the total face archive library, a new file is added to both the daily database and the total face archive library, and a new file ID is generated accordingly, and the high-quality face data is included in the new file.
4. The method for archiving personnel data according to claim 1, wherein: The step of performing human body data archiving processing on the human body data to be archived based on the human body archiving rule and the human body archiving library to generate a human body archiving result of the human body data to be archived includes: Searching for similar human body data having a similarity with the human body data to be archived that is higher than a preset threshold value in human body data captured by the same camera device as that used to capture the human body data to be archived within a preset time period, and if the similar human body data exists in the human body data captured by the same camera device as that used to capture the human body data to be archived within the preset time period, archiving the human body based on the similar human body data; If the human body data captured by the same camera device as the one that captured the data of the person to be archived within a preset time period do not contain the similar human body data, then search for similar cross-domain human body data within a short period of time in a neighboring camera; if the similar cross-domain human body data exists within a short period of time in the neighboring camera, then perform human body archiving based on the similar cross-domain human body data, where the neighboring camera is a camera device within a preset geographical range as the same camera device; If the cross-domain similar human body data does not exist in the neighboring mirror within a short period of time, a new file is created for the human body data to be archived, and a new file ID is generated at the same time.
5. A personnel data archiving device, characterized in that: The device comprises: The acquisition module is used to obtain the personnel data to be archived; a determination module, configured to determine a target archiving rule and a target archiving library based on the personnel data category contained in the personnel data to be archived; an archiving module, configured to perform personnel data archiving processing on the personnel data to be archived based on the target archiving rule and the target archiving library, and generate an archiving result of the personnel data to be archived; The modules to be determined include: a first determining unit, configured to determine a face archiving rule and a face archiving library if the personnel data to be archived includes face data to be archived; a second determining unit, configured to determine a human body archiving rule and a human body archiving library if the personnel data to be archived includes human body data to be archived; The archive modules include: A face archiving unit is used to perform face data archiving processing on the face data to be archived based on the face archiving rules and the face archiving library, and generate a face archiving result for the face data to be archived; A human body archiving unit, configured to perform human body data archiving processing on the human body data to be archived based on human body archiving rules and a human body archiving library, and generate a human body archiving result of the human body data to be archived; A face and body archiving unit, configured to reconnect the face and body archiving results based on the preset time and space conditions to generate a face and body archiving result; The preset spatiotemporal conditions include a preset time and a preset space. In the aspect of reconnecting the face and body according to the face archiving result and the body archiving result based on the preset spatiotemporal conditions to generate the face and body archiving result, the face and body archiving unit is specifically configured to: Extracting face archive results and body archive results within a preset time and preset space; Traversing the face archive library within the preset time and the preset space, and extracting the associated body data corresponding to the face data in the face archive library; Traversing the human body data to be reconnected to determine whether there is similar human body data to be reconnected corresponding to the associated human body data; if so, determining whether the similar human body data to be reconnected belongs to human body data within the preset time and the preset space; if so, classifying the similar human body data to be reconnected into the face archiving library, wherein the human body data to be reconnected is human body data that cannot be archived according to the human body archiving rules and the human body archiving library; If the similar human body data to be reconnected does not belong to the human body data within the preset time and the preset space, determining whether the similar human body data to be reconnected satisfies a limiting condition; if so, adding the similar human body data to be reconnected that satisfies the limiting condition to the candidate set to obtain candidate human body data; The spatiotemporal trajectory corresponding to the associated human body data in the face archive is obtained, and the candidate human body data in the candidate set that meets the spatiotemporal trajectory is classified into the face archive.
6. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method for archiving personnel data according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for archiving personnel data according to any one of claims 1 to 4.
Citation Information
Patent Citations
Personnel motion trail tracking method, device and system and electronic equipment
CN113033266A