CN109446273A - Method of data synchronization, device, computer equipment and the storage medium of block chain - Google Patents

Method of data synchronization, device, computer equipment and the storage medium of block chain Download PDF

Info

Publication number
CN109446273A
CN109446273A CN201811472522.6A CN201811472522A CN109446273A CN 109446273 A CN109446273 A CN 109446273A CN 201811472522 A CN201811472522 A CN 201811472522A CN 109446273 A CN109446273 A CN 109446273A
Authority
CN
China
Prior art keywords
node
message
data
cochain
chain
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.)
Granted
Application number
CN201811472522.6A
Other languages
Chinese (zh)
Other versions
CN109446273B (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.)
Shenzhen Qianhai Huanlianyi Information Technology Service Co Ltd
Original Assignee
Shenzhen Qianhai Huanlianyi Information Technology Service 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 Shenzhen Qianhai Huanlianyi Information Technology Service Co Ltd filed Critical Shenzhen Qianhai Huanlianyi Information Technology Service Co Ltd
Priority to CN201811472522.6A priority Critical patent/CN109446273B/en
Publication of CN109446273A publication Critical patent/CN109446273A/en
Application granted granted Critical
Publication of CN109446273B publication Critical patent/CN109446273B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to the method for data synchronization of block chain, device, computer equipment and storage medium, this method includes that will need the synchronizing traffic data of cochain local to each node using common recognition algorithm;Obtain block height;Judge whether block height changes;If so, giving out information to central node;Timing pulls node from message center and subscribes to message;It subscribes to message to node to be decrypted, to obtain business datum under chain;To synchronizing traffic data under chain to local.The data block for needing cochain is synchronized to node local account book by common recognition algorithm, by synchronizing traffic data under unified message interaction API drive chain to node local data base by the present invention, the different methods of synchronization is used for different data, it is synchronous can to carry out more type of messages, synchronization or asynchronous progress data, realize the mass data between being suitable for block chain interior joint and data under high concurrent business scenario be synchronous requires, reach rapidly and efficiently, height handles up and effect highly fault tolerant.

Description

