Blockchain deployment method and apparatus, electronic device, and readable storage medium
By acquiring version information of the blockchain and operating system, automatically configuring permissions and monitoring service status, the problem of incorrect blockchain permission configuration is solved, and stable deployment that adapts to different operating systems and blockchain versions is achieved.
Patent Information
- Application Number
- CN202310187080.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-22
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2043-02-22
AI Technical Summary
In existing technologies, permission configuration in blockchain is prone to errors, affecting service performance, and it is difficult to adapt to different operating systems and blockchain versions.
By acquiring version information of the blockchain application package and operating system, it automatically configures permissions, monitors service status during operation, adjusts configurations to adapt to different operating systems and blockchain versions, and provides early warning and fault handling mechanisms.
It reduces the possibility of permission configuration errors, enables large-scale deployment of blockchain and adaptability to different operating systems and blockchain versions, and ensures the stability and reliability of the service.
Smart Images

Figure CN116628669B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer software technology, and more specifically to a blockchain deployment method, a blockchain deployment apparatus, an electronic device, and a readable storage medium. Background Technology
[0002] In related technologies, the deployment of blockchain typically involves users adding permissions after installing the installation package. However, different operating system versions and different blockchain versions require different permissions to execute blockchain services. Currently, the method of manually configuring permissions by users is prone to errors, which affects the service performance of the blockchain. Summary of the Invention
[0003] The present invention aims to at least solve one of the technical problems in the prior art where manual configuration of permissions in blockchain is prone to errors.
[0004] Therefore, the first aspect of the present invention proposes a method for deploying a blockchain.
[0005] A second aspect of the present invention provides a blockchain deployment apparatus.
[0006] A third aspect of the present invention provides an electronic device.
[0007] A fourth aspect of the present invention provides a readable storage medium.
[0008] In view of this, according to a first aspect of the present invention, the present invention proposes a blockchain deployment method, comprising: obtaining first version information of a blockchain application package; obtaining second version information of an operating system and performing system initialization; determining the application package based on the first version information and the second version information, and configuring system permissions for the application package; signing the application package; modifying the application package's configuration file and outputting a parameter report text; and running the blockchain service.
[0009] The blockchain deployment method proposed in this invention includes obtaining first version information of the blockchain application package and second version information of the operating system, initializing the operating system to provide a runtime environment for the application package, determining whether the application package is correct based on the first and second version information, configuring system permissions for the application package based on the first and second version information if the application package is correct, thereby ensuring that the application package's permissions are compatible with the current operating system and the current blockchain, enabling the application package to run blockchain services smoothly. After configuring system permissions for the application package, the application package is verified, configuration files are modified, and parameter report text is output to synchronize data. Then, the blockchain services are run. Since the system permissions configured for the application package are based on the current blockchain and the current operating system, the application package's permissions are fully applicable to the current operating system and the current blockchain, reducing the possibility of incorrect application package permissions. This enables large-scale deployment of the blockchain and adapts to different operating system versions and different blockchains.
[0010] In addition, the blockchain deployment method according to the above-described technical solution provided by the present invention may also have the following additional technical features:
[0011] Based on the above technical solution, it further includes: monitoring the running status of the service during the service operation; and in the event of a version error in the blockchain, re-certifying the package, modifying the package's configuration file again, and outputting the parameter report text again.
[0012] In this technical solution, the blockchain deployment method also includes monitoring the service's running status during the package's operation. If a version error occurs in the blockchain, the package is re-certified, the package's configuration file is modified again, and a parameter report text is output again. This adjusts the package's status so that it is compatible with the blockchain and operating system versions again, thereby providing an early warning and fault handling mechanism for the blockchain. When the blockchain service malfunctions, the blockchain package is adjusted to restore the blockchain service to normal.
[0013] Based on any of the above technical solutions, the further steps of signing the program package specifically include: generating a certificate issuance application based on the program package; sending the certificate issuance application to a designated address for review; generating a certificate file if the certificate issuance application is approved; and replacing the original certificate file of the program package with the certificate file.
[0014] In this technical solution, the steps of signing the program package specifically include generating a certificate issuance application based on the program package, sending the certificate signing application to a designated address for review by a designated reviewer, generating a certificate file after the applicant confirms that the review is passed, and replacing the original certificate file of the program package with the new certificate file, thereby completing the issuance of the certificate for the program package.
[0015] Based on any of the above technical solutions, the step of sending the certificate issuance application to a designated address for review further includes: sending the certificate issuance application to a first address for review; and if there is no response to the certificate issuance application within a preset time, sending the certificate issuance application to a second address for review.
[0016] In this technical solution, the step of sending the certificate issuance application to a designated address for review includes: first, sending the certificate issuance application to a first address and waiting for the first reviewer to review it; if the first reviewer does not review the certificate issuance application within a preset time, then sending the certificate issuance application to a second address for review by a second reviewer. This dual-reviewer mechanism reduces the possibility of one reviewer ignoring the certificate issuance application and improves the response efficiency to the certificate issuance application.
[0017] Furthermore, based on any of the above technical solutions, the designated address is an email address.
[0018] In this technical solution, the designated address is an email address, and the certificate issuance application is sent to the reviewer via email.
[0019] Based on any of the above technical solutions, further, the step of monitoring the running status of the service during the service operation process specifically includes: monitoring the height change information of the blockchain during the service operation process; wherein, if the height change of the blockchain is abnormal, then the blockchain version is incorrect.
[0020] In this technical solution, the step of monitoring the running status of the service during the service operation process is specifically to determine whether there is a version error in the blockchain by monitoring the height change information of the blockchain during the service operation process.
[0021] Specifically, after the blockchain nodes are deployed, they will increment sequentially from 1, with a block generated at intervals of approximately 1 minute. The cumulative increase in height indicates a normal blockchain network. An abnormal increase in height indicates a version error in the blockchain, requiring reconfiguration of the application package. Furthermore, based on any of the above technical solutions, the first version information includes both private and consortium blockchains.
[0022] In this technical solution, the first version of the information includes private blockchains and consortium blockchains.
[0023] According to a second aspect of the present invention, a blockchain deployment apparatus is provided, comprising: a first acquisition module for acquiring first version information of a blockchain application package; a second acquisition module for acquiring second version information of an operating system and performing system initialization; a configuration module for configuring system permissions for the application package according to the first and second version information; a signature module for signing the application package; a modification module for modifying the application package's configuration file; and a running module for running blockchain services.
[0024] The blockchain deployment apparatus proposed in this invention includes obtaining first version information of a blockchain application package and second version information of an operating system, initializing the operating system to provide a runtime environment for the application package, configuring system permissions for the application package based on the first and second version information, thereby ensuring that the application package's permissions are compatible with the current operating system and the current blockchain, enabling the application package to run blockchain services smoothly. After configuring system permissions for the application package, the application package is verified, and configuration files are modified. A parameter report text is also output to synchronize data before running the blockchain services. Because the system permissions configured for the application package are based on the current blockchain and the current operating system, the application package's permissions are fully applicable to the current operating system and the current blockchain, reducing the possibility of incorrect application package permissions. This enables large-scale deployment of the blockchain and adapts to different operating system versions and different blockchains.
[0025] According to a third aspect of the present invention, an electronic device is provided, comprising a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement a blockchain deployment method as proposed in any of the above-described technical solutions.
[0026] The electronic device proposed in this invention includes a processor and a memory. Since the memory stores a program or instruction that implements the blockchain deployment method proposed in any of the above-mentioned technical solutions when executed, it has all the beneficial effects of the blockchain deployment method proposed in any of the above-mentioned technical solutions, which will not be described in detail here.
[0027] According to a fourth aspect of the present invention, the present invention provides a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the blockchain deployment method as proposed in any of the above-described technical solutions.
[0028] The readable storage medium proposed in this invention stores a program or instruction that, when executed by a processor, implements the blockchain deployment method as proposed in any of the above-described technical solutions. Therefore, it has all the beneficial effects of the blockchain deployment method as proposed in any of the above-described technical solutions, which will not be described in detail here.
[0029] Additional aspects and advantages of the invention will become apparent in the following description or may be learned by practice of the invention. Attached Figure Description
[0030] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0031] Figure 1 A flowchart illustrating a blockchain deployment method according to an embodiment of the present invention is shown;
[0032] Figure 2 This diagram illustrates a structural block diagram of a blockchain deployment apparatus according to an embodiment of the present invention.
[0033] Figure 3 This diagram illustrates the process flow of a blockchain deployment method according to an embodiment of the present invention. Detailed Implementation
[0034] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0035] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0036] The following reference Figures 1 to 3 This describes a blockchain deployment method, a blockchain deployment apparatus, an electronic device, and a readable storage medium provided according to some embodiments of the present invention.
[0037] Figure 1 A flowchart illustrating a blockchain deployment method provided in one embodiment of the present invention is shown.
[0038] like Figure 1 As shown, the specific process of a blockchain deployment method provided in one embodiment of the present invention is as follows:
[0039] Step 102: Obtain the first version information of the blockchain's application package;
[0040] Step 104: Obtain the second version information of the operating system and perform system initialization;
[0041] Step 106: Determine the package based on the first version information and the second version information, and configure system permissions for the package;
[0042] Step 108: Sign the package;
[0043] Step 110: Modify the package's configuration file and output the parameter report text;
[0044] Step 112: Run the blockchain service.
[0045] The blockchain deployment method provided by this invention includes obtaining first version information of a blockchain application package and second version information of an operating system, initializing the operating system to provide a runtime environment for the application package, determining whether the application package is correct based on the first and second version information, configuring system permissions for the application package based on the first and second version information if the application package is correct, thereby ensuring that the application package's permissions are compatible with the current operating system and the current blockchain, enabling the application package to run blockchain services smoothly. After configuring system permissions for the application package, the application package is verified, configuration files are modified, and parameter report text is output to synchronize data. Then, the blockchain services are run. Since the system permissions configured for the application package are based on the current blockchain and the current operating system, the application package's permissions are fully applicable to the current operating system and the current blockchain, reducing the possibility of incorrect application package permissions. This enables large-scale deployment of the blockchain, adapts to different operating system versions and different blockchains, and utilizes a process control and scheduling mechanism to coordinate and schedule various resources.
[0046] In other words, the compatibility between the program package and the operating system is determined by the first and second version information. If they match, meaning the program package and operating system are compatible, the necessary execution permissions are configured for the startup program directory within the program package, allowing the startup script to execute normally and ensuring the normal operation of the blockchain. Specifically, the task flow script collects server information, such as IP addresses, and passes it to the configuration file modification script. After obtaining the IP address, the configuration file modification script automatically generates the corresponding server configuration file (replacing the corresponding blockchain node information, address, and port), pushes it to the corresponding directory on the blockchain node server, and replaces the corresponding configuration file in the program package directory, thus enabling the modification of the configuration file.
[0047] The output parameter report text includes: blockchain node address information and IP address, port information, certificate file path, name, date, etc. It also includes the blockchain node's operating status and blockchain height growth. The parameter report text is sent to the business service personnel, technical staff, or certificate issuers / approvers.
[0048] As a possible embodiment of the present invention, it further includes: monitoring the running status of the service during the service operation; and in the event of a version error in the blockchain, re-signing the package, re-modifying the package's configuration file, and re-outputting the parameter report text.
[0049] In this embodiment, the blockchain deployment method further includes monitoring the service's running status during the package's operation, and responding to any version errors in the blockchain.
[0050] The package is re-certified, its configuration file is modified again, and parameter report text is output again. This adjusts the package's state to match the blockchain and operating system versions, thereby providing an early warning and fault handling mechanism for the blockchain. When the blockchain service fails, the package is adjusted to restore the service to normal. This adds an early warning mechanism and block message push function to ensure the stability and real-time performance of the entire chain.
[0051] Specifically, if the program package is deployed to an unsuitable operating system, a warning email notification will be sent. Similarly, if a certificate issuance error causes service deployment anomalies, a warning email notification will also be sent to remind maintenance personnel, technical personnel, or administrators to address the issue. In particular, during service monitoring, if a version error occurs, the fault response module script will be invoked. Based on the environment list, the faulty node's blockchain deployment will be handled, the package will be re-pushed to the specified environment list machines, the deployment process will be re-executed, the verification process will be re-executed, and the verification function will be released and repaired.
[0052] The specific steps of the review can be as follows: First, determine whether the server IP address, directory, and operating system version of the deployed blockchain node are correct. Second, determine whether the blockchain version is correct and whether the program package has been correctly pushed to the target machine and target directory. Afterward, the service deployment process will trigger a review process script to review the entire deployment process and the correctness of the certificate issuance. The review process involves reviewing all deployment steps sequentially. If any abnormalities are found, the program package is re-deployed; otherwise, a review pass message is displayed, and deployment is completed according to the normal process. As a possible embodiment of the present invention, the steps of signing the program package specifically include: generating a certificate issuance application based on the program package; sending the certificate issuance application to a designated address for review; generating a certificate file if the certificate issuance application is approved; and replacing the original certificate file of the program package with the certificate file.
[0053] In this embodiment, the step of signing the package specifically includes generating a certificate issuance application based on the package, sending the certificate signing application to a designated address for review by a designated reviewer, generating a certificate file after the applicant confirms that the review is passed, and replacing the original certificate file of the package with the new certificate file, thereby completing the issuance of the certificate for the package. Moreover, the issuance process is a completely autonomous certificate issuance and verification process.
[0054] Specifically, the certificate replacement order is as follows: first replace the CSR certificate file, then replace the CA and PEM certificate files, then replace the information in the bubi.json configuration file, then add executable permissions to the service, and finally start the service.
[0055] As a possible embodiment of the present invention, the step of sending the certificate issuance application to a designated address for review specifically includes: sending the certificate issuance application to a first address for review; and if there is no response to the certificate issuance application within a preset time, sending the certificate issuance application to a second address for review.
[0056] In this embodiment, the step of sending the certificate issuance application to a designated address for review includes: first, sending the certificate issuance application to a first address for review by a first reviewer; if the first reviewer does not review the certificate issuance application within a preset time, then sending the certificate issuance application to a second address for review by a second reviewer. This dual-reviewer mechanism reduces the possibility of a reviewer ignoring the certificate issuance application and improves the response efficiency to the certificate issuance application.
[0057] The first reviewer is a technical staff member who checks whether the certificates, environment, and information are correct. The second reviewer is the business manager who conducts a final review.
[0058] As a possible embodiment of the present invention, the specified address is an email address.
[0059] In this embodiment, the specified address is an email address, and the certificate issuance application is sent to the reviewer via email.
[0060] Specifically, such as Figure 3 As shown, the certificate issuance review process is as follows: The program automatically issues a CSR (Certificate Signing Request) file. It automatically initiates the certificate issuance application via email push, sending the certificate issuance request file to a first address for review by the first reviewer. This first reviewer's review is time-sensitive; if no approval is received within a preset time, the time limit expires, and the certificate issuance request file is sent to a second address for review by the second reviewer. After the certificate is issued and approved, the file is automatically uploaded to a specified server path. The program then calls a task scheduling script to replace the original CSR file, proceeding to the next stage of the process.
[0061] As a possible embodiment of the present invention, the step of monitoring the running status of the service during the service operation process specifically includes: monitoring the height change information of the blockchain during the service operation process; wherein, if the height change of the blockchain is abnormal, the version of the blockchain is incorrect.
[0062] In this embodiment, the step of monitoring the running status of the service during the service operation process specifically involves determining whether there is a version error in the blockchain by monitoring the height change information of the blockchain during the service operation process.
[0063] Specifically, after the blockchain nodes are deployed, they will increment sequentially from 1, with a block generated at intervals of approximately 1 minute. The cumulative increase in height indicates a normal blockchain network. An abnormal increase in height indicates a blockchain version error, requiring reconfiguration of the application package. Specifically, the system monitors the running status of the blockchain nodes and whether the blockchain height is increasing. These two monitoring parameters are used to determine whether the blockchain network and nodes are functioning correctly.
[0064] In other words, if the package version is incorrect, the correct version of the package will be re-pushed.
[0065] As a possible embodiment of the present invention, the first version information includes private chains and consortium chains.
[0066] In this embodiment, the first version information includes private blockchains and consortium blockchains.
[0067] Furthermore, the script task flow is as follows:
[0068] Write the task scheduling outline module: Use the Ansible-playbook scripting language to write the outline. The outline's functional modules include: basic scheduling strategy modules; specific service deployment, monitoring, rollback, exception handling, configuration modification, file replacement, permission addition, and other modules.
[0069] Define submodules and define the environment list: the list of functional modules mentioned above, and the task flow content.
[0070] Define the script directory environment for Task scheduling. Environment variables: Script directory environment: defaults to / usr / local / bubichain / ; Environment variables: IP address: $IP; Port: $PORT; Directory path: $DIR_PATH; Number of nodes: $NUM; CA certificate file: $CA; CSR certificate file: $CSR; PEM certificate file: $PEM; BUBI.JSON configuration file: $JSON.
[0071] Write a program packaging process script: generated based on the program flow code.
[0072] The process script is uploaded and automatically replaced upon download: It is generated based on the program code. The upload path is the corresponding directory on the server, with the default path being the / opt directory. The download path is distributed to the target machine where the blockchain node is deployed. The original process script and the content are the same, except that the latest complete code is downloaded to the local machine for execution before deployment. This prevents some technical personnel from temporarily modifying parts that have not been committed to the code repository or merged with the latest version of the program package.
[0073] Write a script for blockchain package rollback and exception handling: For example, if a certificate file error causes blockchain node deployment failure, the handling process is as follows: According to the task flow corresponding to the process outline, trigger the corresponding scheduling script; trigger the package download and transmission module to push the package to the target machine; call the exception handling module script to reissue the certificate and call the certificate file replacement module script to handle the issue; call the service deployment script to replace the certificate file and deploy the service; call the listening script to monitor whether the blockchain deployment is normal; and call the push report script to push the normal result to the relevant responsible persons.
[0074] Write configuration file modification and debugging scripts; IP address modification scripts are generated based on the program.
[0075] Package and encapsulate all scripts, and modularly schedule scripts to build a complete script deployment task flow mechanism.
[0076] The script task flow function consists of pre-written program modules by technical staff. The subsequent deployment process directly deploys according to the module trigger flow. The script function flow script program modules include: scheduling configuration file parameter modification script module, scheduling service deployment script module, scheduling service listening script module, scheduling report push script module, scheduling exception handling script module, scheduling rollback script module, scheduling permission addition, file replacement and modification, and other functional script modules, which coordinate the reasonable and correct execution and operation of each module.
[0077] Specifically, such as Figure 3 As shown, the blockchain deployment process is as follows: It automatically confirms the environment, i.e., whether the blockchain is a consortium blockchain or a private blockchain, and confirms the operating system version and other relevant information. The program calls the task flow script to call the configuration file modification script to modify the configuration file, modify, debug, and verify the configuration parameters, and output relevant core configuration parameter report text. Then, it automatically runs the service startup script, monitors the service running status, and triggers the message push function to provide feedback on block height changes. The blockchain deployment method provided by this invention can extract blockchain version information, confirm operating system version information, initialize the system, confirm the program package version, construct permission addition tasks, and construct certificate issuance and review process tasks. It has an early warning mechanism and a message push function. This reduces investment costs and allows control over the certificate issuance process. It also has a service deployment management mechanism, providing large-scale deployment adaptable to different operating system versions and different blockchains. Furthermore, it adds early warning functions and block change synchronization data push functions, as well as a fault handling mechanism. Simultaneously, the process management mechanism coordinates and integrates the resources of each module to efficiently complete the deployment tasks of different versions of blockchains in complex environments.
[0078] like Figure 2 As shown, according to a second aspect of the present invention, the present invention provides a blockchain deployment apparatus 200, comprising: a first acquisition module 202, configured to acquire first version information of a blockchain application package; a second acquisition module 204, configured to acquire second version information of an operating system and perform system initialization; a configuration module 206, configured to determine the application package based on the first and second version information and configure system permissions for the application package; a signature module 208, configured to sign the application package; a modification module 210, configured to modify the configuration file of the application package; and a running module 212, configured to run the blockchain service.
[0079] The blockchain deployment apparatus provided by this invention includes obtaining first version information of a blockchain application package and second version information of an operating system, initializing the operating system to provide a runtime environment for the application package, determining whether the application package is correct based on the first and second version information, configuring system permissions for the application package based on the first and second version information if the application package is correct, thereby ensuring that the application package's permissions are compatible with the current operating system and the current blockchain, enabling the application package to run blockchain services smoothly. After configuring system permissions for the application package, the application package is verified, configuration files are modified, and parameter report text is output to synchronize data. Then, the blockchain services are run. Since the system permissions configured for the application package are based on the current blockchain and the current operating system, the application package's permissions are fully applicable to the current operating system and the current blockchain, reducing the possibility of incorrect application package permissions. This enables large-scale deployment of the blockchain and adapts to different operating system versions and different blockchains.
[0080] In other words, the compatibility between the program package and the operating system is determined by the first and second version information. If they match, meaning the program package and operating system are compatible, the necessary execution permissions are configured for the startup program directory within the program package, allowing the startup script to execute normally and ensuring the normal operation of the blockchain. Specifically, the task flow script collects server information, such as IP addresses, and passes it to the configuration file modification script. After obtaining the IP address, the configuration file modification script automatically generates the corresponding server configuration file (replacing the corresponding blockchain node information, address, and port), pushes it to the corresponding directory on the blockchain node server, and replaces the corresponding configuration file in the program package directory, thus enabling the modification of the configuration file.
[0081] The output parameter report text includes: blockchain node address information and IP address, port information, certificate file path, name, date, etc. It also includes the blockchain node's operating status and blockchain height growth. The parameter report text is sent to the business service personnel, technical staff, or certificate issuers / approvers.
[0082] As a possible embodiment of the present invention, it further includes: a monitoring module, used to monitor the running status of the service during the service operation; in the event of a version error in the blockchain, the configuration module is also used to re-sign the package, and the modification module is also used to re-modify the configuration file of the package and output the parameter report text again.
[0083] As a possible embodiment of the present invention, the visa module specifically includes: a first generation submodule, used to generate a certificate issuance application based on the program package; a sending submodule, used to send the certificate issuance application to a designated address for review; a second generation submodule, used to generate a certificate file if the certificate issuance application is approved; and a replacement submodule, used to replace the original certificate file of the program package with the certificate file.
[0084] As a possible embodiment of the present invention, the sending submodule specifically includes: a first sending submodule, used to send the certificate issuance application to a first address for review; and a second sending submodule, used to send the certificate issuance application to a second address for review if there is no response to the certificate issuance application within a preset time.
[0085] As a possible embodiment of the present invention, the specified address is an email address.
[0086] As a possible embodiment of the present invention, the monitoring module specifically includes: a monitoring submodule: used to monitor the height change information of the blockchain during the operation of the service; wherein, if the height change of the blockchain is abnormal, the version of the blockchain is incorrect.
[0087] As a possible embodiment of the present invention, the first version information includes private chains and consortium chains.
[0088] According to a third aspect of the present invention, an electronic device is provided, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement a blockchain deployment method as provided in any of the above embodiments.
[0089] The electronic device provided by the present invention includes a processor and a memory. Since the memory stores a program or instructions that implement the blockchain deployment method provided in any of the above embodiments when executed, it has all the beneficial effects of the blockchain deployment method provided in any of the above embodiments, which will not be described in detail here.
[0090] According to a fourth aspect of the present invention, the present invention provides a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the blockchain deployment method provided in any of the above embodiments.
[0091] The present invention provides a readable storage medium storing a program or instructions that, when executed by a processor, implement the blockchain deployment method provided in any of the above embodiments. Therefore, it has all the beneficial effects of the blockchain deployment method provided in any of the above embodiments, which will not be described in detail here.
[0092] In this invention, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance; the term "multiple" refers to two or more unless otherwise explicitly defined. The terms "install," "connect," "link," and "fix" should be interpreted broadly. For example, "connect" can be a fixed connection, a detachable connection, or an integral connection; "link" can be a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.
[0093] In the description of this invention, it should be understood that the terms "upper", "lower", "left", "right", "front", "rear", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the components or units referred to must have a specific orientation or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.
[0094] In the description of this specification, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0095] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for deploying a blockchain, characterized in that, include: Obtain the first version information of the blockchain's application package; Obtain the second version information of the operating system and perform system initialization; Based on the first version information and the second version information, determine whether the program package is correct. If the program package is correct, configure system permissions for the program package based on the first version information and the second version information. The package is signed; Modify the configuration file of the program package and output a parameter report text; The service that runs the blockchain.
2. The blockchain deployment method according to claim 1, characterized in that, Also includes: During the operation of the service, monitor the running status of the service; If a version error occurs in the blockchain, the package is re-signed, the package's configuration file is modified again, and the parameter report text is output again.
3. The blockchain deployment method according to claim 1 or 2, characterized in that, The step of signing the package specifically includes: Generate a certificate issuance application based on the package described above; Send the certificate issuance application to the designated address and wait for review; If the certificate issuance application is approved, a certificate file is generated; Replace the original certificate file of the package with the certificate file.
4. The blockchain deployment method according to claim 3, characterized in that, The step of sending the certificate issuance application to the designated address for review specifically includes: Send the certificate issuance application to the first address and wait for review; If there is no response to the certificate issuance application within a preset time, the certificate issuance application will be sent to a second address for review.
5. The blockchain deployment method according to claim 3, characterized in that, The specified address is an email address.
6. The blockchain deployment method according to claim 2, characterized in that, The step of monitoring the running status of the service during its operation specifically includes: During the operation of the service, monitor the height change information of the blockchain; In cases where the height of the blockchain changes abnormally, the version of the blockchain is incorrect.
7. The blockchain deployment method according to claim 1 or 2, characterized in that, The first version of the information includes private blockchains and consortium blockchains.
8. A blockchain deployment device, characterized in that, include: The first acquisition module is used to acquire the first version information of the blockchain's program package; The second acquisition module is used to acquire the second version information of the operating system and perform system initialization; The configuration module is used to determine whether the program package is correct based on the first version information and the second version information, and if the program package is correct, to configure system permissions for the program package based on the first version information and the second version information. A visa module is used to sign the package; The modification module is used to modify the configuration file of the program package; The runtime module is used to run the services of the blockchain.
9. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the blockchain deployment method as described in any one of claims 1 to 7.
10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the deployment method of any one of claims 1 to 7 of a blockchain.
Citation Information
Patent Citations
Fabric-based block chain network deployment method and device, equipment and medium
CN110933189A
Version authorization control method and device based on block chain, equipment and storage medium
CN113378120A
