CN112486977B - Method and system for forging block by chain type mobile terminal - Google Patents

Method and system for forging block by chain type mobile terminal Download PDF

Info

Publication number
CN112486977B
CN112486977B CN201910768315.3A CN201910768315A CN112486977B CN 112486977 B CN112486977 B CN 112486977B CN 201910768315 A CN201910768315 A CN 201910768315A CN 112486977 B CN112486977 B CN 112486977B
Authority
CN
China
Prior art keywords
block
node
transaction
forging
manager
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910768315.3A
Other languages
Chinese (zh)
Other versions
CN112486977A (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.)
Benchainless Technology Shenzhen Co ltd
Original Assignee
Benchainless Technology Shenzhen 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 Benchainless Technology Shenzhen Co ltd filed Critical Benchainless Technology Shenzhen Co ltd
Priority to CN201910768315.3A priority Critical patent/CN112486977B/en
Publication of CN112486977A publication Critical patent/CN112486977A/en
Application granted granted Critical
Publication of CN112486977B publication Critical patent/CN112486977B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a method for forging blocks by a chain type mobile terminal, which is characterized in that a null key data memory is generated, and hash values of block heads are generated by acquiring all blocks in the block forging process of the stage and the last block in the forging process of the previous stage; node voting is carried out under a block chain consensus mechanism, and all voting results in the stage are summarized and calculated; starting the mobile terminal node to perform logic processing of local data; taking the local unprocessed transaction and the account list, and generating an unprocessed transaction list of the corresponding account; the invention further provides a chain type mobile end forging block system, which comprises a network manager, a block manager, a transaction manager, a voting manager and a billing manager, so that a mobile block chain which is truly decentered is realized.

Description

