Green hybrid data center data storage and calculation management method based on IPFS protocol

Data is decomposed and backed up in distributed data centers through the IPFS protocol and blockchain technology, and the timing mechanism is used to ensure the security of data upload. This solves the problem of offline data center nodes caused by unstable new energy power supply and improves the efficiency of data storage. Security and reliability.

CN118606401APending Publication Date: 2024-09-06DADU RIVER NEW ENERGY INVESTMENT CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410584276.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-11
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Unstable new energy power supply causes distributed data center nodes to go offline, making it difficult to ensure data integrity and effective execution of computing tasks.

Method used

By judging the online status of distributed nodes, use IPFS protocol and blockchain technology to decompose data into multiple data pieces and back them up, generate indexes to ensure data integrity, and use the timing mechanism to provide timestamp credentials to ensure that data is offline at the node Safe uploading at all times.

Benefits of technology

It effectively reduces the occurrence of data storage failures, improves the security and reliability of data storage, and ensures the normal operation of the data center under unstable energy supply.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118606401A
    Figure CN118606401A
Patent Text Reader

Abstract

The invention relates to a green hybrid data center data storage and calculation management method based on an IPFS protocol, and the method comprises the steps: judging whether a target distributed node meets a preset online condition or not; if yes, the target to-be-stored data is uploaded to the target distributed node according to the first timestamp, the hash value and the storage verification requirement of the target to-be-stored data, otherwise, the target to-be-stored data is endowed with a second timestamp, and when a preset online condition is met, the target to-be-stored data is uploaded based on the second timestamp; and generating a plurality of block chain blocks according to the target to-be-stored data, decomposing the target to-be-stored data into a plurality of data pieces, backing up each data piece by using other distributed nodes, generating an index corresponding to each data piece, and obtaining the complete target to-be-stored data by using the index. Therefore, the problems that due to the fact that new energy power supply is not stable, nodes of the distributed data center are prone to being offline, and the data center is difficult to guarantee complete and safe storage of data and effective execution of calculation tasks are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data storage and computing technology, and in particular to a green hybrid data center data storage and computing management based on the IPFS protocol. Background Art

[0002] With the development of digitalization, the scale of data centers has gradually expanded, and the challenges of load balancing and energy consumption have become increasingly prominent. How to effectively manage the energy consumption of these data centers has become a challenge that needs to be solved urgently. As a new type of architecture, hybrid data centers combine the advantages of centralized data centers and distributed data centers. As green and clean energy becomes one of the power supply sources for distributed data center nodes, the "central + distributed" hybrid data center model will gradually become a hot spot for the next step of data center research. Since distributed data center nodes are mainly powered directly by green energy (such as hydropower, photovoltaics, and wind power), the instability of energy supply will be greatly increased compared to traditional thermal power. In the case of fluctuations in energy supply, the operation of distributed data center nodes may be unstable, and nodes may go offline. Coupled with other failure conditions such as fluctuations in server load, the scheduling of computing tasks will become more complex and difficult.

[0003] Existing data storage technologies lack secure storage strategies for this type of hybrid architecture. At the data center level based on IPFS (InterPlanetary File System), there is a lack of methods to store data completely when network conditions fluctuate or distributed nodes fail; in the current blockchain technology based on the timing mechanism, there is a lack of methods for securely uploading data when the network is disconnected; in data storage strategies, there is also a lack of methods for data storage and maintenance based on the perspective of the hybrid data center framework.

[0004] To sum up, due to the unstable power supply of renewable energy, it is easy for nodes in distributed data centers to go offline, making it difficult for data centers to ensure the complete and secure storage of data and the effective execution of computing tasks, which needs to be solved urgently. Summary of the invention

[0005] The present application provides a green hybrid data center data storage and computing management method based on the IPFS protocol to solve the problem that due to unstable power supply from new energy sources, nodes in distributed data centers are easily offline, making it difficult for data centers to ensure complete and secure data storage and effective execution of computing tasks.

[0006] The first aspect of the present application provides a green hybrid data center data storage and computing management method based on the IPFS protocol, comprising the following steps: determining whether a target distributed node meets a preset online condition; if the target distributed node meets the preset online condition, uploading the target data to be stored to the target distributed node according to a first timestamp, a hash value and a preset storage verification requirement corresponding to the target data to be stored; otherwise, assigning a second timestamp to the target data to be stored, and when the target distributed node meets the preset online condition, uploading the target data to be stored to the target distributed node based on the second timestamp, the hash value and the preset storage verification requirement; generating multiple blockchain blocks based on the hash value, the first timestamp or the second timestamp, and decomposing the target data to be stored into multiple data slices through a preset IPFS distributed data center, and backing up each data slice using other distributed nodes and the multiple blockchain blocks, and generating an index corresponding to each data slice, so as to obtain the complete target data to be stored using the index through the preset IPFS distributed data center.

[0007] Optionally, in one embodiment of the present application, if the target distributed node meets the preset online condition, the target data to be stored is uploaded to the target distributed node according to the first timestamp, hash value and preset storage verification requirements corresponding to the target data to be stored, including: calculating the first timestamp and hash value of the target data to be stored, and sending the target data to be stored, the first timestamp and the hash value to the preset IPFS distributed data center; based on the preset IPFS distributed data center and the target distributed node, performing storage verification on the first timestamp and the hash value, and uploading the target data to be stored to the target distributed node if the first timestamp and the hash value meet the preset storage verification requirements.

