WO2020043048A1 - 一种平行链数据同步方法、设备和存储介质 - Google Patents

一种平行链数据同步方法、设备和存储介质 Download PDF

Info

Publication number
WO2020043048A1
WO2020043048A1 PCT/CN2019/102509 CN2019102509W WO2020043048A1 WO 2020043048 A1 WO2020043048 A1 WO 2020043048A1 CN 2019102509 W CN2019102509 W CN 2019102509W WO 2020043048 A1 WO2020043048 A1 WO 2020043048A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
information
chain
operation sequence
transaction information
Prior art date
Application number
PCT/CN2019/102509
Other languages
English (en)
French (fr)
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 US17/272,622 priority Critical patent/US11824996B2/en
Publication of WO2020043048A1 publication Critical patent/WO2020043048A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3263Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
    • H04L9/3268Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements using certificate validation, registration, distribution or revocation, e.g. certificate revocation list [CRL]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/12Transmitting and receiving encryption devices synchronised or initially set up in a particular manner
    • 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/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9017Indexing; Data structures therefor; Storage structures using directory or table look-up
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0891Revocation or update of secret information, e.g. encryption key update or rekeying
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/56Financial cryptography, e.g. electronic payment or e-cash

Definitions

  • the present application relates to the field of Internet financial technology, and in particular, to a parallel-chain data synchronization method, device, and storage medium.
  • the parallel chain uses a region that is synchronized behind several block heights of the main chain.
  • the block information method is used to synchronize the block information of the main chain. Taking the block chain where Bitcoin is located as an example, it is generally considered that after a block is generated by packaging, after 6 block heights, it can be considered that the block has been basically Confirm that if the block height of the block on the node's main chain is H, then the node's parallel chain will only synchronize the block when the height is at least the block height after H + 6. However, even after the height of 6 blocks, once a fork occurs on the main chain, the parallel chains of different nodes will still be synchronized to different block information, causing the problem of inconsistent parallel chains of each node.
  • the present invention provides a parallel chain data synchronization method, which is applicable to a node of a parallel chain and includes:
  • the first block operation sequence information Obtain the first block operation sequence information, and synchronize the main chain blocks to generate or update the parallel chain according to the first block operation sequence information.
  • the first block operation sequence information also includes the main chain nodes' The operation serial number and operation information of the revoked block.
  • the first block operation sequence information is obtained by the main chain after receiving several transaction information sent by the user's client. The transaction information is agreed upon and the first block is generated.
  • the operation sequence number of a block is updated after the operation sequence information of the first block includes the operation sequence number and operation information of each block of the main chain.
  • the present invention provides a parallel-chain data synchronization method, which is applicable to a node of a main chain and includes:
  • Consensus on transaction information and generate a first block and record the operation number and operation information of the first block and update the first block operation sequence information, so that the nodes of the parallel chain obtain the first block operation sequence information, Synchronize the blocks of the main chain to generate or update the parallel chain according to the first block operation sequence information, where the first block operation sequence information includes the operation serial number and operation information of each block of the main chain, and the nodes of the main chain are in The operation serial number and operation information of the cancelled block when the undo block is executed.
  • the present invention further provides an apparatus, including one or more processors and a memory, where the memory contains instructions executable by the one or more processors to cause the one or more processors to perform operations according to the present invention.
  • the parachain data synchronization method provided by the embodiment.
  • the present invention further provides a storage medium storing a computer program, which causes the computer to execute the parallel-chain data synchronization method provided by the embodiments of the present invention.
  • a method, device, and storage medium for synchronizing parachain data obtain a first block operation sequence information, synchronize the main chain blocks according to the first block operation sequence information to generate or update a parachain,
  • the first block operation sequence information also includes the operation serial number and operation information of the block that the node of the main chain cancels when performing the cancellation of the block, wherein the first block operation sequence information is sent by the main chain to the user's client.
  • Consensus the transaction information and generate a first block after a number of transaction information, and record the operation number of the first block and update it.
  • the first block operation sequence information includes the operation number and operation information of each block of the main chain.
  • a method, device, and storage medium for synchronizing parachain data provided by some embodiments of the present invention further monitor the first block, the pre-configured block height range to generate other blocks, and the method of generating empty blocks to avoid When there is no transaction in the parallel chain for a long time, the user has the misunderstanding that the parallel chain stops generating new blocks, which optimizes the user experience.
  • FIG. 1 is a schematic diagram of a parachain data synchronization scenario according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of a parallel-chain data synchronization method according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of a preferred embodiment of the method shown in FIG. 2.
  • FIG. 4 is a flowchart of a parallel-chain data synchronization method according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • FIG. 1 is a schematic diagram of a parachain data synchronization scenario according to an embodiment of the present invention.
  • the parallel chain 1 quickly synchronizes data information of the main chain, and the node A provides services for both the main chain and the parallel chain 1; when the node A serves the main During the chain, A (main) receives the transaction information sent by the user's client, agrees on the transaction information and generates the first block, and records the operation serial number and operation information of the first block and updates the first block operation sequence.
  • a (main) is generating the first block operation sequence number After the block is 3, a block with an operation number of 4 in the first block is generated.
  • the fork chain containing the block with an operation number of 4 in the first block is a fork chain X;
  • a (main) finds another The length of a forked chain Y is longer than the length of the forked chain X, and the length difference is greater than a certain threshold, then A (main) revokes the block with the first block operation number 4 and allocates the first block for this operation Operation number 5;
  • a (main) synchronizes the first block on the fork chain Y, and This operation allocates the first block operation sequence number 6,
  • a (main) synchronizes the second block on the fork chain Y, and assigns the first block operation sequence number 7 for this operation until it is synchronized to the Latest block;
  • a (main) generates the first block operation sequence information, (1, generate block), (2, generate block), (3, generate block), (4, generate block), ( 5.
  • A (flat 1) obtains the first block operation sequence information, and according to the first block operation sequence information, synchronizes the blocks of the main chain to generate or update the parallel chain.
  • the first block operation sequence The information also includes the operation serial number and operation information of the block that was cancelled by the node of the main chain when executing the cancellation of the block.
  • the first block operation sequence information is received by the main chain after receiving some transaction information from the user's client. The information is consensused and a first block is generated, and the operation serial number of the first block is recorded and updated.
  • the first block operation sequence information includes the operation serial number and operation information of each block of the main chain.
  • the first block operation sequence information is (1, generated block), (2, generated block), (3, generated block), (4, generated block), (5, undo block), ( 6.Generate block), (7, Generate block), (8, Generate block), the first block operation serial number is 1, 3, 4, 5, 7, 8 Transaction information. Therefore, on parachain 1, A (flat 1) synchronizes the data of the first block with serial operation numbers 1, 3, 4, 5, 7, and 8.
  • FIG. 2 is a flowchart of a parallel-chain data synchronization method according to an embodiment of the present invention. As shown in FIG. 2, in this embodiment, the present invention provides a parallel-chain data synchronization method, including:
  • the first block operation sequence information also includes the main chain's nodes performing the undo block.
  • the operation serial number and operation information of the block that was revoked at the time wherein the first block operation sequence information is obtained by the main chain after receiving several transaction information sent by the user's client to agree on the transaction information and generate the first block, and, The operation serial number of the first block is recorded and updated.
  • the first block operation sequence information includes the operation serial number and operation information of each block of the main chain.
  • the first block operation sequence information is (1, generated block), (2, generated block), (3, generated block), (4, Generate block), (5, Undo block), (6, Generate block), (7, Generate block), (8, Generate block), the first block operation serial number is 1, 3, 4,
  • the first block of 5, 7, 8 contains the transaction information of the parallel chain 1.
  • a (flat 1) synchronizes the operation of the first block with the serial number of 1, 3, 4, 5, 7, and 8.
  • Transaction information related to the parallel chain 1 and the transaction information is packaged to generate a second block of the parallel chain 1, and the operation serial number of the second block is recorded for the second block.
  • A (flat 1) acquires the first block operation sequence information, and synchronizes the blocks of the main chain to generate or update the parallel chain according to the first block operation sequence information.
  • the first block operation sequence information further includes the main block. The operation sequence and operation information of the block that the node of the chain cancels when the block is cancelled.
  • the first block operation sequence information is obtained by the main chain after receiving the transaction information sent by the user's client. The first block is generated, and the operation serial number of the first block is recorded and updated.
  • the first block operation sequence information includes the operation serial number and operation information of each block of the main chain.
  • the first block operation serial number is 1, 3, 4, 5, 7, 8 contains parallel Transaction information for chain 1,
  • a (flat 1) synchronizes the transaction information related to the parallel chain 1 in the first block with the first block operation serial number 1, 3, 4, 5, 7, 8 and packages the transaction information Generate the second block of Parachain 1 and record the operation number of the second block for the second block, so A (flat 1) operates by synchronizing the first block with the operation number of 1, 3, 4, 5, 7,
  • the first block of 8 generates a second block with a second operation number of 1, generates a second block with a second operation number of 3, generates a second block with a second operation number of 4, and withdraws the second operation.
  • a second block with a serial number of 5 generates a second block with a second operation serial number of 7 and generates a second block with a second operation serial number of 8.
  • the first block operation sequence information is (1, generated block), (2, generated block), (3, generated block), (4, generated block), (5, undo block ), (6, generate block), (7, generate block), (8, generate block), the first block operation serial number is 1, 3, 4, 5, 7, 8 Transaction information of chain 1, the nodes of the parallel chain synchronize the first block operation serial number 1, 3, 4, 5, 7, 8
  • the transaction information related to the parallel chain 1 and package the transaction information to generate The second block of the parallel chain, and recording the operation number of the second block for the second block is taken as an example to explain the parallel chain data synchronization method provided by the present invention.
  • the parallel chain provided by the present invention The data synchronization method is not limited to the above examples.
  • Parachain nodes can synchronize the data information of the entire block of the second block, or synchronize the transaction information related to the parachain only in the second block;
  • the first block operation sequence information can be obtained at regular intervals according to actual needs, or the first block operation can be obtained in real time. Sequence information, can achieve the same technical effect.
  • FIG. 3 is a flowchart of a preferred embodiment of the method shown in FIG. 2.
  • acquiring the first block operation sequence information, and synchronizing the blocks of the main chain to generate or update the parallel chain according to the first block operation sequence information includes:
  • S124 Synchronize block generation or cancellation on the parallel chain according to the first block operation sequence information; wherein, when the operation information identifies the generation of the block, perform block synchronization on the parallel chain according to the first block operation sequence information.
  • the generation or revocation also includes:
  • S1242 Determine whether the second block to be synchronized includes transaction information of the parallel chain: No, the second block is not synchronized.
  • the first block operation sequence information is (1, generated block), (2, generated block), (3, generated block), (4, Generate block), (5, Undo block), (6, Generate block), (7, Generate block), (8, Generate block), the first block operation serial number is 1, 3, 4,
  • the first block of 5, 7, 8 contains the transaction information of the parallel chain 1.
  • a (flat 1) synchronizes the operation of the first block with the serial number of 1, 3, 4, 5, 7, and 8. Parachain 1 related transaction information;
  • step S122 A (flat 1) acquires the first block operation sequence information
  • step S144 A (flat 1) synchronously performs block generation or cancellation on the parallel chain according to the first block operation sequence information; wherein, when the operation information identifies the generation of the block, the operation sequence information is based on the first block operation sequence information.
  • Generating or revoking blocks in parallel on a parallel chain also includes:
  • step S1242 A (flat 1) determines whether the second block to be synchronized includes transaction information of the parallel chain: No, the second block is not synchronized.
  • a (flat 1) does not synchronize the second block; if the currently synchronized second block is The second block is the first block with an operation number of 3. This block contains the transaction information of the parallel chain 1. Then A (flat 1) synchronizes the second block.
  • the nodes of the parachain can synchronize the data information of the entire block of the second block, or synchronize the transaction information of the second block that is only related to the parachain, according to actual needs, which can implement the same technology effect.
  • the transaction information includes a first identifier, a first index, and a first name.
  • the first identifier is used to identify the transaction information of the main chain transaction information or the parallel chain transaction information
  • the first index is used to identify the transaction information.
  • the first name is used to identify the name of the asset in the transaction information. Assume that the user's client sends a transaction message to the main chain.
  • the transaction information includes: p.ParaChain1.token1.
  • the first identifier of the transaction information is p, which indicates that the transaction information is parallel chain transaction information.
  • the name is ParaChain1, which indicates that the name of the parallel chain on which the exchange is located is parachain 1, the first name of the transaction information is token1, and the name of the transaction asset is token1.
  • the first identifier is used to identify the transaction information of the main chain or the parallel chain transaction information
  • the first index is used to identify the name of the parallel chain where the transaction information is located
  • the first name is used to identify the transaction.
  • the name of the asset in the information is taken as an example for illustration.
  • different parameters can also be configured as the first identifier, the first index, and the first name according to actual needs, which can achieve the same technical effect.
  • the first block is monitored, and if it is not detected that the first block contains transaction information within the pre-configured block height range, an empty block is generated. Assume that the pre-configured block height range is 100 block heights. After a block is generated when the block height is H, if no block is generated within the 100 block height range, the H + A block height of 101 generates an empty block.
  • FIG. 4 is a flowchart of a parallel-chain data synchronization method according to an embodiment of the present invention. As shown in FIG. 4, in this embodiment, the present invention provides a parallel chain data synchronization method, including:
  • S24 Consensus the transaction information and generate a first block, and record the operation serial number and operation information of the first block and update the first block operation sequence information for the nodes of the parallel chain to obtain the First block operation sequence information, which synchronizes blocks of the main chain to generate or update a parallel chain according to the first block operation sequence information, wherein the first block operation sequence information includes the main chain The operation serial number and operation information of each block, as well as the operation serial number and operation information of the block that the node of the main chain cancels when performing the cancellation of the block.
  • a (main) after A (main) generates a block with a first block operation number of 3, it generates a block with a first block operation number of 4;
  • the forked chain of the block with the block operation sequence number 4 is the forked chain X;
  • a (main) finds that another forked chain Y is longer than the length of the forked chain X, and the length difference is greater than a certain threshold, then A (master) revokes the block with the first block operation number 4 and assigns the first block operation number 5 for this operation;
  • a (main) synchronizes the first block on the fork chain Y, and for this purpose The operation assigns the first block operation sequence number 6,
  • a (main) synchronizes the second block on the fork chain Y, and assigns the first block operation sequence number 7 for this operation until it is synchronized to the latest on the fork chain Y Block.
  • step S22 A (main) receives several transaction information sent by the user's client
  • step S24 A (main) agrees on the transaction information and generates a first block, and records the operation number and operation information of the first block and updates the first block operation sequence information for the nodes of the parallel chain Obtain the first block operation sequence information, and synchronize the main chain blocks to generate or update the parallel chain according to the first block operation sequence information, where the first block operation sequence information includes the operation serial number and operation of each block of the main chain Information, and the operation serial number and operation information of the block that the node of the main chain cancels when performing the undo block.
  • a (main) generates a block with a first block operation number of 3 and then generates a block with a first block operation number of 4; a fork chain containing a block with a first block operation number of 4 is a branch Fork chain X; because A (main) finds that another fork chain Y is longer than the length of fork chain X, and the length difference is greater than a certain threshold, therefore A (main) revokes the first block operation sequence number 4 Block, and assign the first block operation number 5 for this operation; A (main) synchronizes the first block on the fork chain Y, and assigns the first block operation number 6, A (main) for this operation Synchronize the second block on the fork chain Y, and assign the first block operation number 7 for this operation until it is synchronized to the latest block on the fork chain Y.
  • the transaction information includes a first identifier, a first index, and a first name.
  • the first identifier is used to identify the transaction information of the main chain transaction information or the parallel chain transaction information
  • the first index is used to identify the transaction information.
  • the first name is used to identify the name of the asset in the transaction information. Assume that the user's client sends a transaction message to the main chain.
  • the transaction information includes: p.ParaChain1.token1.
  • the first identifier of the transaction information is p, which indicates that the transaction information is parallel chain transaction information.
  • the name is ParaChain1, which indicates that the name of the parallel chain on which the exchange is located is parachain 1, the first name of the transaction information is token1, and the name of the transaction asset is token1.
  • the first identifier is used to identify the transaction information of the main chain or the parallel chain transaction information
  • the first index is used to identify the name of the parallel chain where the transaction information is located
  • the first name is used to identify the transaction.
  • the name of the asset in the information is taken as an example for illustration.
  • different parameters can also be configured as the first identifier, the first index, and the first name according to actual needs, which can achieve the same technical effect.
  • FIG. 5 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • the present application further provides a device 500 including one or more central processing units (CPUs) 501, which may be based on a program stored in a read-only memory (ROM) 502 or A program loaded from a storage section 508 into a random access memory (RAM) 503 performs various appropriate actions and processes.
  • CPUs central processing units
  • RAM random access memory
  • various programs and data required for the operation of the device 500 are also stored.
  • the CPU 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504.
  • An input / output (I / O) interface 505 is also connected to the bus 504.
  • the following components are connected to the I / O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), and the speaker; a storage portion 508 including a hard disk and the like ; And a communication section 509 including a network interface card such as a LAN card, a modem, and the like.
  • the communication section 509 performs communication processing via a network such as the Internet.
  • the driver 510 is also connected to the I / O interface 505 as needed.
  • a removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.
  • the parallel-chain data synchronization method described in any of the above embodiments may be implemented as a computer software program.
  • embodiments of the present disclosure include a computer program product including a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for performing a parachain data synchronization method.
  • the computer program may be downloaded and installed from a network through the communication section 509, and / or installed from a removable medium 511.
  • the present application further provides a computer-readable storage medium.
  • the computer-readable storage medium may be a computer-readable storage medium included in the device of the foregoing embodiment; it may also exist alone and not assembled in Computer-readable storage media in a device.
  • the computer-readable storage medium stores one or more programs, which are used by one or more processors to execute the parallel-chain data synchronization method described in the present application.
  • each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, which contains one or more functions to implement a specified logical function Executable instructions.
  • the functions noted in the blocks may also occur in a different order than those marked in the drawings. For example, two blocks represented one after the other may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts can be implemented by a dedicated hardware-based system that performs the specified function or operation , Or it can be implemented by a combination of dedicated hardware and computer instructions.
  • the units or modules described in the embodiments of the present application may be implemented in a software manner, or may be implemented in a hardware manner.
  • the described units or modules may also be provided in a processor.
  • each of the units may be a software program provided in a computer or a mobile smart device, or may be a separately configured hardware device.
  • the names of these units or modules do not in any way constitute a limitation on the units or modules themselves.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明提供一种平行链数据同步方法、设备和存储介质,该方法包括:获取第一区块操作序列信息,根据第一区块操作序列信息同步主链的区块以生成或更新平行链,第一区块操作序列信息还包括主链的节点在执行撤销区块时所撤销的区块的操作序号和操作信息,其中,第一区块操作序列信息由主链接收用户的客户端发送的若干交易信息后对交易信息进行共识并生成第一区块,以及,记录第一区块的操作序号后更新所得,第一区块操作序列信息包括主链的各区块的操作序号和操作信息。本发明实现一种可以快速同步主链区块数据,不会因分叉等原因导致各节点的平行链数据不一致的平行链数据同步方法。

