CN112860797A - Database synchronization method and device, storage medium and equipment - Google Patents

Database synchronization method and device, storage medium and equipment Download PDF

Info

Publication number
CN112860797A
CN112860797A CN202110184605.0A CN202110184605A CN112860797A CN 112860797 A CN112860797 A CN 112860797A CN 202110184605 A CN202110184605 A CN 202110184605A CN 112860797 A CN112860797 A CN 112860797A
Authority
CN
China
Prior art keywords
updating
cloud
terminal
incremental
version number
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.)
Pending
Application number
CN202110184605.0A
Other languages
Chinese (zh)
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.)
Shanghai Sensetime Intelligent Technology Co Ltd
Original Assignee
Shanghai Sensetime Intelligent 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 Shanghai Sensetime Intelligent Technology Co Ltd filed Critical Shanghai Sensetime Intelligent Technology Co Ltd
Priority to CN202110184605.0A priority Critical patent/CN112860797A/en
Publication of CN112860797A publication Critical patent/CN112860797A/en
Priority to PCT/CN2021/121416 priority patent/WO2022170771A1/en
Pending legal-status Critical Current

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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • 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
    • G06V40/161Detection; Localisation; Normalisation
    • G06V40/166Detection; Localisation; Normalisation using acquisition arrangements
    • 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
    • G06V40/168Feature extraction; Face representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/40Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
    • G06Q20/401Transaction verification
    • G06Q20/4014Identity check for transactions
    • G06Q20/40145Biometric identity checks
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/30Individual registration on entry or exit not involving the use of a pass
    • G07C9/32Individual registration on entry or exit not involving the use of a pass in combination with an identity check
    • G07C9/37Individual registration on entry or exit not involving the use of a pass in combination with an identity check using biometric data, e.g. fingerprints, iris scans or voice recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Oral & Maxillofacial Surgery (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Library & Information Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present disclosure provides a database synchronization method and apparatus, a storage medium, and a device, wherein the method includes: receiving an incremental updating downloading request sent by a terminal; the incremental updating downloading request is used for requesting to download a data packet for incremental updating; determining a target increment updating data packet which is requested to be downloaded and corresponds to the increment updating downloading request; and sending the target increment updating data packet to the terminal.

Description

Database synchronization method and device, storage medium and equipment
Technical Field
The present disclosure relates to the field of data processing, and in particular, to a database synchronization method and apparatus, a storage medium, and a device.
Background
At present, in some off-line scenes for face comparison, once the face database at the cloud end changes, in order to ensure the accuracy of synchronization, a full-scale synchronization mode is mostly adopted, the bandwidth overhead is high, and the synchronization time is long.
Disclosure of Invention
The disclosure provides a database synchronization method and device, a storage medium and equipment.
According to a first aspect of the embodiments of the present disclosure, there is provided a database synchronization method, including: receiving an incremental updating downloading request sent by a terminal; the incremental updating downloading request is used for requesting to download a data packet for incremental updating; determining a target increment updating data packet which is requested to be downloaded and corresponds to the increment updating downloading request; and sending the target increment updating data packet to the terminal.
In some optional embodiments, the incremental update download request comprises a first version number and a first information digest; the first version number is the version number of a database currently stored by the terminal, and the first information abstract is an information abstract obtained based on the database content corresponding to the first version number; the determining of the target incremental update data packet of the request corresponding to the incremental update download request includes: determining whether the terminal is allowed to perform incremental updating or not according to the first information abstract and the first version number; in response to determining that the terminal is allowed to perform incremental updating, determining the target incremental updating data packet according to the first version number and the second version number; and the second version number is the latest version number in at least one database version currently stored in the cloud.
In some optional embodiments, the method further comprises: in response to determining that the terminal is not allowed to perform incremental updating, sending target indication information to the terminal; the target indication information is used for indicating that the cloud end does not allow the terminal to perform incremental updating.
In some optional embodiments, the determining, according to the first information digest and the first version number, whether to allow the terminal to perform incremental updating includes: determining a second information abstract corresponding to the first version number according to the corresponding relation between the pre-stored information abstract and the version number; and in response to determining that the first information summary is matched with the second information summary, determining that incremental updating is allowed for the terminal, otherwise determining that incremental updating is not allowed for the terminal.
In some optional embodiments, the determining the target incremental update packet according to the first version number and the second version number includes: and determining the target incremental updating data packet according to the first version number, the second version number and an incremental updating data packet corresponding to every two pre-stored adjacent version numbers.
In some optional embodiments, the method further comprises: sending a second version number and a third information abstract to the terminal; the second version number is the latest version number in at least one database version currently stored in the cloud, and the third information summary is an information summary obtained based on the database content corresponding to the second version number.
In some optional embodiments, before receiving the incremental update download request sent by the terminal, the method further includes: receiving a request to be updated sent by the terminal; and the request to be updated is used for requesting incremental updating.
In some optional embodiments, the method further comprises: determining a first number of terminals sending the request to be updated within a first time period; sending the first number and the second number to the terminal sending the request to be updated; and the second number is the maximum number of terminals which are supported by the cloud in the first time period and are used for performing incremental updating and downloading.
In some optional embodiments, the method further comprises: receiving a full-quantity updating downloading request sent by the terminal; the full-update downloading request is used for requesting to download a data packet for performing full-update; sending a target full-volume updating data packet to the terminal according to the full-volume updating downloading request; the target full-volume updating data packet comprises full-volume data corresponding to the latest version in at least one database version currently stored by the cloud.
In some optional embodiments, the database includes an underlying library of feature information needed to perform the visual task processing.
According to a second aspect of the embodiments of the present disclosure, there is provided a database synchronization method, including: sending an incremental updating downloading request to the cloud; the incremental updating downloading request is used for requesting to download a data packet for incremental updating; downloading a target increment updating data packet sent by the cloud based on the increment updating downloading request; and performing incremental updating on the currently stored database content based on the target incremental updating data packet.
In some optional embodiments, the incremental update download request comprises a first version number and a first information digest; the first version number is the version number of a database currently stored by the terminal, and the first information abstract is an information abstract obtained based on the database content corresponding to the first version number.
In some optional embodiments, the method further comprises: receiving a second version number and a third information abstract sent by the cloud; the second version number is the latest version number in at least one database version currently stored in the cloud, and the third information summary is an information summary obtained based on the database content corresponding to the second version number; determining a fourth information summary based on the database content after the incremental updating; and in response to determining that the third information digest is matched with the fourth information digest, determining that incremental updating is successful, and updating the version number of the currently stored database to the second version number.
In some optional embodiments, the method further comprises: and in response to the determination of the failure of the incremental update, sending an incremental update downloading request to the cloud again, and performing the incremental update on the currently stored database content again on the basis of a target incremental update data packet sent by the cloud again.
In some optional embodiments, the method further comprises: responding to target indication information sent by the cloud end or determining that the failure times of incremental updating reach preset times, and sending a full-updating downloading request to the cloud end; the target indication information is used for indicating that the cloud end does not allow the terminal to perform incremental updating, and the full-updating downloading request is used for requesting to download a data packet for performing full updating; after downloading a target full-amount updating data packet sent by the cloud, performing full-amount updating on the currently stored database content based on the target full-amount updating data packet; the target full-volume updating data packet comprises full-volume data corresponding to the latest version in at least one database version currently stored by the cloud.
In some optional embodiments, before sending the request for downloading the incremental update to the cloud, the method further comprises: sending a request to be updated to the cloud; the request to be updated is used for requesting incremental updating; receiving a first number and a second number sent by the cloud end; the first number is the number of terminals which send requests to be updated and are received by the cloud end in a first time period, and the second number is the maximum number of terminals which are supported by the cloud end in the first time period and are used for carrying out incremental updating and downloading; in response to determining that the first number is less than or equal to the second number, determining to send the incremental update download request to the cloud for a second time period; wherein the second time period is a next time period adjacent to the first time period.
In some optional embodiments, the method further comprises: in response to determining that the first number is greater than the second number, determining a first probability value of sending the incremental update download request to the cloud within the second time period, and/or sending a second probability value of the request to be updated to the cloud again within the second time period; and sending the incremental update downloading request to the cloud end within the second time period based on the first probability value, or sending the request to be updated to the cloud end again within the second time period based on the second probability value.
In some optional embodiments, the database comprises an underlying library of feature information required to perform a visual task process; the method further comprises the following steps: acquiring characteristic information to be processed; performing visual task processing according to the feature information to be processed and the latest database content currently stored by the terminal to obtain a visual task processing result; and executing corresponding target operation based on the visual task processing result.
In some optional embodiments, the visual task processing comprises face recognition; the target operation includes at least one of: door control switch operation and payment operation.
According to a third aspect of the embodiments of the present disclosure, there is provided a database synchronization apparatus, including: the first receiving module is used for receiving an incremental updating downloading request sent by a terminal; the incremental updating downloading request is used for requesting to download a data packet for incremental updating; the first determining module is used for determining a target increment updating data packet which is requested to be downloaded and corresponds to the increment updating downloading request; and the first sending module is used for sending the target increment updating data packet to the terminal.
In some optional embodiments, the incremental update download request comprises a first version number and a first information digest; the first version number is the version number of a database currently stored by the terminal, and the first information abstract is an information abstract obtained based on the database content corresponding to the first version number; the first determining module includes: the first determining submodule is used for determining whether the terminal is allowed to carry out incremental updating or not according to the first information abstract and the first version number; the second determining submodule is used for responding to the determination that the terminal is allowed to carry out incremental updating, and determining the target incremental updating data packet according to the first version number and the second version number; and the second version number is the latest version number in at least one database version currently stored in the cloud.
In some optional embodiments, the apparatus further comprises: a third sending module, configured to send target indication information to the terminal in response to determining that the incremental update by the terminal is not allowed; the target indication information is used for indicating that the cloud end does not allow the terminal to perform incremental updating.
In some optional embodiments, the first determining sub-module comprises: the first determining unit is used for determining a second information abstract corresponding to the first version number according to the corresponding relation between the pre-stored information abstract and the version number; and a second determining unit, configured to determine that the terminal is allowed to perform incremental updating in response to determining that the first information digest is matched with the second information digest, and otherwise determine that the terminal is not allowed to perform incremental updating.
In some optional embodiments, the second determining sub-module comprises: and the third determining unit is used for determining the target incremental updating data packet according to the first version number, the second version number and an incremental updating data packet corresponding to each two pre-stored adjacent version numbers.
In some optional embodiments, the apparatus further comprises: the fourth sending module is used for sending the second version number and the third information abstract to the terminal; the second version number is the latest version number in at least one database version currently stored in the cloud, and the third information summary is an information summary obtained based on the database content corresponding to the second version number.
In some optional embodiments, the apparatus further comprises: the second receiving module is used for receiving a request to be updated sent by the terminal; and the request to be updated is used for requesting incremental updating.
In some optional embodiments, the apparatus further comprises: a second determining module, configured to determine a first number of terminals that send the request to be updated in a first time period; a fifth sending module, configured to send the first number and the second number to a terminal that sends the request to be updated; and the second number is the maximum number of terminals which are supported by the cloud in the first time period and are used for performing incremental updating and downloading.
In some optional embodiments, the apparatus further comprises: a third receiving module, configured to receive a full-update downloading request sent by the terminal; the full-update downloading request is used for requesting to download a data packet for performing full-update; a sixth sending module, configured to send a target full-volume update data packet to the terminal according to the full-volume update downloading request; the target full-volume updating data packet comprises full-volume data corresponding to the latest version in at least one database version currently stored by the cloud.
In some optional embodiments, the database includes an underlying library of feature information needed to perform the visual task processing.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a database synchronization apparatus, including: the second sending module is used for sending an incremental updating downloading request to the cloud; the incremental updating downloading request is used for requesting to download a data packet for incremental updating; the downloading module is used for downloading a target increment updating data packet sent by the cloud based on the increment updating downloading request; and the increment updating module is used for updating the increment of the currently stored database content based on the target increment updating data packet.
In some optional embodiments, the incremental update download request comprises a first version number and a first information digest; the first version number is the version number of a database currently stored by the terminal, and the first information abstract is an information abstract obtained based on the database content corresponding to the first version number.
In some optional embodiments, the apparatus further comprises: the fourth receiving module is used for receiving the second version number and the third information abstract sent by the cloud; the second version number is the latest version number in at least one database version currently stored in the cloud, and the third information summary is an information summary obtained based on the database content corresponding to the second version number; the third determining module is used for determining a fourth information abstract based on the database content after the incremental updating; and the first execution module is used for responding to the determination that the third information abstract is matched with the fourth information abstract, determining that the incremental updating is successful, and updating the version number of the currently stored database to the second version number.
In some optional embodiments, the apparatus further comprises: and the second execution module is used for sending an incremental update downloading request to the cloud again in response to the determination of the incremental update failure, and performing incremental update on the currently stored database content again on the basis of a target incremental update data packet sent by the cloud again.
In some optional embodiments, the apparatus further comprises: a seventh sending module, configured to send a full-update downloading request to the cloud in response to receiving the target indication information sent by the cloud or determining that the number of failure times of incremental update reaches a preset number of times; the target indication information is used for indicating that the cloud end does not allow the terminal to perform incremental updating, and the full-updating downloading request is used for requesting to download a data packet for performing full updating; the full updating module is used for downloading a target full updating data packet sent by the cloud end and then performing full updating on the currently stored database content based on the target full updating data packet; the target full-volume updating data packet comprises full-volume data corresponding to the latest version in at least one database version currently stored by the cloud.
In some optional embodiments, the apparatus further comprises: an eighth sending module, configured to send a request to be updated to the cloud; the request to be updated is used for requesting incremental updating; the fifth receiving module is used for receiving the first number and the second number sent by the cloud end; the first number is the number of terminals which send requests to be updated and are received by the cloud end in a first time period, and the second number is the maximum number of terminals which are supported by the cloud end in the first time period and are used for carrying out incremental updating and downloading; a fourth determining module to determine to send the incremental update download request to the cloud for a second time period in response to determining that the first number is less than or equal to the second number; wherein the second time period is a next time period adjacent to the first time period.
In some optional embodiments, the apparatus further comprises: a fifth determining module, configured to determine, in response to determining that the first number is greater than the second number, a first probability value for sending the incremental update download request to the cloud within the second time period, and/or a second probability value for sending the request to be updated to the cloud again within the second time period; a ninth sending module, configured to send the incremental update downloading request to the cloud in the second time period based on the first probability value, or send the request to be updated to the cloud again in the second time period based on the second probability value.
In some optional embodiments, the database comprises an underlying library of feature information required to perform a visual task process; the device further comprises: the acquisition module is used for acquiring the characteristic information to be processed; the visual task processing module is used for processing a visual task according to the characteristic information to be processed and the latest database content currently stored by the terminal to obtain a visual task processing result; and the third execution module is used for executing corresponding target operation based on the visual task processing result.
In some optional embodiments, the visual task processing comprises face recognition; the target operation includes at least one of: door control switch operation and payment operation.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing any one of the database synchronization methods described above.
According to a sixth aspect of the embodiments of the present disclosure, there is provided a database synchronization apparatus including: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to invoke executable instructions stored in the memory to implement any of the database synchronization methods described above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: in the embodiment of the disclosure, the cloud end may determine the target incremental update data packet requested by the terminal according to the incremental update downloading request sent by the terminal, so that the target incremental update data packet is sent to the terminal, and the terminal downloads the target incremental update data packet for incremental update. The method and the system can adopt an increment updating mode to synchronize the database content of the cloud to the terminal, so that the occupied bandwidth resource is less, and the synchronization time is shorter.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow chart diagram illustrating a database synchronization method according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flow chart of another database synchronization method shown in the present disclosure according to an exemplary embodiment;
FIG. 3 is a flow chart of another database synchronization method shown in the present disclosure in accordance with an exemplary embodiment;
FIG. 4 is a flow chart illustrating another database synchronization method according to an exemplary embodiment of the present disclosure;
FIG. 5 is a block diagram illustrating a database synchronization apparatus according to an exemplary embodiment of the present disclosure;
FIG. 6 is a block diagram of another database synchronization apparatus shown in accordance with an exemplary embodiment of the present disclosure;
fig. 7 is a schematic structural diagram illustrating a database synchronization apparatus according to an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as operated herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if," as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination," depending on the context.
At present, in some scenes with limited network environments, for example, when people pay for faces on a campus, a campus canteen or a bus, due to the limitation of the network environment, a private line network cannot be built, and if a terminal performing face payment updates the contents of a database to the terminal from a cloud regularly, the contents of the database can include face feature information of a large number of faces, and the full update can occupy more bandwidth resources and the update time is longer.
In order to solve the above problem, an embodiment of the present disclosure provides a database synchronization scheme, which may synchronize database contents of a cloud to a terminal in an incremental update manner in the foregoing scenario.
For example, as shown in fig. 1, fig. 1 is a database synchronization method according to an exemplary embodiment, the method may be applied to a cloud or a server, and the following embodiments will be described by taking the cloud as an example, and include the following steps 101 to 103:
in step 101, an incremental update download request sent by a terminal is received.
In the embodiment of the present disclosure, the incremental update downloading request is used to request to download the data package for incremental update. In the embodiment of the present disclosure, the incremental update refers to synchronizing different contents between the latest version of the database content in the at least one database version currently stored in the cloud and the database content currently stored in the terminal to the terminal.
In step 102, it is determined that the incremental update download request corresponds to the target incremental update package requested to be downloaded.
In this disclosure, the target incremental update data packet may update the database content currently stored by the terminal to the database content currently stored by the cloud terminal in the latest version, and the target incremental update data packet may include at least one of an add instruction and a delete instruction. The adding instruction is used for adding at least one piece of new database content, and the deleting instruction is used for deleting the existing database content.
In the embodiment of the present disclosure, the terminal may update the adding instruction in the data packet according to the target increment, add at least one piece of data in the database currently stored by the terminal, and delete at least one piece of data in the database currently stored by the terminal according to the deleting instruction therein. Each piece of data in the database currently stored by the terminal may include at least one data item, where each piece of data includes a data item that may be used to indicate different data contents of the same data. When at least one data item of a certain piece of data needs to be modified, the whole piece of data can be deleted in the target incremental data packet through a deletion instruction, and then a new piece of data, namely the whole piece of data corresponding to the modified at least one data item, can be added through an addition instruction.
In step 103, the target incremental update data packet is sent to the terminal.
In the embodiment of the disclosure, the cloud may send the target incremental update data packet to the terminal through a network with the terminal. The networks involved in the present disclosure include, but are not limited to, 4G, 5G, etc. networks.
In the above embodiment, the cloud end may determine the target incremental update data packet requested by the terminal according to the incremental update downloading request sent by the terminal, so as to send the target incremental update data packet to the terminal, so that the terminal downloads the target incremental update data packet for incremental update. The method and the system can adopt an increment updating mode to synchronize the database of the cloud to the terminal, so that the occupied bandwidth resource is less, and the synchronization time is shorter.
In some optional embodiments, the incremental update download request may include a first version number and a first information digest, where the first version number is a version number of a database currently stored by the terminal, for example, if the version number of the database currently stored by the terminal side is 2.0, then the first version number is 2.0.
In this embodiment of the present disclosure, the first information digest is an information digest obtained based on the database content corresponding to the first version number. The information abstract is a character string with a fixed length obtained based on information content, and the first information abstract is the database content corresponding to the first version number and can be the character string obtained from all the contents of the database. In the embodiment of the present disclosure, the terminal may obtain the first information digest based on all contents of the database corresponding to the first version number by using a hash encryption algorithm. The hash encryption algorithm includes, but is not limited to, at least one of the MD5, SHA-256, etc. algorithms.
Accordingly, step 102 may include the following steps 102-1 through 102-2:
in step 102-1, it is determined whether to allow the terminal to perform incremental updating according to the first information digest and the first version number.
In the embodiment of the disclosure, whether the database content currently stored in the terminal is matched with the database content of the corresponding version stored in the cloud or not can be determined based on the first version number and the first information abstract sent by the terminal, and if the database content is matched with the database content of the corresponding version stored in the cloud, the terminal is determined to be allowed to perform incremental updating. If the data is not matched with the data, it is indicated that the database content currently stored by the terminal has an error, and the terminal cannot overcome the existing error even if incremental updating is performed, so the cloud end does not allow the terminal to perform incremental updating under the condition. The content of the database currently stored by the terminal is completely the same as the content of the database of the corresponding version stored by the cloud, or the indicated content is the same but the presentation forms are different (for example, at least one of the storage sequence and the data format of the table entries in the database is different), it is determined that the contents of the two databases are matched, otherwise, it is determined that the contents of the two databases are not matched.
In step 102-2, in response to determining that incremental updating is allowed for the terminal, the target incremental update packet is determined according to the first version number and the second version number.
In this embodiment of the disclosure, the second version number is a latest version number in at least one database version currently stored in the cloud.
And under the condition that the cloud end allows the terminal to adopt an incremental updating mode for synchronization, determining a target incremental updating data packet according to the first version number and the second version number of the database version currently stored by the terminal.
In the above embodiment, the cloud end may determine whether to operate the terminal for incremental updating according to the first version number and the first information digest included in the incremental updating downloading request, so as to ensure accuracy of the database content currently stored by the terminal.
In some optional embodiments, the method may further include the following step 104:
in step 104, in response to determining that the terminal is not allowed to perform incremental update, sending transmission target indication information to the terminal.
In this embodiment of the present disclosure, the target indication information is used to indicate that the cloud does not allow the terminal to perform incremental updating. The cloud terminal can send target indication information to the terminal under the condition that the database content currently stored by the terminal is determined to be not matched with the database content of the corresponding version stored by the cloud terminal, so that the terminal can be updated in a follow-up full mode.
In the embodiment, the cloud end can send the target indication information to the terminal on the basis of determining that the terminal is not allowed to perform the incremental updating, so that the terminal performs the subsequent full updating, the terminal is finally synchronized to the database content of the latest version currently stored in the cloud end, and the database synchronization accuracy is ensured.
In some alternative embodiments, step 102-1 may include the following steps 102-11 through 102-12:
in step 102-11, a second message digest corresponding to the first version number is determined according to a correspondence between pre-stored message digests and version numbers.
In the embodiment of the disclosure, the cloud may determine the latest version number of the database version after updating the database content stored in the cloud, and determine the corresponding information digest by using a hash encryption algorithm based on the database content corresponding to the latest version number to obtain the correspondence. For example, the correspondence between the information digest and the version number includes: database version 1.0 corresponds to information summary 1, database version 2.0 corresponds to information summary 2, and so on.
In this embodiment, the cloud may determine the second message digest corresponding to the first version number sent by the terminal according to the pre-stored correspondence relationship.
In step 102-12, in response to determining that the first message digest matches the second message digest, determining that incremental updating is allowed for the terminal, otherwise determining that incremental updating is not allowed for the terminal.
In the embodiment of the present disclosure, the matching of the first information summary and the second information summary may include, but is not limited to, the first information summary and the second information summary being identical or having the same content but different representations, which is not limited in the present disclosure. If the first information abstract corresponding to the first version number sent by the terminal is matched with the second information abstract corresponding to the first version number stored in the cloud, it can be determined that the database content corresponding to the first version number currently stored by the terminal is matched with the database content corresponding to the first version number in the cloud, and the terminal can be allowed to perform incremental updating on the basis of the database content currently stored. Otherwise, the terminal is determined not to be allowed to carry out incremental updating.
In the above embodiment, the cloud may compare whether the second information digest corresponding to the first version number stored in the cloud is matched with the first information digest sent by the terminal, so as to determine whether the terminal is allowed to perform incremental update, thereby ensuring accuracy of the database content stored in the terminal and accuracy of the database content obtained by the terminal through subsequent incremental update.
In some optional embodiments, for the step 102-2, if there are multiple different database versions, the cloud may store a corresponding incremental update packet for every two adjacent version numbers, and this pre-stored incremental update packet may be used to update the currently stored database version of the terminal from the version with the lower version number to the adjacent higher version number.
For example, two adjacent version numbers 1.0 and 2.0 correspond to one incremental update packet 1, two adjacent version numbers 2.0 and 3.0 correspond to one incremental update packet 2, and so on. The incremental update data packet 1 is used for updating the database version currently stored by the terminal from the version number 1.0 to the version number 2.0, the incremental update data packet 2 is used for updating the database version currently stored by the terminal from the version number 2.0 to the version number 3.0, and the like. By adopting the mode, the problem that a large amount of cloud resources are occupied due to the fact that a large amount of increment updating data packets corresponding to two different version numbers are stored in the cloud can be avoided. For example, if the cloud stores one corresponding incremental update data packet for any two version numbers, and the latest database version currently stored by the cloud is n.0, n × (n-1)/2 incremental data packets need to be stored, and the larger the value of n is, the more incremental data packets need to be stored by the cloud, which may occupy a large amount of cloud resources. However, by adopting the method of the present disclosure, only one corresponding incremental update data packet is saved for every two adjacent version numbers, and then, under the condition that the latest database version currently stored in the cloud is n.0, the cloud only needs to save (n-1) incremental data packets, so that it is obvious that the occupation of too many cloud resources can be avoided. Wherein n may be a positive integer.
Further, the cloud end can determine a target increment updating data packet requested by the terminal according to the first version number sent by the terminal, the second version number currently stored by the cloud end and increment updating data packets corresponding to every two adjacent version numbers prestored by the cloud end.
In one example, if the first version number is adjacent to the second version number, the incremental update packet corresponding to the first version number and the second version number is directly used as the target incremental update packet. For example, if the first version number is 1.0 and the second version number is 2.0, the incremental update packet 1 corresponding to the version numbers 1.0 and 2.0 may be directly used as the target incremental update packet.
In another example, if the first version number and the second version number are not adjacent, the target incremental update packet may need to be determined based on the first version number, the second version number, and the version number of the interval therebetween. For example, if the first version number is 1.0, the second version number is 3.0, and the intermediate interval version number is 2.0, the incremental update packet 1 corresponding to version numbers 1.0 and 2.0 and the incremental update packet 2 corresponding to version numbers 2.0 and 3.0 may be simultaneously used as the target incremental update packet.
In the above embodiment, the cloud may pre-store a corresponding incremental update data packet for every two adjacent version numbers, so that the corresponding incremental update data packets between different database version numbers are prevented from occupying too many cloud resources, and the availability is high.
In some optional embodiments, the method may further include the following step 105:
in step 105, the second version number and the third message digest are sent to the terminal.
In this embodiment of the disclosure, the second version number is a latest version number in at least one database version currently stored in the cloud, and the third information digest is an information digest obtained based on the database content corresponding to the second version number.
The cloud end sends the second version number and the third information abstract to the terminal, so that the terminal can conveniently determine whether the incremental updating is successful based on the third information abstract, and determine the updated database version based on the second version number after the incremental updating is successful.
In the above embodiment, the cloud may send the latest version number stored in the cloud, that is, the second version number and the third information digest corresponding to the second version number, to the terminal, so that after the terminal downloads the target incremental update data packet and performs the incremental update, whether the incremental update is successful or not is determined, and the updated database version is determined, thereby ensuring the accuracy of the incremental update.
In some optional embodiments, in view of that the cloud receives incremental update download requests initiated by a large number of terminals in the same time period, which may cause a large number of terminals to synchronously download corresponding target incremental update data packets, which may easily cause congestion of a transmission path between the cloud and the terminals, and even may cause a cloud downtime, to solve this problem, the method may further include step 106:
in step 106, a request to be updated sent by the terminal is received.
In the embodiment of the present disclosure, the cloud may receive the request to be updated sent by the terminal before receiving the incremental update download request sent by the terminal. The request to be updated is used for requesting incremental updating. The terminal informs the cloud of the terminal request for incremental updating through the request to be updated.
In the above embodiment, before receiving the incremental update downloading request sent by the terminal, the cloud may receive the request to be updated sent by the terminal, so as to determine the number of terminals requesting incremental update in a certain time period, and thus, the terminal may subsequently determine whether to download the incremental update data packet, thereby avoiding a problem that a large number of terminals synchronously download corresponding target incremental update data packets, which may cause congestion of a transmission path between the cloud and the terminals, and even cause cloud downtime, and having high availability.
In some optional embodiments, the method may further comprise the following steps 107 to 108:
in step 107, a first number of terminals transmitting the request to update within a first time period is determined.
In the embodiment of the present disclosure, the time period may be represented by a time slice, and the first time period, i.e., the duration T of the first time slice, may be configured by the cloud according to the terminal traffic, including but not limited to 60 seconds or more.
Cloud statistics in a first time slice tiA first number N of terminals received within and having sent a request to be updatedt. A first number NtMay be a natural number such as 0, 1, 2, etc.
In step 108, the first number and the second number are sent to the terminal sending the request to be updated.
Wherein the second number CtThe maximum number of terminals and the second number C of the terminals which are supported by the cloud in the first time slice and are synchronously updated and downloaded in an incremental modetThe operation capability of the cloud terminal can be determined. In the embodiment of the present disclosure, the operation capabilities of the cloud in different time slices may be the same or different, and accordingly, the maximum number of terminals that are supported by the cloud in different first time slices and that perform incremental update downloading synchronously may be the same or different.
In the above embodiment, the cloud may send the first number of the terminals that send the request to be updated in the first time slice, and the maximum number of the terminals that the cloud supports in the first time slice and performs incremental update downloading in synchronization, that is, the second number is sent to the terminals, so that the terminals determine whether to perform downloading of the incremental update data packets, and the problem that a large number of terminals synchronously download corresponding target incremental update data packets, which causes congestion of a transmission path between the cloud and the terminals, even causes cloud downtime, is avoided, and the usability is high.
In some optional embodiments, if the first number is less than or equal to the second number, it indicates that the cloud supports all terminals initiating the request to be updated in the first time slice, and synchronously downloads the corresponding target incremental update data packets in the second time slice, that is, the second time slice.
If the first number is larger than the second number, the cloud terminal cannot support all terminals initiating the request to be updated in the first time slice, and the corresponding target incremental update data packets are synchronously downloaded in the second time slice. In order to avoid transmission path congestion or cloud downtime, a first probability value that the terminals send incremental updating downloading requests in the second time slice and a second probability value that the terminals send requests to be updated again can be calculated by the cloud, the cloud directly selects the terminals capable of sending the incremental updating downloading requests from the terminals sending the requests to be updated according to the first probability value, informs the terminals of sending the incremental updating downloading requests in the second time slice, and informs other terminals of sending the requests to be updated again in the second time slice.
For example, if the first probability value is 20%, and there are 10 terminals, the cloud may select 2 of the terminals that can send the incremental update download request. The other 8 terminals may send the request to be updated again within the second time slice.
In one possible implementation, the terminal may randomly select, among the terminals that send the request to be updated, a terminal that can send an incremental update download request based on the first probability value.
In another possible implementation, the terminals may sequentially select, based on the first probability value, the terminals that may send the incremental update download requests in the chronological order in which the requests to be updated are received.
In another possible implementation, the terminal may select the terminals that may send the incremental update download requests in order of the number of times the terminal has sent the incremental update download requests, from the top to the bottom, based on the first probability value.
In the embodiment of the present disclosure, the terminal may also select, based on the first probability value in other manners, but is not limited to this, a terminal that can send an incremental update download request from among terminals that send requests to be updated.
In the embodiment, the terminal capable of sending the incremental update downloading request in the second time slice can be selected from the terminals sending the to-be-updated request in the first time slice by the cloud, and the terminals sending the to-be-updated request again, so that the incremental update data packets can be downloaded by the multiple terminals in a peak staggering manner, and the possibility of congestion of a transmission path between the cloud and the terminals and cloud downtime caused by too many requests is greatly reduced.
In some optional embodiments, the method may further comprise the following steps 109 to 110:
in step 109, a request for downloading the full update sent by the terminal is received.
In the embodiment of the disclosure, the terminal may initiate a full-update downloading request to the cloud terminal when receiving the target indication information sent by the cloud terminal and determining that the cloud terminal does not allow the terminal to perform incremental update. Or the terminal can also initiate a full-quantity updating downloading request to the cloud under the condition that the number of times of failure in incremental updating reaches the preset number. The preset times can be determined by the terminal according to the self computing capability, the preset times corresponding to each terminal can be the same or different, and the preset times are positive integers. And the full-update downloading request is used for requesting to download the data packet for full update. In the embodiment of the present disclosure, the full update refers to synchronizing all contents of the database of the latest version in the cloud to the terminal at one time.
In step 109, a target full-volume update data packet is sent to the terminal according to the full-volume update download request.
In this embodiment of the present disclosure, the target full volume update data packet includes full volume data corresponding to a latest version in at least one database version currently stored in the cloud.
In the embodiment, the cloud end can support the terminal to perform incremental updating, and simultaneously support the terminal to perform full updating under a specific condition, so that the database content stored by the terminal and the database content of the latest version stored by the cloud end are ensured to be synchronous, and the usability is high.
In some alternative embodiments, the database may include a base of feature information needed to perform the visual task processing.
In one example, the vision task processing includes face recognition, and the corresponding feature information includes face feature information. The database is a base database storing face feature information.
For example, as shown in fig. 2, fig. 2 is another database synchronization method according to an exemplary embodiment, which may be used for a terminal, including but not limited to a computer device performing visual task processing, such as a mobile phone terminal, a charging terminal, a billing terminal on a bus, an access control terminal, and the like, and includes the following steps 201 to 203:
in step 201, an incremental update download request is sent to the cloud.
In the embodiment of the present disclosure, the incremental update downloading request is used to request to download the data package for incremental update.
In step 202, a target incremental update data package sent by the cloud based on the incremental update downloading request is downloaded.
In the embodiment of the disclosure, after determining that the terminal is allowed to perform incremental updating, the cloud sends at least one target incremental updating data packet. The target incremental update data packet can update the database content currently stored by the terminal to the database content currently stored by the cloud in the latest version. The terminal may download the target incremental update data packet through a network with the cloud, and in the embodiment of the disclosure, the network may include, but is not limited to, a 4G network, a 5G network, and the like.
In step 203, the currently stored database content is incrementally updated based on the target incremental update data packet.
In the embodiment of the present disclosure, the terminal may update the adding instruction in the data packet according to the target increment, add at least one piece of data in the database currently stored by the terminal, and delete at least one piece of data in the database currently stored by the terminal according to the deleting instruction, thereby implementing the increment update.
In the above embodiment, the terminal may adopt an incremental update mode to synchronize the database content of the cloud to the terminal, so that the occupied bandwidth resource is less, and the synchronization time is shorter.
In some optional embodiments, the incremental update download request includes a first version number and a first message digest. The first version number is the version number of the database currently stored by the terminal, and the first information abstract is the information abstract obtained based on the database content corresponding to the first version number.
The cloud end can determine the second information abstract corresponding to the first version number according to the corresponding relation between the pre-stored version number and the information abstract, so that whether the database content corresponding to the first version number stored in the terminal is matched with the database content corresponding to the first version number stored in the cloud end is judged based on whether the first information abstract is matched with the second information abstract, and whether the terminal is allowed to perform incremental updating is determined.
In the above embodiment, the terminal may send the first version number and the first message digest to the cloud through the incremental update download request, so that the cloud determines whether to allow the terminal to perform incremental update, thereby ensuring the accuracy of the incremental update.
In some optional embodiments, the method may further include steps 204 to 206:
in step 204, a second version number and a third message digest sent by the cloud are received.
The second version number is the latest version number in at least one database version currently stored in the cloud, and the third information summary is an information summary obtained based on the database content corresponding to the second version number. Namely, the third message digest is a message digest determined by the cloud by adopting a hash encryption algorithm based on all the contents of the database corresponding to the second version number.
In step 205, a fourth information summary is determined based on the incrementally updated database content.
In the embodiment of the present disclosure, the terminal determines a corresponding fourth information digest by using a hash encryption algorithm according to the entire content of the database after the incremental update.
In step 206, in response to determining that the third information digest matches the fourth information digest, determining that the incremental update is successful, and updating the version number of the currently stored database to the second version number.
In the embodiment of the present disclosure, in a case where the third information digest is identical to the fourth information digest, or the indicated digest content is identical although the representation form is different, the terminal may determine that the third information digest matches the fourth information digest, and further, the terminal may determine that the incremental update is successful, and update the version number of the database currently stored in the terminal to the second version number.
In the above embodiment, the terminal may determine whether the incremental update is successful according to the third information digest sent by the cloud, and determine the latest version number after the incremental update according to the second version number, so that the usability is high.
In some optional embodiments, the method may further include step 207:
in step 207, in response to determining that the incremental update fails, sending an incremental update download request including the first information summary to the cloud again, and performing incremental update on the currently stored database content again according to a target incremental update data packet sent by the cloud again.
In this embodiment of the disclosure, if the terminal determines that the third information digest is not matched with the fourth information digest, and it may be considered that the incremental update fails, the terminal may send an incremental update download request to the cloud again, and perform incremental update on the currently stored database content again according to a target incremental update data packet sent by the cloud again.
In the above embodiment, the terminal may perform incremental update again when the incremental update fails, so as to ensure accuracy of the incremental update.
In some optional embodiments, the method may further include steps 208 to 209:
in step 208, in response to receiving the target indication information sent by the cloud or determining that the failure times of incremental update reach a preset number, sending a request for sending a full-volume update download to the cloud.
The target indication information is used for indicating that the cloud end does not allow the terminal to perform incremental updating, and the full-updating downloading request is used for requesting to download a data packet for performing full updating.
In the embodiment of the disclosure, if the terminal receives the target indication information sent by the cloud, it can be determined that the cloud does not allow the terminal to perform incremental updating, and at this time, the terminal can send a full-update downloading request to the cloud so as to perform full-update. The full update refers to synchronizing all the contents of the database of the latest version in the cloud to the terminal at one time.
Or the cloud allows the terminal to perform incremental updating, but the failure times of the terminal to perform incremental updating reach the preset times, so that the terminal can perform full updating instead of incremental updating. The preset number of times can be determined by the terminal and can be any positive integer.
In step 209, after downloading the target full update data packet sent by the cloud, the currently stored database content is fully updated based on the target full update data packet.
In this embodiment of the present disclosure, the target full volume update package includes full volume data corresponding to a latest version in at least one database version currently stored in the cloud. And the terminal downloads a target full-amount updating data packet based on the network between the terminal and the cloud, and performs full-amount updating on the database of the terminal.
In the above embodiment, the terminal may perform full update when the cloud does not allow the terminal to perform incremental update or the number of times of failure of incremental update reaches the preset number of times, so as to ensure that the database content of the latest version of the cloud can be synchronized to the terminal, and the availability is high.
In some optional embodiments, the method may further include steps 210 to 212:
in step 210, a request to be updated is sent to the cloud.
In this embodiment of the present disclosure, the terminal may send the request to be updated to the cloud before sending the incremental update downloading request to the cloud in step 201. And the request to be updated is used for requesting incremental updating.
In step 211, a first number and a second number sent by the cloud are received.
The first number is the number of terminals that the cloud receives and sends a request to be updated in a first time period, and the second number is the maximum number of terminals that the cloud supports in the first time period to perform incremental updating and downloading.
In step 212, it is determined that the incremental update download request can be sent to the cloud for a second time period in response to determining that the first number is less than or equal to the second number.
The second time period can be represented by a second time slice, and the second time slice is the next time slice adjacent to the first time slice and is equal to the duration of the first time slice.
In the disclosed embodiment, the first time slice istiThe second time slice is ti+1Each time slice may be T in duration. If the maximum number of terminals for incremental update downloading in synchronization supported by the cloud is larger than or equal to the maximum number of terminals for incremental update downloading in the first time slice tiThe number of terminals having sent a request to be updated, i.e. the first number NtLess than or equal to the second number CtThen the terminal may directly be at the second time slice ti+1And sending an incremental updating downloading request to the cloud end so as to perform incremental updating, wherein the cloud end can meet the incremental updating downloading request initiated by the terminal.
In the above embodiment, if the maximum number of terminals that synchronously initiate incremental update download requests and are supported by the cloud is greater than or equal to the number of terminals that initiate the update requests in the first time slice, the terminals that initiate the requests to be updated can initiate incremental update download requests in the second time slice, so that the problem that a large number of terminals synchronously download corresponding target incremental update data packets, which causes congestion of a transmission path between the cloud and the terminals, and even causes cloud downtime, is avoided, and the availability is high.
In some optional embodiments, the method may further include steps 213 to 214:
in step 213, in response to determining that the first number is greater than the second number, a first probability value of sending the incremental update download request to the cloud within the second time slice and/or a second probability value of sending the request to be updated to the cloud again within the second time slice is determined.
In the disclosed embodiment, the first number NtIf it is greater than the second number CtTherefore, a first probability value for sending an incremental update download request in the next time slice, that is, the second time slice, and a second probability value for sending a request to be updated again in the second time slice can be respectively determined.
In one example, the first probability value may be Ct/NtThe second probability value may be (N)t-Ct)/Nt
In step 214, the incremental update download request is sent to the cloud in the second time period based on the first probability value, or the request to be updated is sent to the cloud again in the second time period based on the second probability value.
In the embodiment of the disclosure, the terminal may calculate a random probability value through a preset program, and if the random probability value is greater than the first probability value, the terminal may calculate a random probability value in the second time slice ti+1Sending an incremental updating downloading request to the cloud end, otherwise, the terminal can be in the second time slice ti+1And sending the request to be updated to the cloud again.
The preset program is a pre-written computer program which is used for calculating the probability value that the terminal initiates the incremental update downloading request and can be downloaded to the target incremental update data packet.
In the above embodiment, the terminal may respectively determine the probability values for sending the incremental update download request and sending the request to be updated again in the next time slice under the condition that the cloud cannot support more terminals to synchronously download the incremental data packets, so that the incremental update download request is sent or the request to be updated is sent again in the next time slice based on the corresponding probability values, so that the plurality of terminals may download the incremental update data packets in a staggered manner, and the possibility of transmission path congestion and cloud downtime caused by excessive requests is greatly reduced.
In some optional embodiments, the cloud may also calculate the first probability value and the second probability value, and the cloud directly selects, according to the first probability value, terminals that can send incremental update download requests from among the terminals that send the requests to be updated, informs the terminals that the incremental update download requests are sent in the second time period, and informs other terminals that the requests to be updated are sent again in the second time period. And the terminal directly sends an updating downloading request or sends a request to be updated again in the second time slice according to the cloud indication.
In the above embodiment, the cloud may also select a terminal that can send an incremental update download request in the second time slice from among terminals that send requests to be updated in the first time slice, and send the terminals that send requests to be updated again, so that multiple terminals may download incremental update data packets at different peaks, and the possibility of transmission path congestion and cloud downtime caused by excessive requests is greatly reduced.
In some optional embodiments, the database includes a base library of feature information required for performing the visual task processing, and accordingly, the method may further include the following steps 215 to 217:
in step 215, the feature information to be processed is acquired.
In the embodiment of the disclosure, the terminal can acquire the image corresponding to the visual processing task according to the camera, and perform feature extraction on the image to obtain the required feature information to be processed.
In step 216, a visual task processing is performed according to the feature information to be processed and the latest database content currently stored by the terminal, so as to obtain a visual task processing result.
In the embodiment of the present disclosure, the minimum database content currently stored by the terminal may be the latest database content obtained after incremental update.
In one example, the vision task processing includes face recognition, and the vision task processing results may include face recognition results.
In step 217, based on the visual task processing result, a corresponding target operation is performed.
The target operation includes at least one of: door control switch operation and payment operation.
In some optional embodiments, the face recognition result indicates that the face in the image belongs to the face of the campus employee, the access control device may be controlled to be automatically opened, and if the face recognition result indicates that the face in the image does not belong to the face of the campus employee, the access control device may be controlled to be kept closed, and an alarm prompt is performed.
The terminal can send an incremental updating downloading request to the cloud, and the cloud stores face feature information base libraries of a plurality of employees in the park. And after receiving the incremental update downloading request, the cloud determines a target incremental update data packet. Assuming that the version number of the database version currently stored by the terminal is 1.0, the latest version number of the database currently stored by the cloud is 2.0, and the cloud determines that one increment updating data packet 1 corresponding to two adjacent version numbers 1.0 and 2.0 is a target increment updating data packet. The target increment updating data packet comprises an adding instruction for adding the face feature information of the newly-entered employee and/or a deleting instruction for deleting the face feature information of the employee who leaves the employee.
After the terminal is additionally updated according to the target increment updating data packet, the version number of the database version stored by the terminal can be updated to 2.0, so that the access control equipment is controlled to be automatically opened under the condition that the face of a newly-entering employee is detected, and meanwhile, the access control equipment is prevented from being opened for the employee who leaves the office.
In the embodiment of the present disclosure, in order to avoid affecting the normal entering and exiting of the staff in the park, the terminal may select a time period with a small number of people entering and exiting the staff, for example, 22: and performing incremental updating in a time period of from 00 to 6:00 in the next morning to ensure that the face feature information stored by the user is matched with the face feature information base stored in the cloud. In some optional embodiments, the face recognition result indicates that the face in the image belongs to the face of the user with the corresponding payment account, and then the corresponding amount, such as the fee for taking a car or the fee for purchasing an item, may be automatically deducted from the corresponding payment account.
Taking an unmanned ticketing public transport as an example, the terminal for automatic payment can send an incremental update downloading request to the cloud, and the cloud stores the human face feature information base with the opened automatic bus taking payment function and corresponding payment information, such as a payment account, the maximum amount allowed for single payment, a payment password and the like. Assuming that the version number of the database version currently stored by the terminal is 1.0, the latest version number of the database currently stored by the cloud is 2.0, and the cloud determines that one increment updating data packet 1 corresponding to two adjacent version numbers 1.0 and 2.0 is a target increment updating data packet. The target increment updating data packet may include an adding instruction for adding the face feature information for newly activating the automatic bus taking payment function and the corresponding payment information, and/or a deleting instruction for deleting the face feature information for closing the automatic bus taking payment function and the corresponding payment information.
The terminal can initiate an incremental update downloading request under the condition that the self-service ticketing bus is determined not to be in the driving process. In one example, the terminal may initiate an incremental update downloading request when the unmanned ticketed bus reaches any terminal station of the route, and the time length from the next departure time point exceeds a preset time length, and the network condition is good, so as to avoid the problem that passengers cannot normally complete riding payment due to incremental update performed by the terminal.
In the above embodiment, under the condition that the terminal needs to execute the visual task processing, the feature information base included in the cloud and required for executing the visual task processing can be synchronized to the terminal in an incremental updating manner, and under the condition that the terminal and the cloud network have poor conditions, the accuracy of the visual task processing is ensured.
In some alternative embodiments, such as shown in fig. 3, the following steps 301 to 314 are included:
in step 301, the terminal sends an incremental update download request to the cloud.
The incremental update downloading request is used for requesting to download the data packet for incremental update. The incremental updating downloading request comprises a first version number and a first information abstract; the first version number is the version number of the database currently stored by the terminal, and the first information abstract is the information abstract obtained based on the database content corresponding to the first version number.
In step 302, the cloud determines a second message digest corresponding to the first version number according to a correspondence between the pre-stored message digest and the version number.
In step 303, the cloud determines that the terminal is allowed to perform incremental updating in response to determining that the first message digest matches the second message digest, and otherwise determines that the terminal is not allowed to perform incremental updating.
If the cloud determines that the terminal is allowed to perform incremental updating, steps 304 to 310 are performed, otherwise steps 311 to 314 are performed.
In step 304, the cloud determines the target incremental update data packet according to the first version number, the second version number, and an incremental update data packet corresponding to each two pre-stored adjacent version numbers.
In step 305, the cloud sends the target incremental update data packet to the terminal.
In step 306, the terminal performs incremental update on the currently stored database content based on the downloaded target incremental update data packet.
In step 307, the cloud sends the second version number and the third message digest to the terminal.
The second version number is the latest version number in at least one database version currently stored in the cloud, and the third information summary is an information summary obtained based on the database content corresponding to the second version number.
In step 308, the terminal determines a fourth information summary based on the incrementally updated database content.
In step 309, the terminal determines that the incremental update is successful in response to determining that the third information digest matches the fourth information digest, and updates the version number of the database currently stored by the terminal to the second version number.
In step 310, in response to determining that the incremental update fails, the terminal sends an incremental update downloading request to the cloud again, and performs incremental update on the currently stored database content again according to a target incremental update data packet sent by the cloud again.
In step 311, the cloud sends target indication information to the terminal.
The target indication information is used for indicating that the cloud end does not allow the terminal to perform incremental updating.
After completing step 310 or 311, steps 312 to 314 may be performed.
In step 312, the terminal sends a full-update downloading request to the cloud in response to receiving the target indication information sent by the cloud or determining that the failure times of incremental update reach a preset number.
And the full-update downloading request is used for requesting to download the data packet for full update.
In step 313, the cloud sends a target full update data packet to the terminal according to the full update download request.
The target full-volume updating data packet comprises full-volume data corresponding to the latest version in at least one database version currently stored by the cloud.
In step 314, the terminal performs full update on the currently stored database content based on the target full update data packet sent by the cloud.
In the above embodiment, the cloud end may determine the target incremental update data packet requested by the terminal according to the incremental update downloading request sent by the terminal, so as to send the target incremental update data packet to the terminal, so that the terminal downloads the target incremental update data packet for incremental update. The method and the system can adopt an increment updating mode to synchronize the database content of the cloud to the terminal, so that the occupied bandwidth resource is less, and the synchronization time is shorter.
The above examples are further illustrated as follows.
In the face 1: in the practical application scenario of N, N is any positive integer. Due to the fact that private network construction cannot be carried out, the terminal cannot send the feature information to be processed acquired in real time to the cloud for real-time comparison processing, the database content of the latest version of the cloud needs to be synchronized at the terminal side, then comparison is carried out based on the database content stored by the terminal, and if the database content of the latest version of the cloud is completely synchronized to the terminal each time in a full-updating mode, the problems that time consumption is long, and occupied bandwidth resources are large are caused.
In the embodiment of the present disclosure, an incremental update mode may be adopted, and the content of the face database is synchronized to the terminal in the incremental update mode each time, so that when the terminal needs to execute the visual task processing, the terminal may directly perform face recognition based on the database content of the terminal-side incremental update, and obtain the corresponding visual task processing result. Thereby completing the door access switch operation, the payment operation and the like. For example, automatically opening park entrance guard, performing offline payment on a mobile bus, performing offline payment in places such as schools or park canteens and shops, and the like, so that the corresponding scene is based on a human face 1: n applications have higher availability.
In some alternative embodiments, for example, as shown in fig. 4, the number of the terminals shown in fig. 4 may be at least one, and fig. 4 only takes one terminal as an example for illustration, and includes the following steps 401 to 406:
in step 401, the terminal sends a request to be updated to the cloud.
In step 402, the cloud determines a first number of terminals that sent the request to be updated within a first time slice.
In step 403, the cloud sends the first number and the second number to the terminal.
And the second number is the maximum number of terminals which are supported by the cloud end in the first time period and are used for performing incremental updating and downloading.
In step 404, the terminal determines to send the incremental update download request to the cloud in a second time slice in response to determining that the first number is less than or equal to the second number.
Further, the terminal sends an incremental update downloading request to the cloud in the second time slice according to the contents of the steps 301 to 314, so that incremental update is performed, which is not described herein again.
In step 405, in response to determining that the first number is greater than the second number, the terminal determines a first probability value for sending the incremental update download request to the cloud in the second time slot, and/or sends a second probability value for sending the request to be updated to the cloud again in the second time slot.
In step 406, the terminal sends the incremental update download request to the cloud in the second time slice based on the first probability value, or sends the request to be updated to the cloud again in the second time slice based on the second probability value.
In the above embodiment, the terminal can download the corresponding target incremental update data packets from the cloud at different peaks, thereby reducing the concurrent pressure of the cloud, avoiding congestion of a transmission path between the cloud and the terminal, and even causing the cloud to be down, and having high availability.
Corresponding to the foregoing method embodiments, the present disclosure also provides embodiments of an apparatus.
As shown in fig. 5, fig. 5 is a block diagram of a database synchronization apparatus according to an exemplary embodiment of the present disclosure, including: a first receiving module 510, configured to receive an incremental update downloading request sent by a terminal; the incremental updating downloading request is used for requesting to download a data packet for incremental updating; a first determining module 520, configured to determine a target incremental update data packet requested to be downloaded corresponding to the incremental update downloading request; a first sending module 530, configured to send the target incremental update data packet to the terminal.
In some optional embodiments, the incremental update download request comprises a first version number and a first information digest; the first version number is the version number of a database currently stored by the terminal, and the first information abstract is an information abstract obtained based on the database content corresponding to the first version number; the first determining module includes: the first determining submodule is used for determining whether the terminal is allowed to carry out incremental updating or not according to the first information abstract and the first version number; the second determining submodule is used for responding to the determination that the terminal is allowed to carry out incremental updating, and determining the target incremental updating data packet according to the first version number and the second version number; and the second version number is the latest version number in at least one database version currently stored in the cloud.
In some optional embodiments, the apparatus further comprises: a third sending module, configured to send target indication information to the terminal in response to determining that the incremental update by the terminal is not allowed; the target indication information is used for indicating that the cloud end does not allow the terminal to perform incremental updating.
In some optional embodiments, the first determining sub-module comprises: the first determining unit is used for determining a second information abstract corresponding to the first version number according to the corresponding relation between the pre-stored information abstract and the version number; and a second determining unit, configured to determine that the terminal is allowed to perform incremental updating in response to determining that the first information digest is matched with the second information digest, and otherwise determine that the terminal is not allowed to perform incremental updating.
In some optional embodiments, the second determining sub-module comprises: and the third determining unit is used for determining the target incremental updating data packet according to the first version number, the second version number and an incremental updating data packet corresponding to each two pre-stored adjacent version numbers.
In some optional embodiments, the apparatus further comprises: the fourth sending module is used for sending the second version number and the third information abstract to the terminal; the second version number is the latest version number in at least one database version currently stored in the cloud, and the third information summary is an information summary obtained based on the database content corresponding to the second version number.
In some optional embodiments, the apparatus further comprises: the second receiving module is used for receiving a request to be updated sent by the terminal; and the request to be updated is used for requesting incremental updating.
In some optional embodiments, the apparatus further comprises: a second determining module, configured to determine a first number of terminals that send the request to be updated in a first time period; a fifth sending module, configured to send the first number and the second number to a terminal that sends the request to be updated; and the second number is the maximum number of terminals which are supported by the cloud in the first time period and are used for performing incremental updating and downloading.
In some optional embodiments, the apparatus further comprises: a third receiving module, configured to receive a full-update downloading request sent by the terminal; the full-update downloading request is used for requesting to download a data packet for performing full-update; a sixth sending module, configured to send a target full-volume update data packet to the terminal according to the full-volume update downloading request; the target full-volume updating data packet comprises full-volume data corresponding to the latest version in at least one database version currently stored by the cloud.
In some optional embodiments, the database includes an underlying library of feature information needed to perform the visual task processing.
As shown in fig. 6, fig. 6 is a block diagram of a database synchronization apparatus according to an exemplary embodiment of the present disclosure, including: a second sending module 610, configured to send an incremental update downloading request to the cloud; the incremental updating downloading request is used for requesting to download a data packet for incremental updating; a downloading module 620, configured to download a target incremental update data packet sent by the cloud based on the incremental update downloading request; and the incremental update module 630 is configured to perform incremental update on the currently stored database content based on the target incremental update data packet.
In some optional embodiments, the incremental update download request comprises a first version number and a first information digest; the first version number is the version number of a database currently stored by the terminal, and the first information abstract is an information abstract obtained based on the database content corresponding to the first version number.
In some optional embodiments, the apparatus further comprises: the fourth receiving module is used for receiving the second version number and the third information abstract sent by the cloud; the second version number is the latest version number in at least one database version currently stored in the cloud, and the third information summary is an information summary obtained based on the database content corresponding to the second version number; the third determining module is used for determining a fourth information abstract based on the database content after the incremental updating; and the first execution module is used for responding to the determination that the third information abstract is matched with the fourth information abstract, determining that the incremental updating is successful, and updating the version number of the currently stored database to the second version number.
In some optional embodiments, the apparatus further comprises: and the second execution module is used for sending an incremental update downloading request to the cloud again in response to the determination of the incremental update failure, and performing incremental update on the currently stored database content again on the basis of a target incremental update data packet sent by the cloud again.
In some optional embodiments, the apparatus further comprises: a seventh sending module, configured to send a full-update downloading request to the cloud in response to receiving the target indication information sent by the cloud or determining that the number of failure times of incremental update reaches a preset number of times; the target indication information is used for indicating that the cloud end does not allow the terminal to perform incremental updating, and the full-updating downloading request is used for requesting to download a data packet for performing full updating; the full updating module is used for downloading a target full updating data packet sent by the cloud end and then performing full updating on the currently stored database content based on the target full updating data packet; the target full-volume updating data packet comprises full-volume data corresponding to the latest version in at least one database version currently stored by the cloud.
In some optional embodiments, the apparatus further comprises: an eighth sending module, configured to send a request to be updated to the cloud; the request to be updated is used for requesting incremental updating; the fifth receiving module is used for receiving the first number and the second number sent by the cloud end; the first number is the number of terminals which send requests to be updated and are received by the cloud end in a first time period, and the second number is the maximum number of terminals which are supported by the cloud end in the first time period and are used for carrying out incremental updating and downloading; a fourth determining module to determine to send the incremental update download request to the cloud for a second time period in response to determining that the first number is less than or equal to the second number; wherein the second time period is a next time period adjacent to the first time period.
In some optional embodiments, the apparatus further comprises: a fifth determining module, configured to determine, in response to determining that the first number is greater than the second number, a first probability value for sending the incremental update download request to the cloud within the second time period, and/or a second probability value for sending the request to be updated to the cloud again within the second time period; a ninth sending module, configured to send the incremental update downloading request to the cloud in the second time period based on the first probability value, or send the request to be updated to the cloud again in the second time period based on the second probability value.
In some optional embodiments, the database comprises an underlying library of feature information required to perform a visual task process; the device further comprises: the acquisition module is used for acquiring the characteristic information to be processed; the visual task processing module is used for processing a visual task according to the characteristic information to be processed and the latest database content currently stored by the terminal to obtain a visual task processing result; and the third execution module is used for executing corresponding target operation based on the visual task processing result.
In some optional embodiments, the visual task processing comprises face recognition; the target operation includes at least one of: door control switch operation and payment operation.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. One of ordinary skill in the art can understand and implement it without inventive effort.
The embodiment of the disclosure further provides a database synchronization system, which includes a cloud and a terminal, and the terminal can synchronize the database content of the latest version of the cloud to the terminal in an incremental synchronization manner. The cloud end can comprise any database synchronization device for the cloud end, and the terminal can comprise any database synchronization device for the terminal.
The embodiment of the present disclosure further provides a computer-readable storage medium, where the storage medium stores a computer program, and the computer program is used to execute any one of the above database synchronization methods.
In some optional embodiments, the disclosed embodiments provide a computer program product comprising computer readable code which, when run on a device, a processor in the device executes instructions for implementing a database synchronization method as provided in any of the above embodiments.
In some optional embodiments, the present disclosure further provides another computer program product for storing computer readable instructions, which when executed, cause a computer to perform the database synchronization method provided in any one of the above embodiments.
The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
The embodiment of the present disclosure further provides a database synchronization apparatus, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to invoke executable instructions stored in the memory to implement any of the database synchronization methods described above.
Fig. 7 is a schematic hardware structure diagram of a database synchronization apparatus according to an embodiment of the present disclosure. The database synchronization apparatus 710 includes a processor 711, and may further include an input apparatus 712, an output apparatus 713, and a memory 714. The input device 712, the output device 713, the memory 714, and the processor 711 are connected to each other via a bus.
The memory includes, but is not limited to, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), or a portable read-only memory (CD-ROM), which is used for storing instructions and data.
The input means are for inputting data and/or signals and the output means are for outputting data and/or signals. The output means and the input means may be separate devices or may be an integral device.
The processor may include one or more processors, for example, one or more Central Processing Units (CPUs), and in the case of one CPU, the CPU may be a single-core CPU or a multi-core CPU.
The memory is used to store program codes and data of the network device.
The processor is used for calling the program codes and data in the memory and executing the steps in the method embodiment. Specifically, reference may be made to the description of the method embodiment, which is not repeated herein.
It will be appreciated that figure 7 only shows a simplified design of the database synchronization apparatus. In practical applications, the database synchronization apparatuses may also respectively include other necessary elements, including but not limited to any number of input/output apparatuses, processors, controllers, memories, etc., and all the database synchronization apparatuses that can implement the embodiments of the present disclosure are within the scope of the present disclosure.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
The above description is only exemplary of the present disclosure and should not be taken as limiting the disclosure, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (20)

1. A database synchronization method, comprising:
receiving an incremental updating downloading request sent by a terminal; the incremental updating downloading request is used for requesting to download a data packet for incremental updating;
determining a target increment updating data packet which is requested to be downloaded and corresponds to the increment updating downloading request;
and sending the target increment updating data packet to the terminal.
2. The method of claim 1, wherein the incremental update download request comprises a first version number and a first message digest; the first version number is the version number of a database currently stored by the terminal, and the first information abstract is an information abstract obtained based on the database content corresponding to the first version number;
the determining of the target incremental update data packet of the request corresponding to the incremental update download request includes:
determining whether the terminal is allowed to perform incremental updating or not according to the first information abstract and the first version number;
in response to determining that the terminal is allowed to perform incremental updating, determining the target incremental updating data packet according to the first version number and the second version number; and the second version number is the latest version number in at least one database version currently stored in the cloud.
3. The method of claim 2, further comprising:
in response to determining that the terminal is not allowed to perform incremental updating, sending target indication information to the terminal; the target indication information is used for indicating that the cloud end does not allow the terminal to perform incremental updating.
4. The method according to claim 2 or 3, wherein the determining whether to allow the terminal to perform incremental updating according to the first message digest and the first version number comprises:
determining a second information abstract corresponding to the first version number according to the corresponding relation between the pre-stored information abstract and the version number;
and in response to determining that the first information summary is matched with the second information summary, determining that incremental updating is allowed for the terminal, otherwise determining that incremental updating is not allowed for the terminal.
5. The method according to any one of claims 2-4, wherein said determining the target incremental update package according to the first version number and the second version number comprises:
and determining the target incremental updating data packet according to the first version number, the second version number and an incremental updating data packet corresponding to every two pre-stored adjacent version numbers.
6. The method according to any one of claims 1-5, further comprising:
sending a second version number and a third information abstract to the terminal; the second version number is the latest version number in at least one database version currently stored in the cloud, and the third information summary is an information summary obtained based on the database content corresponding to the second version number.
7. The method according to any of claims 1-6, wherein before receiving the request for downloading the incremental update sent by the terminal, the method further comprises:
receiving a request to be updated sent by the terminal; and the request to be updated is used for requesting incremental updating.
8. The method of claim 7, further comprising:
determining a first number of terminals sending the request to be updated within a first time period;
sending the first number and the second number to the terminal sending the request to be updated; and the second number is the maximum number of terminals which are supported by the cloud in the first time period and are used for performing incremental updating and downloading.
9. The method according to any one of claims 1-8, further comprising:
receiving a full-quantity updating downloading request sent by the terminal; the full-update downloading request is used for requesting to download a data packet for performing full-update;
sending a target full-volume updating data packet to the terminal according to the full-volume updating downloading request; the target full-volume updating data packet comprises full-volume data corresponding to the latest version in at least one database version currently stored by the cloud.
10. A database synchronization method, comprising:
sending an incremental updating downloading request to the cloud; the incremental updating downloading request is used for requesting to download a data packet for incremental updating;
downloading a target increment updating data packet sent by the cloud based on the increment updating downloading request;
and performing incremental updating on the currently stored database content based on the target incremental updating data packet.
11. The method of claim 10 wherein the incremental update download request comprises a first version number and a first message digest; the first version number is the version number of a database currently stored by the terminal, and the first information abstract is an information abstract obtained based on the database content corresponding to the first version number.
12. The method of claim 11, further comprising:
receiving a second version number and a third information abstract sent by the cloud; the second version number is the latest version number in at least one database version currently stored in the cloud, and the third information summary is an information summary obtained based on the database content corresponding to the second version number;
determining a fourth information summary based on the database content after the incremental updating;
and in response to determining that the third information digest is matched with the fourth information digest, determining that incremental updating is successful, and updating the version number of the currently stored database to the second version number.
13. The method according to any one of claims 10-12, further comprising:
and in response to the determination of the failure of the incremental update, sending an incremental update downloading request to the cloud again, and performing the incremental update on the currently stored database content again on the basis of a target incremental update data packet sent by the cloud again.
14. The method according to any one of claims 10-13, further comprising:
responding to target indication information sent by the cloud end or determining that the failure times of incremental updating reach preset times, and sending a full-updating downloading request to the cloud end; the target indication information is used for indicating that the cloud end does not allow the terminal to perform incremental updating, and the full-updating downloading request is used for requesting to download a data packet for performing full updating;
after downloading a target full-amount updating data packet sent by the cloud, performing full-amount updating on the currently stored database content based on the target full-amount updating data packet; the target full-volume updating data packet comprises full-volume data corresponding to the latest version in at least one database version currently stored by the cloud.
15. The method of any of claims 10-14, wherein prior to sending the request for the incremental update download to the cloud, the method further comprises:
sending a request to be updated to the cloud; the request to be updated is used for requesting incremental updating;
receiving a first number and a second number sent by the cloud end; the first number is the number of terminals which send requests to be updated and are received by the cloud end in a first time period, and the second number is the maximum number of terminals which are supported by the cloud end in the first time period and are used for carrying out incremental updating and downloading;
in response to determining that the first number is less than or equal to the second number, determining to send the incremental update download request to the cloud for a second time period; wherein the second time period is a next time period adjacent to the first time period.
16. The method of claim 15, further comprising:
in response to determining that the first number is greater than the second number, determining a first probability value of sending the incremental update download request to the cloud within the second time period, and/or sending a second probability value of the request to be updated to the cloud again within the second time period;
and sending the incremental update downloading request to the cloud end within the second time period based on the first probability value, or sending the request to be updated to the cloud end again within the second time period based on the second probability value.
17. A database synchronization apparatus, comprising:
the first receiving module is used for receiving an incremental updating downloading request sent by a terminal; the incremental updating downloading request is used for requesting to download a data packet for incremental updating;
the first determining module is used for determining a target increment updating data packet which is requested to be downloaded and corresponds to the increment updating downloading request;
and the first sending module is used for sending the target increment updating data packet to the terminal.
18. A database synchronization apparatus, comprising:
the second sending module is used for sending an incremental updating downloading request to the cloud; the incremental updating downloading request is used for requesting to download a data packet for incremental updating;
the downloading module is used for downloading a target increment updating data packet sent by the cloud based on the increment updating downloading request;
and the increment updating module is used for updating the increment of the currently stored database content based on the target increment updating data packet.
19. A computer-readable storage medium, characterized in that the storage medium stores a computer program for executing the database synchronization method according to any of the preceding claims 1-16.
20. A database synchronization apparatus, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to invoke executable instructions stored in the memory to implement the database synchronization method of any of claims 1-16.
CN202110184605.0A 2021-02-10 2021-02-10 Database synchronization method and device, storage medium and equipment Pending CN112860797A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110184605.0A CN112860797A (en) 2021-02-10 2021-02-10 Database synchronization method and device, storage medium and equipment
PCT/CN2021/121416 WO2022170771A1 (en) 2021-02-10 2021-09-28 Database synchronization method and apparatus, and storage medium and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110184605.0A CN112860797A (en) 2021-02-10 2021-02-10 Database synchronization method and device, storage medium and equipment

