Weighted distributed data storage method, system and storage medium

Through a weighted distributed data storage method, the fog storage platform and IPFS user terminal are used to divide resource types and distribute data according to data access conditions, solving the high pressure, high cost and low security problems of blockchain data storage services. Enables safer and more economical data storage and distribution.

CN111858540BActive Publication Date: 2024-10-15ZHONGKE DIANBAO (ZHEJIANG) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010739930.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-28
Publication Date
2024-10-15
Estimated Expiration
2040-07-28

AI Technical Summary

Technical Problem

The data storage and distribution service center in the blockchain field has problems such as high server pressure, high storage costs, and low data security.

Method used

Adopt a weighted distributed data storage method, use the fog storage platform and IPFS user terminal to generate data weight according to the access status of the data, divide the data into hot resources and cold resources, and use the system architecture model of blockchain and agent nodes Distribute and store data in multiple IPFS user terminals in the form of fragmented files with equal amounts of data, ensuring data security and reducing storage costs.

Benefits of technology

It reduces the pressure on central servers and storage costs, improves data security, enables broadband fee flexibility, and promotes transparency in the sharing economy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111858540B_ABST
    Figure CN111858540B_ABST
Patent Text Reader

Abstract

The present invention relates to a weighted distributed data storage method, system and storage medium, in which: a fog storage platform distributes data to be stored to proxy nodes at all levels; proxy nodes at all levels determine the weight of data to be stored according to set conditions, and determine the type of data to be stored according to the weight; proxy nodes at all levels process the data to be stored, and store the data to be stored in the form of fragmented files with equal data volume in each IPFS user terminal according to the type of the data to be stored; the fog storage platform receives an access request from a user client, and sends the node address and certificate of the IPFS user terminal matching the access request to the user client; the user client determines a target IPFS user terminal, and obtains the requested data from the target IPFS user terminal; the cost of the requested data is determined according to the type of the requested data. The pressure on the central server and the storage cost are reduced, the broadband cost is more flexible, the data storage is safer, and the sharing economy is more transparent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data storage, and in particular to a weighted distributed data storage method, system and storage medium. Background Art

[0002] In recent years, the application of blockchain has become increasingly widespread, such as IBM's Fabric, Facebook's Libra, and Protocol Labs' decentralized storage solution IPFS (InterPlanetary File System). In addition, with the popularization of 5G, higher bandwidth, lower latency, higher capacity and other characteristics will provide a better network environment and technical conditions for the implementation of blockchain applications. In addition, CDN (Content Delivery Network) refers to an intelligent virtual network built on the basis of the existing network. It relies on edge servers deployed in various places, through the load balancing, content distribution, scheduling and other functional modules of the central platform, so that users can obtain the required content nearby, reduce network congestion, and improve the user access response speed and hit rate. A content distribution and transmission solution. The data at the edge of CDN is stored in the distribution solution, and the data security is relatively low.

[0003] Therefore, it is of great significance to utilize home broadband networks to achieve national network acceleration and promote the development of the entire blockchain + Internet of Things + user ecology. Summary of the invention

[0004] In view of this, a weighted distributed data storage method, system and storage medium are provided to solve the problems in the related art of high pressure on data storage in the distribution service center server, high storage cost and low data security.

[0005] The present invention adopts the following technical solution:

[0006] In a first aspect, an embodiment of the present application provides a weighted distributed data storage method, the method comprising:

[0007] The fog storage platform obtains the data to be stored and distributes the data to be stored to proxy nodes at all levels;

[0008] The proxy nodes at each level determine the weight of the data to be stored according to the set conditions, and determine the type of the data to be stored according to the weight, wherein the type of the data to be stored includes cold resources and hot resources;

[0009] The proxy nodes at each level process the data to be stored, and store the data to be stored in the form of fragmented files with equal data volume in each IPFS user terminal;

[0010] The fog storage platform receives an access request from a user client, and sends the node address and certificate of the IPFS user terminal matching the access request to the user client according to the type of data to be stored;

[0011] The user client determines the target IPFS user terminal according to the node address and the certificate, and obtains the request data from the target IPFS user terminal; wherein the fee for the request data is determined according to the type of the request data.

