Summary of the invention
A kind of application authorization method and device and electronic equipment based on block chain that this specification embodiment provides:
According to this specification embodiment in a first aspect, provide it is a kind of based on block chain apply authorization method,
Authoring system receives the authorized application for target application platform that target application is initiated;
It submits to block chain for the authorization transaction for carrying power token really in the authorized application;
Receive the calling token for being used to call the target application platform that the block chain returns;
The calling token is sent to target application, so that the target application passes through described in calling token calling
Target application platform performance objective business.
Optionally, the method also includes:
The target application platform after receiving the calling token that the target application provides, to the calling token into
Row verification;
If verification passes through, the target service of the target application is executed.
Optionally, described that the calling token is verified, it specifically includes:
The calling token that the target application is provided is compared with the calling token that the block chain is sent;
If two calling tokens are consistent, determine that verification passes through.
Optionally, the method also includes:
It receives target application and initiates power request really;
It is submitted to block chain and weighs transaction really for the application parameter carried in the true power request;
By the block chain return based on application parameter generate really power token be sent to the target application.
Optionally, the method also includes:
Receive the termination authorization requests that target application is initiated;
It submits to block chain for the termination authorization transaction for weighing token really is carried in the termination authorization requests, with failure
It is stored in the true power token of the block chain.
According to the second aspect of this specification embodiment, a kind of application authorization method based on block chain is provided,
What the node device reception authoring system of block chain was submitted is directed to the authorization for carrying in authorized application and weighing token really
Transaction;Wherein, the authorized application is the authorization requests for target application platform that target application is initiated;
It trades in response to the authorization, calling is published on the authorization logic stated in the intelligent contract of the block chain, looks into
It askes and whether stores the confirmation token in the block chain;
If inquiring the confirmation token, the calling token of target application is created, described in Xiang Suoshu authoring system is sent
Call token;So that the target application calls the target application platform performance objective business by the calling token.
Optionally, the method also includes:
The calling token is sent to the target application platform, so that the target application platform is receiving the mesh
After the calling token that mark application provides, compare two calling tokens;
If two calling tokens are consistent, the target service of the target application is executed.
Optionally, the method also includes:
It receives the target application that is directed to that the authoring system is submitted and weighs transaction really;
It trades in response to the true power, calling, which is published in the intelligent contract of the block chain, to be stated to weigh logic really, is created
It builds the target application and weighs token really, the true power token is sent to the authoring system.
Optionally, the method also includes:
Receive the authoring system submission enters transaction for target application;
Transaction is entered in response to described, the audit of entering stated in the intelligent contract being published on the block chain is called to patrol
Volume;Wherein, described to enter audit logic are as follows: a ballot event, auditing party's prison of the block chain are written in transaction log
After hearing the ballot event, the qualification information of target application is audited, and is submitted to the intelligent contract comprising audit
As a result vote trading;The intelligence contract carries out vote trading to summarize arrangement, obtains final auditing result.
Optionally, the method also includes:
Receive the termination authorization transaction for calling token that the authoring system is submitted;
It authorizes and trades in response to the termination, calling is published on block end stopping of chain authorization logic, will be stored in the area
The calling token of block chain is changed to failure state from effective status.
Optionally, the method also includes:
The billing logic for being published on block chain is called, calls the charged party in block chain to calculate the calling token and corresponds to mesh
The bill of application is marked, and billing invoice cochain is deposited into card.
Optionally, the block chain includes alliance's chain.
According to the third aspect of this specification embodiment, a kind of application authorization device based on block chain is provided,
First receiving unit, authoring system receive the authorized application for target application platform that target application is initiated;
Unit is submitted in transaction, is submitted to block chain for the authorization transaction for carrying power token really in the authorized application;
Second receiving unit receives the calling token for being used to call the target application platform that the block chain returns;
Using authorization unit, the calling token is sent to target application, so that the target application passes through the tune
The target application platform performance objective business is called with token.
Optionally, described device further include:
Subelement is verified, the target application platform is after receiving the calling token that the target application provides, to institute
It states and token is called to be verified;
Subelement is executed, if verification passes through, executes the target service of the target application.
Optionally, the verification subelement, specifically includes:
Comparing subunit, the calling token for calling token and the block chain to send that the target application is provided carry out
Compare;
It determines subelement, if two calling tokens are consistent, determines that verification passes through.
Optionally, described device further include:
Using true power subelement, receives target application and initiate power request really;It submits to block chain and is asked for the true power
The application parameter of middle carrying is asked to weigh transaction really;Power token transmission really is generated based on application parameter by what the block chain returned
To the target application.
Optionally, described device further include:
Authorization subelement is terminated, the termination authorization requests that target application is initiated are received;It is submitted to block chain and is directed to the end
The termination authorization transaction for weighing token really is carried in authorization requests, only with the true power order for being stored in the block chain of failing
Board.
According to the fourth aspect of this specification embodiment, a kind of application authorization device based on block chain is provided,
Receiving unit, the node device of block chain receive the power really that carries that is directed in authorized application that authoring system is submitted and enable
The authorization of board is traded;Wherein, the authorized application is the authorization requests for target application platform that target application is initiated;
Query unit is traded in response to the authorization, is called and is published on awarding of stating in the intelligent contract of the block chain
Logic is weighed, inquires in the block chain and whether stores the confirmation token;
Authorization unit creates the calling token of target application, Xiang Suoshu authoring system if inquiring the confirmation token
Send the calling token;So that the target application calls the target application platform performance objective by the calling token
Business.
Optionally, described device further include:
Business execution unit, Xiang Suoshu target application platform sends the calling token, so that the target application platform
After receiving the calling token that the target application provides, compare two calling tokens;If two calling tokens are consistent, hold
The target service of the row target application.
Optionally, described device further include:
Using true power subelement, receives the target application that is directed to that the authoring system is submitted and weigh transaction really;In response to institute
Really power transaction is stated, calling, which is published in the intelligent contract of the block chain, to be stated to weigh logic really, creates the target application
Really power token, is sent to the authoring system for the true power token.
Optionally, described device further include:
Audit subelement is entered, receive the authoring system submission enters transaction for target application;In response to institute
It states and enters transaction, call that states in the intelligent contract being published on the block chain to enter audit logic;Wherein, described to enter
Audit logic are as follows: a ballot event is written in transaction log, the auditing party of the block chain listens to the ballot event
Afterwards, the qualification information of target application is audited, and submits the vote trading comprising auditing result to the intelligent contract;Institute
It states intelligent contract vote trading is carried out to summarize arrangement, obtains final auditing result.
Optionally, described device further include:
Authorization subelement is terminated, the termination authorization transaction for calling token that the authoring system is submitted is received;Response
It authorizes and trades in the termination, calling is published on block end stopping of chain authorization logic, will be stored in the tune of the block chain
Failure state is changed to from effective status with token.
Optionally, described device further include:
Charging subelement calls the billing logic for being published on block chain, and the charged party in block chain is called to calculate the tune
The bill of target application is corresponded to token, and billing invoice cochain is deposited into card.
Optionally, the block chain includes alliance's chain.
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 any of the above-described applies authorization method based on block chain.
This specification embodiment provides a kind of application mandated program based on block chain, is answered by block chain target
With really being weighed and authorized, the disclosed characteristic having due to block chain, it is ensured that it is just using disclosing for licensing process, and
And the characteristic that can not be distorted having due to block chain, it is ensured that using the reliability of licensing process.
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 ".
For any open platform, third-party application can be authorized in order to promote portfolio, third-party application is enabled to have
Calling platform ability executes related service.For this purpose, development platform needs to have the ability authorized to third-party application.
Tradition application authorization usually carries out privately, such as applies and sign authorized agreement, platform between platform privately
It provides and applies relevant token, the simultaneously relevant professional ability of calling platform can be accessed using by providing token.
However, although platform service amount can be promoted using authorization, while it is also possible that using having extra traffic energy
Power, but after actual grant, due to application can access platform at any time, and platform can be collected using data, therefore practical
It can be related to a variety of interests such as data safety, secret protection.
Since licensing process is undisclosed, licensing process data do not deposit card, and licensing process does not have the participation of auditing party, cause whole
A process is substantially at gray zone operation, and for calling to account in the future, right-safeguarding brings no small difficulty.Therefore, it is badly in need of providing one kind
Transparent just, traceable, the application mandated program that can audit, authorization can be automated, can promptly be stopped loss.
Present description provides a kind of application mandated programs based on block chain, are carried out by block chain to target application true
Power and authorization, and cochain is carried out to true power and licensing process and deposits card;The disclosed characteristic having due to block chain, it is ensured that answer
The characteristic that can not be distorted just with disclosing for licensing process, and having due to block chain, it is ensured that using licensing process
Reliability.
It is noted that on the one hand, it, first can be by the money of the application of application authorization in the embodiment that this specification provides
Matter information cochain deposits card, is convenient for follow-up audit.
On the other hand, block chain is provided with the logic that the application authorization based on intelligent contract stops, and is capable of supply that with actively
Stop authorization, can stop to award in time when application side sends emergency (when such as experience data safety, privacy leakage risk)
Power protects the interests of application side.
In another aspect, block chain is provided with the authorization billing logic based on common recognition mechanism, it can calculate and be generated using authorization
Expense bill (may include charging process, charging obvious), and expense bill also cochain is deposited into card, charging result discloses
It is bright, guarantee the accuracy, fairness, reliability of charging.
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 third-party application, authoring system, using flat
Alliance's chain that platform, auditing party, charged party etc. are formed as allied member;The operator of alliance's chain can rely on the connection
Alliance's chain, to dispose corresponding business;And it is described above as the authoring system of allied member, application platform, auditing party, meter
Fei Fang etc. all can serve as a service node of above-mentioned business.Each service node produced by itself or can will receive
Information relevant to business issued in alliance's chain in the form traded, and in the transaction by the common recognition in alliance's chain
After the common recognition processing of node, the distributed data base in alliance's chain is stored, and " cochain " of above-mentioned Transaction Information is completed
Deposit 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 etc.) of value Transfer, and in this kind of alliance's chain, 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.
Application platform described in this specification can refer to the service platform for needing to authorize application.Using after authorization
The professional ability that available application platform provides.
The auditing party can be the block chain node for referring to and entering for application and carrying out aptitude checking;
The charged party can be the block chain node referred to for authorization charging is carried out after application termination authorization.
In the embodiment having, auditing party and charged party can be same node, i.e. a node can be provided simultaneously with careful
Count logic and billing logic.
This specification embodiment can be divided into 3 parts, and respectively application is entered signing, authorized using true power and application.
Introduce the flow diagram really weighed in block chain using signing and application is entered as shown in Figure 1 below.
1.1, target application enters application to authoring system submission, is carried in the application using qualification information.
The qualification information can refer to some key messages using corresponding operator, such as company's information, business model
It encloses, licensing, examination & approval prove etc. can illustrate using having the information of authorising conditional.
1.2, the qualification information is assembled into and enters transaction by authoring system, and submits to block chain.
1.3, qualification information cochain is deposited card by block chain.
The qualification information cochain of target application can be deposited card by the block chain, and the qualification information after cochain can not be usurped
Change, convenient for audit.
2.1, the auditing party in block chain is notified to audit the qualification information.
2.2, the auditing result that each auditing party returns is received.
Specifically, the aptitude checking logic stated in the intelligent contract being published on the block chain can be called;Wherein,
The aptitude checking logic are as follows:
A ballot event is written in transaction log, after the auditing party of the block chain listens to the ballot event,
Qualification information is audited, and submits the vote trading comprising auditing result to the intelligent contract;The intelligence contract pair
Vote trading carries out summarizing arrangement, obtains final auditing result.
If 3, auditing result passes through, success is entered to authoring system return.
If final auditing result is to pass through, illustrate that target application enters success, executes application and enter.And it can be to
Authoring system returns to target application and enters successful notice, and authoring system can equally return to target application and enter success.
4.1, target application submits really power application to authoring system, carries true weight parameter in the application.
Target application receives enter successfully after, really power application can be initiated to authoring system, and during the true power applies
Carry true weight parameter.
The true weight parameter may include application message, authorization effective time, necessary required parameter scope limitation etc..
4.2, authoring system, which generates, authorizes intelligent contract, and submits to block chain and authorize intelligent contract creation transaction.
Authoring system can be based in really power application the intelligent contract of weight parameter creation authorization really, and award to the initiation of block chain
Weigh intelligent contract creation transaction.
5.1, the auditing party in block chain is notified to audit the authorization intelligence contract;
After block chain creation authorization intelligence contract, need to notify the auditing party in block chain to carry out to the authorization intelligence contract
Audit;To ensure that the authorization intelligence contract is to meet preset requirement, the intelligent contract that can be executed in block chain.
5.2, the auditing result that each auditing party returns is received.
Specifically, the contract stated in the intelligent contract being published on the block chain can be called to audit logic;Wherein,
The contract audits logic are as follows:
A ballot event is written in transaction log, after the auditing party of the block chain listens to the ballot event,
The intelligent contract of authorization is audited, and submits the vote trading comprising auditing result to the intelligent contract;The intelligence is closed
About vote trading is carried out to summarize arrangement, obtains final auditing result.
6, target application is returned to authoring system weigh token really.
If final auditing result is to pass through, illustrate that the authorization intelligence contract is to meet preset condition, it can be in block
It is executed in chain;In turn, target application can be generated, and uniquely corresponding token really is known and really weighs token (token).And it is possible to
Authoring system returns to target application and weighs token and the knowledge of true token really.
The true token is known for identifying target application, and the true power token for each invocation target of target application for answering
Token is called with obtaining when platform.
Through the foregoing embodiment, by the way that the qualification information cochain of target application is deposited card, and these qualification information pass through
The audit of the side of audit in block chain, so that block chain is added in target application.After target application successfully enters block chain, mesh
Mark application can be initiated really to weigh application, by that will include the authorization intelligence contract cochain of true weight parameter, and by audit, thus
The unique corresponding target application distributed to block chain weighs token really.In this way, target application can be carried out according to the true power token
Using authorization.
It is introduced as shown in Figure 2 in block chain below using the flow diagram of authorization.
1.1, the authorized application for the acquisition target service platform that target application is initiated to authoring system.
Target application correspondence is carried in the authorized application weighs token really.
1.2, authoring system is submitted to block chain for the authorization transaction for carrying power token really in the authorized application.
2.1, block chain is based on really power token and executes the intelligent contract of corresponding authorization, generates and calls token.
It trades in response to the authorization, calling is published on the authorization logic stated in the intelligent contract of the block chain and (awards
Weigh intelligent contract), it inquires in the block chain and whether stores the confirmation token;It is raw if inquiring the confirmation token
The calling token of cost sub-authorization.
2.2, the calling token is respectively supplied to target application platform and authoring system by block chain.
3, authoring system will call token to return to target application.
4, target application passes through the calling token invocation target application platform performance objective business
Target application can initiate asking for performance objective business after receiving calling token with invocation target application platform
It asks, calling token is carried in the request.
5.1, target application platform verifies calling token;
Target application platform carries out school to the calling token after receiving the calling token that the target application provides
It tests;If verification passes through, the target service of the target application is executed.
It is wherein, described that the calling token is verified, comprising:
The target service for target application for calling token and the block chain to send that the target application is provided
Calling token be compared;If two calling tokens are consistent, determine that verification passes through.
5.2, after verification passes through, performance objective business.
If verification passes through, target application platform executes the target service that the target application is initiated.
6, the implementing result cochain of target service is deposited card by target application platform.
After having executed target service, the form that target application platform can also trade implementing result is stored in block
Chain;The transaction carries the calling token.
After having executed target service, implementing result can also be returned to target application by target application platform, and will
The calling token fails in target application Platform native.
In this way, when target application is again based on identical another business of calling token initiation, due to the calling token
Failure is not carried out.Repeat to call in this way, avoiding target application and being based on the same calling token.
7, block chain fails to calling token.
Block chain is after depositing and having demonstrate,proved implementing result, the calling token that is carried according to transaction;To the calling token in block chain
Do crash handling.
Through the foregoing embodiment, it when each invocation target application platform of target application, is obtained to block chain and calls institute every time
The calling token of authorization;And it is based on the calling token invocation target application platform performance objective business.
Introduce the flow chart of application authorization termination and authorization charging as shown in Figure 3 below.
1.1, target application is initiated to terminate authorized application to authoring system, and this application carries really power token.
1.2, the failure transaction for really power token that authoring system is submitted to block chain.
Authoring system receives the termination authorization requests that target application is initiated, and then submits to block chain and award for the termination
The termination authorization transaction for weighing token really is carried in power request, with the true power token for being stored in the block chain that fails.
2.1, the termination is authorized transaction cochain to deposit card by block chain;
2.2, block chain will terminate authorization Notice Of Transactions audit side and audit;
Specifically, the termination authorization stated in the intelligent contract being published on the block chain can be called to audit logic;
Wherein, the termination authorization audit logic are as follows:
A ballot event is written in transaction log, after the auditing party of the block chain listens to the ballot event,
It is audited to authorization transaction is terminated, and includes the vote trading of auditing result to the intelligent contract submission;The intelligence is closed
About vote trading is carried out to summarize arrangement, obtains final auditing result.
2.3, each audit side returns to auditing result.
Block chain can be based on each auditing result, obtain final auditing result.
3.1, token is really weighed in block chain failure.
If final auditing result is to pass through, illustrate that really weighing token needs to do crash handling, i.e. block chain calls publication
In the inactive logic of block chain, the effective status of true power token is changed to failure state.
If auditing result is not pass through, illustrate to terminate authorization failure.
3.2, block chain returns to authoring system and terminates Authorization result.
3.3, authoring system returns to target application and terminates Authorization result.
Block chain needs to terminate Authorization result and returns to authoring system.
Block chain is provided with the logic that the application authorization based on intelligent contract stops, and is capable of supply that and stops authorization with active,
It can stop to authorize in time when application side sends emergency (when such as experience data safety, privacy leakage risk), protection is answered
With the interests of side.
In one embodiment, after block chain fails really power token, block chain, which may call upon, is published on block chain
Billing logic calls the charged party in block chain to calculate the bill of the target application, and billing invoice cochain is deposited card.
Block chain is provided with the authorization billing logic based on common recognition mechanism, can calculate the expense bill generated using authorization
(may include charging process, charging obvious), and expense bill also cochain is deposited into card, charging result is open and clear, guarantees charging
Accuracy, fairness, reliability.
Introduce as shown in Figure 4 below this specification proposition using authoring system as the embodiment of the method for executing subject, the reality
It applies example and has corresponded to earlier figures 2;The described method includes:
Step 210: authoring system receives the authorized application for target application platform that target application is initiated;
Step 220: submitting to block chain for the authorization transaction for carrying power token really in the authorized application;
Step 230: receiving the calling token for being used to call the target application platform that the block chain returns;
Step 240: the calling token being sent to target application, so that the target application passes through the calling token
Call the target application platform performance objective business.
Wherein, the application platform needs after receiving the calling token that the target application provides to the calling
Token is verified;
If verification passes through, the target service of the target application is executed.
Specifically, described that the calling token is verified, it specifically includes:
The calling token for target application for calling token and the block chain to send that the target application is provided
It is compared;
If two calling tokens are consistent, it is determined that verification passes through;
If two calling tokens are inconsistent, it is determined that verification does not pass through.
In one embodiment, further include using true power process as shown in preceding Fig. 1:
Authoring system receives target application and initiates power request really;
It is submitted to block chain and weighs transaction really for the application parameter carried in the true power request;
By the block chain return based on application parameter generate really power token be sent to the target application.
In one embodiment, further include using termination licensing process as shown in preceding Fig. 3:
Receive the termination authorized application that target application is initiated;
It submits to block chain for the termination authorization transaction for weighing token really is carried in the termination authorized application, with failure
It is stored in the true power token of the block chain.
In the embodiment, the intermediary that authoring system can be used as target application and block chain is linked up responds the target and answers
Applied with power really, authorization, termination authorization etc., to trade accordingly to the initiation of block chain;It respectively trades in block chain returning response
Result after, the result that block chain can also be returned is supplied to target application.
Introduce as shown in Figure 5 below this specification proposition using block chain as the embodiment of the method for executing subject, the implementation
Example has corresponded to earlier figures 2;The described method includes:
Step 310: the node device of block chain receives the power really that carries that is directed in authorized application that authoring system is submitted and enables
The authorization of board is traded;Wherein, the authorized application is the authorization requests for target application platform that target application is initiated;
Step 320: trading in response to the authorization, calling is published on the authorization stated in the intelligent contract of the block chain
Logic inquires in the block chain and whether stores the confirmation token;
Step 330: if inquiring the confirmation token, creating the calling token of target application, Xiang Suoshu authoring system
Send the calling token;So that the target application calls the target application platform performance objective by the calling token
Business.
In one embodiment, the method also includes:
The node device of block chain can also send the calling token to the target application platform, so that the target
Application platform compares two calling tokens after receiving the calling token that the target application provides;
If two calling tokens are consistent, the target service of the target application is executed.
In one embodiment, as process is really weighed in preceding application shown in FIG. 1:
It receives the target application that is directed to that the authoring system is submitted and weighs transaction really;
It trades in response to the true power, calling, which is published in the intelligent contract of the block chain, to be stated to weigh logic really, is created
It builds the target application and weighs token really, the true power token is sent to the authoring system.
In one embodiment, as signing process is entered in preceding application shown in FIG. 1:
Receive the authoring system submission enters transaction for target application;
Transaction is entered in response to described, the audit of entering stated in the intelligent contract being published on the block chain is called to patrol
Volume;Wherein, described to enter audit logic are as follows: a ballot event, auditing party's prison of the block chain are written in transaction log
After hearing the ballot event, the qualification information of target application is audited, and is submitted to the intelligent contract comprising audit
As a result vote trading;The intelligence contract carries out vote trading to summarize arrangement, obtains final auditing result.
In one embodiment, as preceding application shown in Fig. 3 terminates licensing process:
The node device of block chain receives the termination authorization transaction for calling token that the authoring system is submitted;
It authorizes and trades in response to the termination, calling is published on block end stopping of chain authorization logic, will be stored in the area
The calling token of block chain is changed to failure state from effective status.
Further, the method also includes:
The billing logic for being published on block chain is called, calls the charged party in block chain to calculate the calling token and corresponds to mesh
The bill of application is marked, and billing invoice cochain is deposited into card.
In conclusion the scheme that this specification provides, is really weighed and is authorized to target application by block chain, and to true
Power and licensing process carry out cochain and deposit card;The disclosed characteristic having due to block chain, it is ensured that using the public affairs of licensing process
Open the characteristic that can not be distorted that is just, and having due to block chain, it is ensured that using the reliability of licensing process.It is worth mentioning
Be, on the one hand, in the embodiment that this specification provides, the qualification information cochain of application of application authorization can be deposited card first,
Convenient for follow-up audit.On the other hand, block chain is provided with the logic that the application authorization based on intelligent contract stops, and is capable of supply that use
Actively stop authorization, when application side send emergency when data safety, privacy leakage risk (such as meet with) can it is timely in
It only authorizes, protects the interests of application side.In another aspect, block chain is provided with the authorization billing logic based on common recognition mechanism, it can be with
The expense bill (may include charging process, charging obvious) that application authorization generates is calculated, and expense bill also cochain is deposited into card,
Charging result is open and clear, guarantees the accuracy, fairness, reliability of charging.
Corresponding with the aforementioned application authorization method embodiment based on block chain, this specification is additionally provided based on block chain
The embodiment using authorization device.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 fig. 6, a kind of hardware structure diagram using equipment where authorization device for this specification based on block chain,
Other than processor shown in fig. 6, network interface, memory and nonvolatile memory, setting where device in embodiment
It is standby to authorize actual functional capability generally according to the application based on block chain, it can also include other hardware, this is repeated no more.
Fig. 7 is referred to, for the module map using authorization 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, described device includes:
First receiving unit 410, authoring system receive the authorized application for target application platform that target application is initiated;
Unit 420 is submitted in transaction, is submitted to block chain and is handed over for the authorization for carrying power token really in the authorized application
Easily;
Second receiving unit 430, receive that the block chain returns for calling the calling of the target application platform to enable
Board;
Using authorization unit 440, the calling token is sent to target application, so that the target application is described in
Token is called to call the target application platform performance objective business.
Optionally, described device further include:
Subelement is verified, the target application platform is after receiving the calling token that the target application provides, to institute
It states and token is called to be verified;
Subelement is executed, if verification passes through, executes the target service of the target application.
Optionally, the verification subelement, specifically includes:
Comparing subunit, the calling token for calling token and the block chain to send that the target application is provided carry out
Compare;
It determines subelement, if two calling tokens are consistent, determines that verification passes through.
Optionally, described device further include:
Using true power subelement, receives target application and initiate power request really;It submits to block chain and is asked for the true power
The application parameter of middle carrying is asked to weigh transaction really;Power token transmission really is generated based on application parameter by what the block chain returned
To the target application.
Optionally, described device further include:
Authorization subelement is terminated, the termination authorization requests that target application is initiated are received;It is submitted to block chain and is directed to the end
The termination authorization transaction for weighing token really is carried in authorization requests, only with the true power order for being stored in the block chain of failing
Board.
Fig. 8 is referred to, for the module map using authorization device based on block chain that one embodiment of this specification provides, institute
It states device and has corresponded to embodiment illustrated in fig. 5, described device includes:
Receiving unit, the node device of block chain receive the power really that carries that is directed in authorized application that authoring system is submitted and enable
The authorization of board is traded;Wherein, the authorized application is the authorization requests for target application platform that target application is initiated;
Query unit is traded in response to the authorization, is called and is published on awarding of stating in the intelligent contract of the block chain
Logic is weighed, inquires in the block chain and whether stores the confirmation token;
Authorization unit creates the calling token of target application, Xiang Suoshu authoring system if inquiring the confirmation token
Send the calling token;So that the target application calls the target application platform performance objective by the calling token
Business.
Optionally, described device further include:
Business execution unit, Xiang Suoshu target application platform sends the calling token, so that the target application platform
After receiving the calling token that the target application provides, compare two calling tokens;If two calling tokens are consistent, hold
The target service of the row target application.
Optionally, described device further include:
Using true power subelement, receives the target application that is directed to that the authoring system is submitted and weigh transaction really;In response to institute
Really power transaction is stated, calling, which is published in the intelligent contract of the block chain, to be stated to weigh logic really, creates the target application
Really power token, is sent to the authoring system for the true power token.
Optionally, described device further include:
Audit subelement is entered, receive the authoring system submission enters transaction for target application;In response to institute
It states and enters transaction, call that states in the intelligent contract being published on the block chain to enter audit logic;Wherein, described to enter
Audit logic are as follows: a ballot event is written in transaction log, the auditing party of the block chain listens to the ballot event
Afterwards, the qualification information of target application is audited, and submits the vote trading comprising auditing result to the intelligent contract;Institute
It states intelligent contract vote trading is carried out to summarize arrangement, obtains final auditing result.
Optionally, described device further include:
Authorization subelement is terminated, the termination authorization transaction for calling token that the authoring system is submitted is received;Response
It authorizes and trades in the termination, calling is published on block end stopping of chain authorization logic, will be stored in the tune of the block chain
Failure state is changed to from effective status with token.
Optionally, described device further include:
Charging subelement calls the billing logic for being published on block chain, and the charged party in block chain is called to calculate the tune
The bill of target application is corresponded to token, and billing invoice cochain is deposited into card.
Optionally, the block chain includes alliance's chain.
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 7 above describes inner function module using authorization device and structural representation 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:
Authoring system receives the authorized application for target application platform that target application is initiated;
It submits to block chain for the authorization transaction for carrying power token really in the authorized application;
Receive the calling token for being used to call the target application platform that the block chain returns;
The calling token is sent to target application, so that the target application passes through described in calling token calling
Target application platform performance objective business.
Figure 8 above describes inner function module using authorization device and structural representation 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:
What the node device reception authoring system of block chain was submitted is directed to the authorization for carrying in authorized application and weighing token really
Transaction;Wherein, the authorized application is the authorization requests for target application platform that target application is initiated;
It trades in response to the authorization, calling is published on the authorization logic stated in the intelligent contract of the block chain, looks into
It askes and whether stores the confirmation token in the block chain;
If inquiring the confirmation token, the calling token of target application is created, described in Xiang Suoshu authoring system is sent
Call token;So that the target application calls the target application platform performance objective business by the calling token.
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.