CN110113375A - Resource share method and device, system, storage medium - Google Patents

Resource share method and device, system, storage medium Download PDF

Info

Publication number
CN110113375A
CN110113375A CN201910236503.1A CN201910236503A CN110113375A CN 110113375 A CN110113375 A CN 110113375A CN 201910236503 A CN201910236503 A CN 201910236503A CN 110113375 A CN110113375 A CN 110113375A
Authority
CN
China
Prior art keywords
resource
node
metadata
block chain
request
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.)
Pending
Application number
CN201910236503.1A
Other languages
Chinese (zh)
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.)
Chengdu Jiahua Chain Cloud Technology Co Ltd
Rockontrol Technology Group Ltd By Share Ltd
Original Assignee
Chengdu Jiahua Chain Cloud Technology Co Ltd
Rockontrol Technology Group Ltd By Share 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 Chengdu Jiahua Chain Cloud Technology Co Ltd, Rockontrol Technology Group Ltd By Share Ltd filed Critical Chengdu Jiahua Chain Cloud Technology Co Ltd
Priority to CN201910236503.1A priority Critical patent/CN110113375A/en
Publication of CN110113375A publication Critical patent/CN110113375A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the present application provides a kind of resource share method and device, system, storage medium, is related to data processing field.The resource share method includes: to obtain the synchronous first resource of first resource node, and the first resource node is all sides of the first resource;Preset audit interface is called to obtain the metadata for the first resource being stored in block chain network when creating the first resource;According to the correctness of first resource described in the metadata validation.Compared with prior art, which can verify resource according to metadata, realize the auditing possibility of resource, guarantee the reliability of resource got.

Description