Method and system for forging block by chain type mobile terminal
Technical Field
The invention relates to the technical field of block chains, in particular to a method and a system for forging blocks by a chain type mobile terminal.
Background
Blockchains are an important infrastructure in the future credit age, which will serve everyone in this age. In this era, in the working, living and learning modes of people, mobile participation is the most dominant mode, and under the driving of this mode, the mobile terminal is supported by the blockchain, but the mobile terminal has limited storage space and limited computing capability, and cannot store all blockchain data, so that the validity of the data cannot be checked if all blockchain data cannot be stored for the existing blockchain. The mainstream method is to additionally establish a full-quantity transfer node to forward data, and specially provide data receiving and transmitting for the mobile terminal node, but the mode of introducing the third party node breaks the design of the block chain trust removing intermediary, and the design of the central node is absent in practice. Meanwhile, a scheme also adopts a mode that the mobile terminal is directly connected to construct the blockchain, so that the problem of cheating of a transfer node is solved to a certain extent, and the problems that the mobile terminal directly participates in blockchain management and directly receives and transmits blockchain data can be realized. In the credit age, it is not enough that the mobile terminal directly receives and transmits data and governs the blockchain, and further, the mobile terminal can process transactions and forge blocks, so that the application requirements of a business scene which is wider in the credit age can be met, the larger-scale network accommodation capability is realized, and the higher governance right of the mobile terminal is realized. On the premise that the mobile terminal does not store the full data, the transaction forging block can be processed by the mobile terminal without the aid of a third party node, so that the problem to be solved is urgent.
Disclosure of Invention
The invention aims to provide a method and a system for forging a block by a chain type mobile terminal, which solve the problem that the mobile terminal cannot forge the block by changing the validity of the block chain from full data verification to local data verification, and simultaneously solve the problem that a third party is not relied on, thereby realizing the mobile block chain with the center removed in a real sense.
A method of chain-on-chain mobile forging a block, applied to an accounting block chain, the method comprising:
s1, generating a null key data memory, and generating a hash value of a block head by acquiring all blocks in the block forging process of the stage and the last block in the forging process of the previous stage, and extracting the block head of the corresponding block;
s2, node voting is carried out under a block chain consensus mechanism, all voting results in the stage are summarized and calculated, and a node list with the highest vote is generated; placing the list into a key data storage, further generating an account and rights and interests data list of nodes on a node list, placing the account and interests data list into the key data storage, and placing all data of the key data storage into a block header;
s3, starting the mobile terminal node to perform logic processing of local data, extracting a block head of a last forged block at the previous stage after synchronizing the data through a block chain network, starting to forge the block, and generating a block head at the current stage according to the current block chain protocol;
s4, extracting local unprocessed transaction and account lists, generating unprocessed transaction lists of corresponding accounts, and placing the processed transaction lists into a block header to finish block forging after circularly processing the unprocessed transaction lists;
s5, broadcasting the forged new block, acquiring a node list, and transmitting the newly generated block to all nodes in the list, so as to complete broadcasting of the block.
Further, the logic processing of the local data in step S3 includes:
s31, checking whether the local data exist or not, if so, extracting the local data and circularly checking the validity of the data;
s32, checking whether the block is legal or not, if not, directly discarding the block, if so, extracting block transaction, and circularly processing the transaction related to the corresponding account by reading a local account list to be processed;
s33, counting account entry and account exit changes of the accounts after the block transaction processing, executing account income and expenditure, and circularly processing all accounts on the account list to complete all account changes.
Further, the network data synchronization includes:
s41, searching a local block chain network to obtain a new node list, obtaining a node with the highest block height from the node list, and judging and comparing the block height of the mobile terminal node with the highest node searched by the local block chain network;
s42, skipping network synchronization if the block height of the mobile terminal node is higher than the block height of the highest node of the block chain network, skipping network synchronization if the block heights of the mobile terminal node and the block network are equal, and acquiring the maximum block height if the block height of the mobile terminal node is lower than the block height of the highest node of the block chain network;
s43, inquiring all blocks with the highest block height from the nodes after the high forging, circularly receiving and processing block transactions, and further completing the high synchronization of the block chain network.
The invention also extends to a chain-type movable end forging block system based on the forging block method, which comprises
Network manager: the system comprises a network scanning device, a network monitoring device and a network monitoring device, wherein the network scanning device is used for carrying out network scanning on nodes and managing the network states of the nodes, so as to analyze and record the network activities of the nodes;
block manager: the method comprises the steps of performing synchronization and verification of node block heights, starting to process block transactions and completing block forging in block time;
transaction manager: the method is used for synchronizing and processing the transaction, and specifically comprises the steps of calculating and recording account change information, executing a result after the transaction, and synchronizing transaction data according to the storage and calculation force of the nodes;
voting manager: the method comprises the steps of distributing and calculating the governance rights of a blockchain, and calculating a blockforging person in the next stage by receiving votes of nodes on the blockchain;
accounting manager: for marking check labels on the blocks forged in the current stage, extracting key information of the next stage and putting the key information into the block heads,
the system provides a connecting channel for a mobile end node to directly connect with a block chain network through a network manager, then completes the height of a node block and the forging of the block through the block manager, generates a hash value corresponding to a block head through a billing manager in the process of block forging, puts the hash value into a key data storage, acquires all voting transactions in the process of block forging through a voting manager, and further generates a node list with the highest vote for block forging, wherein the transaction manager performs transaction processing and node account variation execution in the process of block forging, and the network manager, the block manager, the transaction manager, the voting manager and the billing manager are in cross-network connection with each other and can perform data access with each other.
Further, the network manager includes:
and a network scanning module: scanning network nodes according to a detection protocol originally defined by a block chain network, further acquiring node IP addresses, and verifying the effectiveness of the nodes;
and the node management module: the method comprises the steps of managing a node list, and analyzing and recording node availability states and data duplex or half-duplex communication type nodes;
and the data receiving and transmitting module is used for: the protocol followed by the data transceiving process comprises HTTP, HTTPS, webscoket, webRTC and Bluetooth.
Further, the block manager includes:
block synchronization module: the method comprises the steps of analyzing block information lacking from a node of the block information in a synchronous network, informing a network manager to match proper nodes, and further obtaining the block information;
and a block checking module: the key data storage device is used for checking the validity of the block obtained by the node, and the block information obtained by the block synchronization module needs to enter the key data storage device of the node after being checked by the block check module;
block forging module: for calculating the current block forging, performing block header height synchronization and node account detail variation.
Further, the transaction manager includes:
an account management module: the method comprises the steps of recording account information of a related party for processing transaction with a computing node, wherein the account information is obtained by computing a node account according to block header information in a key data memory;
a transaction synchronization module: the transaction data synchronization method comprises the steps of synchronizing transaction data, and determining whether the transaction data are synchronous according to storage capacity and transaction processing capacity contributed by a mobile terminal node;
a transaction processing module: for verifying and executing the transaction, by verifying the validity of the transaction and providing actual execution operations of the transaction including transfer at the time of block forging.
Further, the voting manager includes:
the delegate management module: the method comprises the steps of receiving an application that a node is a delegate and managing a list of the applied delegate, and receiving votes of other nodes to be block forges;
ticket collection management module: the method comprises the steps of receiving a processing result of a voting transaction in a transaction manager, recording a voting list, and providing support for subsequent ballot counting and node calculation of rights and benefits;
ticket counting management module: the method is used for calculating votes obtained by the vote collecting management module, calculating the vote obtaining conditions of the consignees and providing data query support for subsequent rights and interests calculation.
Further, the account binding manager includes:
the stage hash module: the method comprises the steps of performing hash calculation on a block forging time period, and judging the correctness of the block according to the hash calculation;
and the enclosure management module is used for: the method comprises the steps of storing a block forging participant result list obtained by voting by a voting manager into a block head, and providing a data basis for calculating the rights and interests of forging nodes subsequently;
key data management module: the method is used for summarizing and storing key data of a block in a certain stage of forging of a past block, extracting data guaranteeing operation of a block in a next stage, and storing the key data as key data in a block head.
Compared with the prior art, the invention has the following advantages:
(1) The key point of the invention is that the network manager performs node scanning and data receiving and transmitting according to the protocol followed by the current block forging, thereby realizing the direct connection of the node support mobile network;
(2) The block is forged for a certain time period through the account binding manager, the correctness of the block is judged, and the problem of dependence of a third party and the problem of full data synchronization are solved by replacing the full data verification accuracy with the accuracy of the local data verification block chain;
(3) The invention has the precondition that the current blockchain is used for supporting the accounting type, and the nodes ensure that the blockchain data is not tamperable by forging the blocks according to the turn and extracting key system information to put the key system information into the block head.
Drawings
FIG. 1 is a flow chart of a method for forging blocks in chain-type mobile terminals according to the present invention;
FIG. 2 is a flow chart of a logic processing procedure of local data according to the present invention;
FIG. 3 is a flow chart of the network data synchronization process of the present invention;
FIG. 4 is a schematic diagram of the components of the chain-type moving end forging block system according to the present invention;
FIG. 5 is a schematic diagram of the network manager according to the present invention;
FIG. 6 is a schematic diagram of a block manager according to the present invention;
FIG. 7 is a schematic diagram of the transaction manager according to the present invention;
FIG. 8 is a schematic diagram of the components of the voting manager of the present invention;
FIG. 9 is a schematic diagram of the components of the accounting pricking manager of the present invention;
wherein: 100 network manager; a 200-block manager; 300 transaction manager; 400 voting manager; 500 a billing manager; a 101 network scanning module; 102 node management module; 103 a data transceiver module; a 201 block synchronization module; 202 a block verification module; 203 a block forging module; 301 an account management module; 302 a transaction synchronization module; 303 a transaction processing module; 401 a delegate management module; 402 a ticket collection management module; 403 a ticket counting management module; a 501-stage hash module; 502 entering an enclosure management module; 503 key data management module
Detailed Description
The invention will be described in further detail with reference to the drawings and the specific examples. It should be noted that the technical features of the embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
The invention discloses a chain type mobile terminal forging block method, which aims to better adapt to the requirements of block chain service scenes, and specifically comprises the following technical steps:
the method comprises two main links, namely, a block stage account bundling, wherein when the generation of the last block in the stage begins in the link, a key data memory with null values is created, because the blocks are forged according to the round, the blocks exist in time, the block heads of all the blocks in the previous stage are extracted, hash values of the corresponding block heads are obtained through a hash algorithm, the block stage account bundling is completed after a list of block forging personnel is calculated, the block is forged by a mobile terminal, and the specific flow of the two links is as follows, as shown in fig. 1:
s1, generating a null key data memory, and generating a hash value of a block head by acquiring all blocks in the block forging process of the stage and the last block in the forging process of the previous stage, and extracting the block head of the corresponding block;
s2, node voting is carried out under a block chain consensus mechanism, all voting results in the stage are summarized and calculated, and a node list with the highest vote is generated; placing the list into a key data storage, further generating an account and rights and interests data list of nodes on a node list, placing the account and interests data list into the key data storage, and placing all data of the key data storage into a block header;
s3, starting the mobile terminal node to perform logic processing of local data, extracting a block head of a last forged block at the previous stage after synchronizing the data through a block chain network, starting to forge the block, and generating a block head at the current stage according to the current block chain protocol;
s4, extracting local unprocessed transaction and account lists, generating unprocessed transaction lists of corresponding accounts, and placing the processed transaction lists into a block header to finish block forging after circularly processing the unprocessed transaction lists;
s5, broadcasting the forged new block, acquiring a node list, and transmitting the newly generated block to all nodes in the list, so as to complete broadcasting of the block.
In step S2, the number of personnel lists generated according to different application scenarios is also different, and in this embodiment, 57 participating block forging nodes are preferably generated.
In step S4, the local unprocessed transaction and the account list are extracted, and the covered account list is different according to different application scenarios, but at least includes the node itself, and the total number of nodes is all accounts.
As shown in fig. 2, in the present embodiment, the logic processing of the local data described in step S3 includes:
s31, checking whether the local data exist or not, if so, extracting the local data and circularly checking the validity of the data;
s32, checking whether the block is legal or not, if not, directly discarding the block, if so, extracting block transaction, and circularly processing the transaction related to the corresponding account by reading a local account list to be processed;
s33, counting account entry and account exit changes of the accounts after the block transaction processing, executing account income and expenditure, and circularly processing all accounts on the account list to complete all account changes.
As shown in fig. 3, in this embodiment, the network data synchronization includes:
s41, searching a local block chain network to obtain a new node list, obtaining a node with the highest block height from the node list, and judging and comparing the block height of the mobile terminal node with the highest node searched by the local block chain network;
s42, skipping network synchronization if the block height of the mobile terminal node is higher than the block height of the highest node of the block chain network, skipping network synchronization if the block heights of the mobile terminal node and the block network are equal, and acquiring the maximum block height if the block height of the mobile terminal node is lower than the block height of the highest node of the block chain network;
s43, inquiring all blocks with the highest block height from the nodes after the high forging, circularly receiving and processing block transactions, and further completing the high synchronization of the block chain network.
As shown in fig. 4, the present invention further provides a chain-type mobile forging block system, which comprises the following components and functions:
network manager 100: the system is used for carrying out network scanning on the nodes and managing the network states of the nodes, analyzing and recording the network activities of the nodes, and particularly providing the mobile terminal with the capability of directly connecting the network;
block manager 200: the method is used for synchronizing and checking the height of the node block, further starting to process the block transaction and completing the block forging in the block time, wherein the forging block is the most core capacity which can be used under the condition that the mobile terminal resources are limited, and the resources comprise the computing power, the storage capacity and the like of the mobile terminal node;
transaction manager 300: the method is used for synchronizing and processing the transaction, and specifically comprises the steps of calculating and recording account change information and executing a result after the transaction, and synchronizing transaction data according to the storage and the calculation power of the nodes, wherein the most core capability of the transaction manager is the capability of realizing the selective processing of the transaction under the condition that the mobile terminal resources are limited because the capability of processing the transaction and the processing quantity of the mobile terminal node are limited, and the range of the selective processing comprises personnel lists for calculating the participation block forges and the subsequent node transaction processing;
voting manager 400: the method comprises the steps of distributing and calculating the governance rights of a blockchain, and calculating a blockforging person in the next stage by receiving votes of nodes on the blockchain;
the accounting manager 500: for marking check labels on the blocks forged in the current stage, extracting key information of the next stage and putting the key information into the block heads,
the specific workflow of the system comprises:
the network manager 100 provides a connection channel for the mobile terminal node to directly connect with a blockchain network, then the blockhead height of the nodes and the forging of the blocks are completed through the blockhead manager 200, hash values corresponding to the blockhead are generated through the accounting manager 500 in the blockhead forging process and put into a key data storage, all voting transactions in the blockhead forging process are obtained through the voting manager 400, the highest node list is generated for the blockhead forging, the transaction manager 300 performs transaction processing and node account variation execution in the blockhead forging process, and the network manager 100, the blockhead manager 200, the transaction manager 300, the voting manager 400 and the accounting manager 500 are in cross-network connection with each other and can perform data access with each other.
As shown in fig. 5, preferably, the network manager 100 includes:
network scanning module 101: scanning network nodes according to a detection protocol originally defined by a block chain network, further acquiring node IP addresses, and verifying the effectiveness of the nodes;
node management module 102: the method comprises the steps of managing a node list, and analyzing and recording node availability states and data duplex or half-duplex communication type nodes;
data transceiver module 103: for receiving information from other nodes except the own node and transmitting information to other nodes, wherein the other nodes are mostly mobile end nodes and also can be PC nodes, and protocols followed by the data transceiving process comprise HTTP, HTTPS, webscoket, webRTC and Bluetooth.
As shown in fig. 6, preferably, the tile manager 200 includes:
block synchronization module 201: the method is used for synchronizing block information in a network, and further acquiring the block information by analyzing the block information lacking from the self node and informing the network manager 100 of matching with a proper node;
block verification module 202: the block information acquired by the block synchronization module 201 needs to enter a key data memory of the node after being checked by the block check module 202;
block forging module 203: the method is used for calculating a current block forging person, executing block head height synchronization and node account detail change, when a new block is forged, the node for which the current time should be used for building the block needs to be calculated first, whether the node is the node for which the block is currently built or not, whether the node still has data conditions after meeting the block-building conditions or not is judged, the data conditions are divided into two parts, one part is whether the block head is synchronized to the latest, and the other part is whether the node is ready for the related account detail condition of a transaction to be processed or not. Here, the latter data is not necessary, and if only an empty block needs to be created, the block head information of the front part may be provided. The latter part can calculate the account details of all accounts at the moment according to the different transaction amounts possibly processed by the performance and storage configuration of the nodes, the performance and storage enough nodes can be used for processing the transaction at the moment, and the common mobile terminal node can also selectively calculate the details of the most common or self-focused accounts, and can process the transaction at the moment to generate a block containing the transaction.
It should be noted that, the calculation account is assumed here that the current blockchain is an accounting blockchain, and if other types of blockchains are used to calculate corresponding information in the same way, for example, if the blockchain is an intellectual property registered blockchain, then it is calculated which intellectual property the node already has and still has valid. What type of data is calculated here is determined by the actual application scenario and does not implement the limitation of the present invention.
As shown in fig. 7, preferably, the transaction manager 300 includes:
the account management module 301: the method is used for recording account information of a party related to a transaction to be processed by the node, the account information is calculated according to block header information in a key data memory through the node account, but not the query from a third party or a block chain node, the data of the mobile terminal node cannot be calculated according to a traditional mode, the key information of the block header is put into the forging of the previous block during calculation, the quality of the key information determines the difficulty degree of account calculation, more key information is put into the account if the account calculation is made to be simple, the difficulty of block out is increased and the performance of block out is reduced by the more key information, so that the mobile terminal node can calculate the account according to the requirement of an application scene in the actual process without greatly influencing the block out speed. The account management module 301 manages different sizes of accounts on different scale nodes, and in different types of applications, specific information managed herein may be different, not necessarily account, intellectual property, some chat records, etc.;
transaction synchronization module 302: the method comprises the steps that the method is used for synchronizing transaction data, whether the transaction data are synchronized is determined according to the storage capacity and the transaction processing capacity contributed by a mobile terminal node, if the mobile terminal node is not involved in a forging block forever, the mobile terminal node only needs to synchronize own transaction, and if the mobile terminal node needs to forge the block, other received transactions need to be synchronized within the processing performance and the storage range of the mobile terminal node;
transaction processing module 303: the method comprises the steps of verifying and executing the transaction, and providing actual execution operation of the transaction when the block is forged, wherein the actual execution operation comprises transferring accounts, when a node generates a transaction or receives the transaction sent by other nodes, the node firstly verifies the legitimacy of the transaction, and provides actual execution operation of the transaction when the node enters the step of forging the block, the transaction processing at the very core is transferring accounts, and the actual execution is to account a certain account and then account the certain account. In practical applications, the transaction processing types are very rich, such as setting payment passwords, setting user names, and the like, and different application scenarios are very different, such as sending offline messages, authorizing an intellectual property right, and the like.
As shown in fig. 8, preferably, the vote manager 400 includes:
the delegate management module 401: the method comprises the steps of receiving an application that a node is a delegate and managing a list of the applied delegate, and receiving votes of other nodes to be block forges;
ticket collection management module 402: the method comprises the steps of receiving a processing result of a voting transaction in a transaction manager, recording a voting list, and providing support for subsequent ballot counting and node calculation of rights and benefits;
ticket management module 403: for calculating votes obtained by the vote receiving management module 402 and calculating the vote status of each delegate, and for providing data query support for subsequent equity calculations.
As shown in fig. 9, further, the account binding manager 500 includes:
the phase hash module 501: the hash algorithm is used for carrying out hash calculation on the block heads in the past stage, and because not all mobile end nodes can synchronize all transactions, the mobile end nodes cannot independently judge the correctness of a certain block, and by carrying out a hash algorithm on all the block heads in the past stage, whether the block in the stage is tampered or not can be quickly checked in the process of not calculating the transactions.
Since each stage of the binding HASH contains the last binding HASH, when a node cheats that the mobile cannot verify a single block and cheats, it needs to modify all blocks of the entire chain, because modifying any one block will cause the binding HASH of the stage where that block is located to change, and any change in the binding HASH will cause the HASH of the subsequent entire chain to change. The block account binding mode of the 'chain uplink' provides a basis for the mobile terminal to verify and ensure the validity of the block without using the whole data;
the enclosure management module 502: the method is used for storing the block forging participant result list obtained by voting by the voting manager 400 into a block head, so that the mobile terminal can obtain a bounding list even if the whole voting data is not obtained, and has certain reliability and provides a data basis for the subsequent calculation of the forging node rights and interests because the list is doubly protected by the block HASH and the stage-bound HASH if the list is in the block head;
key data management module 503: the method is used for summarizing and storing key data of a block in a certain stage of forging of a past block, extracting data guaranteeing operation of a block in a next stage, and storing the key data as key data in a block head.
Compared with the prior art of forging the block by the mobile terminal, the invention omits the link of checking the whole data, because the account binding manager 500 is adopted to punch the check tag for the block at the stage, and the key information at the next stage is extracted and put into the block head, when the validity of the data at the stage needs to be judged, only the data stored in the block head is checked, and the large-volume block main body does not need to be checked synchronously.
The above description is only of the preferred embodiments of the present invention, and should not be taken as limiting the technical scope of the present invention, but all changes and modifications that come within the scope of the invention as defined by the claims and the specification are to be embraced by the invention.

