CN112783976A - Consensus algorithm for flexibly packaging out blocks by allied block chains - Google Patents

Consensus algorithm for flexibly packaging out blocks by allied block chains Download PDF

Info

Publication number
CN112783976A
CN112783976A CN202110009090.0A CN202110009090A CN112783976A CN 112783976 A CN112783976 A CN 112783976A CN 202110009090 A CN202110009090 A CN 202110009090A CN 112783976 A CN112783976 A CN 112783976A
Authority
CN
China
Prior art keywords
information
unit
level
block
module
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
CN202110009090.0A
Other languages
Chinese (zh)
Other versions
CN112783976B (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.)
Shanghai Teku Information Technology Co ltd
Shanghai Tegao Information Technology Co ltd
Original Assignee
Shanghai Teku Information Technology Co ltd
Shanghai Tegao Information 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 Shanghai Teku Information Technology Co ltd, Shanghai Tegao Information Technology Co ltd filed Critical Shanghai Teku Information Technology Co ltd
Priority to CN202110009090.0A priority Critical patent/CN112783976B/en
Publication of CN112783976A publication Critical patent/CN112783976A/en
Application granted granted Critical
Publication of CN112783976B publication Critical patent/CN112783976B/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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to the technical field of block chains, and discloses a consensus algorithm for flexibly packaging out blocks by union block chains, which has the technical scheme that the consensus algorithm comprises a plurality of union block chain verification nodes, wherein the union block chain verification nodes are provided with a parameter synchronization module, a block verification module, a data packaging module and a flexible processing module, under the condition of no transaction in one day, the number of packaged empty blocks of the union block chain is greatly reduced, the number of generated empty blocks is less than two thousandth of the original number, the newly increased space of an account book is reduced by about ninety-nine percent, meanwhile, the calculation resources and network transmission data of all the union block chain verification nodes of the union block chain are also greatly reduced, each expansion or contraction is multiplied, so that the increased or reduced values are distributed too positively along with the change of time, and when a transaction occurs, a second algorithm is adopted for immediately outputting blocks, the accuracy of the transaction block is improved, and the problem of repeated transactions within the same time is prevented.

Description

