WO2023206142A1 - Procédé et appareil de synchronisation de données, dispositif informatique et support d'enregistrement - Google Patents

Procédé et appareil de synchronisation de données, dispositif informatique et support d'enregistrement Download PDF

Info

Publication number
WO2023206142A1
WO2023206142A1 PCT/CN2022/089570 CN2022089570W WO2023206142A1 WO 2023206142 A1 WO2023206142 A1 WO 2023206142A1 CN 2022089570 W CN2022089570 W CN 2022089570W WO 2023206142 A1 WO2023206142 A1 WO 2023206142A1
Authority
WO
WIPO (PCT)
Prior art keywords
blockchain
write operation
block
global data
data
Prior art date
Application number
PCT/CN2022/089570
Other languages
English (en)
Chinese (zh)
Inventor
张作鹏
Original Assignee
西门子股份公司
西门子(中国)有限公司
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 西门子股份公司, 西门子(中国)有限公司 filed Critical 西门子股份公司
Priority to PCT/CN2022/089570 priority Critical patent/WO2023206142A1/fr
Publication of WO2023206142A1 publication Critical patent/WO2023206142A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions

Definitions

  • the present application relates to the field of data processing technology, and in particular, to a data synchronization method, device, computer equipment and storage medium.
  • the distributed system needs to maintain data consistency.
  • the distributed system includes multiple communication modules. The user needs to determine the status of each communication module, and each communication module needs to determine the online status of other communication modules. That is, it is necessary to ensure the consistency of communication module status data between communication modules.
  • the data of distributed systems are stored in centralized storage such as databases and file systems. All nodes included in the distributed system interact with centralized storage to ensure that each Nodes are able to read consistent data from centralized storage.
  • the data synchronization method, device, computer equipment and storage medium provided by this application can improve data security while ensuring data consistency.
  • a data synchronization method is provided, which is applied to a blockchain node.
  • the data synchronization method includes: monitoring the generation of new blocks on the blockchain, wherein the blockchain uses To store write operation instructions for global data; after monitoring that a new block is generated on the blockchain, obtain the write operation instructions stored in the new block; according to the write operation instructions stored in the new block, perform The global data cached locally by the blockchain node is updated. Since each node locally caches the latest global data, if any node fails, other nodes can still operate normally, thus ensuring the reliability of the distributed system operation. Since the write operation instructions for global data are stored on the blockchain, the security of global data can be improved based on the non-tamperable and traceable characteristics of data on the blockchain.
  • the global data is constructed based on each write operation instruction for the global data, and the constructed global data is cached locally in the blockchain node.
  • the constructed global data is cached locally in the blockchain node.
  • users of the blockchain node need to access global data, they can directly access the global data cached locally on the blockchain node, which reduces the delay in accessing global data and improves the user experience.
  • constructing global data based on each write operation instruction for global data includes: reading the write operation instructions for global data from each block of the blockchain; Each write operation instruction constructs global data. Based on the non-tamperable and traceable characteristics of data on the blockchain, the write operation instructions are read from the blockchain to construct global data, which ensures the accuracy of the constructed global data and ensures global data between blockchain nodes. consistency.
  • the method further includes: persisting the write operation instructions stored in the new block to the local storage of the blockchain node; the writing operation instructions based on the global data Constructing global data includes: determining new blocks on the blockchain during the period when the blockchain node stops running; persisting the write operation instructions stored in each of the new blocks to the block Local storage of the chain node; construct global data according to each write operation instruction persisted in the local storage of the blockchain node. After detecting that a new block is generated on the blockchain, the write operation instructions stored in the new block are persisted to the local storage of the blockchain node.
  • each blockchain node After each blockchain node is started or restored to operating status, it can be based on the local
  • the persistent write operation instructions in the storage are used to construct global data, without the need to read each block of the blockchain to obtain each write operation instruction, which shortens the time required to construct global data and improves the efficiency of constructing global data.
  • determining the newly added blocks on the blockchain during the period when the blockchain node stops running includes: determining the latest persistent write operation on the blockchain node. The first block corresponding to the instruction; determine the second block on the blockchain with a block sequence number greater than the first block as a new block on the blockchain during the period when the blockchain node stops running. .
  • the block sequence number of the first block can be and the block sequence number of each block on the blockchain to determine the new blocks generated when the blockchain node stops running, ensuring that the write operation instructions stored in each new block can be persisted to the local storage of the blockchain node , and then when constructing global data based on persistent write operation instructions on the blockchain node, the accuracy of the constructed global data is guaranteed.
  • determining the newly added blocks on the blockchain during the period when the blockchain node stops running includes: determining the latest persistent write operation on the blockchain node. Instruct the third block corresponding to the instruction; according to the timestamp stored in the block on the blockchain, determine the fourth block whose generation time indicated by the corresponding timestamp is later than that of the third block; transfer the fourth block The block is determined to be a newly added block on the blockchain during the period when the blockchain node stops running.
  • each fourth block can be determined as a block.
  • the new blocks generated when the blockchain node stops running ensure that the write operation instructions stored in each new block can be persisted to the local storage of the blockchain node, thus ensuring the accuracy of the global data.
  • the method further includes: receiving at least one write operation instruction for global data; creating a new block on the blockchain, and storing the received at least one write operation instruction. into the new block created.
  • a new block will be generated to store the current blockchain node’s write operation instructions for global data, so that each blockchain node can store the write operation instructions for global data on the blockchain, and can store the global data according to the instructions on the blockchain.
  • the write operation instructions update the global data.
  • the synchronization mechanism based on the blockchain can ensure the consistency of the global data among the blockchain nodes and also ensure the timeliness of synchronizing the global data.
  • the write operation instructions for global data include at least one of a data addition instruction, a data deletion instruction, and a data modification instruction.
  • Write operation instructions that change global data by adding, deleting, modifying, etc. will be stored on the blockchain, so that various changes to global data by each blockchain node can be synchronized to other blockchain nodes. , ensuring the reliability and effectiveness of global data synchronization between blockchain nodes.
  • a data synchronization device which is applied to a blockchain node.
  • the data synchronization device includes: a monitoring module for monitoring the generation of new blocks on the blockchain, wherein: The blockchain is used to store write operation instructions for global data; the acquisition module is used to obtain the write operation instructions stored in the new block after the monitoring module detects that a new block is generated on the blockchain. ; Update module, used to update the global data cached locally by the blockchain node according to the write operation instructions stored in the new block.
  • a computer device including: a processor, a communication interface, a memory, and a communication bus.
  • the processor, the memory, and the communication interface complete each other through the communication bus. communication between; the memory is used to store at least one executable instruction, the executable instruction causes the processor to perform operations corresponding to the data synchronization method provided in the first aspect.
  • a computer-readable storage medium is provided.
  • Computer instructions are stored on the computer-readable storage medium. When executed by a processor, the computer instructions cause the processor to execute Operations corresponding to the data synchronization method provided in the above first aspect.
  • a computer program product is provided, which is tangibly stored on a computer-readable medium and includes computer-executable instructions, which when executed At least one processor is caused to execute the data synchronization method provided by the above-mentioned first aspect or any possible implementation of the first aspect.
  • each node included in the distributed system serves as a blockchain node of the blockchain system.
  • the blockchain is used to store write operations for global data. After each blockchain node performs a write operation on global data, The corresponding write operation instructions will be stored in the new block of the blockchain, and based on the synchronization mechanism of the blockchain, the new block will be synchronized to the blockchain on each blockchain node, so when monitoring the blockchain After a new block is generated, the global data cached locally by the blockchain node can be updated according to the write operation instructions stored in the new block, ensuring that the local cache of each blockchain node has the same global data, realizing distributed Data consistency between nodes in the system.
  • each node locally caches the latest global data, other nodes can still operate normally if any node fails, thus ensuring the reliability of the distributed system operation. Since the write operation instructions for global data are stored on the blockchain, the security of global data can be improved based on the non-tamperable and traceable characteristics of data on the blockchain.
  • Figure 1 is a flow chart of a data synchronization method according to an embodiment of the present application
  • Figure 2 is a flow chart of a data synchronization method according to another embodiment of the present application.
  • Figure 3 is a schematic diagram of a data synchronization device according to an embodiment of the present application.
  • Figure 4 is a schematic diagram of a data synchronization device according to another embodiment of the present application.
  • Figure 5 is a schematic diagram of a data synchronization device according to another embodiment of the present application.
  • Figure 6 is a schematic diagram of a computer device according to an embodiment of the present application.
  • Data synchronization method 200 Data synchronization method 300: Data synchronization device
  • 602 Processor 604: Communication interface 606: Memory
  • the current technical means is to store the data of distributed systems in centralized storage, such as databases, file systems, etc.
  • centralized storage such as databases, file systems, etc.
  • Each node included in the distributed system Data interaction with centralized storage means that all nodes write data uniformly stored on the centralized storage and read data from the centralized storage, thus ensuring the consistency of data between nodes.
  • the centralized storage fails, all nodes will be unable to read and write to the centralized storage, and the entire distributed system will not be able to operate normally.
  • data on centralized storage is easily tampered with, resulting in low data security.
  • each node in the distributed system is a blockchain node.
  • the corresponding write operation instructions are stored in the block.
  • each write operation instruction will be synchronized to the blockchain of each node, and then each node can read the new write operation instruction from the blockchain, and based on The read write operation instructions update the global data to ensure the synchronization of global data between nodes. Since each node can obtain the latest global data based on the write operation instructions stored on the blockchain, if any node fails, other nodes can still operate normally, thus ensuring the reliability of the distributed system operation. Since the write operation instructions for global data are stored on the blockchain, the security of global data can be improved based on the non-tamperable and traceable characteristics of data on the blockchain.
  • FIG. 1 is a flow chart of a data synchronization method provided by an embodiment of the present application.
  • the data synchronization method is applied to blockchain nodes.
  • the blockchain system includes multiple blockchain nodes. Each node in the distributed system They are all a blockchain node, and each blockchain node stores a complete blockchain.
  • the synchronization mechanism between each blockchain node ensures the consistency of the data stored in the blockchain on each blockchain node.
  • the data synchronization method 100 includes the following steps:
  • Step 101 Monitor the generation of new blocks on the blockchain, where the blockchain is used to store write operation instructions for global data.
  • a new block will be generated on the blockchain to store the write operation instructions corresponding to the write operation.
  • the blockchain on each blockchain node will generate new blocks simultaneously to ensure that the same blocks are stored in the blockchain on each blockchain node. The data.
  • Write operation instructions are used to instruct the write operation of global data.
  • Global data is jointly maintained by nodes in the distributed system, that is, global data is maintained synchronously by multiple blockchain nodes.
  • Write operations include adding new global data, Delete and modify.
  • a write operation instruction can indicate that data a is added to the global data, data b in the global data is deleted, or data c in the global data is modified.
  • a new block can store one or more write operation instructions.
  • the multiple write operation instructions can correspond to the write operation of global data by the same blockchain node, or they can also correspond to the write operation of global data by different blockchain nodes.
  • Step 102 After detecting that a new block is generated on the blockchain, obtain the write operation instructions stored in the new block.
  • the blockchain node After the blockchain node detects that a new block is generated on the blockchain, it reads the new block on the blockchain and obtains the write operation instructions stored in the new block.
  • the number of new blocks on the blockchain can be one or more. When the number of new blocks on the blockchain is multiple, each new block is read separately to obtain the information stored in each new block. write operation instructions.
  • Step 103 Update the global data cached locally in the blockchain node according to the write operation instructions stored in the new block.
  • the blockchain node has global data cached locally. After obtaining the write operation instructions stored in the new block, the global data is updated according to the obtained write operation instructions. Since the write operation instruction indicates the write operation of one or more blockchain nodes to global data, the write operation instruction in the new block indicates the latest write operation to global data. According to the write operation instruction stored in the new block, the local The cached global data performs corresponding write operations, ensuring that the local storage of each blockchain node has the same global data.
  • each node included in the distributed system serves as a blockchain node of the blockchain system.
  • the blockchain is used to store write operations for global data.
  • Each blockchain node performs write operations on global data.
  • the corresponding write operation instructions will be stored in the new block of the blockchain, and based on the synchronization mechanism of the blockchain, the new block will be synchronized to the blockchain on each blockchain node, so when the area is monitored
  • the global data cached locally by the blockchain node can be updated according to the write operation instructions stored in the new block to ensure that the local cache of each blockchain node has the same global data. This is achieved Data consistency among nodes in a distributed system.
  • each node locally caches the latest global data, if any node fails, other nodes can still operate normally, thus ensuring the reliability of the distributed system operation. Since the write operation instructions for global data are stored on the blockchain, the security of global data can be improved based on the non-tamperable and traceable characteristics of data on the blockchain.
  • the global data can be constructed based on each write operation instruction for the global data, and the constructed global data can be cached locally on the blockchain node. storage.
  • each write operation instruction for global data indicates each write operation for global data, so the latest global data can be constructed based on each write operation instruction for global data. data.
  • the global data is constructed according to each write operation instruction of the global data, and the constructed global data is cached and stored locally in the blockchain node.
  • the blockchain node When users need to access global data, they can directly access the global data cached locally on the blockchain node, which reduces the delay in accessing global data and improves the user experience.
  • the write operation instructions for global data can be read from each block of the blockchain, and then based on each read write operation instruction Operation instructions build global data.
  • the write operation instructions stored in the new block can be persisted to the local storage of the blockchain node.
  • the block After the blockchain node starts or resumes operation it is possible to determine the new blocks on the blockchain during the period when the blockchain node stops running. That is, it is possible to determine whether other blockchain nodes have access to global data while the current blockchain node stops running. A write operation was performed. If there is a new blockchain, the write operation instructions stored in the new block will be persisted to the local storage of the blockchain node, and then global data will be constructed based on each write operation instruction persisted in the local storage of the blockchain node. . If there is no new block, global data will be constructed based on the persistent write operation instructions stored locally in the blockchain node.
  • the write operation instructions stored in the new block are persisted to the local storage of the blockchain node.
  • global data can be constructed based on the persistent write operation instructions in local storage without having to read each block of the blockchain to obtain each write operation instruction, shortening the time required to build global data. Improve the efficiency of building global data.
  • the first block corresponding to the latest persistent write operation instruction on the blockchain node can be determined, Then, the second block on the blockchain with a block sequence number greater than the first block is determined as a new block on the blockchain during the period when the blockchain node stops running.
  • the sequence number of the block in the blockchain increases.
  • the block sequence number of the first block in the blockchain is 0, the block sequence number of the second block is 1, and the block sequence number of the Nth block is 1.
  • the block sequence number of a block is N-1, and N is a positive integer greater than 2. Therefore, the generation order of blocks can be determined based on the block sequence number.
  • Each write operation instruction persisted in the local storage of the blockchain node has a block identifier.
  • the block identifier is the block sequence number corresponding to the block on the blockchain where the write operation instruction is stored. According to the latest persistence on the blockchain node
  • the block identifier of the written operation instruction can be used to determine the first block on the blockchain that stores the latest persistent write operation instruction, and then the second block on the blockchain with a block sequence number greater than the first block can be determined. Confirmed as a new block.
  • the block sequence number of the first block is N, and the block sequence number of the last block on the blockchain is also N, that is, the largest block sequence number among the blocks on the blockchain is N, then there is no second Block, that is, there are no new blocks on the blockchain during the period when the blockchain node stops running. If the block sequence number of the first block is N, and the block sequence number of the last block on the blockchain is greater than N, then the block corresponding to the block sequence number N on the blockchain is not the last one on the blockchain. Block, at this time, each block on the blockchain with a corresponding block number greater than N is determined as a new block.
  • the number of new blocks can be one or more.
  • the block serial numbers of the blocks on the blockchain increase sequentially according to the generation time, after determining the first block that stores the latest persistent write operation instructions on the blockchain node, it can be based on the first block.
  • the block sequence number of a block and the block sequence number of each block on the blockchain determine the new blocks generated when the blockchain node stops running, ensuring that the write operation instructions stored in each new block can be persisted to
  • the local storage of the blockchain node ensures the accuracy of the constructed global data when constructing global data based on persistent write operation instructions on the blockchain node.
  • the third block corresponding to the latest persistent write operation instruction on the blockchain node can be determined, Then, based on the timestamps stored in each block on the blockchain, the fourth block whose generation time indicated by the corresponding time window is later than the third block is determined, and then the fourth block is determined as the period during which the blockchain node stops running. New blocks on the blockchain.
  • Each block in the blockchain not only stores write operation instructions, but also stores the block sequence number and timestamp.
  • the timestamp can indicate the generation time of the corresponding block. Since blocks on the blockchain are generated sequentially in chronological order, the order in which blocks are generated can be determined based on the timestamps stored in the blocks.
  • the last block on the blockchain is the third block.
  • Each block whose timestamp indicates the time stored in the block is determined as the fourth block, and each fourth block is determined as a new block on the blockchain during the period when the blockchain node stops operating.
  • the number of fourth blocks Can be one or more.
  • the blocks on the blockchain are generated sequentially in chronological order, and new write operation instructions are stored in the new blocks, it is necessary to determine the storage of the latest persistent write operation instructions on the blockchain node.
  • the fourth block whose generation time is later than the third block can be determined based on the timestamp stored in the third block and the timestamps stored in each block on the blockchain, and then each block can be The fourth block is determined to be the new block generated when the blockchain node stops running. It ensures that the write operation instructions stored in each new block can be persisted to the local storage of the blockchain node, thereby ensuring that all the global Accuracy of data.
  • a user when a user writes global data through the current blockchain node, he or she can receive at least one write operation instruction for the global data, and then create a new block on the blockchain and receive Each write operation instruction is stored in the new block created.
  • the new block created by the current blockchain node will be synchronized to the blockchain on other blockchain nodes, making other blocks Chain nodes can update global data based on new blocks on the blockchain to ensure the consistency of global data between blockchain nodes.
  • the blockchain node can not only update the writing operations of other blockchain nodes on global data based on the new block, but also generate new blocks to store the writing operation instructions of the current blockchain node on global data, so that every Each blockchain node can store the write operation instructions for global data on the blockchain, and can update the global data based on the write operation instructions stored on the blockchain. Based on the synchronization mechanism of the blockchain, it can be guaranteed The consistency of global data among various blockchain nodes can also ensure the timeliness of synchronizing global data.
  • the write operation instructions for global data include at least one of a data addition instruction, a data deletion instruction, and a data modification instruction.
  • the data new instruction is used to add new data entries in the global data.
  • the global data includes data 1 to data 100, a total of 100 data.
  • the data new instruction is used to instruct the new data 101 in the global data. Based on this data, After the add instruction writes the global data, the global data includes data 1 to data 101, a total of 101 pieces of data.
  • the data deletion instruction is used to delete data entries in the global data.
  • the global data includes data 1 to data 101, a total of 101 pieces of data.
  • the data deletion instruction is used to instruct the deletion of data 1 and data 2 in the global data. Based on the data deletion After the instruction writes the global data, the global data includes a total of 99 pieces of data from data 3 to data 101.
  • the data modification instruction is used to modify one or more data items in the global data.
  • the global data includes data 1 to data 100, which counts 100 pieces of data.
  • the data modification instruction is used to instruct data 10 in the global data to be modified. After the global write operation is performed based on this data modification instruction, data 10 in the global data is modified to data 10'.
  • the write operation instructions include at least one of a data addition instruction, a data deletion instruction, and a data modification instruction. Therefore, any write operation instruction that changes global data through addition, deletion, modification, etc. will be Stored on the blockchain, all changes made by each blockchain node to global data can be synchronized to other blockchain nodes, ensuring the reliability and effectiveness of global data synchronization between blockchain nodes.
  • FIG. 2 is a flow chart of a data synchronization method according to another embodiment of the present application. As shown in Figure 2, the data synchronization method 200 includes the following steps:
  • Step 201 After the blockchain node starts or resumes operation, persist the write operation instructions stored in the newly added block to the local storage of the blockchain node.
  • Step 202 Load each write operation instruction persisted in the local storage of the blockchain node.
  • the write operation instructions stored in each block on the blockchain will be persisted to the local storage of the blockchain node.
  • load each write operation instruction persisted in the local storage of the blockchain node After persisting the write operation instructions stored in each new block to the local storage of the blockchain node, load each write operation instruction persisted in the local storage of the blockchain node. Operating instructions.
  • Step 203 Construct global data according to each write operation instruction, and store and cache the global data locally on the blockchain node.
  • each write operation instruction After loading each write operation instruction persisted in the local storage of the blockchain node, each write operation instruction is re-executed in sequence according to the time sequence of the corresponding write operation, the global data is constructed, and the constructed global data is cached in the area. Local storage of blockchain nodes.
  • Step 204 Monitor the generation of new blocks on the blockchain.
  • the blockchain node When the blockchain node is in running state, it detects the generation of new blocks on the blockchain. It should be noted that the generation method of new blocks on the blockchain and the synchronization method of the blockchain can be implemented through innovative methods or through existing methods, which are not limited by the embodiments of this application.
  • Step 205 Determine whether a new block is generated on the blockchain. If yes, execute step 206. If not, execute step 204.
  • Step 206 Update the global data according to the write operation instructions stored in the new block.
  • a new block When it is determined that a new block is generated on the blockchain, it means that a blockchain node has written to the global data, and the write operation instructions stored in the new block indicate the write operation to the global data, and the new block will The stored write operation instructions are persisted to the local storage of the blockchain node, and the local cached global data is updated according to the write operation instructions stored in the new block to achieve global data synchronization between each blockchain node.
  • blockchain nodes can monitor the online status of monitored devices such as PLCs and sensors.
  • the global data is the number of monitored devices online.
  • the number of monitored devices currently online is 0, that is, the global data is equal to 0.
  • the update process of the global data is 0+1+1-1, and the global data after the update is equal to 1.
  • FIG 3 is a schematic diagram of a data synchronization device according to an embodiment of the present application.
  • the data synchronization device is applied to a blockchain node.
  • the data synchronization device 300 includes:
  • Monitoring module 301 is used to monitor the generation of new blocks on the blockchain, where the blockchain is used to store write operation instructions for global data;
  • the acquisition module 302 is used to acquire the write operation instructions stored in the new block after the monitoring module detects that a new block is generated on the blockchain;
  • the update module 303 is used to update the global data cached locally by the blockchain node according to the write operation instructions stored in the new block.
  • the monitoring module 301 can be used to perform step 101 in the above method embodiment
  • the acquisition module 302 can be used to perform step 102 in the above method embodiment
  • the update module 303 can be used to perform the steps in the above method embodiment. 103.
  • FIG 4 is a schematic diagram of a data synchronization device according to another embodiment of the present application.
  • the data synchronization device 300 also includes a building module 304.
  • the building module 304 can construct global data based on each write operation instruction for the global data after the blockchain node starts or resumes running status, and caches the constructed global data into the local storage of the blockchain node.
  • the building module 304 when building global data based on each write operation instruction for global data, can read the write operation instructions for global data from each block of the blockchain, and then read the Each write operation instruction received constructs global data.
  • the acquisition module 302 can persist the write operation instructions stored in the new block to the local storage of the blockchain node.
  • the building module 304 can determine the new blocks on the blockchain during the period when the blockchain node stops running, and store the write operations in each new block. The instructions are persisted to the local storage of the blockchain node, and then global data is constructed based on each write operation instruction persisted in the local storage of the blockchain node.
  • the building module 304 when the building module 304 determines the new block on the blockchain during the period when the blockchain node stops running, it can determine the number of blocks corresponding to the latest persistent write operation instruction on the blockchain node. One block, and then determine the second block on the blockchain with a block sequence number greater than the first block as a new block on the blockchain during the period when the blockchain node stops running.
  • the building module 304 when the building module 304 determines the new block on the blockchain during the period when the blockchain node stops running, it can determine the number of blocks corresponding to the latest persistent write operation instruction on the blockchain node. Three blocks, and based on the timestamp stored in the block on the blockchain, determine the fourth block whose generation time indicated by the corresponding timestamp is later than the third block, and then determine the fourth block as the blockchain node New blocks on the blockchain during the shutdown period.
  • Figure 5 is a schematic diagram of a data synchronization device according to another embodiment of the present application. As shown in Figure 5, based on the data synchronization device shown in Figure 3, the data synchronization device 300 also includes a creation module 305.
  • the creation module 305 may receive at least one write operation instruction for global data, create a new block on the blockchain, and store the received at least one write operation instruction into the created new block.
  • the write operation instructions for global data include at least one of a data addition instruction, a data deletion instruction, and a data modification instruction.
  • Figure 6 is a schematic diagram of a computer device according to an embodiment of the present application.
  • the specific embodiment of the present application does not limit the specific implementation of the computer device.
  • the computer device 600 provided by the embodiment of the present application includes: a processor 602, a communication interface 604, a memory 606, and a communication bus 608. in:
  • the processor 602, communication interface 604, and memory 606 communicate through a communication bus 608.
  • Communication interface 604 is used to communicate with other computer devices or servers.
  • the processor 602 is configured to execute the program 610, and specifically may execute the relevant steps in any of the foregoing data synchronization method embodiments.
  • program 610 may include program code including computer operating instructions.
  • the processor 602 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present application.
  • the one or more processors included in the smart device can be the same type of processor, such as one or more CPUs; or they can be different types of processors, such as one or more CPUs and one or more ASICs.
  • Memory 606 is used to store programs 610.
  • Memory 606 may include high-speed RAM memory and may also include non-volatile memory, such as at least one disk memory.
  • the program 610 can be specifically used to cause the processor 602 to execute the data synchronization method in any of the foregoing embodiments.
  • each step in the program 610 please refer to the corresponding steps and corresponding descriptions in the units in any of the foregoing data synchronization method embodiments, and will not be described again here.
  • Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described devices and modules can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be described again here.
  • each node included in the distributed system serves as a blockchain node of the blockchain system.
  • the blockchain is used to store write operations for global data, and each blockchain node performs operations on the global data.
  • the corresponding write operation instructions will be stored in the new block of the blockchain, and based on the synchronization mechanism of the blockchain, the new block will be synchronized to the blockchain on each blockchain node, so when monitoring After a new block is generated on the blockchain, the global data in the local cache of the blockchain node can be updated according to the write operation instructions stored in the new block to ensure that the local cache of each blockchain node has the same global data. Achieve data consistency between nodes in the distributed system.
  • each node locally caches the latest global data, if any node fails, other nodes can still operate normally, thus ensuring the reliability of the distributed system operation. Since the write operation instructions for global data are stored on the blockchain, the security of global data can be improved based on the non-tamperable and traceable characteristics of data on the blockchain.
  • the present application also provides a computer-readable storage medium that stores instructions for causing a machine to perform the data synchronization method as described herein.
  • a system or device equipped with a storage medium may be provided, on which the software program code that implements the functions of any of the above embodiments is stored, and the computer (or CPU or MPU) of the system or device ) reads and executes the program code stored in the storage medium.
  • the program code itself read from the storage medium can implement the functions of any one of the above embodiments, and therefore the program code and the storage medium storing the program code form part of this application.
  • Examples of storage media for providing program codes include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), Tapes, non-volatile memory cards and ROM.
  • the program code can be downloaded from the server computer via the communications network.
  • the program code read from the storage medium is written into the memory provided in the expansion board inserted into the computer or written into the memory provided in the expansion module connected to the computer, and then based on the program code
  • the instructions cause the CPU installed on the expansion board or expansion module to perform part or all of the actual operations, thereby realizing the functions of any of the above embodiments.
  • Embodiments of the present application also provide a computer program product, which is tangibly stored on a computer-readable medium and includes computer-executable instructions that, when executed, cause at least one processor to Execute the data synchronization method provided by the above embodiments. It should be understood that each solution in this embodiment has the corresponding technical effects in the above method embodiment, and will not be described again here.
  • the execution order of each step is not fixed and can be adjusted as needed.
  • the system structure described in the above embodiments may be a physical structure or a logical structure, that is, some modules may be implemented by the same physical entity, or some modules may be implemented by multiple physical entities, or may be implemented by multiple Some components in separate devices are implemented together.
  • the hardware module can be implemented mechanically or electrically.
  • a hardware module may include permanently dedicated circuitry or logic (such as a specialized processor, FPGA, or ASIC) to complete the corresponding operation.
  • Hardware modules may also include programmable logic or circuits (such as general-purpose processors or other programmable processors), which can be temporarily set by software to complete corresponding operations.
  • the specific implementation method mechanical method, or dedicated permanent circuit, or temporarily installed circuit

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

