CN111432028A - Service processing method and device based on block chain - Google Patents

Service processing method and device based on block chain Download PDF

Info

Publication number
CN111432028A
CN111432028A CN202010294687.XA CN202010294687A CN111432028A CN 111432028 A CN111432028 A CN 111432028A CN 202010294687 A CN202010294687 A CN 202010294687A CN 111432028 A CN111432028 A CN 111432028A
Authority
CN
China
Prior art keywords
module
algorithm
block
block chain
consensus mechanism
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.)
Withdrawn
Application number
CN202010294687.XA
Other languages
Chinese (zh)
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.)
Guangdong Hongxin Venture Service Co ltd
Original Assignee
Guangdong Hongxin Venture 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 Guangdong Hongxin Venture Service Co ltd filed Critical Guangdong Hongxin Venture Service Co ltd
Priority to CN202010294687.XA priority Critical patent/CN111432028A/en
Publication of CN111432028A publication Critical patent/CN111432028A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • 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
    • GPHYSICS
    • G08SIGNALLING
    • G08CTRANSMISSION SYSTEMS FOR MEASURED VALUES, CONTROL OR SIMILAR SIGNALS
    • G08C17/00Arrangements for transmitting signals characterised by the use of a wireless electrical link
    • G08C17/02Arrangements for transmitting signals characterised by the use of a wireless electrical link using a radio link
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • 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

Abstract

The invention relates to the field of block chains, and discloses a service processing method and a device based on a block chain, wherein the method comprises the following steps: A) a main node in a block chain network acquires service data sent by a user side through a wireless communication module and generates a block; B) the main node broadcasts the blocks to all accounting nodes in the block chain network; C) the main node judges whether a set number of accounting nodes can provide verification services, if yes, step E) is executed; otherwise, executing step D); D) if the fault-tolerant threshold of the current consensus mechanism is reached, stopping executing the consensus mechanism, and writing the block into a block chain after the block is encrypted by an encryption algorithm; E) and C), if the fault tolerance threshold of the current consensus mechanism is not reached, executing the consensus mechanism and returning to the step C). The block chain-based service processing method and the block chain-based service processing device have the following beneficial effects that: the system can be prevented from being crashed when the block chain network reaches the fault-tolerant upper limit, and the normal processing of the user service is ensured.

Description