Consensus algorithm for flexibly packaging out blocks by allied block chains
Technical Field
The invention relates to the technical field of block chains, in particular to a consensus algorithm for flexibly packaging blocks by an allied block chain.
Background
In a block chain network, an alliance chain has the advantage of high efficiency compared with a block chain which is packaged quantitatively, in order to improve response efficiency, the alliance chain adopts timing packaging, a single block does not limit the side rate of a storage space, but the alliance chain also generates a large number of empty blocks under the condition that the transaction frequency is not high, no transaction exists in each empty block, the state of an account is not changed, a certain storage space is still needed, the accumulation is day and month, a large amount of useless account space is occupied, and at the beginning of the deployment of the alliance block chain, the transaction amount is not high, and the transaction time is concentrated. Therefore, most of the space of the ledger is a useless empty block.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a consensus algorithm for flexibly packaging out blocks by an allied block chain, which is used for overcoming the defects in the prior art.
In order to achieve the purpose, the invention provides the following technical scheme: a consensus algorithm for flexibly packaging a block by an alliance block chain comprises a plurality of alliance block chain verification nodes, wherein each alliance block chain verification node is provided with a parameter synchronization module, a block verification module, a data packaging module and a flexible processing module;
the parameter synchronization module is configured with flexible configuration parameters, the flexible configuration parameters are provided with a flexible reference threshold, a flexible level, an expansion ratio and a contraction ratio, flexible configuration parameter proposals sent by all the alliance block chain verification nodes are obtained, the parameter synchronization module receives the flexible configuration parameter proposals sent by all the alliance block chain verification nodes for voting consensus, if the voting consensus result is achieved, the flexible configuration parameters which achieve consensus are sent to the data packaging module and the block verification module, and if the consensus is not achieved, the original flexible configuration parameters are sent to the data packaging module and the block verification module;
the block verification module receives closing information sent by the flexible processing module, sorts the transaction information sent by all the block chain verification nodes obtained under the telescopic reference threshold in the flexible configuration parameters, and then carries out voting consensus to obtain preliminary information, if the preliminary information is transaction information, the preliminary information generates reservation information, the reservation information is sent to the data packaging module, and if the preliminary information is no transaction information, the starting information is generated, and the starting information is sent to the flexible processing module;
the flexible processing module comprises a start-stop unit, a configuration unit, an expansion unit, a contraction unit and a comparison unit;
the start-stop unit is used for transmitting the start information to the configuration unit if receiving the start information entering the flexible processing stage generated by the block verification module, generating the closing information leaving the flexible processing stage if obtaining the comparison information sent by the comparison unit, and transmitting the closing information to the configuration unit and the block verification module;
the configuration unit is started if the starting information is received;
if the next block-out time information sent by the preset unit is received, transaction information sent by each block chain verification node is acquired, if the transaction information is not acquired in the next block-out time information, expansion information is generated and sent to the expansion unit, and if the transaction information is acquired in the next block-out time information, contraction information is generated and sent to the contraction unit;
if the configuration unit receives closing information sent by the flexible processing module, the configuration unit is closed, and the acquisition of the transaction information sent by each alliance block chain verification node is stopped;
if the expansion unit receives the expansion information sent by the configuration unit, the expansion unit calculates the next-stage expansion level through an expansion algorithm and sends the next-stage expansion level information to the expansion unit, the contraction unit and the data packaging module; if the telescopic level information of the lower stage is received, replacing the telescopic level of the upper stage;
if the contraction unit receives contraction information sent by the configuration unit, the contraction unit calculates to obtain the next-stage expansion level through a contraction algorithm, and sends the next-stage expansion level to the expansion unit, the contraction unit, the data packaging module and the comparison unit; if the telescopic level information of the lower stage is received, replacing the telescopic level of the original upper stage;
the comparison unit is used for obtaining the stretching level of the parameter synchronization module clock and receiving the stretching level of the next stage sent by the stretching unit to compare to obtain comparison information, if the stretching level of the next stage in the comparison information is equal to the stretching level, the comparison information is sent to the start-stop unit, and if the stretching level of the next stage in the comparison information is greater than the stretching level in the flexible configuration parameters, the comparison information is destroyed;
the data packing module comprises a threshold setting unit, a preset unit and a block output unit;
the threshold setting unit is used for sending the flexible configuration parameters to the preset unit if receiving the flexible configuration parameters sent by the block verification module and replacing the original flexible configuration parameters configured in the threshold setting unit, and sending the original flexible configuration parameters to the preset unit and the block discharging unit if receiving the reserved flexible configuration parameters sent by the block verification module;
the preset unit is used for receiving the flexible configuration parameters sent by the threshold setting unit, receiving the reservation information sent by the block verification module and the next-stage telescopic level information sent by the expansion unit and the contraction unit, converting the reservation information into the next-stage telescopic level information in the preset flexible configuration parameters, converting the received next-stage telescopic level information or the previous-stage telescopic level information into the next block output time information through first time algorithm calculation, and sending the next block output time information to the flexible processing module and the block output unit;
the block output unit is used for acquiring the flexible configuration parameters in the threshold setting unit, receiving transaction information sent by the node and next block output time information sent by the preset unit, if the transaction information is received, calculating the next block output time by adopting a second time algorithm, immediately packaging the blocks and performing whole-network broadcast voting to achieve consensus, and if the transaction information is not received, packaging the empty blocks according to the next block output time information and performing whole-network broadcast voting to achieve consensus.
As a further improvement of the present invention, the telescopic reference threshold value defaults to 10 s; the level of telescoping is defaulted to 1; the expansion ratio is greater than or equal to 1 and is defaulted to 2; the shrinkage proportion is less than or equal to 1 and greater than 0, and the default is 0.5.
As a further improvement of the invention, the block chain verification node of the alliance is also provided with a transaction initiating module, and a user conducts transaction through the transaction initiating module and sends transaction information all over the network.
As a further improvement of the present invention, the federation blockchain validation node includes a voting module configured with a consensus value, receiving transaction information and the flexible parameter configuration, sending the transaction information and the flexible parameter configuration over the whole network if the consensus percentage of the transaction information and the flexible parameter configuration is greater than the consensus value voting pass, and deleting the transaction information and the flexible parameter configuration if the consensus percentage of the transaction information and the flexible parameter configuration is greater than or less than the consensus value.
As a further refinement of the invention, the consensus value is eighty percent.
As a further improvement of the present invention, the extension unit includes an automatic stop subunit, the automatic stop subunit is configured with an upper limit value, if the lower stage telescopic level calculated by the extension algorithm is less than or equal to the upper limit value, the lower stage telescopic level is extended and sent to the data packing module, and if the lower stage telescopic level calculated by the extension algorithm is greater than the upper limit value, the lower stage telescopic level calculated by the extension algorithm is deleted, and the telescopic level equal to the upper limit value is sent to the data packing module.
As a further improvement of the present invention, the upper limit value of the self-stop subunit is seven hundred twenty.
As a further improvement of the present invention, the extension algorithm includes:
flex_leveln=flex_grow*flex_leveln-1
wherein the flex_level is the level of the next stage, flex_level-1 is the expansion level of the previous stage, and flex _ grow is the expansion ratio.
As a further improvement of the present invention, the puncturing algorithm comprises:
flex_leveln=flex_shrink*flex_leveln-1
wherein the flex_level is the level of the next stage, flex_level-1 is the expansion level of the previous stage, and flex _ shrink is the contraction proportion.
As a further refinement of the invention, the first time algorithm calculates:
T_next=T_now+flex_basis*flex_leveln
wherein T _ next is next block output time information, T _ now is last block packing output time, flex _ level is the scaling level of the next stage, and flex _ basis is a scaling reference threshold.
As a further refinement of the present invention, the second time algorithm calculates:
T_next=T_tx+flex_basis
wherein T _ next is next block time information, T _ tx is transaction information time, and flex _ basis is a scaling reference threshold.
The invention has the beneficial effects that: under the condition that no transaction exists in one day, the number of the packed empty blocks of the alliance block chain is greatly reduced, the number of the generated empty blocks is less than two thousandths of the original number, the newly-increased space of the account book is reduced by about ninety-nine percent, meanwhile, the computing resources and network transmission data of verification nodes of all the alliance block chains of the alliance block chain are also greatly reduced, the expansion or contraction of each time is multiplied, the increased or reduced values are enabled to be distributed too positively along with the change of time, and when the transaction occurs, the second algorithm is adopted to immediately perform block output, so that the accuracy of the block output of the transaction is improved, and the problem of repeated transaction in the same time is prevented.
Drawings
FIG. 1 is a schematic diagram of a consensus algorithm for flexibly packaging blocks of a block chain of federation blocks according to the present invention;
FIG. 2 is a schematic view of the flexible expansion phase at the block-out time;
fig. 3 is a schematic diagram of the soft contraction phase of the block-out time.
Reference numerals: 1. a federation blockchain verification node; 2. a parameter synchronization module; 3. a block verification module; 4. a data packing module; 41. a threshold setting unit; 42. a preset unit; 43. a block outlet unit; 5. a voting module; 6. a flexible processing module; 61. a start-stop unit; 62. a configuration unit; 63. an extension unit; 631. a self-stop subunit; 64. a contracting unit; 65. a comparison unit; 7. a transaction initiation module.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. In which like parts are designated by like reference numerals. It should be noted that the terms "front," "back," "left," "right," "upper" and "lower" used in the following description refer to directions in the drawings, and the terms "bottom" and "top," "inner" and "outer" refer to directions toward and away from, respectively, the geometric center of a particular component.
Specific example 1:
referring to fig. 1-3, the consensus algorithm for flexibly packaging a block by using an alliance block chain in this embodiment includes a plurality of alliance block chain verification nodes 1, where each alliance block chain verification node 1 is provided with a parameter synchronization module 2, a block verification module 3, a data packaging module 4, and a flexible processing module 6;
the parameter synchronization module 2 is configured with flexible configuration parameters, the flexible configuration parameters are provided with a flexible reference threshold, a flexible level, an expansion ratio and a contraction ratio, flexible configuration parameter proposals sent by all the block chain verification nodes 1 are obtained, the parameter synchronization module 2 receives the flexible configuration parameter proposals sent by all the block chain verification nodes 1 for voting consensus, if the voting consensus result is achieved, the agreed flexible configuration parameters are sent to the data packing module 4 and the block verification module 3, and if the consensus is not achieved, the original flexible configuration parameters are sent to the data packing module 4 and the block verification module 3; each federation blockchain verification node 1 can propose flexible configuration parameters through the parameter synchronization module 2 to perform network consensus, and can determine the most suitable flexible parameters for the current time period through the structure of big data.
The block verification module 3 receives the closing information sent by the flexible processing module 6, sorts the transaction information sent by the verification nodes 1 of each alliance block chain obtained under the telescopic reference threshold in the flexible configuration parameters, performs voting consensus to obtain preliminary information, sends the reservation information to the data packaging module 4 if the preliminary information is transaction information, and sends the starting information to the flexible processing module 6 if the preliminary information is no transaction information; the block verification module 3 can determine whether to enter the flexible processing stage for flexible processing or directly enter the packaging stage for packaging the block.
The flexible processing module 6 comprises a start-stop unit 61, a configuration unit 62, an expansion unit 63, a contraction unit 64 and a comparison unit 65;
the start-stop unit 61 is used for transmitting start-up information to the configuration unit 62 if receiving start-up information which is generated by the block verification module 3 and enters the flexible processing stage, and generating shutdown information which leaves the flexible processing stage and transmitting the shutdown information to the configuration unit 62 and the block verification module 3 if obtaining comparison information sent by the comparison unit 65;
a configuration unit 62, if receiving the start information, starting the configuration unit 62;
the configuration unit 62, if receiving the closing information sent by the flexible processing module 6, closes the configuration unit 62, and stops obtaining the transaction information sent by each block chain verification node 1;
at this time, if the next block-out time information sent by the preset unit 42 is received and the transaction information sent by each alliance block chain verification node 1 is acquired, if the transaction information is not acquired in the next block-out time information, the expansion information is generated and sent to the expansion unit 63, and if the acquired transaction information is acquired in the next block-out time information, the contraction information is generated and sent to the contraction unit 64;
the expanding unit 63, if receiving the expanding information sent by the configuration unit 62, obtains the next-stage stretching level through the calculation of the expanding algorithm, and sends the next-stage stretching level information to the expanding unit 63, the shrinking unit 64 and the data packing module 4; if the next-stage telescopic level information is received to replace the previous-stage telescopic level, the next block output time can be prolonged through the expanded next-stage telescopic level;
the contraction unit 64 calculates to obtain the next-stage expansion level through a contraction algorithm if receiving the contraction information sent by the configuration unit 62, and sends the next-stage expansion level to the expansion unit 63, the contraction unit 64, the data packaging module 4 and the comparison unit 65; if the next-stage expansion level information is received to replace the original previous-stage expansion level, the next block output time can be shortened through the expanded level after the expansion;
the comparison unit 65 is configured to obtain a comparison information by comparing the expansion level of the parameter synchronization module 2 with the next-stage expansion level sent by the receiving contraction unit 64, send the comparison information to the start-stop unit 61 if the next-stage expansion level in the comparison information is equal to the expansion level, and destroy the comparison information if the next-stage expansion level in the comparison information is greater than the expansion level in the flexible configuration parameter;
the data packing module 4 comprises a threshold setting unit 41, a presetting unit 42 and a block outputting unit 43;
the threshold setting unit 41 is configured to send the flexible configuration parameters to the presetting unit 42 if receiving the flexible configuration parameters sent by the block verification module 3 and replacing the original flexible configuration parameters configured in the threshold setting unit 41, and send the original flexible configuration parameters to the presetting unit 42 and the block discharging unit 43 if receiving the reserved flexible configuration parameters sent by the block verification module 3;
the preset unit 42 is configured to receive the flexible configuration parameters sent by the threshold setting unit 41, receive the reservation information sent by the block verification module 3, and the next-stage expansion and contraction level information sent by the expansion unit 63 and the contraction unit 64, convert the reservation information into the next-stage expansion and contraction level information in the preset flexible configuration parameters, convert the received next-stage expansion and contraction level information or the received previous-stage expansion and contraction level information into the next block output time information through the first time algorithm, and send the next block output time information to the flexible processing module 6 and the block output unit 43;
and a block output unit 43, configured to acquire the flexible configuration parameters in the threshold setting unit 41, and receive the transaction information sent by the alliance block chain verification node 1 and the next block output time information sent by the preset unit 42, if the transaction information is received, calculate a next block output time by using a second time algorithm, package the blocks immediately and broadcast and vote all over the network to achieve a consensus, and if the transaction information is not received, package the empty blocks according to the next block output time information and broadcast and vote all over the network to achieve a consensus.
The telescopic reference threshold value is defaulted to 10 s; the level of telescoping is defaulted to 1; the expansion ratio is greater than or equal to 1 and is defaulted to 2; the shrinkage proportion is less than or equal to 1 and greater than 0, and the default is 0.5.
By the mode, under the condition that no transaction occurs in one day, the number of the packed empty blocks of the alliance block chain can be greatly reduced, the number of the generated empty blocks is less than two thousandths of the original number, the newly increased space of the account book is reduced by about ninety-nine percent, meanwhile, the calculation resources and network transmission data of all the alliance block chain verification nodes 1 of the alliance block chain are also greatly reduced, the expansion or contraction is multiplied every time, the increased or reduced values are distributed just and too distributed along with the change of time, when a transaction occurs, the second algorithm is adopted to carry out block output immediately, the accuracy of the output blocks of the transaction is improved, and the problem of repeated transactions in the same time is prevented.
Example two:
different from the first embodiment, referring to fig. 1, the block chain verification node 1 of the alliance block chain verification alliance is further configured with a transaction initiation module, and a user conducts transaction through the transaction initiation module, sends transaction information over the whole network, and can complete initiation of the transaction through the transaction initiation module.
As a further improvement of the invention, the alliance block chain verification node 1 comprises a voting module 5, configured with a consensus value, and used for receiving transaction information and flexible parameter configuration, wherein if the consensus percentage of the transaction information and the flexible parameter configuration is larger than the consensus value voting pass, the transaction information and the flexible parameter configuration are sent through the whole network, if the consensus percentage of the transaction information and the flexible parameter configuration is larger than the consensus value smaller than the consensus value, the voting does not pass, and the transaction information and the flexible parameter configuration are deleted, so that the consensus value of the transaction information and the flexible parameter configuration is deleted to be eighty percent.
Through the voting module 5, not only can the flexible parameter configuration most suitable for the user be obtained, but also whether the transaction information is effective or not can be ensured.
Example three:
different from the first embodiment, referring to fig. 1, the extension unit 63 includes a stop sub-unit 631, the stop sub-unit 631 is configured with an upper limit value, if the lower stage expansion level calculated by the extension algorithm is smaller than or equal to the upper limit value, the extended time interval is sent to the data packing module 4, if the lower stage expansion level calculated by the extension algorithm is larger than the upper limit value, the calculated lower stage expansion level is deleted, and the expansion level equal to the upper limit value is sent to the data packing module 4, where the upper limit value of the stop sub-unit 631 is 720.
Through setting up stop subunit 631, prevented the unlimited problem of expanding of flexible level, in reality, the user often can come the subjective judgement block chain transaction through the packing number of times whether active, if not pack for a long time, can cause the problem that the user crowd descends.
Example four:
unlike the first embodiment, the extension algorithm includes:
flex_leveln=flex_grow*flex_leveln-1
wherein the flex_level is the next level of expansion, flex_level-1 is the level of the upper stage expansion and flex _ grow is the expansion ratio.
Referring to fig. 1, the puncturing algorithm includes:
flex_leveln=flex_shrink*flex_leveln-1
wherein the flex_level is the next level of expansion, flex_level-1 is the level of the last stage expansion and contraction, and flex _ shrink is the contraction proportion.
Referring to fig. 1, a first time algorithm calculates:
T_next=T_now+flex_basis*flex_leveln
wherein, T _ next is next block output time information, T _ now is block output time of last block packing, flex _ level is next stage scaling level, and flex _ basis is scaling reference threshold.
Referring to fig. 1, the second time algorithm calculates:
T_next=T_tx+flex_basis
wherein T _ next is next block time information, T _ tx is transaction information time, and flex _ basis is a scaling reference threshold.
The block packing and the expansion or contraction of the expansion level can be completed through the above formula.
The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above-mentioned embodiments, and all technical solutions belonging to the idea of the present invention belong to the protection scope of the present invention. It should be noted that modifications and embellishments within the scope of the invention may occur to those skilled in the art without departing from the principle of the invention, and are considered to be within the scope of the invention.

Claims (10)

1. A consensus algorithm for flexibly packaging out blocks by an alliance block chain comprises a plurality of alliance block chain verification nodes (1), and is characterized in that: the alliance block chain verification node (1) is provided with a parameter synchronization module (2), a block verification module (3), a data packing module (4) and a flexible processing module (6);
the parameter synchronization module (2) is configured with flexible configuration parameters, the flexible configuration parameters are provided with a flexible reference threshold, a flexible level, an expansion ratio and a contraction ratio, a flexible configuration parameter proposal sent by each alliance block chain verification node (1) is obtained, the parameter synchronization module (2) receives the flexible configuration parameter proposal initiated by each alliance block chain verification node (1) for voting consensus, if the voting consensus result is achieved, the flexible configuration parameters which achieve the consensus are sent to the data packing module (4) and the block verification module (3), and if the consensus is not achieved, the original flexible configuration parameters are sent to the data packing module (4) and the block verification module (3);
the block verification module (3) receives closing information sent by the flexible processing module (6), sorts the transaction information sent by each block chain verification node (1) obtained under the telescopic reference threshold in the flexible configuration parameter, and then performs voting consensus to obtain preliminary information, if the preliminary information is transaction information, the preliminary information generates reservation information, the reservation information is sent to the data packaging module (4), and if the preliminary information is no transaction information, the start information is sent to the flexible processing module (6);
the flexible processing module (6) comprises a start-stop unit (61), a configuration unit (62), an expansion unit (63), a contraction unit (64) and a comparison unit (65);
the start-stop unit (61) is used for transmitting the start-up information to the configuration unit (62) if receiving the start-up information which is generated by the block verification module (3) and enters the flexible processing stage, generating the closing information which leaves the flexible processing stage if obtaining the comparison information sent by the comparison unit (65), and transmitting the closing information to the configuration unit (62) and the block verification module (3);
the configuration unit (62), if receiving the start information, starting the configuration unit (62);
if the next block-out time information sent by a preset unit (42) is received and the transaction information sent by each alliance block chain verification node (1) is acquired, if the transaction information is not acquired in the next block-out time information, generating extension information and sending the extension information to an extension unit (63), and if the transaction information is acquired in the next block-out time information, generating contraction information and sending the contraction information to a contraction unit (64);
the configuration unit (62) is closed if the closing information sent by the flexible processing module (6) is received, and the acquisition of the transaction information sent by each alliance block chain verification node (1) is stopped;
if the expansion unit (63) receives the expansion information sent by the configuration unit (62), the expansion level of the next stage is obtained through calculation of an expansion algorithm, and the expansion level information of the next stage is sent to the expansion unit (63), the contraction unit (64) and the data packaging module (4); if the telescopic level information of the lower stage is received, replacing the telescopic level of the upper stage;
if the contraction unit (64) receives the contraction information sent by the configuration unit (62), calculating by a contraction algorithm to obtain a next-stage expansion level, and sending the next-stage expansion level to the expansion unit (63), the contraction unit (64), the data packing module (4) and the comparison unit (65); if the telescopic level information of the lower stage is received, replacing the telescopic level of the original upper stage;
the comparison unit (65) is used for obtaining the stretching level of the clock of the parameter synchronization module (2) and receiving the stretching level of the next stage sent by the contraction unit (64) to compare to obtain comparison information, if the stretching level of the next stage in the comparison information is equal to the stretching level, the comparison information is sent to the start-stop unit (61), and if the stretching level of the next stage in the comparison information is greater than the stretching level in the flexible configuration parameters, the comparison information is destroyed;
the data packing module (4) comprises a threshold setting unit (41), a preset unit (42) and a block outlet unit (43);
the threshold setting unit (41) is configured to send the flexible configuration parameters to the presetting unit (42) if receiving the flexible configuration parameters sent by the block verification module (3) and replacing the original flexible configuration parameters configured in the threshold setting unit (41), and send the original flexible configuration parameters to the presetting unit (42) and the block discharging unit (43) if receiving the flexible configuration parameters sent by the block verification module (3) and reserved;
the preset unit (42) receives the flexible configuration parameters sent by the threshold setting unit (41), receives the reservation information sent by the block verification module (3), and the next-stage telescopic level information sent by the expansion unit (63) and the contraction unit (64), converts the reservation information into the next-stage telescopic level information in the preset flexible configuration parameters, converts the received next-stage telescopic level information or the previous-stage telescopic level information into the next block-out time information through first time algorithm calculation, and sends the next block-out time information to the flexible processing module (6) and the block-out unit (43);
the block outlet unit (43) is configured to obtain the flexible configuration parameters in the threshold setting unit (41), receive transaction information sent by the node and next block outlet time information sent by the preset unit (42), calculate, by using a second time algorithm, a next block outlet time to immediately package the blocks and perform network-wide broadcast voting to achieve a consensus if the transaction information is received, and package the empty blocks and perform network-wide broadcast voting to achieve the consensus according to the next block outlet time information if the transaction information is not received.
2. The consensus algorithm for soft block packing of an alliance block chain as claimed in claim 1, wherein: the telescopic reference threshold value is defaulted to 10 s; the level of telescoping is defaulted to 1; the expansion ratio is greater than or equal to 1 and is defaulted to 2; the shrinkage proportion is less than or equal to 1 and greater than 0, and the default is 0.5.
3. The consensus algorithm for soft block packing of an alliance block chain as claimed in claim 1, wherein: the alliance block chain verification node (1) is also provided with a transaction initiating module (7), and a user conducts transaction through the transaction initiating module (7) and sends transaction information all over the network.
4. The consensus algorithm for soft block packing of an alliance block chain as claimed in claim 1, wherein: the alliance block chain verification node (1) comprises a voting module (5) which is configured with a consensus value, transaction information and the flexible parameter configuration are received, if the consensus percentage of the transaction information and the flexible parameter configuration is larger than the consensus value, voting is passed, the transaction information and the flexible parameter configuration are sent through the whole network, if the consensus percentage of the transaction information and the flexible parameter configuration is larger than the consensus value, voting is not passed, the transaction information and the flexible parameter configuration are deleted, and the consensus value is eighty percent.
5. The consensus algorithm for soft block packing of an alliance block chain as claimed in claim 1, wherein: the expansion unit (63) comprises a self-stopping subunit (631), the self-stopping subunit (631) is configured with an upper limit value, if the lower-stage expansion level calculated through an expansion algorithm is smaller than or equal to the upper limit value, the expansion level of the lower stage of the expansion is sent to the data packaging module (4), if the lower-stage expansion level calculated through the expansion algorithm is larger than the upper limit value, the lower-stage expansion level calculated through the expansion algorithm is deleted, and the expansion level equal to the upper limit value is sent to the data packaging module (4).
6. The consensus algorithm for soft block packing of an alliance block chain as claimed in claim 5, wherein: the upper limit value of the automatic stop subunit (631) is seven hundred twenty.
7. The consensus algorithm for soft block packing of an alliance block chain as claimed in claim 1, wherein: the expansion algorithm comprises:
flex_leveln=flex_grow*flex_leveln-1
wherein the flex_level is the level of the next stage, flex_level-1 is the expansion level of the previous stage, and flex _ grow is the expansion ratio.
8. The consensus algorithm for soft block packing of an alliance block chain as claimed in claim 1, wherein: the puncturing algorithm comprises:
flex_leveln=flex_shrink*flex_leveln-1
wherein the flex_level is the level of the next stage, flex_level-1 is the expansion level of the previous stage, and flex _ shrink is the contraction proportion.
9. The consensus algorithm for soft block packing of an alliance block chain as claimed in claim 1, wherein: the first time algorithm calculates:
T_next=T_now+flex_basis*flex_leveln
wherein T _ next is next block output time information, T _ now is last block packing output time, flex _ level is the scaling level of the next stage, and flex _ basis is a scaling reference threshold.
10. The consensus algorithm for soft block packing of an alliance block chain as claimed in claim 1, wherein: the second time algorithm calculates:
T_next=T_tx+flex_basis
wherein T _ next is next block time information, T _ tx is transaction information time, and flex _ basis is a scaling reference threshold.
CN202110009090.0A 2021-01-05 2021-01-05 Consensus system for flexible packaging of alliance blockchain Active CN112783976B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110009090.0A CN112783976B (en) 2021-01-05 2021-01-05 Consensus system for flexible packaging of alliance blockchain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110009090.0A CN112783976B (en) 2021-01-05 2021-01-05 Consensus system for flexible packaging of alliance blockchain

Publications (2)

Publication Number Publication Date
CN112783976A true CN112783976A (en) 2021-05-11
CN112783976B CN112783976B (en) 2024-01-26

Family

ID=75755468

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110009090.0A Active CN112783976B (en) 2021-01-05 2021-01-05 Consensus system for flexible packaging of alliance blockchain

Country Status (1)

Country Link
CN (1) CN112783976B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113420017A (en) * 2021-06-21 2021-09-21 上海特高信息技术有限公司 Block chain application method for acquiring robot navigation algorithm training data set
CN114385647A (en) * 2021-12-15 2022-04-22 达闼科技(北京)有限公司 Alliance link-out block method and device, electronic equipment and medium
CN115186035A (en) * 2022-09-13 2022-10-14 腾讯科技(深圳)有限公司 Block processing method, related system, storage medium and server

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108921535A (en) * 2018-07-16 2018-11-30 夸克链科技(深圳)有限公司 A kind of block of block chain seals mechanism up for safekeeping
CN108984744A (en) * 2018-07-16 2018-12-11 夸克链科技(深圳)有限公司 A kind of non-master chain block self-propagation method
CN109165324A (en) * 2018-08-20 2019-01-08 深圳市元征科技股份有限公司 A kind of transaction data packaging method and relevant apparatus
CN109964242A (en) * 2018-05-25 2019-07-02 北京大学深圳研究生院 A kind of block chain common recognition method based on trusting relationship
US20200012731A1 (en) * 2018-07-03 2020-01-09 International Business Machines Corporation Controlling volatility via blockchain
CN111177258A (en) * 2019-12-13 2020-05-19 浙商银行股份有限公司 Adaptive configuration transaction packaging method based on block chain platform
CN111507717A (en) * 2020-04-20 2020-08-07 腾讯科技(深圳)有限公司 Data processing method, device, block node and computer readable storage medium
CN111612472A (en) * 2020-06-10 2020-09-01 上海黔链科技有限公司 Block chain authoritative node authorization consensus algorithm
CN111695123A (en) * 2020-04-27 2020-09-22 华东师范大学 Block chain-oriented optimistic concurrency order-preserving coding method for reducing conflict

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109964242A (en) * 2018-05-25 2019-07-02 北京大学深圳研究生院 A kind of block chain common recognition method based on trusting relationship
US20200012731A1 (en) * 2018-07-03 2020-01-09 International Business Machines Corporation Controlling volatility via blockchain
CN108921535A (en) * 2018-07-16 2018-11-30 夸克链科技(深圳)有限公司 A kind of block of block chain seals mechanism up for safekeeping
CN108984744A (en) * 2018-07-16 2018-12-11 夸克链科技(深圳)有限公司 A kind of non-master chain block self-propagation method
CN109165324A (en) * 2018-08-20 2019-01-08 深圳市元征科技股份有限公司 A kind of transaction data packaging method and relevant apparatus
CN111177258A (en) * 2019-12-13 2020-05-19 浙商银行股份有限公司 Adaptive configuration transaction packaging method based on block chain platform
CN111507717A (en) * 2020-04-20 2020-08-07 腾讯科技(深圳)有限公司 Data processing method, device, block node and computer readable storage medium
CN111695123A (en) * 2020-04-27 2020-09-22 华东师范大学 Block chain-oriented optimistic concurrency order-preserving coding method for reducing conflict
CN111612472A (en) * 2020-06-10 2020-09-01 上海黔链科技有限公司 Block chain authoritative node authorization consensus algorithm

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Y. TAO 等: "On Sharding Open Blockchains with Smart Contracts", 2020 IEEE 36TH INTERNATIONAL CONFERENCE ON DATA ENGINEERING (ICDE), pages 1357 - 1368 *
程华峥: "基于区块链的分布式可信***技术研究及应用", 中国优秀硕士学位论文全文数据库 信息科技辑, no. 07, pages 138 - 706 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113420017A (en) * 2021-06-21 2021-09-21 上海特高信息技术有限公司 Block chain application method for acquiring robot navigation algorithm training data set
CN113420017B (en) * 2021-06-21 2023-10-13 上海特高信息技术有限公司 Block chain application method for acquiring training data set of robot navigation algorithm
CN114385647A (en) * 2021-12-15 2022-04-22 达闼科技(北京)有限公司 Alliance link-out block method and device, electronic equipment and medium
WO2023109040A1 (en) * 2021-12-15 2023-06-22 达闼科技(北京)有限公司 Alliance chain block generation method and apparatus, electronic device, and medium
CN115186035A (en) * 2022-09-13 2022-10-14 腾讯科技(深圳)有限公司 Block processing method, related system, storage medium and server
CN115186035B (en) * 2022-09-13 2022-11-22 腾讯科技(深圳)有限公司 Block processing method, related system, storage medium and server

Also Published As

Publication number Publication date
CN112783976B (en) 2024-01-26

Similar Documents

Publication Publication Date Title
CN112783976A (en) Consensus algorithm for flexibly packaging out blocks by allied block chains
CN112968967B (en) Block synchronization method and device
CN106991607A (en) A kind of unordered transaction control method based on block chain account model
US8472308B2 (en) Method for generating a preamble sequence and a method for determining a cyclic shift
CN101336003B (en) Method for generating preamble sequence and method for determining step length of cyclic shift
CN101534280B (en) Timing synchronous receiving method and device thereof
JP5592001B2 (en) Data transmission including multiplexing and demultiplexing of embedded clock signals
US5621775A (en) Device for justifying a digital bit stream at regular intervals
CN113139871A (en) Adaptive consensus on block chain method, apparatus and computer readable storage medium
JP2620477B2 (en) Digital signal transmission method and apparatus
US20230007606A1 (en) Method for time synchronization, method for broadcast setting, chip, electronic device, and storage medium
CN112737762A (en) Time calibration method and device, equipment to be calibrated and storage medium
CN111597268B (en) Block chain extension method, block chain node and block chain system
CN108400829B (en) method and device for generating ZC sequence
CN107124204B (en) A kind of ultra wide band synchronization method of numerical model analysis
CN105119630A (en) Spread spectrum digital receiver capturing and tracking code phase synchronous circuit
CN114615104B (en) Intelligent serial port communication method and system based on domestic FPGA
KR100337389B1 (en) Apparatus for acquisition of synchronization of PN signal using matching filter in digital communication system and method therefor
JP2859604B2 (en) Sliding correlator
JP3428238B2 (en) Data processing device
CN103326828B (en) The conversion of time format and the sending method of message in communication network based on IEEE1588 agreement
US20150358119A1 (en) Method and device for reducing bit error rate in CDMA communication system
CN112632459A (en) On-line computation element for deep convolution
JP2768384B2 (en) Burst adaptation method in ATM network
FR2629608A1 (en) METHOD AND DEVICE FOR RECEIVING SYNCHRONIZATION OF A LOCAL CLOCK OF A STATION OF A COMMUNICATION NETWORK, ESPECIALLY OF A MOTOR VEHICLE

Legal Events

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