Summary of the invention
The technical matters that the present invention solves is, in prior art, adopt by store in the controls in advance duration by stages and by stages password control system to be controlled and by use password by stages mode that activated equipment uses the regular hour, but due to duration by stages and by stages the information such as password be all stored in advance in the middle of equipment, and the management for equipment caused dumb, even safety and reliability all cannot be protected, for leasing of equipment side brings the problem of great operations risks, and then provide a kind of optimization for realizing the system and method that equipment is leased by stages.
The technical solution adopted in the present invention is, a kind of for realizing the system that equipment is leased by stages, described system comprise cloud main frame, equipment by stages control subsystem and with the described equipment equipment that is equipped with of control subsystem by stages;
Described cloud main frame comprises device databases, payment module and equipment All-round administration module; Described device databases is used for the identification number of memory device, key and verification password
; Described payment module for the treatment of client payment information and payment information is submitted to equipment All-round administration module; The equipment information by stages that described equipment All-round administration module is submitted to for receiving payment module, generates the active information of described equipment, after cryptographic algorithm encryption, export ciphering activation information
;
Described equipment by stages control subsystem comprises memory module, load module, deciphering module, statistical module and device control module; Described memory module is used for identification number, the key of memory device and verifies password
; The ciphering activation information that described load module sends for receiving cloud main frame
, and by ciphering activation information
pass to deciphering module; Described deciphering module utilizes the key in memory module, uses decipherment algorithm to ciphering activation information
be decrypted, from deciphering active information
middle extraction verification password
, when finding in a storage module and described verification password
identical verification password
, then the ciphering activation information received is assert
effectively, and from deciphering active information
in extract equipment by stages information pass to statistical module, simultaneously by the verification password that in memory module, the match is successful
delete; Statistics for adding up the service condition of equipment, and is fed back to device control module by described statistical module; Described device control module is according to the statistics opertaing device of statistical module;
Described verification password
in,
, described verification password
in,
, wherein,
,
for positive integer.
Preferably, described verification password
by
individual byte composition, described verification password
before
individual byte generates according to the sequence increased progressively, remaining
individual byte is generated by random mode, wherein
with
for positive integer, and
,
group verification password
storage space continuous;
,
for positive integer.
Preferably, described equipment by stages information comprise equipment duration and equipment progress by stages by stages.
Preferably, described statistical module comprises threshold value
with equipment progress by stages, statistical module is receiving equipment by stages after information, according to the equipment in equipment by stages information by stages duration upgrade threshold value
, according to the equipment in equipment by stages information by stages progress upgrade the equipment progress by stages in statistical module.
Preferably, the result that described device control module feeds back according to statistical module controls equipment, and equipment by stages progress has higher priority, when equipment by stages progress do not meet equipment require by stages time, the switch of equipment is by the threshold value after upgrading
determine; When progress meets requiring of equipment to equipment by stages by stages, can the term of life of permanent activation equipment, equipment is complete to be sold.
Preferably, described decipherment algorithm adopts identical symmetric encipherment algorithm or rivest, shamir, adelman with described cryptographic algorithm.
Preferably, described equipment All-round administration module, according to the payment information received, is found out the data of corresponding device, is comprised the identification number of equipment, key from device databases, and obtains one group of verification password
, will password be verified
with equipment by stages information after cryptographic algorithm is encrypted, generate ciphering activation information
; After having encrypted, used verification password
delete from device databases;
;
for positive integer.
Preferably, described payment module allows client to register corresponding account by the identification number of equipment control subsystem by stages, and described payment module supports that client carries out payment by the mode of on-line payment or cash or rechargeable card to this account and come to lease by stages.
Preferably, described equipment All-round administration module manages equipment, for expiring and exceeding the equipment that certain hour do not continue to pay dues, sends Stop message to relevant device, the operation of arrestment.
For realizing the method that equipment is leased by stages, described method comprises the following steps:
Step 1.1: after client's purchase of equipment, payment
activated equipment;
Step 1.2: cloud main frame receives the payment of client
after, the payment module of cloud main frame is from payment
in extract the equipment and payment information leased by stages, and information is passed to equipment All-round administration module;
Step 1.3: equipment All-round administration module calculates equipment information by stages according to payment information, described equipment by stages information comprises equipment duration and equipment progress by stages by stages;
Step 1.4: equipment All-round administration module finds out corresponding facility information according to the identification number of the equipment All-round administration module that payment module is fed back from device databases, therefrom extracts key and one group of verification password
;
Step 1.5: equipment All-round administration module activates facility information, and according to cryptographic algorithm, encrypted by the active information of double secret key equipment, the active information of equipment comprises verification password
with equipment information by stages, encrypt rear generation ciphering activation information
;
Step 1.6: after having encrypted, by this group verification password in database
delete;
Step 1.7: by the ciphering activation information generated
send to client or equipment;
Step 1.8: client is by ciphering activation information
input to equipment control subsystem by stages by load module, load module is by ciphering activation information
pass to deciphering module;
Step 1.9: deciphering module takes out key from memory module, and the ciphering activation information using double secret key to receive
be decrypted, obtain verifying password
with equipment information by stages;
Step 1.10: deciphering module searches for all verification passwords from memory module
;
Step 1.11: if the verification password with the active information of equipment can be found
identical verification password
, then step 1.13 is entered; As can not find, then enter step 1.12;
Step 1.12: this activates unsuccessfully, the active information of the equipment received is invalid; Enter step 1.1;
Step 1.13: this activates successfully, the equipment in the active information of the equipment received by stages information is effective, deletes this group verification password in a storage module
;
Step 1.14: whether the equipment of statistical module checkout facility by stages in information by stages progress meets equipment and lease requirement by stages, if meet, enters step 1.17; If do not met, then enter step 1.15;
Step 1.15: statistical module is according to the statistical threshold of the equipment of the equipment received by stages in information duration update module by stages
;
Step 1.16: this activates successfully; Enter step 1.1;
Step 1.17: equipment completes by stages, equipment is sold completely.
The invention provides a kind of optimization for realizing the system and method that equipment is leased by stages, by cloud main frame, equipment control subsystem and set up some group keys with equipment room and verify password by stages
, do not need to preset number of times, equipment duration by stages by stages, each double secret key that uses verifies password
with equipment by stages information be encrypted and obtain ciphering activation information
, equipment is for ciphering activation information
after being decrypted, obtaining the equipment that is included in equipment progress, equipment duration etc. by stages by stages by stages in information, namely can adjust equipment duration and number of times by stages at any time, On-line Control, very flexibly; Statistical module of the present invention can adopt different statistics according to different equipment, thus the duration of use by stages of management distinct device, control the normal use of equipment, therefore the method better can realize the lease by stages of various expensive device, and general degree is high; Adopt the cryptographic algorithm of high strength for verification password in the present invention
with equipment by stages information be encrypted, obtain ciphering activation information
, the security of equipment information is by stages greatly improved, and the operations risks of leasing of equipment side reduces greatly.
Embodiment
Below in conjunction with embodiment, the present invention is described in further detail, but protection scope of the present invention is not limited to this.
The technical solution adopted in the present invention is, a kind of for realizing the system that equipment is leased by stages, described system comprise cloud main frame, equipment by stages control subsystem and with the described equipment equipment that is equipped with of control subsystem by stages;
Described cloud main frame comprises device databases, payment module and equipment All-round administration module; Described device databases is used for the identification number of memory device, key and verification password
; Described payment module for the treatment of client payment information and payment information is submitted to equipment All-round administration module; The equipment information by stages that described equipment All-round administration module is submitted to for receiving payment module, generates the active information of described equipment, after cryptographic algorithm encryption, export ciphering activation information
;
Described equipment by stages control subsystem comprises memory module, load module, deciphering module, statistical module and device control module; Described memory module is used for identification number, the key of memory device and verifies password
; The ciphering activation information that described load module sends for receiving cloud main frame
, and by ciphering activation information
pass to deciphering module; Described deciphering module utilizes the key in memory module, uses decipherment algorithm to ciphering activation information
be decrypted, from deciphering active information
middle extraction verification password
, when finding in a storage module and described verification password
identical verification password
, then the ciphering activation information received is assert
effectively, and from deciphering active information
in extract equipment by stages information pass to statistical module, simultaneously by the verification password that in memory module, the match is successful
delete; Statistics for adding up the service condition of equipment, and is fed back to device control module by described statistical module; Described device control module is according to the statistics opertaing device of statistical module;
Described verification password
in,
, described verification password
in,
, wherein,
,
for positive integer.
In the present invention, identification number is unique device id that equipment writes before dispatching from the factory, for identifying the equipment that this is sold.
In the present invention, load module can realize input by the mode such as keyboard or Infrared remote controller, and the communications such as GSM, GPRS, 3G also can be adopted to realize, and this is the technology of those skilled in the art's easy understand, can be realized by various technological means.In the application of reality, equipment by stages control subsystem receives by load module the ciphering activation information that cloud main frame sends
if equipment is positioned at can communication zone, then equipment by stages control subsystem directly can receive by the mode of radio communication the ciphering activation information that cloud main frame sends
, when equipment is in the region that can not communicate, then client can be leased by the mode such as mobile phone, online by stages and obtain ciphering activation information
, manually by ciphering activation information
by the mode such as keyboard, infrared remote control input equipment control subsystem by stages.
In the present invention, statistical module can decide objects of statistics according to the characteristic of product, directly can add up the service time of equipment, also can add up equipment use amount or device fabrication output etc.
In the present invention, all data messages stored in the memory module of equipment control subsystem by stages needed to be stored in the device databases of cloud main frame before equipment dispatches from the factory, and ensured the consistance of data.
In the present invention, payment module supports the multiple modes of payments such as cash, rechargeable card, mobile payment, bank transfer.
In the present invention, arranging of control subsystem can for be directly built in equipment by stages for equipment, the information of direct statistics equipment opertaing device, independently can also exist relative to equipment, equipment by stages control subsystem and equipment room is undertaken alternately by the communication protocol such as serial ports, I2C, SPI, CAN, RS485 bus, Ethernet, Wifi, bluetooth, ZigBee and equipment; In the present invention, the information interaction of module and intermodule can also adopt various data transfer mode to complete, and this is the technology of those skilled in the art's easy understand, can be realized by various technological means.
Described verification password
by
individual byte composition, described verification password
before
individual byte generates according to the sequence increased progressively, remaining
individual byte is generated by random mode, wherein
with
for positive integer, and
,
group verification password
storage space continuous;
,
for positive integer.
In the present invention, before equipment dispatches from the factory, need in the memory module of equipment control subsystem by stages the relevant information of write device, mainly comprise the equipment identification number of control subsystem, key and some groups of verification passwords by stages
, conveniently verify password
addressing, verification password
memory address side-play amount be directly included in verification password
in the middle of, and in a storage module, any one group of verification password
be all unique, namely verify password
in,
, wherein
for positive integer, each group verification password
by
individual byte composition, conveniently finds fast and verifies password accordingly
, verification password
before
individual byte generates according to the sequence increased progressively, remaining
individual byte is generated by random mode, thus ensures
establishment, therefore,
group verification password
storage space continuous.In the present invention, the verification password in memory module
in like manner arrange and
with
it can be dislocation coupling.
In the present invention, due to
group verification password
storage space continuous, therefore verification password
addressing can utilize verification password
in the address offset amount that comprises carry out immediate addressing, as verified password in memory module
form, the verification password extracted can be used
before
the content of individual byte adds verification password
the first address of storage area carry out addressing.
Described equipment by stages information comprises equipment duration and equipment progress by stages by stages.
Described statistical module comprises threshold value
with equipment progress by stages, statistical module is receiving equipment by stages after information, according to the equipment in equipment by stages information by stages duration upgrade threshold value
, according to the equipment in equipment by stages information by stages progress upgrade the equipment progress by stages in statistical module.
In the present invention, the service condition of statistical module to equipment is added up, generally directly can add up the service time of equipment, simultaneously also can according to the characteristic of equipment, the variable that can identify equipment use situation is added up, the variable such as access times of the output of such as equipment, consumes power, equipment.Statistical module regularly can preserve the result of statistics, prevents power down from causing loss of data.
In the present invention, statistical module comprises statistical threshold
and equipment progress by stages, deciphering module is at deciphering active information
success obtain after according to the equipment in equipment by stages information by stages duration and equipment by stages progress upgrade the threshold value of statistical module
with equipment progress by stages, the real-time comparative statistics result of statistical module and threshold value
if statistics is less than threshold value
then representing equipment state is state of activation, if statistics equals threshold value
, then representing equipment state is that activation expires, and statistics stops.Meanwhile, statistical module to equipment by stages progress monitor, if equipment by stages progress meet product and lease requirement by stages, then equipment disease stage state is that product is successfully sold; If equipment by stages progress does not reach product and leases requirement by stages, then equipment disease stage state is leased for not completing by stages.Statistical module in real time by the state of equipment and equipment by stages information feed back to device control module.
The result that described device control module feeds back according to statistical module controls equipment, and equipment by stages progress has higher priority, when equipment by stages progress do not meet equipment require by stages time, the switch of equipment is by the threshold value after upgrading
determine; When progress meets requiring of equipment to equipment by stages by stages, can the term of life of permanent activation equipment, equipment is complete to be sold.
In the present invention, the result that device control module feeds back according to statistical module controls equipment, when statistical module feedback equipment disease stage state be product successfully sell time, export control forever open equipment, namely lease reaches extreme value by stages, and equipment is complete to be sold; When the equipment disease stage state fed back is not for completing monthly payment plan, if the equipment state of feedback is state of activation, then open equipment, permission equipment normally works; If the equipment state of feedback is that activation expires, then closing device, the normal work of arrestment.
Described decipherment algorithm adopts identical symmetric encipherment algorithm or rivest, shamir, adelman with described cryptographic algorithm.
In the present invention, the equipment by stages decipherment algorithm of control subsystem and the cryptographic algorithm of cloud main frame adopts same algorithm, can be the symmetric encipherment algorithms such as AES, DES, 3DES, RC5, TEA, XTEA, IDEA, also can be the rivest, shamir, adelmans such as RSA, DSA, ECC.
Described equipment All-round administration module, according to the payment information received, is found out the data of corresponding device, is comprised the identification number of equipment, key from device databases, and obtains one group of verification password
, will password be verified
with equipment by stages information after cryptographic algorithm is encrypted, generate ciphering activation information
; After having encrypted, used verification password
delete from device databases;
;
for positive integer.
In the present invention, verify password accordingly if can find in a storage module
, then successful decryption is represented, deciphering active information
in the equipment that comprises information is effective by stages, verify password accordingly if can not find in a storage module
, then representative is deciphered unsuccessfully, and this active information received is invalid.
In the present invention, after successful decryption, need the verification password that the match is successful
with
delete, ensure the ciphering activation information that cloud main frame sends
uniqueness, i.e. the data stored in the memory module of all devices control subsystem by stages, all need before dispatching from the factory in device databases record, the data simultaneously in device databases and the data in each memory module must keep realtime uniform.
Described payment module allows client to register corresponding account by the identification number of equipment control subsystem by stages, and described payment module supports that client carries out payment by the mode of on-line payment or cash or rechargeable card to this account and come to lease by stages.
In the present invention, conveniently not there is the client of on-line payment means, can also put up cash and rechargeable card mode come lease pay, client utilizes general communication mode that the identification number of the money transaction amount of money or rechargeable card information and equipment control subsystem is by stages sent to payment module, payment module identifies the equipment of payment by the identification number of equipment control subsystem by stages, the information that lease pays is passed to equipment All-round administration module simultaneously.
Described equipment All-round administration module manages equipment, for expiring and exceeding the equipment that certain hour do not continue to pay dues, sends Stop message to relevant device, the operation of arrestment.
For realizing the method that equipment is leased by stages, described method comprises the following steps:
Step 1.1: after client's purchase of equipment, payment
activated equipment;
Step 1.2: cloud main frame receives the payment of client
after, the payment module of cloud main frame is from payment
in extract the equipment and payment information leased by stages, and information is passed to equipment All-round administration module;
Step 1.3: equipment All-round administration module calculates equipment information by stages according to payment information, described equipment by stages information comprises equipment duration and equipment progress by stages by stages;
Step 1.4: equipment All-round administration module finds out corresponding facility information according to the identification number of the equipment All-round administration module that payment module is fed back from device databases, therefrom extracts key and one group of verification password
;
Step 1.5: equipment All-round administration module activates facility information, and according to cryptographic algorithm, encrypted by the active information of double secret key equipment, the active information of equipment comprises verification password
with equipment information by stages, encrypt rear generation ciphering activation information
;
Step 1.6: after having encrypted, by this group verification password in database
delete;
Step 1.7: by the ciphering activation information generated
send to client or equipment;
Step 1.8: client is by ciphering activation information
input to equipment control subsystem by stages by load module, load module is by ciphering activation information
pass to deciphering module;
Step 1.9: deciphering module takes out key from memory module, and the ciphering activation information using double secret key to receive
be decrypted, obtain verifying password
with equipment information by stages;
Step 1.10: deciphering module searches for all verification passwords from memory module
;
Step 1.11: if the verification password with the active information of equipment can be found
identical verification password
, then step 1.13 is entered; As can not find, then enter step 1.12;
Step 1.12: this activates unsuccessfully, the active information of the equipment received is invalid; Enter step 1.1;
Step 1.13: this activates successfully, the equipment in the active information of the equipment received by stages information is effective, deletes this group verification password in a storage module
;
Step 1.14: whether the equipment of statistical module checkout facility by stages in information by stages progress meets equipment and lease requirement by stages, if meet, enters step 1.17; If do not met, then enter step 1.15;
Step 1.15: statistical module is according to the statistical threshold of the equipment of the equipment received by stages in information duration update module by stages
;
Step 1.16: this activates successfully; Enter step 1.1;
Step 1.17: equipment completes by stages, equipment is sold completely.
Embodiment:
Being provided with equipment price is 1000 yuan, the payment of points 10 phases, each issue 100 yuan, be for each issue 30 days.
The identification number of this equipment, key and 10 groups of verification passwords are write in the memory module of equipment control subsystem by stages
, in order to realize verifying password
immediate addressing, verification password
be made up of four bytes, ten groups of verification passwords
first character joint content be (0,1,2,3 ..., 8,9), its excess-three byte is random number, and ensures ten groups of verification passwords
rear three bytes all not identical, ten groups verification passwords
be stored in continuous print storage space, first address is 0.Data in memory module are kept in the device databases of cloud main frame simultaneously.
After equipment is purchased, equipment is the statistical module real-time inspection statistics of control subsystem and equipment progress by stages by stages, if equipment by stages progress reach 100%, then allow equipment normally to use, lease reaches extreme value, is and buys completely; If equipment by stages progress does not arrive 100%, then check statistics, if statistics is less than threshold value
, then equipment is allowed normally to use; If statistics equals threshold value
, then arrestment normally works, and client needs to carry out could using after active information is bought in payment.
Client can carry out finance lease by the mode of on-line payment to equipment or pay by buying the mode of rechargeable card, if paid the bill by the mode of on-line payment, can directly according to equipment by stages control subsystem identification number give in cloud main frame, registered corresponding account, direct-on-line is paid the bill to account; If pay the bill by buying the mode of rechargeable card, need equipment that the identification number of control subsystem and the rechargeable card information bought send to the payment module of cloud main frame by stages.Client can pay the bill according to each issue modes of 100 yuan, also can single purchase many phases, if client's first time direct payment 300 yuan, then equipment by stages progress be 30%, equipment by stages duration is 90 days.
It is 90 days that the equipment All-round administration system of cloud main frame calculates the equipment current period equipment use duration bought of paying the bill according to payment information, and records the equipment progress by stages of this equipment, and primary progress is 30%, and follow-up equipment by stages progress accumulation calculates; If second time payment is 200 yuan, then the equipment after second time payment by stages progress is 50%, by equipment duration and equipment progress constitution equipment information by stages by stages by stages, obtains first group of verification password from device databases simultaneously
, verification password
with equipment by stages information form the active information of this equipment.
Equipment All-round administration module uses key to be encrypted by the active information of AES encryption algorithm to equipment, after having encrypted, by ciphering activation information
in used first group verification password
delete from device databases, and by ciphering activation information
equipment control subsystem is by stages sent to by GPRS mode.
Equipment by stages control subsystem receives ciphering activation information by GPRS module
, deciphering module passes through AES decipherment algorithm to ciphering activation information
be decrypted, the key of deciphering obtains from memory module.
After having deciphered, from deciphering active information
in extract entrained first group of verification password
, this verification password
first character joint be 0, therefore side-play amount is (0 × 4), and the verification password stored in memory module
first address be 0, therefore directly calculate in memory module and verify password
address be 0, if the verification password found
with deciphering active information
entrained verification password
identical, then represent this active information received effective, and by the verification password that the match is successful
delete from memory module, ensure the uniqueness of the active information of each equipment received.
From the active information of effective equipment, extract equipment duration and the equipment progress by stages by stages of equipment information by stages, equipment by stages duration is 90 days, and equipment by stages progress is 30%.
Statistical module, according to the equipment received duration by stages, upgrades the threshold value of statistical module
, directly by the equipment received by stages duration add existing threshold value
obtain new threshold value
, progress by stages of simultaneously updating the equipment is 30%.Statistical module is according to equipment tempo instructions equipment disease stage state by stages, and equipment is when progress is less than 100% by stages, and instruction disease stage state is not for complete monthly payment plan; If equipment by stages progress is 100%, then disease stage state is indicated to be that product is successfully sold; The real-time comparative statistics result of statistical module and threshold value simultaneously
if the result of statistics is less than threshold value
, then indicating equipment state is state of activation; If statistics equals threshold value
, then indicating equipment state is that activation expires; By equipment, information and equipment state feed back to device control module to statistical module by stages.
Device control module controls equipment according to statistical module feedack, successfully sells, then forever open equipment if the disease stage state of equipment is product; If disease stage state is not for complete monthly payment plan, then control according to the state of equipment, if the state of equipment is state of activation, then open equipment; Expire if the state of equipment is activation, then closing device; Require that client re-starts lease, activated equipment to equipment.
If the payment full amount of equipment meets the requirement that equipment is leased in the active information of equipment by stages, then the equipment that represents completes full payment, and lease reaches extreme value, and equipment transfers to buys state, and device control module forever opens equipment, and permission equipment normally uses.
Equipment All-round administration module in cloud main frame carries out real-time management to all equipment of selling, for monthly payment plan do not complete and the operating period bought overdue equipment monitor, do not continue to pay dues if client exceedes certain hour, then send closing device information by GPRS module, direct long-range closing device, prevents equipment to be cracked use.
The present invention can also be applied to the lease of equipment, and namely equipment is fully active never.Concrete operations mode is: cloud main frame by equipment in the active information of the equipment at every turn transmitted by stages information equipment by stages progress be set to 0%, be the abundant verification password of Equipments Setting simultaneously
, as configured 1000 groups, even if use so weekly one group to verify password
carry out activated equipment, equipment also may be used for the lease of about 20 years, in addition, at verification password
after using, in the process that equipment is safeguarded, again can configure new a collection of verification password
, guarantee equipment can be in state of activation always, as the use of long-term lease.
The invention solves in prior art, adopt by store in the controls in advance duration by stages and by stages password control system to be controlled and by use password by stages mode that activated equipment uses the regular hour, but due to duration by stages and by stages the information such as password be all stored in advance in the middle of equipment, and the management for equipment caused dumb, even safety and reliability all cannot be protected, for leasing of equipment side brings the problem of great operations risks, by at cloud main frame, equipment control subsystem and set up some group keys and verify password with equipment room by stages, do not need to preset number of times by stages, equipment is duration by stages, each use double secret key verification password
with equipment by stages information be encrypted and obtain ciphering activation information
, equipment is for ciphering activation information
after being decrypted, obtaining the equipment that is included in equipment progress, equipment duration etc. by stages by stages by stages in information, namely can adjust equipment duration and number of times by stages at any time, On-line Control, very flexibly, statistical module of the present invention can adopt different statistics according to different equipment, thus the duration of use by stages of management distinct device, control the normal use of equipment, therefore the method better can realize the lease by stages of various expensive device, and general degree is high, adopt the cryptographic algorithm of high strength for verification password in the present invention
with equipment by stages information be encrypted, obtain ciphering activation information
, the security of equipment information is by stages greatly improved, and the operations risks of leasing of equipment side reduces greatly.