Service processing method and device based on block chain
Technical Field
The present invention relates to the field of blockchains, and in particular, to a service processing method and apparatus based on blockchains.
Background
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. The block chain is an important concept of the bitcoin, is essentially a decentralized database, and is used as a bottom-layer technology of the bitcoin, namely a series of data blocks which are generated by correlation by using a cryptographic method, wherein each data block contains information of a batch of bitcoin network transactions for verifying the validity (anti-counterfeiting) of the information and generating a next block. The consensus mechanism is used as a core technology of the block chain, and means that the verification and confirmation of the transaction are completed in a short time through the voting of special nodes in the block chain network; if several nodes with irrelevant interests can achieve consensus on a transaction, the whole network can be considered to achieve consensus on the node. In some existing blockchain platforms, when a blockchain network reaches an upper fault tolerance limit, a system is crashed, and the user service cannot be processed continuously.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a service processing method and device based on a blockchain, which can avoid system crash when a blockchain network reaches an upper limit of fault tolerance and ensure normal processing of user services, aiming at the above-mentioned defects in the prior art.
The technical scheme adopted by the invention for solving the technical problems is as follows: a service processing method based on a block chain is constructed, which comprises the following steps:
A) a main node in a block chain network acquires service data sent by a user side through a wireless communication module and generates a block;
B) the master node broadcasts the block to all accounting nodes in the blockchain network;
C) the main node judges whether a set number of accounting nodes can provide verification services or not, if yes, step E) is executed; otherwise, executing step D);
D) if the fault-tolerant threshold of the current consensus mechanism is reached, stopping executing the consensus mechanism, and writing the block into a block chain after the block is encrypted by an encryption algorithm;
E) and C), if the fault tolerance threshold of the current consensus mechanism is not reached, executing the consensus mechanism and returning to the step C).
In the service processing method based on the block chain, the wireless communication module is any one or a combination of any more of a 5G communication module, a 4G communication module, a Bluetooth module, a WiFi module, a GSM module, a CDMA2000 module, a WCDMA module, a TD-SCDMA module, a Zigbee module and an L oRa module.
In the block chain-based service processing method of the present invention, the encryption algorithm is DES algorithm, 3DES algorithm, RC2 algorithm, RC4 algorithm, IDEA algorithm, RSA algorithm, DSA algorithm, AES algorithm, B L OWFISH algorithm, MD5 algorithm, or PKCS algorithm.
In the service processing method based on the blockchain, the set number is 4/5 of the total number of nodes in the blockchain network.
The invention also relates to a device for realizing the block chain-based service processing method, which comprises the following steps:
a block generation module: the method is used for acquiring service data sent by a user side through a wireless communication module by a main node in a block chain network and generating a block; the user side is a mobile phone or a tablet computer;
a broadcasting module: for the master node to broadcast the block to all accounting nodes in the blockchain network;
a judging module: the main node is used for judging whether a set number of accounting nodes can provide verification service;
a fault tolerance threshold determination module: the device is used for determining that the fault-tolerant threshold of the current consensus mechanism is reached, terminating execution of the consensus mechanism, and writing the block into a block chain after the block is encrypted by an encryption algorithm;
a consensus mechanism execution module: and executing the consensus mechanism if the fault tolerance threshold of the current consensus mechanism is not reached.
In the device of the invention, the wireless communication module is any one or combination of any several of a 5G communication module, a 4G communication module, a Bluetooth module, a WiFi module, a GSM module, a CDMA2000 module, a WCDMA module, a TD-SCDMA module, a Zigbee module and an L oRa module.
In the device of the present invention, the encryption algorithm is DES algorithm, 3DES algorithm, RC2 algorithm, RC4 algorithm, IDEA algorithm, RSA algorithm, DSA algorithm, AES algorithm, B L OWFISH algorithm, MD5 algorithm, or PKCS algorithm.
In the apparatus of the present invention, the set number is 4/5 of the total number of nodes in the blockchain network.
The block chain-based service processing method and the block chain-based service processing device have the following beneficial effects that: when the fault-tolerant threshold of the current consensus mechanism is reached, the execution of the consensus mechanism is stopped, and the block is encrypted by an encryption algorithm and then written into a block chain; when the fault-tolerant threshold of the current consensus mechanism is not reached, the consensus mechanism can be continuously executed, so that system breakdown can be avoided when the block chain network reaches the fault-tolerant upper limit, and normal processing of user services is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart of a method in an embodiment of a method and apparatus for processing service based on a block chain according to the present invention;
fig. 2 is a schematic structural diagram of the device in the embodiment.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the embodiment of the service processing method and device based on the blockchain, a flowchart of the service processing method based on the blockchain is shown in fig. 1. In fig. 1, the service processing method based on the block chain includes the following steps:
step S01, the master node in the blockchain network acquires the service data sent by the user end through the wireless communication module and generates a block: the blockchain network comprises a plurality of nodes, and a plurality of clients can perform business interaction with the blockchain. The blockchain network may be a federation chain or a private chain, and is capable of providing business services to users. The node may be a server, a computer, a mobile terminal, or the like having a calculation processing function. In this step, the master node in the block chain network acquires the service data sent by the user side through the wireless communication module and generates a block.
In this step, the master node in the blockchain network node receives transaction request data sent by the user side through the wireless communication module, and packages the transactions into new blocks according to a preset sequence under the condition that the transactions corresponding to the transaction request data are verified to be valid, wherein the preset sequence represents the time sequence of the transactions. The user side can be a mobile phone or a tablet computer and the like.
The wireless communication module is any one or combination of any several of a 5G communication module, a 4G communication module, a Bluetooth module, a WiFi module, a GSM module, a CDMA2000 module, a WCDMA module, a TD-SCDMA module, a Zigbee module and an L oRa module, and by setting multiple wireless communication modes, the flexibility of the wireless communication modes can be improved, and the requirements of different users and different occasions can be met.
Each blockchain network node broadcasts a transaction request sent by a user terminal to the whole network, the main node firstly verifies a plurality of transactions needing to be placed in a new block collected from the blockchain network, and after the verification is passed, the transactions are sequenced according to a preset sequence and then packaged into the new block. The master node may be randomly chosen from the blockchain network nodes.
Step S02 the master node broadcasts the tile to all accounting nodes in the blockchain network: in this step, the broadcast makes the block chain network nodes participating in the consensus perform consensus on the blocks, and a consensus mechanism is adopted to send the result of whether the block chain network nodes participating in the accounting perform the block signature confirmation to all the block chain network nodes in the stage of confirmation of the consensus. After each block chain network node participating in consensus receives the blocks, the transactions are executed according to a plurality of transaction simulation models after the transactions are sequenced in the blocks, and after all transactions are executed, the hash value of a new block is calculated based on transaction results and is broadcasted to the whole network. I.e. the master node broadcasts the blocks to all accounting nodes in the blockchain network.
Step S03, the master node determines whether there are a set number of accounting nodes that can provide the verification service: in this step, the master node determines whether a set number of accounting nodes can provide the verification service, and if the determination result is yes, step S05 is executed; otherwise, step S04 is executed. The set number is 4/5 which is the total number of nodes in the blockchain network. Assuming that there are only 5 nodes in the blockchain network, dynamic fault tolerance cannot be achieved when there are only 5 summary points, so that one necessary submission of the fault tolerance upper limit is at least the number of nodes capable of providing service in the blockchain network. When the number of available nodes is less than 6, it can be determined that the fault tolerance threshold is reached, and actually, the system is in a crash state at this time, and cannot continue to process the service of the user side.
Step S04, determining that the fault-tolerant threshold of the current consensus mechanism is reached, terminating execution of the consensus mechanism, writing the block into a block chain after being encrypted by an encryption algorithm, and if the judgment result of the step S03 is negative, executing the step.
If the step S05 does not reach the fault tolerance threshold of the current consensus mechanism, the consensus mechanism is executed: if the judgment result of the above step S03 is yes, the present step is executed. In this step, if the fault tolerance threshold of the current consensus mechanism is not reached, the consensus mechanism is executed. The service processing method based on the block chain can avoid system crash when the block chain network reaches the fault-tolerant upper limit, and ensure the normal processing of user services.
The embodiment also relates to a device for implementing the service processing method based on the block chain, and a schematic structural diagram of the device is shown in fig. 2. In fig. 2, the apparatus includes a block generating module 1, a broadcasting module 2, a judging module 3, a fault tolerance threshold determining module 4 and a consensus mechanism executing module 5; the block generation module 1 is used for acquiring service data sent by a user terminal through a wireless communication module by a main node in a block chain network and generating a block; the user side is a mobile phone or a tablet computer; the blockchain network comprises a plurality of nodes, and a plurality of clients can perform business interaction with the blockchain. The blockchain network may be a federation chain or a private chain, and is capable of providing business services to users. The node may be a server, a computer, a mobile terminal, or the like having a calculation processing function. And the main node in the block chain network node receives transaction request data sent by the user side through the wireless communication module, and packages the transactions into a new block according to a preset sequence under the condition that the transactions corresponding to the transaction request data are verified to be valid, wherein the preset sequence represents the time sequence of the transactions. The user side can be a mobile phone or a tablet computer and the like.
The wireless communication module is any one or combination of any several of a 5G communication module, a 4G communication module, a Bluetooth module, a WiFi module, a GSM module, a CDMA2000 module, a WCDMA module, a TD-SCDMA module, a Zigbee module and an L oRa module, and by setting multiple wireless communication modes, the flexibility of the wireless communication modes can be improved, and the requirements of different users and different occasions can be met.
Each blockchain network node broadcasts a transaction request sent by a user terminal to the whole network, the main node firstly verifies a plurality of transactions needing to be placed in a new block collected from the blockchain network, and after the verification is passed, the transactions are sequenced according to a preset sequence and then packaged into the new block. The master node may be randomly chosen from the blockchain network nodes.
The broadcast module 2 is used for the main node to broadcast the block to all the accounting nodes in the block chain network; and broadcasting so that the block chain network nodes participating in the consensus know the blocks, and sending a result of whether the block chain network nodes participating in the accounting confirm the block signatures to all the block chain network nodes in a confirmation stage of the consensus by adopting a consensus mechanism. After each block chain network node participating in consensus receives the blocks, the transactions are executed according to a plurality of transaction simulation models after the transactions are sequenced in the blocks, and after all transactions are executed, the hash value of a new block is calculated based on transaction results and is broadcasted to the whole network. I.e. the master node broadcasts the blocks to all accounting nodes in the blockchain network.
The judging module 3 is used for the main node to judge whether the accounting nodes with the set number can provide the verification service; assuming that there are only 5 nodes in the blockchain network, dynamic fault tolerance cannot be achieved when there are only 5 summary points, so that one necessary submission of the fault tolerance upper limit is at least the number of nodes capable of providing service in the blockchain network. When the number of available nodes is less than 6, it can be determined that the fault tolerance threshold is reached, and actually, the system is in a crash state at this time, and cannot continue to process the service of the user side.
The fault-tolerant threshold determination module 4 is used for determining that a fault-tolerant threshold of the current consensus mechanism is reached, terminating execution of the consensus mechanism, and writing the block into a block chain after encryption by an encryption algorithm, thereby avoiding a situation that a system crashes and cannot process a user's request when a block chain network reaches a fault-tolerant upper limit.
In summary, in this embodiment, since the execution of the consensus mechanism is terminated when the fault-tolerant threshold of the current consensus mechanism is reached, the block is encrypted by the encryption algorithm and then written into the block chain; when the fault-tolerant threshold of the current consensus mechanism is not reached, the consensus mechanism can be continuously executed, so that system breakdown can be avoided when the block chain network reaches the fault-tolerant upper limit, and normal processing of user services is ensured.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (8)

