Identity Recognition-Based Data Synchronization Method, Device, and Storage Medium
By hierarchically aggregating and matching the personnel information data in the identity identification system, the problem of inconsistency between server and client data is solved, the efficiency and consistency of data synchronization are improved, and the accuracy of identity identification is enhanced.
Patent Information
- Application Number
- CN202310788824.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2043-06-29
AI Technical Summary
In the identity identification system, data inconsistency between the monitoring platform server and the identity identification terminal leads to inefficient data synchronization and the inability to confirm a large amount of data in a timely manner, affecting the effectiveness of identity identification.
By hierarchically aggregating the personnel information data, a data summary at multiple data levels is obtained, and a matching process is performed between the server and the client. If there is inconsistency, data synchronization is performed to ensure the consistency of the data.
It improves the efficiency of data synchronization between the server and the client, ensures the consistency of data synchronization, and enhances the accuracy and reliability of the identity identification system.
Smart Images

Figure CN117009435B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data transmission, and in particular to a data synchronization method, device and storage medium based on identity recognition. Background Art
[0002] With the development of Internet technology, identity recognition technology has been applied in many scenarios. For example, the monitoring platform server sends personnel information to several identity recognition terminals (clients) respectively. The terminals will match the collected facial images with the received personnel information to realize identity recognition.
[0003] However, if there are too many identities to be identified, the amount of data involved will naturally be difficult to estimate. Inconsistency may occur between the monitoring platform server and the identity recognition terminal. The data synchronization between the server and the client is inefficient, and large amounts of data cannot be confirmed in a timely manner, resulting in the terminal being unable to effectively perform identity recognition. Summary of the invention
[0004] The present application at least provides a data synchronization method, apparatus, device and computer-readable storage medium based on identity recognition.
[0005] In a first aspect, the present application provides a data synchronization method based on identity recognition, comprising: performing hierarchical aggregation processing on the acquired personnel information data to obtain data summaries of multiple data levels, wherein the data levels include data rows, data clusters and data tables, the data tables include at least one data cluster, the data clusters include at least one data row, and the data summaries include row summaries corresponding to the data rows, cluster summaries corresponding to the data clusters and table summaries corresponding to the data tables; sending the personnel information data to a target client, wherein the target client performs hierarchical aggregation processing based on the received personnel information data to obtain data summaries to be matched at each data level; matching the row summaries corresponding to the data rows, the cluster summaries corresponding to the data clusters and the table summaries corresponding to the data tables with the corresponding row summaries to be matched, the cluster summaries to be matched and the table summaries to be matched in the data summaries to be matched returned by the target client in the hierarchical order of the data rows, the data clusters and the data tables to obtain matching results; if there is inconsistency between the target data summary in the matching result and the data summary to be matched returned by the target client, the personnel information data corresponding to the data level where the target data summary is located is sent to the target client for data synchronization.
[0006] In one embodiment, the personnel information data includes an identity data table and a face image that matches the identity data in the identity data table. The step of performing hierarchical aggregation processing on the obtained personnel information data to obtain data summaries at multiple data levels includes: aggregating the identity data in the identity data table to obtain at least one cluster of data clusters, where each data cluster includes at least one row of the identity data; respectively performing data summary processing on each row of identity data in the data cluster and the face image corresponding to each row of identity data to obtain at least one row summary and an image summary corresponding to the row summary; determining a cluster summary of the data cluster based on the row summary and the image summary in the data cluster, and determining a table summary of the identity data table based on the cluster summaries of each data cluster.
[0007] In one embodiment, the step of respectively matching the row summary corresponding to the data row, the cluster summary corresponding to the data cluster, and the table summary corresponding to the data table with the corresponding to-be-matched row summary, to-be-matched cluster summary, or to-be-matched table summary in the to-be-matched data summary returned by the target client in the hierarchical order of the data row, data cluster, and data table to obtain a matching result includes: if a to-be-matched row summary returned by the target client is received, determining whether the row summary and the to-be-matched row summary match to obtain the matching result; if a to-be-matched cluster summary returned by the target client is received, determining whether the cluster summary and the to-be-matched cluster summary match to obtain the matching result; if a to-be-matched table summary returned by the target client is received, determining whether the table summary and the to-be-matched table summary match to obtain the matching result.
[0008] In one embodiment, the step of respectively performing data summary processing on each row of identity data in the data cluster and the face image corresponding to each row of identity data includes: obtaining a random string corresponding to each row of identity data; performing data summary processing on the corresponding identity data based on the random string to obtain a row summary corresponding to each row of identity data; performing data summary processing on the corresponding face image based on the random string to obtain an image summary corresponding to the face image.
[0009] In one embodiment, the method further includes: if it is detected that the current running state and / or the running state of the target client is an idle state, sending a random digest confirmation request to the target client, so that the target client returns the data digest to be matched corresponding to the random digest confirmation request received by the target client; performing matching processing on the row digest corresponding to the data row, the cluster digest corresponding to the data cluster, and the table digest corresponding to the data table in the hierarchical order of the data row, data cluster, and data table with the data digest to be matched returned by the target client received, to obtain a random matching result; and performing data synchronization on the target client based on the random matching result.
[0010] In one embodiment, the method is applied to a target client, and the method includes: based on the personnel information data sent by the server received, hierarchically aggregating the personnel information data to obtain data digests to be matched at multiple data levels, where the data levels include data rows, data clusters, and data tables, the data table includes at least one data cluster, the data cluster includes at least one data row, and the data digests to be matched include the row digest to be matched corresponding to the data row, the cluster digest to be matched corresponding to the data cluster, and the table digest to be matched corresponding to the data table; sending the row digest to be matched, the cluster digest to be matched, or the table digest to be matched in the data digest to be matched to the server, and the server performs matching processing on the row digest corresponding to the data row, the cluster digest corresponding to the data cluster, and the table digest corresponding to the data table in the server with the row digest to be matched, the cluster digest to be matched, and the table digest to be matched corresponding to the data digest to be matched received by the server in the hierarchical order of the data row, data cluster, and data table, to obtain a matching result; if it is received that there is a target data digest in the matching result sent by the server that is inconsistent with the data digest to be matched received by the server, data synchronization is performed based on the personnel information data corresponding to the data level where the target data digest is located sent by the server received.
[0011] In one embodiment, the personnel information includes an identity data table and a facial image matching the identity data in the identity data table. The step of hierarchically aggregating the personnel information data based on the personnel information data sent by the received server to obtain data summaries to be matched at multiple data levels includes: aggregating the identity data in the identity data table to obtain at least one data cluster, the data cluster including at least one row of the identity data, the identity data corresponding to the facial image; performing data summary processing on each row of identity data in the data cluster and the facial image corresponding to each row of identity data to obtain at least one row of row summary to be matched and a row of image summary to be matched corresponding to the row summary to be matched; determining the row summary to be matched of the data cluster based on the row summary to be matched and the image summary to be matched in the data cluster, and determining the table summary to be matched of the identity data table based on the row summary to be matched of each data cluster.
[0012] In one embodiment, the step of sending the to-be-matched row summary, to-be-matched cluster summary and to-be-matched table summary in the to-be-matched data summary to the server includes: if a row of identity data in the identity data table sent by the server is received, sending the to-be-matched row summary of the row of identity data to the server for matching; if identity data of all rows in a cluster of data clusters is received, sending the to-be-matched cluster summary of the cluster of data clusters to the server for matching; if identity data of all clusters in the identity data table is received, sending the to-be-matched table summary of the identity data table to the server for matching.
[0013] The second aspect of the present application provides a data synchronization device based on identity recognition. The device is arranged on the server side and includes: a first hierarchical aggregation module, configured to perform hierarchical aggregation processing on the obtained personnel information data to obtain data summaries of multiple data levels. The data levels include data rows, data clusters, and data tables. The data table includes at least one data cluster, and the data cluster includes at least one data row. The data summary includes the row summary corresponding to the data row, the cluster summary corresponding to the data cluster, and the table summary corresponding to the data table; a first data sending module, configured to send the personnel information data to a target client, and the target client performs hierarchical aggregation processing on the received personnel information data to obtain the to-be-matched data summaries of each data level; a first data matching module, configured to sequentially match the row summary corresponding to the data row, the cluster summary corresponding to the data cluster, and the table summary corresponding to the data table with the to-be-matched row summary, to-be-matched cluster summary, and to-be-matched table summary in the to-be-matched data summaries returned by the target client in the hierarchical order of the data row, data cluster, and data table to obtain a matching result; a first data synchronization module, configured to, if there is a target data summary in the matching result that is inconsistent with the to-be-matched data summary returned by the target client, send the personnel information data corresponding to the data level where the target data summary is located to the target client for data synchronization.
[0014] The present application further provides a data synchronization device based on identity recognition. The device is arranged on the client side and includes: a second hierarchical aggregation module, configured to perform hierarchical aggregation on the personnel information data based on the personnel information data sent by the server side received, to obtain the to-be-matched data summaries of multiple data levels. The data levels include data rows, data clusters, and data tables. The data table includes at least one data cluster, and the data cluster includes at least one data row. The to-be-matched data summary includes the to-be-matched row summary corresponding to the data row, the to-be-matched cluster summary corresponding to the data cluster, and the to-be-matched table summary corresponding to the data table; a second data sending module, configured to send the to-be-matched row summary, to-be-matched cluster summary, or to-be-matched table summary in the to-be-matched data summaries to the server side, and the server side sequentially matches the row summary corresponding to the data row, the cluster summary corresponding to the data cluster, and the table summary corresponding to the data table in the server side with the to-be-matched row summary, to-be-matched cluster summary, and to-be-matched table summary in the to-be-matched data summaries received by the server side in the hierarchical order of the data row, data cluster, and data table to obtain a matching result; a second data synchronization module, configured to, if there is a target data summary in the matching result received from the server side that is inconsistent with the to-be-matched data summary received by the server side, perform data synchronization based on the personnel information data corresponding to the data level where the target data summary is located sent by the server side received.
[0015] In a third aspect of the present application, an electronic device is provided, including a memory and a processor, where the processor is configured to execute program instructions stored in the memory to implement the above-mentioned data synchronization method based on identity recognition.
[0016] In a fourth aspect of the present application, a computer-readable storage medium is provided, on which program instructions are stored, and when the program instructions are executed by a processor, the above-mentioned data synchronization method based on identity recognition is implemented.
[0017] In the above solution, the server hierarchically aggregates the obtained personnel information data to obtain data summaries at multiple data levels, realizing the streamlining of the personnel information data; the server sends the personnel information data to the client, and obtains the to-be-matched data summaries returned by the client after hierarchically aggregating the personnel information data; the server sequentially matches the data summaries at all levels of the server and the to-be-matched data summaries at all levels returned by the client according to the hierarchical order of the data levels, realizing the consistency verification of the data between the server and the client; the server sends the target data summary to the client, enabling the client to perform data synchronization processing on the data summaries that do not match the server based on the target data summary, thereby enabling data synchronization between the server and the client, ensuring the consistency of data synchronization and improving the efficiency of data synchronization.
[0018] It should be understood that the above general description and subsequent detailed description are only exemplary and explanatory, and do not limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification. These drawings illustrate embodiments consistent with the present application and, together with the specification, are used to explain the technical solutions of the present application.
[0020] Figure 1 It is a schematic flowchart of an exemplary embodiment in which the data synchronization method based on identity recognition of the present application is applied to a server;
[0021] Figure 2 It is a schematic structural diagram of hierarchically aggregating personnel information data in the present application;
[0022] Figure 3 It is a schematic flowchart of random data confirmation in the present application;
[0023] Figure 4 It is a schematic flowchart of an exemplary embodiment in which the data synchronization method based on identity recognition of the present application is applied to a target client;
[0024] Figure 5 It is a block diagram of a data synchronization device based on identity recognition provided in an exemplary embodiment of the present application and disposed on a server;
[0025] Figure 6 It is a block diagram of a data synchronization device based on identity recognition provided on a target client shown in an exemplary embodiment of the present application;
[0026] Figure 7 It is a schematic structural diagram of an embodiment of an electronic device of the present application;
[0027] Figure 8 It is a schematic structural diagram of an embodiment of a computer-readable storage medium of the present application. Detailed implementation manners
[0028] The solutions of the embodiments of the present application will be described in detail below with reference to the accompanying drawings of the specification.
[0029] In the following description, specific details such as specific system architectures, interfaces, and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the present application.
[0030] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after. In addition, "multiple" in this article means two or more than two. In addition, the term "at least one" in this article represents any one of multiple or any combination of at least two of multiple. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set composed of A, B, and C.
[0031] Please refer to Figure 1 , Figure 1 It is a schematic flowchart of an exemplary embodiment in which the identity recognition-based data synchronization method of the present application is applied to a server. Specifically, it may include the following steps:
[0032] Step S110: Perform hierarchical aggregation processing on the obtained personnel information data to obtain data summaries of multiple data levels. The data levels include data rows, data clusters, and data tables. The data table includes at least one data cluster, and the data cluster includes at least one data row. The data summary includes a row summary corresponding to the data row, a cluster summary corresponding to the data cluster, and a table summary corresponding to the data table.
[0033] The personnel information data refers to the data used for identity recognition, including the identity data table of the personnel and the face image of the personnel. The identity data in the identity data table matches the face image. It should be noted that in the identity recognition scenario, each row of identity data in the identity data table usually has a unique identifier.
[0034] Hierarchical aggregation refers to grouping or classifying personnel information data, and performing aggregation processing on the grouped or classified personnel information data respectively to form data with multiple hierarchical relationships. Among them, the aggregation processing includes data summarization processing, which refers to changing a message of any length into a short message of a fixed length (summary), such as Hash function, MD5, SHA1, and Base64 encoding, etc. It can not only encrypt the personnel information data, but also make the personnel information data more concise.
[0035] Exemplarily, reference can be made to Figure 2 , Figure 2 which is a schematic structural diagram of hierarchical aggregation processing of personnel information data in this application. The identity data in each row of the identity data table can be grouped based on a preset grouping threshold. For example, if the grouping threshold is 10, it means that every 10 rows of identity data in the identity data table form a group, and a group of data is equivalent to a cluster of data. That is, every time 10 rows of identity data are detected in the identity data table, they are grouped and aggregated into a data cluster; after all the identity data in the identity data table are grouped, multiple data levels are formed, including data rows, data clusters, and data tables. The data table includes data clusters, the data clusters include data rows, and a data row represents a row of identity data; performing summary processing on each row of identity data obtains the row summary of the data row corresponding to each row of identity data, and performing summary processing on the face image corresponding to each row of identity data obtains the image summary of the face image corresponding to each row of identity data; performing a preset summary splicing calculation on the row summaries and image summaries corresponding to all data rows in a cluster of data clusters obtains the cluster summary of the data cluster; after calculating the cluster summaries of all data clusters to which all identity data in the identity data table belong, a summary splicing calculation is performed according to the cluster summaries of all data clusters to obtain the table summary of the identity data table.
[0036] It should be noted that if the identity data is grouped until the last cluster, and the number of the remaining identity data is less than the preset first grouping threshold, or data loss occurs during the grouping process of the identity data, resulting in the number of data rows in the obtained data cluster being less than the first grouping threshold, in order to ensure the integrity of the summary calculation process, fixed data preset can be filled in the missing part of the data in the data cluster to replace the row summary of the data row at that position.
[0037] It should also be noted that the cluster summary of the data cluster can be further refined by defining multi-level cluster summaries; for ease of explanation, the cluster summary of the data cluster obtained by performing summary splicing calculation on the row summary based on the data row and the image summary of the face image is defined as the first-level cluster summary; based on a preset second grouping threshold, the first-level cluster summaries of the data clusters corresponding to the number of the second grouping threshold are subjected to summary splicing calculation to obtain the second-level cluster summary; similarly, the definition of the third-level cluster summary and the definition of the fourth-level cluster summary can be deduced, which will not be elaborated here; and the first grouping threshold and the second grouping threshold are only different in naming, and the first grouping threshold and the second grouping threshold can be the same or different, which is not limited here, but if the definition of the multi-level cluster summary is to be realized, the second grouping threshold should be less than the number of the first-level cluster summaries.
[0038] Step S120: Send the personnel information data to the target client, and the target client performs hierarchical aggregation processing on the received personnel information data to obtain the to-be-matched data summaries at each data level.
[0039] It should be noted that the process of the server performing hierarchical aggregation processing on the personnel information data and the process of the server sending the personnel information data to the target client do not conflict. Therefore, the execution order of step S120 and step S110 is not limited. Considering that the server needs to verify the to-be-matched data summaries returned by the target client, preferably, step S110 can be executed first.
[0040] It can be understood that, in order to facilitate the confirmation of data consistency between the server and the target client, the processing methods of the server and the target client for hierarchical aggregation processing and data summary processing of the personnel information data should be the same. Among them, it can be that the target client presets the same processing method as the server, or the server sends its processing method to the target client, or the target client obtains it from other preset databases or servers, which is not limited here.
[0041] Step S130: Match the row summary corresponding to the data row, the cluster summary corresponding to the data cluster, and the table summary corresponding to the data table with the to-be-matched row summary, the to-be-matched cluster summary, and the to-be-matched table summary in the to-be-matched data summaries returned by the target client in the hierarchical order of the data row, the data cluster, and the data table to obtain the matching result.
[0042] It can be understood that because the processing methods of the target client and the server for hierarchical aggregation of the personnel information data are the same, the to-be-matched data summaries returned by the target client naturally include the to-be-matched row summary, the to-be-matched cluster summary, and the to-be-matched table summary.
[0043] Exemplarily, reference can be continued to Figure 2For the data hierarchy shown, the row summary, cluster summary, and table summary are respectively and correspondingly matched with the to-be-matched row summary, to-be-matched cluster summary, and to-be-matched table summary returned by the target client in the hierarchical order of data rows, data clusters, and data tables to obtain a matching result.
[0044] It should be noted that, in combination with the foregoing embodiments, if a face recognition scenario is involved, the personnel information data includes face image data; hierarchical aggregation processing of the personnel information data can obtain a face summary of the face image corresponding to each row of identity data, and the face summary and the row summary match each other and belong to the same data hierarchy; and the client can naturally also obtain the to-be-matched face summary after performing hierarchical aggregation processing on the personnel information data; therefore, when matching the row summary and the to-be-matched row summary, the face summary and the to-be-matched face summary can also be correspondingly matched; after determining that the row summary and the to-be-matched row summary of the same identity data are consistent and the face summary and the to-be-matched face summary of the same face image corresponding to the identity data are consistent, it is only then that it is characterized that the personnel information data of this data row is consistent.
[0045] Step S140, if there is a target data summary in the matching result that is inconsistent with the to-be-matched data summary returned by the target client, then send the personnel information data corresponding to the data hierarchy where the target data summary is located to the target client for data synchronization.
[0046] Specifically, if a certain target data summary calculated by the server is inconsistent with a certain to-be-matched data summary returned by the target client correspondingly, it is characterized that the personnel information data corresponding to this data summary is inconsistent; therefore, send the personnel information data corresponding to the data hierarchy where the target data summary is located to the target client, so that the target client updates the personnel information data corresponding to the data hierarchy where the received target data summary is located to the corresponding data storage location in the target client to achieve data synchronization.
[0047] It can be seen that in the solution of this application, the server hierarchically aggregates the obtained personnel information data to obtain data summaries at multiple data hierarchies, realizing the refinement of the personnel information data; the server sends the personnel information data to the client to obtain the to-be-matched data summaries returned by the client after hierarchically aggregating the personnel information data; the server sequentially matches the data summaries at all levels of the server and the to-be-matched data summaries at all levels returned by the client according to the hierarchical order of the data hierarchies, realizing the consistency verification of the data between the server and the client; the server sends the target data summary to the client, enabling the client to perform data synchronization processing on the data summaries that do not match the server based on the target data summary, thereby being able to achieve data synchronization between the server and the client, ensuring the consistency of data synchronization and improving the efficiency of data synchronization.
[0048] Based on the above embodiments, the embodiments of the present application illustrate the steps of performing hierarchical aggregation processing on the obtained personnel information data to obtain data summaries at multiple data levels. The personnel information data includes an identity data table and face images that match the identity data in the identity data table. Specifically, the method of this embodiment includes the following steps:
[0049] Aggregate the identity data in the identity data table to obtain at least one cluster of data clusters, where each data cluster includes at least one row of identity data; perform data summary processing on each row of identity data and the corresponding face image in each data cluster respectively to obtain at least one row summary and the image summary corresponding to the row summary; determine the cluster summary of the data cluster based on the row summary and image summary in the data cluster, and determine the table summary of the identity data table based on the cluster summaries of each data cluster.
[0050] It can be understood that in related scenarios of face recognition (such as attendance punching, face unlocking, etc.), if it is necessary to verify the personnel information data, it will involve the matching of identity data and the matching of face images.
[0051] Illustrated in combination with the foregoing embodiments, the identity data is grouped with a preset grouping threshold, and each group of identity data after grouping is aggregated into a cluster of data clusters, and each data cluster should include at least one row of identity data; perform data summary processing on each row of identity data and the corresponding face image in each cluster of data clusters respectively to obtain the row summary corresponding to each row of identity data and the image summary corresponding to the face image. Among them, the row summary and the image summary match each other based on the corresponding relationship between the identity data and the face image; perform a preset summary splicing calculation on the row summary and the image summary in each cluster of data clusters to obtain the cluster summary of each cluster of data clusters. The summary splicing calculation may be to splice the strings of each row summary and image summary in the data cluster; it may also be to first splice each row summary and the image summary corresponding to the row summary to obtain an initial spliced summary, perform data summary processing on the initial spliced summary to obtain an intermediate summary, and then splice all the intermediate summaries in the data cluster to obtain the cluster summary of the data cluster; for the specific method of the summary splicing calculation, it is not limited here, and the general summary splicing calculation method in the art can be referred to; similarly, splice the cluster summaries of all data clusters corresponding to the identity data table to obtain the table summary of the data table.
[0052] It can be seen that in this embodiment, by aggregating the identity data in the identity data table, a certain amount of identity data forms data clusters, and the identity data in all data clusters exactly corresponds to the identity data in the identity data table. Therefore, multiple data levels of rows, clusters, and tables are formed to facilitate the management and invocation of personnel information data; by determining the summaries of the data in each level.
[0053] Based on the above embodiments, this embodiment describes the steps of performing a matching process on the row summary corresponding to the data row, the cluster summary corresponding to the data cluster, and the table summary corresponding to the data table in the hierarchical order of data rows, data clusters, and data tables, respectively, with the corresponding to-be-matched row summary, to-be-matched cluster summary, or to-be-matched table summary in the to-be-matched data summary returned by the target client, and obtaining a matching result. Specifically, the steps of this embodiment include:
[0054] If the to-be-matched row summary returned by the target client is received, determine whether the row summary and the to-be-matched row summary match to obtain a matching result; if the to-be-matched cluster summary returned by the target client is received, determine whether the cluster summary and the to-be-matched cluster summary match to obtain a matching result; if the to-be-matched table summary returned by the target client is received, determine whether the table summary and the to-be-matched table summary match to obtain a matching result.
[0055] It should be noted that the process of the target client returning the to-be-matched data summary is based on the data hierarchy and is returned sequentially. Therefore, the server also performs the matching of the data summary and the to-be-matched data summary sequentially. For example, if the target client receives a complete row of identity data and the corresponding face image of the identity data sent by the server each time, the target client calculates the to-be-matched row summary of the identity data and the to-be-matched image summary of the face image, and then returns the to-be-matched row summary and the to-be-matched image summary corresponding to the identity data to the server for summary matching; if the target client receives all the complete identity data and the corresponding face images in a data cluster, calculate the to-be-matched cluster summary of the data cluster based on all the identity data and the corresponding face images in the data cluster, and then return the to-be-matched cluster summary of the data cluster to the server for summary matching; if the target client receives all the identity data and the corresponding face images in the identity data table, after calculating the to-be-matched cluster summaries of all the data clusters corresponding to the identity data, based on the to-be-matched cluster summaries of all the data clusters, determine the to-be-matched table summary of the identity data table received by the target client, and then return the to-be-matched table summary of the identity data table to the server for summary matching; that is, the summary matching process is sequentially progressive according to the hierarchical order of the data hierarchy of the data received by the target client.
[0056] It can be seen that processing the to-be-matched data summary returned by the client sequentially according to the data hierarchy order can quickly confirm whether the to-be-matched data summary calculated by the client is consistent with the data summary of the server, and perform matching on the data summaries of different data hierarchies separately, making the summary matching process more rigorous and improving the accuracy of data consistency verification.
[0057] Based on the above embodiments, the steps of performing data digest processing on each row of identity data and the corresponding face image in the data cluster are described in this embodiment. Specifically, the steps of this embodiment include:
[0058] Obtain a random string corresponding to each row of identity data; perform data digest processing on the corresponding identity data based on the random string to obtain a row digest corresponding to each row of identity data; perform data digest processing on the corresponding face image based on the random string to obtain an image digest corresponding to the face image.
[0059] The random string refers to a randomly generated string, which can be used to perform data digest processing on identity data, face images, data clusters, and identity data tables, making these data more concise and enhancing their privacy. Among them, there can be one or more random strings. Specifically, the method of performing data digest processing on data according to random strings can refer to common digest algorithms in the art and will not be elaborated here.
[0060] It should be noted that the random strings generated by the server based on each row of identity data will also be sent to the target client accordingly, so that the target client can use the same random strings as the server to perform data digest processing on the personnel information data received by the target client, thereby ensuring the consistency in the data processing process between the server and the target client.
[0061] Preferably, in order to ensure the privacy and security of the data, different random strings can be used when performing data digest processing on different identity data; for example, generate random strings according to each row of identity data in the identity data table, and perform data digest processing on the identity data corresponding to the random string through the random string to obtain a row digest corresponding to the identity data; because the identity data and the face image correspond, the corresponding face image is thus subjected to digest processing through the random string to obtain an image digest of the face image.
[0062] Based on the above embodiments, as Figure 3 shown, Figure 3 is a schematic diagram of the process of random data confirmation in this application. The data synchronization method based on identity recognition in this application further includes:
[0063] Step S310, if it is detected that the current running state and / or the running state of the target client is the idle state, then send a random digest confirmation request to the target client, so that the target client responds to the received random digest confirmation request and returns the data digest to be matched corresponding to the random digest confirmation request in the target client.
[0064] A random summary confirmation request refers to a request in which the server randomly selects one or more pieces of personnel information data and sends a request to the target client to confirm whether the data summaries of these pieces of personnel information data are consistent, so as to determine whether the personnel information data in the server and the personnel information data in the target client are consistent.
[0065] It should be noted that after the server comprehensively confirms the consistency of the personnel information data in the server and the personnel information data in the target client, the server can also initiate random data confirmation to the target client to ensure subsequent data consistency.
[0066] Specifically, the random data confirmation process can be carried out when the server is idle and / or when the target client is idle to avoid affecting the normal operation of the server and the client; if the server detects that the current running state and / or the running state of the target client is an idle state, it sends a random summary confirmation request to the target client, causing the target client to randomly select one or more rows of identity data from the personnel information data stored in the target client to obtain randomly confirmed identity data, and return one or more of the data summaries corresponding to these randomly confirmed identity data, such as the summary to be matched for the row, the summary to be matched for the image, the summary to be matched for the cluster, and the summary to be matched for the table, to the server for summary matching to achieve the confirmation of data consistency.
[0067] Step S320: Match the row summary corresponding to the data row, the cluster summary corresponding to the data cluster, and the table summary corresponding to the data table with the data summary to be matched returned by the target client in the hierarchical order of the data row, the data cluster, and the data table to obtain a random matching result.
[0068] It can be understood that in the random data confirmation process, the same data summary processing method and data summary matching method as in the foregoing embodiments can still be referred to, which will not be elaborated here.
[0069] Optionally, the process of the server sending a random digest confirmation request to the target client can also be as follows: randomly select from the personnel information data of the server to obtain random personnel information data, generate a new random string for the random digest confirmation process based on the random personnel information data, recalculate the data row digest, image digest, cluster digest of the data cluster where the random personnel information data is located, and table digest of the data table where the random personnel information data is located based on the new random string; send the new random string and the personnel serial number value of the random personnel information data to the target client, so that the target client searches for the personnel information data in the target client according to the received personnel serial number, and similarly recalculates the searched personnel information data based on the received new random string to obtain the to-be-matched data row digest, to-be-matched image digest, to-be-matched cluster digest of the data cluster where the searched personnel information data is located, and to-be-matched table digest of the data table where the searched personnel information data is located, and return them to the server in sequence. Then the server matches the data row digest corresponding to the random personnel information data with the to-be-matched data row digest, matches the image digest corresponding to the random personnel information data with the to-be-matched image digest, matches the cluster digest of the data cluster where the random personnel information data is located with the to-be-matched cluster digest, and matches the table digest of the data table where the random personnel information data is located with the to-be-matched table digest, realizing the random digest confirmation of the server for the target client, and further ensuring the data consistency between the server and the target client.
[0070] Step S330, perform data synchronization on the target client based on the random matching result.
[0071] Specifically, if there is an inconsistency between the target data digest and the to-be-matched data digest returned by the target client in the random matching result, the personnel information data corresponding to the data level where the target data digest is located is sent to the target client for data synchronization.
[0072] It can be seen that through the random data confirmation method in this embodiment, without affecting the normal operation of the server and the client, the data consistency between the server and the client is ensured.
[0073] Based on the above embodiments, the embodiments of the present application further include:
[0074] If the server receives an update instruction for the personnel information data, where the update instruction includes, but is not limited to, operation instructions such as data addition, data deletion, and data modification; then the server will send the personnel information data corresponding to the update instruction and the random string corresponding to the personnel information data to the target client; similarly, the target client will also perform data digest processing on the personnel information data corresponding to the update instruction and return the corresponding digest to be matched to the server; the server then matches based on these digests to be matched and the data digest of the personnel information data corresponding to the update instruction to complete the confirmation of data consistency.
[0075] In one embodiment, as Figure 4 shown, Figure 4 FIG. is a schematic flowchart of an exemplary embodiment in which the identity recognition-based data synchronization method of the present application is applied to a target client. When the identity recognition-based data synchronization method of the present application is applied to a target client, the specific steps include:
[0076] Step S410, based on the received personnel information data sent by the server, hierarchically aggregate the personnel information data to obtain digests to be matched at multiple data levels. The data levels include data rows, data clusters, and data tables. The data table includes at least one data cluster, and the data cluster includes at least one data row. The digests to be matched include the digest of the row to be matched corresponding to the data row, the digest of the cluster to be matched corresponding to the data cluster, and the digest of the table to be matched corresponding to the data table.
[0077] The personnel information data refers to the data used for identity recognition, including the identity data table of the person and the face image of the person. The identity data in the identity data table matches the face image. It should be noted that in the identity recognition scenario, each row of identity data in the identity data table usually has a unique identifier.
[0078] Hierarchical aggregation means grouping or classifying the personnel information data, and respectively performing aggregation processing on the grouped or classified personnel information data to form data with multiple hierarchical relationships. Among them, the aggregation processing includes data digest processing. Data digest processing refers to changing a message of any length into a short message of a fixed length (digest), such as Hash function, MD5, SHA1, and Base64 encoding, etc. It can not only encrypt the personnel information data, but also make the personnel information data more concise.
[0079] Specifically, refer to the description of step S110 and Figure 2 the schematic diagram of the effect of the hierarchical aggregation processing shown. Similarly, the target client hierarchically aggregates the received personnel information data to obtain digests to be matched at multiple data levels; in addition, the target client also receives the random string sent by the server for data digest processing of the personnel information data.
[0080] It should be noted that the method for hierarchical aggregation processing of personnel information data by the target client and the method for data summary processing are the same as those of the server for hierarchical aggregation processing of personnel information data and data summary processing. Among them, the processing method of the target client can be pre-set in the target client, can be sent by the server to the target client, or can be obtained by the target client from other preset databases or servers, which is not limited herein.
[0081] Step S420: Send the to-be-matched row summary, to-be-matched cluster summary, or to-be-matched table summary in the to-be-matched data summary to the server. The server sequentially matches the row summary corresponding to the data row, the cluster summary corresponding to the data cluster, and the table summary corresponding to the data table in the server with the corresponding to-be-matched row summary, to-be-matched cluster summary, and to-be-matched table summary in the to-be-matched data summary received by the server in the hierarchical order of data row, data cluster, and data table to obtain a matching result.
[0082] It can be understood that because the hierarchical aggregation processing methods of the target client and the server for personnel information data are the same, the to-be-matched data summary returned by the target client naturally includes the to-be-matched row summary, the to-be-matched cluster summary, and the to-be-matched table summary.
[0083] Exemplarily, reference may continue to Figure 2 the data hierarchy shown, and sequentially return the to-be-matched row summary, to-be-matched cluster summary, and to-be-matched table summary to the server in the hierarchical order of data row, data cluster, and data table, so that the server performs corresponding summary matching processing on the to-be-matched row summary, to-be-matched cluster summary, and to-be-matched table summary to obtain a matching result.
[0084] It should be noted that in combination with the foregoing embodiments, if a face recognition scenario is involved, the personnel information data includes face image data; hierarchical aggregation processing of the personnel information data can obtain the to-be-matched face summary of the face image corresponding to each row of identity data, and the to-be-matched face summary and the to-be-matched row summary match each other and belong to the same data hierarchy; therefore, in the process of the client returning the to-be-matched data summary, the to-be-matched row summary and the to-be-matched face summary corresponding to the to-be-matched row summary can also be synchronously returned, so that when the server matches the row summary and the to-be-matched row summary, the face summary and the to-be-matched face summary can also be correspondingly matched; after the server determines that the row summary of the same identity data and the to-be-matched row summary are consistent and the face summary of the same face image corresponding to the identity data and the to-be-matched face summary are consistent, it indicates that the personnel information data of this data row is consistent.
[0085] Step S430: if the target data summary in the matching result received from the server is inconsistent with the to-be-matched data summary received from the server, data synchronization is performed based on the personnel information data corresponding to the data level where the target data summary received from the server is located.
[0086] Specifically, if a target data summary calculated by the server is inconsistent with a corresponding to-be-matched data summary returned by the target client, it indicates that the personnel information data corresponding to the data summary is inconsistent; therefore, the target client will receive the personnel information data corresponding to the data level where the target data summary sent by the server is located; further, the target client can update the personnel information data corresponding to the data level where the received target data summary is located to the corresponding data storage location to achieve data synchronization.
[0087] It should be noted that the server and the target client have many identical implementation methods for the hierarchical aggregation processing process, data summary processing process, summary matching process and data synchronization process of personnel information data. Therefore, for the specific instructions on applying the identity-based data synchronization method to the target client, please refer to the aforementioned specific instructions on applying the identity-based data synchronization method to the server.
[0088] As can be seen from the above, in this application, the target client will perform hierarchical aggregation on the acquired personnel information data to obtain data summaries of multiple data levels, thereby achieving simplification of the personnel information data; the target client will return the summary of the data to be matched after the hierarchical aggregation of the personnel information data to the server, so that the server will match the data summaries at each level of the server with the data summaries at each level to be matched returned by the target client in sequence according to the hierarchical order of the data levels, thereby achieving consistency verification of the data between the server and the target client; the target client will perform data synchronization processing on the data summaries that do not match the server based on the target data summary sent by the server, thereby achieving data synchronization between the server and the client, and improving the efficiency of data synchronization.
[0089] Based on the above embodiment, this embodiment describes the steps of hierarchically aggregating the personnel information data based on the personnel information data received from the server to obtain the summaries of the data to be matched at multiple data levels, wherein the personnel information includes an identity data table and a face image matching the identity data in the identity data table. Specifically, the steps of this embodiment include:
[0090] Aggregate the identity data in the identity data table to obtain at least one cluster of data clusters. Each data cluster includes at least one row of identity data, and the identity data corresponds to a face image. Perform data summarization processing on each row of identity data and the corresponding face image in the data cluster respectively to obtain at least one row of to-be-matched row summary and the corresponding to-be-matched image summary of the to-be-matched row summary. Determine the to-be-matched cluster summary of the data cluster based on the to-be-matched row summary and the to-be-matched image summary in the data cluster, and determine the to-be-matched table summary of the identity data table based on the to-be-matched cluster summaries of each data cluster.
[0091] Illustrated in combination with the foregoing embodiments, group the identity data with a preset grouping threshold, and aggregate each group of identity data after grouping into a cluster of data clusters. Each data cluster should include at least one row of identity data. Perform data summarization processing on each row of identity data and the corresponding face image in each cluster of data clusters respectively to obtain the to-be-matched row summary corresponding to each row of identity data and the to-be-matched image summary corresponding to the face image. Among them, the to-be-matched row summary and the to-be-matched image summary match each other based on the corresponding relationship between the identity data and the face image. Perform a preset summary splicing calculation on the to-be-matched row summary and the to-be-matched image summary in each cluster of data clusters to obtain the to-be-matched cluster summary of each cluster of data clusters. Among them, the summary splicing calculation can be to splice the strings of each to-be-matched row summary and the to-be-matched image summary in the data cluster; it can also be to first splice each to-be-matched row summary and the to-be-matched image summary corresponding to the to-be-matched row summary to obtain a to-be-matched initial splicing summary, perform data summarization processing on the to-be-matched initial splicing summary to obtain a to-be-matched intermediate summary, and then splice all the to-be-matched intermediate summaries in the data cluster to obtain the to-be-matched cluster summary of the data cluster. For the specific method of the summary splicing calculation, it is not limited here, and the general summary splicing calculation method in the art can be referred to. Similarly, splice the to-be-matched cluster summaries of all data clusters corresponding to the identity data table to obtain the to-be-matched table summary of the data table.
[0092] Based on the above embodiments, this embodiment describes the step of sending the to-be-matched row summary, the to-be-matched cluster summary, and the to-be-matched table summary in the to-be-matched data summary to the server. Specifically, the steps of this embodiment include:
[0093] If one row of identity data in the identity data table sent by the server is received, send the to-be-matched row summary of the one row of identity data to the server for matching; if all rows of identity data in a cluster of data clusters are received, send the to-be-matched cluster summary of the cluster of data clusters to the server for matching; if all clusters of identity data in the identity data table are received, send the to-be-matched table summary of the identity data table to the server for matching.
[0094] To improve data processing efficiency and avoid excessive accumulation of data summary to be matched received by the server, the target client returns the data summary to be matched to the server in sequence based on the data hierarchy; exemplarily, for the target client, if it receives a complete line of identity data and the corresponding face image sent by the server each time, it calculates the summary of the line to be matched of the identity data and the summary of the image to be matched of the face image, and returns the summary of the line to be matched and the summary of the image to be matched corresponding to the identity data to the server for summary matching; if it receives all the complete lines of identity data and the corresponding face images in a data cluster, it calculates the summary of the cluster to be matched of the data cluster based on all the identity data and the corresponding face images in the data cluster, and then returns the summary of the cluster to be matched of the data cluster to the server for summary matching; if it receives all the identity data and the corresponding face images in the identity data table, after calculating the summary of the cluster to be matched of all the data clusters corresponding to the identity data, it determines the summary of the table to be matched of the identity data table received by the target client based on the summary of the cluster to be matched of all the data clusters, and then returns the summary of the table to be matched of the identity data table to the server for summary matching.
[0095] It can be seen from this that the data summary to be matched returned to the server in sequence according to the data hierarchy can quickly confirm whether the data summary to be matched is consistent with the data summary of the server by the server, and perform matching on the data summaries at different data hierarchies respectively, making the summary matching process more rigorous, ensuring the consistency of data synchronization and improving the accuracy of data consistency verification.
[0096] It should be further noted that the execution subject of the data synchronization method based on identity recognition can be a data synchronization device based on identity recognition set on the server and / or a data synchronization device based on identity recognition set on the client. For example, the data synchronization method based on identity recognition can be executed by a terminal device, a server or other processing devices. Among them, the terminal device can be a user equipment (UE), a computer, a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc.; the server can be a general-purpose server, a dedicated server, etc. In some possible implementation manners, the data synchronization method based on identity recognition can be implemented by a processor calling computer-readable instructions stored in a memory.
[0097] Figure 5 is a block diagram of a data synchronization device based on identity recognition set on the server shown in an exemplary embodiment of the present application. As Figure 5As shown, the exemplary identity-based data synchronization device 500 includes: a first hierarchical aggregation module 510, a first data sending module 520, a first data matching module 530 and a first data synchronization module 540. Specifically:
[0098] The first hierarchical aggregation module 510 is used to perform hierarchical aggregation processing on the acquired personnel information data to obtain data summaries of multiple data levels, where the data levels include data rows, data clusters and data tables, the data tables include at least one data cluster, the data clusters include at least one data row, and the data summaries include row summaries corresponding to the data rows, cluster summaries corresponding to the data clusters, and table summaries corresponding to the data tables.
[0099] The first data sending module 520 is used to send the personnel information data to the target client, and the target client performs hierarchical aggregation processing based on the received personnel information data to obtain the summary of the data to be matched at each data level.
[0100] The first data matching module 530 is used to match the row summary corresponding to the data row, the cluster summary corresponding to the data cluster and the table summary corresponding to the data table with the corresponding row summary to be matched, cluster summary to be matched and table summary to be matched in the data summary to be matched returned by the target client in the hierarchical order of data row, data cluster and data table to obtain a matching result.
[0101] The first data synchronization module 540 is used to send the personnel information data corresponding to the data level where the target data summary is located to the target client for data synchronization if the target data summary in the matching result is inconsistent with the to-be-matched data summary returned by the target client.
[0102] In this exemplary identity-based data synchronization device, the server performs hierarchical aggregation on the acquired personnel information data to obtain data summaries of multiple data levels, thereby streamlining the personnel information data; the server sends the personnel information data to the client, and obtains the summary of the data to be matched returned by the client after the hierarchical aggregation of the personnel information data; the server matches the data summaries of each level of the server with the data summaries of each level to be matched returned by the client in sequence according to the hierarchical order of the data levels, thereby achieving consistency verification of the data between the server and the client; the server sends the target data summary to the client, so that the client synchronizes the data summaries that do not match the server based on the target data summary, thereby achieving data synchronization between the server and the client, ensuring the consistency of data synchronization and improving the efficiency of data synchronization.
[0103] Among them, the functions of each module can be found in the embodiment of the data synchronization method based on identity recognition, which will not be repeated here.
[0104] Figure 6FIG. 1 is a block diagram of an identity-based data synchronization device provided on a client according to an exemplary embodiment of the present application. Figure 6 As shown, the exemplary identity-based data synchronization device 600 includes: a second hierarchical aggregation module 610, a second data sending module 620 and a second data synchronization module 630. Specifically:
[0105] The second hierarchical aggregation module 610 is used to hierarchically aggregate the personnel information data based on the personnel information data received from the server to obtain data summaries to be matched at multiple data levels, where the data levels include data rows, data clusters and data tables, the data tables include at least one data cluster, the data clusters include at least one data row, and the data summaries to be matched include the row summaries to be matched corresponding to the data rows, the cluster summaries to be matched corresponding to the data clusters, and the table summaries to be matched corresponding to the data tables.
[0106] The second data sending module 620 is used to send the to-be-matched row summary, to-be-matched cluster summary or to-be-matched table summary in the to-be-matched data summary to the server, and the server matches the row summary corresponding to the data row, the cluster summary corresponding to the data cluster and the table summary corresponding to the data table in the server with the to-be-matched row summary, to-be-matched cluster summary and to-be-matched table summary corresponding to the to-be-matched data summary received by the server in the hierarchical order of data row, data cluster and data table to obtain a matching result.
[0107] The second data synchronization module 630 is used to synchronize data based on the personnel information data corresponding to the data level of the target data summary received from the server if the target data summary in the matching result received from the server is inconsistent with the to-be-matched data summary received from the server.
[0108] In this exemplary identity-based data synchronization device, the target client performs hierarchical aggregation on the acquired personnel information data to obtain data summaries of multiple data levels, thereby streamlining the personnel information data; the target client returns the data summaries to be matched after the hierarchical aggregation of the personnel information data to the server, so that the server matches the data summaries at each level of the server with the data summaries at each level to be matched returned by the target client in sequence according to the hierarchical order of the data levels, thereby realizing consistency verification of the data between the server and the target client; the target client performs data synchronization processing on the data summaries that do not match the server based on the target data summary sent by the server, thereby realizing data synchronization between the server and the client, ensuring the consistency of data synchronization and improving the efficiency of data synchronization.
[0109] Among them, the functions of each module can be found in the embodiment of the data synchronization method based on identity recognition, which will not be repeated here.
[0110] See alsoFigure 7 , Figure 7 is a schematic structural diagram of an embodiment of the electronic device of the present application. The electronic device 700 includes a memory 701 and a processor 702. The processor 702 is configured to execute program instructions stored in the memory 701 to implement the steps in any of the above embodiments of the data synchronization method based on identity recognition. In a specific implementation scenario, the electronic device 700 may include, but is not limited to: a microcomputer, a server. In addition, the electronic device 700 may also include mobile devices such as a laptop computer, a tablet computer, etc., which are not limited herein.
[0111] Specifically, the processor 702 is configured to control itself and the memory 701 to implement the steps in any of the above embodiments of the data synchronization method based on identity recognition. The processor 702 may also be referred to as a CPU (Central Processing Unit, central processing unit). The processor 702 may be an integrated circuit chip with signal processing capabilities. The processor 702 may also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. In addition, the processor 702 may be implemented jointly by integrated circuit chips.
[0112] In the above solution, the server hierarchically aggregates the obtained personnel information data to obtain data summaries of multiple data levels, realizing the refinement of the personnel information data; the server sends the personnel information data to the client to obtain the to-be-matched data summary returned after the client hierarchically aggregates the personnel information data; the server sequentially matches the data summaries at all levels of the server and the to-be-matched data summaries at all levels returned by the client according to the level order of the data levels, realizing the consistency verification of the data between the server and the client; the server sends the target data summary to the client, enabling the client to perform data synchronization processing on the data summaries that do not match the server based on the target data summary, thereby realizing data synchronization between the server and the client, ensuring the consistency of data synchronization and improving the efficiency of data synchronization.
[0113] Please refer to Figure 8 , Figure 8It is a schematic structural diagram of an embodiment of the computer-readable storage medium of the present application. The computer-readable storage medium 810 stores program instructions 811 that can be run by a processor, and the program instructions 811 are used to implement the steps in any of the above-described embodiments of the data synchronization method based on identity recognition.
[0114] In the above solution, the server hierarchically aggregates the obtained personnel information data to obtain data summaries at multiple data levels, realizing the streamlining of the personnel information data; the server sends the personnel information data to the client, and obtains the to-be-matched data summaries returned after the client hierarchically aggregates the personnel information data; the server sequentially matches the data summaries at all levels of the server and the to-be-matched data summaries at all levels returned by the client according to the hierarchical order of the data levels, realizing the consistency verification of the data between the server and the client; the server sends the target data summary to the client, enabling the client to perform data synchronization processing on the data summaries that do not match the server based on the target data summary, thereby enabling data synchronization between the server and the client, ensuring the consistency of data synchronization and improving the efficiency of data synchronization.
[0115] In some embodiments, the functions or modules included in the device provided by the present disclosure can be used to execute the methods described in the above method embodiments. Its specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0116] The above descriptions of the various embodiments tend to emphasize the differences between the various embodiments. Their similarities or similarities can be referred to each other. For the sake of brevity, they will not be repeated in this article.
[0117] In several embodiments provided by the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods. For example, units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in electrical, mechanical or other forms.
[0118] In addition, each functional unit in various embodiments of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit. If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods in various embodiments of the present application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs.
Claims
1. A data synchronization method based on identity recognition, characterized in that, The method is applied to a server, and the method includes: Performing hierarchical aggregation processing on the obtained personnel information data to obtain data summaries at multiple data levels, where the data levels include data rows, data clusters, and data tables, the data table includes at least one data cluster, the data cluster includes at least one data row, and the data summary includes the row summary corresponding to the data row, the cluster summary corresponding to the data cluster, and the table summary corresponding to the data table; Sending the personnel information data to a target client, and the target client performs hierarchical aggregation processing on the received personnel information data to obtain the to-be-matched data summaries at each data level; Sequentially matching the row summary corresponding to the data row, the cluster summary corresponding to the data cluster, and the table summary corresponding to the data table with the to-be-matched row summary, the to-be-matched cluster summary, and the to-be-matched table summary in the to-be-matched data summaries returned by the target client in the hierarchical order of the data row, the data cluster, and the data table to obtain a matching result; If there is a target data summary in the matching result that is inconsistent with the to-be-matched data summary returned by the target client, then send the personnel information data corresponding to the data level where the target data summary is located to the target client for data synchronization.
2. The method according to claim 1, wherein The personnel information data includes an identity data table and a face image that matches the identity data in the identity data table. The step of performing hierarchical aggregation processing on the obtained personnel information data to obtain data summaries at multiple data levels includes: Aggregating the identity data in the identity data table to obtain at least one data cluster, and the data cluster includes at least one row of the identity data; Performing data summary processing on each row of identity data in the data cluster and the face image corresponding to each row of identity data to obtain at least one row summary and the image summary corresponding to the row summary; Determining the cluster summary of the data cluster based on the row summary and the image summary in the data cluster, and determining the table summary of the identity data table based on the cluster summaries of each data cluster.
3. The method according to claim 2, wherein The step of sequentially matching the row summary corresponding to the data row, the cluster summary corresponding to the data cluster, and the table summary corresponding to the data table with the to-be-matched row summary, the to-be-matched cluster summary, or the to-be-matched table summary in the to-be-matched data summaries returned by the target client in the hierarchical order of the data row, the data cluster, and the data table to obtain a matching result includes: If the to-be-matched row summary returned by the target client is received, then determine whether the row summary and the to-be-matched row summary match to obtain the matching result; If the to-be-matched cluster summary returned by the target client is received, then determine whether the cluster summary and the to-be-matched cluster summary match to obtain the matching result; If the to-be-matched table summary returned by the target client is received, then determine whether the table summary and the to-be-matched table summary match to obtain the matching result.
4. The method according to claim 2, wherein The step of performing data summary processing on each row of identity data in the data cluster and the face image corresponding to each row of identity data includes: Obtaining a random string corresponding to each row of identity data; Perform data digest processing on the corresponding identity data based on the random string to obtain the row digest corresponding to each row of identity data; Perform data digest processing on the corresponding face image based on the random string to obtain the image digest corresponding to the face image.
5. The method according to claim 1, wherein The method further includes: If it is detected that the current running state and / or the running state of the target client is the idle state, send a random digest confirmation request to the target client, so that the target client responds to the received random digest confirmation request and returns the data digest to be matched corresponding to the random digest confirmation request in the target client; Match the row digest corresponding to the data row, the cluster digest corresponding to the data cluster, and the table digest corresponding to the data table with the data digest to be matched returned by the target client received in the hierarchical order of the data row, data cluster, and data table to obtain a random matching result; Perform data synchronization on the target client based on the random matching result.
6. A data synchronization method based on identity recognition, characterized in that, The method is applied to a target client, and the method includes: Based on the personnel information data sent by the server received, perform hierarchical aggregation on the personnel information data to obtain data digests to be matched at multiple data levels, where the data levels include data rows, data clusters, and data tables, the data table includes at least one data cluster, the data cluster includes at least one data row, and the data digests to be matched include the row digest to be matched corresponding to the data row, the cluster digest to be matched corresponding to the data cluster, and the table digest to be matched corresponding to the data table; Send the row digest to be matched, the cluster digest to be matched, or the table digest to be matched in the data digest to be matched to the server, and the server matches the row digest corresponding to the data row, the cluster digest corresponding to the data cluster, and the table digest corresponding to the data table in the server with the row digest to be matched, the cluster digest to be matched, and the table digest to be matched corresponding to the data digest to be matched received by the server in the hierarchical order of the data row, data cluster, and data table to obtain a matching result; If there is a target data digest in the matching result sent by the server that is inconsistent with the data digest to be matched received by the server, perform data synchronization based on the personnel information data corresponding to the data level where the target data digest is located sent by the server received.
7. The method according to claim 6, wherein The personnel information includes an identity data table and a face image that matches the identity data in the identity data table. The step of performing hierarchical aggregation on the personnel information data based on the personnel information data sent by the server received to obtain data digests to be matched at multiple data levels includes: Aggregate the identity data in the identity data table to obtain at least one data cluster, where the data cluster includes at least one row of the identity data, and the identity data corresponds to the face image; Perform data digest processing on each row of identity data in the data cluster and the face image corresponding to each row of identity data respectively to obtain at least one row digest to be matched and the image digest to be matched corresponding to the row digest to be matched; Determine the to-be-matched cluster summary of the data cluster based on the to-be-matched row summary and the to-be-matched image summary in the data cluster, and determine the to-be-matched table summary of the identity data table based on the to-be-matched cluster summaries of each data cluster.
8. The method according to claim 7, wherein The step of sending the to-be-matched row summary, the to-be-matched cluster summary and the to-be-matched table summary in the to-be-matched data summary to the server includes: If receiving a row of identity data in the identity data table sent by the server, send the to-be-matched row summary of the row of identity data to the server for matching; If receiving the identity data of all rows in a cluster of data clusters, send the to-be-matched cluster summary of the cluster of data clusters to the server for matching; If receiving the identity data of all clusters in the identity data table, send the to-be-matched table summary of the identity data table to the server for matching.
9. An electronic device, characterized in that, It includes a memory and a processor, and the processor is used to execute the program instructions stored in the memory to implement the method according to any one of claims 1 to 5 or the method according to any one of claims 6-8.
10. A computer-readable storage medium having program instructions stored thereon, characterized in that, When the program instructions are executed by the processor, the method according to any one of claims 1 to 5 or the method according to any one of claims 6-8 is implemented.
Citation Information
Patent Citations
Data synchronization method based on tree structure, terminal equipment and storage medium
CN114443673A