Claims (9)

1. A method for forging blocks on a chain type mobile terminal, which is applied to an accounting block chain, is characterized in that the method comprises the following steps:
s1, generating a null key data memory, and generating a hash value of a block head by acquiring all blocks in the block forging process of the stage and the last block in the forging process of the previous stage, and extracting the block head of the corresponding block;
s2, node voting is carried out under a block chain consensus mechanism, all voting results in the stage are summarized and calculated, and a node list with the highest vote is generated; placing the list into a key data storage, further generating an account and rights and interests data list of nodes on a node list, placing the account and interests data list into the key data storage, and placing all data of the key data storage into a block header;
s3, starting the mobile terminal node to perform logic processing of local data, extracting a block head of a last forged block at the previous stage after synchronizing the data through a block chain network, starting to forge the block, and generating a block head at the current stage according to the current block chain protocol;
s4, extracting local unprocessed transaction and account lists, generating unprocessed transaction lists of corresponding accounts, and placing the processed transaction lists into a block header to finish block forging after circularly processing the unprocessed transaction lists;
s5, broadcasting the forged new block, acquiring a node list, and transmitting the newly generated block to all nodes in the list, so as to complete broadcasting of the block.
2. The method of claim 1, wherein the logic processing of the local data in step S3 comprises:
s31, checking whether the local data exist or not, if so, extracting the local data and circularly checking the validity of the data;
s32, checking whether the block is legal or not, if not, directly discarding the block, if so, extracting block transaction, and circularly processing the transaction related to the corresponding account by reading a local account list to be processed;
s33, counting account entry and account exit changes of the accounts after the block transaction processing, executing account income and expenditure, and circularly processing all accounts on the account list to complete all account changes.
3. The method of on-chain mobile end forging a block according to claim 1, wherein the network data synchronization comprises:
s41, searching a local block chain network to obtain a new node list, obtaining a node with the highest block height from the node list, and judging and comparing the block height of the mobile terminal node with the highest node searched by the local block chain network;
s42, skipping network synchronization if the block height of the mobile terminal node is higher than the block height of the highest node of the block chain network, skipping network synchronization if the block heights of the mobile terminal node and the block network are equal, and acquiring the maximum block height if the block height of the mobile terminal node is lower than the block height of the highest node of the block chain network;
s43, inquiring all blocks with the highest block height from the nodes after the high forging, circularly receiving and processing block transactions, and further completing the high synchronization of the block chain network.
4. An on-chain mobile end forging block system for implementing the method of claim 1, said system comprising:
network manager: the system comprises a network scanning device, a network monitoring device and a network monitoring device, wherein the network scanning device is used for carrying out network scanning on nodes and managing the network states of the nodes, so as to analyze and record the network activities of the nodes;
block manager: the method comprises the steps of performing synchronization and verification of node block heights, starting to process block transactions and completing block forging in block time;
transaction manager: the method is used for synchronizing and processing the transaction, and specifically comprises the steps of calculating and recording account change information, executing a result after the transaction, and synchronizing transaction data according to the storage and calculation force of the nodes;
voting manager: the method comprises the steps of distributing and calculating the governance rights of a blockchain, and calculating a blockforging person in the next stage by receiving votes of nodes on the blockchain;
accounting manager: marking a check label for the block forged in the current stage, extracting key information of the next stage and putting the key information into a block head;
the system provides a connecting channel for a mobile end node to directly connect with a block chain network through a network manager, then completes the height of a node block and the forging of the block through the block manager, generates a hash value corresponding to a block head through a billing manager in the process of block forging, puts the hash value into a key data storage, acquires all voting transactions in the process of block forging through a voting manager, and further generates a node list with the highest vote for block forging, wherein the transaction manager performs transaction processing and node account variation execution in the process of block forging, and the network manager, the block manager, the transaction manager, the voting manager and the billing manager are in cross-network connection with each other to perform data access with each other.
5. The chain-on mobile end forging block system as recited in claim 4, wherein said network manager comprises:
and a network scanning module: scanning network nodes according to a detection protocol originally defined by a block chain network, further acquiring node IP addresses, and verifying the effectiveness of the nodes;
and the node management module: the method comprises the steps of managing a node list, and analyzing and recording node availability states and data duplex or half-duplex communication type nodes;
and the data receiving and transmitting module is used for: the protocol followed by the data transceiving process comprises HTTP, HTTPS, webscoket, webRTC and Bluetooth.
6. The chain-on mobile end forging block system as recited in claim 4, wherein said block manager comprises:
block synchronization module: the method comprises the steps of analyzing block information lacking from a node of the block information in a synchronous network, informing a network manager to match proper nodes, and further obtaining the block information;
and a block checking module: the key data storage device is used for checking the validity of the block obtained by the node, and the block information obtained by the block synchronization module needs to enter the key data storage device of the node after being checked by the block check module;
block forging module: for calculating the current block forging, performing block header height synchronization and node account detail variation.
7. The chain-on mobile end forging block system as recited in claim 4, wherein the transaction manager comprises:
an account management module: the method comprises the steps of recording account information of a related party for processing transaction with a computing node, wherein the account information is obtained by computing a node account according to block header information in a key data memory;
a transaction synchronization module: the transaction data synchronization method comprises the steps of synchronizing transaction data, and determining whether the transaction data are synchronous according to storage capacity and transaction processing capacity contributed by a mobile terminal node;
a transaction processing module: for verifying and executing the transaction, by verifying the validity of the transaction and providing actual execution operations of the transaction including transfer at the time of block forging.
8. The chain-on mobile end forging block system of claim 4, wherein the vote manager comprises:
the delegate management module: the method comprises the steps of receiving an application that a node is a delegate and managing a list of the applied delegate, and receiving votes of other nodes to be block forges;
ticket collection management module: the method comprises the steps of receiving a processing result of a voting transaction in a transaction manager, recording a voting list, and providing support for subsequent ballot counting and node calculation of rights and benefits;
ticket counting management module: the method is used for calculating votes obtained by the vote collecting management module, calculating the vote obtaining conditions of the consignees and providing data query support for subsequent rights and interests calculation.
9. The chain-type mobile end forging block system as recited in claim 4, wherein the bill manager comprises:
the stage hash module: the method comprises the steps of performing hash calculation on a block forging time period, and judging the correctness of the block according to the hash calculation;
and the enclosure management module is used for: the method comprises the steps of storing a block forging participant result list obtained by voting by a voting manager into a block head, and providing a data basis for calculating the rights and interests of forging nodes subsequently;
key data management module: the method is used for summarizing and storing key data of a block in a certain stage of forging of a past block, extracting data guaranteeing operation of a block in a next stage, and storing the key data as key data in a block head.
CN201910768315.3A 2019-08-20 2019-08-20 Method and system for forging block by chain type mobile terminal Active CN112486977B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910768315.3A CN112486977B (en) 2019-08-20 2019-08-20 Method and system for forging block by chain type mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910768315.3A CN112486977B (en) 2019-08-20 2019-08-20 Method and system for forging block by chain type mobile terminal

