CN112486518B - Consensus algorithm assembling method and device - Google Patents

Consensus algorithm assembling method and device Download PDF

Info

Publication number
CN112486518B
CN112486518B CN202011388335.7A CN202011388335A CN112486518B CN 112486518 B CN112486518 B CN 112486518B CN 202011388335 A CN202011388335 A CN 202011388335A CN 112486518 B CN112486518 B CN 112486518B
Authority
CN
China
Prior art keywords
module
consensus algorithm
blockchain system
block chain
consensus
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011388335.7A
Other languages
Chinese (zh)
Other versions
CN112486518A (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.)
Beijing Microchip Blockchain And Edge Computing Research Institute
Original Assignee
Beijing Microchip Blockchain And Edge Computing Research Institute
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 Beijing Microchip Blockchain And Edge Computing Research Institute filed Critical Beijing Microchip Blockchain And Edge Computing Research Institute
Priority to CN202011388335.7A priority Critical patent/CN112486518B/en
Publication of CN112486518A publication Critical patent/CN112486518A/en
Application granted granted Critical
Publication of CN112486518B publication Critical patent/CN112486518B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/44Program or device authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a consensus algorithm assembling method and device, wherein the method comprises the following steps: if the assembly task is detected, acquiring a block chain system module from a block chain system library according to the pre-configuration information of the assembly task, and acquiring a corresponding consensus algorithm module from a consensus algorithm library according to the pre-configuration information; performing module verification on the block chain system module and the consensus algorithm module; if the module passes the verification, the consensus algorithm module and the block chain system module are assembled and packaged to generate a deployment file. The method adopts the modular and assemblable idea, maintains the consensus algorithm of the blockchain as an independent consensus algorithm module, and when the system is released, the required consensus algorithm module is assembled and packaged according to the demand of the system module in a customized way according to the pre-configuration information to form a file set capable of being deployed and operated. And all the consensus algorithms are not required to be integrated in the deployment file, so that the capacity of the deployment file is effectively reduced, and the block chain system is prevented from being switched among a plurality of consensus algorithms.

Description