1. A service processing method based on block chain is characterized by comprising the following steps:
A) a main node in a block chain network acquires service data sent by a user side through a wireless communication module and generates a block;
B) the master node broadcasts the block to all accounting nodes in the blockchain network;
C) the main node judges whether a set number of accounting nodes can provide verification services or not, if yes, step E) is executed; otherwise, executing step D);
D) if the fault-tolerant threshold of the current consensus mechanism is reached, stopping executing the consensus mechanism, and writing the block into a block chain after the block is encrypted by an encryption algorithm;
E) and C), if the fault tolerance threshold of the current consensus mechanism is not reached, executing the consensus mechanism and returning to the step C).
2. The method of claim 1, wherein the wireless communication module is any one or a combination of any several of a 5G communication module, a 4G communication module, a bluetooth module, a WiFi module, a GSM module, a CDMA2000 module, a WCDMA module, a TD-SCDMA module, a Zigbee module, and an L oRa module.
3. The blockchain-based traffic processing method according to claim 2, wherein the encryption algorithm is a DES algorithm, a 3DES algorithm, an RC2 algorithm, an RC4 algorithm, an IDEA algorithm, an RSA algorithm, a DSA algorithm, an AES algorithm, a B L OWFISH algorithm, an MD5 algorithm, or a PKCS algorithm.
4. The blockchain-based traffic processing method according to claim 3, wherein the set number is 4/5 of the total number of nodes in the blockchain network.
5. An apparatus for implementing the service processing method based on block chain according to claim 1, comprising:
a block generation module: the method is used for acquiring service data sent by a user side through a wireless communication module by a main node in a block chain network and generating a block; the user side is a mobile phone or a tablet computer;
a broadcasting module: for the master node to broadcast the block to all accounting nodes in the blockchain network;
a judging module: the main node is used for judging whether a set number of accounting nodes can provide verification service;
a fault tolerance threshold determination module: the device is used for determining that the fault-tolerant threshold of the current consensus mechanism is reached, terminating execution of the consensus mechanism, and writing the block into a block chain after the block is encrypted by an encryption algorithm;
a consensus mechanism execution module: and executing the consensus mechanism if the fault tolerance threshold of the current consensus mechanism is not reached.
6. The apparatus of claim 5, wherein the wireless communication module is any one or a combination of any several of a 5G communication module, a 4G communication module, a Bluetooth module, a WiFi module, a GSM module, a CDMA2000 module, a WCDMA module, a TD-SCDMA module, a Zigbee module and an L oRa module.
7. The apparatus of claim 6, wherein the encryption algorithm is a DES algorithm, a 3DES algorithm, an RC2 algorithm, an RC4 algorithm, an IDEA algorithm, an RSA algorithm, a DSA algorithm, an AES algorithm, a B L OWFISH algorithm, an MD5 algorithm, or a PKCS algorithm.
8. The apparatus of claim 7, wherein the set number is 4/5 of the total number of nodes in the blockchain network.
CN202010294687.XA 2020-04-15 2020-04-15 Service processing method and device based on block chain Withdrawn CN111432028A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010294687.XA CN111432028A (en) 2020-04-15 2020-04-15 Service processing method and device based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010294687.XA CN111432028A (en) 2020-04-15 2020-04-15 Service processing method and device based on block chain