Description

一种平行链数据同步方法、设备和存储介质 技术领域
本申请涉及互联网金融技术领域,具体涉及一种平行链数据同步方法、设备和存储介质。
背景技术
现有的平行链数据同步模式中,为了避免因主链因分叉等原因导致各节点的平行链同步的区块信息不一致的问题,平行链采用同步落后于主链若干个区块高度的区块信息的方法来同步主链的区块信息;以比特币所在的区块链为例,通常认为一个区块被打包生成后,经过6个区块高度后,可以认为该区块已基本被确认,若节点的主链上该区块的区块高度为H,那么节点的平行链在至少高度为H+6后的区块高度时才同步该区块。但即使经过6个区块高度,一旦主链上产生分叉,不同节点的平行链仍然会同步到不同的区块信息,从而造成各节点的平行链不一致的问题。
发明内容
鉴于现有技术中的上述缺陷或不足,期望提供一种可以快速同步主链区块数据,不会因分叉等原因导致各节点的平行链数据不一致的平行链数据同步方法、设备和存储介质。
第一方面,本发明提供一种平行链数据同步方法,适用于平行链的节点,包括:
获取第一区块操作序列信息,根据第一区块操作序列信息同步主链的区块以生成或更新平行链,第一区块操作序列信息还包括主链的节点在执行撤销区块时所撤销的区块的操作序号和操作信息,其中,第一区块操作序列信息由主链接收用户的客户端发送的若干交易信息后对交易信息进行共识并生成第一区块,以及,记录第一区块的操作序号后更新所得,第一区块操作序列信息包括主链的各区块的操作序号和操作信息。
第二方面,本发明提供一种平行链数据同步方法,适用于主链的节点,包括:
接收用户的客户端发送的若干交易信息;
对交易信息进行共识并生成第一区块,以及,记录第一区块的操作序号和操作信息并更新第一区块操作序列信息,以供平行链的节点获取第一区块操作序列信息,根据第一区块操作序列信息同步主链的区块以生成或更新平行链,其中,第一区块操作序列信息包括主链的各区块的操作序号和操作信息,以及,主链的节点在执行撤销区块时所撤销的区块的操作序号和操作信息。
第三方面,本发明还提供一种设备,包括一个或多个处理器和存储器,其中存储器包含可由该一个或多个处理器执行的指令以使得该一个或多个处理器执行根据本发明各实施例提供的平行链数据同步方法。
第四方面,本发明还提供一种存储有计算机程序的存储介质,该计算机程序使计算机执行根据本发明各实施例提供的平行链数据同步方法。
本发明诸多实施例提供的一种平行链数据同步方法、设备和存储介质通过获取第一区块操作序列信息,根据第一区块操作序列信息同步主链的区块以生成或更新平行链,第一区块操作序列信息还包括主链的节点在执行撤销区块时所撤销的区块的操作序号和操作信息,其中,第一区块操作序列信息由主链接收用户的客户端发送的若干交易信息后对交易信息进行共识并生成第一区块,以及,记录第一区块的操作序号后更新所得,第一区块操作序列信息包括主链的各区块的操作序号和操作信息的方法,实现一种可以快速同步主链区块数据,不会因分叉等原因导致各节点的平行链数据不一致的平行链数据同步方法。
本发明一些实施例提供的一种平行链数据同步方法、设备和存储介质进一步通过监测第一区块、预配置的区块高度范围是否生成其它区块及生成空区块的方式,避免由于在平行链长期没有交易时用户产生平行链停止生成新区块的误解,优化了用户体验。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本申请的其它特征、目的和优点将会变得更明显:
图1为本发明一实施例提供的平行链数据同步场景的示意图。
图2为本发明一实施例提供的一种平行链数据同步方法的流程图。
图3为图2所示方法的一种优选实施方式的流程图。
图4为本发明一实施例提供的一种平行链数据同步方法的流程图。
图5为本发明一实施例提供的一种设备的结构示意图。
具体实施方式
下面结合附图和实施例对本申请作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与发明相关的部分。
需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本申请。
图1为本发明一实施例提供的平行链数据同步场景的示意图。如图1所示,在本实施例中,通过记录区块操作序列信息,平行链1快速同步主链的数据信息,节点A同时为主链及平行链1提供服务;当节点A服务于主链时,A(主)接收用户的客户端发送的交易信息,对交易信息进行共识并生成第一区块,以及,记录第一区块的操作序号和操作信息并更新第一区块操作序列信息,以供平行链的节点获取第一区块操作序列信息,根据第一区块操作序列信息同步主链的区块以生成或更新平行链;A(主)在生成第一区块操作序号为3的区块后,生成第一区块操作序号为4的区块;假设含有第一区块操作序号为4的区块的分叉链为分叉链X;A(主)发现有另一条分叉链Y的长度比分叉链X的长度长,并且长度差大于一定阈值,则A(主)撤销第一区块操作序号为4的区块,并为此操作分配第一区块操作序号5;A(主)同步分叉链Y上的第一个区块,并为此操作分配第一区块操作序号6,A(主)同步分叉链Y上的第二个区块,并为此操作分配第一区块操作序号7,直至同步至分叉链Y上的最新区块;A(主)生成第一区块操作序列信息,(1,生成区块)、(2、生成区块)、(3、生成区块)、(4、生成区块)、(5、撤销区块)、(6、生成区块)、(7、生成区块)、(8、生成区块)。当节点A服务于平行链时,A(平1)获取第一区块操作序列信息,根据第一区块操作序列信息同步主链的区块以生成或更新平行链,第一区块操作序列信息还包括主链的节点在执行撤销区块时所撤销的区块的操作序号和操作信息,其中,第一区块操作序列信息由主链接收用户的客户端发送的若干交易信息后对交易信息进行共识并生成第一区块,以及,记录第一区块的操作序号后更新所得,第 一区块操作序列信息包括主链的各区块的操作序号和操作信息。第一区块操作序列信息为,(1,生成区块)、(2、生成区块)、(3、生成区块)、(4、生成区块)、(5、撤销区块)、(6、生成区块)、(7、生成区块)、(8、生成区块),第一区块操作序号为1、3、4、5、7、8的区块内有平行链1的交易信息,因此,在平行链1上,A(平1)同步区块操作序号为1、3、4、5、7、8的第一区块的数据。
图2为本发明一实施例提供的一种平行链数据同步方法的流程图。如图2所示,在本实施例中,本发明提供一种平行链数据同步方法,包括:
S12:获取第一区块操作序列信息,根据第一区块操作序列信息同步主链的区块以生成或更新平行链,第一区块操作序列信息还包括主链的节点在执行撤销区块时所撤销的区块的操作序号和操作信息,其中,第一区块操作序列信息由主链接收用户的客户端发送的若干交易信息后对交易信息进行共识并生成第一区块,以及,记录第一区块的操作序号后更新所得,第一区块操作序列信息包括主链的各区块的操作序号和操作信息。
具体地,以图1所示的应用场景为例,第一区块操作序列信息为,(1,生成区块)、(2、生成区块)、(3、生成区块)、(4、生成区块)、(5、撤销区块)、(6、生成区块)、(7、生成区块)、(8、生成区块),第一区块操作序号为1、3、4、5、7、8的第一区块包含有平行链1的交易信息,A(平1)同步第一区块操作序号为1、3、4、5、7、8的第一区块中与平行链1相关的交易信息,并将交易信息打包生成平行链1的第二区块,并为第二区块记录第二区块的操作序号。
在步骤S12中,A(平1)获取第一区块操作序列信息,根据第一区块操作序列信息同步主链的区块以生成或更新平行链,第一区块操作序列信息还包括主链的节点在执行撤销区块时所撤销的区块的操作序号和操作信息,其中,第一区块操作序列信息由主链接收用户的客户端发送的若干交易信息后对交易信息进行共识并生成第一区块,以及,记录第一区块的操作序号后更新所得,第一区块操作序列信息包括主链的各区块的操作序号和操作信息。由于第一区块操作序列信息为,(1,生成区块)、(2、生成区块)、(3、生成区块)、(4、生成区块)、(5、撤销区块)、(6、生成区块)、(7、生成区块)、(8、生成区块),第一区块操作序号为1、3、4、5、7、8的第一区块包含有平行链1的交易信息,A(平1)同步第一区块操作序号为1、3、4、5、7、8的第一区块中与平行链1相关的交易信息,并将交易信息打包生成平行链1的第二区块,并为第二区块记录第二区块的 操作序号,因此A(平1)通过同步第一区块操作序号为1、3、4、5、7、8的第一区块,生成第二操作序号为1的第二区块、生成第二操作序号为3的第二区块,生成第二操作序号为4的第二区块,撤回第二操作序号为5的第二区块、生成第二操作序号为7的第二区块、生成第二操作序号为8的第二区块。
上述实施例以第一区块操作序列信息为(1,生成区块)、(2、生成区块)、(3、生成区块)、(4、生成区块)、(5、撤销区块)、(6、生成区块)、(7、生成区块)、(8、生成区块),第一区块操作序号为1、3、4、5、7、8的区块内有平行链1的交易信息,平行链的节点同步第一区块操作序号为1、3、4、5、7、8的第一区块中与平行链1相关的交易信息,并将交易信息打包生成平行链的第二区块,并为第二区块记录第二区块的操作序号为例对本发明提供的平行链数据同步方法进行了阐述,在更多实施例中,本发明提供的平行链数据同步方法不以上述举例为限,平行链的节点可以根据实际需求同步第二区块整个区块的数据信息,或同步第二区块中只与平行链相关的交易信息;平行链的节点可以根据实际需求,每隔一段时间获取第一区块操作序列信息,或实时获取第一区块操作序列信息,均可实现相同的技术效果。
图3为图2所示方法的一种优选实施方式的流程图。如图3所示,在一优选实施例中,获取第一区块操作序列信息,根据第一区块操作序列信息同步主链的区块以生成或更新平行链包括:
S122:获取第一区块操作序列信息;
S124:根据第一区块操作序列信息在平行链上同步进行区块的生成或撤销;其中,当操作信息标识生成区块时,根据第一区块操作序列信息在平行链上同步进行区块的生成或撤销还包括:
S1242:判断所要同步的第二区块是否包括平行链的交易信息:否,则不同步第二区块。
具体地,以图1所示的应用场景为例,第一区块操作序列信息为,(1,生成区块)、(2、生成区块)、(3、生成区块)、(4、生成区块)、(5、撤销区块)、(6、生成区块)、(7、生成区块)、(8、生成区块),第一区块操作序号为1、3、4、5、7、8的第一区块包含有平行链1的交易信息,A(平1)同步第一区块操作序号为1、3、4、5、7、8的第一区块中与平行链1相关的交易信息;
在步骤S122中,A(平1)获取第一区块操作序列信息,
在步骤S144中,A(平1)根据第一区块操作序列信息在平行链上同步进行区块的生成或撤销;其中,当操作信息标识生成区块时,根据第一区块操作序列信息在平行链上同步进行区块的生成或撤销还包括:
在步骤S1242中,A(平1)判断所要同步的第二区块是否包括平行链的交易信息:否,则不同步第二区块。
例如,若当前同步的第二区块为操作序号为2的第一区块,该区块不包含平行链1的交易信息,则A(平1)不同步第二区块;若当前同步的第二区块为操作序号为3的第一区块,该区块包含平行链1的交易信息,则A(平1)同步第二区块。
在更多实施例中,平行链的节点可以根据实际需求,同步第二区块整个区块的数据信息,或同步第二区块中只与平行链相关的交易信息,均可实现相同的技术效果。
在一优选实施例中,交易信息包括第一标识、第一索引及第一名称,第一标识用于标识交易信息为主链的交易信息或平行链的交易信息,第一索引用于标识交易信息所在的平行链的名称,第一名称用于标识交易信息中的资产的名称。假设用户的客户端向主链发送一笔交易信息,该交易信息包括:p.ParaChain1.token1,交易信息的第一标识为p,表示该交易信息为平行链的交易信息,交易信息的第一名称为ParaChain1,表示该交易所在的平行链的名称为平行链1,交易信息的第一名称为token1,表示该交易的资产的名称为token1。在本实施例中,以第一标识用于标识交易信息为主链的交易信息或平行链的交易信息,第一索引用于标识交易信息所在的平行链的名称,第一名称用于标识交易信息中的资产的名称为例进行举例说明,在更多实施例中,还可以根据实际需求配置不同的参数为第一标识、第一索引及第一名称,均可实现相同的技术效果。
在一优选实施例中,监测第一区块,若在预配置的若干区块高度范围内,未监测到有第一区块包含有交易信息,则生成一个空区块。假设预配置的若干区块高度范围为100个区块高度,平行链在区块高度为H时产生一个区块后,若在100个区块高度范围内未生成任何区块,则在H+101的区块高度时生成一个空区块。
图4为本发明一实施例提供的一种平行链数据同步方法的流程图。如图4所示,在本实施例中,本发明提供一种平行链数据同步方法,包括:
S22:接收用户的客户端发送的若干交易信息;
S24:对所述交易信息进行共识并生成第一区块,以及,记录所述第一区块的操作序号和操作信息并更新第一区块操作序列信息,以供平行链的节点获取所述第一区块操作序列信息,根据所述第一区块操作序列信息同步所述主链的区块以生成或更新平行链,其中,所述第一区块操作序列信息包括所述主链的各区块的操作序号和操作信息,以及,主链的节点在执行撤销区块时所撤销的区块的操作序号和操作信息。
具体地,以图1所示的应用场景为例,A(主)在生成第一区块操作序号为3的区块后,生成第一区块操作序号为4的区块;假设含有第一区块操作序号为4的区块的分叉链为分叉链X;A(主)发现有另一条分叉链Y的长度比分叉链X的长度长,并且长度差大于一定阈值,则A(主)撤销第一区块操作序号为4的区块,并为此操作分配第一区块操作序号5;A(主)同步分叉链Y上的第一个区块,并为此操作分配第一区块操作序号6,A(主)同步分叉链Y上的第二个区块,并为此操作分配第一区块操作序号7,直至同步至分叉链Y上的最新区块。
在步骤S22中,A(主)接收用户的客户端发送的若干交易信息;
在步骤S24中,A(主)对交易信息进行共识并生成第一区块,以及,记录第一区块的操作序号和操作信息并更新第一区块操作序列信息,以供平行链的节点获取第一区块操作序列信息,根据第一区块操作序列信息同步主链的区块以生成或更新平行链,其中,第一区块操作序列信息包括主链的各区块的操作序号和操作信息,以及,主链的节点在执行撤销区块时所撤销的区块的操作序号和操作信息。A(主)在生成第一区块操作序号为3的区块后,生成第一区块操作序号为4的区块;含有第一区块操作序号为4的区块的分叉链为分叉链X;由于A(主)发现有另一条分叉链Y的长度比分叉链X的长度长,并且长度差大于一定阈值,因此A(主)撤销第一区块操作序号为4的区块,并为此操作分配第一区块操作序号5;A(主)同步分叉链Y上的第一个区块,并为此操作分配第一区块操作序号6,A(主)同步分叉链Y上的第二个区块,并为此操作分配第一区块操作序号7,直至同步至分叉链Y上的最新区块。
在一优选实施例中,交易信息包括第一标识、第一索引及第一名称,第一标识用于标识交易信息为主链的交易信息或平行链的交易信息,第一索引用于标识 交易信息所在的平行链的名称,第一名称用于标识交易信息中的资产的名称。假设用户的客户端向主链发送一笔交易信息,该交易信息包括:p.ParaChain1.token1,交易信息的第一标识为p,表示该交易信息为平行链的交易信息,交易信息的第一名称为ParaChain1,表示该交易所在的平行链的名称为平行链1,交易信息的第一名称为token1,表示该交易的资产的名称为token1。在本实施例中,以第一标识用于标识交易信息为主链的交易信息或平行链的交易信息,第一索引用于标识交易信息所在的平行链的名称,第一名称用于标识交易信息中的资产的名称为例进行举例说明,在更多实施例中,还可以根据实际需求配置不同的参数为第一标识、第一索引及第一名称,均可实现相同的技术效果。
图5为本发明一实施例提供的一种设备的结构示意图。
如图5所示,作为另一方面,本申请还提供了一种设备500,包括一个或多个中央处理单元(CPU)501,其可以根据存储在只读存储器(ROM)502中的程序或者从存储部分508加载到随机访问存储器(RAM)503中的程序而执行各种适当的动作和处理。在RAM503中,还存储有设备500操作所需的各种程序和数据。CPU501、ROM502以及RAM503通过总线504彼此相连。输入/输出(I/O)接口505也连接至总线504。
以下部件连接至I/O接口505:包括键盘、鼠标等的输入部分506;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分507;包括硬盘等的存储部分508;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分509。通信部分509经由诸如因特网的网络执行通信处理。驱动器510也根据需要连接至I/O接口505。可拆卸介质511,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器510上,以便于从其上读出的计算机程序根据需要被安装入存储部分508。
特别地,根据本公开的实施例,上述任一实施例描述的平行链数据同步方法可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括有形地包含在机器可读介质上的计算机程序,所述计算机程序包含用于执行平行链数据同步方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分509从网络上被下载和安装,和/或从可拆卸介质511被安装。
作为又一方面,本申请还提供了一种计算机可读存储介质,该计算机可读存储介质可以是上述实施例的装置中所包含的计算机可读存储介质;也可以是单独 存在,未装配入设备中的计算机可读存储介质。计算机可读存储介质存储有一个或者一个以上程序,该程序被一个或者一个以上的处理器用来执行描述于本申请的平行链数据同步方法。
附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这根据所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以通过执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以通过专用硬件与计算机指令的组合来实现。
描述于本申请实施例中所涉及到的单元或模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元或模块也可以设置在处理器中,例如,各所述单元可以是设置在计算机或移动智能设备中的软件程序,也可以是单独配置的硬件装置。其中,这些单元或模块的名称在某种情况下并不构成对该单元或模块本身的限定。
以上描述仅为本申请的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本申请中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离本申请构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本申请中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (8)

  1. 一种平行链数据同步方法,适用于平行链的节点,其特征在于,包括:
    获取第一区块操作序列信息,根据所述第一区块操作序列信息同步所述主链的区块以生成或更新平行链,所述第一区块操作序列信息还包括主链的节点在执行撤销区块时所撤销的区块的操作序号和操作信息,其中,所述第一区块操作序列信息由主链接收用户的客户端发送的若干交易信息后对所述交易信息进行共识并生成第一区块,以及,记录所述第一区块的操作序号后更新所得,所述第一区块操作序列信息包括所述主链的各区块的操作序号和操作信息。
  2. 根据权利要求1所述的方法,其特征在于,所述获取所述第一区块操作序列信息,根据所述第一区块操作序列信息同步所述主链的区块以生成或更新平行链包括:
    获取所述第一区块操作序列信息;
    根据所述第一区块操作序列信息在平行链上同步进行区块的生成或撤销;
    其中,当所述操作信息标识生成区块时,所述根据所述第一区块操作序列信息在平行链上同步进行区块的生成或撤销还包括:
    判断所要同步的第二区块是否包括所述平行链的交易信息:否,则不同步所述第二区块。
  3. 根据权利要求1所述的方法,其特征在于,所述交易信息包括第一标识、第一索引及第一名称,所述第一标识用于标识所述交易信息为主链的交易信息或平行链的交易信息,所述第一索引用于标识所述交易信息所在的平行链的名称,所述第一名称用于标识所述交易信息中的资产的名称。
  4. 根据权利要求1所述的方法,其特征在于,监测所述第一区块,若在预配置的若干区块高度范围内,未监测到有第一区块包含有所述交易信息,则生成一个空区块。
  5. 一种平行链数据同步方法,适用于主链的节点,其特征在于,包括:
    接收用户的客户端发送的若干交易信息;
    对所述交易信息进行共识并生成第一区块,以及,记录所述第一区块的操作序号和操作信息并更新第一区块操作序列信息,以供平行链的节点获取所述第一区块操作序列信息,根据所述第一区块操作序列信息同步所述主链的区块以生成或更新平行链,其中,所述第一区块操作序列信息包括所述主链的各区块的操作序号和操作信息,以及,主链的节点在执行撤销区块时所撤销的区块的操作序号和操作信息。
  6. 根据权利要求5所述的方法,其特征在于,所述交易信息包括第一标识、第一索引及第一名称,所述第一标识用于标识所述交易信息为主链的交易信息或平行链的交易信息,所述第一索引用于标识所述交易信息所在的平行链的名称,所述第一名称用于标识所述交易信息中的资产的名称。
  7. 一种设备,其特征在于,所述设备包括:
    一个或多个处理器;
    存储器,用于存储一个或多个程序,
    当所述一个或多个程序被所述一个或多个处理器执行时,使得所述一个或多个处理器执行如权利要求1-6中任一项所述的方法。
  8. 一种存储有计算机程序的存储介质,其特征在于,该程序被处理器执行时实现如权利要求1-6中任一项所述的方法。