[0008] Optionally, in one embodiment of the present application, otherwise assigning a second timestamp to the target data to be stored, and when the target distributed node meets the preset online condition, uploading the target data to be stored to the target distributed node based on the second timestamp, the hash value and the preset storage verification requirement, including: assigning a second timestamp to the target data to be stored through a preset timing center, adding the storage task information corresponding to the target data to be stored to a preset storage task queue, and sending the second timestamp and the hash value to the preset IPFS distributed data center; judging in real time whether the target distributed node meets the preset online condition, and when the target distributed node meets the preset online condition, performing storage verification on the second timestamp and the hash value according to the preset IPFS distributed data center and the target distributed node, so as to obtain the target data to be stored from the storage task queue when the second timestamp and the hash value meet the preset storage verification requirement, and uploading the target data to be stored to the target distributed node.

[0009] Optionally, in one embodiment of the present application, generating multiple blockchain blocks based on the hash value, the first timestamp or the second timestamp includes: when the preset IPFS distributed data center receives the target data to be stored, controlling the preset blockchain system to generate multiple blockchain blocks; storing the block hash value of the previous blockchain block, the hash value corresponding to the target data to be stored, and the trusted time certificate corresponding to the first timestamp or the second timestamp in each blockchain block of the multiple blockchain blocks.

[0010] Optionally, in one embodiment of the present application, the target data to be stored is decomposed into multiple data pieces through a preset IPFS distributed data center, and each data piece is backed up by using other distributed nodes and the multiple blockchain blocks, and an index corresponding to each data piece is generated at the same time, so as to obtain the complete target data to be stored by using the index through the preset IPFS distributed data center, including: storing a preset number of data pieces from the multiple data pieces to a preset centralized data center, and storing the remaining data pieces to at least one distributed node of the preset IPFS distributed data center; obtaining the data pieces in each distributed node of the at least one distributed node in the target data to be stored; ID information and sequence information in the stored data are obtained, and an index corresponding to each data piece is constructed according to the ID information and the sequence information; the preset IPFS distributed data center is used to control the other distributed nodes to back up the data pieces in each distributed node to obtain corresponding backup data; when there are one or more distributed nodes that do not meet the preset online conditions among all distributed nodes, the data pieces in the preset centralized data center are obtained, and the data pieces or backup data in each distributed node are obtained according to the index; based on the data pieces in the centralized data center, the data pieces or backup data in each distributed node, the complete target data to be stored is obtained.

[0011] The second aspect of the present application provides a green hybrid data center data storage and computing management device based on the IPFS protocol, including: a judgment module, used to judge whether the target distributed node meets the preset online conditions; an upload module, used to upload the target data to be stored to the target distributed node according to the first timestamp, hash value and preset storage verification requirements corresponding to the target data to be stored if the target distributed node meets the preset online conditions, otherwise assign a second timestamp to the target data to be stored, and when the target distributed node meets the preset online conditions, upload the target data to be stored to the target distributed node based on the second timestamp, the hash value and the preset storage verification requirements; a management module, used to generate multiple blockchain blocks based on the hash value, the first timestamp or the second timestamp, and decompose the target data to be stored into multiple data pieces through a preset IPFS distributed data center, and use other distributed nodes and the multiple blockchain blocks to back up each data piece, and at the same time generate an index corresponding to each data piece, so as to obtain the complete target data to be stored by using the index through the preset IPFS distributed data center.

[0012] Optionally, in one embodiment of the present application, the upload module includes: a calculation unit, used to calculate the first timestamp and the hash value of the target data to be stored, and send the target data to be stored, the first timestamp and the hash value to the preset IPFS distributed data center; a first verification unit, used to perform storage verification on the first timestamp and the hash value based on the preset IPFS distributed data center and the target distributed node, and upload the target data to be stored to the target distributed node if the first timestamp and the hash value meet the preset storage verification requirements.

[0013] Optionally, in one embodiment of the present application, the upload module also includes: an adding unit, used to assign a second timestamp to the target data to be stored through a preset timing center, and add the storage task information corresponding to the target data to be stored to a preset storage task queue, and send the second timestamp and the hash value to the preset IPFS distributed data center; a second verification unit, used to determine in real time whether the target distributed node meets the preset online condition, and when the target distributed node meets the preset online condition, perform storage verification on the second timestamp and the hash value according to the preset IPFS distributed data center and the target distributed node, so as to obtain the target data to be stored from the storage task queue when the second timestamp and the hash value meet the preset storage verification requirements, and upload the target data to be stored to the target distributed node.

[0014] Optionally, in one embodiment of the present application, the management module includes: a control unit, used to control the preset blockchain system to generate multiple blockchain blocks when the preset IPFS distributed data center receives the target data to be stored; a first storage unit, used to store the block hash value of the previous blockchain block, the hash value corresponding to the target data to be stored, and the trusted time certificate corresponding to the first timestamp or the second timestamp in each blockchain block of the multiple blockchain blocks.

[0015] Optionally, in one embodiment of the present application, the management module also includes: a second storage unit, used to store a preset number of data slices among the multiple data slices to a preset centralized data center, and store the remaining data slices to at least one distributed node of the preset IPFS distributed data center; a construction unit, used to obtain the ID information and sequence information of the data slices in each distributed node of the at least one distributed node in the target data to be stored, and construct an index corresponding to each data slice based on the ID information and the sequence information; a backup unit, used to control the other distributed nodes through the preset IPFS distributed data center to back up the data slices in each distributed node to obtain corresponding backup data; an acquisition unit, used to acquire the data slices in the preset centralized data center when there are one or more distributed nodes among all distributed nodes that do not meet the preset online conditions, and acquire the data slices or backup data in each distributed node according to the index; a reading unit, used to acquire the complete target data to be stored by using the data slices in the centralized data center, the data slices in each distributed node or the backup data.

