CN112486977A - Method and system for forging block by chain-linked mobile terminal - Google Patents

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

Info

Publication number
CN112486977A
CN112486977A CN201910768315.3A CN201910768315A CN112486977A CN 112486977 A CN112486977 A CN 112486977A CN 201910768315 A CN201910768315 A CN 201910768315A CN 112486977 A CN112486977 A CN 112486977A
Authority
CN
China
Prior art keywords
block
node
manager
transaction
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910768315.3A
Other languages
Chinese (zh)
Other versions
CN112486977B (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
Xiamen Instinct Blockchain Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Instinct Blockchain Technology Co ltd filed Critical Xiamen Instinct Blockchain Technology 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

Images

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)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for forging blocks by a chain-linked mobile terminal, which comprises the steps of generating a key data memory of an empty value, and generating a hash value of a block head by acquiring all blocks in the block forging process of the current stage and a 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 at the current stage are summarized and calculated; starting the mobile end node to perform logic processing of local data; taking a local unprocessed transaction and an account list, and generating an unprocessed transaction list of a corresponding account; the invention also provides a chain uplink mobile terminal forging block system, which comprises a network manager, a block manager, a transaction manager, a voting manager and a binding manager, thereby realizing the mobile block chain going to the center in a real sense.

Description

Method and system for forging block by chain-linked mobile terminal
Technical Field
The present invention relates to the field of block chain technology, and more particularly, to a method and system for chain-linked mobile-end block forging.
Background
Blockchains are an important infrastructure for the future credit era that will serve everyone in this era. In this era, mobile participation will become the most important way among people's ways of work, life and study, and it is a necessary trend to let the blockchain support the mobile terminal driven by this way, but the mobile terminal has limited storage space and limited computing power, and cannot store all blockchain data, which for the current blockchain, cannot store all blockchain data and cannot check the validity of the data. The mainstream method at present is to establish a whole amount of transit nodes for data forwarding, and specially provide data transceiving for the mobile end node, but the mode of introducing the third party node destroys the original design purpose of a block chain to trust an intermediary, and the design of a no-center node in practice. Meanwhile, in the scheme, a block chain is constructed in a mode of directly connecting the mobile terminal, so that the problem of cheating of a transfer node is solved to a certain extent, and the problem that the mobile terminal directly participates in block chain management and directly receives and transmits block chain data can be realized. In the credit era, it is not enough that the mobile terminal directly receives and transmits data and governs the block chain, and further, the mobile terminal can process transactions and forge blocks, so that the wider application requirements of the service scene in the credit era can be met, the larger-scale network capacity can be realized, and the higher governance right of the mobile terminal can be realized. Therefore, how to process the transaction forging block by itself without the help of a third-party node on the premise that the mobile terminal does not store the full amount of data becomes a problem which needs to be solved urgently.
Disclosure of Invention
The invention aims to provide a method and a system for forging a block by a chain-linked mobile terminal, which solve the problem that the mobile terminal cannot forge the block by changing the validity of a block chain from full data verification to partial data verification and simultaneously solve the problem of independence on a third party, thereby realizing a mobile block chain going to the center in a real sense.
A method for chain-linked mobile-end forging blocks, which is applied to an accounting block chain, comprises the following steps:
s1, generating a key data memory of null value, 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 current stage are summarized and calculated, and a node list with the highest votes is generated; putting the list into a key data memory, further generating an account and a rights and interests data list of the nodes on the node list, putting the list into the key data memory, and putting all data of the key data memory into a block header;
s3, starting the mobile end node to perform logic processing of local data, extracting the block head of the last forging block of the previous stage after synchronizing the network data of the block chain, starting forging the block, and generating the block head of the current stage according to the current block chain protocol;
s4, extracting local unprocessed transactions and account lists, generating unprocessed transaction lists corresponding to accounts, circularly processing the unprocessed transaction lists, and then putting the processed transaction lists into the block header to finish block forging;
and S5, broadcasting the forged new block, acquiring a node list, and sending the newly generated block to all nodes in the list, thereby completing the broadcasting of the block.
Further, the logic processing of the local data in step S3 includes:
s31, checking whether data exist locally or not, if so, extracting the local data and circularly checking the validity of the data;
s32, checking whether the block is legal, if the block is not legal, directly discarding the block, if the block is legal, extracting the block transaction, and circularly processing the transaction related to the corresponding account by reading the account list needing to be processed locally;
and S33, counting account in and out 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 the local blockchain 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 blockchain network;
s42, if the height of the block of the mobile end node is higher than the height of the block of the highest node of the blockchain network, skipping network synchronization, if the height of the block of the mobile end node is equal to the height of the block of the highest node of the blockchain network, skipping network synchronization, and if the height of the block of the mobile end node is lower than the height of the block of the highest node of the blockchain network, acquiring the maximum height of the block;
s43, searching all the blocks after the high degree forging to the node with the highest block height, circularly receiving and processing the block transaction, and further completing the high degree synchronization of the block chain network.
The invention also provides a chain-linked mobile terminal forging block system based on the block forging method, which comprises
A network manager: the system comprises a network scanning module, a network state management module, a node management module and a node management module, wherein the network scanning module is used for carrying out network scanning on the node and managing the network state of the node so as to analyze and record the network activity of the node;
the block manager: the system is used for synchronizing and checking the height of the node blocks, further starting to process the block transaction and finishing the block forging in the block time;
a transaction manager: the system 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 of nodes and the calculation power;
the voting manager: the system comprises a block chain, a plurality of nodes and a plurality of data processing units, wherein the block chain is used for distributing and calculating governance of the block chain, and a block forger at the next stage is calculated by receiving votes of the nodes on the block chain;
binding manager: used for marking the block forged in the current stage with a check label and extracting the key information of the next stage and placing the key information into the block head,
the system provides a connection channel for a mobile end node to perform direct connection block chain network through a network manager, completes node block height and block forging through the block manager, generates a hash value corresponding to a block head through a binding account manager in the block forging process, puts the hash value into a key data memory, obtains all voting transactions in the block forging process through the voting manager, further generates a node list with the highest votes for block forging, executes transaction processing and node account change in the block forging process through the transaction manager, and the network manager, the block manager, the transaction manager, the voting manager and the binding account manager are connected in a cross mesh manner and can perform data access mutually.
Further, the network manager includes:
a network scanning module: network node scanning is carried out according to a detection protocol originally defined by the block chain network, so that a node IP address is obtained, and the validity of the node is verified;
a node management module: the system is used for managing the node list and analyzing and recording the available state of the node and the data duplex or semi-duplex communication type node;
a data receiving and transmitting module: the protocol used for receiving information of other nodes except the self node and sending information to other nodes follows the data transceiving process and comprises HTTP, HTTPS, Webscolet, WebRTC and Bluetooth.
Further, the tile manager comprises:
a block synchronization module: the system is used for synchronizing block information in the network, and the block information is acquired by analyzing the block information lacking in the node of the network and informing a network manager of matching a proper node;
a block checking module: the key data storage is used for verifying the validity of the block obtained by the node, and the block information obtained by the block synchronization module can enter the node after being verified by the block verification module;
block forging module: for calculating the current block forger, performing block header height synchronization and node account detail change.
Further, the transaction manager includes:
an account management module: the system comprises a key data storage, a node account, a block header information storage and a data processing module, wherein the key data storage is used for storing block header information of a transaction to be processed by the node;
a transaction synchronization module: the system is used for synchronizing the transaction data and determining whether the transaction data is synchronized according to the storage capacity and the transaction processing capacity contributed by the mobile terminal node;
the transaction processing module: for verifying and executing transactions, by verifying the validity of transactions and providing actual execution of transactions at the time of block forging, including transfers.
Further, the voting manager includes:
the trustee management module: the system is used for receiving the application of the nodes as the trustees and managing the list of the applied trustees, and becomes a block smitter by receiving votes of other nodes;
the ticket collecting management module: the system is used for receiving the processing result of the voting transaction in the transaction manager, recording a voting list and providing support for subsequent ticket counting and node calculation rights and interests and benefits;
the ticket counting management module: the system is used for calculating votes acquired by the vote collecting management module, calculating the vote obtaining condition of each trustee and providing data query support for subsequent interest calculation.
Further, the accounting manager comprises:
a stage hashing module: the block forging device is used for performing Hash calculation on a block in a certain time period and judging the correctness of the block;
go into to enclose the management module: the system comprises a voting manager, a block head and a data base, wherein the voting manager is used for voting a block forging participant result list obtained by the voting of the voting manager to the block head and providing a data base for the subsequent calculation of the benefit and gain of a forging node;
the key data management module: the block header is used for summarizing and calculating key data of a block in a certain stage forged by a past block, storing the key data, extracting data for guaranteeing the operation of the block in the next stage, and storing the data serving as the key data into the block header.
Compared with the prior art, the invention has the following advantages:
(1) the key point of the invention is that the network manager scans nodes and receives and transmits data according to a protocol followed by the current block forging, thereby realizing that the nodes support the direct connection of a mobile network;
(2) the block is forged for a certain time period through the binding manager to perform Hash calculation, the correctness of the block is judged according to the Hash calculation, and the accuracy of a local data check block chain replaces the accuracy of full data check, so that the problem of third party dependence is solved, and the problem of full data synchronization is also solved;
(3) the forging premise of the invention is that the current block chain supports the account type, and the nodes ensure that the data of the block chain cannot be tampered by forging the blocks according to the turns and extracting key system information to put the block heads.
Drawings
FIG. 1 is a flow chart illustrating a method for chain-linked mobile-end block forging according to the present invention;
FIG. 2 is a flow chart illustrating the logical processing of local data according to the present invention;
FIG. 3 is a flow chart of a network data synchronization process according to the present invention;
FIG. 4 is a schematic diagram of a chain mobile-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 block 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 voting manager according to the present invention;
FIG. 9 is a schematic diagram of the components of the accounting manager according to the present invention;
wherein: 100 a network manager; 200 a block manager; 300 a transaction manager; 400 a voting manager; 500 account binding managers; 101 a network scanning module; 102 a node management module; 103 a data receiving and transmitting module; 201 a block synchronization module; 202 a block check module; 203, forging the module in blocks; 301 account management module; 302 a transaction synchronization module; 303 a transaction processing module; 401 a consignee management module; 402 a ticket collection management module; 403, a ticket counting management module; a stage 501, namely a hash module; 502 enclosure management module; 503 key data management module
Detailed Description
The invention is described in further detail below with reference to the figures and specific examples. It should be noted that the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The original design of a block chain is to remove a central intermediary and to design without a central node in practice, the block chain technology in the prior art cannot realize a mobile terminal direct connection block chain, even if the mobile terminal direct connection block chain can be realized, a mobile terminal cannot realize self processing transaction and block forging, and cannot meet the application requirements of wider service scenes, so that the invention provides a chain uplink type mobile terminal block forging method to better adapt to the requirements of the service scenes of the block chain, and in order to realize the method, the method specifically comprises the following technical steps:
the method comprises two main links, wherein the first link is block stage account binding, when the link starts to generate the last block in the stage, a key data memory with null value is created, blocks are forged according to turns, so that the blocks exist in time sequentially, the block heads of all the blocks in the last stage are extracted, the hash value of the corresponding block heads is obtained through a hash algorithm, block stage account binding is completed after a list of block forging personnel is calculated, and the second link is block forging at a mobile terminal, and the specific flow of the two links is as follows, as shown in fig. 1:
s1, generating a key data memory of null value, 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 current stage are summarized and calculated, and a node list with the highest votes is generated; putting the list into a key data memory, further generating an account and a rights and interests data list of the nodes on the node list, putting the list into the key data memory, and putting all data of the key data memory into a block header;
s3, starting the mobile end node to perform logic processing of local data, extracting the block head of the last forging block of the previous stage after synchronizing the network data of the block chain, starting forging the block, and generating the block head of the current stage according to the current block chain protocol;
s4, extracting local unprocessed transactions and account lists, generating unprocessed transaction lists corresponding to accounts, circularly processing the unprocessed transaction lists, and then putting the processed transaction lists into the block header to finish block forging;
and S5, broadcasting the forged new block, acquiring a node list, and sending the newly generated block to all nodes in the list, thereby completing the broadcasting of the block.
The number of the person lists generated in step S2 according to different application scenarios is also different, and it is preferable to generate 57 participating block forging nodes in this embodiment.
In step S4, the extraction of the local unprocessed transaction and the account list may also be different depending on different application scenarios, but at least includes the node itself, and the full amount of nodes are all accounts.
As shown in fig. 2, in the present embodiment, the logical processing of the local data described in step S3 includes:
s31, checking whether data exist locally or not, if so, extracting the local data and circularly checking the validity of the data;
s32, checking whether the block is legal, if the block is not legal, directly discarding the block, if the block is legal, extracting the block transaction, and circularly processing the transaction related to the corresponding account by reading the account list needing to be processed locally;
and S33, counting account in and out 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 the local blockchain 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 blockchain network;
s42, if the height of the block of the mobile end node is higher than the height of the block of the highest node of the blockchain network, skipping network synchronization, if the height of the block of the mobile end node is equal to the height of the block of the highest node of the blockchain network, skipping network synchronization, and if the height of the block of the mobile end node is lower than the height of the block of the highest node of the blockchain network, acquiring the maximum height of the block;
s43, searching all the blocks after the high degree forging to the node with the highest block height, circularly receiving and processing the block transaction, and further completing the high degree synchronization of the block chain network.
As shown in fig. 4, the present invention further provides a chain-linked mobile-end forging block system, which comprises the following components:
the network manager 100: the system is used for carrying out network scanning on the nodes and managing the network states of the nodes, further analyzing and recording the network activities of the nodes, and particularly providing the direct network connection capability for the mobile terminal;
the block manager 200: the system is used for synchronizing and checking the height of the node block, further processing the block transaction and completing the block forging in the block time, wherein the forged block is the most core capability which needs to be used under the condition that the mobile terminal resources are limited, and the resources comprise the mobile terminal node calculation power, the storage capability and the like;
the transaction manager 300: the transaction manager is used for synchronizing and processing transactions, particularly comprises the steps of calculating and recording account change information and executing a result after the transaction, and transaction data are synchronized according to the storage and the calculation capacity of the nodes, because the transaction processing capacity and the processing quantity of the mobile end nodes are limited, the most core capacity of the transaction manager is that the selective processing of the transactions can be realized under the condition that the resources of the mobile end are limited, and the selective processing range comprises the personnel list for calculating the participation block forgers and the subsequent node transaction processing;
the voting manager 400: the system comprises a block chain, a plurality of nodes and a plurality of data processing units, wherein the block chain is used for distributing and calculating governance of the block chain, and a block forger at the next stage is calculated by receiving votes of the nodes on the block chain;
the binding manager 500: used for marking the block forged in the current stage with a check label and extracting the key information of the next stage and placing the key information into the block head,
the specific workflow of the system comprises the following steps:
the network manager 100 provides a connection channel for a direct connection block chain network of a mobile terminal node, the block height and the forging of a block of the node are completed through the block manager 200, a hash value corresponding to a block header is generated through the accounting manager 500 in the block forging process, the hash value is placed in a key data memory, all voting transactions in the block forging process are obtained through the voting manager 400, a node list with the highest votes is further generated for block forging, the transaction manager 300 performs transaction processing and node account change execution in the block forging process, the network manager 100, the block manager 200, the transaction manager 300, the voting manager 400 and the accounting manager 500 are connected in a cross mesh manner, and data access can be performed.
As shown in fig. 5, preferably, the network manager 100 includes:
the network scanning module 101: network node scanning is carried out according to a detection protocol originally defined by the block chain network, so that a node IP address is obtained, and the validity of the node is verified;
the node management module 102: the system is used for managing the node list and analyzing and recording the available state of the node and the data duplex or semi-duplex communication type node;
the data transceiver module 103: the data transmission and receiving method is used for receiving information of other nodes except the self node and sending the information to the other nodes, wherein the other nodes are mostly mobile end nodes and can also be PC nodes, and the protocol followed by the data transmission and receiving process comprises HTTP, HTTPS, Webscout, WebRTC and Bluetooth.
As shown in fig. 6, preferably, the block manager 200 includes:
the block synchronization module 201: the method is used for synchronizing block information in the network, and the block information is acquired by analyzing the block information lacking in the node of the network and informing the network manager 100 of matching a proper node;
the block verification module 202: the block synchronization module 201 is used for verifying the validity of the block obtained by the node, and the block information obtained by the block synchronization module 201 can enter the key data storage of the node after being verified by the block verification module 202;
block forging module 203: the method is used for calculating a current block forger, executing block header height synchronization and node account detail change, when a new block is forged, calculating whether a block should be created for which node at the current time and whether the node is the node of the current created block or not, and whether a data condition is met or not after the block creation condition is met, wherein the data condition is divided into two parts, one part is whether the block header is synchronized to the latest or not, and the other part is whether the node is ready for the relevant account detail condition of the transaction to be processed or not. It should be noted that the latter data is not necessary, and if only the empty block needs to be created, the block header information of the previous part is available. The latter part can process different transaction quantities according to the node performance and storage configuration, the node with sufficient performance and storage can calculate the account details of the current time for processing the transaction, and the common mobile terminal node can also selectively calculate the most common account details or the account details concerned by the common mobile terminal node, and can process the transaction at the current time to generate a block containing the transaction.
It should be noted that, the account is calculated here, assuming that the current blockchain is an accounting blockchain, if the blockchain is of other types, corresponding information is calculated, for example, if the blockchain is a blockchain of an intellectual property registration, it is calculated which intellectual property rights the node already has and still valid. What type of data is calculated here is determined by the actual application scenario and is not a limitation of the implementation of the present invention.
As shown in fig. 7, preferably, the transaction manager 300 includes:
account management module 301: used for recording account information of a party related to the transaction to be processed by the node, wherein the account information is calculated by the node account according to the block header information in the key data memory, instead of the query from the third party or the block chain node, the mobile node data is not all the data which can not calculate the result by the traditional method, the calculation needs to rely on the key information of the block head put in the previous block forging, wherein the quality of the key information determines the difficulty of account calculation, if the account calculation is simple, more key information needs to be put in, more key information increases the difficulty of block output and reduces the block output performance, so that a balance can be adopted according to the requirements of an application scene in the actual process, and the mobile terminal node can calculate the account without greatly influencing the block output speed. On the nodes with different scales, the account management module 301 manages different scales of accounts, and in different types of applications, the specific information managed here may be different, not necessarily accounts, may also be intellectual property, may also be some chat records, and so on;
the transaction synchronization module 302: 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 the mobile end node, if the mobile end node never participates in the forging block, the mobile end node only needs to synchronize own transaction, and if the mobile end node needs to forge the block, other received transactions need to be synchronized in the processing performance and the storage range of the mobile end node;
the transaction processing module 303: the method is used for verifying and executing the transaction, and provides the actual execution operation of the transaction when the block is forged by verifying the validity of the transaction, wherein the actual execution operation comprises transfer, when the node generates a transaction or receives the transaction sent by other nodes, the validity of the transaction is firstly verified, and when the node enters the step of forging the block, the actual execution operation of the transaction is provided, the most core transaction processing is transfer, and the actual execution is to give account to an account after the account is given down. In practical applications, the transaction processing types will be very rich, such as setting a payment password, setting a user name, and the like, and different application scenarios will have very large differences, such as sending an offline message, authorizing an intellectual property right, and the like.
As shown in fig. 8, preferably, the voting manager 400 includes:
the delegate management module 401: the system is used for receiving the application of the nodes as the trustees and managing the list of the applied trustees, and becomes a block smitter by receiving votes of other nodes;
the ticket collection management module 402: the system is used for receiving the processing result of the voting transaction in the transaction manager, recording a voting list and providing support for subsequent ticket counting and node calculation rights and interests and benefits;
the ticket counting management module 403: for calculating votes obtained by the vote collection management module 402, calculating the vote obtaining condition of each trustee, and providing data query support for subsequent interest calculation.
As shown in fig. 9, further, the billing manager 500 includes:
the stage hashing module 501: the method is used for carrying out hash calculation on the block heads in the previous stage, and because all mobile end nodes can not synchronize all transactions, the mobile end nodes can not independently judge the correctness of a certain block, and by carrying out a hash algorithm on all the block heads in the previous stage, whether the block in the stage is tampered or not can be quickly checked in the process of not calculating the transaction.
Since each stage of the billing HASH includes the last billing HASH, when a node cheats the mobile terminal to check a single block and cheats, it needs to modify all blocks of the whole chain, because modifying any block will result in the change of the billing HASH of the stage in which the block is located, and any change of the billing HASH will result in the change of the HASH of the whole chain. The block account binding mode of 'chain chaining' provides a foundation for the mobile terminal to check and guarantee the validity of the block without using full data;
enclosure entry management module 502: the system is used for storing a block forging participant result list voted by the voting manager 400 into a block header, so that a mobile terminal can obtain a surrounding list even if voting data are not completely obtained, and the list is doubly protected by block HASH and stage binding HASH if the list is in the block header, so that certain reliability is achieved and a data basis is provided for subsequent calculation of forging node equity benefits and earnings;
the critical data management module 503: the block header is used for summarizing and calculating key data of a block in a certain stage forged by a past block, storing the key data, extracting data for guaranteeing the operation of the block in the next stage, and storing the data serving as the key data into the block header.
Compared with the existing mobile terminal forging block, the invention omits the link of the whole data verification, because the accounting manager 500 is adopted to print the verification label on the block in the stage, and extract the key information in the next stage and put the key information into the block head, when the validity of the stage data needs to be judged, only the data stored in the block head needs to be verified, but the large-volume block main body does not need to be verified synchronously.
The above-mentioned embodiments are only preferred embodiments of the present invention, and do not limit the technical scope of the present invention, so that the changes and modifications made by the claims and the specification of the present invention should fall within the scope of the present invention.