La présente invention concerne un procédé et un appareil de synchronisation de données, un dispositif informatique et un support de stockage, qui sont appliqués à un nœud de chaîne de blocs. Le procédé de synchronisation de données consiste à : surveiller la génération d'un nouveau bloc sur une chaîne de blocs, la chaîne de blocs étant utilisée pour stocker une instruction d'opération d'écriture pour des données globales (101) ; après qu'il a été surveillé que le nouveau bloc est généré sur la chaîne de blocs, acquérir l'instruction d'opération d'écriture stockée dans le nouveau bloc (102) ; et mettre à jour, selon l'instruction d'opération d'écriture stockée dans le nouveau bloc, les données globales mises en cache localement par le nœud de chaîne de blocs (103). Selon la présente solution, la sécurité des données est améliorée tandis que la cohérence des données est assurée.
PCT/CN2022/089570 2022-04-27 2022-04-27 Procédé et appareil de synchronisation de données, dispositif informatique et support d'enregistrement WO2023206142A1 (fr)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/089570 WO2023206142A1 (fr) 2022-04-27 2022-04-27 Procédé et appareil de synchronisation de données, dispositif informatique et support d'enregistrement

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2022/089570 WO2023206142A1 (fr) 2022-04-27 2022-04-27 Procédé et appareil de synchronisation de données, dispositif informatique et support d'enregistrement

