Summary of the invention
A kind of resource transfers method and device and electronic equipment based on block chain that this specification embodiment provides:
According to this specification embodiment in a first aspect, providing a kind of resource transfers method based on block chain, the area
The corresponding relationship being stored in block chain between resource token and the digital digest of resource, which comprises
First operation system receives the request of Client-initiated resource transfers;Wherein, resource transfers request is will be described
The target resource that user is located at the second operation system is transferred to the request of first operation system;
First operation system is submitted to the block chain for the target resource carried in resource transfers request
The inquiry of token is traded;
The block chain is traded in response to the inquiry, and calling is published on the inquiry stated in the intelligent contract of block chain and patrols
Volume, it inquires in the block chain and whether stores digital digest corresponding with the target resource token, if the block chain
In store digital digest corresponding with the target resource token, the first operation system of Xiang Suoshu returns to the digital digest;
First operation system receives the corresponding digital digest of the target resource token that the block chain returns;
The digital digest is sent to second operation system by first operation system, and receives second industry
The corresponding target resource of the digital digest of business system transfer.
According to the second aspect of this specification embodiment, a kind of resource transfers method based on block chain, the area are provided
The corresponding relationship being stored in block chain between resource token and the digital digest of resource, which comprises
First operation system receives the request of Client-initiated resource transfers;Wherein, resource transfers request is will be described
The target resource that user is located at the second operation system is transferred to the request of first operation system;
The inquiry transaction for the target resource token carried in resource transfers request is submitted to the block chain;
Receive the corresponding digital digest of the target resource token that the block chain returns;
The digital digest is sent to second operation system, and receives the described of the second operation system transfer
The corresponding target resource of digital digest.
Optionally, the corresponding target resource of the digital digest of the second operation system transfer, specifically includes:
Second operation system calculates the digital digest of local resource to be confirmed;
If the digital digest of resource to be confirmed is identical as the digital digest of target resource, the resource to be confirmed is determined
For target resource;
Determining target resource is sent to first operation system.
Optionally, the method also includes:
The card of depositing that Client-initiated is directed to wait deposit card resource is received to request;
If described be located at this operation system wait deposit card resource, Xiang Suoshu block chain is submitted for described wait deposit card resource
Deposit card transaction;
The card resource token of depositing that the block chain is returned is sent to the user, so that the user deposits card by described
Resource token uses the resource for depositing card in other operation systems.
Optionally, the digital digest of the target resource are as follows:
For the content of the target resource;Alternatively, the unique information in the target resource content carries out hash meter
Obtained hash value.
According to the third aspect of this specification embodiment, a kind of resource transfers method based on block chain, the area are provided
The corresponding relationship being stored in block chain between resource token and the digital digest of resource, which comprises
Receive the inquiry transaction of the target resource token carried in the resource transfers request of the first operation system submission;Its
In, the resource transfers request is that Client-initiated will be transferred to first business positioned at the target resource of the second operation system
The request of system;
It trades in response to the inquiry, calling is published on the query logic stated in the intelligent contract of the block chain, looks into
It askes and whether stores digital digest corresponding with the target resource token in the block chain;
If storing digital digest corresponding with the target resource token, the first business of Xiang Suoshu in the block chain
System returns to the digital digest;So that the digital digest is sent to second business system by first operation system
System, and receive the corresponding target resource of the digital digest of the second operation system transfer.
Optionally, the method also includes:
Receive the target resource that second operation system is submitted deposits card transaction;Wherein, the target resource is located at institute
State the second operation system;
Card transaction is deposited in response to described, calls be published on block chain to deposit card logic, creates target resource token;
The digital digest of the target resource is calculated, and the number of the target resource token and the target resource is plucked
The corresponding relationship wanted is stored in the block chain;
The target resource token is returned to second operation system.
Optionally, the method also includes:
The snoop logic for being published on block chain is called, sends the whether expired prison of the target resource token to aging system
Listen request, target resource token described in the aging system periodicity poll, if the target resource token is more than default
Length has not been used, and the block chain is notified to do crash handling to the target resource token.
Optionally, the digital digest of the target resource are as follows:
For the content of the target resource;Alternatively, the unique information in the target resource content carries out hash meter
Obtained hash value.
Optionally, the method also includes:
The failure for target resource token that second operation system is submitted is received to trade;
It trades in response to the failure, calls and be published on the inactive logic of block chain, by the target resource token from having
Effect Status Change is failure state.
According to the fourth aspect of this specification embodiment, a kind of resource transfers device based on block chain, the area are provided
The corresponding relationship being stored between resource token and the digital digest of resource in block chain, described device include:
First receiving unit, the first operation system receive the request of Client-initiated resource transfers;Wherein, the resource transfers
Request is that the target resource that the user is located at the second operation system is transferred to the request of first operation system;
Unit is submitted in transaction, and Xiang Suoshu block chain is submitted for the target resource token carried in resource transfers request
Inquiry transaction;
Second receiving unit receives the corresponding digital digest of the target resource token that the block chain returns;
The digital digest is sent to second operation system, and receives second business by resource transfers unit
The corresponding target resource of the digital digest of system transfer.
Optionally, the resource transfers unit, specifically includes:
The digital digest is sent to second operation system by transmission sub-unit, so that second operation system
Calculate the digital digest of local resource to be confirmed;If the digital digest phase of the digital digest of resource to be confirmed and target resource
Together, the resource to be confirmed is determined as target resource;Determining target resource is sent to first operation system;
Receiving subelement receives the corresponding target resource of the digital digest of the second operation system transfer.
Optionally, described device further include:
Card subelement is deposited, the card of depositing that Client-initiated is directed to wait deposit card resource is received and requests;
Subelement is submitted, if described be located at this operation system wait deposit card resource, Xiang Suoshu block chain is submitted for described
Card of depositing wait deposit card resource is traded;
Transmission sub-unit, the card resource token of depositing that the block chain is returned is sent to the user, so that the user
Card resource token is deposited in other operation systems using depositing the resource of card by described.
Optionally, the digital digest of the target resource are as follows:
For the content of the target resource;Alternatively, the unique information in the target resource content carries out hash meter
Obtained hash value.
According to the 5th of this specification embodiment the aspect, a kind of resource transfers device based on block chain, the area are provided
The corresponding relationship being stored between resource token and the digital digest of resource in block chain, described device include:
Receiving unit receives the inquiry of the target resource token carried in the resource transfers request that the first operation system is submitted
Transaction;Wherein, the resource transfers request is described in Client-initiated will be transferred to positioned at the target resource of the second operation system
The request of first operation system;
Query unit is traded in response to the inquiry, is called and is published on looking into of stating in the intelligent contract of the block chain
Logic is ask, inquires in the block chain and whether stores digital digest corresponding with the target resource token;
Return unit, if digital digest corresponding with the target resource token is stored in the block chain, to institute
It states the first operation system and returns to the digital digest;So that the digital digest is sent to described by first operation system
Two operation systems, and receive the corresponding target resource of the digital digest of the second operation system transfer.
Optionally, described device further include:
Receiving subelement, receive the target resource that second operation system is submitted deposits card transaction;Wherein, the target
Resource is located at second operation system;
Subelement is created, deposits card transaction in response to described, calls be published on block chain to deposit card logic, creates target resource
Token;
Storing sub-units, calculate the digital digest of the target resource, and by the target resource token and the target
The corresponding relationship of the digital digest of resource is stored in the block chain;
Subelement is returned to, the second operation system of Xiang Suoshu returns to the target resource token.
Optionally, described device further include:
Subelement is monitored, the snoop logic for being published on block chain is called, sends the target resource token to aging system
Whether expired monitoring is requested, target resource token described in the aging system periodicity poll, if the target resource enables
Board has not been used more than preset duration, and the block chain is notified to do crash handling to the target resource token.
Optionally, the digital digest of the target resource are as follows:
For the content of the target resource;Alternatively, the unique information in the target resource content carries out hash meter
Obtained hash value.
Optionally, described device further include:
Fail receiving subelement, receives the failure for target resource token that second operation system is submitted and trades;
Failure change subelement, trades in response to the failure, the inactive logic for being published on block chain is called, by the mesh
It marks resource token and is changed to failure state from effective status.
According to the 5th of this specification embodiment the aspect, a kind of electronic equipment is provided, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to resource transfers method of any of the above-described based on block chain.
This specification embodiment provides a kind of resource transfers scheme based on block chain, can not for the resource of user
The case where direct cochain deposits card, the second operation system (operation system i.e. where resource) can be the target resource of user in advance
It is assured;Pass through the correspondence between the digital digest and corresponding target data token for storing target data in block chain
The mode of relationship deposits card indirectly;The target data token is the voucher that the second operation system assures user resources validity.Tool
Body, when user is needed in the first operation system using the target resource being located in the second operation system, by using institute
Target resource token is stated, is plucked by block chain query with the presence or absence of the corresponding number of target resource token by the first operation system
It wants;If it does, illustrating that target resource is necessary being, and then target resource is obtained to the second operation system, by the second industry
The target resource of user is transferred to the first operation system by business system.In this way, the not direct cochain of immediate targets resource deposits card, it can also
To utilize the side of the corresponding relationship between the digital digest and corresponding target data token for storing target data in block chain
Formula deposits card indirectly, to realize the resource transfers in different business systems (between i.e. insincere domain).
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all embodiments consistent with this specification.On the contrary, they are only and such as institute
The example of the consistent device and method of some aspects be described in detail in attached claims, this specification.
It is only to be not intended to be limiting this explanation merely for for the purpose of describing particular embodiments in the term that this specification uses
Book.The "an" of used singular, " described " and "the" are also intended to packet in this specification and in the appended claims
Most forms are included, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein is
Refer to and includes that one or more associated any or all of project listed may combine.
It will be appreciated that though various information may be described using term first, second, third, etc. in this specification, but
These information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not taking off
In the case where this specification range, the first information can also be referred to as the second information, and similarly, the second information can also be claimed
For the first information.Depending on context, word as used in this " if " can be construed to " ... when " or
" when ... " or " in response to determination ".
In some business scenarios, user is needed in the first operation system using the target resource in the second operation system
When, it is necessary to resource transfers are carried out, target resource is transferred to the first operation system from the second operation system.
It is insincere due to being considered as mutually between the second operation system and the first operation system;Therefore in order to solve insincere industry
Resource transfers between business system, can construct corresponding business block chain using block chain technology, and will occur in business
Business datum chain carries out depositing card.
However for business as resource transfers, it is understood that there may be certain limitations, such as resource to be transferred are related to user
Privacy, then in order to avoid privacy of user leakage, such resource is not suitable for direct cochain and deposits card.Therefore, how block is based on
Chain realizes that the resource transfers between insincere operation system are known as urgent problem to be solved.
For example, user is after preferential platform is got for the discount coupon of some commodity in online shopping mall, in online quotient
Consume discount coupon in city.Since preferential platform and online shopping mall are different platform, between user, online shopping mall, preferential platform
Form three insincere domains.The discount coupon is stored in preferential platform, and user can have operating rights to the discount coupon of oneself
Limit, such as check and write off, withdraw deposit, recycle.
If this discount coupon consumption service using block chain technology realize if, due to discount coupon cannot directly cochain deposit
Card, therefore discount coupon cannot be carried out on chain and check and write off to reduce.So how to be assured for the discount coupon that user shows, it is ensured that
Online shopping mall can accurately deduct when carrying out discount coupon consumption;And how to avoid the discount coupon malice weight of not cochain
Multiple deduction is problem to be solved.
In this specification embodiment, provide a kind of resource transfers scheme based on block chain, for user resource without
The case where direct cochain of method deposits card, the second operation system (operation system i.e. where resource) can provide in advance for the target of user
It is assured in source;Pass through pair between the digital digest and corresponding target data token for storing target data in block chain
The mode that should be related to deposits card indirectly;The target data token is the voucher that the second operation system assures user resources validity.
Specifically, when being needed in the first operation system as user using the target resource being located in the second operation system, by using
The target resource token whether there is the corresponding number of target resource token by block chain query by the first operation system
Abstract;If it does, illustrating that target resource is necessary being, and then target resource is obtained to the second operation system, by second
The target resource of user is transferred to the first operation system by operation system.In this way, the not direct cochain of immediate targets resource deposits card,
It can use the corresponding relationship between the digital digest and corresponding target data token that store target data in block chain
Mode deposits card indirectly, to realize the resource transfers in different business systems (between i.e. insincere domain).
In order to facilitate difference, the operation system for storing the target resource that user is worth is known as the second business in this specification
System;The operation system being directed to when by user using target resource is known as the first operation system.
With above-mentioned discount coupon, this resource is illustrated, and preferential platform can be understood as the second operation system;Online shopping mall
It can be understood as the first operation system.
The block chain described in this specification can specifically include privately owned chain, shared chain and alliance's chain etc., in this theory
Without being particularly limited in bright book.
For example, in one scenario, above-mentioned block chain specifically can be by total portion mechanism, branch, agency etc.
Alliance's chain as allied member's composition;The operator of alliance's chain can rely on alliance's chain, corresponding to dispose
Business;And described above as total portion mechanism of allied member, branch, agency it all can serve as above-mentioned business
A service node.Each service node can will be produced by itself or the information relevant to business that receives is to trade
Form issued in alliance's chain, and joining after the common recognition processing of the common recognition node in alliance's chain in the transaction
Distributed data base in alliance's chain is stored, and " cochain " for completing above-mentioned Transaction Information deposits card.
Wherein, it should be noted that transaction (Transaction) described in this specification refers to and passes through block
The client of chain creates, and a data for needing finally to be distributed in the distributed data base of block chain.
Usually there is point of the transaction of narrow sense and the transaction of broad sense in the transaction in block chain.The transaction of narrow sense refers to use
The value Transfer that family is issued to block chain;For example, transaction can be user and exist in traditional bit coin block chain network
One initiated in block chain transfers accounts.And the transaction of broad sense refers to the industry being intended to business that user issues to block chain
Business data;For example, operator can build alliance's chain based on actual business demand, rely on the deployment of alliance's chain it is some with
Unrelated other types of line service (for example, depositing card business, fake certification business etc.) of value Transfer, and in this kind of alliance's chain
In, transaction can be the service message or service request with business intention that user issues in alliance's chain.
Above-mentioned client may include any type of underlying services data stored using in block chain as data branch
Support, to realize the upper layer application of specific business function.
In block chain technology, block chain interior joint carries out operation to block and usually requires to rely on corresponding intelligent contract
(Smart contract).Such as the operations such as storage, modification, deletion are required to rely on intelligent contract in block chain.The intelligence
Can contract can be it is a kind of be intended to apply contract is propagated, verified or executed in a manner of information-based can be deployed on block chain
Computer protocol.By stating that service logic may be implemented to execute corresponding operating in intelligent contract.Intelligent contract allows
Do not have to carry out credible transaction in third-party situation.These transaction are traceable and irreversible.Intelligent contract, which is capable of providing, to be better than
The safety of traditional contracts method, and reduce other transaction costs relevant to contract.In general, intelligent contract can be and be deployed in area
Block chain node is local, can call corresponding intelligent contract when node needs to be implemented some movement, run intelligent contract with
The service logic stated in intelligent contract is executed, to obtain implementing result.
Below with reference to the method flow diagram of the indirect cochain of resource shown in FIG. 1, the method can be applied in resource transfers
In system.The resource transfers system may include the visitor that the different operation system of at least two, block catenary system and user use
Family end.
1, user initiates to deposit card request for target resource to the second operation system;
User can specify the target resource for needing to use between different business systems.It is carried in card request in general, this is deposited
There is the unique identifier of target resource, so that the second operation system can navigate to target money based on the unique identifier
Source.
2, the second operation system verifies target resource, to determine the target resource necessary being and effective.
Second operation system response Client-initiated deposits card request, it is necessary first to judge whether target resource is located at this business
System;It specifically, can be in local search with the presence or absence of the resource of the corresponding unique identifier;
If it does, further judging whether the resource is effective.In general, resource has a status data, if resource
Status data be it is effective, then illustrate that the resource is effective, can be used.
For example, usually there is a service life, if the discount coupon in service life for discount coupon
Effectively, invalid if the discount coupon outside service life.
When the second operation system determines that target resource is not present, or exist but invalid, then return to failure result to user,
Process terminates.
When the second operation system judge target resource exist and effectively, then can carry out step 2.2.
Preferably, before step 2.2, step 2.1 can also be performed.
2.1, lock onto target resource.
In target resource locking process, user can not carry out any operation to target resource.
2.2, the second operation system is submitted to block chain and deposits card transaction for target resource.
For target resource be located at the second operation system and it is effective in the case of, the second operation system can be submitted to block chain
Card transaction is deposited for target resource.
3, block chain creation target resource token, and by the digital digest of the target resource token and the target resource
Corresponding relationship stored in the block chain.
In a kind of implementation, depositing card transaction may include the digital digest of target resource.
Under which, the card of depositing that block chain receives the target resource that second operation system is submitted is traded;In response to institute
It states and deposits card transaction, call be published on block chain to deposit card logic, create target resource token;And by the target resource token with
The corresponding relationship of the digital digest of the target resource is stored in the block chain.
In another implementation, depositing card transaction may include target resource itself;
Under which, the card of depositing that block chain receives the target resource that second operation system is submitted is traded;In response to institute
It states and deposits card transaction, call be published on block chain to deposit card logic, create target resource token;Calculate the number of the target resource
Abstract, and the corresponding relationship of the target resource token and the digital digest of the target resource is carried out in the block chain
Storage.
It should be noted that regardless of mode, the digital digest of the target resource are as follows:
For the content of the target resource;Alternatively, the unique information in the target resource content carries out hash meter
Obtained hash value.
3.1, block chain returns to the target resource token to second operation system.
3.2, the second operation system unlocks target resource.
Second operation system unlocks target resource after receiving target resource token.
4, target resource token is supplied to user by the second operation system.
The card resource token of depositing that second operation system returns to the block chain is sent to the user, so that the user
Card resource token is deposited in other operation systems (such as the first operation system) using target resource by described.
5, block chain requests aging system, monitors target resource token.
Block chain, which calls, is published on the snoop logic of block chain, to aging system send the target resource token whether mistake
The monitoring of phase is requested.
5.1, aging system carries out timeliness detection for target resource token.
Target resource token described in the aging system periodicity poll, if the target resource token is more than default
Length has not been used, and the block chain is notified to do crash handling to the target resource token.
5.1.1, block chain sends target resource token failure notification to the second operation system.
6, the second operation system fails target resource.
Through the foregoing embodiment, it has been deposited indirectly in block chain and has demonstrate,proved the target money that user is stored in the second operation system
Source stores the corresponding relationship between the digital digest of target resource and target resource token.Also, user has possessed
Target resource token.Later, user can use the second operation system in other operation systems except the second operation system
In target resource, to trigger resource transfers process.
Further, on the basis of above-mentioned embodiment illustrated in fig. 1, the method flow diagram of resource transfers shown in Fig. 2 is please referred to
Introduce the resource transfers embodiment based on block chain.
1, user initiates resource transfers request to the first operation system;Wherein, the resource transfers request is by the use
The target resource that family is located at the second operation system is transferred to the request of first operation system.
It, can be by target when user needs to consume the target resource being located in the second operation system in the first operation system
Resource token fills in the first operation system, so that the first operation system executes subsequent step.
2, the first operation system is submitted to block chain for the target resource token carried in resource transfers request
Inquiry transaction.
First operation system can be submitted to the block chain after receiving the request of Client-initiated resource transfers and be directed to institute
State the inquiry transaction of the target resource token carried in resource transfers request.
3.1, digital digest corresponding with the target resource token whether is stored in block chain described in block chain query.
Block chain is traded in response to the inquiry, and calling is published on the query logic stated in the intelligent contract of block chain,
It inquires in the block chain and whether stores digital digest corresponding with the target resource token.
3.2, block chain returns to the digital digest inquired to the first operation system.
If storing digital digest corresponding with the target resource token, the first business of Xiang Suoshu in the block chain
System returns to the digital digest;
4, the digital digest is sent to second operation system by the first operation system.
First operation system, will after receiving the corresponding digital digest of the target resource token that the block chain returns
The digital digest is sent to second operation system.
5.1, the second operation system is anchored the corresponding target resource of the digital digest.
5.2, the second operation system returns to the resource information of the target resource of anchoring to the first operation system.
6.1, the first operation system determines whether target resource can be used based on resource information.
In general, operation system uses limitation there are some, if target resource meets the limitation item of operation system setting
Part then can be used.By taking aforementioned discount coupon as an example, the resource information of the target resource of return may include the use item of discount coupon
Part such as uses time, use scope (such as specified commodity);
If these use conditions meet, the first operation system just be can permit using discount coupon;Otherwise, the first business
System can not allow user to use discount coupon.
If 6.2, target resource is available, target resource is obtained to the second operation system.
First operation system can request the second operation system to do the transfer operation of target resource, to obtain the second business
The target resource of system transfer.
7.1, the failure for target resource token that the second operation system is submitted to block chain is traded.
Target resource token can be sent to the second operation system by the first operation system, so that the second operation system is to area
Block chain submits the failure transaction for carrying target resource token.
7.2, block chain does crash handling to target resource token.
Block chain receives the failure for target resource token that second operation system is submitted and trades;In response to described
Failure transaction, calls the inactive logic for being published on block chain, and the target resource token is changed to failure shape from effective status
State.
In this way, the process of entire resource transfers is completed.
Embodiment of the method for the application based on the first operation system is introduced below in conjunction with Fig. 3, which can be right
Answer Fig. 2, wherein the corresponding relationship being stored between resource token and the digital digest of resource in block chain, which comprises
Step 310: the first operation system receives the request of Client-initiated resource transfers;Wherein, the resource transfers request
Target resource for the user is located at the second operation system is transferred to the request of first operation system;
Step 320: Xiang Suoshu block chain submits looking into for the target resource token carried in resource transfers request
Ask transaction;
Step 330: receiving the corresponding digital digest of the target resource token that the block chain returns;
Step 340: the digital digest being sent to second operation system, and receives second operation system and turns
The corresponding target resource of the digital digest moved.
In one embodiment, the digital digest of the target resource are as follows:
For the content of the target resource;Alternatively, the unique information in the target resource content carries out hash meter
Obtained hash value.
In one embodiment, the corresponding target resource of the digital digest of the second operation system transfer, it is specific to wrap
It includes:
Second operation system calculates the digital digest of local resource to be confirmed;
If the digital digest of resource to be confirmed is identical as the digital digest of target resource, the resource to be confirmed is determined
For target resource;
Determining target resource is sent to first operation system.
In the embodiment, since digital digest has one-way, the second operation system can not be based on digital digest reverse push
Export target resource;Therefore it needs to be determined that local resource to be confirmed can be traversed, each is calculated and wait for really when target resource
Recognize the digital digest of resource;
If there is resource to be confirmed identical with the digital digest of target resource, then the resource to be confirmed can be true
It is set to target resource.
In one embodiment, the method also includes:
The card of depositing that Client-initiated is directed to wait deposit card resource is received to request;
If described be located at this operation system wait deposit card resource, Xiang Suoshu block chain is submitted for described wait deposit card resource
Deposit card transaction;
The card resource token of depositing that the block chain is returned is sent to the user, so that the user deposits card by described
Resource token uses the resource for depositing card in other operation systems.
The embodiment is to deposit card embodiment by the resource of executing subject introduction of the first operation system, and specific steps can
Resource, which is carried out, with second operation system with reference to shown in earlier figures 1 deposits card embodiment.The two is only executing subject difference.
Embodiment of the method for the application based on block catenary system is introduced below in conjunction with Fig. 4, which can correspond to
Fig. 2, wherein the corresponding relationship being stored in the block chain between resource token and the digital digest of resource, the method packet
It includes:
Step 410: the node device of block chain receives the mesh carried in the resource transfers request that the first operation system is submitted
Mark the inquiry transaction of resource token;Wherein, the resource transfers request is the mesh that Client-initiated will be located at the second operation system
Mark the request of resource transfers to first operation system;
Step 420: trading in response to the inquiry, calling is published on the inquiry stated in the intelligent contract of the block chain
Logic inquires in the block chain and whether stores digital digest corresponding with the target resource token;
Step 430: if storing digital digest corresponding with the target resource token, Xiang Suoshu in the block chain
First operation system returns to the digital digest;So that the digital digest is sent to described second by first operation system
Operation system, and receive the corresponding target resource of the digital digest of the second operation system transfer.
In one embodiment, the method also includes:
Receive the target resource that second operation system is submitted deposits card transaction;Wherein, the target resource is located at institute
State the second operation system;
Card transaction is deposited in response to described, calls be published on block chain to deposit card logic, creates target resource token;
The digital digest of the target resource is calculated, and the number of the target resource token and the target resource is plucked
The corresponding relationship wanted is stored in the block chain;
The target resource token is returned to second operation system.
The embodiment can deposit the implementation of card transaction with reference to the target resource submitted in earlier figures 1 about the second operation system
Example.
In one embodiment, the method also includes:
The snoop logic for being published on block chain is called, sends the whether expired prison of the target resource token to aging system
Listen request, target resource token described in the aging system periodicity poll, if the target resource token is more than default
Length has not been used, and the block chain is notified to do crash handling to the target resource token.
The embodiment can be with reference to step 5,5.1 and 5.1.1 in earlier figures 1.
In one embodiment, the digital digest of the target resource are as follows:
For the content of the target resource;Alternatively, the unique information in the target resource content carries out hash meter
Obtained hash value.
In one embodiment, the method also includes:
The failure for target resource token that second operation system is submitted is received to trade;
It trades in response to the failure, calls and be published on the inactive logic of block chain, by the target resource token from having
Effect Status Change is failure state.
The embodiment can be with reference to step 7.1 and 7.2 in earlier figures 2.
In conclusion this specification embodiment provides a kind of resource transfers scheme based on block chain, for user's
Resource can not direct cochain the case where depositing card, the second operation system (operation system i.e. where resource) can be in advance for user's
Target resource is assured;By in block chain store target data digital digest and corresponding target data token it
Between the mode of corresponding relationship deposit card indirectly;The target data token is that the second operation system assures user resources validity
Voucher.Specifically, when being needed in the first operation system as user using the target resource being located in the second operation system, pass through
It is corresponding with the presence or absence of the target resource token by block chain query by the first operation system using the target resource token
Digital digest;If it does, illustrating that target resource is necessary being, and then target resource is obtained to the second operation system, by
The target resource of user is transferred to the first operation system by the second operation system.In this way, the not direct cochain of immediate targets resource is deposited
Card also can use the corresponding pass between the digital digest and corresponding target data token that store target data in block chain
The mode of system deposits card indirectly, to realize the resource transfers in different business systems (between i.e. insincere domain)
Corresponding with the aforementioned resource transfers embodiment of the method based on block chain, this specification is additionally provided based on block chain
Resource transfers device embodiment.Described device embodiment can be by software realization, can also be by hardware or soft or hard
The mode that part combines is realized.It taking software implementation as an example, is the place by equipment where it as the device on a logical meaning
Computer business program instruction corresponding in nonvolatile memory is read into memory what operation was formed by reason device.From hardware layer
For face, as shown in figure 5, a kind of hardware structure diagram for this specification based on equipment where the resource transfers device of block chain,
Other than processor shown in fig. 5, network interface, memory and nonvolatile memory, setting where device in embodiment
For generally according to the resource transfers actual functional capability based on block chain, it can also include other hardware, this is repeated no more.
Fig. 6 is referred to, for the module map for the resource transfers device based on block chain that one embodiment of this specification provides, institute
It states device and has corresponded to embodiment illustrated in fig. 3, pair being stored between resource token and the digital digest of resource in the block chain
It should be related to, described device includes:
First receiving unit 510, the first operation system receive the request of Client-initiated resource transfers;Wherein, the resource
Transfer request is that the target resource that the user is located at the second operation system is transferred to the request of first operation system;
Unit 520 is submitted in transaction, and Xiang Suoshu block chain is submitted for the target resource carried in resource transfers request
The inquiry of token is traded;
Second receiving unit 530 receives the corresponding digital digest of the target resource token that the block chain returns;
The digital digest is sent to second operation system, and receives second industry by resource transfers unit 540
The corresponding target resource of the digital digest of business system transfer.
Optionally, the resource transfers unit 540, specifically includes:
The digital digest is sent to second operation system by transmission sub-unit, so that second operation system
Calculate the digital digest of local resource to be confirmed;If the digital digest phase of the digital digest of resource to be confirmed and target resource
Together, the resource to be confirmed is determined as target resource;Determining target resource is sent to first operation system;
Receiving subelement receives the corresponding target resource of the digital digest of the second operation system transfer.
Optionally, described device further include:
Card subelement is deposited, the card of depositing that Client-initiated is directed to wait deposit card resource is received and requests;
Subelement is submitted, if described be located at this operation system wait deposit card resource, Xiang Suoshu block chain is submitted for described
Card of depositing wait deposit card resource is traded;
Transmission sub-unit, the card resource token of depositing that the block chain is returned is sent to the user, so that the user
Card resource token is deposited in other operation systems using depositing the resource of card by described.
Optionally, the digital digest of the target resource are as follows:
For the content of the target resource;Alternatively, the unique information in the target resource content carries out hash meter
Obtained hash value.
Fig. 7 is referred to, for the module map for the resource transfers device based on block chain that one embodiment of this specification provides, institute
It states device and has corresponded to embodiment illustrated in fig. 4, pair being stored between resource token and the digital digest of resource in the block chain
It should be related to, described device includes:
Receiving unit 610 receives the target resource token carried in the resource transfers request that the first operation system is submitted
Inquiry transaction;Wherein, the resource transfers request is that the target resource for being located at the second operation system is transferred to by Client-initiated
The request of first operation system;
Query unit 620 is traded in response to the inquiry, is called to be published on and be stated in the intelligent contract of the block chain
Query logic is inquired in the block chain and whether stores digital digest corresponding with the target resource token;
Return unit 630, if storing digital digest corresponding with the target resource token in the block chain, to
First operation system returns to the digital digest;So that first operation system digital digest is sent to it is described
Second operation system, and receive the corresponding target resource of the digital digest of the second operation system transfer.
Optionally, described device further include:
Receiving subelement, receive the target resource that second operation system is submitted deposits card transaction;Wherein, the target
Resource is located at second operation system;
Subelement is created, deposits card transaction in response to described, calls be published on block chain to deposit card logic, creates target resource
Token;
Storing sub-units, calculate the digital digest of the target resource, and by the target resource token and the target
The corresponding relationship of the digital digest of resource is stored in the block chain;
Subelement is returned to, the second operation system of Xiang Suoshu returns to the target resource token.
Optionally, described device further include:
Subelement is monitored, the snoop logic for being published on block chain is called, sends the target resource token to aging system
Whether expired monitoring is requested, target resource token described in the aging system periodicity poll, if the target resource enables
Board has not been used more than preset duration, and the block chain is notified to do crash handling to the target resource token.
Optionally, the digital digest of the target resource are as follows:
For the content of the target resource;Alternatively, the unique information in the target resource content carries out hash meter
Obtained hash value.
Optionally, described device further include:
Fail receiving subelement, receives the failure for target resource token that second operation system is submitted and trades;
Failure change subelement, trades in response to the failure, the inactive logic for being published on block chain is called, by the mesh
It marks resource token and is changed to failure state from effective status.
System, device, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity,
Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can
To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment
The combination of any several equipment.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize this specification scheme.Those of ordinary skill in the art are not
In the case where making the creative labor, it can understand and implement.
Figure 6 above describes inner function module and the structural representation of the resource transfers device based on block chain, essence
On executing subject can be a kind of electronic equipment, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
First operation system receives the request of Client-initiated resource transfers;Wherein, resource transfers request is will be described
The target resource that user is located at the second operation system is transferred to the request of first operation system;
The inquiry transaction for the target resource token carried in resource transfers request is submitted to the block chain;Its
In, the corresponding relationship that is stored in the block chain between resource token and the digital digest of resource;
Receive the corresponding digital digest of the target resource token that the block chain returns;
The digital digest is sent to second operation system, and receives the described of the second operation system transfer
The corresponding target resource of digital digest.
Optionally, the corresponding target resource of the digital digest of the second operation system transfer, specifically includes:
Second operation system calculates the digital digest of local resource to be confirmed;
If the digital digest of resource to be confirmed is identical as the digital digest of target resource, the resource to be confirmed is determined
For target resource;
Determining target resource is sent to first operation system.
Optionally, further includes:
The card of depositing that Client-initiated is directed to wait deposit card resource is received to request;
If described be located at this operation system wait deposit card resource, Xiang Suoshu block chain is submitted for described wait deposit card resource
Deposit card transaction;
The card resource token of depositing that the block chain is returned is sent to the user, so that the user deposits card by described
Resource token uses the resource for depositing card in other operation systems.
Optionally, the digital digest of the target resource are as follows:
For the content of the target resource;Alternatively, the unique information in the target resource content carries out hash meter
Obtained hash value.
Figure 7 above describes inner function module and the structural representation of the resource transfers device based on block chain, essence
On executing subject can be a kind of electronic equipment, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
Receive the inquiry transaction of the target resource token carried in the resource transfers request of the first operation system submission;Its
In, the resource transfers request is that Client-initiated will be transferred to first business positioned at the target resource of the second operation system
The request of system;
It trades in response to the inquiry, calling is published on the query logic stated in the intelligent contract of the block chain, looks into
It askes and whether stores digital digest corresponding with the target resource token in the block chain;Wherein, it is deposited in the block chain
Contain the corresponding relationship between resource token and the digital digest of resource;
If storing digital digest corresponding with the target resource token, the first business of Xiang Suoshu in the block chain
System returns to the digital digest;So that the digital digest is sent to second business system by first operation system
System, and receive the corresponding target resource of the digital digest of the second operation system transfer.
Optionally, further includes:
Receive the target resource that second operation system is submitted deposits card transaction;Wherein, the target resource is located at institute
State the second operation system;
Card transaction is deposited in response to described, calls be published on block chain to deposit card logic, creates target resource token;
The digital digest of the target resource is calculated, and the number of the target resource token and the target resource is plucked
The corresponding relationship wanted is stored in the block chain;
The target resource token is returned to second operation system.
Optionally, further includes:
The snoop logic for being published on block chain is called, sends the whether expired prison of the target resource token to aging system
Listen request, target resource token described in the aging system periodicity poll, if the target resource token is more than default
Length has not been used, and the block chain is notified to do crash handling to the target resource token.
Optionally, the digital digest of the target resource are as follows:
For the content of the target resource;Alternatively, the unique information in the target resource content carries out hash meter
Obtained hash value.
Optionally, further includes:
The failure for target resource token that second operation system is submitted is received to trade;
It trades in response to the failure, calls and be published on the inactive logic of block chain, by the target resource token from having
Effect Status Change is failure state.
In the embodiment of above-mentioned electronic equipment, it should be appreciated that the processor can be central processing unit (English:
Central Processing Unit, referred to as: CPU), can also be other general processors, digital signal processor (English:
Digital Signal Processor, referred to as: DSP), specific integrated circuit (English: Application Specific
Integrated Circuit, referred to as: ASIC) etc..General processor can be microprocessor or the processor is also possible to
Any conventional processor etc., and memory above-mentioned can be read-only memory (English: read-only memory, abbreviation:
ROM), random access memory (English: random access memory, abbreviation: RAM), flash memory, hard disk or solid
State hard disk.The step of method in conjunction with disclosed in the embodiment of the present invention, can be embodied directly in hardware processor and execute completion, or
Hardware and software module combination in person's processor execute completion.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.It is set especially for electronics
For standby embodiment, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to method reality
Apply the part explanation of example.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to this specification
Other embodiments.This specification is intended to cover any variations, uses, or adaptations of this specification, these modifications,
Purposes or adaptive change follow the general principle of this specification and undocumented in the art including this specification
Common knowledge or conventional techniques.The description and examples are only to be considered as illustrative, the true scope of this specification and
Spirit is indicated by the following claims.
It should be understood that this specification is not limited to the precise structure that has been described above and shown in the drawings,
And various modifications and changes may be made without departing from the scope thereof.The range of this specification is only limited by the attached claims
System.