Method of data synchronization, device, computer equipment and the storage medium of block chain
Technical field
The present invention relates to data processing methods, more specifically refer to the method for data synchronization, device, computer of block chain Equipment and storage medium.
Background technique
Due to the decentralization characteristic under block chain application scenarios, more copy datas needs on chain circulate between node, To reach common recognition, therefore the common recognition algorithm needs the bi-directional data between node synchronous.
And during the work of block chain, the data synchronization between several nodes is then the synchronization of mass data, both It is required that synchronizing speed is fast, step data amount of seeking common ground again is big, and existing common recognition data volume and real-time are much unable to satisfy interconnection Net mass data, the business scenario demand of high concurrent.
Therefore, it is necessary to design a kind of new method, mass data and height between being suitable for block chain interior joint are realized Data under voice and packet data concurrent service scene are synchronous to be required, reach rapidly and efficiently, height handles up and effect highly fault tolerant.
Summary of the invention
It is an object of the invention to overcome the deficiencies of existing technologies, the method for data synchronization, device, calculating of block chain are provided Machine equipment and storage medium.
To achieve the above object, the invention adopts the following technical scheme: the method for data synchronization of block chain, comprising:
The synchronizing traffic data of cochain will be needed local to each node using common recognition algorithm;
Obtain block height;
Judge whether block height changes;
If so, giving out information to central node;
Timing pulls node from message center and subscribes to message;
It subscribes to message to node to be decrypted, to obtain business datum under chain;
To synchronizing traffic data under chain to local.
Its further technical solution are as follows: described the synchronizing traffic data of cochain to be needed to each node using common recognition algorithm It is local, comprising:
Obtain the business datum for needing cochain;
To needing the business datum of cochain encrypt and cochain;
It is local to each node by the business datum after block chain common recognition Network Synchronization cochain.
Its further technical solution are as follows: described to give out information to before central node, further includes:
The business datum after cochain is cached to relational database and file system according to node synchronization rules.
Its further technical solution are as follows: the timing pulls node from message center and subscribes to message, comprising:
It is local to node that subscription message periodically is pulled from message center by messaging service Https interface, and adjusts back node Message monitors interface storing data.
Its further technical solution are as follows: it is described to synchronizing traffic data to local under chain after, further includes:
It obtains message and monitors situation;
Judge whether message monitoring succeeds;
If so, updating monitored information consumption progress;
If it is not, then being consumed in a manner of periodically retrying, to form information consumption implementing result;
Encrypt simultaneously cochain to information consumption implementing result.
Its further technical solution are as follows: the method also includes:
Obtain the heartbeat message regularly sent from member node;
Member node survival and operation conditions are obtained according to heartbeat message.
Its further technical solution are as follows: the method also includes:
Business datum under the business datum for needing cochain and chain is acquired and analyzed, early warning is carried out according to business configuration threshold value And monitoring.
The present invention also provides the data synchronization units of block chain, comprising:
Synchronization unit on chain, for the synchronizing traffic data of cochain will be needed local to each node using common recognition algorithm;
Height acquiring unit, for obtaining block height;
Height judging unit, for judging whether block height changes;
Release unit, for if so, giving out information to central node;
Unit is retracted, node is pulled from message center for timing and subscribes to message;
Decryption unit is decrypted, to obtain business datum under chain for subscribing to message to node;
Synchronization unit under chain, for synchronizing traffic data under chain to local.
The present invention also provides a kind of computer equipment, the computer equipment includes memory and processor, described to deposit Computer program is stored on reservoir, the processor realizes above-mentioned method when executing the computer program.
The present invention also provides a kind of storage medium, the storage medium is stored with computer program, the computer journey Sequence can realize above-mentioned method when being executed by processor.
Compared with the prior art, the invention has the advantages that: the present invention will need the data field of cochain by algorithm of knowing together Block is synchronized to node local account book, by synchronizing traffic data under unified message interaction API drive chain to node local data base, The different methods of synchronization is used for different data, more type of messages, synchronization or asynchronous progress data can be carried out and synchronized, it is real Now it is suitable for the mass data between block chain interior joint and the synchronous requirement of the data under high concurrent business scenario, reaches quick height Effect, height handles up and effect highly fault tolerant.
The invention will be further described in the following with reference to the drawings and specific embodiments.
Detailed description of the invention
Technical solution in order to illustrate the embodiments of the present invention more clearly, below will be to needed in embodiment description Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, general for this field For logical technical staff, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is the application scenarios schematic diagram of the method for data synchronization of block chain provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of the method for data synchronization of block chain provided in an embodiment of the present invention;
Fig. 3 is the sub-process schematic diagram of the method for data synchronization of block chain provided in an embodiment of the present invention;
Fig. 4 be another embodiment of the present invention provides block chain method of data synchronization flow diagram;
Fig. 5 is the schematic block diagram of the data synchronization unit of block chain provided in an embodiment of the present invention;
Fig. 6 is the schematic frame of synchronization unit on the chain of the data synchronization unit of block chain provided in an embodiment of the present invention Figure;
Fig. 7 be another embodiment of the present invention provides block chain data synchronization unit schematic block diagram;
Fig. 8 is the schematic block diagram of computer equipment provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
It should be appreciated that ought use in this specification and in the appended claims, term " includes " and "comprising" instruction Described feature, entirety, step, operation, the presence of element and/or component, but one or more of the other feature, whole is not precluded Body, step, operation, the presence or addition of element, component and/or its set.
It is also understood that mesh of the term used in this description of the invention merely for the sake of description specific embodiment And be not intended to limit the present invention.As description of the invention and it is used in the attached claims, unless on Other situations are hereafter clearly indicated, otherwise " one " of singular, "one" and "the" are intended to include plural form.
It will be further appreciated that the term "and/or" used in description of the invention and the appended claims is Refer to any combination and all possible combinations of one or more of associated item listed, and including these combinations.
Fig. 1 and Fig. 2 are please referred to, Fig. 1 is the application scenarios of the method for data synchronization of block chain provided in an embodiment of the present invention Schematic diagram.Fig. 2 is the schematic flow chart of the method for data synchronization of block chain provided in an embodiment of the present invention.The data of block chain Synchronous method is applied in server, synchronous for the data to each node in server.
Fig. 2 is the flow diagram of the method for data synchronization of block chain provided in an embodiment of the present invention.As shown in Fig. 2, should Method includes the following steps S110 to S180.
S110, the synchronizing traffic data of cochain will be needed local to each node using common recognition algorithm.
In the present embodiment, the business datum of cochain is needed to refer to the data for needing to be synchronized in block chain.Pass through on chain Common recognition algorithm will need the synchronizing traffic data of cochain to node local account book.
In one embodiment, as shown in figure 3, above-mentioned step S110 may include step S111~S113.
S111, acquisition need the business datum of cochain;
S112, to needing the business datum of cochain encrypt and cochain;
Business datum after S113, Network Synchronization cochain of being known together by block chain is local to each node.
According to Scenario Design, needs the business datum of cochain to be digitally signed correlation in user, then and added The close interface that recalls carries out cochain.After cochain, the block chain between node knows together the corresponding data of Network Synchronization extremely by block chain Node locally completes common recognition.
S120, block height is obtained.
In this embodiment, block height is determined by the data stored in block, when being stored into new data in block, Then the block height can change, and therefore, obtain the block height, and then judge whether block height changes, thus Know whether that needing to carry out data synchronizes.
S130, judge whether block height changes;
S140, if so, the business datum after cochain is cached to relational database and file according to node synchronization rules System.
The node synchronization rules refer to the principle that data are accordingly filtered and synchronized according to business rule on chain, in synchronization Afterwards, various dimensions query function can be externally provided.
S150, it gives out information to central node.
In the present embodiment, need the data of cochain in addition to existing, there are also some data without cochain, such as json or Person's file or image etc., then need according to application scenarios by data separating chaining, two parts under chain, for business number under chain According to by unified message interaction API driving data be synchronized to node local data base, and support a variety of data formats (such as file, Video etc.), it is handled up by message duration and final consistency guarantee system height, high failure tolerance.
It gives out information to central node, periodically to retract the message from central node, so that it is synchronous to carry out data.
The message issued refers to obtaining the communication packet of central node.
S160, periodically from message center pull node subscribe to message.
In the present embodiment, node subscribes to message and refers to the communication packet with business datum under chain;Specifically, pass through It is local to node that messaging service Https interface periodically pulls subscription message from message center, and adjusts back node messages and monitor interface Storing data.And then synchrodata can also can continue to monitor the height change situation of block in time, to guarantee that data are same The timeliness of step.
S170, node subscription message is decrypted, to obtain business datum under chain.
S180, to synchronizing traffic data under chain to local.
By to node subscribe to message be decrypted after by business datum under corresponding chain (json/ file/image etc.) therefrom Heart node is pulled to node local, completes the synchronization of business datum under chain.
If it is not, then returning to the step S120.
To support in a manner of same, asynchronous, more type of message and the unified API message communication of multiple data format support, to being based on Data communication under block chain complicated business scene has carried out well packaged.And a variety of storages such as support database, file system Mode.In addition, the distributed environment final consistency supporting interface idempotent repetitive operation that message duration characteristic is realized.It is unified API (application programming, Application Programming Interface) interface supports the section under complicated business scene Point communication need, node application cost of access is effectively reduced, greatly reduce exploitation complexity while, persistence characteristic with Transactional attribute based on message height greatly improves block chain fault tolerant mechanism, in addition, its extremely low communication consumption also ensures The height of system is handled up, and efficiently solves the problems, such as the data interaction under the magnanimity high concurrent scene based on block chain.
The method of data synchronization of above-mentioned block chain, by knowing together, algorithm will need the data block of cochain to be synchronized to node Local account book, by unified message interaction API drive chain under synchronizing traffic data to node local data base, for different numbers According to the different methods of synchronization is used, more type of messages, synchronization or asynchronous progress data can be carried out and synchronized, realize and be suitable for block Data under mass data and high concurrent business scenario between chain interior joint are synchronous to be required, reach rapidly and efficiently, height handle up with And effect highly fault tolerant.
Fig. 4 be another embodiment of the present invention provides a kind of block chain method of data synchronization flow diagram.Such as Fig. 4 Shown, the method for data synchronization of the block chain of the present embodiment includes step S210-S270.Wherein step S210-S280 with it is above-mentioned Step S110-S180 in embodiment is similar, and details are not described herein.The following detailed description of it is increased in the present embodiment the step of S290-S294。
S290, message monitoring situation is obtained;
S291, judge whether message monitoring succeeds;
S292, if so, updating monitored information consumption progress;
S293, if it is not, then being consumed in a manner of periodically retrying, to form information consumption implementing result;
S294, encrypt simultaneously cochain to information consumption implementing result.
Whether the business interface for calling message to monitor succeeds according to monitoring, and update message consumes progress if success, otherwise It is consumed in a manner of periodically retrying and reaches final consistent, to obtain the information consumption implementing result of final consistency, that is, reached To the formula of each node, and by corresponding message consumption implementing result encrypted after cochain with finishing service closed loop.
In addition, this method further include:
Obtain the heartbeat message regularly sent from member node;
Member node survival and operation conditions are obtained according to heartbeat message.
Member node timing sends heartbeat message, the heartbeat message that monitoring service passes through acquisition to central node monitoring center Node survival and operation conditions are judged, to ensure whole system traveling comfort.
In addition, this method further include:
Business datum under the business datum for needing cochain and chain is acquired and analyzed, early warning is carried out according to business configuration threshold value And monitoring.
Control is carried out to the amount of business datum, the system that can be effectively ensured runs smoothly.
Certainly, above-mentioned the other three embodiment can form a new embodiment with one embodiment set.
Fig. 5 is a kind of schematic block diagram of the data synchronization unit 300 of block chain provided in an embodiment of the present invention.Such as Fig. 5 Shown, corresponding to the method for data synchronization of the above block chain, the present invention also provides a kind of data synchronization units 300 of block chain. The data synchronization unit 300 of the block chain includes the unit for executing the method for data synchronization of above-mentioned block chain, which can To be configured in server.
Specifically, referring to Fig. 5, the data synchronization unit 300 of the block chain includes:
Synchronization unit 301 on chain, for the synchronizing traffic data of cochain will be needed to each node sheet using common recognition algorithm Ground;
Height acquiring unit 302, for obtaining block height;
Height judging unit 303, for judging whether block height changes;
Release unit 305, for if so, giving out information to central node;
Unit 306 is retracted, node is pulled from message center for timing and subscribes to message;
Decryption unit 307 is decrypted, to obtain business datum under chain for subscribing to message to node;
Synchronization unit 308 under chain, for synchronizing traffic data under chain to local.
In one embodiment, above-mentioned device further include:
Node synchronization unit 304, for being cached the business datum after cochain to relation data according to node synchronization rules Library and file system.
In one embodiment, as shown in fig. 6, synchronization unit 301 includes: on the chain
Data acquisition subelement 3011, for obtaining the business datum for needing cochain;
Cochain subelement 3012, for needing the business datum of cochain encrypt and cochain;
It knows together and synchronizes subelement 3013, for the business datum after Network Synchronization cochain of being known together by block chain to each section Point is local.
Fig. 7 be another embodiment of the present invention provides a kind of block chain data synchronization unit 300 schematic block diagram.Such as Shown in Fig. 7, the data synchronization unit 300 of the block chain of the present embodiment is to increase on the basis of above-described embodiment to monitor situation and obtain Unit 309 is taken, judging unit 310, updating unit 311 is monitored, periodically retries chain element 313 in unit 312 and result.
Situation acquiring unit 309 is monitored, monitors situation for obtaining message;
Judging unit 310 is monitored, for judging whether message monitoring succeeds;
Updating unit 311, for if so, updating monitored information consumption progress;
Timing retries unit 312, for if it is not, then being consumed in a manner of periodically retrying, to form information consumption implementing result;
As a result upper chain element 313, for encrypt simultaneously cochain to information consumption implementing result.
In addition, the device further include:
Receive message unit, for obtaining the heartbeat message regularly sent from member node;
Situation acquiring unit, for obtaining member node survival and operation conditions according to heartbeat message.
In addition, the device further include:
Monitoring unit 316, for acquire and analyze need cochain business datum and chain under business datum, according to business It configures threshold value and carries out early warning and monitoring.
It should be noted that it is apparent to those skilled in the art that, the data of above-mentioned block chain are synchronous The specific implementation process of device 300 and each unit, can be with reference to the corresponding description in preceding method embodiment, for the side of description Just and succinctly, details are not described herein.
The data synchronization unit 300 of above-mentioned block chain can be implemented as a kind of form of computer program, the computer journey Sequence can be run in computer equipment as shown in Figure 8.
Referring to Fig. 8, Fig. 8 is a kind of schematic block diagram of computer equipment provided by the embodiments of the present application.The computer Equipment 500 is server, wherein server can be independent server, be also possible to the server of multiple server compositions Cluster.
Refering to Fig. 8, which includes processor 502, memory and the net connected by system bus 501 Network interface 505, wherein memory may include non-volatile memory medium 503 and built-in storage 504.
The non-volatile memory medium 503 can storage program area 5031 and computer program 5032.The computer program 5032 include program instruction, which is performed, and processor 502 may make to execute a kind of data side of synchronization of block chain Method.
The processor 502 is for providing calculating and control ability, to support the operation of entire computer equipment 500.
The built-in storage 504 provides environment for the operation of the computer program 5032 in non-volatile memory medium 503, should When computer program 5032 is executed by processor 502, processor 502 may make to execute a kind of method of data synchronization of block chain.
The network interface 505 is used to carry out network communication with other equipment.It will be understood by those skilled in the art that in Fig. 8 The structure shown, only the block diagram of part-structure relevant to application scheme, does not constitute and is applied to application scheme The restriction of computer equipment 500 thereon, specific computer equipment 500 may include more more or fewer than as shown in the figure Component perhaps combines certain components or with different component layouts.
Wherein, the processor 502 is for running computer program 5032 stored in memory, to realize following step It is rapid:
The synchronizing traffic data of cochain will be needed local to each node using common recognition algorithm;
Obtain block height;
Judge whether block height changes;
If so, giving out information to central node;
Timing pulls node from message center and subscribes to message;
It subscribes to message to node to be decrypted, to obtain business datum under chain;
To synchronizing traffic data under chain to local.
In one embodiment, processor 502 is realizing the synchronizing traffic data that cochain will be needed using common recognition algorithm When to each node local step, it is implemented as follows step:
Obtain the business datum for needing cochain;
To needing the business datum of cochain encrypt and cochain;
It is local to each node by the business datum after block chain common recognition Network Synchronization cochain.
In one embodiment, processor 502 gives out information to before central node step described in the realization, also realizes as follows Step:
The business datum after cochain is cached to relational database and file system according to node synchronization rules.
In one embodiment, processor 502 is when realizing that the timing retracts the messages step from central node, specifically Realize following steps:
It is local to node that subscription message periodically is pulled from message center by messaging service Https interface, and adjusts back node Message monitors interface storing data.
In one embodiment, processor 502 is also real after realization is described to synchronizing traffic data under chain to local step Existing following steps:
It obtains message and monitors situation;
Judge whether message monitoring succeeds;
If so, updating monitored information consumption progress;
If it is not, then being consumed in a manner of periodically retrying, to form information consumption implementing result;
Encrypt simultaneously cochain to information consumption implementing result.
In one embodiment, when processor 502 states step in realization, following steps are also realized:
Obtain the heartbeat message regularly sent from member node;
Member node survival and operation conditions are obtained according to heartbeat message.
In one embodiment, when processor 502 states step in realization, following steps are also realized:
Business datum under the business datum for needing cochain and chain is acquired and analyzed, early warning is carried out according to business configuration threshold value And monitoring.
It should be appreciated that in the embodiment of the present application, processor 502 can be central processing unit (Central Processing Unit, CPU), which can also be other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic Device, discrete gate or transistor logic, discrete hardware components etc..Wherein, general processor can be microprocessor or Person's processor is also possible to any conventional processor etc..
Those of ordinary skill in the art will appreciate that be realize above-described embodiment method in all or part of the process, It is that relevant hardware can be instructed to complete by computer program.The computer program includes program instruction, computer journey Sequence can be stored in a storage medium, which is computer readable storage medium.The program instruction is by the department of computer science At least one processor in system executes, to realize the process step of the embodiment of the above method.
Therefore, the present invention also provides a kind of storage mediums.The storage medium can be computer readable storage medium.This is deposited Storage media is stored with computer program, and processor is made to execute following steps when wherein the computer program is executed by processor:
The synchronizing traffic data of cochain will be needed local to each node using common recognition algorithm;
Obtain block height;
Judge whether block height changes;
If so, giving out information to central node;
Timing pulls node from message center and subscribes to message;
It subscribes to message to node to be decrypted, to obtain business datum under chain;
To synchronizing traffic data under chain to local.
In one embodiment, the processor realizes that the use common recognition algorithm need to executing the computer program When wanting the synchronizing traffic data of cochain to each node local step, it is implemented as follows step:
Obtain the business datum for needing cochain;
To needing the business datum of cochain encrypt and cochain;
It is local to each node by the business datum after block chain common recognition Network Synchronization cochain.
In one embodiment, the processor realizes described give out information to centromere executing the computer program Before point step, following steps are also realized:
The business datum after cochain is cached to relational database and file system according to node synchronization rules.
In one embodiment, the processor realizes the timing from message center drawing executing the computer program When node being taken to subscribe to messages step, it is implemented as follows step:
It is local to node that subscription message periodically is pulled from message center by messaging service Https interface, and adjusts back node Message monitors interface storing data.
In one embodiment, the processor is realized described same to business datum under chain in the execution computer program After step to local step, following steps are also realized:
It obtains message and monitors situation;
Judge whether message monitoring succeeds;
If so, updating monitored information consumption progress;
If it is not, then being consumed in a manner of periodically retrying, to form information consumption implementing result;
Encrypt simultaneously cochain to information consumption implementing result.
In one embodiment, the processor is also realized such as when the execution computer program realizes the step Lower step:
Obtain the heartbeat message regularly sent from member node;
Member node survival and operation conditions are obtained according to heartbeat message.
In one embodiment, the processor is also realized such as when the execution computer program realizes the step Lower step:
Business datum under the business datum for needing cochain and chain is acquired and analyzed, early warning is carried out according to business configuration threshold value And monitoring.
The storage medium can be USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), magnetic disk Or the various computer readable storage mediums that can store program code such as CD.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware With the interchangeability of software, each exemplary composition and step are generally described according to function in the above description.This A little functions are implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Specially Industry technical staff can use different methods to achieve the described function each specific application, but this realization is not It is considered as beyond the scope of this invention.
In several embodiments provided by the present invention, it should be understood that disclosed device and method can pass through it Its mode is realized.For example, the apparatus embodiments described above are merely exemplary.For example, the division of each unit, only Only a kind of logical function partition, there may be another division manner in actual implementation.Such as multiple units or components can be tied Another system is closed or is desirably integrated into, or some features can be ignored or not executed.
The steps in the embodiment of the present invention can be sequentially adjusted, merged and deleted according to actual needs.This hair Unit in bright embodiment device can be combined, divided and deleted according to actual needs.In addition, in each implementation of the present invention Each functional unit in example can integrate in one processing unit, is also possible to each unit and physically exists alone, can also be with It is that two or more units are integrated in one unit.
If the integrated unit is realized in the form of SFU software functional unit and when sold or used as an independent product, It can store in one storage medium.Based on this understanding, technical solution of the present invention is substantially in other words to existing skill The all or part of part or the technical solution that art contributes can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, terminal or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in various equivalent modifications or replace It changes, these modifications or substitutions should be covered by the protection scope of the present invention.Therefore, protection scope of the present invention should be with right It is required that protection scope subject to.