[0016] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the program to implement the green hybrid data center data storage and computing management method based on the IPFS protocol as described in the above embodiment.

[0017] The fourth aspect embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the program is executed by a processor, it implements the above-mentioned green hybrid data center data storage and computing management method based on the IPFS protocol.

[0018] Therefore, the embodiments of the present application have the following beneficial effects:

[0019] The embodiment of the present application can determine whether the target distributed node meets the preset online condition; if the target distributed node meets the preset online condition, the target data to be stored is uploaded to the target distributed node according to the first timestamp, hash value and preset storage verification requirement corresponding to the target data to be stored, otherwise the target data to be stored is given a second timestamp, and when the target distributed node meets the preset online condition, the target data to be stored is uploaded to the target distributed node based on the second timestamp, hash value and preset storage verification requirement; based on the hash value, the first timestamp or the second timestamp, multiple blockchain blocks are generated, and the target data to be stored is decomposed into multiple data slices through the preset IPFS distributed data center, and each data slice is backed up by other distributed nodes and multiple blockchain blocks, and an index corresponding to each data slice is generated at the same time, so as to obtain the complete target data to be stored by using the index through the preset IPFS distributed data center. The present application can give full play to the system advantages of the hybrid framework of centralized and distributed data centers, and combine the characteristics of IPFS file system, blockchain storage, etc., effectively reduce the occurrence of data storage failure, and greatly improve the security of data storage. Thus, the problem that the distributed data center is easily offline due to the unstable power supply of new energy, making it difficult for the data center to ensure the complete and safe storage of data and the effective execution of computing tasks is solved.

[0020] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0022] Figure 1 A schematic diagram of the data storage and computing system architecture including a timing mechanism provided for this application;

[0023] Figure 2 A flowchart of a green hybrid data center data storage and computing management method based on the IPFS protocol provided according to an embodiment of the present application;

[0024] Figure 3 A logical diagram of a blockchain authentication mechanism based on a trusted time credential provided for one embodiment of the present application;

[0025] Figure 4 A schematic diagram of a blockchain block in a data security backup provided by an embodiment of the present application;

[0026] Figure 5This is an example diagram of a green hybrid data center data storage and computing management device based on the IPFS protocol according to an embodiment of the present application;

[0027] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0028] Among them, 10-a green hybrid data center data storage and computing management device based on the IPFS protocol; 100-a judgment module, 200-an upload module, 300-a management module; 601-a memory, 602-a processor, 603-a communication interface. DETAILED DESCRIPTION

[0029] Embodiments of the present application are described in detail below, and examples of the embodiments 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 intended to be used to explain the present application, and should not be construed as limiting the present application.

[0030] The following is a description of the data storage and computing management method of a green hybrid data center based on the IPFS protocol of an embodiment of the present application with reference to the accompanying drawings. In view of the problems mentioned in the above background technology, the present application provides a data storage and computing management method of a green hybrid data center based on the IPFS protocol, in which the target distributed node is judged to meet the preset online conditions; if the target distributed node meets the preset online conditions, the target data to be stored is uploaded to the target distributed node according to the first timestamp, hash value and preset storage verification requirements corresponding to the target data to be stored, otherwise the target data to be stored is given a second timestamp, and when the target distributed node meets the preset online conditions, the target data to be stored is uploaded to the target distributed node based on the second timestamp, hash value and preset storage verification requirements; based on the hash value, the first timestamp or the second timestamp, multiple blockchain blocks are generated, and the target data to be stored is decomposed into multiple data pieces by the preset IPFS distributed data center, and each data piece is backed up by other distributed nodes and multiple blockchain blocks, and an index corresponding to each data piece is generated at the same time, so as to obtain the complete target data to be stored by using the index through the preset IPFS distributed data center. This application can give full play to the system advantages of the hybrid framework of centralized and distributed data centers, and combined with the characteristics of IPFS file system and blockchain storage, effectively reduce the occurrence of data storage failures and greatly improve the security of data storage. As a result, it solves the problem that due to unstable power supply from new energy sources, it is easy to cause nodes in distributed data centers to go offline, making it difficult for data centers to ensure complete and secure data storage and effective execution of computing tasks.

[0031] In order to facilitate the understanding of the data storage and computing management method of the green hybrid data center based on the IPFS protocol of the present application by those skilled in the art, the following briefly introduces the data storage and computing system architecture including the timing mechanism involved in the present application:

[0032] This application is aimed at a hybrid data center architecture, which has both a centralized data center that operates stably but has a high cost, and a distributed data center based on the IPFS protocol and supported by new energy. It mainly solves the problem of data storage allocation between centralized data centers and distributed data centers (i.e., IPFS distributed data centers). Among them, the centralized data center uses a stable power supply, and the distributed data center uses a green new energy power supply mode such as wind power and solar energy. Therefore, this application also falls within the scope of a hybrid green data center.

[0033] In addition, the present application can use the IPFS protocol to implement the storage of distributed data center nodes, use the timing mechanism to provide timestamp credentials for the stored data, and use the blockchain system to store records containing file content hash values ​​and file upload timestamps.

[0034] Figure 1 This is a schematic diagram of the data storage and computing system architecture including the timing mechanism of this application. Figure 1 As shown in the figure, the data storage and computing system consists of a centralized data center, an IPFS distributed data center system, an external network, a timing center, and a data transmission link.

