CN111475510A - Data synchronization method, device, system and equipment based on tree structure - Google Patents

Data synchronization method, device, system and equipment based on tree structure Download PDF

Info

Publication number
CN111475510A
CN111475510A CN202010260861.9A CN202010260861A CN111475510A CN 111475510 A CN111475510 A CN 111475510A CN 202010260861 A CN202010260861 A CN 202010260861A CN 111475510 A CN111475510 A CN 111475510A
Authority
CN
China
Prior art keywords
data
tree
key value
data packet
tree structure
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
CN202010260861.9A
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.)
Stringon Technology Beijing Co ltd
Original Assignee
Stringon Technology Beijing 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 Stringon Technology Beijing Co ltd filed Critical Stringon Technology Beijing Co ltd
Priority to CN202010260861.9A priority Critical patent/CN111475510A/en
Publication of CN111475510A publication Critical patent/CN111475510A/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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • 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/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

According to the data synchronization method, device, system and equipment based on the tree structure, the tree structure data packet is generated based on the original data to be synchronized, the leaf nodes and the non-leaf nodes in the tree structure data packet are converted into corresponding key values by adopting a preset encryption algorithm, and the key values are transmitted to the cloud for synchronization. The key value after encryption conversion is calculated through Hash, so that the data storage structure is more complex, other people are not easy to obtain original data, and the safety of the data is greatly protected.

Description

Data synchronization method, device, system and equipment based on tree structure
Technical Field
The present invention relates to the field of data synchronization technologies, and in particular, to a data synchronization method, apparatus, system, and device based on a tree structure.
Background
With the development of computer technology, the demand for data storage is in progress, and like data grids are proposed, cloud storage is also a storage system developed and derived after the cloud computing concept appears. Cloud computing (cloud computing) is an internet-based mode of addition, use, and delivery of related services, typically involving the provision of dynamically scalable and often virtualized resources over the internet. Due to the popularization of the mobile equipment, the functions borne by the mobile equipment are more and more, and more data related to the mobile equipment are pulled, so that the mobile equipment can synchronously store huge data to the cloud end, the burden of the mobile equipment is relieved, and the real-time data sharing among different equipment is facilitated.
In the scene, according to the prior art, the terminal acquires and uploads data of personal information, images, videos and interactive information to the cloud computing platform, the cloud computing platform stores or processes the data, then transmits the data to the terminal from the cloud computing platform, and the data is decoded at the terminal for display. Data is likely to be intercepted by other people in the transmission process or on the cloud platform, so that personal information is leaked, and great potential safety hazards exist.
Disclosure of Invention
The embodiment of the invention provides a data synchronization method, device, system and equipment based on a tree structure, which are used for solving the safety problem brought by the synchronization process of a cloud computing platform and mobile equipment in the prior art.
In order to solve the above technical problem, an embodiment of the present invention provides a data synchronization method based on a tree structure, including:
determining original data to be synchronized;
generating a data packet with a tree structure based on the original data;
converting the tree-structured data packet into a corresponding key value by adopting a preset algorithm;
and transmitting the key value to a cloud storage.
Further, the generating a data packet with a tree structure based on the original data specifically includes: and generating the tree-structured data packet by using an object container nested mode.
Further, the converting the tree structure data packet into a corresponding key value by using a preset algorithm specifically includes:
obtaining an initial value corresponding to a leaf node in the tree-structured data packet, performing hash calculation to obtain a key corresponding to the leaf node, and encrypting the initial value of the leaf node by adopting a symmetric encryption method;
acquiring initial values of all cotyledon sub-nodes under the non-leaf nodes in the tree-structure data packet, arranging the initial value sets of the cotyledon sub-nodes, performing hash calculation on the arranged values to obtain keys of the non-leaf nodes, and encrypting the arranged values of the non-leaf nodes.
Further, before transmitting the key value to a cloud storage, the method further includes: and generating a version number, and transmitting the key value and the version number to a cloud for storage.
Further, key values stored in a cloud are obtained based on the data reading request and transmitted to a client, the key values are converted into leaf nodes to be extracted, and a tree-structure data packet is generated based on the leaf nodes.
Further, a version number stored in a cloud is obtained based on a data reading request, a key value corresponding to the version number is obtained according to the version number and is transmitted to a client, the key value is converted into a leaf node to be extracted, and a tree-structured data packet is generated based on the leaf node.
Further, the data reading request contains identification information of the client.
On the other hand, an embodiment of the present invention provides a data synchronization apparatus based on a tree structure, including:
a determining unit for determining original data to be synchronized;
a generating unit, configured to generate a data packet with a tree structure based on the original data;
the conversion unit is used for converting the tree-structured data packet into a corresponding key value by adopting a preset algorithm;
and the transmission unit is used for transmitting the key value to the cloud storage.
On the other hand, an embodiment of the present invention provides a data synchronization system based on a tree structure, including:
the client is used for generating a tree-structure data packet from original data to be synchronized, converting leaf nodes and non-leaf nodes in the tree-structure data packet into corresponding key values, and transmitting the key values to the cloud for storage;
and the cloud end is used for storing the key value, responding to the data reading request and verifying the data.
In another aspect, an embodiment of the present invention provides a computer device, where a computer program is stored, and when the computer program is executed by at least one processor, the computer program implements the method described in any one of the above.
According to the data synchronization method based on the tree structure, provided by the embodiment of the invention, the tree structure data packet is generated based on the original data to be synchronized, the leaf nodes and the non-leaf nodes in the tree structure data packet are converted into corresponding key values by adopting a preset encryption algorithm, and the key values are transmitted to the cloud for synchronization. The key value after encryption conversion is calculated through Hash, so that the data storage structure is more complex, other people are not easy to obtain original data, and the safety of the data is greatly protected.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic diagram of a data synchronization method based on a tree structure according to an embodiment of the present invention,
FIG. 2 is a schematic structural diagram of a data synchronization apparatus based on a tree structure according to an embodiment of the present invention,
figure 3 is a data synchronization system based on tree structure according to an embodiment of the present invention,
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the specific embodiments of the present invention and the accompanying drawings. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
With the development of computer technology, the data volume of the client is larger and larger, and the requirement for data synchronization is stronger and stronger. The development of cloud computing prompts a cloud storage provider to develop, and meanwhile, the cloud storage provider also provides data synchronization related services, and data uploading and downloading processes need to be completed in the internet, so that the problem of data leakage is caused, and encryption processing of data becomes a key point for guaranteeing data security.
Fig. 1 is a schematic diagram of a data synchronization method based on a tree structure according to an embodiment of the present invention, and as shown in fig. 1, the embodiment of the present invention provides a data synchronization method based on a tree structure, which is applied to a client, and the method includes:
s101, determining original data to be synchronized;
the original data in the invention is generated at the client, and the client can be terminal equipment such as a mobile phone, a Pad and a computer, and can also be an App installed on the terminal equipment. The original data described in the present invention is not limited in type and data amount, and may be video data, audio data, or character strings, and the like, and the present invention is not limited herein.
The original data to be synchronized can be determined according to the operation instruction of the client user, and can also be determined according to the condition preset by the user. Optionally, the type, size, synchronization time, etc. of the original data are determined.
Step S102, generating a data packet with a tree structure based on the original data;
the data packet of the tree structure comprises a plurality of nodes, including a root node, branch nodes in the tree and leaf nodes, wherein any node comprises a node name, position information, data information and a mapping relation among the nodes related to the node, and any node can trace back the root node, the branch nodes and the leaf nodes related to the node.
After the original data to be synchronized is determined, the original data is classified and the like, and a tree-structured data packet is generated in a container nesting mode. The container technology comprises the following modes:
vector- -the standard and secure array in ST L.
deque-ended queue-is functionally similar to a vector, but data can be added to it at both front and back ends.
list-the cursor can move only one step at a time if you are already familiar with the linked list, then the list in ST L is a doubly linked list (each node has two pointers to the predecessor and to the successor).
set-contains sorted data whose value (value) must be unique.
map (mapping) -a set of sorted duplets, each element in map is composed of two values, where key (key, key in a map must be unique) is used in sorting or searching, and its value can be retrieved in a container; and the other value is the value associated with the element. For example, instead of finding a piece of data by ar [43] ═ override ", the map may find a piece of data by a method of ar [" banana "] ═ override". If you want to get the information of the elements in the information, the information can be easily realized by inputting the full names of the elements.
multiset-and set (set) are similar, however the values therein do not require to be unique (i.e. there may be duplicates).
multimap-and map (map) are similar, however the key values therein do not need to be unique (i.e., there may be duplications).
The embodiment of the invention adopts one or a combination of a plurality of data packets to realize the tree structure data packet, for example, the map container is embedded in the map container to form the tree structure, and the stored original data is encrypted at the same time, thereby further protecting the security of the data. Specifically, taking MAP container as an example, MAP < int, MAP < int, int > > mapmapmapdatae; for the map container, the first parameter is the key value of the map container, the second parameter is the data corresponding to the key value, and the corresponding data can be found through the key value. The first map of the present invention stores another map object, and the key value in the second map corresponds to the actual stored data of the present invention.
Optionally, a node table and a relation mapping table may be generated based on the original data, a data storage frame of a tree structure is built based on the node table and the relation mapping table, the frame of the tree structure includes a plurality of nodes, such as root nodes, branch nodes, leaf nodes, and the like, the nodes represent location information, data types, key values, and the like of data storage, and a mapping relationship exists between the nodes. The frame is set with the storage positions of different data tables and the mapping relation between the data tables so as to store specific data at corresponding positions subsequently.
Step S103, converting the tree-structured data packet into a corresponding new key value by adopting a preset algorithm;
and after the data packet of the tree structure is finished, acquiring an initial value corresponding to each node in the data packet of the tree structure. And aiming at the leaf nodes, carrying out Hash calculation on the initial values corresponding to the leaf nodes to obtain keys corresponding to the leaf nodes, and carrying out encryption processing on the initial values of the leaf nodes by adopting a symmetric encryption method. Aiming at non-leaf nodes such as root nodes and branch nodes, obtaining initial values of all sub-leaf sub-nodes under the non-leaf nodes to form an initial value set, arranging the initial value set of the non-leaf nodes, carrying out hash calculation on the values obtained after arrangement to obtain keys of the non-leaf nodes, and carrying out encryption processing on the values arranged for the non-leaf nodes.
And the key after the hash calculation and the encrypted value are new key values corresponding to the nodes, and the data packet of the tree structure is updated.
And step S104, transmitting the new key value to a cloud storage.
And transmitting the new key value obtained in the step S103 and the data of the node corresponding to the key value to a designated cloud end for storage through a network.
Optionally, after a new key value is generated, a version number is generated based on the tree structure data packet after the new key value is updated. The version number can be generated at the client, and then transmitted to the cloud for storage together with the new key value through the network, and optionally, after receiving the new key value at the cloud, the version number can be generated and stored at the cloud based on the tree-structured data packet of the new key value.
The data synchronization method based on the tree structure provided by the embodiment of the invention further comprises the following steps: after a data reading request is received, key values stored in a cloud are obtained based on the data reading request and transmitted to a client, the key values are converted into leaf nodes to be extracted, and a tree-structure data packet is generated based on the leaf nodes. Optionally, after a data reading request is received, a version number stored in a cloud is obtained based on the data reading request, a key value corresponding to the version number is obtained according to the version number and is transmitted to a client, the key value is converted into a leaf node to be extracted, and a tree-structured data packet is generated based on the leaf node. The data reading request comprises identification information of the client, and can be sent by a user at the client.
According to the data synchronization method based on the tree structure, provided by the embodiment of the invention, the tree structure data packet is generated based on the original data to be synchronized, the leaf nodes and the non-leaf nodes in the tree structure data packet are converted into corresponding new key values by adopting a preset encryption algorithm, and the new key values are transmitted to the cloud for synchronization. Through the tree structure with a complex structure, the key value after encryption conversion is calculated through Hash, so that the data storage structure is more complex, other people are not easy to obtain original data, and the safety of the data is greatly protected.
Fig. 2 is a schematic structural diagram of a data synchronization device based on a tree structure according to an embodiment of the present invention, and as shown in fig. 2, the data synchronization device based on the tree structure includes:
a determining unit 201, configured to determine original data to be synchronized;
the original data in the invention is generated at the client, and the client can be terminal equipment such as a mobile phone, a Pad and a computer, and can also be an App installed on the terminal equipment. The original data described in the present invention is not limited in type and data amount, and may be video data, audio data, or character strings, and the like, and the present invention is not limited herein.
The original data to be synchronized can be determined according to the operation instruction of the client user, and can also be determined according to the condition preset by the user. Optionally, the type, size, synchronization time, etc. of the original data are determined.
A generating unit 202, configured to generate a data packet with a tree structure based on the original data;
the data packet of the tree structure generated in the invention comprises a plurality of nodes, including a root node, a branch node in the tree and a leaf node. Any node comprises a node name, position information, data information and a mapping relation between nodes related to the node, and any node can trace back a root node, a branch node and a leaf node related to the node.
After the original data to be synchronized is determined, the original data is classified and the like, and the generating unit 202 generates the tree-structured data packet according to the processed original data in a container nesting manner. The container technology comprises the following modes:
vector- -the standard and secure array in ST L.
deque-ended queue-is functionally similar to a vector, but data can be added to it at both front and back ends.
list-the cursor can move only one step at a time if you are already familiar with the linked list, then the list in ST L is a doubly linked list (each node has two pointers to the predecessor and to the successor).
set-contains sorted data whose value (value) must be unique.
map (mapping) -a set of sorted duplets, each element in map is composed of two values, where key (key, key in a map must be unique) is used in sorting or searching, and its value can be retrieved in a container; and the other value is the value associated with the element. For example, instead of finding a piece of data by ar [43] ═ override ", the map may find a piece of data by a method of ar [" banana "] ═ override". If you want to get the information of the elements in the information, the information can be easily realized by inputting the full names of the elements.
multiset-and set (set) are similar, however the values therein do not require to be unique (i.e. there may be duplicates).
multimap-and map (map) are similar, however the key values therein do not need to be unique (i.e., there may be duplications).
The generation unit 2020 in the embodiment of the present invention uses one or a combination of several of them to implement a tree-structured data packet, for example, a map container is embedded in a map container to form a tree structure, and at the same time, the stored original data is encrypted, so that the security of the data is further protected. Specifically, taking MAP container as an example, MAP < int, MAP < int, int > > mapmapmapdatae; for the map container, the first parameter is the key value of the map container, the second parameter is the data corresponding to the key value, and the corresponding data can be found through the key value. The first map of the present invention stores another map object, and the key value in the second map corresponds to the actual stored data of the present invention.
Optionally, the generating unit 202 may also perform processing based on the original data to generate a node table and a relational mapping table, and build a data storage frame with a tree structure based on the node table and the relational mapping table, where the frame with the tree structure includes a plurality of nodes, such as root nodes, branch nodes, leaf nodes, and the like, where the nodes represent location information, data types, key values, and the like of data storage, and there is a mapping relationship between the nodes. The frame is set with the storage positions of different data tables and the mapping relation between the data tables so as to store specific data at corresponding positions subsequently.
A converting unit 203, configured to convert the tree structure data packet into a corresponding key value by using a preset algorithm;
when the data packet of the tree structure is completed, the conversion unit 203 obtains the initial value corresponding to each node in the data packet of the tree structure. For a leaf node, the conversion unit 203 performs hash calculation on the initial value corresponding to the leaf node to obtain a key corresponding to the leaf node, and encrypts the initial value of the leaf node by using a symmetric encryption method. For non-leaf nodes such as root nodes and branch nodes, the conversion unit 203 acquires initial values of all sub-leaf child nodes under the non-leaf nodes to form an initial value set, arranges the initial value set of the non-leaf nodes, performs hash calculation on the arranged values to obtain keys of the non-leaf nodes, and encrypts the arranged values of the non-leaf nodes.
The above-mentioned key and encrypted value after hash calculation are new key values corresponding to the nodes, and the conversion unit 203 updates the new key values to the data packets of the tree structure.
The transmission unit 203 is configured to transmit the key value to a cloud storage.
The conversion unit 203 obtains a new key value and data of a node corresponding to the new key value, and the transmission unit 204 transmits the converted tree-structured data packet to a designated cloud storage through a network.
Optionally, the data synchronization apparatus based on a tree structure provided in the embodiment of the present invention further includes: and a version number generation unit. After the conversion unit 203 generates a new key value, the tree-structured data packet is updated according to the new key value, and the version number generation unit generates a version number. The version number may be generated at the client, and then transmitted together with the tree-structured data packet after updating the new key value from the network to the cloud for storage through the transmission unit 204, and optionally, the version number generation unit may also generate and store a version number based on the tree-structured data packet after receiving the tree-structured data packet after updating the new key value at the cloud.
The data synchronization device based on the tree structure provided by the embodiment of the invention further comprises: and a data reading unit. After receiving a data reading request, a data reading unit acquires a data packet stored in a cloud based on the data reading request, transmits the data packet to a client, reads a key value in the data packet, converts the key value into a leaf node to be extracted, and generates a tree-structured data packet based on the leaf node. Optionally, after a data reading request is received, a version number stored in a cloud is obtained based on the data reading request, a key value corresponding to the version number is obtained according to the version number and is transmitted to a client, the key value is converted into a leaf node to be extracted, and a tree-structured data packet is generated based on the leaf node. The data reading request comprises identification information of the client, and can be sent by a user at the client.
According to the data synchronization device based on the tree structure, the tree structure data packet is generated based on the original data to be synchronized, the leaf nodes and the non-leaf nodes in the tree structure data packet are converted into corresponding new key values by adopting a preset encryption algorithm, and the new key values are transmitted to the cloud end for synchronization. Through the tree structure with a complex structure, the key value after encryption conversion is calculated through Hash, so that the data storage structure is more complex, other people are not easy to obtain original data, and the safety of the data is greatly protected.
Fig. 3 is a data synchronization system based on a tree structure according to an embodiment of the present invention, which includes a client configured to generate a tree structure data packet from original data to be synchronized, convert leaf nodes and non-leaf nodes in the tree structure data packet into corresponding new key values, and transmit the new key values to a cloud for storage; the client may be a terminal device such as a mobile phone, a pad, or a computer, or may be an app installed on the terminal device.
And the cloud end is used for storing the new key value, responding to the data reading request and verifying the data. Optionally, the cloud may also generate a version number based on the key value.
In the data synchronization system based on the tree structure provided by the embodiment of the invention, the client generates the tree structure data packet based on the original data to be synchronized, and the leaf nodes and the non-leaf nodes in the tree structure data packet are converted into corresponding new key values by adopting a preset encryption algorithm and transmitted to the cloud for synchronization. Through the tree structure with a complex structure, the key value after encryption conversion is calculated through Hash, so that the data storage structure is more complex, original data are not easily obtained by other people in the transmission process and in the cloud, and the safety of the data is greatly protected.
Fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present invention, as shown in fig. 4, the device includes a processor 301, a memory 302, and a data bus 303, where the processor 301 and the memory 302 are communicatively connected through the bus 303;
the processor 301 calls the program instructions in the memory 302 to execute the methods provided by the above-mentioned embodiments of the methods, including: determining original data to be synchronized; generating a data packet with a tree structure based on the original data; converting the tree-structured data packet into a corresponding new key value by adopting a preset algorithm; and transmitting the new key value to a cloud storage. Obtaining an initial value corresponding to a leaf node in the tree-structured data packet, performing hash calculation to obtain a key corresponding to the leaf node, and encrypting the initial value of the leaf node by adopting a symmetric encryption method; acquiring initial values of all cotyledon sub-nodes under the non-leaf nodes in the tree-structure data packet, arranging the initial value sets of the cotyledon sub-nodes, performing hash calculation on the arranged values to obtain keys of the non-leaf nodes, and encrypting the arranged values of the non-leaf nodes. And generating a version number based on the data packet of the new key value. And acquiring a new key value data packet stored at the cloud based on the data reading request, transmitting the new key value data packet to a client, converting the key value into a leaf node to be extracted, and generating a tree-structure data packet based on the leaf node. The method comprises the steps of obtaining a version number stored in a cloud based on a data reading request, obtaining a key value data packet corresponding to the version number according to the version number, transmitting the key value data packet to a client, converting the key value into a leaf node to be extracted, and generating a tree-structure data packet based on the leaf node.
The computer device provided by the embodiment of the invention generates the data packet with the tree structure by processing the original data to be synchronized, and converts the key value in the data packet by adopting the preset encryption algorithm, thereby ensuring the safety of the data.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus (device), or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable devices (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A data synchronization method based on a tree structure is applied to a client and is characterized by comprising the following steps:
determining original data to be synchronized;
generating a data packet with a tree structure based on the original data;
converting the tree-structured data packet into a corresponding new key value by adopting a preset algorithm;
and transmitting the new key value to a cloud storage.
2. The method according to claim 1, wherein said generating a tree structured data packet based on said original data comprises:
and generating the tree-structured data packet by using an object container nested mode.
3. The method of claim 2, wherein the converting the tree structure packet into the corresponding key value by using a predetermined algorithm specifically comprises:
obtaining an initial value corresponding to a leaf node in the tree-structured data packet, performing hash calculation to obtain a key corresponding to the leaf node, and encrypting the initial value of the leaf node by adopting a symmetric encryption method;
acquiring initial values of all cotyledon sub-nodes under the non-leaf nodes in the tree-structure data packet, arranging the initial value sets of the cotyledon sub-nodes, performing hash calculation on the arranged values to obtain keys of the non-leaf nodes, and encrypting the arranged values of the non-leaf nodes.
4. The method of claim 3, further comprising:
and generating a version number based on the data packet of the new key value.
5. The method of claim 3, wherein a new key value packet stored in a cloud is obtained based on a data read request and transmitted to a client, the key value is converted into a leaf node to be extracted, and a tree-structured packet is generated based on the leaf node.
6. The method of claim 4, wherein a version number stored in a cloud is obtained based on a data reading request, a key value packet corresponding to the version number is obtained according to the version number and transmitted to a client, the key value packet is converted into a leaf node to be extracted, and a tree-structured packet is generated based on the leaf node.
7. The method of claim 5 or 6, wherein: the data reading request contains identification information of the client.
8. A data synchronization apparatus based on a tree structure, comprising:
a determining unit for determining original data to be synchronized;
a generating unit, configured to generate a data packet with a tree structure based on the original data;
the conversion unit is used for converting the tree-structured data packet into a corresponding key value by adopting a preset algorithm;
and the transmission unit is used for transmitting the key value to the cloud storage.
9. A data synchronization system based on a tree structure, comprising:
the client is used for generating a tree-structure data packet from original data to be synchronized, converting leaf nodes and non-leaf nodes in the tree-structure data packet into corresponding key values, and transmitting the key values to the cloud for storage;
and the cloud end is used for storing the key value, responding to the data reading request and verifying the data.
10. A computer device comprising a processor, a memory, a data bus, and a computer program stored in the memory, wherein the computer program when executed by the at least one processor implements the method of any one of claims 1-7.
CN202010260861.9A 2020-04-03 2020-04-03 Data synchronization method, device, system and equipment based on tree structure Pending CN111475510A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010260861.9A CN111475510A (en) 2020-04-03 2020-04-03 Data synchronization method, device, system and equipment based on tree structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010260861.9A CN111475510A (en) 2020-04-03 2020-04-03 Data synchronization method, device, system and equipment based on tree structure

Publications (1)

Publication Number Publication Date
CN111475510A true CN111475510A (en) 2020-07-31

Family

ID=71750540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010260861.9A Pending CN111475510A (en) 2020-04-03 2020-04-03 Data synchronization method, device, system and equipment based on tree structure

Country Status (1)

Country Link
CN (1) CN111475510A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104778225A (en) * 2015-03-27 2015-07-15 浙江大学 Method for synchronizing data in unstructured data multi-storage system
CN105095287A (en) * 2014-05-14 2015-11-25 华为技术有限公司 LSM (Log Structured Merge) data compact method and device
CN107315539A (en) * 2017-05-12 2017-11-03 武汉斗鱼网络科技有限公司 A kind of date storage method and data extraction method
CN109165221A (en) * 2018-08-16 2019-01-08 北京京东尚科信息技术有限公司 Date storage method, device, block chain node and the storage medium of block chain
CN110569987A (en) * 2018-05-18 2019-12-13 深信服科技股份有限公司 Automatic operation and maintenance method, operation and maintenance equipment, storage medium and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105095287A (en) * 2014-05-14 2015-11-25 华为技术有限公司 LSM (Log Structured Merge) data compact method and device
CN104778225A (en) * 2015-03-27 2015-07-15 浙江大学 Method for synchronizing data in unstructured data multi-storage system
CN107315539A (en) * 2017-05-12 2017-11-03 武汉斗鱼网络科技有限公司 A kind of date storage method and data extraction method
CN110569987A (en) * 2018-05-18 2019-12-13 深信服科技股份有限公司 Automatic operation and maintenance method, operation and maintenance equipment, storage medium and device
CN109165221A (en) * 2018-08-16 2019-01-08 北京京东尚科信息技术有限公司 Date storage method, device, block chain node and the storage medium of block chain

Similar Documents

Publication Publication Date Title
CN110399118B (en) Random number generation method and device, storage medium and electronic equipment
CN103873692B (en) Method, device and system for resource sharing
CN111711655A (en) Block chain-based electronic data evidence storing method, system, storage medium and terminal
CN111340453A (en) Federal learning development method, device, equipment and storage medium
CN109408521A (en) A kind of method and device thereof for more new block chain global data state
WO2014117593A1 (en) Method, terminal and system for implementing data sharing
CN111461751B (en) Real estate information chain organization method based on block chain, historical state tracing method and device
CN114422134A (en) Data secure transmission method and equipment
CN113094334B (en) Digital service method, device, equipment and storage medium based on distributed storage
CN115344841A (en) Meta-universe access method based on block chain network and block chain network device
CN111506931A (en) Electronic evidence management method based on block chain and cloud computing platform
CN105871998A (en) Data displaying method and device
CN109981551A (en) A kind of data transmission system based on block chain, method and relevant device
CN111475511A (en) Data storage method, data access method, data storage device, data access device and data access equipment based on tree structure
CN113626512A (en) Data processing method, device, equipment and readable storage medium
CN111475510A (en) Data synchronization method, device, system and equipment based on tree structure
CN112202555A (en) Information processing method, device and equipment for generating random number based on attribute of information
CN110851794A (en) Media file uplink method and device, storage medium and electronic device
CN111368314A (en) Modeling and predicting method, device, equipment and storage medium based on cross features
CN111400399A (en) Account book synchronization method and device of block chain system and hardware equipment
CN115361376A (en) Government affair file uploading method and device, electronic equipment and storage medium
CN106161570A (en) Document down loading method based on page script, device, server group and system
CN112000669B (en) Environment monitoring data processing method and device, storage medium and terminal
CN112150590B (en) Animation file output method and device
WO2016110204A1 (en) Processing of process object, and method and device for generating plug-in

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200731