Consensus algorithm assembling method and device
Technical Field
The invention relates to the technical field of blockchain, in particular to a method and a device for assembling a consensus algorithm.
Background
In the blockchain, due to the decentralised design, nodes are distributed and parallel everywhere, a set of systems must be designed to maintain the order and fairness of operation of the system, unify the version of the blockchain, and rewards users providing resource maintenance blockchains, and penalize malicious harmfulers. Such a regime must rely on some way to prove by whom a blockchain package (or billing) is taken and can obtain rewards for packaging that block; or who intends to do the hazard, a certain penalty is obtained, which is a consensus mechanism. In a blockchain network, different consensus algorithms are often required to be adopted due to different application scenarios.
However, in the existing blockchain consensus processing method, multiple corresponding consensus interfaces are required to be set for multiple different consensus algorithms, so that the interfaces are too many. Each type of consensus algorithm uses a different set of interfaces, if multiple consensus algorithms are supported, the number of interface definitions in the system is the sum of the number of interfaces of all consensus algorithms, and maintenance is inconvenient, so that the complexity of the blockchain system is high. Because each type of consensus algorithm uses a respective interface, each type of consensus algorithm also needs to be matched with a consensus scheduling flow to correspond, and further the code quantity and the complexity of the system are increased.
Disclosure of Invention
Aiming at the problems existing in the prior art, the invention provides a method and a device for assembling a consensus algorithm.
The invention provides a consensus algorithm assembling method, which comprises the following steps: if the assembly task is detected, acquiring a block chain system module from a block chain system library according to the pre-configuration information of the assembly task, and acquiring a corresponding consensus algorithm module from a consensus algorithm library according to the pre-configuration information; performing module verification on the block chain system module and the consensus algorithm module; if the module verification is passed, assembling the consensus algorithm module and the blockchain system module, and packaging to generate a deployment file; wherein, a plurality of consensus algorithm modules are stored and managed in the consensus algorithm library; a plurality of blockchain system modules are stored and managed in a blockchain system library.
According to the method for assembling the consensus algorithm, the module verification of the block chain system module and the consensus algorithm module comprises the following steps: and respectively carrying out integrity check and/or module version check on the block chain system module and the consensus algorithm module.
According to the consensus algorithm assembly method of the present invention, before the block chain system module is obtained from the block chain system library according to the pre-configuration information of the assembly task, the method further comprises: and receiving the blockchain system and version selected by the administrator, the consensus algorithm and version compatible with the blockchain system, and the set blockchain system and consensus algorithm parameters, and generating the preconfiguration information.
According to the consensus algorithm assembling method of the present invention, after the pre-configuration information is generated, the method further includes: checking the preconfigured information according to prestored dependency relationships and conflict relationships among application scenes, consensus algorithms and a blockchain system; if the verification is not passed, recommending and displaying through a human-computer interface according to the input application scene and the blockchain system in the preconfigured information, and the version of the consensus algorithm module and the corresponding parameters which meet the dependency relationship and the collision avoidance relationship with the blockchain system.
According to the consensus algorithm assembling method of the invention, the pre-configuration information comprises the following steps: block chain system identification, block chain system version, consensus algorithm identification, consensus algorithm version, and consensus algorithm parameters.
According to the consensus algorithm assembling method, after the deployment file is generated by packaging, the method further comprises the following steps: and carrying out module interface suitability verification on the deployment file, and if the verification is passed, issuing the deployment file.
According to the consensus algorithm assembly method provided by the invention, the module interface suitability verification is carried out on the deployment file, and the method comprises the following steps: verifying consistency of declaration and reference data types of interfaces between two modules, or simulating operation correctness of a test deployment file by using an automatic test service.
The invention also provides a consensus algorithm assembling device, which comprises: the acquisition module is used for acquiring the block chain system module from the block chain system library according to the pre-configuration information of the assembly task if the assembly task is detected, and acquiring the corresponding consensus algorithm module from the consensus algorithm library according to the pre-configuration information; the verification module is used for carrying out module verification on the block chain system module and the consensus algorithm module; the assembly module is used for assembling the consensus algorithm module and the blockchain system module if the module passes the verification, and packaging to generate a deployment file; wherein, a plurality of consensus algorithm modules are stored and managed in the consensus algorithm library; a plurality of blockchain system modules are stored and managed in a blockchain system library.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the consensus algorithm assembly method as described in any of the above when executing the program.
The invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the consensus algorithm assembly method as described in any of the preceding.
According to the method and the device for assembling the consensus algorithm, the modular and assemblable idea is adopted, the consensus algorithm of the block chain is maintained as an independent consensus algorithm module, when the system is released, the requirement of the system module is considered in a customized mode according to the preconfiguration information, and the required consensus algorithm module is assembled and packaged to form a file set capable of being deployed and operated. And all the consensus algorithms are not required to be integrated in the deployment file, so that the capacity of the deployment file is effectively reduced, meanwhile, the block chain system is prevented from being switched among a plurality of consensus algorithms, and the operation efficiency of the block chain system is improved.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of an assembly method of a consensus algorithm provided by the present invention;
FIG. 2 is a second flow chart of the method for assembling the consensus algorithm according to the present invention;
FIG. 3 is a schematic structural diagram of the assembly device of the consensus algorithm provided by the present invention;
fig. 4 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The consensus algorithm assembly method and apparatus of the present invention are described below in conjunction with fig. 1-4. Fig. 1 is a schematic flow chart of an assembling method of a consensus algorithm provided by the present invention, and as shown in fig. 1, the present invention provides an assembling method of a consensus algorithm, including:
101. if the assembly task is detected, acquiring a block chain system module from a block chain system library according to the pre-configuration information of the assembly task, and acquiring a corresponding consensus algorithm module from a consensus algorithm library according to the pre-configuration information.
The blockchain system module is a collection of various library files for blockchain operation, including network contracts, ledger wall storage and the like, but does not include modules corresponding to a consensus algorithm. Accordingly, the consensus algorithm module is a module that provides a consensus algorithm. And storing and managing various consensus algorithm modules in a consensus algorithm library, and storing and managing various block chain system modules in a block chain system library.
When the consensus algorithm assembly service is provided, an assembly module can be arranged to realize the assembly of the modules. And each time there is an assembly task, the administrator issues pre-configuration information of the assembly task. The pre-configuration information has a matching relation between a consensus algorithm module and a block chain system module.
An administrator maintains all versions of the consensus algorithm module and blockchain system module on the assembly module. And customizing the assembly setting of the consensus algorithm module of the blockchain system on the assembly service, and issuing the assembly setting in the form of pre-configuration information. When the assembly task is executed, the assembly module obtains corresponding modules from the consensus algorithm library and the blockchain system library respectively according to the pre-configuration information. The consensus module interface adopts standardized definition and adapts to different types of consensus algorithms.
102. And carrying out module verification on the block chain system module and the consensus algorithm module.
After the two types of modules are obtained, module verification, such as verifying the integrity of the modules, needs to be performed respectively.
The consensus algorithm library stores and manages the consensus algorithm modules, and stores attribute information of the consensus algorithm modules, including consensus algorithm versions, consensus algorithm parameters, consensus algorithm module abstract information, consensus algorithm module submitting information and the like.
The blockchain system library stores and manages the blockchain system modules, and stores attribute information of the blockchain system modules, including blockchain system module versions, blockchain system module parameters, blockchain system module abstract information, blockchain system module submission information and the like.
In one embodiment, the block chain system module and the consensus algorithm module are module verified, including verifying based on attribute information of the block chain system module and the consensus algorithm module.
103. And if the module verification is passed, assembling the consensus algorithm module and the blockchain system module, and packaging to generate a deployment file.
After the module is checked, the assembly service assembles the consensus algorithm module and the block chain system module, packages the assembly to generate a final deployment file, and submits the final deployment file to each node of the network for application. The assembly mode can be based on the compiling and packing treatment of the whole system according to multi-module items by a module construction tool (such as Ant, maven, gradle and the like).
According to the consensus algorithm assembling method provided by the invention, the modular and assemblable idea is adopted, the consensus algorithm of the block chain is maintained as an independent consensus algorithm module, and when the system is released, the required consensus algorithm module is assembled and packaged according to the demand of the system module in a customized way according to the preconfiguration information, so that a file set capable of being deployed and operated is formed. And all the consensus algorithms are not required to be integrated in the deployment file, so that the capacity of the deployment file is effectively reduced, meanwhile, the block chain system is prevented from being switched among a plurality of consensus algorithms, and the operation efficiency of the block chain system is improved.
In one embodiment, performing module verification on the blockchain system module and the consensus algorithm module includes: and respectively carrying out integrity check and/or module version check on the block chain system module and the consensus algorithm module.
Integrity checking, namely verifying whether the transmitted module is damaged or missing; the module version verification, in order to avoid situations such as version updating, causes the module of the error version to be acquired. The correlation verification may be performed based on the attribute information mentioned in 102 above. Correspondingly, if the integrity check fails or the module version check fails, the corresponding module is acquired again.
In one embodiment, before the obtaining the blockchain system module from the blockchain system library according to the pre-configuration information of the assembly task, the method further includes: and receiving the block chain system and version selected by the administrator, and generating the preconfiguration information by a consensus algorithm and version compatible with the block chain system and set block chain system and consensus algorithm parameters.
That is, an administrator may customize the assembly settings of the consensus algorithm modules of each blockchain system on the assembly service, form pre-configuration information, and then send to the consensus algorithm assembly service. After the assembly module detects the assembly task, the pre-configuration information is read first, and the operation 101 is performed according to the pre-configuration information. The tasks of configuration include, but are not limited to: and selecting a block chain system and a corresponding version, selecting a consensus algorithm and a corresponding version according to compatibility, and setting parameters of the related block chain system and the consensus algorithm.
In one embodiment, after generating the pre-configuration information, the method further includes: checking the preconfigured information according to prestored dependency relationships and conflict relationships among application scenes, consensus algorithms and a blockchain system; if the verification is not passed, recommending and displaying through a human-computer interface according to the input application scene and the blockchain system in the preconfigured information, and the version of the consensus algorithm module and the corresponding parameters which meet the dependency relationship and the collision avoidance relationship with the blockchain system.
The assembly module can automatically check the dependency of the assembly task and prompt the possible conflict situation, if the verification is not passed, prompt is carried out, and the consensus algorithm module meeting the dependency relationship and the conflict relationship can be recommended and displayed through a human-computer interface. Based on a preset applicable scene, the assembly module provides a recommendation function of the consensus algorithm according to the blockchain system and the target scene selected by the user, shields the consensus algorithm which is not compatible with the application scene and the identification version of the blockchain system, and recommends to adopt the identification version and parameters of the consensus algorithm which are more suitable for the scene from the compatible consensus algorithm. The method can effectively avoid the situation that the consensus algorithm is unavailable due to the error configuration of the administrator.
In one embodiment, the pre-configuration information includes: block chain system identification, block chain system version, consensus algorithm identification, consensus algorithm version, and consensus algorithm parameters.
Wherein the blockchain system identifier is a unique identifier of the blockchain system for identifying different types of blockchains, the differently identified blockchain systems representing a unique set of characteristics including: the method is applicable to application fields, node scales, consensus algorithm characteristics, intelligent contract characteristics, account book scales, whether multiple chains exist, whether chain crossing exists or not and the like.
The blockchain system version is a number of different versions for a blockchain system identifier, and is used for identifying version information of the blockchain system under the same feature set. For system upgrade, functional perfection, etc., version change is performed for a certain identified blockchain system.
The identity of the consensus algorithm, which is a unique identity of the consensus algorithm, represents a unique set of features of the consensus algorithm, including, but not limited to: whether or not the Byzantine fault tolerance, minimum node number requirements, maximum throughput supportable, whether or not the members are dynamically manageable, whether or not compatible with a particular blockchain system, a list of applicable scenarios, and the like.
The version of the consensus algorithm is the number of different versions identified by a certain consensus algorithm and is used for identifying the version information of the consensus algorithm under the same feature set. And in consideration of algorithm upgrading, functional perfection and the like, version change is carried out on a certain identified consensus algorithm.
Consensus algorithm parameters, including, but not limited to: block out interval, block size, etc.
The corresponding blockchain system module can be searched according to the blockchain system identifier and the blockchain system version. Searching a corresponding consensus algorithm module according to the consensus algorithm identification and the consensus algorithm version, setting parameters of the consensus algorithm module according to the consensus algorithm parameters, and then packaging.
In one embodiment, after the deployment file is generated by packaging, the method further comprises: and carrying out module interface suitability verification on the deployment file, and if the verification is passed, issuing the deployment file.
In one embodiment, performing module interface suitability verification on the deployment file includes: verifying consistency of declaration and reference data types of interfaces between two modules, or simulating operation correctness of a test deployment file by using an automatic test service.
Each module is provided with a corresponding data interface, after the deployment file is packed and generated, the consistency of the blockchain system and the consensus algorithm interface is verified by semantic checking, and meanwhile, whether the mutual reference data between the blockchain system and the consensus algorithm interface are consistent is verified, and if the mutual reference data are met, the verification is passed. And the packaged deployment file can be simulated by an automatic test service, whether the operation result is abnormal or not is checked after the operation, and if the operation result is abnormal, the verification is passed.
Fig. 2 is a second flow chart of the assembling method of the consensus algorithm provided by the present invention, and the detailed description thereof will be omitted herein with reference to the above embodiments and fig. 2.
The following describes the assembly device of the consensus algorithm provided by the present invention, and the assembly device of the consensus algorithm described below and the assembly method of the consensus algorithm described above can be referred to correspondingly.
Fig. 3 is a schematic structural diagram of a consensus algorithm assembling device provided by the present invention, as shown in fig. 3, the consensus algorithm assembling device includes: an acquisition module 301, a verification module 302 and a fitting module 303. The acquiring module 301 is configured to acquire a blockchain system module from a blockchain system library according to pre-configuration information of an assembly task if the assembly task is detected, and acquire a corresponding consensus algorithm module from the consensus algorithm library according to the pre-configuration information; the verification module 302 is configured to perform module verification on the blockchain system module and the consensus algorithm module; the assembling module 303 is configured to assemble the consensus algorithm module and the blockchain system module if the module verification passes, and package the assembly module to generate a deployment file; wherein, a plurality of consensus algorithm modules are stored and managed in the consensus algorithm library; a plurality of blockchain system modules are stored and managed in a blockchain system library.
The embodiment of the device provided by the invention is for implementing the above embodiments of the method, and specific flow and details refer to the above embodiments of the method, which are not repeated herein.
The consensus algorithm assembling device provided by the invention adopts the modular and assemblable idea, the consensus algorithm of the block chain is maintained as an independent consensus algorithm module, and when the system is released, the required consensus algorithm module is assembled and packaged according to the demand of the system module in a customized way according to the preconfiguration information, so that a file set capable of being deployed and operated is formed. And all the consensus algorithms are not required to be integrated in the deployment file, so that the capacity of the deployment file is effectively reduced, meanwhile, the block chain system is prevented from being switched among a plurality of consensus algorithms, and the operation efficiency of the block chain system is improved.
Fig. 4 is a schematic structural diagram of an electronic device according to the present invention, as shown in fig. 4, the electronic device may include: a processor (processor) 401, a communication interface (Communications Interface) 402, a memory (memory) 403 and a communication bus 404, wherein the processor 401, the communication interface 402 and the memory 403 complete communication with each other through the communication bus 404. The processor 401 may call logic instructions in the memory 403 to perform a consensus algorithm assembly method comprising: if the assembly task is detected, acquiring a block chain system module from a block chain system library according to the pre-configuration information of the assembly task, and acquiring a corresponding consensus algorithm module from a consensus algorithm library according to the pre-configuration information; performing module verification on the block chain system module and the consensus algorithm module; if the module verification is passed, assembling the consensus algorithm module and the blockchain system module, and packaging to generate a deployment file; wherein, a plurality of consensus algorithm modules are stored and managed in the consensus algorithm library; a plurality of blockchain system modules are stored and managed in a blockchain system library.
Further, the logic instructions in the memory 403 may be implemented in the form of software functional units and stored in a computer readable storage medium when sold or used as a stand alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method of assembling a consensus algorithm provided by the methods described above, the method comprising: if the assembly task is detected, acquiring a block chain system module from a block chain system library according to the pre-configuration information of the assembly task, and acquiring a corresponding consensus algorithm module from a consensus algorithm library according to the pre-configuration information; performing module verification on the block chain system module and the consensus algorithm module; if the module verification is passed, assembling the consensus algorithm module and the blockchain system module, and packaging to generate a deployment file; wherein, a plurality of consensus algorithm modules are stored and managed in the consensus algorithm library; a plurality of blockchain system modules are stored and managed in a blockchain system library.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the consensus algorithm assembling method provided by the embodiments above, the method comprising: if the assembly task is detected, acquiring a block chain system module from a block chain system library according to the pre-configuration information of the assembly task, and acquiring a corresponding consensus algorithm module from a consensus algorithm library according to the pre-configuration information; performing module verification on the block chain system module and the consensus algorithm module; if the module verification is passed, assembling the consensus algorithm module and the blockchain system module, and packaging to generate a deployment file; wherein, a plurality of consensus algorithm modules are stored and managed in the consensus algorithm library; a plurality of blockchain system modules are stored and managed in a blockchain system library.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (8)