Publications (1)

Publication Number Publication Date
CN111432028A true CN111432028A (en) 2020-07-17

Family

ID=71557926

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010294687.XA Withdrawn CN111432028A (en) 2020-04-15 2020-04-15 Service processing method and device based on block chain

Country Status (1)

Country Link
CN (1) CN111432028A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116192881A (en) * 2023-04-27 2023-05-30 天津市城市规划设计研究总院有限公司 Access control method and system for block chain data in urban planning field

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116192881A (en) * 2023-04-27 2023-05-30 天津市城市规划设计研究总院有限公司 Access control method and system for block chain data in urban planning field

Similar Documents

Publication Publication Date Title
CN109936457B (en) Block chain multi-party witness method, device, equipment and computer readable storage medium
CN111949953B (en) Identity authentication method, system and device based on block chain and computer equipment
US11025714B2 (en) System and method for announcing cryptographic keys on a blockchain
US20200127825A1 (en) Revocation of cryptographic keys in the absence of a trusted central authority
CN111224788B (en) Electronic contract management method, device and system based on block chain
CN109995536A (en) A kind of block chain common recognition method, apparatus and readable storage medium storing program for executing
CN111523899B (en) Consensus method of alliance chain, data verification method, device and system
CN112600678A (en) Data processing method, device, equipment and storage medium
CN112036878B (en) Data processing method and device
CN113837758A (en) Consensus method and device for block chain system
CN112398949A (en) Transaction confirmation method, system, device and computer equipment
CN111224782B (en) Data verification method based on digital signature, intelligent device and storage medium
CN111259428A (en) Data processing method and device based on block chain, node equipment and storage medium
CN112910661B (en) Block chain consensus method, device, equipment and medium suitable for electronic subscription
CN111432028A (en) Service processing method and device based on block chain
CN110990790A (en) Data processing method and equipment
CN111600703B (en) SM 2-based signature method, system, electronic equipment and storage medium
CN110728515A (en) Service processing method and device based on block chain
CN111371556B (en) Block link point accounting method, device, equipment and storage medium
CN113259326A (en) Consensus optimization method and device based on alliance chain network and computer equipment
CN109274674B (en) Block chain heterogeneous consensus method with high security and terminal
CN113497827B (en) Information sharing method and equipment
CN115396443A (en) Time factor-based alliance chain consensus method, device, equipment and storage medium
CN110958120A (en) Electronic voting method, device and storage medium based on block chain
CN110766552B (en) Business processing method and device based on block chain

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20200717

WW01 Invention patent application withdrawn after publication