[0035] Among them, the centralized data center mainly plays the role of centralized storage and computing of data, and is connected to each distributed IPFS storage node through a data transmission link, centrally receiving the data uploaded by each node, thereby realizing centralized management and analysis of data;

[0036] The IPFS distributed data center system includes a series of distributed IPFS storage nodes. These nodes are based on the IPFS protocol to realize distributed storage of data. They can communicate with the centralized data center through data transmission links to send data upload and download requests, and back up the data in the centralized data center, thereby improving the security of data storage. Each node of the IPFS distributed data center system is also connected to the external network to realize data transmission with the Internet.

[0037] Specifically, Figure 2 A flowchart of a green hybrid data center data storage and computing management method based on the IPFS protocol provided in an embodiment of the present application.

[0038] like Figure 2 As shown, the green hybrid data center data storage and computing management method based on the IPFS protocol includes the following steps:

[0039] In step S201, it is determined whether the target distributed node meets a preset online condition.

[0040] Those skilled in the art should understand that the operation of IPFS storage nodes relies on green energy, which has unstable power supply. Therefore, the operation status of the nodes can be divided into three situations: stable online, occasional offline and frequent offline. Under the existing technical framework, the security of data cannot be guaranteed when the node is offline, and the data can be easily tampered with maliciously when the storage node is offline. The existing IPFS-based storage technology is often combined with a distributed system to achieve a decentralized effect, but its application in the case of a mixture of centralized and distributed systems is relatively lacking.

[0041] Therefore, the embodiments of the present application first need to determine whether the distributed node (i.e., the target distributed node) where the data is to be stored is online (i.e., whether the preset online conditions are met) to determine its node status, thereby providing important data support and basis for the subsequent green hybrid data center data storage and computing management based on the IPFS protocol.

[0042] In step S202, if the target distributed node meets the preset online conditions, the target data to be stored is uploaded to the target distributed node according to the first timestamp, hash value and preset storage verification requirements corresponding to the target data to be stored; otherwise, a second timestamp is assigned to the target data to be stored, and when the target distributed node meets the preset online conditions, the target data to be stored is uploaded to the target distributed node based on the second timestamp, hash value and preset storage verification requirements.

[0043] After analyzing the node status of the target distributed node and determining whether it meets the preset online conditions, the embodiments of the present application can further determine the corresponding data upload operation based on the judgment result of the target distributed node to obtain the corresponding timestamp information and hash value of the target data to be stored, and verify the timestamp information and hash value through the preset storage verification requirements, and upload the target data to be stored to the target distributed node if the verification passes.

[0044] Therefore, the embodiments of the present application effectively ensure that even if each IPFS storage node is offline, data storage can be finally completed after the node is online, thereby ensuring data security.

[0045] Optionally, in one embodiment of the present application, if the target distributed node meets the preset online conditions, the target data to be stored is uploaded to the target distributed node according to the first timestamp, hash value and preset storage verification requirements corresponding to the target data to be stored, including: calculating the first timestamp and hash value of the target data to be stored, and sending the target data to be stored, the first timestamp and hash value to the preset IPFS distributed data center; based on the preset IPFS distributed data center and the target distributed node, performing storage verification on the first timestamp and hash value, and uploading the target data to be stored to the target distributed node when the first timestamp and hash value meet the preset storage verification requirements.

[0046] It should be noted that when the data transmission link is normal (that is, the target distributed node meets the preset online conditions), the data required to be uploaded in the embodiment of the present application (that is, the target data to be stored) is assigned a timestamp (that is, the first timestamp) by the timing center, and the hash value of the uploaded data content is sent together with the timestamp to the IPFS distributed data center system (that is, the preset IPFS distributed data center). The data uploader verifies the hash value and timestamp with the storage node, and when it passes the verification (that is, it meets the preset storage verification requirements), it uploads the target data to be stored to the target distributed node.

[0047] Optionally, in one embodiment of the present application, otherwise a second timestamp is assigned to the target data to be stored, and when the target distributed node meets the preset online conditions, the target data to be stored is uploaded to the target distributed node based on the second timestamp, hash value and preset storage verification requirements, including: assigning a second timestamp to the target data to be stored through a preset timing center, and adding the storage task information corresponding to the target data to be stored to a preset storage task queue, and sending the second timestamp and hash value to a preset IPFS distributed data center; judging in real time whether the target distributed node meets the preset online conditions, and when the target distributed node meets the preset online conditions, performing storage verification on the second timestamp and hash value according to the preset IPFS distributed data center and the target distributed node, so as to obtain the target data to be stored from the storage task queue when the second timestamp and hash value meet the preset storage verification requirements, and uploading the target data to be stored to the target distributed node.

[0048] During the actual execution process, when the data transmission link is blocked, for example, when a node is responsible for the storage task, but before the data is uploaded, this node is offline due to poor network (that is, the target distributed node does not meet the preset online conditions), the embodiment of the present application can assign a timestamp (that is, a second timestamp) to the data to be uploaded through the timing center to prove its upload time; at the same time, the data storage task of the uploaded data is stored in the task queue (that is, the storage task queue), and after waiting for the node to go online, the hash value of the uploaded data content is uploaded together with the timestamp to the IPFS distributed data center system, which is uniformly maintained by the IPFS distributed data center system. After the node that performs the storage task goes online, the data uploader verifies the hash value and timestamp with the storage node, and uploads the data to the node (that is, the target distributed node) after the verification is passed.

[0049] Therefore, the embodiment of the present application adopts a data storage strategy that ensures data security based on timing credentials. By introducing a timing center in the hybrid data center architecture, timing credentials are added to the process of storing data in the data center, ensuring that when a distributed node is offline, the data file can have a unique identification credential even if the upload is delayed, greatly reducing the possibility of file tampering through network attacks.