Publications (2)

Publication Number Publication Date
CN112486977A CN112486977A (en) 2021-03-12
CN112486977B true CN112486977B (en) 2023-12-22

Family

ID=74919793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910768315.3A Active CN112486977B (en) 2019-08-20 2019-08-20 Method and system for forging block by chain type mobile terminal

Country Status (1)

Country Link
CN (1) CN112486977B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112765682B (en) * 2021-04-07 2022-08-05 暗链科技(深圳)有限公司 Block data structure of block distributed block chain, storage medium and electronic equipment
CN113420325B (en) * 2021-06-07 2024-05-28 北京许继电气有限公司 Internet of things data management system and method based on blockchain technology
CN115240316B (en) * 2022-07-21 2024-04-30 安世亚太科技股份有限公司 Chained voting method and device for knowledge management

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109936542A (en) * 2017-12-18 2019-06-25 厦门本能管家科技有限公司 A kind of distribution goes the application at center
CN109978516A (en) * 2019-03-06 2019-07-05 西安电子科技大学 The manufacture of block and synchronous method, information data processing terminal in block chain network
CN110071897A (en) * 2018-01-22 2019-07-30 厦门本能管家科技有限公司 A kind of block catenary system based on mobile terminal

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109936542A (en) * 2017-12-18 2019-06-25 厦门本能管家科技有限公司 A kind of distribution goes the application at center
CN110071897A (en) * 2018-01-22 2019-07-30 厦门本能管家科技有限公司 A kind of block catenary system based on mobile terminal
CN109978516A (en) * 2019-03-06 2019-07-05 西安电子科技大学 The manufacture of block and synchronous method, information data processing terminal in block chain network

