CN111611317B - Block chain distributed storage grouping method, device and storage medium - Google Patents

Block chain distributed storage grouping method, device and storage medium Download PDF

Info

Publication number
CN111611317B
CN111611317B CN202010511001.8A CN202010511001A CN111611317B CN 111611317 B CN111611317 B CN 111611317B CN 202010511001 A CN202010511001 A CN 202010511001A CN 111611317 B CN111611317 B CN 111611317B
Authority
CN
China
Prior art keywords
distributed storage
storage
blockchain
node
classification
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.)
Active
Application number
CN202010511001.8A
Other languages
Chinese (zh)
Other versions
CN111611317A (en
Inventor
何正军
王志文
吴思进
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Fuzamei Technology Co Ltd
Original Assignee
Hangzhou Fuzamei Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hangzhou Fuzamei Technology Co Ltd filed Critical Hangzhou Fuzamei Technology Co Ltd
Priority to CN202010511001.8A priority Critical patent/CN111611317B/en
Publication of CN111611317A publication Critical patent/CN111611317A/en
Application granted granted Critical
Publication of CN111611317B publication Critical patent/CN111611317B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/906Clustering; Classification
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy 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: acquiring each region classification recorded in a distributed storage management contract; determining a first region classification corresponding to the current block chain node according to the positioning information of the current node; generating a distributed storage request transaction comprising a first region classification and broadcasting the distributed storage request transaction into a blockchain network; a distributed storage request transaction is performed by a distributed storage management contract to configure the current blockchain node into a first storage group of the storage groups having a minimum number of nodes of the first regional classification. The invention optimizes the regional uniformity of the distributed storage grouping of the blockchain.

Description

Block chain distributed storage grouping method, device and storage medium
Technical Field
The application relates to the technical field of internet, in particular to a block chain distributed storage grouping method, equipment and a storage medium.
Background
Each node in the blockchain performs the same computation and ultimately saves the same result locally, with a high degree of redundancy of data in a blockchain system that contains thousands or even tens of thousands of nodes, while each node is easily synchronized with the required data from other peer nodes, the consumed storage resources are highly redundant for the entire blockchain system.
In order to solve the above problems, the applicant proposes a blockchain distributed storage scheme in CN201910430864.2 application, by configuring a distributed storage management contract on a blockchain, uniformly configuring nodes participating in distributed storage in a plurality of storage groups, and the nodes participating in distributed storage partition block data and store only partitions corresponding to the storage group where the current node is located, thereby implementing the distributed storage scheme applicable to a public chain scenario.
One drawback of the above-described blockchain distributed storage scheme is that the grouping of nodes into groups of storage groups may easily result in nodes in a storage group or groups having non-uniform geographical distribution, e.g., nodes in the 5 th storage group of 30 storage groups are all north american nodes, nodes in the 13 th storage group have 12 chinese nodes and one australian node, etc. When a node located in south Beijing needs to read data through the distributed storage service, the node can quickly download the data fragments stored in the node of the 13 th storage group, but the node can take a long time to download the data fragments stored in the node of the 5 th storage group; similarly, a node located in chicago may take a long time to download the data shards stored by nodes in the 13 th storage group.
Disclosure of Invention
In view of the foregoing drawbacks or deficiencies of the prior art, it is desirable to provide a blockchain distributed storage grouping method, apparatus and storage medium that optimizes the geographic uniformity of blockchain distributed storage groupings.
In a first aspect, the present invention provides a blockchain distributed storage grouping method, including:
acquiring each region classification recorded in a distributed storage management contract;
determining a first region classification corresponding to the current block chain node according to the positioning information of the current node;
generating a distributed storage request transaction comprising a first region classification and broadcasting the distributed storage request transaction into a blockchain network;
a distributed storage request transaction is performed by a distributed storage management contract to configure the current blockchain node into a first storage group of the storage groups having a minimum number of nodes of the first regional classification.
In a second aspect, the present invention also provides an apparatus comprising one or more processors and memory, wherein the memory contains instructions executable by the one or more processors to cause the one or more processors to perform the blockchain distributed storage grouping method provided in accordance with embodiments of the present invention.
In a third aspect, the present invention also provides a storage medium storing a computer program for causing a computer to execute the blockchain distributed storage grouping method provided according to the embodiments of the present invention.
According to the blockchain distributed storage grouping method, the device and the storage medium, the regional classification is recorded in the distributed storage management contract, and each blockchain node requesting to participate in the distributed storage service submits the regional classification of the blockchain node when sending the request transaction, so that the distributed storage management contract can reasonably allocate newly added nodes into the storage group in a regional uniform allocation mode when executing the request transaction, and the regional uniformity of the blockchain distributed storage grouping is optimized.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings, in which:
FIG. 1 is a flow chart of a block chain distributed storage grouping method 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 is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be noted that, for convenience of description, only the portions related to the invention are shown in the drawings.
It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
FIG. 1 is a flow chart of a block chain distributed storage grouping method according to an embodiment of the present invention.
As shown in fig. 1, in this embodiment, the present invention provides a blockchain distributed storage grouping method, including:
s11: acquiring each region classification recorded in a distributed storage management contract;
s13: determining a first region classification corresponding to the current block chain node according to the positioning information of the current node;
s15: generating a distributed storage request transaction comprising a first region classification and broadcasting the distributed storage request transaction into a blockchain network;
s17: a distributed storage request transaction is performed by a distributed storage management contract to configure the current blockchain node into a first storage group of the storage groups having a minimum number of nodes of the first regional classification.
In particular, the above method is exemplarily described below taking the example that the distributed storage management approximately configures 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 acquires each regional classification recorded in the distributed storage management contract, for example, beijing, shanghai, zhejiang, northwest, new york state, california, japan, korea, eastern europe, western europe, and so on.
In step S13, the node a determines that the region corresponding to the current node is classified as "Zhejiang in China" according to the positioning information (e.g. the geographic 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 the region classification parameter location= "Zhejiang in China", and broadcasts tx1 into the blockchain network.
Each node in the blockchain network broadcasts and packages tx1, executes tx1 through a distributed storage management contract, searches 30 storage groups including the least number of nodes classified as "Zhejiang in China" according to the regional classification "Zhejiang in China" submitted by tx1, for example, storage groups 1-29 respectively include two nodes classified as "Zhejiang in China" in regions, storage group 30 includes 1 node classified as "Zhejiang in China" in regions, and configures node A into storage group 30.
Preferably, the blockchain node density in the geographic range corresponding to the geographic classification is not less than the first threshold.
Specifically, in the scheme shown in fig. 1, the simplest regional classification setting manner obviously adopts administrative regions uniformly, for example, the administrative regions are uniformly set as countries, or country-province/state, or country-city, etc., however, the regional classification setting manner has the defect that the difference of the number of blockchain nodes of each region is larger, so that the difference of the number of blockchain nodes participating in the distributed storage service is also larger, and when the number of the blockchain nodes participating in the distributed storage service is smaller in part of regional classification, the difference of the number of nodes of each storage group may be pulled. For example, a single-digit only node in some small countries results in a single-digit only storage group of 30 storage groups having nodes of the regional classification, which when they happen to be concentrated in some storage groups, e.g., storage group 1, results in a storage group 1 having a far greater number of nodes than a storage group having a far fewer number of nodes.
In view of the above, before setting a region classification, it may be determined whether the blockchain node density in the region range is less than a first threshold: if so, merging the region range with other region ranges, and setting a region classification with wider region ranges, thereby ensuring that the region classification has enough blockchain nodes possibly participating in the distributed storage service.
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, which 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 portion 208 into a Random Access Memory (RAM) 203. In the RAM203, various programs and data required for the operation of the apparatus 200 are also stored. The CPU201, ROM202, and RAM203 are connected to each other through 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 section 206 including a keyboard, a mouse, and the like; an output portion 207 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage section 208 including a hard disk or the like; and a communication section 209 including a network interface card such as a LAN card, a modem, and the like. The communication section 209 performs communication processing via a network such as the internet. The 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 installed on the drive 210 as needed, so that a computer program read out therefrom is installed into the storage section 208 as needed.
In particular, according to embodiments 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 via the communication portion 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 a computer-readable storage medium contained in the apparatus of the above-described embodiment; or may be a computer-readable storage medium, alone, that is not assembled into a device. The computer readable storage medium stores one or more programs for use by one or more processors to perform the methods described herein.
The flowcharts 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 may be implemented by hardware. The described units or modules may also be provided in a processor, for example, the units may be software programs provided in a computer or a mobile smart device, or may be separately configured hardware devices. Wherein the names of the units or modules do not in some cases constitute a limitation of the units or modules themselves.
The foregoing description is only of the preferred embodiments of the present application and is presented as a description of the principles of the technology being utilized. It will be appreciated by persons skilled in the art that the scope of the invention referred to in this application is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or their equivalents without departing from the spirit of the application. Such as the above-described features and technical features having similar functions (but not limited to) disclosed in the present application are replaced with each other.

Claims (4)

1. A blockchain distributed storage grouping method, comprising:
acquiring each region classification recorded in a distributed storage management contract;
determining a first region classification corresponding to the current block chain node according to the positioning information of the current node;
generating a distributed storage request transaction comprising the first region classification and broadcasting the distributed storage request transaction into a blockchain network;
and executing the distributed storage request transaction through the distributed storage management contract to configure the current blockchain node into a first storage group with the minimum number of nodes of the first regional classification in each storage group.
2. The method of claim 1, wherein a blockchain node density in a geographic range corresponding to the geographic classification is not less than a first threshold.
3. An apparatus, the apparatus comprising:
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 of any of claims 1-2.
4. A storage medium storing a computer program, which when executed by a processor implements the method of any one of claims 1-2.
CN202010511001.8A 2020-06-08 2020-06-08 Block chain distributed storage grouping method, device and storage medium Active CN111611317B (en)

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 CN111611317A (en) 2020-09-01
CN111611317B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112766560B (en) * 2021-01-15 2024-02-06 中国工商银行股份有限公司 Alliance blockchain network optimization method, device, system and electronic equipment
CN113919846B (en) * 2021-12-15 2022-03-08 腾讯科技(深圳)有限公司 Block link point dynamic grouping method and device, computer equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771715B (en) * 2008-12-26 2014-04-16 华为技术有限公司 Method, device and system for establishing distribution type network
KR101585146B1 (en) * 2010-12-24 2016-01-14 주식회사 케이티 Distribution storage system of distributively storing objects based on position of plural data nodes, position-based object distributive storing method thereof, and computer-readable recording medium
US9218244B1 (en) * 2014-06-04 2015-12-22 Pure Storage, Inc. Rebuilding data across storage nodes

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9442671B1 (en) * 2010-12-23 2016-09-13 Emc Corporation Distributed consumer cloud storage system
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
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

Also Published As

Publication number Publication date
CN111611317A (en) 2020-09-01

Similar Documents

Publication Publication Date Title
CN109640319B (en) Scheduling method and device based on access information and electronic equipment
US11146502B2 (en) Method and apparatus for allocating resource
CN109889586B (en) Communication processing method and device, computer readable medium and electronic equipment
US10187445B2 (en) System, method and browser client for enabling browser data synchronization
CN108052615B (en) Access request processing method, device, medium and electronic equipment
CN108282514B (en) Distributed service establishing method and device
CN111611317B (en) Block chain distributed storage grouping method, device and storage medium
CN110769038A (en) Server scheduling method and device, storage medium and electronic equipment
CN104954468A (en) Resource allocation method and resource allocation device
CN111399764B (en) Data storage method, data reading device, data storage equipment and data storage medium
CN114244717B (en) Configuration method and device of virtual network card resources, computer equipment and medium
CN110727738B (en) Global routing system based on data fragmentation, electronic equipment and storage medium
CN109618003B (en) Server planning method, server and storage medium
CN111478781B (en) Message broadcasting method and device
CN109104368B (en) Connection request method, device, server and computer readable storage medium
CN110868339A (en) Node distribution method and device, electronic equipment and readable storage medium
CN114364031B (en) Service providing method, device and storage medium
CN107277087B (en) Data processing method and device
CN113220432A (en) Multi-cloud interconnection method, device, equipment, storage medium and product
CN112804367B (en) Address allocation method and device under dual-stack environment
CN111343220B (en) Repeater, distributed file transmission method, distributed file transmission system, medium and electronic equipment
CN108023920B (en) Data packet transmission method, equipment and application interface
US20210037090A1 (en) Systems and Methods for Server Failover and Load Balancing
CN112667642A (en) Information generation method and device and electronic equipment
CN114237902A (en) Service deployment method and device, electronic equipment and computer readable medium

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