PCT/CN2019/102509 2018-08-30 2019-08-26 一种平行链数据同步方法、设备和存储介质 WO2020043048A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/272,622 US11824996B2 (en) 2018-08-30 2019-08-26 Parachain data synchronization method, device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811005413.3 2018-08-30
CN201811005413.3A CN109271446B (zh) 2018-08-30 2018-08-30 一种平行链数据同步方法、设备和存储介质

Publications (1)

Publication Number Publication Date
WO2020043048A1 true WO2020043048A1 (zh) 2020-03-05

Family

ID=65154763

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/102509 WO2020043048A1 (zh) 2018-08-30 2019-08-26 一种平行链数据同步方法、设备和存储介质

Country Status (3)

Country Link
US (1) US11824996B2 (zh)
CN (1) CN109271446B (zh)
WO (1) WO2020043048A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432027A (zh) * 2020-04-14 2020-07-17 杭州复杂美科技有限公司 平行链区块同步方法、设备和存储介质
CN111984735A (zh) * 2020-09-03 2020-11-24 深圳壹账通智能科技有限公司 一种数据归档方法、装置、电子设备和存储介质
CN112804322A (zh) * 2021-01-11 2021-05-14 杭州复杂美科技有限公司 区块生成方法、计算机设备和存储介质
CN112839091A (zh) * 2021-01-11 2021-05-25 杭州复杂美科技有限公司 区块生成方法、计算机设备和存储介质
CN112948496A (zh) * 2021-03-05 2021-06-11 杭州复杂美科技有限公司 平行链区块生成方法、计算机设备和存储介质
CN113206851A (zh) * 2021-05-06 2021-08-03 杭州复杂美科技有限公司 平行链共识方法、计算机设备和存储介质
CN114791788A (zh) * 2022-04-24 2022-07-26 成都信息工程大学 一种基于区块链的数据存储方法及装置

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271446B (zh) * 2018-08-30 2020-10-23 杭州复杂美科技有限公司 一种平行链数据同步方法、设备和存储介质
CN109831514B (zh) * 2019-03-02 2020-06-09 杭州复杂美科技有限公司 平行链共识方法、数据异常处理方法、设备和存储介质
CN109995585B (zh) * 2019-03-22 2021-12-31 杭州复杂美科技有限公司 一种异常处理方法、设备和存储介质
CN110084601B (zh) * 2019-04-30 2021-03-16 杭州复杂美科技有限公司 平行链主链交易状态同步方法、设备和存储介质
CN110083745B (zh) * 2019-04-30 2021-07-06 杭州复杂美科技有限公司 数据查询方法、设备和存储介质
CN110209737B (zh) * 2019-05-22 2021-02-09 杭州复杂美科技有限公司 数据上报方法、平行链创建方法、设备和存储介质
CN110210972B (zh) * 2019-05-31 2021-04-13 杭州复杂美科技有限公司 共识交易发送方法、设备和存储介质
CN110287263B (zh) * 2019-06-28 2021-03-16 杭州复杂美科技有限公司 平行链自共识方法、设备和存储介质
CN110309163A (zh) * 2019-06-28 2019-10-08 杭州复杂美科技有限公司 区块链关系型数据库维护方法和数据查询方法
CN110287196B (zh) * 2019-06-29 2021-11-02 杭州复杂美科技有限公司 区块存储方法、平行链交易获取方法、设备和存储介质
CN110445843B (zh) * 2019-07-15 2021-11-02 杭州复杂美科技有限公司 平行链区块推送方法、设备和存储介质
CN110473093A (zh) * 2019-07-29 2019-11-19 杭州复杂美科技有限公司 平行链资产转移方法、设备和存储介质
CN110535922B (zh) * 2019-08-15 2021-10-01 杭州复杂美科技有限公司 状态数据存储方法和平行链区块生成方法
CN110516150B (zh) * 2019-08-26 2021-12-10 杭州复杂美科技有限公司 平行链交易推送方法、设备和存储介质
US11860673B1 (en) 2019-11-22 2024-01-02 Amazon Technologies, Inc. Database with client-controlled encryption key
US11595205B1 (en) * 2019-11-22 2023-02-28 Amazon Technologies, Inc. Database with client-controlled encryption key
US11568063B1 (en) 2019-11-22 2023-01-31 Amazon Technologies, Inc. Database with client-controlled encryption key
CN111177259A (zh) * 2019-12-13 2020-05-19 杭州复杂美科技有限公司 平行链交易加密方法、设备和存储介质
CN111404962B (zh) * 2020-03-26 2022-06-24 杭州复杂美科技有限公司 联盟链节点数据传输方法、设备和存储介质
CN111478907B (zh) * 2020-04-08 2022-03-04 杭州复杂美科技有限公司 平行链隐私交易的防攻击方法、设备和存储介质
CN111432026B (zh) * 2020-04-14 2022-10-28 杭州复杂美科技有限公司 平行链交易执行方法、设备和存储介质
US11996174B2 (en) 2020-04-22 2024-05-28 Atrium Separate Ip Holdings Number 4, Llc Blockchain architecture, system, method and device for facilitating electronic health record maintenance, sharing and monetization using a decentralized health information platform including a non-fungible token function and security protocols
US12008555B2 (en) * 2020-04-22 2024-06-11 Atrium Separate Ip Holdings Number 4, Llc Blockchain architecture, system, method and device including a hybrid public-private iteration for facilitating secure data collection and controlled distribution using a decentralized transaction information platform and token ecosystem
US12009073B2 (en) 2020-04-22 2024-06-11 Atrium Separate Ip Holdings Number 4, Llc Blockchain architecture, system, method and device for facilitating secure medical testing, data collection and controlled distribution using a decentralized health information platform and token ecosystem
CN111524011B (zh) * 2020-05-06 2023-05-30 杭州复杂美科技有限公司 平行链共识确认方法、设备和存储介质
CN117314605B (zh) * 2023-11-29 2024-02-02 微神马科技(大连)有限公司 一种互联网金融业务流程管理方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170053249A1 (en) * 2015-07-30 2017-02-23 NXT-ID, Inc. Electronic Crypto-Currency Management Method and System
CN106844477A (zh) * 2016-12-23 2017-06-13 北京众享比特科技有限公司 区块链系统、区块查找方法和区块链后向同步方法
CN107729383A (zh) * 2017-09-18 2018-02-23 联动优势科技有限公司 一种索引库生成方法、数据验证方法、装置及平台
CN108270836A (zh) * 2017-01-03 2018-07-10 华为技术有限公司 基于区块链的数据处理方法、设备和系统
CN109271446A (zh) * 2018-08-30 2019-01-25 杭州复杂美科技有限公司 一种平行链数据同步方法、设备和存储介质

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7664942B1 (en) * 2008-08-25 2010-02-16 Sun Microsystems, Inc. Recovering a subordinate strand from a branch misprediction using state information from a primary strand
US10269012B2 (en) * 2015-11-06 2019-04-23 Swfl, Inc. Systems and methods for secure and private communications
CN108090750A (zh) * 2016-11-22 2018-05-29 深圳银链科技有限公司 区块链清结算系统及方法
CN107239940A (zh) * 2017-05-11 2017-10-10 北京博晨技术有限公司 基于区块链系统的网络交易方法及装置
CN107888562B (zh) * 2017-10-13 2019-12-27 布比(北京)网络技术有限公司 一种平行链接入互联链的数据验证和收发方法、节点及系统
CN109361734B (zh) * 2018-09-18 2021-04-20 百度在线网络技术(北京)有限公司 一种区块链的数据处理方法、装置、设备及介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170053249A1 (en) * 2015-07-30 2017-02-23 NXT-ID, Inc. Electronic Crypto-Currency Management Method and System
CN106844477A (zh) * 2016-12-23 2017-06-13 北京众享比特科技有限公司 区块链系统、区块查找方法和区块链后向同步方法
CN108270836A (zh) * 2017-01-03 2018-07-10 华为技术有限公司 基于区块链的数据处理方法、设备和系统
CN107729383A (zh) * 2017-09-18 2018-02-23 联动优势科技有限公司 一种索引库生成方法、数据验证方法、装置及平台
CN109271446A (zh) * 2018-08-30 2019-01-25 杭州复杂美科技有限公司 一种平行链数据同步方法、设备和存储介质

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432027B (zh) * 2020-04-14 2023-04-14 杭州复杂美科技有限公司 平行链区块同步方法、设备和存储介质
CN111432027A (zh) * 2020-04-14 2020-07-17 杭州复杂美科技有限公司 平行链区块同步方法、设备和存储介质
CN111984735A (zh) * 2020-09-03 2020-11-24 深圳壹账通智能科技有限公司 一种数据归档方法、装置、电子设备和存储介质
CN112804322A (zh) * 2021-01-11 2021-05-14 杭州复杂美科技有限公司 区块生成方法、计算机设备和存储介质
CN112839091A (zh) * 2021-01-11 2021-05-25 杭州复杂美科技有限公司 区块生成方法、计算机设备和存储介质
CN112839091B (zh) * 2021-01-11 2022-06-24 杭州复杂美科技有限公司 区块生成方法、计算机设备和存储介质
CN112804322B (zh) * 2021-01-11 2022-06-28 杭州复杂美科技有限公司 区块生成方法、计算机设备和存储介质
CN112948496A (zh) * 2021-03-05 2021-06-11 杭州复杂美科技有限公司 平行链区块生成方法、计算机设备和存储介质
CN112948496B (zh) * 2021-03-05 2023-11-24 杭州复杂美科技有限公司 平行链区块生成方法、计算机设备和存储介质
CN113206851B (zh) * 2021-05-06 2022-04-05 杭州复杂美科技有限公司 平行链共识方法、计算机设备和存储介质
CN113206851A (zh) * 2021-05-06 2021-08-03 杭州复杂美科技有限公司 平行链共识方法、计算机设备和存储介质
CN114791788A (zh) * 2022-04-24 2022-07-26 成都信息工程大学 一种基于区块链的数据存储方法及装置
CN114791788B (zh) * 2022-04-24 2023-07-18 成都信息工程大学 一种基于区块链的数据存储方法及装置