Claims (10)

1. the method for data synchronization of block chain characterized by comprising
The synchronizing traffic data of cochain will be needed local to each node using common recognition algorithm;
Obtain block height;
Judge whether block height changes;
If so, giving out information to central node;
Timing pulls node from message center and subscribes to message;
It subscribes to message to node to be decrypted, to obtain business datum under chain;
To synchronizing traffic data under chain to local.
2. the method for data synchronization of block chain according to claim 1, which is characterized in that described to use common recognition algorithm Want the synchronizing traffic data of cochain local to each node, comprising:
Obtain the business datum for needing cochain;
To needing the business datum of cochain encrypt and cochain;
It is local to each node by the business datum after block chain common recognition Network Synchronization cochain.
3. the method for data synchronization of block chain according to claim 2, which is characterized in that described to give out information to centromere Before point, further includes:
The business datum after cochain is cached to relational database and file system according to node synchronization rules.
4. the method for data synchronization of block chain according to claim 1, which is characterized in that the timing is drawn from message center Node is taken to subscribe to message, comprising:
It is local to node that subscription message periodically is pulled from message center by messaging service Https interface, and adjusts back node messages Monitor interface storing data.
5. the method for data synchronization of block chain according to any one of claims 1 to 4, which is characterized in that described under chain After synchronizing traffic data to local, further includes:
It obtains message and monitors situation;
Judge whether message monitoring succeeds;
If so, updating monitored information consumption progress;
If it is not, then being consumed in a manner of periodically retrying, to form information consumption implementing result;
Encrypt simultaneously cochain to information consumption implementing result.
6. the method for data synchronization of block chain according to any one of claims 1 to 4, which is characterized in that the method is also Include:
Obtain the heartbeat message regularly sent from member node;
Member node survival and operation conditions are obtained according to heartbeat message.
7. the method for data synchronization of block chain according to any one of claims 1 to 4, which is characterized in that the method is also Include:
Business datum under the business datum for needing cochain and chain is acquired and analyzed, early warning and prison are carried out according to business configuration threshold value Control.
8. the data synchronization unit of block chain characterized by comprising
Synchronization unit on chain, for the synchronizing traffic data of cochain will be needed local to each node using common recognition algorithm;
Height acquiring unit, for obtaining block height;
Height judging unit, for judging whether block height changes;
Release unit, for if so, giving out information to central node;
Unit is retracted, node is pulled from message center for timing and subscribes to message;
Decryption unit is decrypted, to obtain business datum under chain for subscribing to message to node;
Synchronization unit under chain, for synchronizing traffic data under chain to local.
9. a kind of computer equipment, which is characterized in that the computer equipment includes memory and processor, on the memory It is stored with computer program, the processor is realized as described in any one of claims 1 to 7 when executing the computer program Method.
10. a kind of storage medium, which is characterized in that the storage medium is stored with computer program, the computer program quilt Processor can realize the method as described in any one of claims 1 to 7 when executing.
CN201811472522.6A 2018-12-04 2018-12-04 Data synchronization method and device of block chain, computer equipment and storage medium Active CN109446273B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811472522.6A CN109446273B (en) 2018-12-04 2018-12-04 Data synchronization method and device of block chain, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811472522.6A CN109446273B (en) 2018-12-04 2018-12-04 Data synchronization method and device of block chain, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109446273A true CN109446273A (en) 2019-03-08
CN109446273B CN109446273B (en) 2022-07-22