Claims (9)

1. A method for chain-type mobile terminal forging block is applied to an accounting block chain, and is characterized in that the method comprises the following steps:
s1, generating a key data memory of null value, 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 current stage are summarized and calculated, and a node list with the highest votes is generated; putting the list into a key data memory, further generating an account and a rights and interests data list of the nodes on the node list, putting the list into the key data memory, and putting all data of the key data memory into a block header;
s3, starting the mobile end node to perform logic processing of local data, extracting the block head of the last forging block of the previous stage after synchronizing the network data of the block chain, starting forging the block, and generating the block head of the current stage according to the current block chain protocol;
s4, extracting local unprocessed transactions and account lists, generating unprocessed transaction lists corresponding to accounts, circularly processing the unprocessed transaction lists, and then putting the processed transaction lists into the block header to finish block forging;
and S5, broadcasting the forged new block, acquiring a node list, and sending the newly generated block to all nodes in the list, thereby completing the 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 data exist locally or not, if so, extracting the local data and circularly checking the validity of the data;
s32, checking whether the block is legal, if the block is not legal, directly discarding the block, if the block is legal, extracting the block transaction, and circularly processing the transaction related to the corresponding account by reading the account list needing to be processed locally;
and S33, counting account in and out 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 claim 1, wherein the network data synchronization comprises:
s41, searching the local blockchain 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 blockchain network;
s42, if the height of the block of the mobile end node is higher than the height of the block of the highest node of the blockchain network, skipping network synchronization, if the height of the block of the mobile end node is equal to the height of the block of the highest node of the blockchain network, skipping network synchronization, and if the height of the block of the mobile end node is lower than the height of the block of the highest node of the blockchain network, acquiring the maximum height of the block;
s43, searching all the blocks after the high degree forging to the node with the highest block height, circularly receiving and processing the block transaction, and further completing the high degree synchronization of the block chain network.
4. A chain-linked mobile-end forging block system, comprising
A network manager: the system comprises a network scanning module, a network state management module, a node management module and a node management module, wherein the network scanning module is used for carrying out network scanning on the node and managing the network state of the node so as to analyze and record the network activity of the node;
the block manager: the system is used for synchronizing and checking the height of the node blocks, further starting to process the block transaction and finishing the block forging in the block time;
a transaction manager: the system 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 of nodes and the calculation power;
the voting manager: the system comprises a block chain, a plurality of nodes and a plurality of data processing units, wherein the block chain is used for distributing and calculating governance of the block chain, and a block forger at the next stage is calculated by receiving votes of the nodes on the block chain;
binding manager: used for marking the block forged in the current stage with a check label and extracting the key information of the next stage and placing the key information into the block head,
the system provides a connection channel for a mobile end node to perform direct connection block chain network through a network manager, completes node block height and block forging through the block manager, generates a hash value corresponding to a block head through a binding account manager in the block forging process, puts the hash value into a key data memory, obtains all voting transactions in the block forging process through the voting manager, further generates a node list with the highest votes for block forging, executes transaction processing and node account change in the block forging process through the transaction manager, and the network manager, the block manager, the transaction manager, the voting manager and the binding account manager are connected in a cross mesh manner and can perform data access mutually.
5. The system of claim 4, wherein the network manager comprises:
a network scanning module: network node scanning is carried out according to a detection protocol originally defined by the block chain network, so that a node IP address is obtained, and the validity of the node is verified;
a node management module: the system is used for managing the node list and analyzing and recording the available state of the node and the data duplex or semi-duplex communication type node;
a data receiving and transmitting module: the protocol used for receiving information of other nodes except the self node and sending information to other nodes follows the data transceiving process and comprises HTTP, HTTPS, Webscolet, WebRTC and Bluetooth.
6. The system of claim 4, wherein the block manager comprises:
a block synchronization module: the system is used for synchronizing block information in the network, and the block information is acquired by analyzing the block information lacking in the node of the network and informing a network manager of matching a proper node;
a block checking module: the key data storage is used for verifying the validity of the block obtained by the node, and the block information obtained by the block synchronization module can enter the node after being verified by the block verification module;
block forging module: for calculating the current block forger, performing block header height synchronization and node account detail change.
7. The system of claim 4, wherein the transaction manager comprises:
an account management module: the system comprises a key data storage, a node account, a block header information storage and a data processing module, wherein the key data storage is used for storing block header information of a transaction to be processed by the node;
a transaction synchronization module: the system is used for synchronizing the transaction data and determining whether the transaction data is synchronized according to the storage capacity and the transaction processing capacity contributed by the mobile terminal node;
the transaction processing module: for verifying and executing transactions, by verifying the validity of transactions and providing actual execution of transactions at the time of block forging, including transfers.
8. The system of claim 4, wherein the voting manager comprises:
the trustee management module: the system is used for receiving the application of the nodes as the trustees and managing the list of the applied trustees, and becomes a block smitter by receiving votes of other nodes;
the ticket collecting management module: the system is used for receiving the processing result of the voting transaction in the transaction manager, recording a voting list and providing support for subsequent ticket counting and node calculation rights and interests and benefits;
the ticket counting management module: the system is used for calculating votes acquired by the vote collecting management module, calculating the vote obtaining condition of each trustee and providing data query support for subsequent interest calculation.
9. The system of claim 4, wherein the accounting manager comprises:
a stage hashing module: the block forging device is used for performing Hash calculation on a block in a certain time period and judging the correctness of the block;
go into to enclose the management module: the system comprises a voting manager, a block head and a data base, wherein the voting manager is used for voting a block forging participant result list obtained by the voting of the voting manager to the block head and providing a data base for the subsequent calculation of the benefit and gain of a forging node;
the key data management module: the block header is used for summarizing and calculating key data of a block in a certain stage forged by a past block, storing the key data, extracting data for guaranteeing the operation of the block in the next stage, and storing the data serving as the key data into the block header.
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 true CN112486977A (en) 2021-03-12
CN112486977B 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112765682A (en) * 2021-04-07 2021-05-07 暗链科技(深圳)有限公司 Block data structure of block distributed block chain, storage medium and electronic equipment
CN113420325A (en) * 2021-06-07 2021-09-21 北京许继电气有限公司 Internet of things data management system and method based on block chain technology
CN115240316A (en) * 2022-07-21 2022-10-25 安世亚太科技股份有限公司 Chain 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

Cited By (5)

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

Also Published As

Publication number Publication date
CN112486977B (en) 2023-12-22

Similar Documents

Publication Publication Date Title
CN111861456B (en) Block chain-based 5G message transfer transaction verification method, system and device
US20210049596A1 (en) Resource transfer data management method and apparatus, and storage medium
CN112486977A (en) Method and system for forging block by chain-linked mobile terminal
CN111444512B (en) Mobile terminal blocking method and system for block chain
EP4191498A1 (en) Data communication method and apparatus, computer device, and storage medium
US20230259938A1 (en) Blockchain-based data processing method and apparatus, device, readable storage medium and computer program product
CN109508404A (en) Repair instructional video management method, device, terminal device and storage medium
CN106384222A (en) Insurance policy buyback method and system
CN111695978A (en) Block chain system for payroll distribution and payroll distribution method
CN111860865A (en) Model construction and analysis method, device, electronic equipment and medium
CN110071897A (en) A kind of block catenary system based on mobile terminal
CN110660466A (en) Personal health data chaining method and system of Internet of things by combining block chains
KR102100178B1 (en) System for check falsify recording file based on block chain and method performing thereof
CN109614430B (en) Configurable data acquisition and data verification system and method based on WLAN
CN110689348A (en) Income verification method, device, terminal and medium based on alliance chain
CN110598479B (en) Data processing method, device and computer readable storage medium
CN112184067A (en) Block chain system for witness sampling and witness sampling method
CN110555764B (en) Method and system for block chain consistency under decentralized environment
CN111556148A (en) Data sharing method, data sharing platform and device
CN116055403A (en) Message data transmission method, device and server
CN110070361A (en) Contract based on block chain deposits card method, equipment and storage medium
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
CN117010889A (en) Data processing method, device, equipment, medium and product
CN111967887A (en) Remote appraising method and system for digital stamps and coins and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
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.

GR01 Patent grant
GR01 Patent grant