Cloud host resource supervision method, system and storage medium based on blockchain
By obtaining cloud host information and identity information through blockchain technology and automatically determining accounting nodes, the problems of inconvenient data integration and manual data entry risks in cloud resource management are solved, and the automated management and control of cloud resources is realized.
Patent Information
- Application Number
- CN202111144967.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-28
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2041-09-28
AI Technical Summary
In cloud resource management, using cloud hosts from different vendors or different accounts from the same vendor results in inconvenient data integration and unified management, which consumes time and effort. There is also the risk of manual data entry, leading to inconsistencies in activation quantity, specifications, ordering time, and other issues.
Through blockchain technology, the basic information of the cloud host and the identity information of the registered account are obtained for comparison. Based on the comparison results, the equity information of the node is obtained, the accounting node is determined, and the newly added cloud host information is written into the blockchain through the accounting node to achieve automated management and control.
It realizes the automated management and control of cloud resources, reduces the risks brought by manual data entry, reduces human resource consumption, and improves the efficiency and accuracy of cloud resource management.
Smart Images

Figure CN113946439B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain cloud computing technology, and in particular to a blockchain-based cloud host resource supervision method, system, and storage medium. Background Art
[0002] In the course of business operations, cloud hosts are highly sought after for their elastic scalability and ease of maintenance, making cloud resource management a crucial component of enterprise management. However, currently, using cloud hosts from different vendors can lead to inconvenient integration of cloud resource management data. Even when cloud hosts come from the same vendor, multiple accounts may be used for unified management, requiring significant time and effort. Furthermore, due to regulatory requirements or urgent needs, the activation of some cloud hosts requires manual entry into the customer relationship management system. This creates the risk that negligence on the part of vendor staff may lead to inconsistencies between the actual number, specifications, and ordering time of activation, resulting in losses for the enterprise. Summary of the Invention
[0003] The purpose of the present invention is to solve one of the technical problems existing in the prior art to at least a certain extent.
[0004] To this end, an object of an embodiment of the present invention is to provide a blockchain-based cloud host resource supervision method, system and storage medium, which can reduce the large amount of human resource consumption in the process of manual summary and manual verification, reduce the risks brought by manual entry, and realize the automated management and control of cloud resources.
[0005] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present invention include:
[0006] In a first aspect, an embodiment of the present invention provides a cloud host resource supervision method based on blockchain, comprising the following steps:
[0007] Get basic information about the cloud host;
[0008] Obtain identity information when registering an account;
[0009] Comparing the identity information with the basic information of the cloud host;
[0010] Obtain the node's equity information based on the comparison results;
[0011] Determine the accounting node based on the equity information;
[0012] The information of the newly added cloud host is written into a new block and broadcasted through the accounting node.
[0013] Furthermore, the cloud host is provided with a data acquisition module, and the step of obtaining basic information of the cloud host includes:
[0014] The basic information of the cloud host is obtained through the data acquisition module.
[0015] Furthermore, the basic information of the cloud host includes: the cloud host's provider, resource pool, virtual IP address, vCPU and memory size, CPU utilization, memory utilization, online time within a billing cycle, and information about the person who activated the cloud host. The step of comparing the identity information with the basic information of the cloud host includes:
[0016] Call the API interface of the cloud host, confirm that the identity information of the account is consistent with the basic information of the cloud host, and initiate a chain request.
[0017] Furthermore, after the step of writing the information of the newly added cloud host into a new block and broadcasting it through the accounting node, the following steps are also included:
[0018] Export cloud host usage and calculate charges through upper-layer smart contracts.
[0019] Furthermore, obtaining the node's equity information includes:
[0020] Get the CPU and memory idle rate of the cloud host corresponding to the node, as well as the number of historical accounting times of the node.
[0021] Furthermore, the step of determining the accounting node based on the equity information includes:
[0022] Create campaign array;
[0023] Determine the node equity based on a preset formula and the node's equity information;
[0024] According to the node equity, the accounting node is determined through the election array.
[0025] In a second aspect, an embodiment of the present invention proposes a cloud host resource monitoring system based on blockchain, comprising:
[0026] Information collection module, used to obtain basic information of the cloud host;
[0027] Account registration module, used to obtain identity information when registering an account;
[0028] An identity authentication module, used to compare the identity information with the basic information of the cloud host;
[0029] Equity information collection module, used to obtain the node's equity information based on the comparison results;
[0030] A bookkeeping node generation module, configured to determine a bookkeeping node based on the equity information;
[0031] The broadcast module is used to write the information of the newly added cloud host into a new block and broadcast it through the accounting node.
[0032] In a third aspect, an embodiment of the present invention provides a storage medium storing processor-executable instructions, which, when executed by the processor, are used to implement the blockchain-based cloud host resource supervision method.
[0033] The present invention discloses a cloud host resource supervision method based on blockchain, which has the following beneficial effects:
[0034] This embodiment obtains the basic information of the cloud host, then obtains the identity information used during account registration, compares this identity information with the basic information of the cloud host, obtains the node's equity information based on the comparison results, and then determines the accounting node based on this equity information. Finally, the accounting node writes the newly added cloud host information into a new block and broadcasts it. This method can reduce the human resources consumed in manual aggregation and verification, reduce the risks associated with manual data entry, and achieve automated management and control of cloud resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following introduction is made to the drawings of the embodiments of the present invention or the related technical solutions in the prior art. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative work.
[0036] Figure 1 A flowchart of a blockchain-based cloud host resource supervision method provided by an embodiment of the present invention;
[0037] Figure 2 A schematic diagram of the structure of a blockchain-based cloud host resource monitoring system provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and are not to be construed as limiting the present invention. The step numbers in the following embodiments are provided for ease of explanation only and do not limit the order of the steps. The order of execution of the steps in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0039] Reference Figure 1 Embodiments of the present invention provide a blockchain-based cloud host resource management method. This solution can be applied to large server clusters. Specifically, this embodiment obtains basic cloud host information, then obtains the identity information used during account registration, compares this identity information with the basic cloud host information, obtains the node's equity information based on the comparison results, and then determines the accounting node based on the equity information. Finally, the accounting node writes the newly added cloud host information into a new block and broadcasts it. This method can reduce the significant human resources consumed during manual aggregation and verification, mitigate the risks associated with manual data entry, and achieve automated management and control of cloud resources.
[0040] Specifically, if Figure 1 As shown, the embodiment of the present application includes the following steps:
[0041] Step 101: Obtain basic information of the cloud host.
[0042] This embodiment requires obtaining basic information about the cloud host so that the registered account can be subsequently verified against the obtained basic information. This information can be obtained by installing a data collection agent on the cloud host, collecting basic information from the cloud host through the data collection agent, and uploading the information. The collected basic information includes the cloud host's vendor, resource pool, virtual IP address, vCPU and memory size, CPU utilization, memory utilization, online time within a billing cycle, and information about the person who activated the cloud host.
[0043] Step 102: Obtain the identity information when registering the account.
[0044] Step 103: perform identity comparison on the account according to the basic information of the cloud host.
[0045] This embodiment compares the acquired cloud host basic information with the account's identity information to confirm the account's identity. The cloud host's basic information includes the cloud host's provider, resource pool, virtual IP address, vCPU and memory size, CPU utilization, memory utilization, online time within a billing cycle, and information about the person who activated the cloud host.
[0046] In other embodiments, when performing identity information comparison, the cloud host's API interface can be called to verify the identity information of the newly registered cloud host through the API interface. This embodiment ensures the security of the process by calling the cloud host's API interface to perform identity information comparison on the newly added cloud host.
[0047] Step 104: Obtain the node's equity information based on the comparison result.
[0048] After successful account authentication, this embodiment obtains the equity information of each node in the blockchain, which includes the node's cloud host address, the node's cloud host CPU, and memory utilization.
[0049] In other embodiments, after the account identity authentication is successful, a chain request is issued to broadcast the newly added cloud host information to each blockchain node.
[0050] Step 105: Determine the accounting node based on the equity information.
[0051] This embodiment distributes equity based on the node's equity information to determine the accounting node. Specifically, the equity is calculated based on the node's cloud host address, the node's cloud host CPU, and memory utilization. The number of times the node has served as an accounting node is obtained, and the node's weight is calculated using the following equity calculation formula. The lower the CPU and memory utilization, the fewer times the node has served as an accounting node, and the greater the equity obtained. Specifically, the equity calculation algorithm is as follows:
[0052] Assume that the CPU utilization of a node is f, the memory utilization is h, the number of blocks in the entire blockchain is m, and the number of historical accounting times of the node is n (assuming that each new cloud host will form a new block), then the equity k allocated to the node is:
[0053]
[0054] In other embodiments, the accounting node can also be determined by establishing a campaign array. The campaign array is formed based on the candidate node numbers, and the number of each node number is multiplied by k times based on the equity k, that is, the number of each candidate node number is k. Finally, a node is randomly selected from these k1+k2+...+kn numbers and used as the accounting node. This embodiment obtains the node's cloud host address, the node's cloud host CPU and memory utilization to calculate the equity, determines the equity of each node using an equity calculation algorithm, and then determines the accounting node using the campaign array. This method of determining the accounting node is more energy-efficient and makes it easier to select hosts with high idle rates for accounting.
[0055] Step 106: Write the information of the newly added cloud host into a new block and broadcast it through the accounting node.
[0056] This embodiment packages the received information of the newly added cloud host through the accounting node, uploads it to the original blockchain, and broadcasts it after execution.
[0057] In other embodiments, cloud host usage can be exported after step 106, and the fees calculated using an upper-layer smart contract. A smart contract is a computer program that automatically executes when specific conditions are met. In this embodiment, cloud host usage is exported. Based on the actual cloud host usage, the fees incurred during the process are calculated using an upper-layer smart contract.
[0058] When applying the above method to the actual process, it is explained in the form of functional modules, as follows:
[0059] The blockchain-based cloud host resource supervision method can be applied to large server clusters and can be set up as the following modules:
[0060] Cloud host basic information collection module
[0061] This module collects basic information about cloud hosts by installing a collection agent on them. This information includes: the cloud host's provider, resource pool, virtual IP address, vCPU and memory size, CPU utilization, memory utilization, online time within a billing cycle, and the person who activated the cloud host.
[0062] Cloud host authentication module
[0063] This module obtains the identity information when registering the account, and verifies the basic information of the newly added cloud host opened on the blockchain by calling the interface of the cloud host resource provider intensive management system, thereby determining the identity of the newly added cloud host.
[0064] Blockchain that stores basic information of cloud hosts
[0065] The blockchain in this invention utilizes a public blockchain. Each cloud host represents a node in the system. Cloud host information is encrypted and stored in the blockchain. Each cloud host has the potential to become a bookkeeping node. They compete for bookkeeping rights by using CPU and memory availability as equity. The winning node writes the newly added cloud host information into a new block and broadcasts it. A public blockchain is one in which any individual or group in the world can send transactions, and these transactions are validated by the blockchain. Anyone can participate in the consensus process and potentially become a bookkeeping node. Public chains are the earliest and most widely used blockchains.
[0066] Cloud host information export module:
[0067] After a billing cycle ends, the module automatically exports all cloud host resource information within the billing cycle to the cloud resource administrator, and can calculate the cloud resource usage fees within this billing cycle through the upper-level smart contract.
[0068] Reference Figure 2The embodiment of the present invention proposes a cloud host resource monitoring system based on blockchain, including:
[0069] Information collection module, used to obtain basic information of the cloud host;
[0070] Account registration module, used to obtain identity information when registering an account;
[0071] The identity authentication module is used to compare the account identity based on the basic information of the cloud host;
[0072] Equity information collection module, used to obtain the node's equity information based on the comparison results;
[0073] The accounting node generation module is used to determine the accounting node based on equity information;
[0074] The broadcast module is used to write the information of the newly added cloud host into a new block and broadcast it through the accounting node.
[0075] In other embodiments, the cloud host resource monitoring system further includes a data collection module. The data collection module is used to obtain basic information about the cloud host. In this embodiment, the data collection module is used to obtain basic information about the cloud host. This information can be transmitted to the identity authentication module and compared with the registered account information to determine the account identity.
[0076] In other embodiments, the cloud host resource monitoring system further includes an information export module. This module is used to export cloud host usage information and calculate fees using an upper-layer smart contract. A smart contract is a computer program that automatically executes when specific conditions are met. In this embodiment, the information export module exports cloud host usage information. Based on actual cloud host usage, the upper-layer smart contract then calculates the fees incurred during the process.
[0077] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0078] The embodiment of the present invention further provides a storage medium in which processor-executable instructions are stored. When the processor executes the instructions, the processor-executable instructions are used to implement Figure 1 The cloud host resource supervision method based on blockchain is shown.
[0079] In some optional embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided in an exemplary manner for the purpose of providing a more comprehensive understanding of the technology. The disclosed method is not limited to the operation and logic flow presented herein. Optional embodiments are contemplated in which the order of the various operations is changed and the sub-operations described as a part of a larger operation are performed independently.
[0080] Furthermore, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise indicated, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It will also be understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present invention. More specifically, given the properties, functions, and internal relationships of the various functional modules in the devices disclosed herein, the actual implementation of the module will be understood within the ordinary skill of an engineer. Therefore, a person skilled in the art using ordinary skill will be able to implement the present invention set forth in the claims without undue experimentation. It will also be understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.
[0081] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0082] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0083] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.
[0084] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0085] In the foregoing description of this specification, reference to terms such as "one embodiment / example," "another embodiment / example," or "certain embodiments / examples" means that a specific feature or characteristic described in conjunction with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0086] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the claims and their equivalents.
[0087] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A cloud host resource supervision method based on blockchain, characterized in that: The following steps are involved: Get basic information about the cloud host; Obtain identity information when registering an account; Comparing the identity information with the basic information of the cloud host; Obtain the node's equity information based on the comparison results; Determine the accounting node based on the equity information; The information of the newly added cloud host is written into a new block and broadcasted through the accounting node; The acquisition of the node's equity information includes: Get the CPU utilization, memory utilization, and historical accounting times of the node corresponding to the cloud host; The step of determining the accounting node based on the equity information includes: Create campaign array; Determine the node equity based on a preset formula and the node's equity information; According to the node equity, determine the accounting node through the election array; The preset formula is specifically: Wherein, k is the node equity, f is the CPU utilization, h is the memory utilization, n is the number of historical accounting times of the node, and m is the total number of blocks in the blockchain.
2. The cloud host resource supervision method based on blockchain according to claim 1 is characterized in that: The cloud host is provided with a data acquisition module, and the step of obtaining basic information of the cloud host includes: The basic information of the cloud host is obtained through the data acquisition module.
3. The cloud host resource supervision method based on blockchain according to claim 1 is characterized in that: The basic information of the cloud host includes: the cloud host's provider, resource pool, virtual IP, vCPU and memory size, CPU utilization, memory utilization, online time within a billing cycle, and information about the person who activated the cloud host. The step of comparing the identity information with the basic information of the cloud host includes: Call the API interface of the cloud host, confirm that the identity information of the account is consistent with the basic information of the cloud host, and initiate a chain request.
4. The cloud host resource supervision method based on blockchain according to claim 1 is characterized in that: After the step of writing the information of the newly added cloud host into a new block and broadcasting it through the accounting node, the following steps are also included: Export cloud host usage and calculate charges through upper-layer smart contracts.
5. The cloud host resource monitoring system based on blockchain is characterized by: include: Information collection module, used to obtain basic information of the cloud host; Account registration module, used to obtain identity information when registering an account; An identity authentication module, used to compare the identity information with the basic information of the cloud host; Equity information collection module, used to obtain the node's equity information based on the comparison results; A bookkeeping node generation module, configured to determine a bookkeeping node based on the equity information; A broadcast module, configured to write the information of the newly added cloud host into a new block and broadcast it through the accounting node; The acquisition of the node's equity information includes: Get the CPU utilization, memory utilization, and historical accounting times of the node corresponding to the cloud host; The step of determining the accounting node based on the equity information includes: Create campaign array; Determine the node equity based on a preset formula and the node's equity information; According to the node equity, determine the accounting node through the election array; The preset formula is specifically: Wherein, k is the node equity, f is the CPU utilization, h is the memory utilization, n is the number of historical accounting times of the node, and m is the total number of blocks in the blockchain.
6. The cloud host resource monitoring system based on blockchain according to claim 5 is characterized in that: The system further comprises: The data collection module is used to obtain basic information of the cloud host.
7. The cloud host resource monitoring system based on blockchain according to claim 5 is characterized in that: The system further comprises: The information export module is used to export the cloud host usage and calculate the charges through the upper-layer smart contract.
8. A computer-readable storage medium storing instructions executable by a processor, characterized in that: The processor-executable instructions, when executed by the processor, are used to implement the blockchain-based cloud host resource supervision method as described in any one of claims 1 to 4.