[0050] In step S203, multiple blockchain blocks are generated based on the hash value, the first timestamp or the second timestamp, and the target data to be stored is decomposed into multiple data pieces through the preset IPFS distributed data center, and each data piece is backed up using other distributed nodes and multiple blockchain blocks. At the same time, an index corresponding to each data piece is generated, so that the complete target data to be stored can be obtained by using the index through the preset IPFS distributed data center.

[0051] After uploading the target data to be stored to the target distributed node, further, the embodiment of the present application generates multiple blockchain blocks through the blockchain system, and stores the data file storage related information in the corresponding blockchain blocks, and decomposes the target data to be stored into multiple data pieces through the preset IPFS distributed data center, and then the blockchain that records the data file storage information is distributedly stored and backed up in different distributed nodes through the IPFS protocol, and the data is overall stored and backed up and scheduled through the centralized data center, so that the integrity of the data file can be guaranteed through the storage of the centralized data center in the event of offline failure of the distributed node, thereby ensuring that the distributed storage method based on the IPFS protocol and the centralized storage method form a complementary pattern, and ensuring the complete effectiveness and security of data storage.

[0052] Optionally, in one embodiment of the present application, multiple blockchain blocks are generated based on a hash value, a first timestamp or a second timestamp, including: when a preset IPFS distributed data center receives the target data to be stored, controlling the preset blockchain system to generate multiple blockchain blocks; storing the block hash value of the previous blockchain block, the hash value corresponding to the target data to be stored, and the trusted time certificate corresponding to the first timestamp or the second timestamp in each of the multiple blockchain blocks.

[0053] It should be noted that the embodiments of the present application can be implemented as follows: Figure 3 The blockchain authentication mechanism of the trusted time certificate shown in the figure combines the IPFS system mechanism, blockchain characteristics and time synchronization mechanism, and uses the blockchain system to maintain the storage content and storage behavior time information of the data center.

[0054] Specifically, when the activity of storing data in the IPFS data center is triggered (i.e., the IPFS distributed data center is preset to receive the target data to be stored), the blockchain system can automatically generate multiple blocks, so that the storage credentials of the data are recorded in the blockchain system. The blockchain can generate blocks according to the following steps:

[0055] (1) Obtain the hash value of the previous IPFS data center block (i.e., the block hash value of the previous blockchain block);

[0056] (2) Generate a hash value based on the data block uploaded to the IPFS data center, that is, obtain the hash value of the current data block uploaded;

[0057] (3) Obtain the trusted time certificate for uploading the data block to the data center through the timing mechanism of the timing center;

[0058] (4) All the contents of this block are packaged and the hash value is calculated, and this hash value is sent to the next block.

[0059] It can be understood that in the embodiment of the present application, each block of the blockchain system contains three types of information: the hash value of the previous block, the hash value of a data block in the IPFS data center, and a trusted time certificate (provided by the timing center) generated according to the upload time of the above data block.

[0060] In summary, the blockchain is maintained by the IPFS distributed data center system. In the scenario where data is uploaded to the distributed data center, when the IPFS distributed data center system receives data transmitted by other parts (centralized data center / external network), the blockchain system needs to obtain the timestamp of data upload and the hash value of the stored data block content; then perform the above blockchain generation operation to upload the data to the data center. Among them, the timestamp records the real time of data upload; the hash value of the data block content belongs to the same category as the hash value of the file storage content in the IPFS protocol, that is, the file content of the IPFS system is maintained by the tamper-proof blockchain system, thereby enhancing the security of the data and effectively preventing the data from being maliciously tampered by other parties when the storage node is offline.

[0061] Optionally, in one embodiment of the present application, the target data to be stored is decomposed into multiple data pieces through a preset IPFS distributed data center, and each data piece is backed up using other distributed nodes and multiple blockchain blocks, and an index corresponding to each data piece is generated at the same time, so as to obtain the complete target data to be stored by using the index through the preset IPFS distributed data center, including: storing a preset number of data pieces among the multiple data pieces to a preset centralized data center, and storing the remaining data pieces to at least one distributed node of the preset IPFS distributed data center; obtaining the ID information and sequence information of the data piece in each distributed node of at least one distributed node in the target data to be stored, and constructing the index corresponding to each data piece according to the ID information and sequence information; controlling other distributed nodes to back up the data piece in each distributed node through the preset IPFS distributed data center to obtain corresponding backup data; when there are one or more distributed nodes among all distributed nodes that do not meet the preset online conditions, obtaining the data piece in the preset centralized data center, and obtaining the data piece or backup data in each distributed node according to the index; based on the data piece in the centralized data center, the data piece or backup data in each distributed node, obtaining the complete target data to be stored.

[0062] Specifically, the embodiment of the present application can decompose the target data to be stored into N data pieces (7≤N≤15) by presetting the IPFS distributed data center, and store them in the centralized data center and the IPFS distributed data center nodes respectively. Among them, a data file stores at least 3 data pieces in the centralized data center, and the remaining N-3 data pieces are distributedly stored in the IPFS distributed data center nodes.

[0063] The data pieces stored in the IPFS distributed data center nodes will be backed up in the IPFS distributed data center system. When a data piece is uploaded to a distributed node, in addition to triggering the above-mentioned blockchain system to generate a record of the upload of this data piece, the IPFS distributed data center system will also start to back up the data piece to other distributed nodes.

