CN111339107A - Comparison source data synchronization method and device, electronic equipment and storage medium - Google Patents

Comparison source data synchronization method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111339107A
CN111339107A CN202010085922.2A CN202010085922A CN111339107A CN 111339107 A CN111339107 A CN 111339107A CN 202010085922 A CN202010085922 A CN 202010085922A CN 111339107 A CN111339107 A CN 111339107A
Authority
CN
China
Prior art keywords
comparison source
data
updating
local
comparison
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010085922.2A
Other languages
Chinese (zh)
Other versions
CN111339107B (en
Inventor
赵鹏飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202010085922.2A priority Critical patent/CN111339107B/en
Publication of CN111339107A publication Critical patent/CN111339107A/en
Application granted granted Critical
Publication of CN111339107B publication Critical patent/CN111339107B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2379Updates performed during online database operations; commit processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Abstract

The present specification relates to a comparison source data synchronization method, including: sending a comparison source updating request to a cloud comparison source manager, wherein the comparison source updating request comprises a data change identifier corresponding to a local comparison source database; after receiving a comparison source update data packet fed back by a cloud comparison source manager, acquiring at least one comparison source data operation record from the comparison source update data packet; performing corresponding operation on the local comparison source database according to the at least one comparison source data operation record; and updating the data change identifier corresponding to the local comparison source database according to the at least one comparison source data operation record. The specification also relates to a device, electronic equipment and a storage medium corresponding to the comparison source data synchronization method.

Description

Comparison source data synchronization method and device, electronic equipment and storage medium
Technical Field
The present specification relates to internet of things (IoT) technology, and in particular, to a comparison source data synchronization method, apparatus, electronic device, and computer-readable storage medium.
Background
In recent years, the IoT technology has been gradually deepened into the aspects of our lives, so that the intelligent development of various aspects such as industry, agriculture, environment, traffic, logistics, security and the like is effectively promoted, the intelligent fields such as intelligent home, intelligent traffic, intelligent medical treatment, intelligent security and the like are promoted, and a foundation is laid for the construction of a new smart city.
In the development and application process of technologies in these emerging intelligent fields, biometric identification technologies such as face identification, fingerprint identification, and eyeball identification are widely used. Generally, when biometric identification is performed, biometric information acquired on site needs to be compared with biometric information stored in a system, so as to complete verification of user identity. These reference information stored in the system for comparison with the biometric information collected in the field may be generally referred to herein as a comparison source.
At present, the biometric information as the comparison source is generally stored in the cloud, and the biometric identification process is also generally performed by the cloud device, that is, at present, the biometric identification generally needs to be completed on the network, that is, on the line. However, this approach of biometric identification that needs to be done online is not suitable for application scenarios where some terminal devices cannot be networked in real time.
Disclosure of Invention
In view of this, an embodiment of the present disclosure provides a comparison source data synchronization method, which may include: sending a comparison source updating request to a cloud comparison source manager, wherein the comparison source updating request comprises a data change identifier corresponding to a local comparison source database; after receiving a comparison source update data packet fed back by a cloud comparison source manager, obtaining at least one comparison source data operation record from the comparison source update data packet, wherein each comparison source data operation record comprises: data change identification, data operation type, operated biological characteristic information identification and operation data; performing corresponding operation on the local comparison source database according to the data operation type, the operated biological characteristic information identifier and the operation data in the at least one comparison source data operation record; and updating the data change identifier corresponding to the local comparison source database according to the data change identifier in the at least one comparison source data operation record.
Wherein, the sending of the comparison source update request to the cloud comparison source manager comprises: sending a comparison source updating request to a cloud comparison source manager according to a set synchronization period; and the method further comprises: receiving a comparison source data updating notification message sent by the cloud comparison source manager; and dynamically adjusting the set synchronization period according to the received comparison source data updating notification message.
The data operation type is addition, the operated biological characteristic information identifier is an identifier of biological characteristic information to be added, and the operation data comprises the biological characteristic information to be added; the data operation type is deletion, and the operated biological characteristic information mark is a mark of biological characteristic information to be deleted; or the data operation type is changed, the operated biological characteristic information is identified as the identification of the biological characteristic information to be changed, and the operation data comprises the changed biological characteristic information.
Wherein, the performing corresponding operations on the local comparison source database according to the data operation type, the operated biological characteristic information identifier and the operation data in the at least one comparison source data operation record comprises: when the data operation type is adding, adding a data record indexed by the identifier of the biological feature information to be added to the local comparison source database, wherein the data record comprises: biometric information to be added; when the data operation type is deletion, deleting the data record with the identifier of the biological characteristic information to be deleted as an index from the local comparison source database; or when the data operation type is changed, changing the biological characteristic information in the data record in the local comparison source database with the identifier of the biological characteristic information to be changed as the index into the changed biological characteristic information.
Wherein, the updating the data change identifier corresponding to the local comparison source database according to the data change identifier in the at least one comparison source data operation record includes: and updating the data change identifier corresponding to the local comparison source database to be the maximum value of the data change identifier in the at least one comparison source data operation record.
Wherein the method further comprises: receiving a comparison source data updating push message sent by the cloud comparison source manager, wherein the comparison source data updating push message comprises a second comparison source updating data packet; acquiring at least one comparison source data operation record from the second comparison source update data packet; wherein, each comparison source data operation record comprises: data change identification, data operation type, operated biological characteristic information identification and operation data; performing corresponding operation on the local comparison source database according to the data operation type, the operated biological characteristic information identifier and the operation data in the at least one comparison source data operation record; and updating the data change identifier corresponding to the local comparison source database according to the data change identifier in the at least one comparison source data operation record.
The embodiment of the present specification further provides a comparison source data synchronization method, which may include: after receiving a comparison source updating request from a local comparison source manager, acquiring a data change identifier corresponding to a local comparison source database; extracting at least one comparison source data operation record from the cloud comparison source database according to the data change identifier corresponding to the local comparison source database, wherein each comparison source data operation record comprises: data change identification, data operation type, operated biological characteristic information identification and operation data; generating a comparison source updating data packet according to the at least one operation record; and feeding back the comparison source updating data packet to the local comparison source manager, so that the local comparison source manager performs data updating on the local comparison source database according to the comparison source updating data packet.
Wherein, the extracting at least one comparison source data operation record from the cloud comparison source database according to the data change identifier corresponding to the local comparison source database comprises: and extracting at least one comparison source data operation record with a data change identifier larger than the data change identifier corresponding to the local comparison source database from the cloud comparison source database.
Wherein the generating of the comparison source update data packet according to the at least one operation record comprises: and solving a union set of the at least one operation record to obtain the comparison source updating data packet.
Wherein the method further comprises: generating at least one comparison source data operation record according to the conditions of warehouse-out, warehouse-in or content change of the comparison source data according to a set updating period, and storing the comparison source data operation record in a cloud comparison source database; and adjusting the updating period according to the frequency of the comparison of the source data to be exported or imported or the content to be changed.
Wherein the method further comprises: when a new comparison source data operation record is generated, sending a comparison source data updating notification message to the local comparison source manager; or when a new comparison source data operation record is generated, sending a comparison source data update push message to the local comparison source manager, wherein the comparison source data update push message comprises a comparison source update data packet generated according to the new comparison source data operation record.
An embodiment of the present specification further provides a local alignment source manager, including:
the comparison source updating request sending module is used for sending a comparison source updating request to the cloud comparison source manager, wherein the comparison source updating request comprises a data change identifier corresponding to a local comparison source database;
the comparison source update data packet receiving module is used for receiving a comparison source update data packet fed back by the cloud comparison source manager, and acquiring at least one comparison source data operation record from the comparison source update data packet, wherein each comparison source data operation record comprises: data change identification, data operation type, operated biological characteristic information identification and operation data;
the data updating module is used for carrying out corresponding operation on the local comparison source database according to the data operation type, the operated biological characteristic information identifier and the operation data in the at least one comparison source data operation record; and
and the data change identifier updating module is used for updating the data change identifier corresponding to the local comparison source database according to the data change identifier in the at least one comparison source data operation record.
Wherein, the local comparison source manager further comprises: the synchronization period updating module is used for setting a synchronization period for the comparison source updating request sending module to send the comparison source updating request to the cloud comparison source manager; receiving a comparison source data updating notification message sent by the cloud comparison source manager; and dynamically adjusting the synchronization period according to the received comparison source data updating notification message.
Wherein, the local comparison source manager further comprises: the passive updating module is used for receiving a comparison source data updating push message sent by the cloud comparison source manager, wherein the comparison source data updating push message comprises a second comparison source updating data packet; acquiring at least one comparison source data operation record from the second comparison source update data packet; wherein, each comparison source data operation record comprises: data change identification, data operation type, operated biological characteristic information identification and operation data; and the triggering data updating module and the data change identification updating module perform data updating according to the at least one comparison source data operation record.
An embodiment of the present specification further provides a cloud comparison source manager, including:
the comparison source updating request receiving module is used for receiving a comparison source updating request from the local comparison source manager and acquiring a data change identifier corresponding to the local comparison source database;
the data extraction module is used for extracting at least one comparison source data operation record from the cloud comparison source database according to the data change identifier corresponding to the local comparison source database, wherein each comparison source data operation record comprises: data change identification, data operation type, operated biological characteristic information identification and operation data;
the comparison source updating data packet generating module is used for generating a comparison source updating data packet according to the at least one operation record; and
and the comparison source update data packet issuing module is used for feeding the comparison source update data packet back to the local comparison source manager, so that the local comparison source manager performs data update on the local comparison source database according to the comparison source update data packet.
Wherein, the cloud comparison source manager further comprises: the comparison source data operation record updating module is used for setting an updating period; generating at least one comparison source data operation record according to the ex-warehouse, in-warehouse or content change condition of the comparison source data according to the update period, and storing the comparison source data operation record in a cloud comparison source database; and adjusting the updating period according to the frequency of the comparison source data in and out of the database or the content change.
Wherein, the cloud comparison source manager further comprises: the updating notification module is used for sending a comparison source data updating notification message to the local comparison source manager when a new comparison source data operation record is generated; or sending a comparison source data updating push message to the local comparison source manager, wherein the comparison source data updating push message comprises a comparison source updating data packet generated according to the new comparison source data operation record.
Embodiments of the present specification also provide an electronic device, including: the device comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein the processor realizes the comparison source data synchronization method when executing the program.
Embodiments of the present disclosure also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the comparison source data synchronization method.
Therefore, the comparison source data synchronization method and the comparison source data synchronization device can locally store the comparison source data, complete local data comparison and realize local biological feature identification.
In addition, the operation records of the data are recorded in the cloud comparison source data, and the data change identification corresponding to the data operation records is also recorded, so that the data update of the local comparison source data can be performed by taking each time of data operation of the cloud as a unit, the incremental update of the local comparison source data can be realized, and all the cloud comparison source data do not need to be downloaded in full during data synchronization every time, so that hardware and network resources are saved, and the data synchronization efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present specification, and other drawings can be obtained by those skilled in the art without creative efforts.
FIGS. 1a-1d are schematic diagrams of the internal structure of an alignment source data storage system 100 according to some embodiments of the present disclosure;
FIG. 2 is a schematic diagram of an internal structure of alignment source data storage system 100 according to another embodiment of the present disclosure;
FIG. 3 is a comparison source data synchronization method executed by the local comparison source manager 102 according to an embodiment of the present disclosure;
fig. 4 is a comparison source data synchronization method executed by the cloud comparison source manager 103 according to an embodiment of the present disclosure;
FIG. 5 is a diagram illustrating an implementation process of a comparison source data synchronization method according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram illustrating an internal structure of the local alignment source manager 102 according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of an internal structure of the cloud comparison source manager 103 according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present specification more apparent, the present specification is further described in detail below with reference to the accompanying drawings in combination with specific embodiments.
It should be noted that technical terms or scientific terms used in the embodiments of the present specification should have a general meaning as understood by those having ordinary skill in the art to which the present disclosure belongs, unless otherwise defined. The use of "first," "second," and similar terms in this disclosure is not intended to indicate any order, quantity, or importance, but rather is used to distinguish one element from another. The word "comprising" or "comprises", and the like, means that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items. The terms "connected" or "coupled" and the like are not restricted to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", and the like are used merely to indicate relative positional relationships, and when the absolute position of the object being described is changed, the relative positional relationships may also be changed accordingly.
As described above, since the biometric information as the comparison source is usually stored in the cloud, the operation of verifying the identity of the user based on the biometric information usually needs to be completed online by relying on a network, and is not suitable for application scenarios where some terminal devices cannot be networked in real time, for example, in an intelligent transportation, if the terminal devices installed on a public transportation means cannot be networked in real time, a passenger cannot use an application of "brushing the face" for riding a car. For another example, if a merchant's toll terminal cannot be networked in real-time, the user will not be able to use an application for "face-brushing" payments. For another example, if the access terminal of the intelligent security system cannot be networked in real time, the user cannot use the applications of "face brushing" unlocking, "face brushing" sign-in, and the like. In one or more embodiments of the present disclosure, the biometric features involved in the biometric identification may include, for example: facial features (e.g., human face), eye features, voice prints, fingerprints, palm prints, heart beats, pulse, chromosomes, DNA, human teeth bites, and the like. The eye features may include biological features such as an iris, a sclera, and the like.
To this end, in an embodiment of the present disclosure, a local comparison source database is deployed in a device located locally, and is used to locally store biometric information serving as a comparison source, and the local comparison source database may compare source data synchronously from a cloud comparison source database located in a cloud.
For a system in which the comparison source is relatively stable, for example, an intelligent security system or an intelligent office system of a certain group company, the comparison source database in the local device may synchronize the comparison source data stored in the cloud to the local at one time, and perform relatively static storage. However, in some application scenarios, for example, in an application scenario such as "face brushing" riding or "face brushing" payment, the comparison source data is not fixed and often changes, which involves frequent data warehouse-in and warehouse-out. In these application scenarios, if local comparison is to be performed on the source data, the local comparison source data and the cloud comparison source data need to be synchronized frequently. Thus, when the amount of the comparison source data is large, the frequent data synchronization operation not only consumes a large amount of time, but also consumes a large amount of hardware and network resources, which causes resource waste and low data synchronization efficiency.
Embodiments of the present description present a synchronization method for alignment source data, which may be applied to the alignment source data storage system 100 shown in fig. 1. As shown in fig. 1a, the alignment source data storage system 100 may include: a local comparison source database 101, a local comparison source manager 102, a cloud comparison source manager 103, and a cloud comparison source database 104.
In the embodiment of the present specification, the local comparison source database 101 is deployed in a local device and is used for storing local comparison source data.
The local comparison source manager 102 is deployed in the local device, and is configured to manage the local comparison source database 101, request the comparison source update packet from the cloud comparison source manager 103 based on the data synchronization policy, and perform data update on the local comparison source database 101 based on the acquired comparison source update packet.
The cloud comparison source manager 103 is deployed in the cloud device, and is configured to manage the cloud comparison source database 104, extract data from the cloud comparison source database 104 according to a request of the local comparison source manager 102, and generate a comparison source update data packet.
And the cloud comparison source database 104 is located in the cloud device and is used for storing cloud comparison source data.
In an embodiment of the present specification, the local alignment source data stored by the local alignment source database 101 may include at least one data record. Wherein each data record corresponds to a piece of biometric information. Each of the data records may include: an identification of the biometric information and corresponding biometric information. Specifically, the identification of the above-described biometric information may be used to uniquely identify a piece of biometric information. Thus, the identification of the biometric information described above may also be considered as an index to the data record. The biometric information may be a reference image or a feature sequence of images at the time of biometric recognition. For example, in the application of face recognition, the biometric information may be a face image or a feature sequence obtained by extracting features from the face image; in the application of fingerprint identification, the biological characteristic information can be a fingerprint image or a characteristic sequence obtained by extracting the characteristics of an external image; in the application of eyeball identification, the biometric information may be an iris or sclera image of the eyeball or a feature sequence obtained by feature extraction of the iris or sclera image of the eyeball, and the like.
In other embodiments of the present description, as shown in fig. 1a, the data record may further include attribute information corresponding to the biometric information recorded by the data record. The attribute information corresponding to the biometric information may refer to other information associated with the biometric information, for example, one or more of a user identifier corresponding to the biometric information, attribute information of the corresponding user, and a collection time of the biometric information.
Table 1 below shows an example of local alignment source data stored by the local alignment source database 101 according to some embodiments of the present disclosure.
Figure BDA0002381468630000081
TABLE 1
As can be seen from the example shown in table 1, a plurality of pieces of biometric information (i.e., face feature sequences), identifiers thereof, and attribute information are recorded in the local alignment source data stored in the local alignment source database 101. Wherein the identification of the biometric information may be used as an index to the data record.
It can be understood that data comparison can be performed locally based on the comparison source shown in table 1 above, so as to realize biometric recognition (i.e. face recognition) within a certain user range.
It should be noted that table 1 is only an example of local comparison source data, and the embodiment of this specification may also use other ways to store the local comparison source data, and the local comparison source data may also include other information, which is not limited in this specification.
In an embodiment of the present description, as shown in fig. 1a, the cloud comparison source data stored by the cloud comparison source database 104 may include at least one comparison source data operation record, where each comparison source data operation record corresponds to one data operation. It should be noted that a data operation may include one or more comparison source data operation records. Wherein each data operation can be uniquely identified by a data change identifier. Therefore, each comparison source data operation record corresponds to one data change identifier; and one data change identifier may correspond to one or more comparison source data operation records. In an embodiment of the present specification, the comparing the source data operation record may include: data change identification, data operation type, operated biological characteristic information identification and operation data. The data operation types may include: one of addition, deletion, and alteration. Wherein, adding a database representing comparison source data; deleting the outbound database representing the comparison source data; and the change represents the change of the content of the comparison source data. The operation data may include biometric information and attribute information thereof related to the current data operation. For example, for the adding operation, the above operation data may include added biometric information and attribute information thereof; for the change operation, the operation data may include changed biometric information and/or attribute information (in the embodiment of the present specification, only biometric information may be changed or only attribute information corresponding to biometric information may be changed).
Table 2 below shows an example of cloud alignment source data stored by cloud alignment source database 104 according to some embodiments of the present disclosure.
Figure BDA0002381468630000091
Figure BDA0002381468630000101
TABLE 2
As can be seen from the example in table 2, a plurality of comparison source data operation records for the biometric information are recorded in the cloud comparison source data stored in the cloud comparison source database 104, where the 1 st to 3 rd comparison source data operation records correspond to the first data operation, and through this data operation, three pieces of biometric information with the biometric information identifiers of 1, 2, and 3 are added in the cloud comparison source database 104; the 4 th to 5 th comparison source data operation records correspond to the second data operation, and through the data operation, the cloud comparison source database 104 deletes the data record with the biological characteristic information identifier of 2 and adds the biological characteristic information with the biological characteristic information identifier of 4; the 6 th to 7 th comparison source data operation records correspond to the third data operation, and through the data operation, the face feature sequence is replaced in the data record with the biological feature information identifier of 3 in the cloud comparison source database 104, and the biological feature information with the biological feature information identifier of 5 is added. It can be seen that the cloud comparison source data records data operations such as ex-warehouse and in-warehouse of the biometric information as the comparison source and data content change according to the sequence of the data operations. Based on these comparison source data operation records, data update can be performed on the local comparison source data.
It should be noted that table 2 is only an example of the cloud comparison source data, and the embodiment of the present specification may also use other manners to store the cloud comparison source data, and the cloud local comparison source data may also include other information, which is not limited by the technical solution of the present specification. For example, FIG. 2 illustrates the internal structure of alignment source data storage system 200 as used in other embodiments of the present description. The comparison source data storage system 200 shown in fig. 2 also includes the local comparison source database 101, the local comparison source manager 102, the cloud comparison source manager 103, and the cloud comparison source database 104. As shown in fig. 2, in other embodiments of the present specification, the cloud comparison source database 104 may separately store comparison source data operation records included in each data operation as a table, for example, record one or more comparison source data operation records with a data change identifier 1 in the table 2 by using a single table, where each comparison source data operation record includes a data operation type, an operated biometric information identifier, and operation data; recording one or more comparison source data operation records with a data change identifier 2 in the table 2 by using a single table, wherein each comparison source data operation record comprises a data operation type, an operated biological characteristic information identifier and operation data; and recording one or more comparison source data operation records with the data change identification of 3 in the table 2 by using a single table, wherein each comparison source data operation record comprises a data operation type, an operated biological characteristic information identification and operation data … …. The data change identifier is recorded in the name of the table, for example, data change 1, data change 2, … …, data change n, which facilitates the cloud comparison to generate and extract the corresponding data from the source manager 102.
As will be understood by those skilled in the art, this data storage manner is substantially the same as the manner in which only one table is used but the data change identification field is used to identify the comparison source data operation records of different batches, and can be regarded as logically dividing the cloud comparison source database into a plurality of comparison source database sub-databases using the data change identification as an index, thereby implementing incremental update of the local comparison source data.
The cloud comparison source data records are data operation records and also record a data item of a data change identifier, so that data updating of the local comparison source data can be performed by taking each time of data operation of the cloud as a unit, namely, each time of data updating of the local comparison source data can comprise all comparison source data operation records of at least one time of data operation of the cloud. After such data update, the state of the local comparison source database corresponds to a certain data operation of the comparison source data in the cloud (corresponding to the state after the data operation and all previous data operations are performed), and may also be regarded as corresponding to a certain data change identifier. It can be understood that, for a local device newly entered into a field or newly released for use, the initial state of the local alignment source database deployed for the local device will be null, and therefore, the data change identifier corresponding to the local alignment source database may be set to "0". Based on the characteristics, the embodiment of the specification can realize incremental update of the local comparison source data, and does not need to download all cloud comparison source data in a full amount during data synchronization every time, so that hardware and network resources are saved, and the data synchronization efficiency is improved.
The process of incremental updating of the comparison source data is described below by taking the comparison source data storage system 100 shown in fig. 1a as an example.
Assume that the first 3 data records shown in table 1 have been stored in the local alignment source database 101, and the first 7 alignment source data operation records shown in table 2 have been stored in the cloud alignment source database 104, as shown in fig. 1 b. At this time, the state of the local comparison source database corresponds to the data change identifier "1" in the cloud comparison source data. That is to say, the state of the local comparison source database 101 is the state after executing 3 comparison source data operation records of the data change identifier "1" in the cloud comparison source data. At this time, the local matching source manager 102 marks the data change corresponding to the local matching source database 101 as "1".
If the local comparison source manager 102 determines that the synchronization process of the comparison source data needs to be started, the local comparison source manager 102 sends a comparison source update request to the cloud comparison source manager 103, and the comparison source update request carries a data change identifier corresponding to the local comparison source database 101, that is, "1".
After receiving the comparison source update request, the cloud comparison source manager 103 extracts, from the cloud comparison source database 104, a comparison source data operation record union set in which the data change identifier is greater than the data change identifier corresponding to the local comparison source database 101, that is, the data change identifier is greater than "1", according to the data change identifier "1" corresponding to the local comparison source database 101, so as to obtain the comparison source update data packet, as shown in fig. 1 c.
At this time, the comparison source update packet can be as shown in table 3 below. As can be seen, in this example, the comparison source update data packet generated by the cloud comparison source manager 103 only includes comparison source data operation records with data change identifiers "2" and "3" stored in the cloud comparison source database 104 (all comparison source data operation records with data change identifiers greater than 1).
Figure BDA0002381468630000121
TABLE 3
Next, the cloud comparison source manager 103 returns the generated comparison source update data packet to the local comparison source manager 102, and the local comparison source manager 102 performs data update on the local comparison source database 101 according to the comparison source update data packet, that is, operates the data records stored in the local comparison source database 101 one by one according to the comparison source data operation records included in the comparison source update data packet, as shown in fig. 1 d.
After the data operation is completed, the local comparison source manager 102 further updates the data change identifier corresponding to the local comparison source database 101 to be the maximum value of the data change identifier in the comparison source update packet, that is, "3".
Table 4 below shows the data records stored in the local alignment source database 101 after the data update operation is performed. It can be seen that after the data update, the local comparison source database 101 is synchronized with the comparison source data in the cloud.
Figure BDA0002381468630000131
TABLE 4
As can be seen from the above process, the incremental data update of the source database 101 can be locally performed in the above data update manner.
After that, if data update needs to be performed on the local comparison source database 101 again, the local comparison source manager 102 will send a comparison source update request to the cloud comparison source manager 103 again, and carry therein the data change identifier "3" corresponding to the current local comparison source database 101. In this case, the cloud comparison source manager 103 extracts the comparison source data operation record with the data change identifier greater than "3" from the cloud comparison source database 104 to generate a new comparison source update data packet, and sends the new comparison source update data packet to the local comparison source manager 102, thereby completing the next incremental data update. And continuing to realize the synchronization of the local comparison source data and the cloud comparison source data. In addition, the synchronization process of the comparison source data is an incremental updating process of the comparison source data, and all cloud comparison source data do not need to be downloaded in full during data synchronization each time, so that hardware and network resources are saved, and the data synchronization efficiency is improved.
In addition, in the embodiment of the present specification, the local comparison source manager 102 may further adjust an opportunity to initiate a comparison source data synchronization process or a synchronization period according to a service condition, so as to further improve the efficiency of data synchronization. For example, when the cloud comparison source manager 103 finds that the frequency of the outbound, inbound, or content change of the comparison source data in a certain period of time is increased or decreased, the local comparison source manager 102 may be notified. The local alignment source manager 102 adjusts the period of data synchronization according to the frequency of the alignment source data change. That is, when the frequency of the change of the comparison source data is increased, the period of data synchronization is shortened; and when the frequency of the change of the comparison source data is reduced, the data synchronization period is prolonged, so that the application requirements are better met, hardware or network resources are saved, and the data synchronization efficiency is further improved.
On the other hand, the cloud comparison source manager 103 generates a comparison source data operation record according to the outgoing and incoming of the comparison source data in the cloud or the change of the data content. In the embodiment of the present specification, the cloud comparison source manager 103 may generate comparison source data operation records in real time according to real-time changes of data, or may generate comparison source data operation records in batches according to a certain period. For the latter, the cloud comparison source manager 103 may also dynamically adjust a period of generating the comparison source data operation record according to the change frequency of the comparison source data in and out of the cloud and the change frequency of the content, thereby saving hardware resources.
Based on the foregoing technical solution, an embodiment of the present specification provides a comparison source data synchronization method, which may be executed by the local comparison source manager 102, and an implementation process of the method may be as shown in fig. 3, and may include the following steps:
in step 302, a comparison source update request is sent to the cloud comparison source manager 103, where the comparison source update request carries a data change identifier corresponding to the local comparison source database.
In the embodiment of the present disclosure, when the local alignment source manager 102 and the local alignment source database 101 managed by the local alignment source manager are put into use for the first time, the data change identifier corresponding to the local alignment source database 101 may be set to an initial value, for example, "0". After each data synchronization, the local alignment source manager 102 updates the data change identifier corresponding to the local alignment source database 101 according to the data synchronization condition, as shown in step 308 below.
In step 304, a comparison source update data packet fed back by the cloud comparison source manager 103 is received, and at least one comparison source data operation record is obtained from the comparison source update data packet. Wherein, each comparison source data operation record comprises: data change identification, data operation type, operated biological characteristic information identification and operation data.
In an embodiment of the present specification, the comparison source update data packet may be a union of at least one comparison source data operation record, and therefore, at least one comparison source data operation record may be obtained according to the comparison source update data packet.
For example, table 3 above shows an example of a comparison source update packet according to some embodiments of the present invention.
In step 306, corresponding operation is performed on the local comparison source database 101 according to the data operation type, the operated biometric information identifier, and the operation data in the at least one comparison source data operation record.
In an embodiment of the present specification, the data operation type may be addition, in which case, the operated biometric information is identified as an identifier of biometric information to be added, and the operation data includes biometric information to be added; the data operation type may be deletion, and at this time, the operated biometric information identifier is an identifier of biometric information to be deleted; or the data operation type may be a change, in which case, the operated biometric information is identified as the identifier of the biometric information to be changed, and the operation data includes the changed biometric information.
In an embodiment of the present specification, the performing, according to the data operation type, the operated biometric information identifier, and the operation data in the at least one comparison source data operation record, a corresponding operation on the local comparison source database specifically may include:
when the data operation type is adding, adding a data record using the identifier of the biological feature information to be added as an index in the local comparison source database, wherein the data record comprises: biometric information to be added;
when the data operation type is deletion, deleting the data record which takes the identifier of the biological characteristic information to be deleted as an index from the local comparison source database; or
And when the operation type of the data is changed, changing the biological characteristic information in the data record which is locally compared with the source database and takes the identifier of the biological characteristic information to be changed as the index into changed biological characteristic information.
Taking the comparison source update data packet shown in table 3 as an example, the comparison source update data packet includes 4 comparison source data operation records. In this step, after receiving the comparison source update data packet, the local comparison source manager 102 executes the 4 data operations one by one according to the records, that is, deletes the data record with the biometric information identifier 2 in the local comparison source database 101; adding the biological characteristic information with the biological characteristic information mark 4 as a new data record; replacing the human face characteristic sequence in the data record with the biological characteristic information identifier 3; finally, the biometric information with the biometric information identification 5 is added as a new data record.
In step 308, the data change identifier corresponding to the local comparison source database 101 is updated according to the data change identifier in the at least one comparison source data operation record.
In an embodiment of the present specification, the local comparison source manager 102 may update the data change identifier corresponding to the local comparison source database to be a maximum value of the data change identifier in the at least one comparison source data operation record.
Still taking the comparison source update data packet shown in table 3 as an example, the comparison source update data packet includes 4 comparison source data operation records, and the data change identifiers in the 4 comparison source data operation records are respectively "2" and "3", so in this step, the local comparison source manager 102 identifies the data change identifier corresponding to the update local comparison source database 101 as "3".
In an embodiment of the present disclosure, the local comparison source manager 102 may send a comparison source update request to the cloud comparison source manager 103 at regular time according to a set synchronization period, so as to implement timing synchronization of comparison source data.
In an embodiment of the present specification, in order to implement timely synchronization of comparison source data, when a new comparison source data operation record is generated, the cloud comparison source manager 103 may send a comparison source data update notification message to the local comparison source manager 102 to notify the local comparison source manager 102 that the new comparison source data needs to be synchronized. In this case, the local alignment source manager 102 may immediately start the data synchronization process shown in fig. 2, so as to implement real-time synchronization of the alignment source data. In addition, the local comparison source manager 102 may further adjust the set synchronization period according to the received comparison source data update notification message, so as to comprehensively consider timeliness of data synchronization and usage efficiency of system resources. For example, when the frequency of the received comparison source data update notification message is higher and/or the amount of data of the comparison source data which needs to be updated is indicated to be larger in the received comparison source data update notification message, the synchronization period may be shortened; when the frequency of the received comparison source data updating notification message is low and/or the received comparison source data updating notification message indicates that the data quantity of the comparison source data needing to be updated is small, the period of data synchronization can be prolonged, so that the method can better adapt to the application requirement, save hardware or network resources and further improve the efficiency of data synchronization.
In other embodiments of the present disclosure, in order to implement timely synchronization of comparison source data, when a new comparison source data operation record is generated, the cloud comparison source manager 103 may send a comparison source data update push message to the local comparison source manager 102, where the comparison source update push message includes a second comparison source update data packet. In this case, the local comparison source manager 102 obtains at least one comparison source data operation record from the second comparison source update data packet included in the comparison source data update push message, and continues to execute the subsequent steps 306 and 308, thereby implementing real-time synchronization of the comparison source data.
Based on the above description, the embodiment of the present specification further provides a comparison source data synchronization method, which may be executed by the cloud comparison source manager 103, and an implementation process of the method may be as shown in fig. 4, and may include the following steps:
in step 402, a comparison source update request from the local comparison source manager 102 is received, and a data change identifier corresponding to the local comparison source database carried in the comparison source update request is obtained.
In step 404, at least one comparison source data operation record is extracted from the cloud comparison source database 104 according to the data change identifier corresponding to the local comparison source database, where each comparison source data operation record includes: data change identification, data operation type, operated biological characteristic information identification and operation data.
In an embodiment of the present specification, the cloud comparison source manager 103 may extract at least one comparison source data operation record with a data change identifier larger than the data change identifier corresponding to the local comparison source database from the cloud comparison source database 104.
In step 406, a comparison source update data packet is generated according to the extracted at least one operation record.
In an embodiment of the present specification, the generating a comparison source update data packet according to the extracted at least one operation record may include: and solving a union set of the extracted at least one operation record to obtain a comparison source updating data packet.
In step 408, the comparison source update packet is fed back to the local comparison source manager 102, so that the local comparison source manager 102 performs data update on the local comparison source database 101 according to the comparison source update packet.
In an embodiment of the present disclosure, the cloud comparison source manager 103 may generate one or more comparison source data operation records according to the outbound and inbound of the comparison source data and the content change condition according to a set update cycle, and store the comparison source data operation records in the cloud comparison source database 104. Specifically, a data change identifier may be set for the data operation at first, and the data change identifier may be set incrementally according to existing records in the source database compared by the current cloud. One or more comparison source data operation records generated by the data operation share the data change identifier. And then, generating one or more fields such as data operation types, operated biological characteristic information identifiers, operation data and the like in the comparison source data operation records according to the ex-warehouse and in-warehouse of the comparison source data and the content change condition. For example, when there is comparison source data to be put in storage, a comparison source data operation record with an operation type of addition is generated, and the operated biological characteristic information identifier in the comparison source data operation record is the identifier of the added biological characteristic information; and the operation data in the comparison source data operation record is added biological characteristic information and attribute information thereof. When the comparison source data is exported, a comparison source data operation record with the operation type of deletion is generated, and the operated biological characteristic information identifier in the comparison source data operation record is the identifier of the deleted biological characteristic information. When the content of the comparison source data is changed, generating a comparison source data operation record with the operation type of change, wherein the operated biological characteristic information identifier in the comparison source data operation record is the identifier of the changed biological characteristic information; and the operation data in the comparison source data operation record is changed biological characteristic information and attribute information thereof.
In the embodiments of the present specification, the update period may be dynamically adjusted according to the frequency of comparison of the source data to be exported or imported or the frequency of content change. For example, when the cloud comparison source manager 103 finds that the frequency of the outbound, inbound, or content change of the comparison source data in a certain time period is increased, the update period may be shortened; and when the frequency of the comparison of the ex-warehouse and in-warehouse of the source data or the content change is reduced, the updating period is prolonged, so that the method can better adapt to the application requirement, save hardware or network resources and further improve the data synchronization efficiency.
In an embodiment of the present specification, in order to implement timely synchronization of comparison source data, when a new comparison source data operation record is generated, the cloud comparison source manager 103 may send a comparison source data update notification message to the local comparison source manager 102 to notify the local comparison source manager 102 that the new comparison source data needs to be synchronized. Or when a new comparison source data operation record is generated, the cloud comparison source manager 103 may further send a comparison source data update push message to the local comparison source manager 102, where the comparison source data update push message includes a comparison source update data packet generated by the cloud comparison source manager 103 according to the new comparison source data operation record.
Fig. 5 shows an implementation process of the alignment source data synchronization method according to the embodiment of the present disclosure. The method is executed by the local comparison source manager 102 and the cloud comparison source manager 103 together.
In step 502, the local comparison source manager 102 sends a comparison source update request to the cloud comparison source manager 103, where the comparison source update request carries a data change identifier corresponding to the local comparison source database.
In step 504, the cloud comparison source manager 103 receives the comparison source update request from the local comparison source manager 102, and obtains the data change identifier corresponding to the local comparison source database carried in the comparison source update request.
In step 506, the cloud comparison source manager 103 extracts at least one comparison source data operation record from the cloud comparison source database 104 according to the data change identifier corresponding to the local comparison source database.
In step 508, the cloud comparison source manager 103 generates a comparison source update data packet according to the extracted at least one operation record.
In step 510, the cloud comparison source manager 103 returns the comparison source update packet to the local comparison source manager 102.
In step 512, the local comparison source manager 102 receives the comparison source update data packet fed back by the cloud comparison source manager 103, and obtains at least one comparison source data operation record therefrom.
In step 514, the local matching source manager 102 performs a data operation on the local matching source database 101 according to the at least one matching source data operation record.
In step 516, the local comparison source manager 102 updates the data change identifier corresponding to the local comparison source database 101 according to the at least one comparison source data operation record.
In the embodiment of the present disclosure, the method for implementing steps 502-516 may refer to the method shown in fig. 3 and 4.
Corresponding to the comparison source data synchronization method, an embodiment of the present specification further provides the local comparison source manager 102, an internal structure of which is shown in fig. 6, and mainly includes:
a comparison source update request sending module 602, configured to send a comparison source update request to the cloud comparison source manager 103, where the comparison source update request includes a data change identifier corresponding to a local comparison source database;
a comparison source update data packet receiving module 604, configured to receive a comparison source update data packet fed back by the cloud comparison source manager 103, and obtain at least one comparison source data operation record from the comparison source update data packet, where each comparison source data operation record includes: data change identification, data operation type, operated biological characteristic information identification and operation data;
a data updating module 606, configured to perform corresponding operations on the local comparison source database 101 according to the data operation type, the operated biometric information identifier, and the operation data in the at least one comparison source data operation record; and
the data change identifier updating module 608 is configured to update the data change identifier corresponding to the local comparison source database 101 according to the data change identifier in the at least one comparison source data operation record.
In an embodiment of the present specification, the local alignment source manager 102 may further include: the synchronization period updating module is used for setting a synchronization period for the comparison source updating request sending module to send the comparison source updating request to the cloud comparison source manager; receiving a comparison source data updating notification message sent by the cloud comparison source manager; and dynamically adjusting the synchronization period according to the received comparison source data updating notification message.
In an embodiment of the present specification, the local alignment source manager 102 may further include: the passive updating module is used for receiving a comparison source data updating push message sent by the cloud comparison source manager, wherein the comparison source data updating push message comprises a second comparison source updating data packet; acquiring at least one comparison source data operation record from the second comparison source update data packet; wherein, each comparison source data operation record comprises: data change identification, data operation type, operated biological characteristic information identification and operation data; and the triggering data updating module and the data change identification updating module perform data updating according to the at least one comparison source data operation record.
In the embodiment of the present specification, the method for implementing the functions of the modules of the local alignment source manager 102 may refer to the method described in the foregoing fig. 1-3, and a description thereof will not be repeated here.
Furthermore, in the embodiment of the present specification, the local alignment source manager 102 may be regarded as an electronic device, and therefore, the local alignment source manager 102 may include: memory 612, processor 614, input/output interface 616, communication interface 618, and bus 620. Processor 614, memory 612, input/output interface 616, and communication interface 618 are communicatively coupled to each other within the device via bus 620.
The Memory 612 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random access Memory), a static storage device, a dynamic storage device, or the like. The memory 612 may store an operating system and other application programs, and may also store various modules of the server provided in the embodiment of the present specification, for example, the comparison source update request sending module 602, the comparison source update data packet receiving module 604, the data updating module 606, the data change identifier updating module 608, and the like, and when the technical solution provided in the embodiment of the present specification is implemented by software or firmware, related program codes are stored in the memory 612 and invoked by the processor 614 for execution.
Corresponding to the comparison source data synchronization method, an embodiment of the present specification further provides the cloud comparison source manager 103, an internal structure of which is shown in fig. 7, and mainly includes:
a comparison source update request receiving module 702, configured to receive a comparison source update request from the local comparison source manager 102, and obtain a data change identifier corresponding to the local comparison source database from the comparison source update request receiving module;
a data extracting module 704, configured to extract at least one comparison source data operation record from the cloud comparison source database 104 according to the data change identifier corresponding to the local comparison source database, where each comparison source data operation record includes: data change identification, data operation type, operated biological characteristic information identification and operation data;
and a comparison source update data packet generation module 706, configured to generate a comparison source update data packet according to the extracted at least one operation record.
A comparison source update packet issuing module 708, configured to feed the comparison source update packet back to the local comparison source manager 102, so that the local comparison source manager 102 performs data update on the local comparison source database 101 according to the comparison source update packet.
In an embodiment of the present disclosure, the cloud comparison source manager 103 may further include: the comparison source data operation record updating module is used for setting an updating period; generating at least one comparison source data operation record according to the ex-warehouse, in-warehouse or content change condition of the comparison source data according to the update period, and storing the comparison source data operation record in a cloud comparison source database; and adjusting the updating period according to the frequency of the comparison source data in and out of the database or the content change.
In an embodiment of the present disclosure, the cloud comparison source manager 103 may further include: an update notification module, configured to send a comparison source data update notification message to the local comparison source manager 102 when a new comparison source data operation record is generated; or sending a comparison source data update push message to the local comparison source manager 101, where the comparison source data update push message includes a comparison source update data packet generated according to the new comparison source data operation record.
In the embodiment of the present disclosure, the method for implementing the functions of the cloud comparing source manager 103 may refer to the methods described in fig. 1, 2, and 4, and will not be described again here.
In addition, in an embodiment of the present disclosure, the cloud comparison source manager 103 may be regarded as an electronic device, and therefore, the cloud comparison source manager 103 may include: memory 712, processor 714, input/output interface 716, communication interface 718, and bus 720. Processor 714, memory 712, input/output interface 716, and communication interface 718 are communicatively coupled to each other within the device via bus 720.
The Memory 712 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random access Memory), a static storage device, a dynamic storage device, or the like. The memory 712 may store an operating system and other application programs, and may also store various modules of the server provided in the embodiment of the present specification, such as the comparison source update request receiving module 702, the data extracting module 704, the comparison source update data packet generating module 706, the comparison source update data packet issuing module 708, and the like, and when the technical solution provided in the embodiment of the present specification is implemented by software or firmware, the relevant program codes are stored in the memory 712 and invoked and executed by the processor 714.
The processors 614 and 714 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits, and configured to execute related programs to implement the technical solutions provided in the embodiments of the present disclosure.
The input/ output interfaces 616 and 716 may be used to connect input/output modules to enable information input and output. The i/o module may be configured as a component in a device (not shown) or may be external to the device to provide a corresponding function. The input devices may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output devices may include a display, a speaker, a vibrator, an indicator light, etc.
Communication interfaces 618 and 718 are used for connecting communication modules (not shown) to enable the device to interact with other devices for communication. The communication module can realize communication in a wired mode (for example, USB, network cable, etc.), and can also realize communication in a wireless mode (for example, mobile network, WIFI, bluetooth, etc.).
Buses 620 and 720 include a pathway for transferring information between various components of the device, such as the processor, memory, input/output interfaces, and communication interfaces.
It should be noted that although the above-described device shows only a processor, a memory, an input/output interface, a communication interface and a bus, in a specific implementation, the device may also include other components necessary for normal operation. In addition, those skilled in the art will appreciate that the above-described apparatus may also include only those components necessary to implement the embodiments of the present description, and not necessarily all of the components shown in the figures.
By the comparison source data synchronization method and the comparison source data synchronization device, comparison source data can be stored locally, local data comparison is completed, and therefore local biological feature identification is achieved. In addition, the operation records of the data are recorded in the cloud comparison source data, and the data change identification corresponding to the data operation records is also recorded, so that the data update of the local comparison source data can be performed by taking each time of data operation of the cloud as a unit, the incremental update of the local comparison source data can be realized, and all the cloud comparison source data do not need to be downloaded in full during data synchronization every time, so that hardware and network resources are saved, and the data synchronization efficiency is improved.
Computer-readable media of the present embodiments, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the electronic device embodiment and the computer storage medium embodiment, since they are substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to part of the description of the method embodiment.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these examples; within the context of this description, features in the above embodiments or in different embodiments may also be combined, steps may be implemented in any order, and there are many other variations of the different aspects of this description as described above, which are not provided in detail for the sake of brevity.
In addition, well-known power/ground connections to Integrated Circuit (IC) chips and other components may or may not be shown in the provided figures for simplicity of illustration and discussion, and so as not to obscure the description. Furthermore, devices may be shown in block diagram form in order to avoid obscuring the description, and also in view of the fact that specifics with respect to implementation of such block diagram devices are highly dependent upon the platform within which the description is to be implemented (i.e., specifics should be well within purview of one skilled in the art). Where specific details (e.g., circuits) are set forth in order to describe example embodiments of the specification, it should be apparent to one skilled in the art that the specification can be practiced without, or with variation of, these specific details. Accordingly, the description is to be regarded as illustrative instead of restrictive.
While the present description has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic ram (dram)) may use the discussed embodiments.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments of the present description are intended to embrace all such alternatives, modifications and variances that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalents, improvements, and the like that may be made within the spirit and principles of the disclosure are intended to be included within the scope of the disclosure.