Publications (1)

Publication Number Publication Date
WO2023206142A1 true WO2023206142A1 (fr) 2023-11-02

Family

ID=88516636

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/089570 WO2023206142A1 (fr) 2022-04-27 2022-04-27 Procédé et appareil de synchronisation de données, dispositif informatique et support d'enregistrement

Country Status (1)

Country Link
WO (1) WO2023206142A1 (fr)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107944034A (zh) * 2017-12-13 2018-04-20 国云科技股份有限公司 一种基于区块链的数据非差异化方法
CN108683738A (zh) * 2018-05-16 2018-10-19 腾讯科技(深圳)有限公司 图数据处理方法和图数据的计算任务发布方法
CN112597241A (zh) * 2020-12-10 2021-04-02 浙江大学 一种基于区块链的分布式数据库存储方法及系统
US20210374693A1 (en) * 2020-05-26 2021-12-02 Derek Norman La Salle System and method for a decentralized portable information container supporting privacy protected digital information credentialing, remote administration, local validation, access control and remote instruction signaling utilizing blockchain distributed ledger and container wallet technologies

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107944034A (zh) * 2017-12-13 2018-04-20 国云科技股份有限公司 一种基于区块链的数据非差异化方法
CN108683738A (zh) * 2018-05-16 2018-10-19 腾讯科技(深圳)有限公司 图数据处理方法和图数据的计算任务发布方法
US20210374693A1 (en) * 2020-05-26 2021-12-02 Derek Norman La Salle System and method for a decentralized portable information container supporting privacy protected digital information credentialing, remote administration, local validation, access control and remote instruction signaling utilizing blockchain distributed ledger and container wallet technologies
CN112597241A (zh) * 2020-12-10 2021-04-02 浙江大学 一种基于区块链的分布式数据库存储方法及系统