1. A method of assembling a consensus algorithm, comprising:
if the assembly task is detected, acquiring a block chain system module from a block chain system library according to the pre-configuration information of the assembly task, and acquiring a corresponding consensus algorithm module from a consensus algorithm library according to the pre-configuration information;
performing module verification on the block chain system module and the consensus algorithm module;
if the module verification is passed, assembling the consensus algorithm module and the blockchain system module, and packaging to generate a deployment file;
wherein, a plurality of consensus algorithm modules are stored and managed in the consensus algorithm library; storing and managing a plurality of blockchain system modules in a blockchain system library;
before obtaining the blockchain system module from the blockchain system library according to the pre-configuration information of the assembly task, the method further comprises the following steps:
receiving a blockchain system and a version selected by an administrator, a consensus algorithm and a version compatible with the blockchain system, and set blockchain system and consensus algorithm parameters, and generating the preconfiguration information;
after the pre-configuration information is generated, the method further comprises:
checking the preconfigured information according to prestored dependency relationships and conflict relationships among application scenes, consensus algorithms and a blockchain system;
if the verification is not passed, recommending and displaying through a human-computer interface according to the input application scene and the blockchain system in the preconfigured information, and the version of the consensus algorithm module and the corresponding parameters which meet the dependency relationship and the collision avoidance relationship with the blockchain system.
2. The method of assembling a consensus algorithm according to claim 1, wherein said performing module verification on the blockchain system module and the consensus algorithm module comprises:
and respectively carrying out integrity check and/or module version check on the block chain system module and the consensus algorithm module.
3. The consensus algorithm assembling method according to claim 1, wherein the pre-configuration information comprises:
block chain system identification, block chain system version, consensus algorithm identification, consensus algorithm version, and consensus algorithm parameters.
4. The method for assembling a consensus algorithm according to claim 1, further comprising, after the packaging generates the deployment file:
and carrying out module interface suitability verification on the deployment file, and if the verification is passed, issuing the deployment file.
5. The method of assembling a consensus algorithm according to claim 4, wherein said verifying the suitability of the module interface for the deployment file comprises:
verifying consistency of declaration and reference data types of interfaces between two modules, or simulating operation correctness of a test deployment file by using an automatic test service.
6. A consensus algorithm assembling device, comprising:
the acquisition module is used for acquiring the block chain system module from the block chain system library according to the pre-configuration information of the assembly task if the assembly task is detected, and acquiring the corresponding consensus algorithm module from the consensus algorithm library according to the pre-configuration information;
the verification module is used for carrying out module verification on the block chain system module and the consensus algorithm module;
the assembly module is used for assembling the consensus algorithm module and the blockchain system module if the module passes the verification, and packaging to generate a deployment file;
wherein, a plurality of consensus algorithm modules are stored and managed in the consensus algorithm library; storing and managing a plurality of blockchain system modules in a blockchain system library;
before obtaining the blockchain system module from the blockchain system library according to the pre-configuration information of the assembly task, the method further comprises the following steps:
receiving a blockchain system and a version selected by an administrator, a consensus algorithm and a version compatible with the blockchain system, and set blockchain system and consensus algorithm parameters, and generating the preconfiguration information;
after the pre-configuration information is generated, the method further comprises:
checking the preconfigured information according to prestored dependency relationships and conflict relationships among application scenes, consensus algorithms and a blockchain system;
if the verification is not passed, recommending and displaying through a human-computer interface according to the input application scene and the blockchain system in the preconfigured information, and the version of the consensus algorithm module and the corresponding parameters which meet the dependency relationship and the collision avoidance relationship with the blockchain system.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the consensus algorithm assembling method according to any of the claims 1 to 5 when the program is executed.
8. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the steps of the consensus algorithm assembling method according to any of the claims 1 to 5.
CN202011388335.7A 2020-12-01 2020-12-01 Consensus algorithm assembling method and device Active CN112486518B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011388335.7A CN112486518B (en) 2020-12-01 2020-12-01 Consensus algorithm assembling method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011388335.7A CN112486518B (en) 2020-12-01 2020-12-01 Consensus algorithm assembling method and device