Claims (19)

1. A method for synchronizing comparison source data comprises the following steps:
sending a comparison source updating request to a cloud comparison source manager, wherein the comparison source updating request comprises a data change identifier corresponding to a local comparison source database;
after receiving a comparison source update data packet fed back by a cloud comparison source manager, obtaining at least one comparison source data operation record from the comparison source update data packet, wherein each comparison source data operation record comprises: data change identification, data operation type, operated biological characteristic information identification and operation data;
performing corresponding operation on the local comparison source database according to the data operation type, the operated biological characteristic information identifier and the operation data in the at least one comparison source data operation record; and
and updating the data change identifier corresponding to the local comparison source database according to the data change identifier in the at least one comparison source data operation record.
2. The method of claim 1, wherein the sending a comparison source update request to a cloud comparison source manager comprises: sending a comparison source updating request to a cloud comparison source manager according to a set synchronization period; and
the method further comprises:
receiving a comparison source data updating notification message sent by the cloud comparison source manager; and
and dynamically adjusting the set synchronization period according to the received comparison source data updating notification message.
3. The method of claim 1, wherein, for each alignment source data operation record:
the data operation type is addition, the operated biological characteristic information mark is a mark of biological characteristic information to be added, and the operation data comprises the biological characteristic information to be added;
the data operation type is deletion, and the operated biological characteristic information mark is a mark of biological characteristic information to be deleted; or
The data operation type is change, the operated biological characteristic information is marked as the mark of the biological characteristic information to be changed, and the operation data comprises the changed biological characteristic information.
4. The method of claim 3, wherein the performing corresponding operations on the local alignment source database according to the data operation type, the operated biometric information identifier, and the operation data in the at least one alignment source data operation record comprises:
when the data operation type is adding, adding a data record indexed by the identifier of the biological feature information to be added to the local comparison source database, wherein the data record comprises: biometric information to be added;
when the data operation type is deletion, deleting the data record with the identifier of the biological characteristic information to be deleted as an index from the local comparison source database; or
And when the data operation type is changed, changing the biological characteristic information in the data record which is indexed by the identifier of the biological characteristic information to be changed in the local comparison source database into the changed biological characteristic information.
5. The method of claim 1, wherein the updating the data change identifier corresponding to the local comparison source database according to the data change identifier in the at least one comparison source data operation record includes: and updating the data change identifier corresponding to the local comparison source database to be the maximum value of the data change identifier in the at least one comparison source data operation record.
6. The method of claim 1, wherein the method further comprises:
receiving a comparison source data updating push message sent by the cloud comparison source manager, wherein the comparison source data updating push message comprises a second comparison source updating data packet;
acquiring at least one comparison source data operation record from the second comparison source update data packet; wherein, each comparison source data operation record comprises: data change identification, data operation type, operated biological characteristic information identification and operation data;
performing corresponding operation on the local comparison source database according to the data operation type, the operated biological characteristic information identifier and the operation data in the at least one comparison source data operation record; and
and updating the data change identifier corresponding to the local comparison source database according to the data change identifier in the at least one comparison source data operation record.
7. A method for synchronizing comparison source data comprises the following steps:
after receiving a comparison source updating request from a local comparison source manager, acquiring a data change identifier corresponding to a local comparison source database;
extracting at least one comparison source data operation record from the cloud comparison source database according to the data change identifier corresponding to the local comparison source database, wherein each comparison source data operation record comprises: data change identification, data operation type, operated biological characteristic information identification and operation data;
generating a comparison source updating data packet according to the at least one operation record; and
and feeding back the comparison source updating data packet to the local comparison source manager, so that the local comparison source manager performs data updating on the local comparison source database according to the comparison source updating data packet.
8. The method of claim 7, wherein the extracting at least one comparison source data operation record from the cloud comparison source database according to the data change identifier corresponding to the local comparison source database comprises: and extracting at least one comparison source data operation record with a data change identifier larger than the data change identifier corresponding to the local comparison source database from the cloud comparison source database.
9. The method of claim 7, wherein the generating a comparison source update data packet from the at least one operation record comprises: and solving a union set of the at least one operation record to obtain the comparison source updating data packet.
10. The method of claim 7, wherein the method further comprises:
generating at least one comparison source data operation record according to the conditions of warehouse-out, warehouse-in or content change of the comparison source data according to a set updating period, and storing the comparison source data operation record in a cloud comparison source database; and
and adjusting the updating period according to the frequency of the comparison of the source data to be exported or imported or the content to be changed.
11. The method of claim 10, wherein the method further comprises:
when a new comparison source data operation record is generated, sending a comparison source data updating notification message to the local comparison source manager; or
And when a new comparison source data operation record is generated, sending a comparison source data updating push message to the local comparison source manager, wherein the comparison source data updating push message comprises a comparison source updating data packet generated according to the new comparison source data operation record.
12. A local alignment source manager, comprising:
the comparison source updating request sending module is used for sending a comparison source updating request to the cloud comparison source manager, wherein the comparison source updating request comprises a data change identifier corresponding to a local comparison source database;
the comparison source update data packet receiving module is used for receiving a comparison source update data packet fed back by the cloud comparison source manager, and acquiring at least one comparison source data operation record from the comparison source update data packet, wherein each comparison source data operation record comprises: data change identification, data operation type, operated biological characteristic information identification and operation data;
the data updating module is used for carrying out corresponding operation on the local comparison source database according to the data operation type, the operated biological characteristic information identifier and the operation data in the at least one comparison source data operation record; and
and the data change identifier updating module is used for updating the data change identifier corresponding to the local comparison source database according to the data change identifier in the at least one comparison source data operation record.
13. The local alignment source manager of claim 12, further comprising:
the synchronization period updating module is used for setting a synchronization period for the comparison source updating request sending module to send the comparison source updating request to the cloud comparison source manager; receiving a comparison source data updating notification message sent by the cloud comparison source manager; and dynamically adjusting the synchronization period according to the received comparison source data updating notification message.
14. The local alignment source manager of claim 12, further comprising:
the passive updating module is used for receiving a comparison source data updating push message sent by the cloud comparison source manager, wherein the comparison source data updating push message comprises a second comparison source updating data packet; acquiring at least one comparison source data operation record from the second comparison source update data packet; wherein, each comparison source data operation record comprises: data change identification, data operation type, operated biological characteristic information identification and operation data; and the triggering data updating module and the data change identification updating module perform data updating according to the at least one comparison source data operation record.
15. A cloud comparison source manager, comprising:
the comparison source updating request receiving module is used for receiving a comparison source updating request from the local comparison source manager and acquiring a data change identifier corresponding to the local comparison source database;
the data extraction module is used for extracting at least one comparison source data operation record from the cloud comparison source database according to the data change identifier corresponding to the local comparison source database, wherein each comparison source data operation record comprises: data change identification, data operation type, operated biological characteristic information identification and operation data;
the comparison source updating data packet generating module is used for generating a comparison source updating data packet according to the at least one operation record; and
and the comparison source update data packet issuing module is used for feeding the comparison source update data packet back to the local comparison source manager, so that the local comparison source manager performs data update on the local comparison source database according to the comparison source update data packet.
16. The cloud comparison source manager of claim 15, further comprising:
the comparison source data operation record updating module is used for setting an updating period; generating at least one comparison source data operation record according to the ex-warehouse, in-warehouse or content change condition of the comparison source data according to the update period, and storing the comparison source data operation record in a cloud comparison source database; and adjusting the updating period according to the frequency of the comparison source data in and out of the database or the content change.
17. The cloud comparison source manager of claim 16, further comprising:
the updating notification module is used for sending a comparison source data updating notification message to the local comparison source manager when a new comparison source data operation record is generated; or sending a comparison source data updating push message to the local comparison source manager, wherein the comparison source data updating push message comprises a comparison source updating data packet generated according to the new comparison source data operation record.
18. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, wherein the processor implements the method according to any of claims 1 to 11 when executing the program.
19. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 11.
CN202010085922.2A 2020-02-10 2020-02-10 Method and device for synchronizing comparison source data, electronic equipment and storage medium Active CN111339107B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010085922.2A CN111339107B (en) 2020-02-10 2020-02-10 Method and device for synchronizing comparison source data, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010085922.2A CN111339107B (en) 2020-02-10 2020-02-10 Method and device for synchronizing comparison source data, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111339107A true CN111339107A (en) 2020-06-26
CN111339107B CN111339107B (en) 2023-07-28