Resource share method and device, system, storage medium
Technical field
This application involves technical field of data processing, in particular to a kind of resource share method and device, system, Storage medium.
Background technique
The way of common resource-sharing is to establish a kind of interface standard, in the data section of all accesses of unified management by the central government Point interface is interacted in the case where reaching certain condition by the interface of both sides.As back end uses traditional data Library (MySQL etc.) carries out data storage, and layer develops data-interface on the application layer, docks the data-interface or text of switching plane Part interface.Another way is, by some synchronization mechanisms of program and database itself, such as FTP (File Transfer Protocol, File Transfer Protocol), resource is directly synchronized to the clothes of other side by rsync (remote sync, remote synchronization) etc. It is engaged in device and database.
In two kinds of above-mentioned ways, all have a problem that: resource reaches the requesting party of resource from all sides of resource During, resource may be tampered, and resources requesting party is difficult to confirm the reliability of the resource shared to, it is possible that can be right Resources requesting party causes damages.
Summary of the invention
The application provides a kind of resource share method and device, system, storage medium, is asked with improving resource in the prior art The side of asking can not confirm the technical issues of reliability of the resource shared to.
Embodiments herein is accomplished in that
In a first aspect, the embodiment of the present application provides a kind of resource share method, this method is suitable for arbitrary resource node, Such as an enterprise or a tissue, which can not only request resource but also can be with shared resource, this method comprises: obtaining The synchronous first resource of first resource node, the first resource node are all sides of the first resource;It calls preset Audit interface obtains the metadata for the first resource being stored in block chain network when creating the first resource;According to The correctness of first resource described in the metadata validation.
In the embodiment of the present application, the resource node of the embodiment of the present application is getting the synchronous resource of other resource nodes Afterwards, the resource got can be verified according to the metadata being stored on block chain because block chain network can not Being tampered property, it is ensured that metadata is not tampered, so resource node can be according to the resource that metadata validation is got Correctness.Compared with prior art, the scheme in the present embodiment can be realized the auditing possibility of resource, determine the resource got Reliability.
With reference to first aspect, in the first possible implementation of the first aspect, same in acquisition first resource node Before the first resource of step, the method also includes:
Receive the resource request of user;In itself not first resource corresponding with the resource request, according to described Resource request generates resource-sharing request;Resource-sharing request is sent to the first resource node.
In the embodiment of the present application, it can be by the first resource that other resource nodes synchronize and asked by user's initiation resource It asks, when itself not having corresponding first resource, generating corresponding resource-sharing request, to be sent to first resource corresponding Resource node.In this way, only when there is corresponding resource request, isochronous resources is just requested, can reduce shared money The pressure of source node improves the efficiency of resource-sharing.
With reference to first aspect, in the second possible implementation of the first aspect, the metadata includes: the money The title in source, the description of the resource, the resource cryptographic Hash;According to the correct of first resource described in the metadata validation Property, comprising:
The title of the first resource, description and cryptographic Hash are compared with the metadata, obtain comparison result; The correctness of the first resource is judged according to the comparison result.
In the embodiment of the present application, metadata includes the cryptographic Hash of the title of resource, the description of resource, resource, first number It after being stored in block chain network, will not change, therefore can be compared based on metadata data corresponding with resource It is right, and then judge the correctness of resource, if such as resource be tampered, cryptographic Hash is certainly and the cryptographic Hash in metadata is It is different, so as to realize the auditing possibility of resource.
With reference to first aspect, in a third possible implementation of the first aspect, the method also includes:
Obtain the asset creation request of user;Include in the asset creation request user's selection resource to be created and The metadata of the resource to be created;The resource to be created is stored, and the metadata of the resource to be created is deposited Storage is in the block chain network.
In the embodiment of the present application, resource node can also be requested according to the asset creation of user, complete the creation of resource, And the metadata of resource to be created can be also stored in block chain network during creation.Therefore, there are other resources When node requests the resource, the corresponding metadata of the resource can also be obtained from block chain network, is audited to it, realize The auditing possibility of resource.
The third possible implementation with reference to first aspect, in the 4th kind of possible implementation of first aspect In, the metadata is stored in the block chain network, comprising:
Establishing resource interface is called to pass through the intelligent contract in the block chain network and the account in the block chain network Originally it interacts, the metadata to be written on the account book.
In the embodiment of the present application, the mode of resource node storage metadata is the account in calling interface and block chain network Originally interact, the data of account book in block chain network record have can not tamper, it may therefore be assured that metadata will not Change, so that whether resource can be verified according to metadata correct.
4th kind of possible implementation with reference to first aspect, in the fifth possible implementation of the first aspect, The resource includes file type resource and/or data type resource, and the resource to be created is stored, comprising:
When the resource to be created that user selects is file type resource, directly the file type resource is carried out Storage;It is data by the data type resource conversion when the resource to be created that user selects is data type resource After the corresponding file resource of resource, then the file resource stored.
In the embodiment of the present application, resource includes file resource and data resource two types, for different resources-type Type has different storage modes, to improve the safety and reliability of resource storage.
With reference to first aspect, in the sixth possible implementation of the first aspect, the method also includes:
Receive the resource-sharing request that Secondary resource node is initiated;Verify the legitimacy of the resource-sharing request;True When the fixed resource-sharing request is legal, Secondary resource corresponding with resource-sharing request is synchronized to second money Source node.
In the embodiment of the present application, in the resource-sharing request for receiving other resource nodes, it is total that its resource can be verified The legitimacy for enjoying request can just give source synchronous to corresponding resource node when legal, can guarantee to provide in this way Source synchronize be it is safe, reduce illegal behavior, prevent resource from revealing.
Second aspect, the embodiment of the present application provide a kind of resource sharing system, which includes: first resource Node and Secondary resource node;
The first resource node is used to first resource being synchronized to the Secondary resource node;The Secondary resource node First money being stored in when creating the first resource in block chain network for calling preset audit interface to obtain The metadata in source;The Secondary resource node is also used to the correctness of the first resource according to the metadata validation.
In the embodiment of the present application, first resource is synchronized to Secondary resource by the first resource node in the shared resource system Node, Secondary resource node can get the corresponding metadata of first resource, so as to verify the correctness of first resource. Therefore, the resource node in the resource sharing system can verify resource according to metadata, realize examining for resource Meter property, guarantees the reliability of resource got.
The third aspect, the embodiment of the present application provide a kind of resource shared device, and described device includes for realizing first party The functional module of method described in face and its any possible implementation.
Fourth aspect, the embodiment of the present application provide a kind of readable storage medium storing program for executing, meter are stored on the readable storage medium storing program for executing Calculation machine program is realized when the computer program is run by computer such as the method for the method of first aspect and first aspect Arbitrarily may.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application will make below to required in the embodiment of the present application Attached drawing is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore should not be seen Work is the restriction to range, for those of ordinary skill in the art, without creative efforts, can be with Other relevant attached drawings are obtained according to these attached drawings.
Fig. 1 is shared system structural schematic diagram provided by the embodiments of the present application;
Fig. 2 is resource node structural schematic diagram provided by the embodiments of the present application;
Fig. 3 is block chain network structural schematic diagram provided by the embodiments of the present application;
Fig. 4 is resource share method implementation flow chart provided by the embodiments of the present application;
Fig. 5 is the first implementation flow chart of resource share method provided by the embodiments of the present application;
Fig. 6 is the functional module structure figure of resource shared device provided by the embodiments of the present application.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application is described.
It should also be noted that term " first ", " second " etc. are only used for distinguishing description, and cannot manage in the description of the present application Solution is indication or suggestion relative importance.
For the ease of the clearer technical solution introducing the embodiment of the present application and being proposed, the embodiment of the present application first answers it It is introduced with scene.
Fig. 1 is please referred to, is a kind of shared system structural schematic diagram provided by the embodiments of the present application, as shown in Figure 1, this is shared System 10 includes multiple resource nodes (such as resource node 11, resource node 12, resource node 13), the shared system 10 setting There is service API (Application Programming Interface, application programming interface), service API can belong to In shared system 10, it is also possible to the service API of individualism.In the bottom of service API, encapsulate by several block chain nodes The block chain network of composition, each resource node can be by calling service API to interact with block chain network.Each resource The shared of resource is realized in the synchronization for carrying out resource between node by resource transport protocol, and each resource node both can be used as Resources requesting party can also be used as source synchronous side.Wherein, the interface that can integrate multiple and different functions in API is serviced, such as The establishing resource interface used to store metadata in establishing resource;When verifying resource for obtaining the audit interface of metadata Deng being not limited to an individual interface.
Wherein, the resource proposed for the embodiment of the present application, including be data resource and file resource two types Resource.Data resource refers to the resource of type of database, i.e., resource internal record is one or more databases;File It is one or more any type of files that resource, which refers to inside resource,.Each of shared system resource node all can serve as Resources requesting party or all sides of resource.
It referring to figure 2., is the inside structure schematic diagram of resource node provided by the embodiments of the present application, a resource node can To be that perhaps tissue is provided with database (component containing binlog), among database in enterprise or organization internal for an enterprise Part, file system level of abstraction, distributed document storage service, Peer-web (a kind of communication component), browser.Wherein, it browses Device can be understood as client, i.e., operating platform used by a user, the browser may be mounted at computer, mobile phone, plate etc. On electronic equipment.It is the customized component of internal system, function is as whole system about Peer-web component User's interactive entrance and external interactive entrance, the interaction of user and system all pass through this component and complete.
It can be seen that being abstracted the components such as Peer-web inside resource node, each resource node is allowed to share resource It does not need to pay additional development cost, the flexible control to resource can be realized.
Wherein, browser is used for user's accessing system, and the creation and request money of resource can be carried out after accessing system Source.Certainly, user wants accessing system, needs register account number, and the registration information of user can store in the server after register account number, It is subsequent to can be carried out logging in, to initiate to interact.Since there are two types of the resources of type, so in enterprise or organization internal, It is provided with database and database middleware resource for storing data;It is provided with file system level of abstraction and distributed document is deposited Storage service is used for storage file resource.For distributed document storage service, it can be understood as file is carried out distributed deposit Storage, it is assumed that there is multiple host to be stored in each copy then file can be backed up for storage file in enterprise On different hosts, accordingly even when a host goes wrong, the file of storage will not be lost.In addition, peer-web is also used In with other resource nodes carry out resource it is synchronous, and call service API interacted with block chain network.It is provided about data The specific creation mode and sharing mode of source and file resource are discussed in detail in postorder embodiment.
It referring to figure 3., is block chain network structural schematic diagram provided by the embodiments of the present application, several block chain nodes are usual It is deployed at several trust authorities, forms alliance's chain, each block chain node can save relevant data.Block chain network Including intelligent contract, account book (Ledger).Transaction record in block chain is rendered as a key-value pair data record, all key assignments Pair state conversion record constitute the account book of block chain, account book have the characteristics that orderly with it is anti-tamper.State conversion is block The each block chain node participated in chain network submits chain code (Chaincode) to call the result generated.Each trade fair generates One group of assets key-value pair, these key-value pairs submit to account book as " creation ", " update " or " deletion ".Chain code (Chaincode) it is intelligent contract that block chain provides, is to service the medium that interacts with block chain of API.Service API can pass through SDK (Software Development Kit, software tool development kit) calls chain code (Chaincode) to be handed over account book Mutually, asset data is written on block chain, or takes out the current state of assets from slip condition database.
Based on the shared system 10, referring to figure 4., it is assumed that resource node 11 is used as resource acquisition side, and resource node 12 is made For all sides of resource, may include: applied to the resource share method in the shared system 10
Step 100: resource node 12 creates first resource, and the metadata of first resource is stored in block chain network On.
Step 110: first resource is synchronized to resource node 11 by resource node 12.
Step 120: resource node 11 obtains the synchronous first resource of resource node 12.
Step 130: resource node 11 calls preset audit interface to obtain the first resource being stored in block chain network Metadata.
Step 140: resource node 11 is according to the correctness of metadata validation first resource.
Pass through the above-mentioned introduction to shared system 10, it can be seen that shared system 10 is the shared knot an of decentralization Structure does not need the switching plane in center, and each resource node can synchrodata.Resource node in the shared system 10 can To be verified according to the metadata being stored in block chain network to resource, realizes the auditing possibility of resource, guarantee to get Resource reliability.
It is resource-sharing side provided by the embodiments of the present application referring to figure 5. for the creation process of resource in step 100 First implementation flow chart of method, as shown in figure 5, the implementing procedure includes:
Step 201: resource node 12 obtains the asset creation request of user.It wherein, include user in asset creation request The resource to be created of selection and the metadata of resource to be created.
Step 202: resource node 12 stores resource to be created, and the metadata of resource to be created is stored in area In block chain network.
In the embodiment of the present application, each resource node can be requested according to the asset creation of user, complete the creation of resource, And the metadata of resource to be created can be also stored in block chain network during creation.Therefore, there are other resources When node requests the resource, the corresponding metadata of the resource can also be obtained from block chain network, is audited to it, realize The auditing possibility of resource.
In step 201, the mode that user initiates asset creation request may is that through browser or other clients Log on to shared system 10, after login, user selects resource to be created by corresponding option, is then filled out money to be created Then the metadata in source clicks the initiation for the similar option such as submitting or completing complete asset creation request.For metadata, It may include: the cryptographic Hash of the description of the title, resource of resource, resource, metadata is a kind of for describing the number of data attribute According to, in the embodiment of the present application, can be used as description Resource Properties data.Certainly, metadata includes, but are not limited to this Shen Please embodiment proposed, can also be any other data that can be used in resource definition attribute.Wherein, money to be created Source can be understood as sharable resource.
For resource described in the embodiment of the present application, preamble by the agency of mistake, may include two kinds of resource, because This, when user selects resource to be created, it is also an option that the type of the resource created.
In step 202, since resource to be created may be file resource or data resource, for difference The storage mode of resource be also slightly different, it is introduced separately below.
It, can be with if user has selected a listed files when the resource to be created that user selects is file type resource Directly stored.In shared system 10, it is provided with file abstraction layer interface, file abstraction layer interface is one abstract SDK (Software Development Kit, software tool development kit).By being abstracted connecing to the operation of file for standard Mouthful, such as Read, Write, Seek, packaging bottom layer distributed file system is realized.The different distribution text of the docking that can be convenient Part storage, such as HDFS (Hadoop Distributed File System, distributed file system), BFS (Baidu File System, Baidu's file system) etc..When needing to replace bottom distributed storage, using file abstraction layer interface, can accomplish Using unaware.Therefore, resource node 12 can call directly file system abstraction layer interface and file resource is saved in distribution In formula file storage service.
When the resource to be created that user selects is data resource, such as user's selection is database to be sharing, first After converting the corresponding file resource of data resource for data resource, then corresponding file resource stored.
For specifically converting and storing process, possible implementation: what it is when user's selection is some database, resource Node 12 is converted into corresponding file by the binlog message of correspondence database, by database middleware, then is taken out by file As file is finally saved in distributed storage service by layer interface.Database middleware is an abstract tool assembly, is made With being the binlog for parsing database, file storage is converted into distributed document storage service by binlog.In addition, data Library middleware can also parse binlog file from distributed document storage service, restore the data in database.
Regardless of the resource of type, all it is finally to be stored by distributed document storage service, passes through distribution Formula file storage service storage resource, will be in resource storage to different equipment or host, it is ensured that resource will not lose.
Certainly, in practice, resource to be created can also be carried out to the storage of other modes, such as centralization is deposited Storage.
In addition to storing good resource to be created, memory node 12 is also by the corresponding metadata storage of resource to block link network On network, synchronous with storage resource it can will be carried out in metadata to block chain network, it can also be to get request to create laggard Row, it is not limited here.It may include: that calling establishing resource interface passes through by metadata storage to the process in block chain network Intelligent contract in block chain network is interacted with the account book in block chain network, metadata to be written on account book.
It is understood that being integrated with multiple functional interfaces in service API, an establishing resource interface can be set and use It is interacted with block chain network when storing metadata in resource node 12.Since the state of all key-value pairs converts record group At the account book of block chain, and the conversion of each next state be participated in system each side submit intelligent contract call generate as a result, Therefore, by calling intelligent contract that data can be written into block chain account book or extracting data.Resource node 12 calls Establishing resource interface, establishing resource interface recall intelligent contract, call the mode of intelligent contract can be and pass through establishing resource The SDK installed on interface is called, and after calling successfully, the metadata that user fills in can be written into account book, and then complete It stores metadata in block chain network.
In addition, each resource can have a unique resource ID (Identification, identity), i.e. identity, When the metadata of storage resource and storage resource, resource ID can be stored together with resource and resource metadata, it can For locating resource.Wherein, resource ID can be used as a part of metadata, be also possible to be separately provided and metadata pair It should store in block chain network.
By storing metadata in block chain account book, block chain account book is used to record the state conversion of key-value pair, Have the characteristics that it is orderly and anti-tamper, it can be ensured that the metadata being stored on account book will not change, and then being capable of conduct The foundation of verify data.
After the creation for completing resource, in 11 side of resource node, step 120- step 130 can be executed, in resource node 11 After getting the synchronous first resource of resource node 12, preset audit interface can be called to obtain the corresponding first number of first resource According to.Compared with prior art, needed for resource node 11 in the prior art can only get oneself by interface or pre-set programs Resource, can not audit to it, and the resource node 11 of the embodiment of the present application can be according to being stored in block chain network Metadata first resource is verified, realize the auditing possibility of resource, guarantee the reliability of first resource got.
In the step 120, resource node 11 gets the synchronous first resource of resource node 12.For the first resource, The resource that can be 11 request of resource node is also possible to the resource of 12 active synchronization of resource node.
The first is possible, if the resource of 11 request of resource node, prior to step 110, this method further include: money The resource request of the reception user of source node 11;In the not corresponding first resource of resource node 11, asked according to the resource Resource-sharing is sought survival into request;Resource-sharing request is sent to resource node 12.Resource node 12 is receiving the resource request First resource is synchronized to resource node 11 again afterwards.As an example it is assumed that Liang Ge enterprise is business partner, Liang Ge enterprise Client is shared, but, if one of enterprise finds that a client is more high-quality, is thought for different demands for services It is to be understood that the related data of the client, the data of the client has in another enterprise there just, at this point, the enterprise can be to Another enterprise proposes the request of the resources sharing of client, and then another enterprise is synchronized to separately by the corresponding method of synchronization again One enterprise, makes another enterprise also possess the data of the client.
By this possible mode, only when there is corresponding resource request, isochronous resources are just requested, can reduce altogether The pressure for enjoying resource node improves the efficiency of resource-sharing.
In addition, in order to guarantee the safety of resource-sharing, resource node 12 can also be right in the first possible mode The request of resource node 11 is verified, and after being verified, just carries out the synchronization of resource, therefore, after initiating request, the party Method further include: resource node 12 receives the resource-sharing request that resource node 11 is initiated;Resource node 12 is verified resource-sharing and is asked The legitimacy asked;When it is legal for determining resource-sharing request, first resource corresponding with resource-sharing request is synchronized to money Source node 11.
Wherein, when verifying the legitimacy of resource-sharing request, possible implementation: pass through verifying resource node 11 The legitimacy of authentication resource-sharing request.For example, it is assumed that the resource-sharing request that A enterprise initiates, B enterprise can verify A enterprise Whether industry is legitimate enterprise, whether A enterprise is proper enterprise, the similar enterprise etc. such as wrongful enterprise such as hacker's tissue.
After legitimacy by verifying resource-sharing request, corresponding resource is resynchronized, guarantees the safety of resource-sharing, Situations such as avoiding malice from revealing appearance.
Second possible, although resource node 11 does not request resource, resource node 12 is creating some resource When, it is believed that resource node 11 may have the demand using the resource, actively by the source synchronous to resource node 11.More than same It stating for example, one of enterprise finds a more good client, and has collected the related data of the client, due to The client is more high-quality, which just actively gives the related data synchronous sharing of the client to another enterprise.
By this possible mode, the instant sharing of resource can be realized, also can reduce to a certain extent altogether The pressure for enjoying node improves the efficiency of resource-sharing.
For resource node 12 by source synchronous to the mode of resource node 11, the embodiment of the present application provides a kind of possible Implementation: first resource can be synchronized to resource node 11 in confirmation by the owner of the resource node 12 as first resource Afterwards, representing resource node 11 is the node with first resource permission, and the node with first resource permission can have multiple.? That is resource node 11 can be added in a channel by resource node 12, channel is a kind of abstract permission isolation Mode can be mutually synchronized file between the node in the same channel, but only Resource Owner could more new resources text Part, such as only have resource node 12 that can just update resource file herein.In the same channel, synchronizing for resource is shared, It is to be diffused into other all nodes outward from Resource Owner, this is a kind of distributed file synchronization protocols, both be ensure that Efficient file synchronization, and node to be sharing will not be needed excessive because of resource and increase the pressure of Resource Owner's node.
In addition, the mode of isochronous resources is also slightly different based on different resource types.For the resource of file type, It is stored when storage according to distributed document storage service, so in synchronous documents resource, directly according to above-mentioned file Synchronous protocol synchronizes.
And for the resource of data type, when storage is first to be converted into file resource according still further to distributed document storage service It is stored, so in synchrodata resource, after the binlog file synchronization of database is to resource node 11, database Middleware can automatically parse corresponding document, finally restore data in database.
In step 130, for interface of auditing, it is to be understood that multiple functional interfaces are integrated in service API, Therefore an audit interface can be separately provided, is handed over when obtaining metadata with block chain network for resource node 11 Mutually.
In step 130, what resource node 11 obtained is that resource node 12 is stored in block chain when creating first resource A kind of mode of possible acquisition: metadata on network with resource node 12 when creating the resource of itself, stores metadata Mode it is corresponding.When obtaining, resource node 11 calls preset audit interface, which goes to call block chain network again In intelligent contract, then call block chain account book to take out the corresponding metadata of first resource by intelligent contract.Obtaining first When the corresponding metadata of resource, the corresponding metadata of first resource is found according to the resource ID of first resource.
After getting the corresponding metadata of first resource, resource node 11 can execute step 140, carry out testing for resource Card.The process of verifying may include: that the title of first resource, description and cryptographic Hash are compared with metadata, be compared To result;The correctness of the first resource is judged according to comparison result.
After getting first resource, the title, description and cryptographic Hash of first resource itself be it is known, can be by it It is compared with metadata.Such as: the title of file is compared either with or without change, if change, resource may be incorrect;It compares Whether the description of file changes, such as is the particulars of A client to the description of file originally, is X to the description of file now The particulars of client, then the resource is incorrect certainly;Or whether the cryptographic Hash of comparison file changes, if changing Resource is also incorrect certainly.
Whether after obtaining comparison result, it is correct to verify resource, after this authentication, can also be generated according to comparison result Verification result is fed back to resource node 12 by verification result, and resource node 12 can also be made further anti-according to verification result Feedback etc..Such as: if the title of file has altered, but the content of file itself is not changed in fact, being can be with It is used as correct resource, at this point, resource node 12 can make explanations to it, and announcing resource node 11, resource section The resource can be used in point 11 in turn.But a verifying generally speaking, is carried out to resource, it is ensured that the reliability of resource mentions The utilization rate of high resource.
It should be noted that either the creation of resource is either shared waits implementing procedures in above-mentioned introduction, it is suitable for altogether Enjoy any one resource node in system 10, it is assumed for example that resource node 13 is currently wanted to request a money to resource node 11 Source, then resource node 13 at this time is carried out implementing procedure performed by aforementioned resource node 11, before resource node 11 executes State implementing procedure performed by resource node 12.
In addition, all sides of resource can handle the demand of multiple resources requesting parties simultaneously in shared system 10.? That is resource node 12 is when resource node 11 and resource node 13 request first resource simultaneously, it can be same by first resource It walks to resource node 11 and resource node 13.
Fig. 6 is please referred to, the embodiment of the present application also provides a kind of resource shared device 300, which can be with Applied to any one resource node in multiple resource nodes in shared system 10, resource shared device 300 includes:
Obtain module 301: for obtaining the synchronous first resource of first resource node, the first resource node is described All sides of first resource;Processing module 302: it is deposited for calling preset audit interface to obtain when creating the first resource Store up the metadata of the first resource in block chain network;Authentication module 303: for according to the metadata validation The correctness of first resource.
Optionally, resource shared device 300 further includes receiving module: for receiving the resource request of user;Processing module 302 are also used in itself not first resource corresponding with the resource request, and it is total to generate resource according to the resource request Enjoy request;And resource-sharing request is sent to the first resource node.
Optionally, authentication module 303 is used for: by the title of the first resource, description and cryptographic Hash and first number According to being compared, comparison result is obtained;The correctness of the first resource is judged according to the comparison result.
Optionally, the asset creation request that module 301 is also used to obtain user is obtained;Include in the asset creation request The resource to be created of user's selection and the metadata of the resource to be created;Processing module 302 is also used to will be described to be created Resource is stored, and the metadata of the resource to be created is stored in the block chain network.
Optionally, processing module 302 is also used to that establishing resource interface is called to close by the intelligence in the block chain network It is about interacted with the account book in the block chain network, the metadata to be written on the account book.
Optionally, when the resource to be created that user selects is file type resource, processing module 302 is also used to directly It connects and stores the file type resource;When the resource to be created that user selects is data type resource, processing After module 302 is also used to by the data type resource conversion be the corresponding file resource of data resource, then the file provided Source is stored.
Optionally, receiving module is also used to receive the resource-sharing request of Secondary resource node initiation;Authentication module 303 is also For verifying the legitimacy of the resource-sharing request;Processing module 302 is also used to determining that the resource-sharing request is conjunction When method, Secondary resource corresponding with resource-sharing request is synchronized to the Secondary resource node.
Each embodiment and specific example in resource share method in previous embodiment are equally applicable to the dress of Fig. 6 It sets, by the aforementioned detailed description to resource share method, those skilled in the art are clear that the resource in Fig. 6 is total The implementation method of device is enjoyed, so this will not be detailed here in order to illustrate the succinct of book.
The embodiment of the present application also provides a kind of readable storage medium, calculating is stored on the computer readable storage medium Machine program, the computer program execute the step in the resource share method of any of the above-described embodiment when being run by computer.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, flow chart and block diagram in attached drawing Show the device of multiple embodiments according to the application, the architectural framework in the cards of method and computer program product, Function and operation.In this regard, each box in flowchart or block diagram can represent the one of a module, section or code Part, a part of the module, section or code, which includes that one or more is for implementing the specified logical function, to be held Row instruction.It should also be noted that function marked in the box can also be to be different from some implementations as replacement The sequence marked in attached drawing occurs.For example, two continuous boxes can actually be basically executed in parallel, they are sometimes It can execute in the opposite order, this depends on the function involved.It is also noted that every in block diagram and or flow chart The combination of box in a box and block diagram and or flow chart can use the dedicated base for executing defined function or movement It realizes, or can realize using a combination of dedicated hardware and computer instructions in the system of hardware.
In addition, each functional module in each embodiment of the application can integrate one independent portion of formation together Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function module It is stored in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) execute each embodiment the method for the application all or part of the steps. And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
The above description is only an example of the present application, the protection scope being not intended to limit this application, for ability For the technical staff in domain, various changes and changes are possible in this application.Within the spirit and principles of this application, made Any modification, equivalent substitution, improvement and etc. should be included within the scope of protection of this application.It should also be noted that similar label and Letter indicates similar terms in following attached drawing, therefore, once it is defined in a certain Xiang Yi attached drawing, then in subsequent attached drawing In do not need that it is further defined and explained.
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is any Those familiar with the art within the technical scope of the present application, can easily think of the change or the replacement, and should all contain Lid is within the scope of protection of this application.Therefore, the protection scope of the application shall be subject to the protection scope of the claim.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.

