The content of the invention
The purpose of the present invention is to propose to the collage-credit data for being based on block chain is shared and transaction system, there is provided one can be by each sideThe collage-credit data shared system of no platform endorsement based on technology, can the side's of letting on easily shared data, andTechnically ensure that data are not abused, and ensure the rights and interests of data owner, and technically guarantee fairness, ensure that data are carriedDonor obtains certain income after shared data, and excitation participant shares more data.
For achieving the above object, it is described to levy the invention provides the collage-credit data based on block chain is shared and transaction systemThe shared network node for including at least two P2P with transaction system of letter data, the network node includes bottom block linkworkThe collage-credit data shared platform on the bottom block catenary system is united and operates in, the collage-credit data shared platform includes:
Data sharing module, for the shared reference metadata of data set provider;
Data query transaction modules, for demand data person reference metadata is inquired about, and for being handed over data set providerEasily;
Member management module, manages joining and departing from for user, and provides the safety of collage-credit data shared platform installation kitDistribution;
Block chain adaptation layer, for collage-credit data shared platform to be fitted into bottom block catenary system;
The data set provider calls data sharing module to upload reference metadata and carry out data record;The data are neededThe person of asking calls data query transaction modules to inquire about reference metadata, and is traded with data set provider, the reference transaction of generationData;The block chain adaptation layer is broadcasted reference metadata or reference transaction data, is obtaining the network more than 50%After node verification, newly-generated reference metadata or reference transaction data is stored into bottom block catenary system.
Preferably, the block chain adaptation layer includes common recognition algorithm adaptation module, data adaptation module and intelligent contractAdaptation module.
Preferably, the common recognition algorithm adaptation module goes out a set of common recognition the public of algorithm and connects using abstract common recognition algorithm abstractionMouthful, and according to underlying algorithm matching adapter;The adapter at least includes that work proves that algorithm adapter, rights and interests prove algorithmAdapter.
Preferably, the abstract model of the data adaptation module definition block chain data, and according to block chain data formIt is adapted to.
Preferably, the abstract model of the intelligent contract of the intelligent contract adaptation module definition, and according to the reality of intelligent contractExisting mode is adapted to.
Preferably, the step of data set provider shares reference metadata is as follows:
A) data set provider assembles reference metadata according to the form of definition, and calls the upload interface of data sharing moduleUpload reference metadata;
B) the data sharing module calls common recognition algorithm adaptation module to carry out data record, and the common recognition algorithm is fittedWith module according to selected common recognition algorithm, newly-generated block is periodically obtained;
C) the common recognition algorithm adaptation module is broadcasted reference metadata, is tested the network node more than 50% is obtainedAfter card, newly-generated reference metadata is deposited into newly-generated block, newly-generated block calls data adaptation module to writeEnter in block chain;
Final block information is returned to data sharing module, and the data sharing by algorithm adaptation module of d) knowing togetherFinal block information is returned to data set provider by module.
Preferably, the demand data person carries out as follows the step of data query is concluded the business:
A) demand data person according to demand data principal mark know generate hashed value, and according to principal mark know hashed value and demandThe type of data calls the query interface in data query transaction modules;
B) the data query transaction modules call data adaptation module, and the data adaptation module to be known according to principal markHashed value and the type queries of demand data be stored in reference metadata on local block chain;
C) reference metadata is returned to data query transaction modules, the data query transaction by the data adaptation moduleModule is by the reference metadata person that returns to demand data;
D) data set provider ID of the demand data person in the reference metadata for returning obtains data set providerPublic key, and according to the signature of data set provider in the public key verifications reference metadata of data set provider;
E) after public key verifications, demand data person going on an expedition data set provider partial data access interface of extract in cell dataList information;
F) demand data person sends access request, the data of access request according to data set provider partial data access interfaceIt is encrypted according to the public key of data set provider, wherein, principal mark knowledge, data type, data are included at least in the access requestDemander ID and demand data person sign.
G) after access request is received, the data set provider is decrypted with private key, extracts the data in inquiry requestDemander ID, and inquire about demand data in data according to the public key verifications of demand data person after the public key for obtaining demand data personThe signature of person;
H) after the data set provider is verified, according to complete collage-credit data, transaction value and data set providerSignature calls intelligent contract adaptation module to generate the intelligent contract of transaction;
I) after confirming to transaction value, the demand data person uses private key to the intelligent contract Signature Confirmation, andAnd the transaction data of generation is broadcast to each network node by the intelligent contract, test the network node more than 50% is obtainedAfter card, the data adaptation module is called to be written in block chain, and by the partial data person that is sent to demand data.
Preferably, the collage-credit data shared platform also includes key management distribution module, and mould is distributed in the key managementBlock is used to manage the corresponding relation between ID and public key, and the key management distribution module is additionally operable to generate key pair.
Preferably, the member management module is as follows to the addition management process of new user:
A) the new user for adding is needed to add request by existing user broadcast, existing user will after agreement or refusalAs a result it is broadcast to overall network node;
B) after the addition application of new user is agreed to more than the network node for defining quantity, request passes through, member's pipeReason module can generate unique ID for new user;
C) it is that new user generates a new key pair that the member management module will call key management distribution module, andConsign to new user;
D) public key of the new user informs all-network node by broadcast mode, and each network node is closeKey management distribution module records the corresponding relation between new ID and public key;
E) new user adds request using the private key signature of distribution, and is broadcast to all-network node, each network sectionPoint is received after addition request, is asked using adding described in corresponding public key verifications;
F) after being verified, complete new user and add.
Based on above-mentioned technical proposal, it is an advantage of the invention that:
The collage-credit data of the present invention is shared to use one believable collage-credit data of block chain technique construction with transaction systemShared and transaction platform, the collage-credit data is shared to use special Data Share System with transaction system, data query mechanism,Data trade mechanism, can attract collage-credit data owner and collage-credit data demander to use, so that collage-credit data supplierCertain economic compensation can be obtained in the case of data are protected, collage-credit data issuer can then obtain collage-credit data,Improve the air control level of oneself.
The collage-credit data of the present invention is shared can to form complementation with transaction system with existing collage-credit data, effectively expandCollage-credit data scope and the crowd of covering.The collage-credit data is shared to be built after success with transaction system, can partly solve meshThe incomplete problem of front credit system, can play good supplementary function, can preferably be bank, little Dai companies, consumptionFinance, network loan, big data company and other internet financial institution services were reduced because of exceeding that collage-credit data not exclusively causesPhase rate, improves business operational paradigm.
Specific embodiment
Below by drawings and Examples, technical scheme is described in further detail.
The collage-credit data of the present invention is shared to be formed with transaction system bottom based on block chain, and the block chain technology is a kind ofUsing decentralization and the technology of the reliability for removing trust mode collective one notebook data book of maintenance, it is needed in the system of letting onAny number of nodes, are associated in the data block of generation (block) using cryptography method by a string and are wrapped in each dataContained in certain hour system full detail exchange data, and generate data fingerprint for verify its information validity andThe next database block of link.
The block chain logic of Fig. 1 is illustrated to be to be briefly described one section in the middle of block chain.Wherein each block has sensingThe link of previous block, until the block for initially creating originates block;And each pen occurred on block catenary systemTransaction all can be present in some block, and by persistence.For example in block 54 link is contained, be linked to block 53;Link is contained in block 53, block 52 is linked to;Link is contained in block 52, block 51 is linked to, by that analogy, untilInitial original block.
On block catenary system, the working mechanism of block chain is explained by taking transaction data record process as an example, it can be effectiveGround solves the problems, such as dual consumption and Byzantium general.As shown in Fig. 2 its detailed process is as follows:
(1), last link of block chain is Owner1, and it adopts the previous transaction number of the public key verifications of Owner0According to;
(2), Owner1 signs the transaction data with the key of itself;
(3), transaction data is sent to Owner2 from Owner1, and to the whole network broadcast;
(4), transaction data needs the confirmation for obtaining enough multinodes when broadcast, can just be considered as transaction and complete;And that transaction data for stamping timestamp earliest in whole P2P networks is identified as being successfully transaction;
(5), conclude the business after success, data recorded in block.
A kind of technology stack of typical block chain is present embodiments provided, as shown in figure 3, including:
(1), Internet.P2P network technologies are typically adopted, therefore without central server in block chain network, ifAny one or more nodes are lost from block chain network, and data also will not lose, while including broadcast mechanism sumAccording to authentication mechanism, it is ensured that data transmission security and high efficiency.
(2), data Layer.Core is the data structure of data block and chain type, while the data for generating can all add the timeStamp, and hashing algorithm is used, prevent data to be tampered.AES (such as rivest, shamir, adelman) is also used simultaneously, to protectThe security of data and the privacy of user.
(3), common recognition layer.Common recognition mode can adopt proof of work, and it is that one kind is able to ensure that correct option is difficult to be obtainedTake, but a kind of mode being verified can be easy to, it is used to guarantee that the block for generating meets certain data characteristics, prevents numberAccording to being forged or distort.And rights and interests prove that mechanism is the mode that another is reached common understanding.Such as in the block linkwork of bit coinIn system, prove that " digging ore deposit " is based on the volume of holding of currency in the system of mechanism based on rights and interests.
(4), intelligent contract.Traditional contract refers to that both sides or multilateral accord do or do not do something to exchange some things for,Each party must trust can fulfil obligations each other.And intelligent contract need not trust each other, because intelligent contract is not only by codeIt is defined, is also to be enforced by code, it is fully automated and cannot intervene.
The present invention shares this field for collage-credit data, it is proposed that a kind of collage-credit data based on block chain is shared and hands overEasy system.Wherein, shared using the P2P of block chain, (i.e. peer-to-peer computer network is the collage-credit data with transaction system bottomA kind of Distributed Application framework for distributing task and workload between fellow, is that P2P computing model is formed in application layerA kind of networking or latticed form) network structure, each node contain the unique collage-credit data shared platform of this programme withAnd the bottom block catenary system of the block chain technology for using.
The invention provides the collage-credit data based on block chain is shared and transaction system, and as shown in Fig. 4~figure, the referenceData sharing includes the network node of at least two P2P with transaction system, and the network node includes bottom block catenary systemAnd collage-credit data shared platform on the bottom block catenary system is operated in, the collage-credit data shared platform includes:
Data sharing module, for the shared reference metadata of data set provider;
Data query transaction modules, for demand data person reference metadata is inquired about, and for being handed over data set providerEasily;
Member management module, manages joining and departing from for user, and provides the safety of collage-credit data shared platform installation kitDistribution;
Block chain adaptation layer, for collage-credit data shared platform to be fitted into bottom block catenary system.
The data set provider calls data sharing module to upload reference metadata and carry out data record;The data are neededThe person of asking calls data query transaction modules to inquire about reference metadata, and is traded with data set provider, the reference transaction of generationData;The block chain adaptation layer is broadcasted reference metadata or reference transaction data, is obtaining the network more than 50%After node verification, newly-generated reference metadata or reference transaction data is stored into bottom block catenary system.
As shown in fig. 6, the collage-credit data shared platform includes data sharing module, data query transaction modules, dataEvaluation module, member management module, key management distribution module and block chain adaptation layer.It is used to fit using block chain adaptation layerRealize with different bottom block chain technologies so that system can not rely on the specific block chain technology of bottom.
The collage-credit data of the present invention is shared to be included with the most crucial module of transaction system:Data sharing module and data queryTransaction modules, it is the core of whole system.Secondly, data evaluation module is used to evaluate data, it is possible to increase platformThe quality of data.Member management module and key management distribution module are basic modules, and block chain adaptation layer module can makeObtain this programme and do not rely on specific bottom block chain technical implementation way.
Preferably, the collage-credit data shared platform also includes key management distribution module, and mould is distributed in the key managementBlock is used to manage corresponding pass of the ID (including data set provider, demand data person or data evaluation person) between public keySystem, while it can also generate key pair, and secure distribution to associated user.
The block chain adaptation layer includes common recognition algorithm adaptation module, data adaptation module and intelligent contract adaptation mouldBlock.Preferably, the common recognition algorithm adaptation module goes out the common interface of a set of common recognition algorithm using abstract common recognition algorithm abstraction, andAccording to underlying algorithm matching adapter;The adapter at least includes that work proves that algorithm adapter, rights and interests prove algorithm adaptationDevice.Platform can take out the common interface of a set of common recognition algorithm, while different underlying algorithms are adapted to using different adapters,As shown in Figure 7.
The abstract common recognition algorithm mainly includes two abstraction interfaces:
a)ProofgenerateProof():The interface is used to generate to be proved, the proof is used in generation block;
b)Block generateBlock(Proof p,...args):Block is generated according to proof.
By taking the block chain technology for being derived from bit coin as an example, it generates the process that proof is exactly " digging ore deposit "." digging ore deposit "Exactly find a value with following characteristics:With SHA-256 hashed twice calculating after, obtain hashed value with several 0Beginning.The generateProof adaptation realizations of that bit coin block chain technology are exactly to find such value.And bit coin block chainGenerateBlock realize being exactly into a block and to be stored in block chain according to the hashed value dug and other data groupsIn.
Preferably, the abstract model of the data adaptation module definition block chain data, and according to block chain data formIt is adapted to.Bottom block chain data there is also different realizations, by the abstract model for defining block chain data, shield bottomDifference.Different adaptation modules are defined simultaneously is adapted to different block chain data forms, the block chain data lattice of such as bit coinFormula, the block chain data form in ether mill.
Preferably, the abstract model of the intelligent contract of the intelligent contract adaptation module definition, and according to the reality of intelligent contractExisting mode is adapted to.Likewise, bottom intelligence contract there is also different realizations, by the abstract mould of the intelligent contract of definitionType, shields the difference of bottom.The different intelligent contracts of different adaptation modules adaptations are defined simultaneously realizes technology, such as ether millIntelligent contract.
Being stored in bottom block chain mainly has three class data:Reference metadata, reference transaction data and reference evaluationData.Data structure substantially is as follows:
[type, data]
Wherein, type is used to identify the type of the data, can be represented with data dictionary.Data be then reference metadata,Reference transaction data or reference evaluating data, its schematic diagram is as shown in Figure 8.
In order to ensure the rights and interests of data owner, the collage-credit data for being stored in collage-credit data shared platform would is that reference unitData, form is as follows:
[type, principal mark knows hashed value, and partial data hashed value, data genaration timestamp, versions of data number, data are providedPerson ID, data set provider partial data access interface list information, data set provider signature]
For example:[001 (type), d84ec802c340723837c20aff27b8cafd (principal mark knowledge hashed value),73f56896e2be166695e47d6f91da80f7 (partial data hashed value), 61436073600000 (data genaration timesStamp), v0.0.1 (version number),
15Xgq5xjUf77ibHZkJu9qKPbw9jPKNeCt1 (data set provider ID),
https:(data set provider partial data is accessed //www.madailicai.com/api/users/ { id }/eduInterface list information),
IEYEARECAAYFAjdYCQoACgkQJ9S6ULt1dqz6IwCfQ7wP6i (data set provider signature)]
Wherein, d84ec802c340723837c20aff27b8cafd is the MD5 hashed values of someone ID card No..
73f56896e2be166695e47d6f91da80f7 is " ID card No.:The MD5 hashed values of previous graduate college ".
61436073600000 timestamps represent 2016-10-100:00:00.
IEYEARECAAYFAjdYCQoACgkQJ9S6ULt1dqz6IwCfQ7wP6i is that data set provider uses private key pairThe reference content metadata (not including signature section) carries out the value obtained after signature operation, and third party can be carried using dataThe public key of donor carries out verifying whether data have the data set provider to provide.
It is below reference metadata type explanation:
Type:The type of the collage-credit data can be represented with data dictionary, such as 0001 represents personal highest educational background.
Principal mark knows hashed value:Principal mark is known for the uniquely tagged data owner, such as personal identity card ID, and name adds handMachine number, Business Registration Number or unified social credibility code etc..The hash function (such as MD5) of principal mark knowledge standard is obtained onlyOne mark, the unique mark is irreversible, i.e., know from the anti-principal mark of releasing of unique mark.
Partial data hashed value:Data set provider can obtain reference partial data standard Hash functions (such as MD5)One hashed value, as digital signature, data access person can with this hashed value to verify data set provider after provideWhether initial data there is change.
Data genaration timestamp:For indicating time during data genaration, user is facilitated to be selected.
Versions of data number:Because the same initial data that same data set provider provides change over time, dataMay change, therefore be made a distinction with version number, for indicating the order of modification.
Data set provider ID:Equivalent to bit coin wallet address, for the unique identification data supplier in platform.
Data set provider partial data access interface list information:Data user needs to obtain complete initial dataWill by call data set provider provide interface, this interface message include |input paramete, interface access method and output knotReally.It is related to process of exchange in query script simultaneously, therefore can also includes data trade interface message.
Data set provider is signed:Data set provider can be signed using the key of oneself to the reference metadata shared,And data consumer can be verified using the public key of data set provider.
The collage-credit data shared platform is operated on bottom block catenary system, and by block chain adaptation layer bottom region is calledThe function of block catenary system.Wherein, data sharing module can provide a series of interface for the shared reference metadata of data set provider,Its idiographic flow is as shown in figure 9, comprise the following steps that:
A) data set provider assembles reference metadata according to form defined above.
B) data set provider calls the upload interface of data sharing module to upload reference metadata.
C) the data sharing module calls common recognition algorithm adaptation module to carry out data record.
D) the common recognition algorithm adaptation module periodically obtains block according to selected common recognition algorithm.
E) while algorithm adaptation module of knowing together can be broadcasted reference metadata, the network node more than 50% is being obtainedAfter checking, newly-generated reference metadata will be deposited into newly-generated block.
F) newly-generated block can finally call data adaptation module to be written in block chain.
Final block information is returned to data sharing module by algorithm adaptation module of g) knowing together.
H) final block information is returned to data set provider by data sharing module.
Further, data query transaction modules can provide a series of interface and inquire about reference metadata for demand data person,And be traded with data set provider, transaction results also can be deposited into bottom block catenary system.The form of transaction data is as follows:
[data set provider ID, demand data person ID, partial data hashed value, data trade timestamp, transaction value, numberSign according to supplier, demand data person signature]
Data set provider ID:Equivalent to bit coin wallet address, for the unique identification data supplier in platform.
Demand data person ID:Equivalent to bit coin wallet address, for the unique identification data demander in platform.
Partial data hashed value:The hashed value of the complete collage-credit data that data set provider provides.
Data trade timestamp:Hand over the incident time.
Transaction value:The price of data trade.
Data set provider is signed:Data set provider can use the key of oneself to transaction data (not including data set providerSignature and data demander signature) signed.
Demand data person signs:Demand data person can use the key of oneself to transaction data (not including data set providerSignature and data demander signature) signed.
Preferably, the demand data person is carried out the step of data query is concluded the business as shown in Figure 10, and its idiographic flow is as follows:
A) principal mark of demand data person data according to demand knows (such as identity card, corporate social credit Unicode), rawInto hashed value.
B) demand data person knows according to principal mark hashed value and the type of demand data, call in data query transaction modulesQuery interface.
C) data query transaction modules call data adaptation module, the hashed value that the data adaptation module is known according to principal markWith the type of demand data, the reference metadata being stored on local block chain is inquired about.
If d) inquiring corresponding reference metadata, reference metadata can be returned to number by block chain data adaptation moduleIt is investigated that asking transaction modules.
E) data query transaction modules can be by the reference metadata person that returns to demand data.
F) data set provider ID of the demand data person in the reference metadata for returning obtains data set providerPublic key;Specifically, the public key can be obtained by key management distribution module.Certainly, those skilled in the art are it is to be understood that instituteStating public key can also be by being manually entered or the usual manner such as mail is obtained.
G) signature of the demand data person according to data set provider in the public key verifications reference metadata of data set provider.
H) after data verification is correct, going on an expedition data set provider partial data of extract in cell data of demand data person is visitedAsk the list information of interface.
I) demand data person sends access request according to data set provider partial data access interface, the access requestPrincipal mark knowledge, data type, demand data person ID and demand data person signature is contained in data, the data of access request can use numberIt is encrypted according to the public key of supplier.
J) data set provider is received after inquiry request, is decrypted with private key.
K) data set provider extracts the demand data person ID in inquiry request, then obtains from key management distribution moduleThe public key of demand data person.In the same manner, data set provider can also be by being manually entered or the usual manner such as mail obtains dataThe public key of demander.
L) data set provider inquires about the signature of demand data person in data according to the public key verifications of demand data person.
M) after data set provider is verified, with complete collage-credit data, transaction value and data set provider signature etc.Information calls intelligent contract adaptation module to generate the intelligent contract of a transaction.
N) data set provider is by the intelligent contract person that issues demand data.
O) demand data person is to price after confirming, using intelligent contract Signature Confirmation of the private key to concluding the business.
P) the intelligent contract will generate a transaction data, be broadcast to each network node, treat that 51% node is trueAfter recognizing, after the checking of the network node more than 50% is obtained, the data adaptation module is called to be written in block chain.
Q) while the intelligent contract can be by the partial data person that issues demand data, and from the transfer of demand data person's account aboutDeposit volume completes transaction in data set provider account.
Further, the member management module is mainly responsible for joining and departing from for member, while it will also provide platform peaceThe secure distribution of dress bag.
Specifically, the member management module is as follows to the addition management process of new user:
A) the new user for adding is needed to add request by existing user broadcast, existing user will after agreement or refusalAs a result it is broadcast to overall network node;
B) after the addition application of new user is agreed to more than the network node for defining quantity, request passes through, member's pipeReason module can generate unique ID for new user;
C) it is that new user generates a new key pair that the member management module will call key management distribution module, andConsign to new user;
D) public key of the new user informs all-network node by broadcast mode, and each network node is closeKey management distribution module records the corresponding relation between new ID and public key;
E) new user adds request using the private key signature of distribution, and is broadcast to all-network node, each network sectionPoint is received after addition request, is asked using adding described in corresponding public key verifications;
F) after being verified, complete new user and add.
The member management module to user to leave management process as follows:
A) need the user for leaving to send out and be broadcast to overall network node;
B) network node for receiving message updates the local existing user profile list for preserving, including public key information;
C) while sending the user for confirming that message is left to needs;
D) need the user for leaving to disconnect grid, exit block chain.
The member management module is as follows to the secure distribution mode step of stage+module bag:
A) summary of calculating platform installation kit;
B) a new key is produced;
C) with the key to the stage+module packet encryption;
D) the stage+module bag can be by with passing to member in the way of under line or on line;
E) while key and summary are transmitted with other channel, such as special messenger's transmission under Email or line;
F) user is taken after stage+module bag and key, is decrypted;
G) carry out calculating stage+module bag using same method and make a summary, and be compared with the summary for obtaining;
If h) consistent, illustrate that installation kit is normal;If it is inconsistent, needing re-request to distribute.
The collage-credit data shared platform also includes data evaluation module, and the data evaluation module can provide a series of connecingMouthful, the data for the wall scroll data that provide data set provider or certain type are evaluated, and generate reference evaluating data.
The collage-credit data of the present invention is shared to use one believable collage-credit data of block chain technique construction with transaction systemShared and transaction platform, the collage-credit data is shared to use special Data Share System with transaction system, data query mechanism,Data trade mechanism, can attract collage-credit data owner and collage-credit data demander to use, so that collage-credit data supplierCertain economic compensation can be obtained in the case of data are protected, collage-credit data issuer can then obtain collage-credit data,Improve the air control level of oneself.
The collage-credit data of the present invention is shared can to form complementation with transaction system with existing collage-credit data, effectively expandCollage-credit data scope and the crowd of covering.The collage-credit data is shared to be built after success with transaction system, can partly solve meshThe incomplete problem of front credit system, can play good supplementary function, can preferably be bank, little Dai companies, consumptionFinance, network loan, big data company and other internet financial institution services were reduced because of exceeding that collage-credit data not exclusively causesPhase rate, improves business operational paradigm.
Finally it should be noted that:Above example is only to illustrate technical scheme rather than a limitation;To the greatest extentPipe has been described in detail with reference to preferred embodiment to the present invention, and those of ordinary skill in the art should be understood:StillThe specific embodiment of the present invention can be modified or equivalent is carried out to some technical characteristics;Without deviating from thisThe spirit of bright technical scheme, it all should cover in the middle of the technical scheme scope being claimed in the present invention.