[0064] In addition, the IPFS distributed data center system will maintain the ID information of the original file of this data piece and the order x of the data piece in its original file, such as Figure 4 As shown, an index is built on this basis to ensure that files can be found quickly when operations are performed on them.

[0065] When a distributed node goes offline and needs to call the target data to be stored, the embodiment of the present application can obtain at least three data pieces stored in the centralized data center through the centralized data center. At the same time, the IPFS distributed data center will retrieve the ID information of the data file to obtain other data pieces or the backup location of the data piece, and complete the complete acquisition of the data file based on the sequence information x of the data piece in the file.

[0066] Therefore, the embodiments of the present application give full play to the system advantages of the centralized and distributed data center hybrid framework, combining the IPFS system mechanism, blockchain characteristics and timing mechanism, and using the blockchain system to maintain the storage content and storage behavior time information of the data center, thereby preventing the storage content of the data center from being tampered with when a distributed node is offline, effectively improving the security, effectiveness and integrity of data storage, enhancing the ability of the data center to store data in the case of unstable energy supply, effectively avoiding the occurrence of data storage failure due to distributed node offline, and ensuring the execution efficiency of data storage tasks.

[0067] According to the green hybrid data center data storage and computing management method based on the IPFS protocol proposed in the embodiment of the present application, by judging whether the target distributed node meets the preset online condition; if the target distributed node meets the preset online condition, the target data to be stored is uploaded to the target distributed node according to the first timestamp, hash value and preset storage verification requirement corresponding to the target data to be stored, otherwise the target data to be stored is given a second timestamp, and when the target distributed node meets the preset online condition, the target data to be stored is uploaded to the target distributed node based on the second timestamp, hash value and preset storage verification requirement; based on the hash value, the first timestamp or the second timestamp, multiple blockchain blocks are generated, and the target data to be stored is decomposed into multiple data slices by the preset IPFS distributed data center, and each data slice is backed up by other distributed nodes and multiple blockchain blocks, and the index corresponding to each data slice is generated at the same time, so as to obtain the complete target data to be stored by using the index through the preset IPFS distributed data center. The present application can give full play to the system advantages of the hybrid framework of centralized and distributed data centers, and combine the characteristics of IPFS file system, blockchain storage, etc., effectively reduce the occurrence of data storage failure, and greatly improve the security of data storage.

[0068] Secondly, refer to the accompanying drawings to describe the green hybrid data center data storage and computing management device based on the IPFS protocol proposed in accordance with the embodiment of the present application.

[0069] Figure 5 It is a block diagram of a green hybrid data center data storage and computing management device based on the IPFS protocol in an embodiment of the present application.

[0070] like Figure 5 As shown, the green hybrid data center data storage and computing management device 10 based on the IPFS protocol includes: a judgment module 100, an upload module 200 and a management module 300.

[0071] The judgment module 100 is used to judge whether the target distributed node meets the preset online condition.

[0072] The upload module 200 is used to upload the target data to be stored to the target distributed node according to the first timestamp, hash value and preset storage verification requirements corresponding to the target data to be stored if the target distributed node meets the preset online conditions; otherwise, a second timestamp is assigned to the target data to be stored, and when the target distributed node meets the preset online conditions, the target data to be stored is uploaded to the target distributed node based on the second timestamp, hash value and preset storage verification requirements.

[0073] The management module 300 is used to generate multiple blockchain blocks based on the hash value, the first timestamp or the second timestamp, and decompose the target data to be stored into multiple data pieces through the preset IPFS distributed data center, and use other distributed nodes and multiple blockchain blocks to back up each data piece, and generate an index corresponding to each data piece at the same time, so as to obtain the complete target data to be stored by using the index through the preset IPFS distributed data center.

[0074] Optionally, in one embodiment of the present application, the upload module 200 includes: a calculation unit and a first verification unit.

[0075] Among them, the calculation unit is used to calculate the first timestamp and hash value of the target data to be stored, and send the target data to be stored, the first timestamp and the hash value to a preset IPFS distributed data center.

[0076] The first verification unit is used to perform storage verification on the first timestamp and hash value based on the preset IPFS distributed data center and the target distributed node, and upload the target data to be stored to the target distributed node when the first timestamp and hash value meet the preset storage verification requirements.

[0077] Optionally, in one embodiment of the present application, the upload module 200 further includes: an adding unit and a second verification unit.

[0078] Among them, the adding unit is used to assign a second timestamp to the target data to be stored through a preset timing center, add the storage task information corresponding to the target data to be stored to the preset storage task queue, and send the second timestamp and hash value to the preset IPFS distributed data center.

[0079] The second verification unit is used to determine in real time whether the target distributed node meets the preset online conditions, and when the target distributed node meets the preset online conditions, perform storage verification on the second timestamp and hash value according to the preset IPFS distributed data center and the target distributed node, so as to obtain the target data to be stored from the storage task queue when the second timestamp and hash value meet the preset storage verification requirements, and upload the target data to be stored to the target distributed node.

[0080] Optionally, in one embodiment of the present application, the management module 300 includes: a control unit and a first storage unit.

[0081] Among them, the control unit is used to control the preset blockchain system to generate multiple blockchain blocks when the preset IPFS distributed data center receives the target data to be stored.

[0082] The first storage unit is used to store, in each blockchain block among multiple blockchain blocks, a block hash value of a previous blockchain block, a hash value corresponding to target data to be stored, and a trusted time certificate corresponding to a first timestamp or a second timestamp.

[0083] Optionally, in one embodiment of the present application, the management module 300 further includes: a second storage unit, a construction unit, a backup unit, an acquisition unit and a reading unit.