Family

ID=65554704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811472522.6A Active CN109446273B (en) 2018-12-04 2018-12-04 Data synchronization method and device of block chain, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109446273B (en)

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110162559A (en) * 2019-04-13 2019-08-23 山东公链信息科技有限公司 A kind of block chain processing method called based on general JSON synchronization and asynchronous data api interface
CN110198347A (en) * 2019-05-21 2019-09-03 深圳前海微众银行股份有限公司 A kind of method for early warning and sub-control server based on block chain
CN110309160A (en) * 2019-05-22 2019-10-08 平安科技(深圳)有限公司 Data enter chain transaction methods, device, computer equipment and storage medium
CN110381116A (en) * 2019-06-19 2019-10-25 深圳壹账通智能科技有限公司 Information synchronization system and information synchronization method
CN111159300A (en) * 2019-12-31 2020-05-15 中国银行股份有限公司 Data processing method and device based on block chain
CN111355608A (en) * 2020-02-18 2020-06-30 杭州复杂美科技有限公司 Block chain rollback exception identification method, system, equipment and storage medium
CN111400399A (en) * 2020-03-04 2020-07-10 链农(深圳)信息科技有限公司 Account book synchronization method and device of block chain system and hardware equipment
CN111475575A (en) * 2020-04-09 2020-07-31 腾讯科技(深圳)有限公司 Data synchronization method and device based on block chain and computer readable storage medium
CN111552728A (en) * 2020-04-24 2020-08-18 深圳点链科技有限公司 Data processing method, system, terminal and storage medium of block chain
CN112015815A (en) * 2020-08-27 2020-12-01 中国平安财产保险股份有限公司 Data synchronization method, device and computer readable storage medium
WO2020253394A1 (en) * 2019-06-17 2020-12-24 深圳壹账通智能科技有限公司 Blockchain-based insurance data interaction method, electronic device, and computer device
CN112200681A (en) * 2020-12-04 2021-01-08 腾讯科技(深圳)有限公司 Service processing method, information processing method and node equipment of block chain network
CN113612761A (en) * 2021-07-30 2021-11-05 立信(重庆)数据科技股份有限公司 Block chain-based investigation data chaining method and system
CN113691611A (en) * 2021-08-23 2021-11-23 湖南大学 Block chain distributed high-concurrency transaction processing method, system, equipment and storage medium
CN113760556A (en) * 2020-11-17 2021-12-07 西安京迅递供应链科技有限公司 Message synchronization method and device
CN114938380A (en) * 2022-06-23 2022-08-23 成都质数斯达克科技有限公司 Data sharing system and method suitable for block chain
EP4033374A4 (en) * 2019-09-20 2023-10-11 Jingdong Technology Information Technology Co., Ltd. Method and device for synchronizing node data
US12019652B2 (en) 2019-09-20 2024-06-25 Jingdong Technology Information Technology Co., Ltd. Method and device for synchronizing node data

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101902473A (en) * 2010-07-22 2010-12-01 武汉中地数码科技有限公司 Method for synchronously updating data based on grid GIS (Geographic Information System)
CN106327191A (en) * 2016-08-09 2017-01-11 联动优势科技有限公司 Transaction information recording method and transaction information recording device
CN106776894A (en) * 2016-11-29 2017-05-31 北京众享比特科技有限公司 Log database system and synchronous method
CN107341702A (en) * 2017-03-08 2017-11-10 阿里巴巴集团控股有限公司 A kind of method and device of business processing
CN107609010A (en) * 2017-07-27 2018-01-19 北京瑞卓喜投科技发展有限公司 Information processing method and device based on block chain technology
CN107657059A (en) * 2017-10-20 2018-02-02 中国银行股份有限公司 Method of data synchronization, middleware and system based on block chain application system
CN107918666A (en) * 2017-11-24 2018-04-17 中钞信用卡产业发展有限公司杭州区块链技术研究院 Method of data synchronization and system on a kind of block chain
CN108429759A (en) * 2018-03-28 2018-08-21 电子科技大学成都研究院 Decentralization stores safety implementation method
CN108694669A (en) * 2018-07-18 2018-10-23 矩阵元技术(深圳)有限公司 A kind of block chain intelligence contract implementation method and device
CN108848119A (en) * 2018-04-03 2018-11-20 阿里巴巴集团控股有限公司 The exchange method and device, system, electronic equipment of transregional piece of chain

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101902473A (en) * 2010-07-22 2010-12-01 武汉中地数码科技有限公司 Method for synchronously updating data based on grid GIS (Geographic Information System)
CN106327191A (en) * 2016-08-09 2017-01-11 联动优势科技有限公司 Transaction information recording method and transaction information recording device
CN106776894A (en) * 2016-11-29 2017-05-31 北京众享比特科技有限公司 Log database system and synchronous method
CN107341702A (en) * 2017-03-08 2017-11-10 阿里巴巴集团控股有限公司 A kind of method and device of business processing
CN107609010A (en) * 2017-07-27 2018-01-19 北京瑞卓喜投科技发展有限公司 Information processing method and device based on block chain technology
CN107657059A (en) * 2017-10-20 2018-02-02 中国银行股份有限公司 Method of data synchronization, middleware and system based on block chain application system
CN107918666A (en) * 2017-11-24 2018-04-17 中钞信用卡产业发展有限公司杭州区块链技术研究院 Method of data synchronization and system on a kind of block chain
CN108429759A (en) * 2018-03-28 2018-08-21 电子科技大学成都研究院 Decentralization stores safety implementation method
CN108848119A (en) * 2018-04-03 2018-11-20 阿里巴巴集团控股有限公司 The exchange method and device, system, electronic equipment of transregional piece of chain
CN108694669A (en) * 2018-07-18 2018-10-23 矩阵元技术(深圳)有限公司 A kind of block chain intelligence contract implementation method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
MAYSSA JEMEL 等: "Decentralized Access Control Mechanism with Temporal Dimension Based on Blockchain", 《2017 IEEE 14TH INTERNATIONAL CONFERENCE ON E-BUSINESS ENGINEERING (ICEBE)》 *
庹小忠: "基于区块链的加密信息备份系统研究与设计", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110162559B (en) * 2019-04-13 2020-07-10 山东公链信息科技有限公司 Block chain processing method based on universal JSON synchronous and asynchronous data API (application program interface) interface call
CN110162559A (en) * 2019-04-13 2019-08-23 山东公链信息科技有限公司 A kind of block chain processing method called based on general JSON synchronization and asynchronous data api interface
CN110198347A (en) * 2019-05-21 2019-09-03 深圳前海微众银行股份有限公司 A kind of method for early warning and sub-control server based on block chain
CN110309160A (en) * 2019-05-22 2019-10-08 平安科技(深圳)有限公司 Data enter chain transaction methods, device, computer equipment and storage medium
WO2020253394A1 (en) * 2019-06-17 2020-12-24 深圳壹账通智能科技有限公司 Blockchain-based insurance data interaction method, electronic device, and computer device
CN110381116A (en) * 2019-06-19 2019-10-25 深圳壹账通智能科技有限公司 Information synchronization system and information synchronization method
EP4033374A4 (en) * 2019-09-20 2023-10-11 Jingdong Technology Information Technology Co., Ltd. Method and device for synchronizing node data
US12019652B2 (en) 2019-09-20 2024-06-25 Jingdong Technology Information Technology Co., Ltd. Method and device for synchronizing node data
CN111159300A (en) * 2019-12-31 2020-05-15 中国银行股份有限公司 Data processing method and device based on block chain
CN111355608A (en) * 2020-02-18 2020-06-30 杭州复杂美科技有限公司 Block chain rollback exception identification method, system, equipment and storage medium
CN111400399A (en) * 2020-03-04 2020-07-10 链农(深圳)信息科技有限公司 Account book synchronization method and device of block chain system and hardware equipment
CN111400399B (en) * 2020-03-04 2023-11-14 链农(深圳)信息科技有限公司 Ledger synchronization method, device and hardware equipment of blockchain system
CN111475575A (en) * 2020-04-09 2020-07-31 腾讯科技(深圳)有限公司 Data synchronization method and device based on block chain and computer readable storage medium
US11899689B2 (en) 2020-04-09 2024-02-13 Tencent Technology (Shenzhen) Company Limited Blockchain-based data synchronization method, apparatus, and computer-readable storage medium
CN111552728A (en) * 2020-04-24 2020-08-18 深圳点链科技有限公司 Data processing method, system, terminal and storage medium of block chain
CN112015815A (en) * 2020-08-27 2020-12-01 中国平安财产保险股份有限公司 Data synchronization method, device and computer readable storage medium
CN112015815B (en) * 2020-08-27 2024-02-02 中国平安财产保险股份有限公司 Data synchronization method, device and computer readable storage medium
CN113760556A (en) * 2020-11-17 2021-12-07 西安京迅递供应链科技有限公司 Message synchronization method and device
CN112200681A (en) * 2020-12-04 2021-01-08 腾讯科技(深圳)有限公司 Service processing method, information processing method and node equipment of block chain network
CN113612761A (en) * 2021-07-30 2021-11-05 立信(重庆)数据科技股份有限公司 Block chain-based investigation data chaining method and system
CN113691611A (en) * 2021-08-23 2021-11-23 湖南大学 Block chain distributed high-concurrency transaction processing method, system, equipment and storage medium
CN114938380A (en) * 2022-06-23 2022-08-23 成都质数斯达克科技有限公司 Data sharing system and method suitable for block chain
CN114938380B (en) * 2022-06-23 2023-08-22 成都质数斯达克科技有限公司 Data sharing system and method suitable for block chain

Also Published As

Publication number Publication date
CN109446273B (en) 2022-07-22

Similar Documents

Publication Publication Date Title
CN109446273A (en) Method of data synchronization, device, computer equipment and the storage medium of block chain
CN105074698B (en) It is performed in parallel continuous events processing (CEP) inquiry
CN106375404B (en) Data storage control method, date storage method, data capture method and device
CN110209726A (en) Distributed experiment & measurement system system, method of data synchronization and storage medium
CN109542865A (en) Distributed cluster system configuration file synchronous method, device, system and medium
BR112015018368B1 (en) METHOD, SYSTEM AND COMPUTER-READABLE MEDIUM FOR SYNCHRONIZING DATA
CN105229591A (en) Overall situation polymerization NameSpace is created in order to storage administration
WO2015169067A1 (en) Method, device, and system for peer-to-peer data replication and method, device, and system for master node switching
CN108989430A (en) Load-balancing method, device and storage medium
CN109299122A (en) A kind of method of data synchronization, equipment and computer can storage mediums
CN104301990B (en) A kind of method and device of data syn-chronization
CN109857738A (en) Date storage method, device, computer equipment and storage medium
CN110311963A (en) Information push method, device, computer equipment and computer readable storage medium
CN104507067B (en) A kind of method and mobility management entity of determining registration area
CN103399890B (en) At the method and apparatus that input method client collects words
CN109164985A (en) For the method for replicate data, main equipment and from equipment
CN109905436A (en) Determination method, apparatus and storage medium of the root because of event
CN105491234B (en) A kind of method and intelligent terminal of intelligent terminal interactive
CN108063782A (en) Node is delayed machine adapting method and device, node group system
CN106210038B (en) The processing method and system of data operation request
CN104580512B (en) Data processing method and device and distributed file system
CN106375455B (en) A kind of data transmission method and device
CN106354585B (en) The dispositions method and device of the more data fragmentation backups of data-base cluster
CN111954869A (en) User interface optimization for delay data
WO2020078477A1 (en) Data synchronisation method and apparatus, and computer readable storage medium

Legal Events

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