Publications (2)

Publication Number Publication Date
CN112486518A CN112486518A (en) 2021-03-12
CN112486518B true CN112486518B (en) 2024-03-12

Family

ID=74938786

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011388335.7A Active CN112486518B (en) 2020-12-01 2020-12-01 Consensus algorithm assembling method and device

Country Status (1)

Country Link
CN (1) CN112486518B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114296831A (en) * 2021-12-30 2022-04-08 迅鳐成都科技有限公司 Dynamic loading method, device and system for block chain consensus algorithm and storage medium
CN117455473A (en) * 2022-07-07 2024-01-26 汇丰软件开发(广东)有限公司 Modular analysis method for common algorithm in central office digital currency system

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360206A (en) * 2017-03-29 2017-11-17 阿里巴巴集团控股有限公司 A kind of block chain common recognition method, equipment and system
CN109039713A (en) * 2018-07-16 2018-12-18 夸克链科技(深圳)有限公司 A kind of block chain common recognition device and algorithm
CN109101241A (en) * 2018-07-06 2018-12-28 深圳付贝科技有限公司 A kind of block chain installation kit generation method and its device, electronic equipment
CN109347917A (en) * 2018-09-14 2019-02-15 北京沃杰知识产权有限公司 Block chain data common recognition processing method, system, storage medium and electronic equipment
CN109698753A (en) * 2018-12-17 2019-04-30 成都四方伟业软件股份有限公司 Cochain common recognition algorithmic match method and device based on block chain
CN109933338A (en) * 2019-01-29 2019-06-25 浙江数链科技有限公司 Block chain dispositions method, device, computer equipment and storage medium
CN109949157A (en) * 2019-03-08 2019-06-28 矩阵元技术(深圳)有限公司 A kind of processing method of block chain common recognition, apparatus and system
CN110365695A (en) * 2019-07-24 2019-10-22 中国工商银行股份有限公司 The block chain data interactive method and device of changeable common recognition algorithm
CN110875893A (en) * 2018-08-29 2020-03-10 深圳启元信息服务有限公司 Consensus verification method, check node and block chain system
CN111443998A (en) * 2019-01-17 2020-07-24 杨税令 Multi-layer segment type consensus method and system applied to block chain
CN111461887A (en) * 2020-04-01 2020-07-28 杭州溪塔科技有限公司 Block chain consensus processing method and device and electronic equipment
CN111738853A (en) * 2020-06-19 2020-10-02 清华大学 Transaction optimization method and device based on block chain distributed system
CN111787034A (en) * 2019-04-03 2020-10-16 北京邦天信息技术有限公司 Block generation method, synchronization method, device, block chain system and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10606669B2 (en) * 2018-06-08 2020-03-31 Optum, Inc. Domain and event type-specific consensus process for a distributed ledger

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107360206A (en) * 2017-03-29 2017-11-17 阿里巴巴集团控股有限公司 A kind of block chain common recognition method, equipment and system
CN109101241A (en) * 2018-07-06 2018-12-28 深圳付贝科技有限公司 A kind of block chain installation kit generation method and its device, electronic equipment
CN109039713A (en) * 2018-07-16 2018-12-18 夸克链科技(深圳)有限公司 A kind of block chain common recognition device and algorithm
CN110875893A (en) * 2018-08-29 2020-03-10 深圳启元信息服务有限公司 Consensus verification method, check node and block chain system
CN109347917A (en) * 2018-09-14 2019-02-15 北京沃杰知识产权有限公司 Block chain data common recognition processing method, system, storage medium and electronic equipment
CN109698753A (en) * 2018-12-17 2019-04-30 成都四方伟业软件股份有限公司 Cochain common recognition algorithmic match method and device based on block chain
CN111443998A (en) * 2019-01-17 2020-07-24 杨税令 Multi-layer segment type consensus method and system applied to block chain
CN109933338A (en) * 2019-01-29 2019-06-25 浙江数链科技有限公司 Block chain dispositions method, device, computer equipment and storage medium
CN109949157A (en) * 2019-03-08 2019-06-28 矩阵元技术(深圳)有限公司 A kind of processing method of block chain common recognition, apparatus and system
CN111787034A (en) * 2019-04-03 2020-10-16 北京邦天信息技术有限公司 Block generation method, synchronization method, device, block chain system and storage medium
CN110365695A (en) * 2019-07-24 2019-10-22 中国工商银行股份有限公司 The block chain data interactive method and device of changeable common recognition algorithm
CN111461887A (en) * 2020-04-01 2020-07-28 杭州溪塔科技有限公司 Block chain consensus processing method and device and electronic equipment
CN111738853A (en) * 2020-06-19 2020-10-02 清华大学 Transaction optimization method and device based on block chain distributed system