[0012] In a second aspect, an embodiment of the present application provides a system, the system comprising: a fog storage platform, at least one IPFS user terminal and at least one client;

[0013] Wherein, the fog storage platform and the at least one IPFS user terminal are used to execute any of the weighted distributed data storage methods described above.

[0014] In a third aspect, an embodiment of the present application provides a storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the various steps in the weighted distributed data storage method as described in the first aspect.

[0015] The present invention adopts the above technical scheme, adopts the system architecture mode of blockchain, fog storage platform, proxy node and IPFS user terminal, generates data weight according to the access situation of data, divides resource types into hot resources and cold resources according to data weight, and hot resources and cold resources can be further divided into levels, and distributes data to IPFS user terminals according to data resource weight, so as to effectively utilize the storage and bandwidth of IPFS user terminals; in this way, the pressure on the central server is reduced, the storage cost is reduced, the broadband fee is more flexible, the data storage is safer, and the sharing economy is more transparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 It is a flow chart of a weighted distributed data storage method provided by an embodiment of the present invention;

[0018] Figure 2 is a schematic diagram of a weighted distributed data storage applicable in an embodiment of the present invention;

[0019] Figure 3 It is a system architecture and data flow diagram of Tianyi cloud fog storage platform and third-party storage demanders applicable to the embodiments of the present invention. DETAILED DESCRIPTION

[0020] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0021] Example

[0022] Figure 1 The present invention provides a flowchart of a weighted distributed data storage method, which can be executed by a weighted distributed data storage system provided by the present invention, and the system can be implemented in software and / or hardware. Figure 1 , the method may specifically include the following steps:

[0023] S101. The fog storage platform obtains the data to be stored and distributes the data to be stored to proxy nodes at all levels. Among them, fog computing is a computing mode in which data, data processing and applications are concentrated in devices at the edge of the network, rather than almost all stored in the cloud. It is an extended concept of cloud computing, and the fog storage platform is a storage platform based on fog computing. Specifically, under the fog storage platform are agents at all levels, and the agent nodes realize data collaboration through data collaboration APIs. The fog storage platform obtains the data to be stored by signing a contract with the data storage demander, where the data storage demander can be a third-party application, such as Douyin or iQiyi. In a specific example, the proxy nodes at all levels can be servers with distributed storage functions.

[0024] S102. The proxy nodes at each level determine the weight of the data to be stored according to the set conditions, and determine the type of the data to be stored according to the weight, wherein the type of the data to be stored includes cold resources and hot resources.

[0025] Among them, the set conditions include the frequency, duration and number of clicks of the data. Specifically, the proxy nodes at all levels will calculate the weight of the data to be stored based on the parameters such as the frequency, duration and number of clicks of the data to be stored, and then determine the type of data to be stored based on the different weights. For example, the weight is greater than or equal to 0.5 for hot resources, and the weight is less than or equal to 0.5 for cold resources. In this way, the fee charged can be determined according to the type of data requested, and the fees charged will be different for different types. In a specific example, bandwidth pricing is reasonably performed based on hot and cold resources. Hot resources can get some discounts due to their high visits and large traffic, while unpopular resources need special processing if the outside world needs to access them because of their low visits. The properties of hot and cold resources can be converted to each other, so that the bandwidth charging process will eventually find a balance point.

[0026] S103. The proxy nodes at each level process the data to be stored, and store the data to be stored in each IPFS user terminal in the form of fragmented files with equal data volume according to the type of the data to be stored.

[0027] Specifically, IPFS user terminals are introduced, and IPFS is a storage terminal. In a specific example, the IPFS user terminal can be a router. The fog storage platform distributes the data according to the type of the data to be stored, and the proxy points at all levels process the data to be stored and distribute it again, for example, from the first-level proxy point to the second-level proxy point, and then from the second-level proxy point to the third-level proxy point, until the data to be stored is finally divided into fragmented files with equal data volume, and then each fragmented file is stored in each IPFS user terminal to achieve the purpose of efficient dispersion.

[0028] In a specific example, the storage location can be reasonably arranged according to the hot and cold resources. For example, some cold resources only need to be stored in some devices, or even only a small part of the storage space of a user terminal can be used for storage. In this way, idle resources can be fully utilized, not only the owners of storage resources will gain benefits, but also the construction cost of centralized storage can be saved.

[0029] In addition, the data to be stored will be encrypted after being separated. The encrypted data resources will be stored in a dispersed manner on many nodes. This can avoid the centralized risk of centralized storage. Even if a piece of data is leaked, it is only part of the data, not all of it. Using IPFS decentralized storage, the first thing to reduce is the pressure on the cloud center. Based on the P2P (Peer to Peer) network, the stored data will be divided into multiple small blocks, and then distributed to each node and device. User terminals and local agents can help reduce the pressure on the cloud server. Exemplarily, data is synchronized between each IPFS node through a data collaboration SDK (Software Development Kit).

[0030] S104. The fog storage platform receives an access request from the user client, and sends the node address and certificate of the IPFS user terminal that matches the access request to the user client.

[0031] Among them, the user client can be the user's mobile phone. Specifically, the fog storage platform participates in the public chain governance as a node on the blockchain. The user's income data is on the chain, and the fog storage platform's points system is on the chain, and the accounts are open and transparent. Credentials are required for both data uploading and downloading. The credentials for data distribution are generated by the fog storage platform. The client can only request data if it has a certificate. Therefore, when the user has a client to send an access request to the fog storage platform, the fog storage platform identifies and parses the access request, determines which node the data the user wants to request is stored in, and then sends the node address and certificate to the client.

[0032] S105. The user client determines the target IPFS user terminal according to the node address and the certificate, and obtains the requested data from the target IPFS user terminal; wherein the fee for the requested data is determined according to the type of the requested data.

[0033] Specifically, each IPFS node has a node and a certificate. The user client can determine the target IPFS user terminal based on the obtained node address and certificate, that is, the terminal storing the requested data, called the target IPFS user terminal, and then obtain the requested data from the target IPFS user terminal. In addition, in the actual application process, the requested data type is different and the fees are different.

[0034] Optionally, obtaining the requested data from the target IPFS user terminal includes: the user client reorganizes the fragmented files obtained by the target IPFS user terminal into a complete file to obtain the requested data. When the user client requests data, the fragments are reorganized into a complete file before reaching the user client, so that the user client can obtain the requested data in the form of a complete file.

[0035] The present invention adopts the above technical scheme, adopts the system architecture mode of blockchain, fog storage platform, proxy node and IPFS user terminal, generates data weight according to the access situation of data, divides resource types into hot resources and cold resources according to data weight, and hot resources and cold resources can be further divided into levels, and distributes data to IPFS user terminals according to data resource weight, so as to effectively utilize the storage and bandwidth of IPFS user terminals; in this way, the pressure on the central server is reduced, the storage cost is reduced, the broadband fee is more flexible, the data storage is safer, and the sharing economy is more transparent.

[0036] On the basis of the above technical solution, the technical solution of the embodiment of the present application also includes: the fog storage platform sends a verification request to the IPFS user terminal; the IPFS user terminal responds to the verification request to generate feedback information, and sends the feedback information to the fog storage platform; the fog storage platform identifies the feedback information to determine the data storage status of the IPFS user terminal.

[0037] Specifically, in order to verify whether the IPFS user terminal actually stores data, the fog storage platform connected to the blockchain system will initiate a verification request to each IPFS user terminal, that is, initiate a storage challenge verification. Then each IPFS user terminal responds to the verification request to generate feedback information, and sends the feedback information to the fog storage platform, which adds a verification mechanism to ensure data security. Exemplarily, the fog storage platform identifies the response information to determine the data storage status of the IPFS user terminal, which can be specifically achieved in the following way: the fog storage platform compares the first data in the verification request and the second data in the feedback information; if the first data and the second data are consistent, the IPFS user terminal is determined to be in a data storage state, otherwise, the IPFS user terminal is determined to be in a non-data storage state.

[0038] Among them, the first data can be the hash value of the target verification data, and the second data is the hash value of the target verification data stored in the IPFS user terminal. The two sets of hash values ​​are different, indicating that the two sets of target data are different, or there is no data in the IPFS user terminal; in addition, the first data can be a randomly intercepted text, and the corresponding second data is found in the IPFS user terminal; in addition, it can also be determined by judging whether the sum of the data stored in each leaf node is consistent with the data stored in the root node. In this case, the first data is the root node data, and the second data is the sum of the data of each leaf node. In this way, it can be determined whether the IPFS user terminal is in a data storage state or a non-data storage state.

[0039] In addition, if the IPFS user terminal is in a data storage state for a time greater than a first preset time threshold, the fog storage platform will issue a token reward to the IPFS user terminal; if the IPFS user terminal is in a non-data storage state for a time greater than a second preset time threshold, the fog storage platform will remove the IPFS user terminal.

[0040] Specifically, if the challenge verification is successful within the first preset time threshold, that is, the time in the data storage state meets the conditions, it means that the IPFS user terminal does fulfill its data storage responsibilities conscientiously, and the fog storage platform can provide storage with reverse token rewards. On the contrary, if the challenge verification fails several times in a row, that is, the time in the non-data storage state is greater than the second preset time threshold, such an IPFS user terminal will be removed by the fog storage platform.

[0041] Therefore, decentralized storage can give play to the advantages of the sharing economy. Take Tianyi Cloud as an example. In the entire decentralized storage network, Tianyi Cloud central nodes, provincial proxy nodes, and city proxy nodes publish storage tasks, and individual users receive storage requirements and provide storage. Then, telecommunications points, phone bills, etc. are used to motivate the entire decentralized system. Incentives make more users willing to contribute their idle resources. As a result, the storage capacity and data distribution capabilities of the entire decentralized storage market have been greatly improved, and it is more economical and affordable.

[0042] In the actual application process, the technical solution of the embodiment of the present application also includes: the fog storage platform sends a data deletion command to the corresponding IPFS user terminal to delete the platform data matched in the data deletion command. Specifically, the fog storage platform can send a data deletion command to the IPFS terminal to delete the specified data. Only data related to the fog storage platform can be deleted, and user private data cannot be deleted.

[0043] In order to make the technical solution of this application easier to understand, Figure 2 A schematic diagram of a weighted distributed data storage is shown. Figure 3 A system architecture and data flow diagram of the Tianyi cloud storage platform and third-party storage demanders are shown, where the third-party storage demanders are, for example, TikTok and iQiyi. This is just an example and does not constitute a specific limitation.

[0044] Therefore, the embodiment of the present application is a technical solution that focuses on the implementation of blockchain applications, combines blockchain with decentralized storage, dynamically distributes storage tasks through data weights, and rewards corresponding blockchain tokens based on the service quality of storage providers. 5G base stations can be combined with home broadband. While providing 5G services can earn traffic sharing fees, we can also obtain storage and data distribution rewards. However, the bottom layer of all this depends on the incentive model of blockchain. We can use the incentive model of blockchain to give corresponding incentives to users who participate in decentralized data storage and distribution, thereby promoting the development of the entire blockchain + Internet of Things + user ecology.

[0045] The present invention is an embodiment that provides a weighted distributed data storage system, which is suitable for executing a weighted distributed data storage method provided by an embodiment of the present invention. The system may specifically include: a fog storage platform, at least one IPFS user terminal and at least one client; wherein the fog storage platform and the at least one IPFS user terminal are used to execute the weighted distributed data storage method in the embodiment of the present application; the above-mentioned weighted distributed data storage method includes at least the following steps: the fog storage platform obtains the data to be stored, and distributes the data to be stored to proxy nodes at all levels; the proxy nodes at all levels determine the weight of the data to be stored according to the set conditions, and determine the type of the data to be stored according to the weight, wherein the type of the data to be stored includes cold resources and hot resources; the proxy nodes at all levels process the data to be stored, and store the data to be stored in the form of fragmented files with equal data volume in each IPFS user terminal according to the type of the data to be stored; the fog storage platform receives an access request from a user client, and sends the node address and certificate of the IPFS user terminal matching the access request to the user client; the user client determines the target IPFS user terminal according to the node address and certificate, and obtains the requested data from the target IPFS user terminal; wherein the cost of the requested data is determined according to the type of the requested data.

[0046] The embodiment of the present invention further provides a storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the weighted distributed data storage method in the embodiment of the present invention are implemented: the fog storage platform obtains the data to be stored, and distributes the data to be stored to the proxy nodes at all levels; the proxy nodes at all levels determine the weight of the data to be stored according to the set conditions, and determine the type of the data to be stored according to the weight, wherein the type of the data to be stored includes cold resources and hot resources; the proxy nodes at all levels process the data to be stored, and store the data to be stored in the form of fragmented files with equal data volume in each IPFS user terminal according to the type of the data to be stored; the fog storage platform receives an access request from a user client, and sends the node address and certificate of the IPFS user terminal matching the access request to the user client; the user client determines the target IPFS user terminal according to the node address and certificate, and obtains the requested data from the target IPFS user terminal; wherein the cost of the requested data is determined according to the type of the requested data.

[0047] It can be understood that the same or similar parts of the above embodiments can be referenced to each other, and the contents not described in detail in some embodiments can refer to the same or similar contents in other embodiments.

[0048] It should be noted that, in the description of the present invention, the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of the present invention, unless otherwise specified, the meaning of "plurality" refers to at least two.

[0049] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention 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 the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0050] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, 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.

[0051] 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.

[0052] In addition, each functional unit in each embodiment of the present invention 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.

[0053] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc.

[0054] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" 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 invention. In this specification, the schematic representation of the above terms does 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 more embodiments or examples in a suitable manner.

[0055] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A weighted distributed data storage method, characterized in that: include: The fog storage platform obtains the data to be stored and distributes the data to be stored to proxy nodes at all levels; The proxy nodes at each level determine the weight of the data to be stored according to the set conditions, and determine the type of the data to be stored according to the weight, wherein the type of the data to be stored includes cold resources and hot resources; determining the type of the data to be stored according to the weight includes: determining the type of the data to be stored according to the size of the weight; The proxy nodes at each level process the data to be stored, and store the data to be stored in the form of fragmented files with equal data volume in each IPFS user terminal according to the type of the data to be stored; The fog storage platform receives an access request from a user client, and sends the node address and certificate of the IPFS user terminal matching the access request to the user client; The user client determines the target IPFS user terminal according to the node address and the certificate, and obtains the request data from the target IPFS user terminal; wherein the fee for the request data is determined according to the type of the request data.

2. The method according to claim 1, characterized in that Also includes: The fog storage platform sends a verification request to the IPFS user terminal; The IPFS user terminal generates feedback information in response to the verification request, and sends the feedback information to the fog storage platform; The fog storage platform identifies the feedback information to determine the data storage status of the IPFS user terminal.

3. The method according to claim 2, characterized in that The fog storage platform identifies the feedback information to determine the data storage status of the IPFS user terminal, including: The fog storage platform compares the first data in the verification request and the second data in the feedback information; If the first data and the second data are consistent, it is determined that the IPFS user terminal is in a data storage state; otherwise, it is determined that the IPFS user terminal is in a non-data storage state.

4. The method according to claim 3, characterized in that Also includes: If the IPFS user terminal is in a data storage state for a time period greater than a first preset time threshold, the fog storage platform issues a token reward to the IPFS user terminal; If the time that the IPFS user terminal is in the non-data storage state is greater than a second preset time threshold, the fog storage platform removes the IPFS user terminal.

5. The method according to claim 1, characterized in that The obtaining of the requested data from the target IPFS user terminal includes: The user client reorganizes the fragmented files obtained by the target IPFS user terminal into a complete file to obtain the requested data.

6. The method according to claim 1, characterized in that Also includes: The fog storage platform sends a data deletion command to the corresponding IPFS user terminal to delete the platform data matched in the data deletion command.

7. The method according to claim 1, characterized in that The set conditions include the frequency, duration and number of clicks of the data.

8. The method according to claim 1, characterized in that The IPFS user terminal matching the access request includes: The IPFS user terminal of the node closest to the physical network location of the user terminal.

9. A weighted distributed data storage system, characterized in that: include: A fog storage platform, at least one IPFS user terminal and at least one client; Wherein, the fog storage platform and the at least one IPFS user terminal are used to execute the weighted distributed data storage method described in any one of claims 1-8.

10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, each step in the weighted distributed data storage method according to any one of claims 1 to 8 is implemented.