Family

ID=71181461

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010085922.2A Active CN111339107B (en) 2020-02-10 2020-02-10 Method and device for synchronizing comparison source data, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111339107B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112733787A (en) * 2021-01-20 2021-04-30 青岛以萨数据技术有限公司 Method, device, storage medium and system for detecting illegal behaviors of drivers and passengers

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932439A (en) * 2012-10-26 2013-02-13 华为终端有限公司 Method and device for synchronizing content
CN103533011A (en) * 2013-03-29 2014-01-22 Tcl集团股份有限公司 Intelligent terminal data configuration method and system based on cloud terminal
CN105426403A (en) * 2015-10-30 2016-03-23 努比亚技术有限公司 Bookmark synchronization method and apparatus
CN106973099A (en) * 2017-03-28 2017-07-21 广东欧珀移动通信有限公司 A kind of data-updating method, apparatus and system
CN108062399A (en) * 2017-12-21 2018-05-22 新华三大数据技术有限公司 Data processing method and device
CN109376141A (en) * 2018-08-31 2019-02-22 阿里巴巴集团控股有限公司 A kind of data migration method and device
CN110147380A (en) * 2019-05-23 2019-08-20 腾讯科技(成都)有限公司 Data-updating method, device, server and storage medium
CN110460664A (en) * 2019-08-13 2019-11-15 深圳市商汤科技有限公司 Information synchronization method and device, electronic equipment and storage medium
CN110569311A (en) * 2019-10-30 2019-12-13 上海商魁信息科技有限公司 Data synchronization method and device for database and computer storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102932439A (en) * 2012-10-26 2013-02-13 华为终端有限公司 Method and device for synchronizing content
CN103533011A (en) * 2013-03-29 2014-01-22 Tcl集团股份有限公司 Intelligent terminal data configuration method and system based on cloud terminal
CN105426403A (en) * 2015-10-30 2016-03-23 努比亚技术有限公司 Bookmark synchronization method and apparatus
CN106973099A (en) * 2017-03-28 2017-07-21 广东欧珀移动通信有限公司 A kind of data-updating method, apparatus and system
CN108062399A (en) * 2017-12-21 2018-05-22 新华三大数据技术有限公司 Data processing method and device
CN109376141A (en) * 2018-08-31 2019-02-22 阿里巴巴集团控股有限公司 A kind of data migration method and device
CN110147380A (en) * 2019-05-23 2019-08-20 腾讯科技(成都)有限公司 Data-updating method, device, server and storage medium
CN110460664A (en) * 2019-08-13 2019-11-15 深圳市商汤科技有限公司 Information synchronization method and device, electronic equipment and storage medium
CN110569311A (en) * 2019-10-30 2019-12-13 上海商魁信息科技有限公司 Data synchronization method and device for database and computer storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112733787A (en) * 2021-01-20 2021-04-30 青岛以萨数据技术有限公司 Method, device, storage medium and system for detecting illegal behaviors of drivers and passengers

