CN111611317A - Block chain distributed storage grouping method, device and storage medium - Google Patents
Block chain distributed storage grouping method, device and storage medium Download PDFInfo
- Publication number
- CN111611317A CN111611317A CN202010511001.8A CN202010511001A CN111611317A CN 111611317 A CN111611317 A CN 111611317A CN 202010511001 A CN202010511001 A CN 202010511001A CN 111611317 A CN111611317 A CN 111611317A
- Authority
- CN
- China
- Prior art keywords
- distributed storage
- storage
- classification
- block chain
- node
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/29—Geographical information databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/906—Clustering; Classification
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The invention provides a block chain distributed storage grouping method, equipment and a storage medium, wherein the method comprises the following steps: obtaining each regional classification recorded in a distributed storage management contract; determining a first region classification corresponding to a current block chain node according to the positioning information of the current node; generating a distributed storage request transaction comprising a first geographical classification and broadcasting the transaction to a blockchain network; and executing distributed storage request transaction through the distributed storage management contract to allocate the current block link point to the first storage group with the least number of nodes of the first geographical classification in each storage group. The invention optimizes the regional uniformity of the block chain distributed storage grouping.
Description
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method, a device, and a storage medium for block chain distributed storage grouping.
Background
Each node in the blockchain performs the same calculation and finally stores the same result locally, and in a blockchain system comprising thousands or even tens of thousands of nodes, the data is highly redundant, and although each node is easy to synchronize the required data from other peer nodes, the consumed storage resources have the problem of high redundancy for the whole blockchain system.
In view of the above problems, the applicant proposed a block chain distributed storage scheme in application No. CN201910430864.2, where a distributed storage management contract is configured on a block chain, nodes participating in distributed storage are uniformly configured in multiple storage groups, and the nodes participating in distributed storage divide block data into pieces and store only the pieces corresponding to the storage group where the current node is located, so as to implement a distributed storage scheme suitable for a public chain scenario.
One drawback of the above block chain distributed storage scheme is that the node grouping manner of uniformly configuring the nodes into a plurality of storage groups easily causes that the nodes in a certain storage group or in certain storage groups have the characteristic of non-uniform geographical distribution, for example, all the nodes in the 5 th storage group of 30 storage groups are north american nodes, and the nodes in the 13 th storage group have 12 continental china nodes and one australian node, and so on. When a node in Nanjing needs to read data through the distributed storage service, the node can quickly download the data fragments stored by the node in the 13 th storage group, but the node may take a long time to download the data fragments stored by the node in the 5 th storage group; similarly, a node in Chicago may also take a relatively long time to download a data fragment stored by a node in the 13 th storage group.
Disclosure of Invention
In view of the above-mentioned deficiencies or inadequacies in the prior art, it would be desirable to provide a blockchain distributed storage grouping method, apparatus, and storage medium that optimizes a geographic uniformity of blockchain distributed storage grouping.
In a first aspect, the present invention provides a method for grouping blockchain distributed storage, including:
obtaining each regional classification recorded in a distributed storage management contract;
determining a first region classification corresponding to a current block chain node according to the positioning information of the current node;
generating a distributed storage request transaction comprising a first geographical classification and broadcasting the transaction to a blockchain network;
and executing distributed storage request transaction through the distributed storage management contract to allocate the current block link point to the first storage group with the least number of nodes of the first geographical classification in each storage group.
In a second aspect, the present invention also provides an apparatus comprising one or more processors and a memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform the block chain distributed storage grouping method provided according to embodiments of the present invention.
In a third aspect, the present invention also provides a storage medium storing a computer program, where the computer program makes a computer execute the method for grouping blockchain distributed storage provided according to the embodiments of the present invention.
The block chain distributed storage grouping method, the device and the storage medium provided by the embodiments of the invention record the region classification in the distributed storage management contract, and each block chain node requesting to participate in the distributed storage service submits the region classification when sending the request transaction, so that the distributed storage management contract can reasonably allocate newly added nodes to the storage group according to the region uniform allocation mode when executing the request transaction, thereby optimizing the region uniformity of the block chain distributed storage grouping.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a flowchart of a method for grouping block chains in a distributed storage system according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a flowchart of a method for grouping block chains in a distributed storage system according to an embodiment of the present invention.
As shown in fig. 1, in this embodiment, the present invention provides a method for block chain distributed storage grouping, including:
s11: obtaining each regional classification recorded in a distributed storage management contract;
s13: determining a first region classification corresponding to a current block chain node according to the positioning information of the current node;
s15: generating a distributed storage request transaction comprising a first geographical classification and broadcasting the transaction to a blockchain network;
s17: and executing distributed storage request transaction through the distributed storage management contract to allocate the current block link point to the first storage group with the least number of nodes of the first geographical classification in each storage group.
Specifically, the above method is exemplarily illustrated below by taking an example that the distributed storage management aggregate is configured with 30 storage groups on the blockchain, and the blockchain node a requests to participate in the distributed storage service.
In step S11, the node a obtains the regional classifications recorded in the distributed storage management contract, such as beijing, shanghai, zhejiang, northwest china, new york state, california, japan, korea, eastern europe, western europe, and so on.
In step S13, the node a determines that the geographical area corresponding to the current node is classified as "zhejiang china" according to the positioning information (e.g., the geographical location corresponding to the IP address, or other positioning methods commonly used in the art) of the current node;
in step S15, node a generates a distributed storage request transaction tx1 including a geographical classification parameter location "china zhejiang", and broadcasts tx1 into the blockchain network.
Each node in the block chain network broadcasts and packages tx1, executes tx1 through a distributed storage management contract, searches 30 storage groups including the storage group with the least number of nodes classified as "china zhejiang" according to the geographical classification "china zhejiang" submitted by tx1, for example, the storage groups 1 to 29 respectively include two nodes classified as "china zhejiang", the storage group 30 includes 1 node classified as "china zhejiang", and then configures the node a into the storage group 30.
Preferably, the density of the block link points in the region range corresponding to the region classification is not less than the first threshold.
Specifically, in the scheme shown in fig. 1, the simplest geographical classification setting manner obviously uniformly adopts administrative regions, for example, the administrative regions are uniformly set as countries, or country-province/state, or country-city, etc., but the geographical classification setting manner has the defects that the difference between the numbers of block links in each region is large, so that the difference between the numbers of block chain nodes participating in the distributed storage service is also large, and when the number of block links participating in the distributed storage service in some geographical classifications is small, the difference between the numbers of nodes in each storage group may be caused. For example, some small countries have only single-digit nodes, resulting in only single-digit storage banks of 30 storage banks having the geographically sorted nodes, and when these nodes happen to be concentrated in some storage banks, such as storage bank 1, resulting in storage bank 1 having far more nodes than there are few nodes.
For the above problem, before setting a region classification, it may be determined whether the density of the block link points in the region is smaller than a first threshold: if so, combining the region range with other region ranges, and setting a region classification with a wider region range, thereby ensuring that enough block chain nodes which are possibly participated in the distributed storage service exist in the region classification.
Fig. 2 is a schematic structural diagram of an apparatus according to an embodiment of the present invention.
As shown in fig. 2, as another aspect, the present application also provides an apparatus 200 including one or more Central Processing Units (CPUs) 201 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)202 or a program loaded from a storage section 208 into a Random Access Memory (RAM) 203. In the RAM203, various programs and data necessary for the operation of the apparatus 200 are also stored. The CPU201, ROM202, and RAM203 are connected to each other via a bus 204. An input/output (I/O) interface 205 is also connected to bus 204.
The following components are connected to the I/O interface 205: an input portion 206 including a keyboard, a mouse, and the like; an output section 207 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 208 including a hard disk and the like; and a communication section 209 including a network interface card such as a LAN card, a modem, or the like. The communication section 209 performs communication processing via a network such as the internet. A drive 210 is also connected to the I/O interface 205 as needed. A removable medium 211 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 210 as necessary, so that a computer program read out therefrom is mounted into the storage section 208 as necessary.
In particular, according to an embodiment of the present disclosure, the method described in any of the above embodiments may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing any of the methods described above. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 209 and/or installed from the removable medium 211.
As yet another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the apparatus of the above-described embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the methods described in the present application.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, for example, each unit may be a software program provided in a computer or a mobile intelligent device, or may be a separately configured hardware device. Wherein the designation of a unit or module does not in some way constitute a limitation of the unit or module itself.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the present application. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.
Claims (4)
1. A method for block chain distributed storage grouping, comprising:
obtaining each regional classification recorded in a distributed storage management contract;
determining a first region classification corresponding to a current block chain node according to the positioning information of the current node;
generating and broadcasting a distributed storage request transaction including the first geographical classification into a blockchain network;
executing the distributed storage request transaction through the distributed storage management contract to allocate the current block link point to the first storage group with the least number of nodes of the first geographical classification in each storage group.
2. The method of claim 1, wherein the block link point density in the region corresponding to the region classification is not less than a first threshold.
3. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method recited by any of claims 1-2.
4. A storage medium storing a computer program, characterized in that the program, when executed by a processor, implements the method according to any one of claims 1-2.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010511001.8A CN111611317B (en) | 2020-06-08 | 2020-06-08 | Block chain distributed storage grouping method, device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010511001.8A CN111611317B (en) | 2020-06-08 | 2020-06-08 | Block chain distributed storage grouping method, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111611317A true CN111611317A (en) | 2020-09-01 |
CN111611317B CN111611317B (en) | 2023-05-30 |
Family
ID=72198557
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010511001.8A Active CN111611317B (en) | 2020-06-08 | 2020-06-08 | Block chain distributed storage grouping method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111611317B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112766560A (en) * | 2021-01-15 | 2021-05-07 | 中国工商银行股份有限公司 | Alliance block chain network optimization method, device and system and electronic equipment |
CN113919846A (en) * | 2021-12-15 | 2022-01-11 | 腾讯科技(深圳)有限公司 | Block link point dynamic grouping method and device, computer equipment and storage medium |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100169280A1 (en) * | 2008-12-26 | 2010-07-01 | Huawei Technologies Co., Ltd. | Distributed network construction and storage method, apparatus and system |
US20120166394A1 (en) * | 2010-12-24 | 2012-06-28 | Kim Mi-Jeom | Distributed storage system and method for storing objects based on locations |
US8856619B1 (en) * | 2012-03-09 | 2014-10-07 | Google Inc. | Storing data across groups of storage nodes |
CN104932953A (en) * | 2015-06-04 | 2015-09-23 | 华为技术有限公司 | Data distribution method, data storage method, and relevant device and system |
US20150355974A1 (en) * | 2014-06-04 | 2015-12-10 | Pure Storage, Inc. | Rebuilding data across storage nodes |
US9442671B1 (en) * | 2010-12-23 | 2016-09-13 | Emc Corporation | Distributed consumer cloud storage system |
CN108664223A (en) * | 2018-05-18 | 2018-10-16 | 百度在线网络技术(北京)有限公司 | A kind of distributed storage method, device, computer equipment and storage medium |
CN110175212A (en) * | 2019-05-22 | 2019-08-27 | 杭州复杂美科技有限公司 | Block chain distributed storage method, method for reading data, equipment and storage medium |
CN111049884A (en) * | 2019-11-18 | 2020-04-21 | 武汉方始科技有限公司 | Distributed large file storage system and file uploading and downloading method |
-
2020
- 2020-06-08 CN CN202010511001.8A patent/CN111611317B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100169280A1 (en) * | 2008-12-26 | 2010-07-01 | Huawei Technologies Co., Ltd. | Distributed network construction and storage method, apparatus and system |
US9442671B1 (en) * | 2010-12-23 | 2016-09-13 | Emc Corporation | Distributed consumer cloud storage system |
US20120166394A1 (en) * | 2010-12-24 | 2012-06-28 | Kim Mi-Jeom | Distributed storage system and method for storing objects based on locations |
US8856619B1 (en) * | 2012-03-09 | 2014-10-07 | Google Inc. | Storing data across groups of storage nodes |
US20150355974A1 (en) * | 2014-06-04 | 2015-12-10 | Pure Storage, Inc. | Rebuilding data across storage nodes |
CN104932953A (en) * | 2015-06-04 | 2015-09-23 | 华为技术有限公司 | Data distribution method, data storage method, and relevant device and system |
CN108664223A (en) * | 2018-05-18 | 2018-10-16 | 百度在线网络技术(北京)有限公司 | A kind of distributed storage method, device, computer equipment and storage medium |
CN110175212A (en) * | 2019-05-22 | 2019-08-27 | 杭州复杂美科技有限公司 | Block chain distributed storage method, method for reading data, equipment and storage medium |
CN111049884A (en) * | 2019-11-18 | 2020-04-21 | 武汉方始科技有限公司 | Distributed large file storage system and file uploading and downloading method |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112766560A (en) * | 2021-01-15 | 2021-05-07 | 中国工商银行股份有限公司 | Alliance block chain network optimization method, device and system and electronic equipment |
CN112766560B (en) * | 2021-01-15 | 2024-02-06 | 中国工商银行股份有限公司 | Alliance blockchain network optimization method, device, system and electronic equipment |
CN113919846A (en) * | 2021-12-15 | 2022-01-11 | 腾讯科技(深圳)有限公司 | Block link point dynamic grouping method and device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN111611317B (en) | 2023-05-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107809484B (en) | Block chain transaction information processing method and block chain link point | |
CN111625593B (en) | Block chain-based data processing method and device and computer equipment | |
CN113347164B (en) | Block chain-based distributed consensus system, method, device and storage medium | |
CN110852882B (en) | Packet consensus method, apparatus, device, and medium for blockchain networks | |
CN111611317A (en) | Block chain distributed storage grouping method, device and storage medium | |
CN110769038A (en) | Server scheduling method and device, storage medium and electronic equipment | |
CN104052803A (en) | Decentralized distributed rendering method and system | |
CN110308995A (en) | A kind of edge cloud computing service system edges cloud node deployment device | |
CN110083745B (en) | Data query method, device and storage medium | |
CN104239150B (en) | A kind of method and device of hardware resource adjustment | |
CN109413202B (en) | System and method for sorting block chain transaction information | |
CN109618003B (en) | Server planning method, server and storage medium | |
CN105068755A (en) | Data duplicate storage method facing cloud computing content distribution network | |
CN105095263B (en) | method and device for generating card number | |
CN111798238A (en) | Parallel chain consensus method, device and storage medium | |
WO2017121284A1 (en) | Service processing method and device | |
CN110351362A (en) | Data verification method, equipment and computer readable storage medium | |
US20190372825A1 (en) | Communication apparatus, communication method, and recording medium | |
CN112866025B (en) | Intelligent contract fragmentation processing method | |
CN114364031A (en) | Service providing method, device and storage medium | |
CN112055077B (en) | Block link access method, device and storage medium | |
CN111343220B (en) | Repeater, distributed file transmission method, distributed file transmission system, medium and electronic equipment | |
CN110636072B (en) | Target domain name scheduling method, device, equipment and storage medium | |
CN111405037A (en) | Block synchronization method, device and storage medium | |
CN106993022A (en) | For the mark management method of cluster, identification server and corresponding system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |