CN107194008B - A kind of distributed system quickly updates verification method - Google Patents
A kind of distributed system quickly updates verification method Download PDFInfo
- Publication number
- CN107194008B CN107194008B CN201710468883.2A CN201710468883A CN107194008B CN 107194008 B CN107194008 B CN 107194008B CN 201710468883 A CN201710468883 A CN 201710468883A CN 107194008 B CN107194008 B CN 107194008B
- Authority
- CN
- China
- Prior art keywords
- transaction
- node
- updates
- verifying
- update
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q20/00—Payment architectures, schemes or protocols
- G06Q20/38—Payment protocols; Details thereof
- G06Q20/40—Authorisation, e.g. identification of payer or payee, verification of customer or shop credentials; Review and approval of payers, e.g. check credit lines or negative lists
- G06Q20/401—Transaction verification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2365—Ensuring data consistency and integrity
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2455—Query execution
- G06F16/24552—Database cache management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Business, Economics & Management (AREA)
- Computer Security & Cryptography (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- General Business, Economics & Management (AREA)
- Strategic Management (AREA)
- Computational Linguistics (AREA)
- Computing Systems (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention discloses a kind of distributed system and quickly updates verification method, the distributed system includes distributed validation unit, it includes single or multiple service nodes and multiple verifying nodes, each verifying node includes a quick search cache list, it is empty before more New Transaction, includes five metadata after more New Transaction;This method comprises: user, which issues, updates request;Start node receives request packet and carries out local judgement;Fast transaction mode can be carried out by being judged as;It updates transaction request packet and is sent to other verifying nodes;Other verifying nodes return to confirmation and update License Info True;Update local quick search cache list;It returns to user and updates implementing result;Common recognition proving period is waited, common recognition verifying is completed;Write the result into distributed account book.The method of the present invention can quickly improve the response speed that node updates request to user, be rapidly returned to update implementing result, and be able to maintain the data consistency of distributed system and the integrality of distributed common recognition mechanism.
Description
Technical field
The present invention relates to block chain technical fields, and in particular to a kind of distributed system quickly updates verification method.
Background technique
Existing distributed system update mode uses triphasic general transaction mode CTS (common
Transaction system), this kind of mode is using single or multiple service nodes plus several verifying nodes, common recognition verifying
Be divided into three phases: the first stage is to collect transactional stage, and the update request submitted up in service node monitoring system is passed through
It is put into after signature verification in queue to be verified, i.e. collection transactional stage (time 2s);Second stage is that service node will update friendship
Easy request packet is sent to verifying node, verifies transmission update request, i.e. broadcast transactional stage (time 2s) mutually between node;The
Three phases are that verifying node carries out common recognition verifying to the update transaction request packet received, if with local queue (wait know together
Transaction Set) it is conflicting, then it is excluded, that is, reach common understanding stage (time 2s).Such iteration is multiple, until in queue
Request meets the condition of default, and the data for completing common recognition and verifying are ultimately written in distributed account book, i.e., can not change again.
But there are following major defects for the above-mentioned prior art:
1. there is delay in the communication process of request: traveling to other all nodes and deposit to information from some initiation node
In message delay;
2. there are time delays for common recognition process: the update of data must could be written in account book after the completion of common recognition, this
Write-in be it is intermittent, each proving period updates primary, and user's request for data update must be after the update cycle
It can be responded and be returned;
Some existing solutions, as lightning network, bit coin network are accelerated to ask transaction using the method in channel
The processing asked, but the agreement of above scheme is perhaps more complicated or by the way of non-Byzantine failure tolerance, limits it more
It is widely applied.
Summary of the invention
For the problems of the prior art, present invention offer is intended to a kind of distributed system and quickly updates verification method, should
Method can quickly improve the response speed that node updates request to user, be rapidly returned to update implementing result, and be able to maintain distribution
The integrality of the data consistency of formula system and distributed common recognition mechanism.
To realize the above technical purpose, the technical scheme is that
A kind of distributed system quickly updates verification method, and the distributed system includes distributed validation unit, described
Distributed validation unit includes single or multiple service nodes and multiple verifying nodes, and each verifying node includes one
Quick search cache list, the list are empty before more New Transaction, include five metadata after more New Transaction: index address, just
Begin verifying node ID, number of deals, next flush zone block number and random number Nonce;
It the described method comprises the following steps:
Step 1: user, which sends, updates transaction request to the service node;
Step 2: after initial authentication node receives update transaction request packet, the transacting targeted address in packet and transaction are obtained
Whether number checks the number of deals in the quick search cache list of the node: if in the list, returning to
User information cannot use fast transaction mode, and continue to execute using general transaction mode and update operation;If not in the list
In, and primary balance of trading is less than the number of deals, then returning to user information cannot complete to trade;If not in the list
In, and primary balance of trading is more than or equal to number of deals, then uses fast transaction mode, the initial authentication node is by the update
Transaction request packet broadcast is to every other verifying node;
Step 3: it in the fast transaction mode, receives the verifying node for updating transaction request packet and checks institute
Number of deals is stated whether in the quick search cache list of the node: if in the list, returning to update refusal letter
It ceases to the initial authentication node;If in the list, not returning to confirmation updates License Info to the initial authentication node,
It executes and updates operation, while locally the quick search cache list, record update implementing result, save as institute the node updates
Five metadata are stated, reaching common understanding the stage for the general transaction mode is waited;
Step 4: the initial authentication node counts all returns letter received in the time of return in step 3
Breath: if any one verifying node return updates refusal information, the initial authentication node returns to Fail Transaction information to use
Family;If all return informations are that confirmation updates License Info, and the return rate of the information is greater than 50%, the initial authentication section
Point returns to transaction successful information to user;
Step 5: in step 2 and step 3, all participations general transaction mode and the fast transaction mode
Verifying node reach common understanding in the stage of reaching common understanding of the general transaction mode, complete verifying, which writes
Enter in distributed account book;Content in all quick search cache lists is removed.
Specifically, the update transaction request packet includes: transacting targeted address, number of deals, next flush zone block number.
Preferably, the update transaction request packet is equipped with TTL, the verifying section for updating transaction request packet is received
Point is every to broadcast the primary update transaction request packet, and the TTL subtracts 1, until being kept to 0, prevents no limitation forwarding, the TTL is initial
Value is set as a certain particular value.
Specifically, multiple more New Transactions of the same index address and the random number Nonce are asked
Packet is sought, is only contracted for fixed output quotas raw return information to first update transaction request.
Specifically, the mechanism that the common recognition uses includes but is not limited to: BFT, POW or POS.
Compared with existing three simple stage general transaction modes, the present invention has following advantages:
1, using distributed data buffer storage mechanism, each distributed validation node sets a quick search caching, this is fast
Five metadata are saved in fast query caching, can be shown that whether be in state to be updated within the current authentication period, in this way, testing
Card node can quickly judge that some updates whether request cracking can be responded, and update to quickly improve node to data
The response speed (being less than 1s) of request, by the mechanism, user can be rapidly in the transaction request that the current authentication period submits
It is responded and (updates or refuse), especially in the case where execution correlation is smaller, user can obtain transaction knot quickly
Fruit, and verify node and be responsible for final transaction being written in distributed account book, which is improving the same of transaction response speed
When also reduce network traffic, can support network concurrent trading volume simultaneously;
2, using delay time verification mechanism, the update implementing result of fast transaction model F TS is stored in quick search caching,
After fast transaction return information, when entering proving period, the transaction results of the update implementing result and general transaction mode CTS
Common recognition is completed together to verify and distributed account book is written, maintains the data consistency of distributed system, is maintained distributed total
The integrality of knowledge mechanism.
Detailed description of the invention
Fig. 1 is existing general transaction mode (CTS) operation principle schematic diagram.
Fig. 2 is fast transaction of embodiment of the present invention mode (FTS) operation principle schematic diagram.
Appended drawing reference: 1, transaction request packet is updated;2, initial authentication node;3, distributed account book;4, quick search caches
List.
Specific embodiment
With reference to the accompanying drawing, the specific embodiment that the present invention will be described in detail, but claim of the invention is not done
Any restriction.
As shown in Figure 1 it is existing general transaction mode (CTS) operation principle schematic diagram, including following three stage: collects
Transactional stage broadcasts transactional stage and reaches common understanding the stage.It is illustrated in figure 2 the fast transaction mode of the present embodiment use
(FTS:fast transaction system).
Distributed system in the present embodiment includes distributed validation unit, and distributed validation unit includes single or multiple
Service node and multiple verifying nodes, each verifying node save a quick search cache list 4, which is updating friendship
It is sky before easily, includes after more New Transaction five metadata (W, O, A, L, Nonce):
W: index address
O: initial authentication node ID
A: number of deals
L: next flush zone block number
Nonce: random number
Present implementation workflow is as follows:
Step 1: user, which sends, updates transaction request to service node;
Step 2: initial authentication node 2 collect update transaction request packet 1 (include transacting targeted address, number of deals, under
Secondary flush zone block number), check the number of deals whether in the quick search cache list 4 of the node: if in the list,
Returning to user information cannot be continued to be executed using general transaction mode CTS and be updated operation using fast transaction model F TS;
If not in the list, and transaction primary balance is less than number of deals A, then returning to user information cannot complete to trade;If not
In the list, when and transaction primary balance is more than or equal to number of deals A, then fast transaction model F TS, the initial authentication are used
Node 2 will update the broadcast of transaction request packet 1 to every other verifying node;
Step 3: in fast transaction model F TS, the verifying node inspection number of deals A for updating transaction request packet 1 is received
Whether in the quick search cache list 4 of the node: if in the list, returning to update refusal information (False) to first
Begin verifying node 2;If in the list, not returning to confirmation updates License Info (True) to initial authentication node 2, execute more
New operation, while the node updates local quick search cache list 4, record update implementing result, save as five metadata, etc.
To reaching common understanding the stage for general transaction mode CTS, update refusal letter is then returned if any the subsequent modification request to index address W
It ceases (False);For multiple update transaction request packets 1 of the same index address W and random number Nonce, only to first
Request packet generates return information.Preferably, it updates transaction request packet 1 and is equipped with TTL, the node for receiving request packet also will continue to extensively
It broadcasts, TTL of every forwarding subtracts 1, and TTL is no longer broadcasted when being 0, and the initial value of TTL is set as some particular value.
Step 4: initial authentication node 2 counts the return information received in the time of return in step 3, carries out zero
Tolerance processing: if any one verifying node, which returns, updates refusal information (False), initial authentication node 2 returns to transaction and loses
Information is lost to user;If all return informations are that confirmation updates License Info (True), and the return rate of the information is greater than
50% (the verifying node i.e. greater than 50% returns to True, and returns without False), the return of initial authentication node 2 is traded successfully
Information is to user;
Step 5: all to participate in general transaction mode CTS's and fast transaction model F TS in step 2 and step 3
Verifying node is reached common understanding in the stage of reaching common understanding of general transaction mode CTS, and completes verifying, transaction implementing result write-in point
In cloth account book 3;The content in all quick search cache lists 4 is removed simultaneously.
By the above method, the transaction request that user submits can be responded quickly, especially execute first inertia ratio
In lesser situation, user can obtain transaction results quickly, and verify node and be responsible for final transaction being written distributed account
In this, network traffic is also reduced while improving transaction response speed, can support network concurrent trading volume simultaneously.
It is understood that being merely to illustrate the present invention above with respect to specific descriptions of the invention and being not limited to this
Technical solution described in inventive embodiments.Those skilled in the art should understand that still can be carried out to the present invention
Modification or equivalent replacement, to reach identical technical effect;As long as meet use needs, all protection scope of the present invention it
It is interior.
Claims (5)
1. a kind of distributed system quickly updates verification method, it is characterised in that: the distributed system includes distributed validation
Unit, the distributed validation unit include single or multiple service nodes and multiple verifying nodes, each verifying section
Point includes a quick search cache list, and it includes five metadata: rope after more New Transaction which, which is empty before more New Transaction,
Draw address, initial authentication node ID, number of deals, next flush zone block number and random number Nonce;
It the described method comprises the following steps:
Step 1: user, which sends, updates transaction request to the service node;
Step 2: initial authentication node, which is collected, updates transaction request packet, obtains the transacting targeted address in packet and number of deals, inspection
The number of deals is looked into whether in the quick search cache list of the node: if in the list, returning to user's letter
Breath cannot use fast transaction mode, and continue to execute using general transaction mode and update operation;If not in the list, and handing over
Easy primary balance is less than the number of deals, then returning to user information cannot complete to trade;If not in the list, and trading
Primary balance is more than or equal to number of deals, then uses fast transaction mode, and the initial authentication node is by the update transaction request
Packet broadcast is to every other verifying node;
Step 3: it in the fast transaction mode, receives the verifying node for updating transaction request packet and checks the friendship
Whether easy number is in the quick search cache list of the node: if in the list, returning to update refusal information extremely
The initial authentication node;If in the list, not returning to confirmation updates License Info to the initial authentication node, execute
Operation is updated, while locally the quick search cache list, record update implementing result, save as described five the node updates
Metadata waits reaching common understanding the stage for the general transaction mode;
Step 4: the initial authentication node counts all return informations received in the time of return in step 3: if
Any one verifying node, which returns, updates refusal information, then the initial authentication node returns to Fail Transaction information to user;If
All return informations are that confirmation updates License Info, and the return rate of the information is greater than 50%, and the initial authentication node returns
Easy successful information is returned to user;
Step 5: all to participate in testing for the general transaction mode and the fast transaction mode in step 2 and step 3
Card node is reached common understanding in the stage of reaching common understanding of the general transaction mode, completes verifying, transaction implementing result write-in point
In cloth account book;Content in all quick search cache lists is removed.
2. distributed system according to claim 1 quickly updates verification method, it is characterised in that: the more New Transaction is asked
The packet is asked to include: transacting targeted address, number of deals, next flush zone block number.
3. distributed system according to claim 1 quickly updates verification method, it is characterised in that: the more New Transaction is asked
It asks packet to be equipped with TTL, receives the primary update transaction request packet of the every broadcast of the verifying node for updating transaction request packet, institute
It states TTL and subtracts 1, until being kept to 0.
4. distributed system according to claim 1 quickly updates verification method, it is characterised in that: for same described
Multiple update transaction request packets of index address and the random number Nonce, only ask more New Transaction described in first
Seek raw return information of contracting for fixed output quotas.
5. distributed system according to claim 1 quickly updates verification method, it is characterised in that: what the common recognition used
Mechanism includes but is not limited to: BFT, POW or POS.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710468883.2A CN107194008B (en) | 2017-06-19 | 2017-06-19 | A kind of distributed system quickly updates verification method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710468883.2A CN107194008B (en) | 2017-06-19 | 2017-06-19 | A kind of distributed system quickly updates verification method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107194008A CN107194008A (en) | 2017-09-22 |
CN107194008B true CN107194008B (en) | 2019-07-16 |
Family
ID=59879124
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710468883.2A Active CN107194008B (en) | 2017-06-19 | 2017-06-19 | A kind of distributed system quickly updates verification method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107194008B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108537525B (en) | 2018-03-09 | 2020-06-09 | 阿里巴巴集团控股有限公司 | Consensus verification method, device and equipment |
CN110321730A (en) * | 2019-03-28 | 2019-10-11 | 平安科技(深圳)有限公司 | A kind of method, block chain node and the storage medium of operation data processing |
CN110473103B (en) * | 2019-08-16 | 2022-07-29 | 中国工商银行股份有限公司 | Application management method, device, computer system and medium |
CN111669327A (en) * | 2020-06-16 | 2020-09-15 | 珠海麦宁科技有限公司 | Service providing system, method, storage medium and service node |
CN113726510A (en) * | 2021-08-30 | 2021-11-30 | 无锡井通网络科技有限公司 | Offline transaction method based on block chain |
CN114066476A (en) * | 2021-11-30 | 2022-02-18 | 武汉众邦银行股份有限公司 | Method, device and storage medium for solving issue-first issue of distributed application transaction |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105488665A (en) * | 2015-11-25 | 2016-04-13 | 布比(北京)网络技术有限公司 | Decentralized transaction method |
CN106060036A (en) * | 2016-05-26 | 2016-10-26 | 布比(北京)网络技术有限公司 | Decentralized consenting method and apparatus |
CN106453636A (en) * | 2016-11-22 | 2017-02-22 | 深圳银链科技有限公司 | Credible block generation method and system |
CN106487801A (en) * | 2016-11-03 | 2017-03-08 | 江苏通付盾科技有限公司 | Information Authentication method and device based on block chain |
-
2017
- 2017-06-19 CN CN201710468883.2A patent/CN107194008B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105488665A (en) * | 2015-11-25 | 2016-04-13 | 布比(北京)网络技术有限公司 | Decentralized transaction method |
CN106060036A (en) * | 2016-05-26 | 2016-10-26 | 布比(北京)网络技术有限公司 | Decentralized consenting method and apparatus |
CN106487801A (en) * | 2016-11-03 | 2017-03-08 | 江苏通付盾科技有限公司 | Information Authentication method and device based on block chain |
CN106453636A (en) * | 2016-11-22 | 2017-02-22 | 深圳银链科技有限公司 | Credible block generation method and system |
Also Published As
Publication number | Publication date |
---|---|
CN107194008A (en) | 2017-09-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107194008B (en) | A kind of distributed system quickly updates verification method | |
CN108269090B (en) | Consensus method and device for block chain system based on non-negotiation random drawing | |
CN105653440B (en) | A kind of gray scale dissemination method and device | |
CN108492103B (en) | Joint block chain consensus method | |
CN109214818B (en) | Cross-chain transaction method and device | |
JP2019537798A (en) | Electronic bill management method and apparatus, and storage medium | |
CN113347164B (en) | Block chain-based distributed consensus system, method, device and storage medium | |
CN109242500A (en) | Block chain transaction validation verification method, apparatus and storage medium | |
JP2022532047A (en) | Transaction security on a distributed ledger-based MaaS platform | |
CN110113381A (en) | The method and device of theme is subscribed in a kind of block chain | |
Yuan et al. | Efficient Byzantine consensus mechanism based on reputation in IoT blockchain | |
CN109064167A (en) | Data processing method and device based on block chain | |
CN108710681A (en) | File acquisition method, device, equipment and storage medium | |
CN111614707A (en) | Transaction system and transaction method based on block chain | |
CN111967061A (en) | Credible account transfer transaction method and device based on block chain | |
CN109166040A (en) | Transaction auditing method, device, equipment and storage medium based on block chain | |
CN110610421A (en) | Guarantee fund management method and device under fragment framework | |
Shi et al. | HySync: Hybrid federated learning with effective synchronization | |
CN110503297B (en) | Service scene acquisition method and device, electronic equipment and medium | |
CN112184454B (en) | Block chain consensus method, device, system and storage medium | |
CN113486118B (en) | Consensus node selection method and device | |
CN110460471A (en) | A kind of super node polling method, device and storage medium | |
CN115829731A (en) | Transaction information processing method and device | |
KR20200031857A (en) | A method of operating Advertising services system based on Blockchain and a system for implementing the service environment | |
JPWO2020222125A5 (en) |
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 |