Also Published As

Publication number Publication date
CN112486977A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
CN111861456B (en) Block chain-based 5G message transfer transaction verification method, system and device
CN112486977B (en) Method and system for forging block by chain type mobile terminal
CN107276765B (en) Processing method and device for consensus in block chain
CN107171810B (en) Verification method and device of block chain
CN111444512B (en) Mobile terminal blocking method and system for block chain
KR101168272B1 (en) The system of issuing nfc ticket and method thereof
CN106779673B (en) Electronic payment method and system
CN109508404A (en) Repair instructional video management method, device, terminal device and storage medium
CN110738147A (en) Face recognition system and method for rail transit
CN113052587A (en) Transfer service processing method and device based on block chain
CN100466558C (en) Method for realizing tax controlled data monitoring of POS system
CN110598479B (en) Data processing method, device and computer readable storage medium
CN113411338A (en) Resource transaction method based on-chain-down cooperation of state channel
CN117611147A (en) Offline payment method, device, equipment and storage medium
CN112381599A (en) Shared charger rental system and method based on block chain technology
CN112734415A (en) Method, terminal, device and computer readable storage medium for collecting digital currency
CN110555764B (en) Method and system for block chain consistency under decentralized environment
CN112258184B (en) Method, apparatus, electronic device and readable storage medium for freezing blockchain network
CN115034882A (en) Credit card limit adjusting method and device based on 5G message
CN113962679A (en) Transaction method, system, device, electronic equipment and storage medium
CN111583002A (en) Data processing method, data processing device, electronic equipment and storage medium
CN113591067A (en) Event confirmation and timing method based on image recognition
CN114120546B (en) Cross-line withdrawal method and device based on blockchain and face recognition
CN113591130A (en) Data processing method and device based on block chain, electronic equipment and storage medium
CN110519334B (en) Monitoring processing method and device under credit contract system

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
TA01 Transfer of patent application right

Effective date of registration: 20210402

Address after: Room 2201, 703c, Desai science and technology building, 9789 Shennan Avenue, high tech Zone community, Yuehai street, Nanshan District, Shenzhen, Guangdong 518000

Applicant after: Benchainless Technology (Shenzhen) Co.,Ltd.

Address before: 361006 unit 202, No.50, anling 2nd Road, Huli District, Xiamen City, Fujian Province

Applicant before: XIAMEN INSTINCT BLOCKCHAIN TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant