Summary of the invention
The purpose of this specification one or more embodiment is to provide a kind of terminal locking method and dress based on block chain
It sets, to realize based on the intelligent contract in block chain to terminal device into line-locked purpose, to make terminal locking mode
Open and clearization.
In order to solve the above technical problems, this specification one or more embodiment is achieved in that
On the one hand, this specification one or more embodiment provides a kind of terminal locking method based on block chain, comprising:
It is directed to the first payment information of terminal device according to the first user, judges whether the terminal device meets debt lock
Fixed condition;
It is closed with the payment for the terminal device using intelligence corresponding to business if so, being called from block chain
About, the lock mode to the terminal device is determined based on the intelligent contract;
Lock operation corresponding with the lock mode is executed to the terminal device.
In one embodiment, first payment information that terminal device is directed to according to the first user, judges the end
Whether end equipment meets debt locking condition, comprising:
It is directed to the expection payment information of the terminal device according to first user, determines first user nearest one
The secondary expected payment time for the terminal device;
According to first payment information, judge whether first user before the expected payment time executes needle
Payment operation to the terminal device;
If it is not, then generating the overdue record of not paying the fees of first user, overdue do not pay the fees is recorded described in write-in
Block chain;And determine that the terminal device meets the debt locking condition.
In one embodiment, it is described to the terminal device execute corresponding with lock mode lock operation it
Afterwards, further includes:
It is directed to the second payment information of terminal device according to first user, judges whether the terminal device meets solution
Bolt part;
If so, determining the unlocking manner to the terminal device based on the intelligent contract;
Unlock operation corresponding with the unlocking manner is executed to the terminal device.
In one embodiment, second payment information that terminal device is directed to according to first user, judges institute
State whether terminal device meets unlocking condition, comprising:
According to second payment information, judge whether first user performs handing in retroactively for the terminal device
Debt operation;
If so, the debt of handing in retroactively for generating first user records, the block is written into the debt record of handing in retroactively
Chain;And determine that the terminal device meets the unlocking condition.
In one embodiment, first payment information that terminal device is directed to according to the first user, judges the end
Whether end equipment meets before debt locking condition, further includes:
Obtain the use solicited message that first user is directed to the terminal device;
The block chain is written using solicited message by described;
Wherein, the use solicited message includes at least one of following: the order placement information of first user, delivery side are right
The Shipping Information of the terminal device, the information of receiving of first user.
In one embodiment, first payment information that terminal device is directed to according to the first user, judges the end
Whether end equipment meets before debt locking condition, further includes:
In response to the contract write request of the intelligent contract is written into the block chain, the intelligent contract is judged
Whether write-in side has the write-in permission to the intelligent contract;
If so, the block chain is written in the intelligent contract according to the contract write request.
In one embodiment, described to exceed described after the overdue record of not paying the fees for generating first user
Phase, which does not pay the fees to record, is written the block chain;And determine that the terminal device meets the debt locking condition, comprising:
The overdue record of not paying the fees of generation is sent at least one specified node;
When receiving confirmation operation of at least one the described indication node to the overdue record of not paying the fees, exceed described
Phase, which does not pay the fees to record, is written the block chain;And determine that the terminal device meets the debt locking condition.
In one embodiment, credible performing environment TEE, key authentication device and data input are equipped in the terminal device
Entrance;
Wherein, used key is verified when the key authentication device is used for the intelligent contract described to calling;It is described
Data entry is used to the data inputted on the terminal device being uploaded to the block chain.
On the other hand, this specification one or more embodiment provides a kind of terminal locking device based on block chain, packet
It includes:
First judgment module judges the terminal for being directed to the first payment information of terminal device according to the first user
Whether equipment meets debt locking condition;
It calls and determining module is adjusted from block chain if meeting the debt locking condition for the terminal device
It, using intelligent contract corresponding to business, is determined based on the intelligent contract to described with the payment for the terminal device
The lock mode of terminal device;
First execution module, for executing lock operation corresponding with the lock mode to the terminal device.
In one embodiment, the first judgment module includes:
First determination unit is determined for being directed to the expection payment information of the terminal device according to first user
Expected payment time of the described first user the last time for the terminal device;
First judging unit, for judging first user whether in the expection according to first payment information
Time execution before of paying the fees is operated for the payment of the terminal device;
First write-in and determination unit are directed to if not executing before the expected payment time for first user
The payment of the terminal device operates, then the overdue record of not paying the fees of first user is generated, by the overdue note of not paying the fees
The block chain is written in record;And determine that the terminal device meets the debt locking condition.
In one embodiment, described device further include:
Second judgment module executes lock operation corresponding with the lock mode to the terminal device for described
Later, it is directed to the second payment information of terminal device according to first user, judges whether the terminal device meets unlock
Condition;
Determining module, if meeting the unlocking condition for the terminal device, based on determining pair of the intelligent contract
The unlocking manner of the terminal device;
Second execution module is operated for executing unlock corresponding with the unlocking manner to the terminal device.
In one embodiment, second judgment module includes:
Second judgment unit, for judging whether first user performs and being directed to according to second payment information
The terminal device hands in debt operation retroactively;
Second write-in and determination unit, hand in debt retroactively for the terminal device if performing for first user
Operation, then generate first user hands in debt record retroactively, and the block chain is written in the debt record of handing in retroactively;And really
The fixed terminal device meets the unlocking condition.
In one embodiment, described device further include:
Module is obtained, for first payment information for being directed to terminal device according to the first user, judges the terminal
Before whether equipment meets debt locking condition, the use solicited message that first user is directed to the terminal device is obtained;
First writing module, for the block chain to be written using solicited message by described;
Wherein, the use solicited message includes at least one of following: the order placement information of first user, delivery side are right
The Shipping Information of the terminal device, the information of receiving of first user.
In one embodiment, described device further include:
Third judgment module, for first payment information for being directed to terminal device according to the first user, described in judgement
Before whether terminal device meets debt locking condition, the contract in response to the intelligent contract is written into the block chain is write
Enter request, judges whether the write-in side of the intelligent contract has the write-in permission to the intelligent contract;
Second writing module, if the write-in side for the intelligent contract has the write-in permission to the intelligent contract,
Then according to the contract write request, the block chain is written into the intelligent contract.
In one embodiment, first write-in and determination unit are also used to:
The overdue record of not paying the fees of generation is sent at least one specified node;
When receiving confirmation operation of at least one the described indication node to the overdue record of not paying the fees, exceed described
Phase, which does not pay the fees to record, is written the block chain;And determine that the terminal device meets the debt locking condition.
In one embodiment, credible performing environment TEE, key authentication device and data input are equipped in the terminal device
Entrance;
Wherein, used key is verified when the key authentication device is used for the intelligent contract described to calling;It is described
Data entry is used to the data inputted on the terminal device being uploaded to the block chain.
In another aspect, this specification one or more embodiment provides a kind of terminal locking equipment based on block chain, packet
It includes:
Processor;And
It is arranged to the memory of storage computer executable instructions, the executable instruction makes the place when executed
Manage device:
It is directed to the first payment information of terminal device according to the first user, judges whether the terminal device meets debt lock
Fixed condition;
It is closed with the payment for the terminal device using intelligence corresponding to business if so, being called from block chain
About, the lock mode to the terminal device is determined based on the intelligent contract;
Lock operation corresponding with the lock mode is executed to the terminal device.
In another aspect, the embodiment of the present application provides a kind of storage medium, for storing computer executable instructions, it is described can
It executes instruction and realizes following below scheme when executed:
It is directed to the first payment information of terminal device according to the first user, judges whether the terminal device meets debt lock
Fixed condition;
It is closed with the payment for the terminal device using intelligence corresponding to business if so, being called from block chain
About, the lock mode to the terminal device is determined based on the intelligent contract;
Lock operation corresponding with the lock mode is executed to the terminal device.
Using the technical solution of this specification one or more embodiment, by being directed to terminal device according to the first user
First payment information judges whether terminal device meets debt locking condition, and is determining that terminal device meets debt locking bar
When part, calls from block chain and closed with the payment for terminal device using intelligent contract corresponding to business, and based on intelligence
It about determines the lock mode to terminal device, and then lock operation corresponding with the lock mode is executed to terminal device.It can
See, which locks terminal device based on the intelligent contract in block chain, due to the decentralization of block chain, with
And the open and clear feature of intelligent contract, so that the lock operation of terminal device is no longer dependent on the developer of centralization, and
It is that can be witnessed jointly by multi-party (all sides of such as terminal device, third party, terminal device holder), so that it is guaranteed that terminal device
The auditing of lock machine process, notarization, and avoid all kinds of dispute problems caused by the locking because of terminal device.
Specific embodiment
This specification one or more embodiment provides a kind of terminal locking method and device based on block chain, to reality
Now based on the intelligent contract in block chain to terminal device into line-locked purpose, to keep terminal locking mode open and clear
Change.
In order to make those skilled in the art more fully understand the technical solution in this specification one or more embodiment,
Below in conjunction with the attached drawing in this specification one or more embodiment, to the technology in this specification one or more embodiment
Scheme is clearly and completely described, it is clear that and described embodiment is only this specification a part of the embodiment, rather than
Whole embodiments.Based on this specification one or more embodiment, those of ordinary skill in the art are not making creativeness
The model of this specification one or more embodiment protection all should belong in every other embodiment obtained under the premise of labour
It encloses.
Fig. 1 is illustrated according to a kind of application scenarios of terminal locking method based on block chain of one embodiment of this specification
Figure.As shown in Figure 1, the terminal locking method based on block chain is applied to terminal device 11, and terminal device 11 accesses block chain
12.Credible performing environment TEE (Trusted Execution has been pre-created in the hardware of terminal device 11
Environment), and it is equipped with key authentication device and data entry.Wherein, credible performing environment TEE can ensure to utilize
Terminal device write-in or the safety for calling intelligent contract;Key authentication device is used for the intelligent contract when institute called in block chain
The key used is verified;Data entry is used to the data inputted on terminal device 11 being uploaded to block chain.Example
Such as, by the data entry on terminal device 11, the intelligent contract write can be uploaded to block chain 12, it can also will be defeated
The other kinds information (such as user information, debt information, hands in debt information retroactively at payment information) entered is uploaded to block chain 12.
Based on credible performing environment TEE, key authentication device and the data entry in terminal device 11, enable terminal device 11
Block chain 12, and the security invocation intelligence contract under trusted context are accessed, realizes the lock to terminal device based on intelligent contract
Fixed operation.
Fig. 2 is the schematic flow according to a kind of terminal locking method based on block chain of one embodiment of this specification
Figure, as shown in Fig. 2, this method comprises:
S202 is directed to the first payment information of terminal device according to the first user, judges whether terminal device meets debt
Locking condition.
Wherein, the first user (below can abbreviation user) is the user of terminal device, such as the leaseholder of terminal device
Or buyer.First payment information may include the information such as payment time of user, payment amount of money, pay charge way.
S204 is closed with the payment for terminal device using intelligence corresponding to business if so, calling from block chain
About, the lock mode to terminal device is determined based on intelligent contract.
Wherein, referred to for the payment of terminal device using business: the right to use to terminal device is obtained by pay charge way
The business of limit.Intelligent contract is used to provide the related payment information to terminal device, such as could dictate that the expection to terminal device
It pays the fees time (should pay the fees the time), expected payment amount of money (answering payment amount of money), expected pay charge way (answering pay charge way)
Etc. information.Lock mode to terminal device may include locking degree, locking password etc..
The mainboard of locking degree such as locking terminal equipment, so that user can not be further continued for using terminal equipment;Alternatively, locking
Whole applications or certain applications in degree such as locking terminal equipment, so that user is not available whole applications in terminal device
Or certain applications;Etc..
Locking password is password required when being unlocked to terminal device, that is, locks password by regulation, makes terminal
Locking password can be informed user in the case where user closes debt by equipment, to can unlock after so that user is closed debt
And continue to use terminal device.
To the regulation of the lock mode of terminal device in intelligent contract, the locking degree to terminal device can be only provided,
Without providing to lock password.Even if can not also be come from by obtaining unlocking pin in this way, user closes the debt to terminal device
Row unlock terminal device.Terminal device can cancel the locking to terminal device by calling the intelligent contract in block chain.
Terminal device can call the intelligent contract in block chain using key.Wherein, for calling the key of intelligent contract
The corresponding node of terminal device can be pre-assigned to by block chain, and the key is corresponding with the signature in intelligent contract.In addition,
The key authentication device set in terminal device can verify key, and call intelligence to close from block chain when being verified
About.
S206 executes lock operation corresponding with lock mode to terminal device.
In the present embodiment, intelligent contract can be previously written in block chain by the data entry set in terminal device.
The contract that intelligent contract can be appointed according to multi-party (all sides of such as terminal device, terminal device holder, third party) is automatic
It generates, for example, making an appointment in many ways uses the contract of business for the payment of terminal device, provides have to terminal in the contract
The related payment information of equipment, including being expected payment time (should pay the fees the time), expected payment amount of money (i.e. to terminal device
Answer payment amount of money), the information such as expected pay charge way (answering pay charge way).By the way that related payment letter is identified and obtained from contract
Breath, and then the intelligent contract that business is used for the payment of terminal device is automatically generated, and intelligent contract is written in block chain.
In one embodiment, in response to the contract write request of the intelligent contract of write-in into block chain, can break intelligent conjunction
Whether write-in side about has the write-in permission to intelligent contract;If having, intelligent contract is write according to contract write request
Enter block chain.Wherein, it can be verified by the identity information to write-in side, to judge whether write-in side has to intelligent contract
Write-in permission.For example, knowing that write-in side belongs to the specified writer of intelligent contract if passing through the identity information of verifying write-in side
(such as terminal device holder or third party) then can determine that write-in side has the write-in permission to intelligent contract.With permission
Write-in side by intelligent contract be written block chain when, can be used key pair write-in intelligent contract sign.
Using the technical solution of this specification one or more embodiment, by being directed to terminal device according to the first user
First payment information judges whether terminal device meets debt locking condition, and is determining that terminal device meets debt locking bar
When part, calls from block chain and closed with the payment for terminal device using intelligent contract corresponding to business, and based on intelligence
It about determines the lock mode to terminal device, and then lock operation corresponding with the lock mode is executed to terminal device.It can
See, which locks terminal device based on the intelligent contract in block chain, due to the decentralization of block chain, with
And the open and clear feature of intelligent contract, so that the lock operation of terminal device is no longer dependent on the developer of centralization, and
It is that can be witnessed jointly by multi-party (all sides of such as terminal device, third party, terminal device holder), so that it is guaranteed that terminal device
The auditing of lock machine process, notarization, and avoid all kinds of dispute problems caused by the locking because of terminal device.
In one embodiment, it is directed to the first payment information of terminal device according to the first user, judges that terminal device is
It is not no when meeting debt locking condition, it can be directed to the expection payment information of terminal device according to the first user, determine the first user most
The nearly primary expected payment time for terminal device;Then according to the first payment information, judge the first user whether in expection
The payment operation for terminal device is performed before the payment time;If not, it is determined that terminal device meets debt locking condition.
Also, it when determining the first user before the expected time of paying the fees and being not carried out the payment operation for terminal device, also produces
The overdue record of not paying the fees of first user, and block chain is written into overdue record of not paying the fees.
It, can be by the overdue record of not paying the fees of the first user before the overdue record write-in block chain of not paying the fees of the first user
It is sent at least one specified node, and gives directions node to the overdue record of not paying the fees of the first user receiving at least one
When confirmation operation, by the overdue record write-in block chain of not paying the fees of the first user.Wherein, specified node may include terminal device institute
The corresponding nodes such as the side of having, third party, terminal device holder.
As it can be seen that only receiving at least one specified node (all sides of such as terminal device, third party, end in the present embodiment
The corresponding node such as end equipment holder) to the confirmation operation of the overdue record of not paying the fees of the first user when, just by first
The overdue record write-in block chain of not paying the fees of user.It is achieved that multi-party, (all sides of such as terminal device, third party, terminal are set
Standby holder etc.) to the witness of the overdue record of not paying the fees of the first user, so that it is guaranteed that overdue in write-in block chain is not paid the fees
What is recorded can fairness.
It, can be by the data entry that is set in terminal device by the overdue record of not paying the fees of the first user in the present embodiment
Block chain is written.It is expected that payment information can be stored in terminal device, it is contemplated that comprising user to the pre- of terminal device in payment information
Phase pays the fees the time.Terminal device, to the first payment information of terminal device, can be sentenced according to local expection payment information and user
Whether disconnected user out performs the payment operation for terminal device before the expected time of paying the fees, if so, determining that terminal is set
It is standby to be unsatisfactory for debt locking condition;If not, it is determined that terminal device meets debt locking condition.
It in one embodiment, can be according to the after executing corresponding with lock mode lock operation to terminal device
One user is directed to the second payment information of terminal device, judges whether terminal device meets unlocking condition;If so, from block chain
Middle calling sets terminal using intelligent contract corresponding to business, and based on intelligent contract determination with the payment for terminal device
Standby unlocking manner;Unlock operation corresponding with unlocking manner is executed to terminal device.
Wherein, referred to for the payment of terminal device using business: the right to use to terminal device is obtained by pay charge way
The business of limit.Intelligent contract is used to provide the related payment information to terminal device, such as could dictate that the expection to terminal device
It pays the fees time (should pay the fees the time), expected payment amount of money (answering payment amount of money), expected pay charge way (answering pay charge way)
Etc. information.Unlocking manner to terminal device may include unlock degree, unlocking pin etc..
Unlock degree is related to the locking degree to terminal device.If the locking degree to terminal device sets for locking terminal
Standby mainboard, then unlocking degree is to be unlocked to the mainboard of terminal device;If the locking degree to terminal device is locking
The specified application of whole applications or part in terminal device, then unlock degree be in terminal device whole applications or part
Specified application is unlocked;Etc..
Unlocking pin can be obtained when locking to terminal device it has been determined that when terminal device meets unlocking condition
Unlocking pin is simultaneously supplied to user by unlocking pin, is unlocked using unlocking pin to terminal device by user.
In the present embodiment, to the regulation of the lock mode of terminal device in intelligent contract, can only it provide to terminal device
Unlock degree, without provide unlocking pin.Even if can not also pass through acquisition in this way, user closes the debt to terminal device
Unlocking pin voluntarily unlocks terminal device.In this case, by intelligent contract, actively triggering operates the unlock of terminal device.
In the present embodiment, terminal device can call the intelligent contract in block chain using key.Wherein, for calling intelligence
The key of contract can be pre-assigned to the corresponding node of terminal device, and the key and the signature phase in intelligent contract by block chain
It is corresponding.In addition, the key authentication device set in terminal device can verify key, and adjusted from block chain when being verified
With intelligent contract.
In one embodiment, it is directed to the second payment information of terminal device according to the first user, judges that terminal device is
It is not no when meeting unlocking condition, it can be directed to the second payment information of terminal device according to the first user, judge whether the first user holds
It has gone and has handed in debt operation retroactively for terminal device;If so, determining that terminal device meets unlocking condition;Also, determining
One user performs for terminal device when handing in debt operation retroactively, and also produce the first user hands in debt record retroactively, and will
Hand in debt record write-in block chain retroactively.
The debt of handing in retroactively of first user is recorded before block chain is written, the debt record of handing in retroactively of the first user can be sent
Node is specified at least one, and gives directions node to grasp the confirmation for handing in debt record retroactively of the first user receiving at least one
When making, the first user is handed in retroactively debt record write-in block chain.Wherein, specified node may include all sides of terminal device,
The corresponding nodes such as tripartite, terminal device holder.
As it can be seen that only receiving at least one specified node (all sides of such as terminal device, third party, end in the present embodiment
The corresponding node such as end equipment holder) the first user when handing in the confirmation operation that debt records retroactively, is just used first
Hand in debt record write-in block chain retroactively in family.It is achieved that multi-party, (all sides of such as terminal device, third party, terminal device are held
The side of having etc.) to the first user hand in retroactively debt record witness, so that it is guaranteed that write-in block chain in hand in retroactively debt record can
Fairness.
In the present embodiment, the debt record of handing in retroactively of the first user can be write by the data entry set in terminal device
Enter block chain.First user to the expection of terminal device do not pay the fees record can be stored in terminal device local, it is contemplated that note of not paying the fees
It may include the information such as debt time, amount owed, debt stroke count in record.When the first user executes the payment behaviour for terminal device
When making, determining first user can be operated according to the payment to the payment amount of money of terminal device, and by the payment amount of money and be expected not
Amount owed in payment record compares, to judge whether the first user has closed all debts to terminal device.If
It closes, it is determined that terminal device meets unlocking condition.
It can be seen that by above-described embodiment, after executing lock operation to terminal device, can also be closed in user and terminal is set
After standby all debts, unlock operation is executed to terminal device by calling the intelligent contract in block chain.Due to intelligence
The open and clear feature of contract, so that the unlock operation of terminal device is no longer dependent on the developer of centralization, but can be by
In many ways (all sides of such as terminal device, third party, terminal device holder) witnesses jointly, so that it is guaranteed that the unlock of terminal device
The auditing of process, notarization, and avoid all kinds of dispute problems caused by the unlock because of terminal device.
In one embodiment, it when getting use solicited message of first user for terminal device, can will use
Block chain is written in solicited message;Wherein, the order placement information that includes the first user using solicited message, delivery side are to terminal device
The information such as Shipping Information, the information of receiving of the first user.It, can be by the data entry that is set in terminal device in the present embodiment
It will use solicited message that block chain is written.
Fig. 3 is the schematic flow according to a kind of terminal locking method based on block chain of another embodiment of this specification
Figure as shown in figure 3, this method comprises:
S301 creates credible performing environment TEE in the hardware of terminal device and key authentication device and data input is written
Entrance.
Wherein, credible performing environment TEE can ensure to be written or call using terminal device the safety of intelligent contract;It is close
Key validator is used to verify used key when calling the intelligent contract in block chain;Data entry is used for will
The data inputted on the terminal device are uploaded to block chain.
S302, when receive user to terminal device place an order request when, by data entry, by user to terminal
Block chain is written in the order placement information of equipment.
Wherein, when order placement information may include usage mode (such as lease or buying pattern), lower list of the user to terminal device
Between, the information such as lower single channel.The request that places an order refers to that user obtains the request to the access right of terminal device by pay charge way.Example
If user's online purchase terminal device or user are by network rent terminal device, it is regarded as user and has issued to terminal
The request that places an order of equipment.
S303 will use intelligence corresponding to business with the payment for terminal device by data entry and key
It can contract write-in block chain.
Wherein, referred to for the payment of terminal device using business: the right to use to terminal device is obtained by pay charge way
The business of limit.Intelligent contract is used to provide the related payment information to terminal device, such as could dictate that the expection to terminal device
The information such as payment time, expected payment amount of money, expected pay charge way.
It should be noted that by intelligent contract block chain is written and by user to the letter that places an order of terminal device in the present embodiment
The time sequencing of breath write-in block chain is without limitation.That is, block can be written intelligent contract after single terminal device under user
Block chain can also be written (when such as terminal device dispatches from the factory) before single terminal device under user in intelligent contract by chain, can also with
Block chain is written into intelligent contract while single terminal device under family.
S304 believes the delivery of terminal device delivery side when monitoring that delivery side operates the delivery of terminal device
Breath write-in block chain.
In the step, the Shipping Information of terminal device can be written in delivery side by all sides of terminal device by secret key remote
Block chain can also be uploaded to block chain automatically by data entry by terminal device.
S305, when monitor user to terminal device receive operate when, receive information of the user to terminal device is write
Enter block chain.
In the step, user can pass through secret key remote write area by all sides of terminal device to the information of receiving of terminal device
Block chain can also be uploaded to block chain automatically by data entry by terminal device.
S306 determines user to the expection payment information of terminal device.
Wherein, it is contemplated that payment information includes expected payment time and expected payment amount of money.Terminal device can be by by multi-party
The contract or pre-generated intelligent contract that (all sides of such as terminal device, third party) makes an appointment are expected payment letter to determine
Breath, and identified expected payment information is stored in local.
S307 judges that terminal device is according to user for the first payment information of terminal device and expected payment information
It is no to meet debt locking condition;If so, executing S308;If it is not, then continuing to execute this step.
S308 generates the overdue record of not paying the fees of user, by overdue record write-in block chain of not paying the fees;And use key
The intelligent contract in block chain is called, and the lock mode to terminal device is determined based on intelligent contract.
Wherein, the key authentication device set in terminal device can verify key, and when being verified from block chain
The intelligent contract of middle calling.Include the lock mode to terminal device in intelligent contract.In the present embodiment, lock mode includes locking
Degree.The mainboard of locking degree such as locking terminal equipment, so that user can not be further continued for using terminal equipment;Alternatively, locking journey
The degree such as whole applications or certain applications in locking terminal equipment so that user be not available whole applications in terminal device or
Certain applications.
S309 executes lock operation corresponding with lock mode to terminal device.
S310, when receiving user for terminal device when handing in debt operation retroactively, generate user hands in debt record retroactively,
And debt record write-in block chain will be handed in retroactively.
S311 is directed to the second payment information of terminal device according to user, judges whether terminal device meets unlocking condition;
If so, executing S312;If it is not, then continuing to execute this step.
Wherein, the second payment information, which can be, hands in the corresponding payment information of debt operation retroactively described in S310.
S312, the debt for generating user close information, and debt is closed information write-in block chain;And it is called using key
Intelligent contract in block chain, and the unlocking manner to terminal device is determined based on intelligent contract.
Wherein, the key authentication device set in terminal device can verify key, and when being verified from block chain
The intelligent contract of middle calling.Include the unlocking manner to terminal device in intelligent contract.
S313 executes lock operation corresponding with unlocking manner to terminal device.
It can be seen that by above-described embodiment, the technical solution is by user to the order placement information of terminal device, delivery side to terminal
The Shipping Information of equipment, user hand in debt note retroactively to do not pay the fees record, user of the information of receiving of terminal device, the overdue of user
Record, debt close record, intelligent contract etc. and are uploaded to block chain, and terminal device is locked and unlocked based on intelligent contract
Operation, due to the decentralization and open and clear feature of block chain, so that these information can be obtained in many ways (such as terminal device institute
The side of having, third party, terminal device holder etc.) common witness, so that it is guaranteed that the lock machine process and unlocking process of terminal device
Audit, notarization, and all kinds of dispute problems caused by avoiding because of the locking or unlocking of terminal device.
To sum up, the specific embodiment of this theme is described.Other embodiments are in the appended claims
In range.In some cases, the movement recorded in detail in the claims can execute and still in a different order
Desired result may be implemented.In addition, process depicted in the drawing not necessarily requires the particular order shown or continuous suitable
Sequence, to realize desired result.In some embodiments, multitasking and parallel processing can be advantageous.
The above are the terminal locking methods based on block chain that this specification one or more embodiment provides, based on same
Thinking, this specification one or more embodiment also provides a kind of terminal locking device based on block chain.
Fig. 4 be according to a kind of schematic block diagram of terminal locking device based on block chain of one embodiment of this specification,
As shown in figure 4, the terminal locking device 400 based on block chain includes:
First judgment module 410 judges that terminal is set for being directed to the first payment information of terminal device according to the first user
It is standby whether to meet debt locking condition;
Calling and determining module 420, if meeting debt locking condition for terminal device, calling and needle from block chain
Intelligent contract corresponding to business is used to the payment of terminal device, the locking side to terminal device is determined based on intelligent contract
Formula;
First execution module 430, for executing lock operation corresponding with lock mode to terminal device.
In one embodiment, first judgment module 410 includes:
First determination unit determines the first user for being directed to the expection payment information of terminal device according to the first user
Expected payment time of the last time for terminal device;
First judging unit, for judging the first user whether before the expected time of paying the fees according to the first payment information
The payment executed for terminal device operates;
First write-in and determination unit are directed to terminal device if not executing before the expected time of paying the fees for the first user
Payment operation, then generate the overdue record of not paying the fees of the first user, by it is overdue do not pay the fees record be written block chain;And it determines
Terminal device meets debt locking condition.
In one embodiment, device 400 further include:
Second judgment module, after executing corresponding with lock mode lock operation to terminal device, according to the
One user is directed to the second payment information of terminal device, judges whether terminal device meets unlocking condition;
Determining module determines the solution to terminal device based on intelligent contract if meeting unlocking condition for terminal device
Lock mode;
Second execution module is operated for executing unlock corresponding with unlocking manner to terminal device.
In one embodiment, the second judgment module includes:
Second judgment unit, for judging whether the first user performs for terminal device according to the second payment information
Hand in retroactively debt operation;
Second write-in and determination unit hand in debt operation retroactively for terminal device if performing for the first user,
Generate the first user hands in debt record retroactively, will hand in debt record write-in block chain retroactively;And determine that terminal device meets release bar
Part.
In one embodiment, device 400 further include:
Module is obtained, for being directed to the first payment information of terminal device according to the first user, whether judges terminal device
Before meeting debt locking condition, the use solicited message that the first user is directed to terminal device is obtained;
First writing module, for that will use solicited message that block chain is written;
Wherein, the use of solicited message includes at least one of following: the order placement information of the first user, delivery side are to terminal device
Shipping Information, the information of receiving of the first user.
In one embodiment, device 400 further include:
Third judgment module judges terminal device for being directed to the first payment information of terminal device according to the first user
Before whether meeting debt locking condition, in response to the contract write request of intelligent contract is written into block chain, intelligence is judged
Whether the write-in side of contract has the write-in permission to intelligent contract;
Second writing module, if the write-in side for intelligent contract has the write-in permission to intelligent contract, according to conjunction
Block chain is written in intelligent contract by about write request.
In one embodiment, the first write-in and determination unit are also used to:
The overdue record of not paying the fees of generation is sent at least one specified node;
When receiving the confirmation operation that at least one gives directions node to overdue record of not paying the fees, by overdue record of not paying the fees
Block chain is written;And determine that terminal device meets debt locking condition.
In one embodiment, be equipped in terminal device credible performing environment TEE, key authentication device and data input into
Mouthful;
Wherein, used key is verified when key authentication device is used for contract intelligent to calling;Data entry
For the data inputted on the terminal device to be uploaded to block chain.
Using the device of this specification one or more embodiment, by being directed to the first of terminal device according to the first user
Payment information, judges whether terminal device meets debt locking condition, and when determining that terminal device meets debt locking condition,
It is called from block chain with the payment for terminal device using intelligent contract corresponding to business, and determined based on intelligent contract
Lock operation corresponding with the lock mode is executed to the lock mode of terminal device, and then to terminal device.As it can be seen that the dress
It sets and terminal device is locked based on the intelligent contract in block chain, decentralization and intelligent contract due to block chain
Open and clear feature so that the lock operation of terminal device is no longer dependent on the developer of centralization, but can be by multi-party
(all sides of such as terminal device, third party, terminal device holder) witnesses jointly, so that it is guaranteed that the lock machine process of terminal device
Audit, notarization, and avoid all kinds of dispute problems caused by the locking because of terminal device.
It should be understood that the above-mentioned terminal locking device based on block chain can be used to realize above
The terminal locking method based on block chain, datail description therein should be described with method part above it is similar, to avoid
It is cumbersome, it does not repeat separately herein.
Based on same thinking, this specification one or more embodiment also provides a kind of terminal locking based on block chain
Equipment, as shown in Figure 5.Terminal locking equipment based on block chain can generate bigger difference because configuration or performance are different,
It may include one or more processor 501 and memory 502, can store one or one in memory 502
Application program or data stored above.Wherein, memory 502 can be of short duration storage or persistent storage.It is stored in memory 502
Application program may include one or more modules (diagram is not shown), each module may include to based on block chain
Terminal locking equipment in series of computation machine executable instruction.Further, processor 501 can be set to and store
Device 502 communicates, and the executable finger of series of computation machine in memory 502 is executed in the terminal locking equipment based on block chain
It enables.Terminal locking equipment based on block chain can also include one or more power supplys 503, one or more are wired
Or radio network interface 504, one or more input/output interfaces 505, one or more keyboards 506.
Specifically in the present embodiment, the terminal locking equipment based on block chain includes memory and one or one
Above program, perhaps more than one program is stored in memory and one or more than one program can be with for one of them
Including one or more modules, and each module may include to a series of in the terminal locking equipment based on block chain
Computer executable instructions, and be configured to execute this or more than one program by one or more than one processor
Comprising for carrying out following computer executable instructions:
It is directed to the first payment information of terminal device according to the first user, judges whether the terminal device meets debt lock
Fixed condition;
It is closed with the payment for the terminal device using intelligence corresponding to business if so, being called from block chain
About, the lock mode to the terminal device is determined based on the intelligent contract;
Lock operation corresponding with the lock mode is executed to the terminal device.
Optionally, computer executable instructions when executed, can also make the processor:
It is directed to the expection payment information of the terminal device according to first user, determines first user nearest one
The secondary expected payment time for the terminal device;
According to first payment information, judge whether first user before the expected payment time executes needle
Payment operation to the terminal device;
If it is not, then generating the overdue record of not paying the fees of first user, overdue do not pay the fees is recorded described in write-in
Block chain;And determine that the terminal device meets the debt locking condition.
Optionally, computer executable instructions when executed, can also make the processor:
It is directed to the second payment information of terminal device according to first user, judges whether the terminal device meets solution
Bolt part;
If so, determining the unlocking manner to the terminal device based on the intelligent contract;
Unlock operation corresponding with the unlocking manner is executed to the terminal device.
Optionally, computer executable instructions when executed, can also make the processor:
According to second payment information, judge whether first user performs handing in retroactively for the terminal device
Debt operation;
If so, the debt of handing in retroactively for generating first user records, the block is written into the debt record of handing in retroactively
Chain;And determine that the terminal device meets the unlocking condition.
Optionally, computer executable instructions when executed, can also make the processor:
First payment information that terminal device is directed to according to the first user, it is deficient to judge whether the terminal device meets
Before money locking condition, the use solicited message that first user is directed to the terminal device is obtained;
The block chain is written using solicited message by described;
Wherein, the use solicited message includes at least one of following: the order placement information of first user, delivery side are right
The Shipping Information of the terminal device, the information of receiving of first user.
Optionally, computer executable instructions when executed, can also make the processor:
First payment information that terminal device is directed to according to the first user, it is deficient to judge whether the terminal device meets
Before money locking condition, in response to the contract write request of the intelligent contract is written into the block chain, the intelligence is judged
Whether the write-in side of energy contract has the write-in permission to the intelligent contract;
If so, the block chain is written in the intelligent contract according to the contract write request.
Optionally, computer executable instructions when executed, can also make the processor:
After the overdue record of not paying the fees for generating first user, by the overdue record hair of not paying the fees of generation
It send at least one and specifies node;
When receiving confirmation operation of at least one the described indication node to the overdue record of not paying the fees, exceed described
Phase, which does not pay the fees to record, is written the block chain;And determine that the terminal device meets the debt locking condition.
Optionally, credible performing environment TEE, key authentication device and data entry are equipped in the terminal device;
Wherein, used key is verified when the key authentication device is used for the intelligent contract described to calling;It is described
Data entry is used to the data inputted on the terminal device being uploaded to the block chain.
This specification one or more embodiment also proposed a kind of computer readable storage medium, this is computer-readable to deposit
Storage media stores one or more programs, which includes instruction, and it is included multiple application programs which, which works as,
Electronic equipment execute when, the electronic equipment can be made to execute the above-mentioned terminal locking method based on block chain, and be specifically used for
It executes:
It is directed to the first payment information of terminal device according to the first user, judges whether the terminal device meets debt lock
Fixed condition;
It is closed with the payment for the terminal device using intelligence corresponding to business if so, being called from block chain
About, the lock mode to the terminal device is determined based on the intelligent contract;
Lock operation corresponding with the lock mode is executed to the terminal device.
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.It is a kind of typically to realize that equipment is computer.Specifically, computer for example may be used
Think personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play
It is any in device, navigation equipment, electronic mail equipment, game console, tablet computer, wearable device or these equipment
The combination of equipment.
For convenience of description, it is divided into various units when description apparatus above with function to describe respectively.Certainly, implementing this
The function of each unit can be realized in the same or multiple software and or hardware when specification one or more embodiment.
It should be understood by those skilled in the art that, this specification one or more embodiment can provide for method, system or
Computer program product.Therefore, complete hardware embodiment can be used in this specification one or more embodiment, complete software is implemented
The form of example or embodiment combining software and hardware aspects.Moreover, this specification one or more embodiment can be used one
It is a or it is multiple wherein include computer usable program code computer-usable storage medium (including but not limited to disk storage
Device, CD-ROM, optical memory etc.) on the form of computer program product implemented.
This specification one or more embodiment is referring to according to the method for the embodiment of the present application, equipment (system) and meter
The flowchart and/or the block diagram of calculation machine program product describes.It should be understood that can be realized by computer program instructions flow chart and/
Or the combination of the process and/or box in each flow and/or block and flowchart and/or the block diagram in block diagram.It can
These computer program instructions are provided at general purpose computer, special purpose computer, Embedded Processor or other programmable datas
The processor of equipment is managed to generate a machine, so that holding by the processor of computer or other programmable data processing devices
Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram
The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates,
Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or
The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one
The step of function of being specified in a box or multiple boxes.
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net
Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves
State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable
Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM),
Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices
Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates
Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
This specification one or more embodiment can computer executable instructions it is general on
It hereinafter describes, such as program module.Generally, program module includes executing particular task or realization particular abstract data type
Routine, programs, objects, component, data structure etc..The application can also be practiced in a distributed computing environment, at these
In distributed computing environment, by executing task by the connected remote processing devices of communication network.In distributed computing
In environment, program module can be located in the local and remote computer storage media including storage equipment.
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.Especially for system reality
For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method
Part explanation.
The foregoing is merely this specification one or more embodiments, are not limited to this specification.For this
For the technical staff of field, this specification one or more embodiment can have various modifications and variations.It is all in this specification one
Any modification, equivalent replacement, improvement and so within the spirit and principle of a or multiple embodiments, should be included in this explanation
Within the scope of the claims of book one or more embodiment.