Claims (10)

1. a kind of resource share method, which is characterized in that the described method includes:
The synchronous first resource of first resource node is obtained, the first resource node is all sides of the first resource;
Preset audit interface is called to obtain first money being stored in block chain network when creating the first resource The metadata in source;
According to the correctness of first resource described in the metadata validation.
2. the method according to claim 1, wherein obtain the synchronous first resource of first resource node it Before, the method also includes:
Receive the resource request of user;
In itself not first resource corresponding with the resource request, resource-sharing is generated according to the resource request and is asked It asks;
Resource-sharing request is sent to the first resource node.
3. the method according to claim 1, wherein the metadata includes: the title of the resource, the money The description in source, the resource cryptographic Hash;According to the correctness of first resource described in the metadata validation, comprising:
The title of the first resource, description and cryptographic Hash are compared with the metadata, obtain comparison result;
The correctness of the first resource is judged according to the comparison result.
4. the method according to claim 1, wherein the method also includes:
Obtain the asset creation request of user;It include the resource to be created of user's selection in asset creation request and described The metadata of resource to be created;
The resource to be created is stored, and the metadata of the resource to be created is stored in the block chain network On.
5. according to the method described in claim 4, it is characterized in that, the metadata is stored in the block chain network, Include:
Call establishing resource interface by intelligent contract in the block chain network and the account book in the block chain network into Row interaction, the metadata to be written on the account book.
6. according to the method described in claim 4, it is characterized in that, the resource to be created include file type resource and/or Data type resource stores the resource to be created, comprising:
When the resource to be created that user selects is file type resource, directly the file type resource is deposited Storage;
It is that data provide by the data type resource conversion when the resource to be created that user selects is data type resource After the corresponding file resource in source, then the file resource stored.
7. the method according to claim 1, wherein the method also includes:
Receive the resource-sharing request that Secondary resource node is initiated;
Verify the legitimacy of the resource-sharing request;
When it is legal for determining the resource-sharing request, Secondary resource corresponding with resource-sharing request is synchronized to institute State Secondary resource node.
8. a kind of resource sharing system characterized by comprising first resource node and Secondary resource node;
The first resource node is used to first resource being synchronized to the Secondary resource node;
The Secondary resource node is for calling preset audit interface acquisition to be stored in block when creating the first resource The metadata of the first resource in chain network;
The Secondary resource node is also used to the correctness of the first resource according to the metadata validation.
9. a kind of resource shared device, which is characterized in that described device includes:
Obtain module: for obtaining the synchronous first resource of first resource node, the first resource node is first money All sides in source;
Processing module: block chain network is stored in when creating the first resource for calling preset audit interface to obtain The first resource metadata;
Authentication module: the correctness for the first resource according to the metadata validation.
10. a kind of readable storage medium storing program for executing, which is characterized in that be stored with computer program, the meter on the readable storage medium storing program for executing It executes when calculation machine program is run by computer such as the step in any the method for claim 1-7.
CN201910236503.1A 2019-03-26 2019-03-26 Resource share method and device, system, storage medium Pending CN110113375A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910236503.1A CN110113375A (en) 2019-03-26 2019-03-26 Resource share method and device, system, storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910236503.1A CN110113375A (en) 2019-03-26 2019-03-26 Resource share method and device, system, storage medium