Similar Documents

Publication Publication Date Title
US9367598B2 (en) Merging an out of synchronization indicator and a change recording indicator in response to a failure in consistency group formation
CN108121782B (zh) 查询请求的分配方法、数据库中间件系统以及电子设备
CN106815218B (zh) 数据库访问方法、装置和数据库系统
US20150213100A1 (en) Data synchronization method and system
US11188560B2 (en) Synchronizing object in local object storage node
US9229970B2 (en) Methods to minimize communication in a cluster database system
US20160041885A1 (en) Data Replicating System, Data Replicating Method, Node Device, Management Device and Computer Readable Medium
CN107451013B (zh) 基于分布式系统的数据恢复方法、装置及系统
US11748215B2 (en) Log management method, server, and database system
US10048978B2 (en) Apparatus and method for identifying a virtual machine having changeable settings
CN103138912A (zh) 数据同步方法及系统
US20180139280A1 (en) Methods and apparatuses for cluster switching
CN110019510A (zh) 一种进行增量同步的方法及装置
CN112052230A (zh) 多机房数据同步方法、计算设备及存储介质
CN110121712B (zh) 一种日志管理方法、服务器和数据库系统
CN112000850B (zh) 进行数据处理的方法、装置、系统及设备
WO2023206142A1 (fr) Procédé et appareil de synchronisation de données, dispositif informatique et support d'enregistrement
CN117435569A (zh) 缓存系统动态扩容方法、装置、设备、介质和程序产品
CN116303789A (zh) 多分片多副本数据库并行同步方法、装置及可读介质
CN112988880A (zh) 数据同步方法、装置、电子设备及计算机存储介质
US8533135B2 (en) Model generating device and model generating method
CN115328931A (zh) 数据库集群数据校验方法、装置、存储介质及电子设备
CN113806309A (zh) 基于分布式锁的元数据删除方法、系统、终端及存储介质
CN111984460B (zh) 元数据的恢复方法及装置
CN110770702B (zh) 信息处理装置、信息处理系统、信息处理方法及记录介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22938996

Country of ref document: EP

Kind code of ref document: A1