Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, the related information (including, but not limited to, user equipment information, user personal information, etc.) and data (including, but not limited to, data for presentation, analyzed data, etc.) related to the present invention are information and data authorized by the user or sufficiently authorized by each party. For example, an interface is provided between the system and the relevant user or institution, before acquiring the relevant information, the system needs to send an acquisition request to the user or institution through the interface, and acquire the relevant information after receiving the consent information fed back by the user or institution.
Example 1
In accordance with an embodiment of the present invention, there is provided an embodiment of a blockchain-based fortune dimension management method, it being noted that the steps illustrated in the flowchart of the figures may be performed in a computer system, such as a set of computer-executable instructions, and that, although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
FIG. 1 is a flow chart of an alternative blockchain-based operation and data management method according to an embodiment of the present invention, as shown in FIG. 1, including the steps of:
step S101, receiving data processing requests sent by a plurality of blockchain nodes, and determining a target processing link corresponding to the data processing requests according to data types in the data processing requests, wherein the data processing requests are used for requesting to process target operation data corresponding to the data types, and the target processing link is one of the following: blockchain backbones and blockchain side chains.
In the above steps, the data processing request sent by the plurality of blockchain nodes may be received by an application system, a processor, an electronic device, or the like, optionally, the data processing request sent by the plurality of blockchain nodes may be received by a blockchain-based operation-data management system, where the system includes a blockchain network formed by the plurality of blockchain nodes, and the data processing request sent by the plurality of blockchain nodes is received by the blockchain network.
Optionally, each block link point corresponds to each server in the server cluster of the data center, and the data processing request may be a request for adding, deleting, checking, etc. operation and maintenance data, where the data types at least include a performance data type, an application data type, a system configuration data type, etc., for example, when the data type in the data processing request is the performance data type, the target operation and maintenance data is the performance data.
Optionally, according to the data type in the data processing request, a target processing link corresponding to the data processing request may be determined, that is, whether the processing link for processing the target operation data is a blockchain main chain or a blockchain side chain may be determined. For example, when the data type in the data processing request is a performance data type, the blockchain side-chain is treated as the target processing link, i.e., the performance data is processed through the blockchain side-chain.
Step S102, generating a target transaction corresponding to the data processing request according to the target processing link, and determining a target processing mode corresponding to the target transaction according to the transaction type of the target transaction, wherein the target transaction is used for realizing data processing operation on the blockchain, and the target processing mode is one of the following: on-chain processing mode and off-chain processing mode.
Optionally, after determining the target processing link, a target transaction corresponding to the data processing request may be generated according to the target processing link, so that a target processing mode corresponding to the target transaction may be determined according to a transaction type of the target transaction, that is, whether the mode of processing the target transaction is an on-link processing mode or an off-link processing mode is determined, that is, whether the target transaction can be transferred out of the link is determined.
For example, when the transaction type of the target transaction is a transaction type with high real-time requirement, the under-chain processing mode is used as the target processing mode, namely the target transaction is processed through the under-chain processing mode, so that the transaction which can be transferred to the under-chain processing is carried out outside the blockchain network, and the operation speed of the blockchain is remarkably improved.
Step S103, processing the target transaction according to the target processing mode to obtain a data processing result, and returning the data processing result to the plurality of blockchain nodes.
Optionally, after determining the target processing manner, the target transaction may be processed according to the target processing manner, to obtain a data processing result, and the data processing result is returned to the plurality of blockchain nodes. For example, when the target processing mode is the under-chain processing mode, the target transaction is transferred to the outside of the blockchain network for transaction, and a data processing result is obtained.
Based on the scheme defined in the steps S101 to S103, it can be known that, in the embodiment of the present invention, a manner of processing server performance data through a blockchain side chain is adopted, and transactions that can be transferred to under-chain processing are performed outside the blockchain network, first data processing requests sent by a plurality of blockchain nodes are received, a target processing link corresponding to the data processing requests is determined according to the data types in the data processing requests, then target transactions corresponding to the data processing requests are generated according to the target processing links, a target processing manner corresponding to the target transactions is determined according to the transaction types of the target transactions, then the target transactions are processed according to the target processing manner, so as to obtain data processing results, and the data processing results are returned to the plurality of blockchain nodes. The data processing request is used for requesting to process target operation data corresponding to the data type, and the target processing link is one of the following: the target transaction is used for realizing data processing operation on the blockchain, and the target processing mode is one of the following: on-chain processing mode and off-chain processing mode.
It is easy to note that in the above process, according to the data type in the data processing request, the target processing link corresponding to the data processing request can be determined, so that the target transaction corresponding to the data processing request can be generated according to the target processing link, the operation and maintenance data of a part are processed through the blockchain side chain, the operation pressure is shared for the blockchain main chain, and the operation efficiency of the blockchain is effectively improved; according to the transaction type of the target transaction, the target processing mode corresponding to the target transaction can be determined, so that the target transaction can be processed according to the target processing mode, a data processing result is obtained, the transaction which can be transferred to the under-chain processing is carried out outside the blockchain network, the operation speed of the blockchain is obviously improved, the operation and maintenance efficiency is improved, and the management capability of the data center on operation and maintenance data is improved.
Therefore, by the technical scheme, the invention achieves the purposes of improving the safety, consistency and convenience of operation and maintenance data and providing more effective guarantee for the storage and use of the operation and maintenance data, thereby realizing the technical effects of improving the operation speed of a block chain and improving the operation and maintenance efficiency, and further solving the technical problem of lower operation and maintenance efficiency due to slower operation speed of the block chain when the operation and maintenance data are managed by using the block chain technology in the prior art.
In an alternative embodiment, determining a target processing link corresponding to the data processing request according to the data type in the data processing request includes: if the data type is the performance data type, using a blockchain side chain as a target processing link; if the data type is a data type other than the performance data type, the blockchain backbone is treated as the target processing link.
Optionally, the operation data generated in the operation and maintenance process of the data center includes system configuration data, application program data, system logs, performance data, security data, user data, mirror files, installation packages, and the like. In the process of determining a target processing link corresponding to the data processing request according to the data type in the data processing request, if the data type is a performance data type, determining the target processing link as a blockchain side chain; if the data type is a data type other than a performance data type, e.g., a system configuration data type, an application data type, etc., then the target processing link is determined to be a blockchain backbone.
In this embodiment, for the data format of the server performance data, which is collected daily and has a relatively fixed format, a side chain (sidchain) technology is used to move the transaction from the main blockchain network to another blockchain network, that is, to move the transaction from the blockchain main chain to the blockchain side chain, so that the load of the main blockchain network is effectively reduced, and the operation performance of the data center blockchain network can be improved while the security and the decentralization characteristics of the blockchain are maintained.
In an alternative embodiment, determining a target processing mode corresponding to the target transaction according to a transaction type of the target transaction includes: if the transaction type is the first transaction type, taking the downlink processing mode as a target processing mode; if the transaction type is the second transaction type, the on-chain processing mode is used as the target processing mode, wherein the real-time requirement of the transaction of the first transaction type is higher than that of the transaction of the second transaction type.
Alternatively, the first transaction type may be a transaction requiring high real-time performance, and the second transaction type may be a transaction requiring low real-time performance. In the process of determining the target processing mode corresponding to the target transaction according to the transaction type of the target transaction, whether the target transaction can be transferred out of the chain or not can be judged. Optionally, if the transaction type is the first transaction type, that is, when the target transaction is a transaction with high real-time requirements, the under-chain processing mode is used as the target processing mode, that is, the target transaction can be transferred to the outside of the blockchain network for transaction; if the transaction type is the second transaction type, namely when the target transaction is a transaction with low requirement on real-time property, the on-chain processing mode is taken as the target processing mode.
It should be noted that, in this embodiment, in the operation process of the blockchain, the calculation task may be completed based on the State Channels (State Channels) technology, so that the transaction (for example, the transaction with high real-time requirement) that can be transferred to the under-chain processing is performed outside the blockchain network, only the final State will be recorded on the blockchain, so that the operation speed and throughput of the blockchain are significantly improved, and the operation cost is reduced.
In an alternative embodiment, processing the target transaction according to the target processing mode to obtain a data processing result includes: if the target processing mode is an under-chain processing mode, historical transaction data in a preset time period are obtained, and the transaction condition of a future target time period is predicted and obtained according to a pre-trained ridge regression model and the historical transaction data; according to the transaction condition of a future target time period, performing state control on a state channel of the blockchain, wherein the state channel is used for realizing the under-chain transaction of a plurality of blockchain nodes; and receiving the final channel state of the state channel submitted by the plurality of block chain nodes, and generating a data processing result according to the final channel state, wherein the final channel state is the channel state of the plurality of block chain nodes when the transaction in the state channel is finished.
Optionally, if the target processing manner is an on-chain processing manner, the target transaction is processed according to the existing processing flow to generate a data processing result, which is not described herein.
Optionally, during the operation of the blockchain, the computing task is completed based on State channel (State Channels) technology, and the transactions that can be transferred to the under-chain processing (for example, the transactions with high real-time requirements) are implemented to be transacted outside the blockchain network. Specifically, the participants (i.e. server nodes) in the State Channels technology can perform any number of transactions (for example, adding, deleting, checking and the like on the operation and maintenance data), and because the number and the variety of the operation and maintenance data of the data center are large, serious congestion and delay of the transactions can occur, in this embodiment, the State control is performed on the State Channels of the blockchain by adopting the ridge regression algorithm, so that the transaction flow is better managed and the delay is reduced.
Optionally, if the target processing mode is an under-chain processing mode, historical transaction data in a preset time period is obtained, and according to a pre-trained ridge regression model and the historical transaction data, a transaction condition of a future target time period is predicted. For example, the transaction delay conditions of the blockchain in the past three months are collected, including the transaction quantity, the correspondence between the transaction delay and time (i.e. the correspondence between the transaction delay and the transaction time period), etc., and the historical transaction data is subjected to regression analysis according to a pre-trained ridge regression model to predict the transaction delay condition in the future week.
Further, state control can be performed on the state channel of the blockchain according to the transaction condition of the future target time period. For example, after predicting a transaction delay condition within a future week, the control rules include at least controlling the time points at which the transaction delay is high, controlling the number of open State Channels (i.e., controlling the number of State Channels created on the blockchain), and limiting the frequency of transactions for participants who transact more.
Alternatively, establishing a channel between participants that is commonly owned by both parties may be accomplished by creating a multi-signature wallet on the blockchain, wherein the multi-signature wallet requires that all participants in the channel be authorized to conduct transactions. Participants can freely conduct transactions in the channel without submitting each transaction to the blockchain, and the participants can send transaction requests to each other and sign the transactions using their respective private keys.
Optionally, after each transaction has occurred, the participant can verify the validity of the transaction locally to ensure that the transaction does not violate the rules and constraints of the channel, thereby saving verification time and expense on the blockchain. Alternatively, once the transaction is verified, the participants may exchange signatures with each other so that each participant holds the latest signature on the entire channel state. If a dispute occurs between participants, for example, one refuses to collaborate or proposes an invalid transaction, the participants may resolve the dispute by submitting the channel state on the blockchain, in which case the intelligent contracts on the blockchain will execute the dispute resolution rules and determine the winner based on the final signature of the channel state.
Alternatively, when the participant transaction is finished to close the channel, the final channel state may be submitted to the blockchain, the final channel state of the status channels submitted by the plurality of blockchain nodes may be received through the blockchain, and the data processing results may be generated based on the final channel state, e.g., the participant will allocate funds on the blockchain according to the final state.
By the process, the operation speed of the block chain is obviously improved, so that the operation and maintenance efficiency is improved, and the management capability of the data center on operation and maintenance data is improved.
In an alternative embodiment, the trade condition of the future target time period at least includes a trade number of each blockchain node in each trade day of the future target time period, wherein the state control of the state channel of the blockchain according to the trade condition of the future target time period includes: determining a target blockchain node from a plurality of blockchain nodes according to the transaction quantity of each blockchain node in each transaction day of a future target time period, wherein the target blockchain node is a blockchain node with the transaction quantity larger than a preset threshold value; and carrying out state control on the state channel corresponding to the link point of the target block according to a preset control rule.
Optionally, after predicting transaction delay conditions such as transaction number in a future week (i.e., transaction number of each blockchain node in each transaction day of a future target period), correspondence between transaction delay and time (i.e., correspondence between height of transaction delay and transaction period), state control may be performed on State Channels of the blockchain, for example, automatic control may be performed on transaction management of State Channels (i.e., state Channels), where the control rule (i.e., preset control rule) includes at least a time point when the transaction delay is high, controlling the number of open State Channels (i.e., controlling the number of State Channels created on the blockchain), and limiting the transaction frequency for more participants of the transaction.
Optionally, according to the transaction number of each blockchain node in each transaction day of the future target time period, determining a participant with more transactions, that is, the blockchain node with the transaction number greater than the preset threshold, from the plurality of blockchain nodes, so that state control can be performed on the state channel corresponding to the blockchain node with the transaction number greater than the preset threshold according to the preset control rule, that is, the transaction frequency of the participant with more transactions is limited.
By controlling the state of the state channel of the blockchain, the transaction flow can be better managed, the delay can be reduced, and the operation speed of the blockchain can be effectively improved.
In an alternative embodiment, after determining the target processing link corresponding to the data processing request according to the data type in the data processing request, if the target processing link is a blockchain side chain, determining a storage space and a generation time of the blockchain side chain according to the data amount of the target operation and maintenance data, and generating the blockchain side chain according to the storage space and the generation time.
Optionally, when it is determined that the processing link is a blockchain side chain, the blockchain side chain needs to be created first, that is, according to the data amount of the target operation and maintenance data, the storage space and the generation time of the blockchain side chain are determined, and according to the storage space and the generation time, the blockchain side chain is generated.
Alternatively, in this embodiment, for a data format such as server performance data that is collected daily, in a relatively fixed format, side chain (Sidechains) techniques are employed to move transactions from a master blockchain network to another blockchain network, i.e., to move transactions from a blockchain backbone to blockchain side chains. When the Sidechains technology operates, firstly, determining the block size (namely the storage space size), the block generation time (namely the generation time) and a consensus algorithm of the block chain side chains according to the data quantity of the performance data, and generating the block chain side chains after the determination.
Optionally, in this embodiment, to assist in the operation of the sideins technology, a Redis database is used to cache the calculation result and data, and corresponding expiration times are set for different cached data respectively, so as to ensure that the data in the cache automatically fail after a certain time, thereby avoiding the use of the cached expiration data, and automatically deleting the failed cached content.
By the above process, the blockchain side chain can be generated, so that the transaction can be moved from the blockchain main chain to the blockchain side chain, the load of the main blockchain network is effectively lightened, and the running performance of the data center blockchain network can be improved while the safety and the decentralization characteristic of the blockchain are maintained.
In an alternative embodiment, an initial blockchain is constructed prior to receiving data processing requests sent by a plurality of blockchain nodes, wherein the initial blockchain includes a plurality of initial blocks, each initial block constructed by each server in a server cluster of a data center; acquiring operation and maintenance data of a server, and verifying the operation and maintenance data according to standard data requirements of a blockchain to obtain a data verification result, wherein the operation and maintenance data at least comprises performance data, and the data verification result represents whether the operation and maintenance data passes verification or not; if the operation and maintenance data passes the verification, determining first operation and maintenance data from the operation and maintenance data, and storing the first operation and maintenance data outside the block chain in a target storage mode, wherein the first operation and maintenance data is operation and maintenance data with the data quantity larger than a data quantity threshold value; and packaging the operation data except the first operation data into a new block, and performing validity verification on the new block through a target consensus algorithm, and adding the new block to the end of the initial block chain to generate a block chain under the condition that the new block passes the validity verification.
Optionally, the blockchain network may first need to be built prior to receiving data processing requests sent by multiple blockchain nodes. Optionally, the target storage mode is an Off-chain data storage mode, and the target consensus algorithm is a Proof of interest consensus algorithm.
FIG. 2 is a schematic diagram of a frame of an alternative blockchain-based operation and data management system according to an embodiment of the present invention, as shown in FIG. 2, an initial blockchain is first constructed, i.e., the blockchain is initialized by an initialization module, initial blocks corresponding to the servers are constructed on each server, and each initial block is added to the blockchain.
Further, the operation and maintenance data of the server are obtained, for example, by a data receiving module, the operation and maintenance data generated by a data center of each server (for example, machine_1, machine_2, machine_3, machine_n) of the server cluster, application program data, system logs, performance data, security data, user data, image files, installation packages and the like are obtained, optionally, a smart contract of a blockchain can be received by the data receiving module, wherein the smart contract has access rights and operation rights corresponding to each user recorded therein, that is, control of rights is implemented in the smart contract, for example, only a user who does need to access and modify the data is granted with corresponding rights, and only a specific user can add a new data block or perform certain operations to prevent malicious attacks and unauthorized access.
Further, the received operation and maintenance data are verified to ensure that the operation and maintenance data conform to the rules and standards of the blockchain, namely, the operation and maintenance data are verified according to the standard data requirement of the blockchain to obtain a data verification result, and if the operation and maintenance data do not pass the verification, the operation and maintenance data are obtained again.
Optionally, if the operation and maintenance data passes the verification, determining operation and maintenance data (i.e. first operation and maintenance data) with the data quantity greater than the data quantity threshold value from the operation and maintenance data, and storing the first operation and maintenance data outside the blockchain through an Off-chain data storage mode. Specifically, a new block is created through the block creation module, verified data is packed into a new block, off-chain data storage is used, and data outside the blockchain is stored in other places, so that the load of the blockchain network is reduced, and the operation efficiency of the whole network is improved.
Further, the new block is validated through a Proof of state consensus algorithm, and the new block is added to the end of the initial blockchain to generate the blockchain if the new block passes the validation. Specifically, the Proof of state consensus algorithm is used in the block confirmation module to confirm the new block, and as the algorithm does not need a large amount of computing power, less energy can be consumed, and the running efficiency of the block chain is improved.
Further, after adding a new block to the end of the initial blockchain, node updating is performed, namely updating the block copies of all nodes of the blockchain once so as to ensure the consistency of data, thereby being capable of performing data query and calculation on the data on the blockchain according to actual needs.
FIG. 3 is a schematic diagram of a data query and calculation flow of an alternative blockchain-based fortune dimension data management system according to embodiments of the present invention, as shown in FIG. 3, in the process of performing data query and calculation on data on blockchains according to actual needs, blockchains receive data processing requests such as add-drop-modify-check sent by a plurality of blockchain nodes, links are divided according to data types, that is, when the data in the data processing requests is server performance data, transactions are moved from a main blockchain network to another blockchain network, that is, transactions are moved from the blockchain backbone to blockchain side chains by the Sidechains technology. When the data in the data processing request is not server performance data, processing the running data through a block chain main chain, including creating a transaction, calculating task division and the like, then judging whether the transaction can be transferred outside the block chain, and if the transaction can not be transferred outside the block chain, performing processing such as adding, deleting, modifying and the like on the block chain; if the transaction can be transferred outside the blockchain, regression analysis is carried out on the historical data through a ridge regression data prediction algorithm to obtain a transaction amount prediction result, and calculation tasks are completed based on a State Channels technology, namely, processing such as adding, deleting, modifying and the like is carried out, so that the transaction (for example, the transaction with high real-time requirements) which can be transferred to the under-chain processing is carried out outside the blockchain network, only the final State is recorded on the blockchain, the operation speed and throughput of the blockchain are obviously improved, and the operation cost is reduced.
In the embodiment, the massive operation and maintenance data of the data center are efficiently managed based on the blockchain technology and the optimization algorithm of the blockchain, so that huge pressure caused by the massive operation and maintenance data on the blockchain can be effectively applied, the blockchain has stronger practicability on the data center, the operation speed of the blockchain is remarkably improved, the operation and maintenance efficiency is improved, and the management capability of the data center on the operation and maintenance data is improved.
Therefore, by the technical scheme, the invention achieves the purposes of improving the safety, consistency and convenience of operation and maintenance data and providing more effective guarantee for the storage and use of the operation and maintenance data, thereby realizing the technical effects of improving the operation speed of a block chain and improving the operation and maintenance efficiency, and further solving the technical problem of lower operation and maintenance efficiency due to slower operation speed of the block chain when the operation and maintenance data are managed by using the block chain technology in the prior art.
Example 2
According to an embodiment of the present invention, there is provided an embodiment of a blockchain-based operation and data management apparatus, wherein fig. 4 is a schematic diagram of an alternative blockchain-based operation and data management apparatus according to an embodiment of the present invention, as shown in fig. 4, the apparatus includes: the receiving module 401 is configured to receive data processing requests sent by a plurality of blockchain nodes, and determine a target processing link corresponding to the data processing request according to a data type in the data processing requests, where the data processing request is used to request processing of target operation data corresponding to the data type, and the target processing link is one of the following: a blockchain backbone, blockchain side chains; the determining module 402 is configured to generate a target transaction corresponding to the data processing request according to the target processing link, and determine a target processing mode corresponding to the target transaction according to a transaction type of the target transaction, where the target transaction is used to implement a data processing operation on the blockchain, and the target processing mode is one of the following: an on-chain processing mode and an off-chain processing mode; the processing module 403 is configured to process the target transaction according to the target processing manner, obtain a data processing result, and return the data processing result to the plurality of blockchain nodes.
It should be noted that the receiving module 401, the determining module 402, and the processing module 403 correspond to steps S101 to S103 in the above embodiment, and the three modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to those disclosed in the above embodiment 1.
Optionally, the receiving module includes: the first determining module is used for taking the blockchain side chain as the target processing link if the data type is a performance data type; and the second determining module is used for taking the block chain main chain as the target processing link if the data type is the data type except the performance data type.
Optionally, the determining module includes: the third determining module is configured to take the under-link processing manner as the target processing manner if the transaction type is the first transaction type; and a fourth determining module, configured to take the on-chain processing manner as the target processing manner if the transaction type is a second transaction type, where the real-time requirement of the transaction of the first transaction type is higher than the real-time requirement of the transaction of the second transaction type.
Optionally, the processing module includes: the first acquisition module is used for acquiring historical transaction data in a preset time period if the target processing mode is the under-chain processing mode, and predicting and obtaining transaction conditions of a future target time period according to a pre-trained ridge regression model and the historical transaction data; the control module is used for carrying out state control on the state channel of the blockchain according to the transaction condition of the future target time period, wherein the state channel is used for realizing the under-chain transaction of the blockchain nodes; the first generation module is used for receiving the final channel state of the state channel submitted by the block chain nodes and generating the data processing result according to the final channel state, wherein the final channel state is the channel state of the block chain nodes when the transaction in the state channel is finished.
Optionally, the trade condition of the future target time period includes at least a trade number of each blockchain node on each trade day of the future target time period, wherein the control module includes: a fifth determining module, configured to determine a target blockchain node from the plurality of blockchain nodes according to the transaction number of each blockchain node in each transaction day of the future target time period, where the target blockchain node is a blockchain node whose transaction number is greater than a preset threshold; the first control module is used for carrying out state control on the state channel corresponding to the link point of the target block according to a preset control rule.
Optionally, the operation and data management device based on the blockchain further comprises: and the second generation module is used for determining the storage space and the generation time of the blockchain side chain according to the data quantity of the target operation and maintenance data and generating the blockchain side chain according to the storage space and the generation time after determining the target processing link corresponding to the data processing request according to the data type in the data processing request if the target processing link is the blockchain side chain.
Optionally, the operation and data management device based on the blockchain further comprises: the system comprises a construction module, a data center and a data center, wherein the construction module is used for constructing an initial blockchain before receiving data processing requests sent by a plurality of blockchain nodes, wherein the initial blockchain comprises a plurality of initial blocks, and each initial block is constructed by each server in a server cluster of the data center; the second acquisition module is used for acquiring operation and maintenance data of the server, verifying the operation and maintenance data according to standard data requirements of a blockchain to obtain a data verification result, wherein the operation and maintenance data at least comprises performance data, and the data verification result represents whether the operation and maintenance data passes the verification or not; a sixth determining module, configured to determine, if the operation and maintenance data passes the verification, first operation and maintenance data from the operation and maintenance data, and store the first operation and maintenance data outside the blockchain in a target storage manner, where the first operation and maintenance data is operation and maintenance data with a data volume greater than a data volume threshold; and the third generation module is used for packaging the operation data except the first operation data into a new block, carrying out validity verification on the new block through a target consensus algorithm, and adding the new block to the tail end of the initial block chain to generate the block chain under the condition that the new block passes the validity verification.
Example 3
According to another aspect of the embodiments of the present invention, there is also provided a computer readable storage medium having a computer program stored therein, wherein the computer program is configured to perform the above-described blockchain-based operation and dimension management method at runtime.
Example 4
According to another aspect of the embodiments of the present invention, there is also provided an electronic device, wherein fig. 5 is a schematic diagram of an alternative electronic device according to an embodiment of the present invention, as shown in fig. 5, the electronic device including one or more processors; and a memory for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement a method for running the programs, wherein the programs are configured to perform the blockchain-based operation and dimension management method described above when run. The processor when executing the program implements the following steps: receiving data processing requests sent by a plurality of block chain nodes, and determining a target processing link corresponding to the data processing requests according to data types in the data processing requests, wherein the data processing requests are used for requesting to process target operation data corresponding to the data types, and the target processing link is one of the following: a blockchain backbone, blockchain side chains; generating a target transaction corresponding to the data processing request according to the target processing link, and determining a target processing mode corresponding to the target transaction according to the transaction type of the target transaction, wherein the target transaction is used for realizing data processing operation on the blockchain, and the target processing mode is one of the following: an on-chain processing mode and an off-chain processing mode; and processing the target transaction according to the target processing mode to obtain a data processing result, and returning the data processing result to the plurality of blockchain nodes.
Optionally, the processor when executing the program further implements the following steps: determining a target processing link corresponding to the data processing request according to the data type in the data processing request, including: if the data type is the performance data type, using a blockchain side chain as a target processing link; if the data type is a data type other than the performance data type, the blockchain backbone is treated as the target processing link.
Optionally, the processor when executing the program further implements the following steps: determining a target processing mode corresponding to the target transaction according to the transaction type of the target transaction, including: if the transaction type is the first transaction type, taking the downlink processing mode as a target processing mode; if the transaction type is the second transaction type, the on-chain processing mode is used as the target processing mode, wherein the real-time requirement of the transaction of the first transaction type is higher than that of the transaction of the second transaction type.
Optionally, the processor when executing the program further implements the following steps: processing the target transaction according to the target processing mode to obtain a data processing result, including: if the target processing mode is an under-chain processing mode, historical transaction data in a preset time period are obtained, and the transaction condition of a future target time period is predicted and obtained according to a pre-trained ridge regression model and the historical transaction data; according to the transaction condition of a future target time period, performing state control on a state channel of the blockchain, wherein the state channel is used for realizing the under-chain transaction of a plurality of blockchain nodes; and receiving the final channel state of the state channel submitted by the plurality of block chain nodes, and generating a data processing result according to the final channel state, wherein the final channel state is the channel state of the plurality of block chain nodes when the transaction in the state channel is finished.
Optionally, the processor when executing the program further implements the following steps: the trade condition of the future target time period at least comprises the trade quantity of each blockchain node in each trade day of the future target time period, wherein the state control of the state channel of the blockchain is performed according to the trade condition of the future target time period, and the method comprises the following steps: determining a target blockchain node from a plurality of blockchain nodes according to the transaction quantity of each blockchain node in each transaction day of a future target time period, wherein the target blockchain node is a blockchain node with the transaction quantity larger than a preset threshold value; and carrying out state control on the state channel corresponding to the link point of the target block according to a preset control rule.
Optionally, the processor when executing the program further implements the following steps: after determining a target processing link corresponding to the data processing request according to the data type in the data processing request, if the target processing link is a blockchain side chain, determining the storage space and the generation time of the blockchain side chain according to the data quantity of the target operation and maintenance data, and generating the blockchain side chain according to the storage space and the generation time.
Optionally, the processor when executing the program further implements the following steps: before receiving data processing requests sent by a plurality of blockchain nodes, constructing an initial blockchain, wherein the initial blockchain comprises a plurality of initial blocks, and each initial block is constructed by each server in a server cluster of a data center; acquiring operation and maintenance data of a server, and verifying the operation and maintenance data according to standard data requirements of a blockchain to obtain a data verification result, wherein the operation and maintenance data at least comprises performance data, and the data verification result represents whether the operation and maintenance data passes verification or not; if the operation and maintenance data passes the verification, determining first operation and maintenance data from the operation and maintenance data, and storing the first operation and maintenance data outside the block chain in a target storage mode, wherein the first operation and maintenance data is operation and maintenance data with the data quantity larger than a data quantity threshold value; and packaging the operation data except the first operation data into a new block, and performing validity verification on the new block through a target consensus algorithm, and adding the new block to the end of the initial block chain to generate a block chain under the condition that the new block passes the validity verification.
The device herein may be a server, PC, PAD, cell phone, etc.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed technology may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or 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 Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a preferred embodiment of the present invention and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present invention, which are intended to be comprehended within the scope of the present invention.