Also Published As

Publication number Publication date
CN111339107B (en) 2023-07-28

Similar Documents

Publication Publication Date Title
CN110569311B (en) Data synchronization method and device for database and computer storage medium
CN112527816B (en) Data blood relationship analysis method, system, computer equipment and storage medium
CN109597822B (en) User data storage and query method and user data processing device
CN108959430B (en) Advertisement promotion data acquisition method, device and equipment
CN109636368A (en) Internet is called a taxi method, apparatus, equipment of calling a taxi and computer readable storage medium
CN109636582B (en) Credit information management method, apparatus, device and storage medium
WO2015106728A1 (en) Data processing method and system
CN112468409A (en) Access control method, device, computer equipment and storage medium
US11893829B2 (en) Method for deploying a face sample library and method and apparatus for business processing based on face recognition
CN112036125B (en) Document management method and device and computer equipment
CN111863178A (en) Method, device, medium and electronic device for issuing medical report
CN113127829A (en) Business processing method and system, wearable device and computer readable storage medium
CN111339107B (en) Method and device for synchronizing comparison source data, electronic equipment and storage medium
CN107656959A (en) A kind of message leaving method, device and message equipment
CN108520401B (en) User list management method, device, platform and storage medium
CN116956326A (en) Authority data processing method and device, computer equipment and storage medium
CN108667647B (en) Method and device for setting device parameters and server
CN111612947A (en) Method, equipment and storage medium for processing communication abnormity of intelligent lock
CN111382189A (en) Heterogeneous data collision analysis method, terminal device and storage medium
CN111221803B (en) Feature library management method and coprocessor
CN114547184A (en) Personnel information synchronization method, terminal device and storage medium
CN114374737A (en) Message pushing method and device, computer equipment and storage medium
CN113467823A (en) Configuration information acquisition method, device, system and storage medium
CN113255505A (en) Certificate photo generation method, device, equipment and storage medium
CN106547626B (en) Method for balancing server in peer-to-peer architecture and server

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant