Here will the description is performed on the exemplary embodiment in detail, the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistented with the present invention.On the contrary, they be only with it is such as appended
The example of device and method being described in detail in claims, some aspects of the invention are consistent.
Fig. 2 is the schematic diagram of implementation environment involved in a kind of access method of block chain data of the present invention.The implementation ring
Border includes: the control system that the multiple block chain nodes 110 for constituting block chain network and each block chain node 110 are correspondingly arranged
System 120 and at least one distributed cloud storage system 130.Block chain node 110, control system 120 and distributed cloud storage system
Interconnected communication is realized two-by-two between system 130.
Block chain node 110, control system 120 can be different computers or server, be also possible to be deployed in same
Application program on platform computer or server.One block chain node 110 is correspondingly provided with a control system 120.
Distributed cloud storage system 130 may include more storage equipment, and more storage equipment pass through application software set
Get up to cooperate, it is common that data storage and access function is externally provided.Distributed cloud storage system 130 can individually only be one
A block chain node 110 provides storage service, or multiple block chain nodes 110 provide storage service.Distributed cloud is deposited
Storage system 130 can be 110 memory block chain data of block chain node, and block chain data refer to be packaged into sequentially in time
Block file one by one, and string together the data to form chain form.
Wherein, the storage region of distributed cloud storage system 130 is divided into cold memory block and hot memory block.Hot memory block is used for
Hot spot data is stored, the data being most recently stored and the data frequently accessed belong to hot spot data.Because these data are continually
Accessed, the requirement to performance is also relatively high, in storage of hierarchically, high level memory space can be preferentially used, such as flash memory, height
SAS disk of revolving speed etc., these memory spaces can be known as hot memory block.Generally for the response speed for promoting hot memory block access
Degree, can also be using booster responses such as Cache caching mechanisms.
The especially low or almost no longer accessed data of frequency of use, these data claim for storing data for cold memory block
For cold data.In storage of hierarchically, these data can generally be backed up and are put on the SATA disk of the large capacity slow-speed of revolution, or even be put into magnetic
With inner, these memory spaces are thus referred to as cold memory block.The capacity of cold memory block is big, and performance is low, but cost is similarly unusual
Historical data that is cheap, being suitble to storage to be infrequently accessed.
Specifically, block chain node 110 sends the access request of block chain data, control system 120 to control system 120
The access request is received, the block file identification that access request carries is obtained.Control system 120 is according to configured block locations
Mapping relations obtain block file location information corresponding with block file identification.Control system 120 is by the block document location
Information is sent to block chain node 110.Block chain node 110, which accesses block document location in distributed cloud storage system 130, to be believed
The cold memory block of instruction or the block file of hot memory block are ceased, realizes the access of block chain data.
It should be noted that block chain data are stored in distributed cloud storage system 130 rather than in block by the present invention
Chain node 110 is local to be stored, but distributed cloud storage system 130 can carry out memory space by increasing storage equipment
Elastic dilatation, thus meet block chain data and constantly expand demand to memory space.In addition, distributed cloud storage system
130 have carried out partition holding, and the lower cold data of access frequency is stored in the cold memory block that capacity is big, performance is low, at low cost,
Often the hot spot data accessed is stored in hot memory block, even if block chain data are more and more, data access will not be influenced
Response speed, can quickly from the hot memory block of better performances read frequently-used data.Further, each by configuring in advance
Mapping position of the block file in distributed cloud storage system 130, thus for the text of block needed for block chain node 110
Part can be quickly and accurately obtained the location information of the block file, consequently facilitating block chain node 110 is according to the location information
The block file of specified location area can rapidly and accurately be accessed.
It is a kind of server architecture schematic diagram provided in an embodiment of the present invention referring to Fig. 3, Fig. 3.The server 200 can be because matching
It sets or performance is different and generate bigger difference, may include one or more central processing units (central
Processing units, CPU) 222 (for example, one or more processors) and memory 232, one or more
Store the storage medium 230 (such as one or more mass memory units) of application program 242 or data 244.Wherein, it deposits
Reservoir 232 and storage medium 230 can be of short duration storage or persistent storage.The program for being stored in storage medium 230 may include
One or more modules (diagram is not shown), each module may include to the series of instructions operation in server 200.
Further, central processing unit 222 can be set to communicate with storage medium 230, execute storage medium on server 200
Series of instructions operation in 230.Server 200 can also include one or more power supplys 226, one or more
Wired or wireless network interface 250, one or more input/output interfaces 258, and/or, one or more operations
System 241, such as Windows ServerTM, Mac OSXTM, UnixTM, LinuxTM, FreeBSDTMEtc..Following Fig. 3, Fig. 4
Control system, block chain node in illustrated embodiment can be based on the server architecture shown in Fig. 3.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of following embodiments can pass through hardware
It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
Fig. 4 is a kind of flow chart of the access method of block chain data shown according to an exemplary embodiment.The block
The scope of application and executing subject of the access method of chain data can be control system, and control system can be computer, service
Device or the program run thereon, such as the control system can be the control system 120 implemented in link shown in Fig. 2.Such as Fig. 4 institute
Show, this method can be executed by control system 110, may comprise steps of.
In the step 310, from the access request that block chain node initiates the block chain data, the access is obtained
Request the block file identification carried.
As described above, block chain data refer to is packaged into block file one by one sequentially in time, and strings together
Form the data of chain form.In other words, block chain data are exactly the multiple block files connected according to time order and function.This
Multiple block files are stored in distributed cloud storage system.It is to be understood that distributed cloud storage system is by multiple storages
Equipment provides storage service jointly, to can store equipment by increasing when block chain data increase, carries out distributed cloud
The elastic dilatation of storage system.
It is to be understood that the maximum feature of cloud storage is exactly elasticity processing, having dynamic retractility is its most basic characteristic,
, when insufficient space, online dynamic capacity-expanding can be carried out according to actual data, to determine the memory space used, and
Without interrupting upper layer block chain service.In addition, cloud storage capacity possesses the sufficiently high upper limit, far more than current actual demand, not
Come with advances in technology, still keeps such situation, meet the storage of various black volumes.
Storage demand for magnanimity, traditional shared memory module have significant limitation.Using distributed storage,
Data are evenly dispersed within the storage system, are replicated by internal redundancy, guarantee the availability of file.In mass storage system (MSS)
In, there is extraordinary fault-tolerant ability to be very important, and distributed storage not only can guarantee good scalability, simultaneously also
Reliability can be taken into account well.This reliability, not only software view possess more parts of data redundancies, have also contemplated simultaneously
Single Point of Faliure is not present in the robustness of hardware view, network level.
Distributed cloud storage system includes hot memory block for storing hot spot data and for storing the cold of cold data
Memory block, as described above, hot memory block performance is good, and speed is fast, then can store common block file (i.e. hot spot number in the recent period
According to).And cold memory block performance is relatively low but at low cost, capacity is big, then can store block file (the i.e. cold number being of little use
It should be noted that the performance issue of low delay access, is the main deficiency of current cloud storage and distributed storage,
But by local Cache (storage), using mechanism such as high performance SSD (Solid State Drives, solid state hard disk), can be with
It maximizes favourable factors and minimizes unfavourable ones, promotes Whole Response speed.But in the storage scheme of existing block chain, the characteristic of cold and hot data is not considered,
Block data is stored in high performance SSD completely, it is not only unrealistic, excessively high cost also allow most users hope and
Step；But block data is stored in the medium of low performance completely, and will lead to serious performance bottleneck.Therefore the scheme of compromise
It is very feasible mode, the block file partially infrequently accessed is placed in cold memory block, use habit is not only conformed with,
It is prior to be reduction of use cost.
In block chain technology, there are three types of models: UTXO (Unspent Transaction Output, the transaction not spent
Output) model, account balance model and mixed model.These three modes are different to the definition of cold and hot data.In UTXO mode,
Calculated since every transaction requires all costs previous to current account (a certain address), theoretically for,
Under UTXO mode, it appears that cold data is not present, but in order to cope with more and more high frequency requirements for access, most current areas
Block catenary system, all caches historical trading；According further to actual service condition, the data frequently accessed are often and most
The account closely used is related, and the calculating and access of historical trading number big absolutely were also defined within the scope of the regular hour, really remote
Data access probability it is lower, therefore UTXO model also has the difference of hot spot data and cold data.Account balance model is the most
The data model that the financial institutions such as traditional mode and current bank use, the access of this kind of data in the database exist
Hot spot data problem, therefore traditional database be directed to this problem, many solutions and optimisation strategy are given, in block
Storage in chain also inherits this feature naturally.And combined account type, have both the spy of UTXO and account balance model
Point also has the demand of hot spot data.In conclusion hot spot data is also existing in block catenary system, it is necessary to according to reality
Use accordingly adjusted and planned.
By the separation strategy for cold and hot data, hot spot data is stored in the hot memory block of better performances, and very
The cold data accessed less is stored on cold memory block, has taken into account the relationship between performance and cost well.
Access request is that block chain node is sent to control system, which is used to indicate needed for block chain node
Block file, which is one of block in block chain data corresponding to the block chain node.Access is asked
The identification information (i.e. block file identification) that can carry the block file is sought, the identification information of block file can be block volume
Number, block name, block generate time etc..Control system can receive the access request of block chain node transmission, ask from access
Middle acquisition block file identification is sought, thus the identification information of block file needed for obtaining block chain node.
In a step 330, according to configured block locations mapping relations, the area of the block file identification mapping is determined
Block file location information；The block file location information is the affiliated block file of the block file identification in the distribution
Storage region information in cloud storage system；
Wherein, block locations mapping relations refer to the corresponding relationship between block file identification and block document location.Area
Block position mapping relations can be stored with the form of block mapping table, and it is each that storage can be corresponded in block mapping table
The identification information and location information of block file, thus control system is believed according to the mark of the block file obtained in access request
Breath can find the corresponding location information of the identification information from block mapping table to get to block file location information.Due to
Multiple block files of block chain data are stored in distributed cloud storage system, and the block file location information refers to mark
Storage region information of the corresponding block file of information in distributed cloud storage system, results in needed for block chain node
Storage location of the block file in distributed cloud storage system.
It should be noted that since memory space is divided into cold memory block and hot memory block, institute by distributed cloud storage system
Designated position in cold memory block may be directed toward with block file location information, it is also possible to it is directed toward designated position in hot memory block, by
What is stored in hot memory block is hot spot data, i.e., the block file frequently accessed, so block file location information is more general
Rate is directed to hot memory block.
In step 350, the block file location information is returned to the block chain link for initiating the access request
Point triggers the block that the block chain node accesses the cold memory block or hot memory block according to the block file location information
Specifically, determining block file location information is returned to the block chain node for initiating access request by control system,
Thus the hot memory block or cold that block chain node can be directed toward according to block file location information, access region block file location information
The block file of memory block.Since the accessed probability of the block file of cold memory block storage is lower, the area of hot memory block storage
The accessed probability of block file is higher, and hot memory block better performances, fast response time, compared to not partitioned storage, can be improved
The response speed of block chain data is accessed, the response time is shortened.By being directed to the separation strategy of cold and hot data, hot spot data is protected
There are in the preferably hot memory block of performance, the cold data seldom accessed is stored in cold memory block, has taken into account performance well
Relationship between cost does not increase carrying cost additionally again while improving response speed.
Since hot spot data can store the hot memory block good in performance, and to be stored at low cost, capacity big for cold data
Cold memory block, so will not influence to access common block text while cost is reduced even if block chain data constantly expand
The response speed of part.In addition, can directly position each block file in distributed cloud by configuring block locations mapping relations
Position in storage system thereby saves the time for searching block file, shortens the response time of access block chain data.
Further, block chain data are stored in distributed cloud storage system, when block chain data constantly expand, distributed cloud
Elastic dilatation may be implemented in storage system, to meet the needs of block chain data are constantly expanded to memory space.
In a kind of exemplary embodiment, as shown in figure 5, the access method of block chain data provided by the invention further includes
In step 410, according to preset cold and hot Data Migrating Strategy, the hot memory block and the cold memory block are controlled
Between block file migration；
Wherein, cold and hot Data Migrating Strategy refers to the division methods of hot spot data and cold data, and control system is according in advance
The division methods of configured hot spot data and cold data can control moving for block file between the cold storage of hot storage region
It moves, i.e., the block file for belonging to cold data is stored to cold and deposited to hot memory block by the block file storage for belonging to hot spot data
Storage area, clips to cold memory block for the cold data of hot memory block, and the hot spot data of cold memory block is clipped to hot memory block.
At step 420, according to the migration position for being migrated block file, the block of block file is migrated described in update
Position mapping relations.
Wherein, migration position, which refers to, is migrated the new storage location after block file migrates.Since block file exists
It is migrated between hot memory block and cold memory block, so being migrated storage position of the block file in distributed cloud storage system
It sets and is changed, thus need to carry out the corresponding block locations information of block file identification in block locations mapping relations more
Newly, i.e. block locations information by former storage location is revised as the new storage location after migration, consequently facilitating being accurately positioned to being visited
Ask the position of block file.
In a kind of exemplary embodiment, above-mentioned steps 410 are specifically included: using preset time point as boundary, when will be described
Between point previous existence at block file be stored in the cold memory block, the block file generated after the time point is stored in institute
State hot memory block.
Wherein, preset time point can be apart from current point in time one week, 15 days, one month or 3 months etc..When default
Between generate before point block file can consider and already belong to historical data, accessed probability is very low, then deposits there may be cold
Storage area.And the block file generated after preset time point (including preset time point), it is believed that be that recent generate just accesses
The data crossed then are stored in hot memory block, thus multiple block files of block chain data, can a part be divided to cold storage
Area, a part are divided to hot memory block, by the block file of hot memory block storage high frequency access, to improve access efficiency.
In another exemplary embodiment, above-mentioned steps 410 are specifically included: using designated capabilities as threshold value, when the heat
When memory space meets or exceeds the designated capabilities for memory block, by the Partial Block file migration of the hot memory block to institute
State cold memory block.
Wherein, designated capabilities pre-define, and designated capabilities can be 80%, 90%, the 95% of hot memory capacity.
Newly generated block file is first stored in hot memory block, and the memory space in hot memory block meets or exceeds the designated capabilities
When, then it can be by the Partial Block file migration of hot memory block to cold memory block.The Partial Block file can be hot memory block
The minimum several block files of several block files or access frequency of middle oldest stored.
In one embodiment, newly generated block file can be first stored in hot memory block, in the surplus of hot memory block
When remaining memory space inadequate (i.e. memory space meets or exceeds designated capabilities), by the previous existence of preset time point in hot memory block
At block file migration to cold memory block.
In another exemplary embodiment, above-mentioned steps 410 are specifically included: according to block file in the hot memory block
Access frequency, the block file migration by access frequency lower than predeterminated frequency is to the cold memory block.
Wherein, access frequency refers to that the accessed number of each block file accounts for the ratio of total degree.Control system according to
The access frequency of each block file in hot memory block can deposit access frequency lower than predeterminated frequency block file migration to cold
Storage area.In one embodiment, access frequency can be lower than by control system in the residual memory space deficiency of hot memory block
The block file migration of predeterminated frequency is to cold memory block.
In one embodiment, newly generated block file is stored in hot memory block every time, the storage in hot memory block
When space meets or exceeds designated capabilities, control system, will by the block file migration before preset time point to cold memory block
Access frequency lower than predeterminated frequency block file migration to cold memory block.
In a kind of exemplary embodiment, distributed cloud storage system includes the storage isolation corresponding to block chain node
Area, storage isolated area includes hot memory block and cold memory block.
That is, a block chain node have in distributed cloud storage system corresponding one or more storage every
From area, which can only access the data of corresponding storage isolated area, and cannot access for other block chain nodes
Storage isolated area data, it is possible thereby to the isolation and protection of private data between different user be realized, to improve data
In order to the isolation and secret protection between very good solution user data.Different from common shared storage, cloud
Different user in storage or distributed storage can possess oneself isolated area, therefore different users its data mutually can not
See, avoids the risk of private data leakage.The data isolation between user why is needed, is because in all kinds of alliance's chains
In technical solution, different nodes, different user may possess different blocks data, such as Hyperledger Fabric (one
Modular distribution account book solution support platform) in be isolation between data on different channel.
Wherein, the storage isolated area corresponding to block chain node may include cold memory block and hot memory block.Above-mentioned steps
Block chain node accesses the block file of the cold memory block or hot memory block according to the block file location information in 350,
It specifically includes:
In the corresponding storage isolated area of the block chain node visit, the cold storage of the block file location information instruction
Block file in area or hot memory block.
It should be noted that the block chain data that some block chain node generates are stored in for assuring data security
In storage isolated area corresponding with the block chain node.Wherein, the block file seldom accessed can store in storage isolated area
Cold memory block, for the block file for being most recently stored and accessing be stored in storage isolated area hot memory block.
As a result, when the block chain node needs to access block chain data, only need to access in distributed cloud storage system with
The corresponding storage isolated area of block chain node obtains the cold storage of block file location information instruction from the storage isolated area
The block file in area or hot memory block.
Fig. 6 is a kind of configuration diagram of the access system of block chain data shown according to an exemplary embodiment, such as
Shown in Fig. 6, the access system of the block chain data: block chain node 110, control system 120 and distributed cloud storage system
130；The block chain data include multiple block files in distributed cloud storage system 130, and the distribution cloud is deposited
Storage system 130 includes the hot memory block 131 for storing hot spot data and the cold memory block 132 for storing cold data.Area
The block file seldom accessed in multiple block files of block chain data is stored in cold memory block 132 as cold data, deposits recently
The block file that storage and frequentation are asked is stored in hot memory block 131 as hot spot data.
The block chain node 110 is used to initiate the access request to the block chain data to the control system 110,
The access request carries block file identification；
The control system 120 is used to determine the block file identification according to configured block locations mapping relations
The block file location information of mapping, and the block file location information is returned into the block chain node 110；
The block chain node 110 be also used to be accessed according to the block file location information the cold memory block 231 or
The block file of hot memory block 131.
Above-mentioned block chain node 110, control system 120, the distributed function of cloud storage system 130 and the realization of effect
Journey is specifically detailed in the realization process that step is corresponded in the access method of above-mentioned block chain data, and details are not described herein.
In one embodiment, as shown in fig. 6, control system 120 includes access interface 121, strategy controller 122, control
Center 123 processed and block mapping table 124.
Wherein, strategy controller 122 comes from customized cold and hot Data Migrating Strategy, and conversation strategy for receiving,
Also the later period of user is allowed to modify, the execution of current strategies is always according to newest strategy.In addition, strategy controller 122 is most
Critical function is that strategy is passed to control centre 123, control centre according to strategy come carry out cold and hot storage Data Migration and
The control of cold and hot storage.For simplest strategy using time point as boundary, the data before sometime putting are placed on cold memory block
In 132, being placed in hot memory block 131 hereafter；Can also using a certain capacity of hot memory block 131 as threshold value, when reaching or
When more than this threshold value, by the block file migration of the hot memory block 131 in part into cold memory block 132；Complicated strategy, can be with
Situation is used and accessed according to nearest block, to decide whether to migrate the block file in hot memory block 131, when heat is deposited
It, can be by this Partial Block file migration into cold memory block 132 when some districts block access frequency in storage area 131 is lower than certain value.
Control centre 123 is the hinge coordinated, communicate and managed, as the core component of cold and hot storage management, according to plan
The slightly strategy of controller 122, to carry out the migration of cold and hot data.After block file migrates on cold and hot memory block 131,
Also real-time update is carried out to the block locations mapping relations recorded in block mapping table 124, guaranteed in block mapping table 124
Block locations mapping relations are directed to the position of correct block file.Control centre 123 other components are carried out simultaneously it is responsible,
Coordination and management strategy controller 122, access interface 121, block mapping table 124 etc..
Block mapping table 124 is the mapping table of Preservation Metadata (Metadata), for being directed toward where different blocks file
Position.When cold and hot storage migrates, the content of the table can be updated, and the block document location being migrated can be updated.
Access interface 121 with block chain node 110 for docking, when block chain node needs to access designated blocks file
When, it is first docked with access interface 121, access interface 121 returns after obtaining data file position in block mapping table
Back to block chain node 110, block chain node 110 is warm in distributed cloud storage system 130 to access according to the position of instruction again
Block file on memory block 131 or cold memory block 132.
Fig. 7 is that the access system of block chain data carries out the accessing time sequence figure of block chain data.As shown in fig. 7, timing 1:
Block chain node 110 sends the access request of access designated blocks file to the access interface 121 of control system 120；
Timing 2: block document location of the access interface 121 to 124 request of the block mapping table designated blocks file；
Timing 3: access interface 121 obtains the block file location information that block mapping table 124 is fed back；
Timing 4: the block file location information is sent to block chain node 110 by access interface 121；
Timing 5: block chain node 110 accesses what the block file location information in distributed cloud storage system 130 indicated
The block file of cold memory block 132 or hot memory block 131；
Timing 6: block chain node 110 receives the cold memory block 132 or hot memory block that distributed cloud storage system 130 returns
131 block file.
In a kind of exemplary embodiment, the distribution cloud storage system includes depositing corresponding to the block chain node
Isolated area is stored up, the storage isolated area includes the hot memory block and cold memory block；
The block chain node is for accessing in corresponding storage isolated area, the institute of the block file location information instruction
State the block file of cold memory block or hot memory block.
As shown in figure 8, block chain network includes multiple block chain nodes, block chain node 1, block chain node 2, block chain
Node 3 ..., each block chain node have the storage isolated area corresponding to the block chain node.For example, distributed cloud storage 1
In include storage isolated area 1 and storage isolated area 2, block chain node 1 have corresponding storage isolated area 1, block chain node 2 tool
There is corresponding storage isolated area 2, block chain node 1 cannot access the block file of storage isolated area 2, equally, block chain node 2
The block file that storage isolated area 1 cannot be accessed corresponds to the storage isolated area of block chain node from there through setting, realizes
The insulation blocking of private data between different user.
Wherein, different cloud storage systems can be used to store the data of itself in different blocks chain node, realizes physics
The isolation of rank.As shown in figure 8, block chain node 1 is stored using distributed cloud storage 1, and block chain node 3 uses and divides
Cloth cloud storage 2 is stored, and block chain node 1 cannot access what block chain link point 3 was stored in distributed cloud storage 2 as a result,
Block file, block chain node 3 can not access the block file that block chain link point 1 is stored in distributed cloud storage 1, thus real
The insulation blocking of data between existing different blocks chain node.
The corresponding block file storage of each block chain node, be not confined to local disk, but is passing through mapping in Fig. 8
Relationship utilizes cloud resource, has greatly expanded memory space in this way.The type selecting of cloud storage resource first is more numerous, different cloud factories
Although quotient classifies different, be directed to the storage mode of cloud disk, be generally divided into three classes: (performance is good, price for high-performance cloud storage
It is expensive), large capacity high performance-price ratio cloud storage (performance is weak, at low cost), mixed clouds storage (fall between, have highest
Valence ratio), there are also the classification more refined for part manufacturer on this basis, but generally meet all kinds of storages in response to user
Demand.In addition, having object storage, backup storage, file storage, filing storage, cloud hard disk etc. a variety of according to usage type difference
Mode.Some in all kinds of cloud storage modes substantially belong to centrally stored, some belong to distributed storage, no matter which kind of mode,
The technical problems such as Single Point of Faliure, backup are considered in the solution of cloud, but all for more safe and reliable, mass memory
Under extended capability, the fault-tolerant ability under high concurrent, the present invention in it is recommended that cloud distributed storage solution.Cloud
Distributed storage mode under, the more standby elasticity of system, rather than just the upgrading of physical hardware and the improvement of interfacing,
Under big data environment, the increase of data scale and complexity is often very fast, more demanding to the scalability of system, and divides
Cloth storage can preferably solve the enhanced scalability of storage system and the transparent migration of data.
Cloud is stored, most important subject under discussion is being effectively isolated for data, and the storage in cloud of the present invention realizes user
The isolation of rank, the storage between different user cannot access mutually.The preservation of block chain letter data in this way is equal to local deposit
Storage, from the perspective of use, the distributed storage in cloud is more like the extension of local disk, without original system to block chain
System is transformed.Identical cloud account had both can be used according to the needs of rights management and data isolation in different block chain nodes
Number data (data between different nodes are without privacy) is saved, different user account number also can be used and realize data separating, even
Data are saved using different cloud storages, realize the other isolation of physical level.
Complex managements and the control processes such as the extension of the above distributed storage, the permission control of guaranteed reliability, user, all
It transfers to distributed cloud storage to handle, does not need the intervention of original block catenary system, avoid interfering tile system, introduce
New design and complicated management process.In order to solve the data expansion of block chain storage, it is block chain that cloud storage, which is basis,
System provides theoretic unlimited shelf space.Also, it by the separation of cold and hot storage, solves brought by data expansion
Cost problem influences the speed for accessing data while cost is reduced and not.
It should be noted that most commonly seen mode is that block chain data are stored in block chain node sheet in the prior art
Ground, it is contemplated that the convenience of network storage, segmentation scheme is used with NFS (Network File System, network file
System) be representative network storage solution.Fig. 9 is schematic illustration of the block chain data in NFS network storage.This side
Formula is stored in block chain data in network share storage.Block chain data are stored in nfs server, and block chain node passes through
NFS client, the block chain data of access nfs server storage are run, different blocks chain node uniformly stores data in together
In one nfs server.
Mode that there are many network storages, but it is substantially similar, wherein most representative with NFS.The program passes through
Network storage is mapped as local, realizes the extension to being locally stored.The shortcomings that this mode is that network storage is not sufficiently stable, and is led to
Common way is the sharing files inside local area network, but stores as enterprise in application, can not reach the reliability of production rank
It is required that.The another drawback of network storage is that performance is poor, cannot handle the demand of high concurrent transaction well.
The essence of network storage and centrally stored mode, storage server are similarly subjected to the limitation of its maximum size,
As being locally stored, elasticity processing similarly there is a problem of identical with dynamic capacity-expanding.Alliance's chain or privately owned chain are come
It says, protecting to data personal secrets has very high requirement, and network storage mode, since the concentration of data saves, inevitable face
Face secret protection and the challenge of secure data area, the degree of safety of data is high without local preserving type.Equally, in order to keep away
Exempt from loss of data caused by Single Point of Faliure, storage server needs to carry out additional planning, to data backup and failure thermophoresis
It is designed.
It is intended to create persistently in addition, IPFS (InterPlanetary File System, interspace file system) is one
And the network transmission protocol of distributed storage and shared file.It is a kind of reciprocity hypermedia distribution protocol of content addressable.
Node in IPFS network will constitute a distributed file system.It is an open source code project, is opened from 2014
Beginning is developed with the help of open source community by Protocol Labs.
Using IPFS as the distributed memory system of representative, block chain data are stored in distributed network, such as Figure 10 institute
Show, is the storage scheme schematic diagram of block chain distributed file system.Using IPFS as the distributed memory system of representative and existing
Block chain technology, especially publicly-owned chain technology are combined, due to storage mass file unsuitable on block chain node and greatly
Type data, therefore open source community proposes the solution of distributed file system, by the Hash cochain of data file, and it is large-scale
File is stored in distributed file system.IPFS is the distributed file system of representative, although being data expansion Resolving probiems
It proposes a kind of possibility, but its original intention is the mass file for indirect cochains such as audio-videos, is not solution block chain number
It is developed according to storage, therefore in practical applications, it is also necessary to carry out the transformation and customization of interface.
In addition, the design that IPFS is the distributed storage of representative is more the publicly-owned chain technology of docking, therefore it is being directed to
In alliance's chain, the isolation and protection of the private data in different channels do not have more perfect design, therefore there are security privacy sides
The problem of face.
IPFS is the distributed file system of representative, and is made to be adapted to all business scenario and user demand
Universal design, there is no treated with a certain discrimination for cold and hot data, it is thus possible to which there are performance issues.All data are unified to protect
It deposits in a distributed system, also the settling mode of not best cost performance.
The speed of existing block chain technical treatment transaction is relatively limited, and the digging mine mode of especially public chain more limits
The concurrent processing of high frequency, most 7 trading volumes per second by taking bit coin as an example；And alliance's chain/private chain technology, although trading
Universal fast excessively public chain in terms of processing speed, but the process traded is there is still a need for reaching common understanding, therefore its processing speed also reaches far away
The processing capacity of legacy system.As a result, in face of the block circuit-switched data constantly expanded, while reducing carrying cost as far as possible,
It is the response time for shortening access block chain data, most important for improving trading processing speed.
The technical solution that the above embodiment of the present invention provides, by the way that block chain data are stored in distributed cloud storage system
In, it solves the problems, such as that block chain data constantly expand, had not only met the expansible demand of elasticity using distributed cloud storage, but also
Avoid centrally stored brought Single Point of Faliure.By the isolated storage of cold and hot data, deposited using high performance hot memory block
Heat accumulation point data stores cold data using cold memory block at low cost, thus solves caused by block chain data constantly expand
The higher problem of carrying cost, has taken into account the relationship between Cost And Performance very well.Further, by distributed cloud storage
Setting corresponds to the storage isolated area of block chain node in system, it is thus achieved that the isolation of private data is protected between different nodes
Shield.In addition, can quickly position the block file for needing to access by having configured block locations mapping relations, further shorten and visit
It asks the response time of block file, thus improves the speed of block chain technical treatment transaction.
Following is apparatus of the present invention embodiment, can be used for executing the block chain that the above-mentioned control system 120 of the present invention executes
The access method embodiment of data.For undisclosed details in apparatus of the present invention embodiment, block chain number of the present invention is please referred to
According to access method embodiment.
Figure 11 is a kind of block diagram of the access mechanism of block chain data shown according to an exemplary embodiment, the block chain
The access mechanism of data can be used in the control system 120 of implementation environment shown in Fig. 2, execute Fig. 4, block chain shown in fig. 5
The all or part of step of the access method of data.As shown in figure 11, which includes but is not limited to: block-identified acquisition mould
Block 510, block locations determining module 530 and location information return module 550.
Block-identified acquisition module 510, for from the access request that block chain node initiates the block chain data,
Obtain the block file identification that the access request carries；
Block locations determining module 530, for determining the block file according to configured block locations mapping relations
The block file location information of identity map；The block file location information is the affiliated block file of the block file identification
Storage region information in the distributed cloud storage system；
Location information return module 550 initiates the access request for returning to the block file location information
The block chain node triggers the block chain node according to the block file location information and accesses the cold memory block or heat
The block file of memory block.
The function of modules and the realization process of effect are specifically detailed in the access of above-mentioned block chain data in above-mentioned apparatus
The realization process of step is corresponded in method, details are not described herein.
Block-identified acquisition module 510 such as can be some physical structure input/output interface 258 in Fig. 3.
Block locations determining module 530 and location information return module 550 are also possible to functional module, for executing
State the correspondence step in the access method of block chain data.It is appreciated that these modules can by hardware, software, or both
In conjunction with realizing.When realizing in hardware, these modules may be embodied as one or more hardware modules, for example, one or
Multiple specific integrated circuits.When being realized with software mode, these modules may be embodied as holding on the one or more processors
Capable one or more computer programs, such as the journey being stored in performed by the central processing unit 218 of Fig. 3 in memory 232
In a kind of exemplary embodiment, as shown in figure 12, the access mechanism of block chain data described above further include:
Data Migration module 610, for according to preset cold and hot Data Migrating Strategy, control the hot memory block with it is described
The migration of block file between cold memory block；
Location updating module 620, for according to the migration position for being migrated block file, being migrated block text described in update
The block locations mapping relations of part.
In a kind of exemplary embodiment, the Data Migration module 610 includes:
Time-shift unit, for using preset time point as boundary, by the previous existence at time point at block file store
In the cold memory block, the block file generated after the time point is stored in the hot memory block.
In a kind of exemplary embodiment, the Data Migration module 610 includes:
Capacity migration units are used for using designated capabilities as threshold value, when memory space is met or exceeded for the hot memory block
When the designated capabilities, by the Partial Block file migration of the hot memory block to the cold memory block.
In a kind of exemplary embodiment, the Data Migration module 610 includes:
Access frequency is lower than by frequency shift unit for the access frequency according to block file in the hot memory block
The block file migration of predeterminated frequency is to the cold memory block.
In a kind of exemplary embodiment, the distribution cloud storage system includes depositing corresponding to the block chain node
Isolated area is stored up, the storage isolated area includes the hot memory block and cold memory block；The block chain node is according to the block
File location information accesses the block file of the cold memory block or hot memory block, comprising:
In the corresponding storage isolated area of the block chain node visit, the cold storage of the block file location information instruction
Block file in area or hot memory block.
Optionally, the present invention also provides a kind of electronic equipment, which can be used for the control of implementation environment shown in Fig. 2
In system 120 processed, execute Fig. 4, Fig. 5 it is any shown in block chain data access method all or part of step.It is described
Memory for storage processor executable instruction；
Wherein, the processor is configured to executing the access side of block chain data described in the above exemplary embodiments
The processor of electronic equipment executes the concrete mode of operation in the related block chain data in the embodiment
Detailed description is performed in the embodiment of access method, no detailed explanation will be given here.
In the exemplary embodiment, a kind of storage medium is additionally provided, which is computer readable storage medium,
It such as can be the provisional and non-transitorycomputer readable storage medium for including instruction.The storage medium is stored with computer
Program, the computer program can be executed by the central processing unit 222 of server 200 to complete the access of above-mentioned block chain data
It should be understood that the present invention is not limited to the precise structure already described above and shown in the accompanying drawings, and
And various modifications and change can executed without departing from the scope.The scope of the present invention is limited only by the attached claims.