Publications (1)

Publication Number Publication Date
CN112860797A true CN112860797A (en) 2021-05-28

Family

ID=75989599

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110184605.0A Pending CN112860797A (en) 2021-02-10 2021-02-10 Database synchronization method and device, storage medium and equipment

Country Status (2)

Country Link
CN (1) CN112860797A (en)
WO (1) WO2022170771A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022170771A1 (en) * 2021-02-10 2022-08-18 上海商汤智能科技有限公司 Database synchronization method and apparatus, and storage medium and device
CN114969203A (en) * 2022-05-11 2022-08-30 深圳无一科技有限公司 Data real-time synchronization method, device, equipment and medium

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117675842B (en) * 2023-12-07 2024-05-07 上海钛翮信息科技有限公司 Incremental synchronization method and system based on multi-device data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140173588A1 (en) * 2012-12-14 2014-06-19 Samsung Electronics Co., Ltd. Software update service method and apparatus for mobile terminal
CN106973099A (en) * 2017-03-28 2017-07-21 广东欧珀移动通信有限公司 A kind of data-updating method, apparatus and system
CN108111331A (en) * 2017-11-06 2018-06-01 北京趣拿软件科技有限公司 Acquisition methods, device, storage medium, processor and the system of updated data package
CN109788027A (en) * 2018-12-13 2019-05-21 平安科技(深圳)有限公司 Method of data synchronization, device, server and computer storage medium
CN112052020A (en) * 2019-06-06 2020-12-08 广州市百果园信息技术有限公司 Data updating method, device, system, computer equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104426926B (en) * 2013-08-21 2019-03-29 腾讯科技(深圳)有限公司 The processing method and processing device of data is issued in timing
CN112860797A (en) * 2021-02-10 2021-05-28 上海商汤智能科技有限公司 Database synchronization method and device, storage medium and equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140173588A1 (en) * 2012-12-14 2014-06-19 Samsung Electronics Co., Ltd. Software update service method and apparatus for mobile terminal
CN106973099A (en) * 2017-03-28 2017-07-21 广东欧珀移动通信有限公司 A kind of data-updating method, apparatus and system
CN108111331A (en) * 2017-11-06 2018-06-01 北京趣拿软件科技有限公司 Acquisition methods, device, storage medium, processor and the system of updated data package
CN109788027A (en) * 2018-12-13 2019-05-21 平安科技(深圳)有限公司 Method of data synchronization, device, server and computer storage medium
CN112052020A (en) * 2019-06-06 2020-12-08 广州市百果园信息技术有限公司 Data updating method, device, system, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022170771A1 (en) * 2021-02-10 2022-08-18 上海商汤智能科技有限公司 Database synchronization method and apparatus, and storage medium and device
CN114969203A (en) * 2022-05-11 2022-08-30 深圳无一科技有限公司 Data real-time synchronization method, device, equipment and medium

Also Published As

Publication number Publication date
WO2022170771A1 (en) 2022-08-18

Similar Documents

Publication Publication Date Title
CN112860797A (en) Database synchronization method and device, storage medium and equipment
CN111385330B (en) Message pushing method, device, computer equipment and storage medium
CN111127778B (en) Bank self-service terminal recommendation method and device
CN111447185A (en) Processing method of push information and related equipment
CN107666525A (en) The method and apparatus of cluster container IP distribution
CN111695051B (en) Page access method and device based on code scanning, electronic equipment and storage medium
CN111770355B (en) Media server determination method, device, server and storage medium
CN105204871B (en) A kind of plug-in type development approach and device
CN109254914A (en) Software development kit test method, system, computer installation and readable storage medium storing program for executing
CN105144109A (en) Distributed data center technology
CN111460474A (en) Method and device for realizing decentralized prediction machine, storage and computer
CN110930254A (en) Data processing method, device, terminal and medium based on block chain
CN110839071A (en) Information storage method, device and storage medium based on block chain
CN114327710A (en) Function management method, management device, terminal equipment and readable storage medium
CN113407340A (en) Service control system, gateway service method, service request forwarding method and device
CN115883310A (en) Service deployment method, service deployment system, electronic device, and storage medium
CN111178568A (en) Service reservation request processing method, device, server and storage medium
CN112114856A (en) Hot updating method and device
CN109743416A (en) CDN domain name dispatching method, device, computer readable storage medium and system
CN109347695A (en) A kind of upgrade testing system and method
CN115086194A (en) Data transmission method for cloud application, computing equipment and computer storage medium
CN108733391A (en) A kind of method and apparatus of dynamic resource allocation
CN114860426A (en) Data cooperation processing method, system, device, equipment and storage medium
CN114385570A (en) Data synchronization method and device, electronic equipment and readable medium
CN114675872A (en) Data processing method, device and equipment for application program and storage medium

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40043961

Country of ref document: HK