Also Published As

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

Similar Documents

Publication Publication Date Title
RU2628176C2 (en) Systems, methods and computer software products for assembly and loading process of software with use of compilation and deployment service
CN109683899A (en) A kind of software integrating method and device
CN112486518B (en) Consensus algorithm assembling method and device
CN112764753B (en) Project deployment method and device, electronic equipment and storage medium
CN110276074B (en) Distributed training method, device, equipment and storage medium for natural language processing
US20130031532A1 (en) Method, computer, and device for validating execution of tasks in adaptable computer systems
US20050137839A1 (en) Methods, apparatus and programs for system development
CN114879939A (en) Method, system, electronic device and storage medium for generating micro service
CN114217887A (en) Micro-service arranging method, micro-service executing method, micro-service arranging device and micro-service executing server
CN105511935B (en) The acquisition methods and device of resource index value
CN112559124A (en) Model management system and target operation instruction processing method and device
CN115469833A (en) Method and device for implementing dynamic rule engine, electronic equipment and storage medium
CN114581241A (en) Intelligent contract processing method and device, processor and electronic equipment
CN114237687A (en) Software version acquisition method and system, electronic equipment and storage medium
CN112083953A (en) Android application program construction method and device
CN112667491A (en) Function test method and device of virtual machine
CN110008073B (en) Hardware platform differential shielding method, device, equipment and readable storage medium
CN108845953A (en) The method and device of interface testing
CN114090419A (en) Program testing method, system, device, electronic equipment and storage medium
CN115543374A (en) Scheme generation method, equipment upgrading method, related device, equipment and medium
CN114281396A (en) Deployment method and device of application system resources and computer readable storage medium
CN117971412A (en) Task dependency scheduling method supporting dependency arrangement
WO2016036393A1 (en) Enterprise service blueprint generator
KR101866822B1 (en) Method for generating operational aspect of game server
CN117827665A (en) Project deployment method and device, storage medium and electronic device

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
CB03 Change of inventor or designer information
CB03 Change of inventor or designer information

Inventor after: Guo Jingjing

Inventor after: Dong Jin

Inventor after: Ren Changrui

Inventor after: Tang Lin

Inventor before: Guo Jingjing

GR01 Patent grant
GR01 Patent grant