[0084] Among them, the second storage unit is used to store a preset number of data slices among the multiple data slices in a preset centralized data center, and store the remaining data slices in at least one distributed node of the preset IPFS distributed data center.

[0085] The construction unit is used to obtain the ID information and sequence information of the data slice in each distributed node of at least one distributed node in the target data to be stored, and to construct the index corresponding to each data slice according to the ID information and sequence information.

[0086] The backup unit is used to control other distributed nodes through the preset IPFS distributed data center to back up the data slices in each distributed node and obtain the corresponding backup data.

[0087] The acquisition unit is used to acquire data slices in a preset centralized data center when one or more distributed nodes among all distributed nodes do not meet the preset online conditions, and acquire data slices or backup data in each distributed node according to the index.

[0088] The reading unit is used to set the data slices in the centralized data center, the data slices in each distributed node or the backup data to obtain the complete target data to be stored.

[0089] It should be noted that the aforementioned explanation of the embodiment of the green hybrid data center data storage and computing management method based on the IPFS protocol is also applicable to the green hybrid data center data storage and computing management device based on the IPFS protocol of this embodiment, and will not be repeated here.

[0090] According to the green hybrid data center data storage and computing management device based on the IPFS protocol proposed in the embodiment of the present application, it includes a judgment module for judging whether the target distributed node meets the preset online condition; an upload module for uploading the target data to be stored to the target distributed node according to the first timestamp, hash value and preset storage verification requirements corresponding to the target data to be stored, if the target distributed node meets the preset online condition, otherwise the target data to be stored is given a second timestamp, and when the target distributed node meets the preset online condition, the target data to be stored is uploaded to the target distributed node based on the second timestamp, hash value and preset storage verification requirements; a management module for generating multiple blockchain blocks based on the hash value, the first timestamp or the second timestamp, and decomposing the target data to be stored into multiple data slices through the preset IPFS distributed data center, and backing up each data slice using other distributed nodes and multiple blockchain blocks, and generating an index corresponding to each data slice at the same time, so as to obtain the complete target data to be stored by using the index through the preset IPFS distributed data center. The present application can give full play to the system advantages of the hybrid framework of centralized and distributed data centers, and combine the characteristics of IPFS file system, blockchain storage, etc., effectively reduce the occurrence of data storage failure, and greatly improve the security of data storage.

[0091] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0092] A memory 601 , a processor 602 , and a computer program stored in the memory 601 and executable on the processor 602 .

[0093] When the processor 602 executes the program, the green hybrid data center data storage and computing management method based on the IPFS protocol provided in the above embodiment is implemented.

[0094] Furthermore, the electronic device further comprises:

[0095] The communication interface 603 is used for communication between the memory 601 and the processor 602 .

[0096] The memory 601 is used to store computer programs that can be executed on the processor 602 .

[0097] The memory 601 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0098] If the memory 601, the processor 602 and the communication interface 603 are implemented independently, the communication interface 603, the memory 601 and the processor 602 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0099] Optionally, in a specific implementation, if the memory 601, the processor 602 and the communication interface 603 are integrated on a chip, the memory 601, the processor 602 and the communication interface 603 can communicate with each other through an internal interface.

[0100] The processor 602 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0101] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it implements the above-mentioned green hybrid data center data storage and computing management method based on the IPFS protocol.

[0102] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0103] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0104] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0105] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), 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 disk 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 by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.

[0106] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0107] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0108] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0109] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A green hybrid data center data storage and computing management method based on IPFS protocol, It is characterized in that The following steps are involved: Determine whether the target distributed node meets the preset online conditions; If the target distributed node meets the preset online condition, the target data to be stored is uploaded to the target distributed node according to the first timestamp, hash value and preset storage verification requirement corresponding to the target data to be stored; otherwise, a second timestamp is assigned to the target data to be stored, and when the target distributed node meets the preset online condition, the target data to be stored is uploaded to the target distributed node based on the second timestamp, the hash value and the preset storage verification requirement; Based on the hash value, the first timestamp or the second timestamp, multiple blockchain blocks are generated, and the target data to be stored is decomposed into multiple data pieces through a preset IPFS distributed data center, and each data piece is backed up using other distributed nodes and the multiple blockchain blocks, and an index corresponding to each data piece is generated at the same time, so as to obtain the complete target data to be stored by using the index through the preset IPFS distributed data center.

2. The method according to claim 1, It is characterized in that If the target distributed node meets the preset online condition, uploading the target data to be stored to the target distributed node according to the first timestamp, hash value and preset storage verification requirement corresponding to the target data to be stored includes: Calculate the first timestamp and the hash value of the target data to be stored, and send the target data to be stored, the first timestamp and the hash value to the preset IPFS distributed data center; Based on the preset IPFS distributed data center and the target distributed node, the first timestamp and the hash value are stored and verified, and when the first timestamp and the hash value meet the preset storage verification requirements, the target data to be stored is uploaded to the target distributed node.

3. The method according to claim 2, It is characterized in that Otherwise, assigning a second timestamp to the target data to be stored, and uploading the target data to be stored to the target distributed node based on the second timestamp, the hash value and the preset storage verification requirement when the target distributed node meets the preset online condition, includes: Assign a second timestamp to the target data to be stored through a preset timing center, add the storage task information corresponding to the target data to be stored to a preset storage task queue, and send the second timestamp and the hash value to the preset IPFS distributed data center; Determine in real time whether the target distributed node meets the preset online condition, and when the target distributed node meets the preset online condition, perform storage verification on the second timestamp and the hash value according to the preset IPFS distributed data center and the target distributed node, so that when the second timestamp and the hash value meet the preset storage verification requirements, obtain the target data to be stored from the storage task queue, and upload the target data to be stored to the target distributed node.