Also Published As

Publication number Publication date
US11824996B2 (en) 2023-11-21
US20210351939A1 (en) 2021-11-11
CN109271446B (zh) 2020-10-23
CN109271446A (zh) 2019-01-25

Similar Documents

Publication Publication Date Title
WO2020043048A1 (zh) 一种平行链数据同步方法、设备和存储介质
CN109410045B (zh) 一种平行链共识方法、设备和存储介质
WO2020177537A1 (zh) 平行链共识方法、数据异常处理方法、设备和存储介质
WO2020001370A1 (zh) 一种多链并发交易方法
WO2020024994A1 (zh) 一种隐私交易方法及系统、设备和可存储介质
WO2020108325A1 (zh) 事务处理方法、装置和设备
CN110442579B (zh) 一种状态树数据存储方法、同步方法及设备和存储介质
TW201937436A (zh) 基於區塊鏈的交易執行方法及裝置、電子設備
US20070185920A1 (en) Method and system combining state replication and operational-replay synchronization
US11899689B2 (en) Blockchain-based data synchronization method, apparatus, and computer-readable storage medium
WO2021047541A1 (zh) 一种区块链内获取交易依赖关系的方法及装置
WO2020258847A1 (zh) 基于处理模块跨链发送可认证消息的方法和装置
CN111314479A (zh) 一种数据处理方法和设备
CN110287196B (zh) 区块存储方法、平行链交易获取方法、设备和存储介质
JP2017524190A (ja) データベース障害時のデータ記憶
CN109862102B (zh) 一种分布式数据多副本并发控制系统、服务器及方法
WO2020133963A1 (zh) 基于区块链的数据存储方法、相关设备及存储介质
US11316695B2 (en) System and method for providing and maintaining irrefutable proof of the building, testing, deployment and release of software
CN109739684A (zh) 基于向量时钟的分布式键值数据库的副本修复方法与装置
US8719313B2 (en) Distributed data store with a designated master to ensure consistency
CN110543526B (zh) 一种基于区块链的优化储存方法及系统
WO2022206439A1 (zh) 提供跨链消息的方法和装置
US9043283B2 (en) Opportunistic database duplex operations
WO2021017693A1 (zh) 平行链资产转移方法、设备和存储介质
CN109614411B (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: 19854162

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19854162

Country of ref document: EP

Kind code of ref document: A1