Publications (1)

Publication Number Publication Date
CN110113375A true CN110113375A (en) 2019-08-09

Family

ID=67484666

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910236503.1A Pending CN110113375A (en) 2019-03-26 2019-03-26 Resource share method and device, system, storage medium

Country Status (1)

Country Link
CN (1) CN110113375A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112689300A (en) * 2021-03-16 2021-04-20 成都极米科技股份有限公司 Method, apparatus, system, and medium for managing application and execution unit
CN114124979A (en) * 2020-08-10 2022-03-01 中国移动通信有限公司研究院 Method and device for resource sharing between nodes and nodes

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107491343A (en) * 2017-09-08 2017-12-19 中国电子科技集团公司第二十八研究所 A kind of across cluster resource scheduling system based on cloud computing
CN107861720A (en) * 2017-11-17 2018-03-30 江苏中威科技软件系统有限公司 The processing method of block data chained file data
WO2018116230A1 (en) * 2016-12-23 2018-06-28 Pasumarthi Adityanand Hybrid blockchain based record management system
CN108763303A (en) * 2018-04-20 2018-11-06 广东省科技基础条件平台中心 Platform verification method, device, computer equipment and storage medium
CN109117660A (en) * 2017-06-22 2019-01-01 中思博安科技(北京)有限公司 A kind of data sharing method and system based on block chain and intelligent contract
CN109379418A (en) * 2018-10-09 2019-02-22 上海点融信息科技有限责任公司 Method, equipment and the storage medium of file based on block chain processing business system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018116230A1 (en) * 2016-12-23 2018-06-28 Pasumarthi Adityanand Hybrid blockchain based record management system
CN109117660A (en) * 2017-06-22 2019-01-01 中思博安科技(北京)有限公司 A kind of data sharing method and system based on block chain and intelligent contract
CN107491343A (en) * 2017-09-08 2017-12-19 中国电子科技集团公司第二十八研究所 A kind of across cluster resource scheduling system based on cloud computing
CN107861720A (en) * 2017-11-17 2018-03-30 江苏中威科技软件系统有限公司 The processing method of block data chained file data
CN108763303A (en) * 2018-04-20 2018-11-06 广东省科技基础条件平台中心 Platform verification method, device, computer equipment and storage medium
CN109379418A (en) * 2018-10-09 2019-02-22 上海点融信息科技有限责任公司 Method, equipment and the storage medium of file based on block chain processing business system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114124979A (en) * 2020-08-10 2022-03-01 中国移动通信有限公司研究院 Method and device for resource sharing between nodes and nodes
CN112689300A (en) * 2021-03-16 2021-04-20 成都极米科技股份有限公司 Method, apparatus, system, and medium for managing application and execution unit

Similar Documents

Publication Publication Date Title
US11182379B2 (en) DAG based methods and systems of transaction processing in a distributed ledger
CN110069908A (en) A kind of authority control method and device of block chain
US11356424B2 (en) Database synchronization system in high security zones using blockchain
CN104506487B (en) The credible execution method of privacy policy under cloud environment
CN102947797A (en) Online service access controls using scale out directory features
CN112287034B (en) Data synchronization method, equipment and computer readable storage medium
CN112883117B (en) Data synchronization method, equipment and computer readable storage medium
WO2023045617A1 (en) Transaction data processing method and apparatus, device and medium
CN109040024A (en) A kind of resource access right control method and system
KR102125784B1 (en) Verification method of voice recording data using blockchain
CN110113375A (en) Resource share method and device, system, storage medium
CN109241712B (en) Method and device for accessing file system
CN107659574A (en) A kind of data access control system
CN103685333A (en) Data synchronization method, terminal equipment, register server and web page server
CN117118640A (en) Data processing method, device, computer equipment and readable storage medium
CN112350982B (en) Resource authentication method and device
CN110858211A (en) Data storage method, device and system and storage medium
KR101597035B1 (en) Software Registration and Processing Method Using Hybrid Cloud-Based ICT Service System and Method thereof
CN112671777A (en) User identity authentication method, device and equipment
CN116708463B (en) Information processing method, device, equipment and medium based on multi-block chain
CN113987566B (en) HYPERLEDGER FABRIC-based internal bridging cross-chain method, device, equipment and medium
CN113836521B (en) Decentralized identity-based multiple identity management method and device
CN114374706B (en) Content security management method based on distributed architecture
WO2023134282A1 (en) Blockchain-based data processing method and apparatus, device, storage medium and program product
CN116938462A (en) Transaction processing method and device based on blockchain, equipment and 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190809