4. The method according to claim 3, It is characterized in that The generating a plurality of blockchain blocks based on the hash value, the first timestamp or the second timestamp includes: When the preset IPFS distributed data center receives the target data to be stored, controlling the preset blockchain system to generate multiple blockchain blocks; In each blockchain block among the multiple blockchain blocks, a block hash value of a previous blockchain block, a hash value corresponding to the target data to be stored, and a trusted time certificate corresponding to the first timestamp or the second timestamp are stored.

5. The method according to claim 4, It is characterized in that The method of decomposing the target data to be stored into multiple data pieces by using the preset IPFS distributed data center, backing up each data piece by using other distributed nodes and the multiple blockchain blocks, and generating an index corresponding to each data piece, so as to obtain the complete target data to be stored by using the index through the preset IPFS distributed data center, includes: Storing a preset number of data slices among the plurality of data slices in a preset centralized data center, and storing the remaining data slices in at least one distributed node of the preset IPFS distributed data center; Obtaining ID information and sequence information of a data slice in each distributed node of the at least one distributed node in the target data to be stored, and constructing an index corresponding to each data slice according to the ID information and the sequence information; Control the other distributed nodes through the preset IPFS distributed data center to back up the data slices in each distributed node to obtain corresponding backup data; When one or more distributed nodes among all distributed nodes do not meet the preset online condition, obtain the data slices in the preset centralized data center, and obtain the data slices or backup data in each distributed node according to the index; Based on the data slices in the centralized data center, the data slices in each distributed node or the backup data, the complete target data to be stored is obtained.

6. A green hybrid data center data storage and computing management device based on IPFS protocol, It is characterized in that include: A judgment module is used to judge whether the target distributed node meets the preset online condition; An uploading module, configured to upload the target data to be stored to the target distributed node according to the first timestamp, hash value and preset storage verification requirement corresponding to the target data to be stored, if the target distributed node meets the preset online condition; otherwise, assign a second timestamp to the target data to be stored, and when the target distributed node meets the preset online condition, upload the target data to be stored to the target distributed node based on the second timestamp, the hash value and the preset storage verification requirement; A management module is used to generate multiple blockchain blocks based on the hash value, the first timestamp or the second timestamp, and decompose the target data to be stored into multiple data pieces through a preset IPFS distributed data center, and use other distributed nodes and the multiple blockchain blocks to back up each data piece, and generate an index corresponding to each data piece, so as to obtain the complete target data to be stored by using the index through the preset IPFS distributed data center.

7. The device according to claim 6, It is characterized in that The upload module includes: A computing unit, configured to calculate the first timestamp and the hash value of the target data to be stored, and send the target data to be stored, the first timestamp and the hash value to the preset IPFS distributed data center; The first verification unit is used to perform storage verification on the first timestamp and the hash value based on the preset IPFS distributed data center and the target distributed node, and upload the target data to be stored to the target distributed node if the first timestamp and the hash value meet the preset storage verification requirements.

8. The device according to claim 7, It is characterized in that The upload module also includes: An adding unit, configured to assign a second timestamp to the target data to be stored through a preset timing center, add the storage task information corresponding to the target data to be stored to a preset storage task queue, and send the second timestamp and the hash value to the preset IPFS distributed data center; The second verification unit is used to determine in real time whether the target distributed node meets the preset online condition, and when the target distributed node meets the preset online condition, perform storage verification on the second timestamp and the hash value according to the preset IPFS distributed data center and the target distributed node, so as to obtain the target data to be stored from the storage task queue and upload the target data to be stored to the target distributed node when the second timestamp and the hash value meet the preset storage verification requirements.

9. The device according to claim 8, It is characterized in that The management module comprises: A control unit, configured to control a preset blockchain system to generate a plurality of blockchain blocks when the preset IPFS distributed data center receives the target data to be stored; The first storage unit is used to store, in each blockchain block of the multiple blockchain blocks, a block hash value of a previous blockchain block, a hash value corresponding to the target data to be stored, and a trusted time certificate corresponding to the first timestamp or the second timestamp.

10. The device according to claim 9, It is characterized in that The management module also includes: A second storage unit, configured to store a preset number of data slices among the plurality of data slices in a preset centralized data center, and store the remaining data slices in at least one distributed node of the preset IPFS distributed data center; A construction unit, configured to obtain ID information and sequence information of a data slice in each distributed node of the at least one distributed node in the target data to be stored, and to construct an index corresponding to each data slice according to the ID information and the sequence information; A backup unit, configured to control the other distributed nodes to back up the data slices in each distributed node through the preset IPFS distributed data center to obtain corresponding backup data; An acquisition unit, configured to acquire the data slices in the preset centralized data center and acquire the data slices or backup data in each distributed node according to the index when one or more distributed nodes among all distributed nodes do not meet the preset online condition; A reading unit is used to obtain the complete target data to be stored from the data slices in the centralized data center, the data slices in each distributed node or the backup data.

11. An electronic device, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the green hybrid data center data storage and computing management method based on the IPFS protocol as described in any one of claims 1 to 5.

12. A computer-readable storage medium having a computer program stored thereon, It is characterized in that The program is executed by a processor to implement a green hybrid data center data storage and computing management method based on the IPFS protocol as described in any one of claims 1 to 5.

Citation Information

Cited By

  • Hybrid data center data security storage scheduling method and device

    CN119473131A