CN111400399B - Ledger synchronization method, device and hardware equipment of blockchain system - Google Patents

Ledger synchronization method, device and hardware equipment of blockchain system Download PDF

Info

Publication number
CN111400399B
CN111400399B CN202010155381.6A CN202010155381A CN111400399B CN 111400399 B CN111400399 B CN 111400399B CN 202010155381 A CN202010155381 A CN 202010155381A CN 111400399 B CN111400399 B CN 111400399B
Authority
CN
China
Prior art keywords
block
node
account book
target
blockchain system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010155381.6A
Other languages
Chinese (zh)
Other versions
CN111400399A (en
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Liannong Shenzhen Information Technology Co ltd
Original Assignee
Liannong Shenzhen Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Liannong Shenzhen Information Technology Co ltd filed Critical Liannong Shenzhen Information Technology Co ltd
Priority to CN202010155381.6A priority Critical patent/CN111400399B/en
Publication of CN111400399A publication Critical patent/CN111400399A/en
Application granted granted Critical
Publication of CN111400399B publication Critical patent/CN111400399B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Abstract

The application discloses an account book synchronization method, device and hardware equipment of a blockchain system, relates to the technical field of blockchains, and is used for reducing the blockbooks stored in the blockchain system and improving the operation efficiency of the blockchain system. The main technical scheme of the application is as follows: receiving a block account book, and determining block nodes corresponding to the data types according to the block abstract information; taking a block node of a data type corresponding to the block abstract information as a first block node, and acquiring a first block node of which the block residual space is larger than the space size data required by the block from a preset block node residual space table; calculating the network bandwidth required by the transmission block account book according to the space size data required by the block and the block importance level information; taking a first block node with the residual space of the block larger than the space size data required by the block as a second block node; taking a block node meeting the network bandwidth required by the block account book in the second block node as a target node; and synchronizing the block account book to the target node.

Description

Ledger synchronization method, device and hardware equipment of blockchain system
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to a ledger synchronization method, device and hardware equipment of a blockchain system.
Background
The blockchain is a recording technology different from the traditional centralized accounting mode, and nodes participating in the blockchain system may not belong to the same organization and do not need to trust each other; the blockchain data is maintained by all nodes together, and each node participating in the maintenance can obtain a copy of the complete record. Compared with the traditional billing technology, the method has the characteristics that: maintaining an ever-growing chain, only records can be added, and the records which have occurred are not tamperable; the characteristics of consensus can be achieved without centralized control.
As the number of blockchain links increases, the blockchain operation efficiency decreases, and the cost of power charged to the user increases, which has seriously affected the application development of blockchain technology. Because on the blockchain platform, in order to ensure the safety of data storage, after the data of any node is updated, the data of any node is synchronously stored to other nodes, however, as the stored data is more and more, the more data needs to be synchronized among the nodes, the time consumed for each synchronization is longer, and as the nodes are more and more, the more and more data are synchronized to all the nodes, the more and more time is required for one latest data, and thus the running efficiency of the blockchain is lower and lower.
Disclosure of Invention
The application provides an account book synchronization method, device, computer equipment and storage medium of a blockchain system, which are used for reducing the blockbooks stored in the blockchain system and improving the operation efficiency of the blockchain system.
The embodiment of the application provides a ledger synchronization method of a blockchain system, wherein the blockchain system comprises a plurality of blocknodes and a blocksynchronization center node corresponding to the blocknodes, the method is applied to the blocksynchronization center node, and the method comprises the following steps:
receiving and storing a block account book sent by a block generation node, wherein the block account book comprises block abstract information, space size data required by a block and block importance level information; the block account book in the block generation node is generated according to all intelligent contracts in the packaging consensus time;
determining block nodes corresponding to data types according to the block abstract information, wherein each block node corresponds to a block account book storing one data type;
taking a block node of a data type corresponding to the block abstract information as a first block node, acquiring a first block node of which the block residual space is larger than the space size data required by the block from a preset block node residual space table, and dynamically storing the block residual spaces respectively corresponding to different block nodes in the preset block node residual space table;
calculating network bandwidth required by transmitting the block account book according to the space size data required by the block and the block importance level information;
taking a first block node of which the residual space of the block is larger than the space size data required by the block as a second block node, and acquiring the network bandwidth of the second block node in the block chain system;
taking a block node meeting the network bandwidth required by the block account book in the second block node as a target node; and synchronizing the blockbook to the target node.
The embodiment of the application provides an account book synchronization device of a block chain system, wherein the block chain system comprises a plurality of block nodes and a block synchronization center node corresponding to the block nodes, the device is applied to the block synchronization center node, and the device comprises:
the receiving module is used for receiving and storing the block account book sent by the block generation node, wherein the block account book comprises block abstract information, space size data required by a block and block importance level information; the block account book in the block generation node is generated according to all intelligent contracts in the packaging consensus time;
the determining module is used for determining block nodes corresponding to the data types according to the block abstract information, and each block node corresponds to a block account book storing one data type;
the acquisition module is used for taking a block node of a data type corresponding to the block abstract information as a first block node, acquiring the first block node of which the block residual space is larger than the space size data required by the block from a preset block node residual space table, and dynamically storing the block residual spaces respectively corresponding to different block nodes in the preset block node residual space table;
the calculation module is used for calculating the network bandwidth required by transmitting the block account book according to the space size data required by the block and the block importance level information;
the acquisition module is further configured to use a first block node, where the remaining space of the block is larger than the space size data required by the block, as a second block node, to acquire a network bandwidth of the second block node in the blockchain system;
the synchronization module is used for taking the block node meeting the network bandwidth required by the block account book in the second block node as a target node; and synchronizing the blockbook to the target node.
A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the ledger synchronization method of the blockchain system described above when executing the computer program.
A computer readable storage medium storing a computer program which when executed by a processor implements the ledger synchronization apparatus of a blockchain system as described above.
The application provides a ledger synchronization method, a device, computer equipment and a storage medium of a blockchain system, which are used for receiving and storing a blockbook sent by a blockbook generation node, wherein the blockbook comprises blocksummary information, space size data required by a block and blockimportance level information; determining block nodes corresponding to data types according to the block abstract information, wherein each block node corresponds to a block account book storing one data type; taking a block node of a data type corresponding to the block abstract information as a first block node, and acquiring a first block node of which the block residual space is larger than the space size data required by the block from a preset block node residual space table; calculating network bandwidth required by transmitting the block account book according to the space size data required by the block and the block importance level information; taking a first block node of which the residual space of the block is larger than the space size data required by the block as a second block node, and acquiring the network bandwidth of the second block node in the block chain system; taking a block node meeting the network bandwidth required by the block account book in the second block node as a target node; and synchronizing the blockbook to the target node. According to the embodiment of the application, the target node is selected from the plurality of block nodes based on the block abstract information, the space size data required by the block and the block importance level information, and then the block account book is synchronized to the target node, so that the block account book stored in the block chain system can be reduced, and the operation efficiency of the block chain system is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments of the present application will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a ledger synchronization method of a block chain system in accordance with an embodiment of the present application;
FIG. 2 is a flow chart of a block node determining a data type corresponding to a block ledger in an embodiment of the present application;
FIG. 3 is a flow chart of network bandwidth required to calculate a blockbook in accordance with an embodiment of the present application;
FIG. 4 is a schematic block diagram of an ledger synchronization apparatus of a block chain system in accordance with an embodiment of the present application;
FIG. 5 is a schematic diagram of a computer device in accordance with an embodiment of the application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
In one embodiment, as shown in fig. 1, there is provided a ledger synchronization method of a blockchain system, where the blockchain system includes a plurality of blocknodes and blocksynchronization center nodes corresponding to the plurality of blocknodes, and the blocksynchronization center nodes are used for uniformly managing ledger synchronization operations of the blocknodes, and the method is applied to the blocksynchronization center nodes, and includes the following steps:
s10, receiving and storing the block account book sent by the block generation node.
The block account book comprises block abstract information, block required space size data and block importance level information, wherein the block abstract information is an abstract of contents contained in the block account book, the block required space size data is used for describing data storage capacity occupied by the block account book, and a block importance level information user represents the importance degree of the block account book. In the embodiment of the application, the block account book in the block generation node is generated according to all intelligent contracts in the packaging consensus time, namely, the block production node packages all intelligent contracts in the consensus time to generate the block account book, and then the block account book is sent to the block synchronization center node, so that the block synchronization center node selectively synchronizes the block account book to other block nodes.
In the process of packaging the intelligent contracts, the block generating node needs to determine corresponding block abstract information and block importance level information according to the content of the packaged intelligent contracts, then count the storage space size required by the packaged intelligent contracts, and package the block abstract information, the space size data required by the blocks and the block importance level information as block headers together with the intelligent contracts in the consensus time to obtain the block ledger.
S20, determining block nodes corresponding to the data types according to the block abstract information.
Each block node correspondingly stores a block account book with a data type, wherein the data type can be specifically set according to actual conditions, for example, the data type can be specifically a bank data type, an insurance data type, a shopping data type, a catering data type and the like, and the embodiment of the application is not specifically limited. In the embodiment of the application, the block nodes of the corresponding data types can be determined according to the block abstract information of the block ledger, and the block nodes of the corresponding data types of the block ledger are determined specifically through a keyword recognition technology, for example, keyword recognition is performed on the block abstract information to obtain a keyword 'insurance', namely, the corresponding data types can be determined to be insurance data types through the keyword, so that the block nodes of the insurance data types corresponding to the block ledger are obtained.
As shown in fig. 2, in one embodiment provided by the present application, step S20: the determining the block node corresponding to the data type according to the block summary information comprises the following steps:
and S201, converting the block abstract information into text feature vectors.
S202, inputting the text feature vector into a data type identification model to obtain a data type corresponding to the block abstract information.
The data type recognition model is trained according to a large amount of sample data, namely, the data type recognition model is trained according to a large amount of block abstract sample information and the corresponding data type. In the embodiment of the application, the text feature vector is input into the pre-trained data type recognition model to obtain the data type corresponding to the block abstract information, and the data type recognition model is obtained by training according to a large amount of sample data, so that the data type corresponding to the block abstract information can be accurately obtained through the data type recognition model.
And S30, taking the block node of the data type corresponding to the block abstract information as a first block node, and acquiring the first block node of which the block residual space is larger than the space size data required by the block from a preset block node residual space table.
Wherein, the block residual space corresponding to different block nodes is dynamically stored in the preset block node residual space table; namely, the block residual spaces corresponding to the block nodes are dynamically updated and stored in real time according to the real-time storage condition of the block nodes.
In the embodiment of the application, the first block node with the block residual space larger than the space size data required by the block is obtained from the preset block node residual space table, so that the block node capable of storing the block ledger with enough storage space is obtained from the first block node.
And S40, calculating the network bandwidth required by transmitting the block account book according to the space size data required by the block and the block importance level information.
In the embodiment of the application, the larger the space size data required by the block is, the higher the important grade information of the block is, the higher the network bandwidth requirement required by the block account book is; conversely, the smaller the space size data required for a block, the lower the block importance level information, and the lower the network bandwidth requirements for the block ledger pair.
As shown in fig. 3, in one embodiment provided by the present application, step S40: the calculating the network bandwidth required for transmitting the block account book according to the space size data required by the block and the block importance level information comprises the following steps:
s401, determining the transmission time required by the block account book according to the block importance level information; different block importance level information corresponds to different block ledger transmission times.
The block importance level information can be used for expressing the transmission time of the block account book, and the higher the block importance level information is, the shorter the required transmission time of the block account book is; the lower the block importance level information, the longer the required transmission time of the block ledger. Specifically, the determining the transmission time required by the block ledger according to the block importance level information includes: and determining transmission time corresponding to the block importance level information according to a block level information table, wherein the transmission time respectively corresponding to different block importance level information is stored in the block level information table. For example, if the block importance level information is 3, the required transmission time is 1 minute; the block importance level information is 2, and the required transmission time is 2 minutes; the block importance level information is 3, and the required transmission time is 3 minutes, which is not particularly limited in the embodiment of the present application.
S402, determining the network bandwidth required by the block account book through the ratio of the space size data required by the block and the transmission time.
In the embodiment of the application, firstly, the transmission time required by the block account book is determined according to the block importance level information, and then the network bandwidth required by the block account book is determined according to the ratio of the space size data required by the block and the transmission time. Because the network bandwidth is determined according to the ratio of the space size data and the transmission time required by the block, the network bandwidth required by transmitting the block account book can be accurately determined through the embodiment of the application, so that the second block node meeting the network bandwidth can be selected from the first block nodes according to the determined network bandwidth in the subsequent step.
And S50, taking a first block node of which the residual space of the block is larger than the space size data required by the block as a second block node, and acquiring the network bandwidth of the second block node in the block chain system.
S60, taking a block node meeting the network bandwidth required by the block account book in the second block node as a target node; and synchronizing the blockbook to the target node.
In the embodiment of the application, after receiving a block account book, a block synchronization center node determines a block node needing to store the block account book according to block summary information of the block account book, then selects a first block node with a block residual space larger than space size data required by a block from block nodes selected based on the block summary information, and then takes the first block node with the block residual space larger than the space size data required by the block as a second block node to acquire network bandwidth of the second block node in a block chain system; taking a block node meeting the network bandwidth required by the block account book in the second block node as a target node; and synchronizing the blockbook to the target node. According to the embodiment of the application, the target node is selected from the plurality of block nodes based on the block abstract information, the space size data required by the block and the block importance level information, and then the block account book is synchronized to the target node, so that the block account book stored in the block chain can be reduced, and the running efficiency of the block chain is improved.
For the embodiment of the application, in order to update the block residual space corresponding to the block node in the preset block node residual space table in real time, the embodiment of the application also needs to acquire the block residual space of the target node after synchronizing the block account book to the target node, and then updates the block residual space corresponding to the block node in the preset block node residual space table according to the block residual space of the target node, thereby realizing the dynamic update of the data in the preset block node residual space table, and further accurately selecting the block node meeting the space required by the block account book according to the preset block node residual space table in the follow-up.
In one embodiment provided by the present application, after taking a block node satisfying the network bandwidth in the second block node as a target node, the method further includes: sending a query request to the target node, wherein the query request is used for querying part of contents of a target block in the target node; receiving partial contents of the target block fed back by a plurality of target nodes; determining the reliability of each target node by comparing the partial content of the target block fed back by each target node with the partial content of the target block stored locally; correspondingly, the synchronizing the block ledger to the target node includes: and synchronizing the block account book to the target node with the reliability larger than a threshold value. Wherein, the partial content of the target block is: the embodiment of the present application is not limited specifically, and the transaction information in the target block, the target field value in the block body of the target block, and the like.
It should be noted that, in the embodiment of the present application, the reliability of the target node may be determined according to the text similarity, that is, the partial content of the target block fed back by the target node and the partial content of the target block stored locally may be compared by the text similarity algorithm, and the reliability of each target node may be determined, that is, the similarity between the partial content of the target block fed back by the target node and the partial content of the target block stored locally may be determined, and then the block ledger may be synchronized to the target node whose similarity is greater than the threshold.
The application provides an account book synchronization method of a blockchain system, which is used for receiving and storing a blockbook sent by a blockbook generation node, wherein the blockbook comprises blocksummary information, space size data required by a block and block importance level information; determining block nodes corresponding to data types according to the block abstract information, wherein each block node corresponds to a block account book storing one data type; taking a block node of a data type corresponding to the block abstract information as a first block node, and acquiring a first block node of which the block residual space is larger than the space size data required by the block from a preset block node residual space table; calculating network bandwidth required by transmitting the block account book according to the space size data required by the block and the block importance level information; taking a first block node of which the residual space of the block is larger than the space size data required by the block as a second block node, and acquiring the network bandwidth of the second block node in the block chain system; taking a block node meeting the network bandwidth required by the block account book in the second block node as a target node; and synchronizing the blockbook to the target node. According to the embodiment of the application, the target node is selected from the plurality of block nodes based on the block abstract information, the space size data required by the block and the block importance level information, and then the block account book is synchronized to the target node, so that the block account book stored in the block chain system can be reduced, and the operation efficiency of the block chain system is improved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
In an embodiment of the present application, an account book synchronization device of a blockchain system is provided, where the account book synchronization device of the blockchain system corresponds to the account book synchronization method of the blockchain system in the above embodiment one by one. As shown in fig. 4, the blockchain system includes a plurality of blocknodes and blocksynchronous center nodes corresponding to the blocknodes, the device is applied to the blocksynchronous center nodes, and the ledger synchronization device of the blockchain system includes: the device comprises a receiving module 10, a determining module 20, an acquiring module 30, a calculating module 40 and a synchronizing module 50. The functional modules are described in detail as follows:
the receiving module 10 is configured to receive and store a block account book sent by a block generating node, where the block account book includes block summary information, space size data required by a block, and block importance level information; the block account book in the block generation node is generated according to all intelligent contracts in the packaging consensus time;
the determining module 20 is configured to determine block nodes corresponding to data types according to the block summary information, where each block node corresponds to a block ledger storing one data type;
the obtaining module 30 is configured to use a block node of a data type corresponding to the block summary information as a first block node, obtain a first block node of which a block residual space is greater than the space size data required by the block from a preset block node residual space table, and dynamically store block residual spaces corresponding to different block nodes in the preset block node residual space table;
a calculating module 40, configured to calculate a network bandwidth required for transmitting the block ledger according to the space size data required by the block and the block importance level information;
the obtaining module 30 is further configured to use a first block node of the block residual space that is larger than the space size data required by the block as a second block node, and obtain a network bandwidth of the second block node in the blockchain system;
a synchronization module 50, configured to take, as a target node, a block node of the second block node that satisfies a network bandwidth required by the block ledger; and synchronizing the blockbook to the target node.
Further, the device further comprises:
the obtaining module 30 is further configured to obtain a block remaining space of the target node,
and an updating module 60, configured to update the block remaining space of the corresponding block node in the preset block node remaining space table according to the block remaining space of the target node.
Further, the device further comprises:
a sending module 70, configured to send a query request to the target node, where the query request is used to query a part of contents of a target block in the target node;
the receiving module 10 is further configured to receive part of contents of the target block fed back by a plurality of target nodes;
the determining module 20 is further configured to determine the reliability of each target node by comparing the partial content of the target block fed back by each target node with the partial content of the target block stored locally;
the synchronization module 50 is specifically configured to synchronize the blockbook to the target node with the reliability greater than a threshold.
Specifically, the determining module 20 includes:
the conversion unit is used for converting the block abstract information into text feature vectors;
the computing unit is used for inputting the text feature vector into a data type recognition model to obtain a data type corresponding to the block abstract information, and the data type recognition model is trained according to a large amount of block abstract sample information and the corresponding data type.
Specifically, the computing module 40 includes:
the determining unit is used for determining the transmission time required by the block account book according to the block importance level information; different block importance level information corresponds to different block account book transmission time;
the determining unit is further configured to determine a network bandwidth required by the block ledger according to a ratio of the space size data required by the block and the transmission time.
The determining unit is further configured to determine a transmission time corresponding to the block importance level information according to a block level information table, where transmission times corresponding to different block importance level information are stored in the block level information table.
For specific limitations on the ledger synchronization apparatus of the blockchain system, reference may be made to the above limitations on the ledger synchronization method of the blockchain system, and no further description is given here. The various modules in the ledger synchronization apparatus of the blockchain system described above may be implemented in whole or in part in software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a ledger synchronization method for a blockchain system.
In one embodiment, a computer device is provided comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of when executing the computer program:
receiving and storing a block account book sent by a block generation node, wherein the block account book comprises block abstract information, space size data required by a block and block importance level information; the block account book in the block generation node is generated according to all intelligent contracts in the packaging consensus time;
determining block nodes corresponding to data types according to the block abstract information, wherein each block node corresponds to a block account book storing one data type;
taking a block node of a data type corresponding to the block abstract information as a first block node, acquiring a first block node of which the block residual space is larger than the space size data required by the block from a preset block node residual space table, and dynamically storing the block residual spaces respectively corresponding to different block nodes in the preset block node residual space table;
calculating network bandwidth required by transmitting the block account book according to the space size data required by the block and the block importance level information;
taking a first block node of which the residual space of the block is larger than the space size data required by the block as a second block node, and acquiring the network bandwidth of the second block node in the block chain system;
taking a block node meeting the network bandwidth required by the block account book in the second block node as a target node; and synchronizing the blockbook to the target node.
In one embodiment, a computer readable storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of:
receiving and storing a block account book sent by a block generation node, wherein the block account book comprises block abstract information, space size data required by a block and block importance level information; the block account book in the block generation node is generated according to all intelligent contracts in the packaging consensus time;
determining block nodes corresponding to data types according to the block abstract information, wherein each block node corresponds to a block account book storing one data type;
taking a block node of a data type corresponding to the block abstract information as a first block node, acquiring a first block node of which the block residual space is larger than the space size data required by the block from a preset block node residual space table, and dynamically storing the block residual spaces respectively corresponding to different block nodes in the preset block node residual space table;
calculating network bandwidth required by transmitting the block account book according to the space size data required by the block and the block importance level information;
taking a first block node of which the residual space of the block is larger than the space size data required by the block as a second block node, and acquiring the network bandwidth of the second block node in the block chain system;
taking a block node meeting the network bandwidth required by the block account book in the second block node as a target node; and synchronizing the blockbook to the target node.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A ledger synchronization method of a blockchain system, wherein the blockchain system includes a plurality of blocknodes and a blocksynchronization center node corresponding to the blocknodes, the method is applied to the blocksynchronization center node, and the method comprises:
receiving and storing a block account book sent by a block generation node, wherein the block account book comprises block abstract information, space size data required by a block and block importance level information; the block account book in the block generation node is generated according to all intelligent contracts in the packaging consensus time;
determining block nodes corresponding to data types according to the block abstract information, wherein each block node corresponds to a block account book storing one data type;
taking a block node of a data type corresponding to the block abstract information as a first block node, acquiring a first block node of which the block residual space is larger than the space size data required by the block from a preset block node residual space table, and dynamically storing the block residual spaces respectively corresponding to different block nodes in the preset block node residual space table;
calculating network bandwidth required by transmitting the block account book according to the space size data required by the block and the block importance level information;
taking a first block node of which the residual space of the block is larger than the space size data required by the block as a second block node, and acquiring the network bandwidth of the second block node in the block chain system;
taking a block node meeting the network bandwidth required by the block account book in the second block node as a target node; and synchronizing the blockbook to the target node.
2. The ledger synchronization method of a blockchain system of claim 1, wherein after synchronizing the blockledger to the target node, the method further comprises:
and acquiring the block residual space of the target node, and updating the block residual space of the corresponding block node in the preset block node residual space table according to the block residual space of the target node.
3. The ledger synchronization method of a blockchain system of claim 1, wherein after taking a blocknode of the second blocknode that satisfies the network bandwidth as a target node, the method further comprises:
sending a query request to the target node, wherein the query request is used for querying part of contents of a target block in the target node;
receiving partial contents of the target block fed back by a plurality of target nodes;
determining the reliability of each target node by comparing the partial content of the target block fed back by each target node with the partial content of the target block stored locally;
the synchronizing the block ledger to the target node includes:
and synchronizing the block account book to the target node with the reliability larger than a threshold value.
4. The ledger synchronization method of a blockchain system of claim 1, wherein the determining a blocknode of a corresponding data type from the blocksummary information includes:
converting the block summary information into text feature vectors;
and inputting the text feature vector into a data type recognition model to obtain a data type corresponding to the block abstract information, wherein the data type recognition model is trained according to a large amount of block abstract sample information and the corresponding data type.
5. The ledger synchronization method of a blockchain system of claim 4, wherein the calculating the network bandwidth required to transmit the blockledger based on the block required space size data and the block importance level information includes:
determining the transmission time required by the block account book according to the block importance level information; different block importance level information corresponds to different block account book transmission time;
and determining the network bandwidth required by the block account book through the ratio of the space size data required by the block and the transmission time.
6. The ledger synchronization method of a blockchain system of claim 5, wherein the determining a transmission time required for the blockledger based on the blockiness level information includes:
and determining transmission time corresponding to the block importance level information according to a block level information table, wherein the transmission time respectively corresponding to different block importance level information is stored in the block level information table.
7. An account book synchronization device of a blockchain system, wherein the blockchain system comprises a plurality of blocknodes and blocksynchronous center nodes corresponding to the blocknodes, and the device is applied to the blocksynchronous center nodes, and is characterized in that the device comprises:
the receiving module is used for receiving and storing the block account book sent by the block generation node, wherein the block account book comprises block abstract information, space size data required by a block and block importance level information; the block account book in the block generation node is generated according to all intelligent contracts in the packaging consensus time;
the determining module is used for determining block nodes corresponding to the data types according to the block abstract information, and each block node corresponds to a block account book storing one data type;
the acquisition module is used for taking a block node of a data type corresponding to the block abstract information as a first block node, acquiring the first block node of which the block residual space is larger than the space size data required by the block from a preset block node residual space table, and dynamically storing the block residual spaces respectively corresponding to different block nodes in the preset block node residual space table;
the calculation module is used for calculating the network bandwidth required by transmitting the block account book according to the space size data required by the block and the block importance level information;
the acquisition module is further configured to use a first block node, where the remaining space of the block is larger than the space size data required by the block, as a second block node, to acquire a network bandwidth of the second block node in the blockchain system;
the synchronization module is used for taking the block node meeting the network bandwidth required by the block account book in the second block node as a target node; and synchronizing the blockbook to the target node.
8. The ledger synchronization apparatus of a blockchain system of claim 7, wherein the apparatus further comprises:
the acquisition module is further configured to acquire a block remaining space of the target node,
and the updating module is used for updating the block residual space of the corresponding block node in the preset block node residual space table according to the block residual space of the target node.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the ledger synchronization method of the blockchain system of any of claims 1 to 6 when the computer program is executed.
10. A computer readable storage medium storing a computer program which when executed by a processor implements the ledger synchronization method of the blockchain system of any of claims 1 to 6.
CN202010155381.6A 2020-03-04 2020-03-04 Ledger synchronization method, device and hardware equipment of blockchain system Active CN111400399B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010155381.6A CN111400399B (en) 2020-03-04 2020-03-04 Ledger synchronization method, device and hardware equipment of blockchain system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010155381.6A CN111400399B (en) 2020-03-04 2020-03-04 Ledger synchronization method, device and hardware equipment of blockchain system

Publications (2)

Publication Number Publication Date
CN111400399A CN111400399A (en) 2020-07-10
CN111400399B true CN111400399B (en) 2023-11-14

Family

ID=71432276

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010155381.6A Active CN111400399B (en) 2020-03-04 2020-03-04 Ledger synchronization method, device and hardware equipment of blockchain system

Country Status (1)

Country Link
CN (1) CN111400399B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113645278B (en) * 2021-07-23 2022-09-20 湖南大学 Cross-chain message transmission method, device and storage medium of block chain

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108305056A (en) * 2018-03-27 2018-07-20 搜游网络科技(北京)有限公司 Data processing method, device based on block chain and block chain meshed network
CN109446273A (en) * 2018-12-04 2019-03-08 深圳前海环融联易信息科技服务有限公司 Method of data synchronization, device, computer equipment and the storage medium of block chain
CN109981794A (en) * 2019-04-09 2019-07-05 广州蚁比特区块链科技有限公司 Processing method, device and electronic equipment based on block chain meshed network
CN110059136A (en) * 2019-04-17 2019-07-26 江苏全链通信息科技有限公司 Information storage means, equipment and storage medium based on domain name block chain
CN110661822A (en) * 2018-06-28 2020-01-07 厦门本能管家科技有限公司 Decentralized distributed data storage method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11122500B2 (en) * 2018-01-16 2021-09-14 Cisco Technology, Inc. Using a blockchain for optimized fast-secure roaming on WLANs

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108305056A (en) * 2018-03-27 2018-07-20 搜游网络科技(北京)有限公司 Data processing method, device based on block chain and block chain meshed network
CN110661822A (en) * 2018-06-28 2020-01-07 厦门本能管家科技有限公司 Decentralized distributed data storage method and device
CN109446273A (en) * 2018-12-04 2019-03-08 深圳前海环融联易信息科技服务有限公司 Method of data synchronization, device, computer equipment and the storage medium of block chain
CN109981794A (en) * 2019-04-09 2019-07-05 广州蚁比特区块链科技有限公司 Processing method, device and electronic equipment based on block chain meshed network
CN110059136A (en) * 2019-04-17 2019-07-26 江苏全链通信息科技有限公司 Information storage means, equipment and storage medium based on domain name block chain

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Aurora: A Robust and Trustless Verification and Synchronization Algorithm for Distributed Ledgers;Federico Matteo Benčić等;《2019 IEEE International Conference on Blockchain (Blockchain》;第1-2页 *
基于以太坊平台的DNS设计与实现;李嶒;《黄河科技学院学报》;第22卷(第2期);第57-63页 *

Also Published As

Publication number Publication date
CN111400399A (en) 2020-07-10

Similar Documents

Publication Publication Date Title
CN108573371B (en) Data approval method, device, computer equipment and storage medium
CN110782240B (en) Business data processing method and device, computer equipment and storage medium
US8904149B2 (en) Parallelization of online learning algorithms
CN111026767B (en) Block chain data storage method and device and hardware equipment
CN109815344B (en) Network model training system, method, apparatus and medium based on parameter sharing
CN110941630A (en) Database operation and maintenance method, device and system
EP4213038A1 (en) Data processing method and apparatus based on distributed storage, device, and medium
CN110008206A (en) A kind of data processing method and device based on block catenary system
CN112800095A (en) Data processing method, device, equipment and storage medium
CN109062925A (en) Automatically generate the method, apparatus, computer equipment and storage medium of insert sentence
CN111400399B (en) Ledger synchronization method, device and hardware equipment of blockchain system
CN110795171A (en) Service data processing method and device, computer equipment and storage medium
CN111145019A (en) Method and system for acquiring data outside block chain
CN112685391B (en) Service data migration method and device, computer equipment and storage medium
US11120513B2 (en) Capital chain information traceability method, system, server and readable storage medium
CN111858467A (en) File data processing method, device, equipment and medium based on artificial intelligence
CN109242680B (en) Method for dynamically adjusting block chain consensus
CN115208900B (en) Multi-cloud architecture cloud service resource scheduling method based on blockchain and game model
CN111047322A (en) Intelligent contract deployment method and device based on block chain and hardware equipment
CN112801616B (en) Abnormal account book processing method and device
CN116095074A (en) Resource allocation method, device, related equipment and storage medium
CN112435021A (en) Transaction request processing method, device, equipment and medium based on artificial intelligence
CN113793148B (en) Block synchronization method, device, node and storage medium of alliance chain
CN110874486B (en) Method, device and equipment for reading data in block chain type account book
NL2032902B1 (en) User data management method, device, terminal apparatus and medium

Legal Events

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