Summary of the invention
In view of this, the invention provides a kind of method and apparatus realizing device activation, saved the storage space that equipment is limited, the equipment that ensure that needs can be activated when activating.
For solving the problems of the technologies described above, technical scheme of the present invention is achieved in that
Realize a method for device activation, the method comprises:
A, device id added random number encryption and generate equipment DID; Wherein, described equipment DID is for obtaining active coding;
B, acquisition active coding, if determine that the active coding obtained is legal, then use the active coding of described acquisition to carry out the normal operating condition of device activation access arrangement; Wherein, described active coding comprises equipment DID;
If the active coding that C carries out device activation is out of date, active coding out of date is deleted, and generates new equipment DID, perform step B; Otherwise, keep normal operating condition.
Realize an equipment for device activation, this equipment comprises: generation unit, acquiring unit, activation unit and processing unit;
Described generation unit, is connected with described acquiring unit, generates equipment DID for device id being added random number encryption; Wherein, described equipment DID is for obtaining active coding;
Described acquiring unit, is connected with described activation unit, and for obtaining active coding, wherein, described active coding comprises equipment DID;
Described activation unit, is connected with described processing unit, if for determining that the active coding obtained is legal, then use the active coding of described acquisition to carry out device activation and enter the normal operating condition of self place equipment;
Described processing unit, if the active coding carrying out device activation is out of date, deletes active coding out of date, and starts described generation unit and generate new equipment DID; Otherwise, make self place equipment keep normal operating condition.
In sum, the present invention adds generating random number equipment DID by device id, and obtains active coding by the equipment DID generated; If the active coding carrying out device activation is out of date, then delete, and can generate new equipment DID immediately, therefore present invention saves the storage space that equipment is limited, the equipment that ensure that needs can be activated when activating.
Embodiment
For making object of the present invention, technical scheme and advantage clearly understand, to develop simultaneously embodiment referring to accompanying drawing, scheme of the present invention is described in further detail.
Be present device Activiation method process flow diagram see Fig. 1, Fig. 1.Concrete steps are as follows:
Step 101, adds random number encryption and generates equipment exclusive identification code (DID) by device id; Wherein, equipment DID is for obtaining active coding.
Step 102, obtains active coding, if determine that the active coding obtained is legal, then uses the active coding of acquisition to carry out the normal operating condition of device activation access arrangement; Wherein, active coding comprises equipment DID.
If the active coding that step 103 carries out device activation is out of date, active coding out of date is deleted, and generates new equipment DID, perform step 102.
If the active coding that step 104 carries out device activation is not out of date, equipment keeps normal operating condition.
Referring to accompanying drawing, describe present device Activiation method processing procedure in detail, and prevent expired active coding from reusing the process of carrying out device activation.Be realize device activation method flow diagram in the specific embodiment of the invention see Fig. 2, Fig. 2.Concrete steps are as follows:
Step 201, device id is added random number encryption and generates equipment DID by equipment.
Random number in this step can be added on before device id, also can after, figure place also can set according to actual needs.Equipment DID is directly related with device id, but owing to adding random number, each equipment DID generated is different.
Step 202, equipment obtains active coding, and wherein, the active coding of this acquisition comprises capable field, equipment DID and relational check code.
In this step, the active coding that equipment obtains is the active coding obtained from equipment supplier by DID and authorization code by some networked devices.The relational check code that active coding comprises is that the capable field comprised in the application equipment DID of this active coding and active coding obtains after computations.The computations herein mentioned is consistent with existing implementation, as long as equipment knows this encryption computing method too.This relational check code and equipment DID unique association.
The process obtaining active coding is consistent with prior art, and just the active coding of prior art acquisition is directly relevant with device id, and the present embodiment is directly correlated with equipment DID, and equipment DID is directly correlated with device id.
Step 203, if by verification relational check code, equipment determines that the active coding obtained is legal, uses the active coding activated equipment access arrangement normal operating condition that obtain.
Because active coding comprises capable field, equipment DID and relational check code, when therefore equipment obtains active coding, this active coding can be resolved, obtain capable field and the relational check code of active coding respectively.
Method of calibration in this step is: equipment DID is obtained this locality to the capable field that parsing active coding obtains by corresponding computations and verifies associated code by equipment, then compare with the relational check code of resolving active coding acquisition, if the same, then determine that this active coding is legal; Otherwise, determine that this active coding is illegal, can not activated equipment.
When using active coding activated equipment, active coding can be stored in the storage space of equipment.
Step 204, the active coding set of successful activation equipment is significant notation by equipment, carries out countdown function to this active coding simultaneously.
Step 205, judges that whether the active coding carrying out device activation is out of date, if so, performs step 206; Otherwise, perform step 209.
Active coding set is invalid markers by step 206.
If the active coding of activated equipment is out of date, needs to use new active coding to carry out device activation, then obtain new active coding with step 202 from equipment supplier, and carry out legitimate verification, use legal active coding activated equipment.
If now obtain legal active coding without step 202, but carry out activated equipment again with used expired active coding, then when using this active coding out of date to carry out device activation, if when equipment this locality finds the consistent active coding of active coding out of date with this, then can not use this active coding activated equipment out of date, otherwise whether the active coding verifying this new acquisition is legal.Method of calibration is also whether the relational check code comprised with the capable field computations relational check code coactivation code that equipment DID coactivation code comprises is consistent.
Whether step 207, delete active coding out of date, if so, performs step 208; Otherwise perform step 209.
Whenever only there is an equipment DID in a device, also can be referred to as current device DID, when whether verification will use the active coding of activated equipment legal, calculated by current device DID.Expired active coding can be deleted immediately in this step, also can store several expired active coding and delete together.During the active coding of not Delete Expired, new equipment DID can not be generated.
Step 208, generates new equipment DID, performs step 202.
Generating and new establish the method for DID constant, is device id is added random number to generate through encryption equally, and the DID comprised in therefore newly-generated equipment DID and the active coding out of date of deletion scarcely together.
Step 209, equipment is in normal operating condition, until use the active coding of activated equipment out of date, performs step 206.
Above-mentioned flow process is the equipment DID generated by authorization code and equipment obtains authorization code process from equipment supplier.The authorization code of such acquisition is generally all legal on form, if but the active coding set up voluntarily, or the active coding of other equipment, form is exactly illegal, for the same prior art of this situation process of the present invention, first on form, determine that this active coding is inconsistent with the legal active coding of equipment, then such active coding can not carry out device activation, also can not carry out verification again and determine.Here this situation is repeated no more.
When needing to carry out device activation, also likely reusing active coding out of date and carry out device activation, is prevent active coding out of date activated equipment process flow diagram again in the specific embodiment of the invention see Fig. 3, Fig. 3.Concrete steps are as follows:
Step 301, equipment use active coding out of date carries out device activation.
Step 302, equipment is searched in this locality, determines whether there is the active coding that active coding out of date with this is identical, if so, performs step 304; Otherwise, perform step 303.
For active coding out of date, if also do not deleted, then when reusing, then can find this active coding out of date in equipment this locality.
For active coding out of date, if deleted, then reuse and carry out device activation constantly, then, when equipment this locality is searched, there is not the active coding that the active coding out of date with this is identical.
Step 303, the capable field that equipment DID and active coding out of date comprise by equipment, through computations, obtains relational check code, and the relational check code that this relational check code calculated and active coding out of date comprise is inconsistent.Perform step 304.
Determine whether further to may be used for device activation to expired active coding non-existent in equipment in this step.Due to new equipment DID can be generated immediately when the active coding of Delete Expired, therefore compare with the relational check code that active coding out of date comprises with the relational check code that new equipment DID calculates, scarcely can be consistent.
Step 304, equipment can not use this active coding activated equipment out of date.
Said process can be found out in the present embodiment and well prevent the problem that active coding out of date carries out device activation again.No matter whether active coding out of date is deleted in time, all can prevent active coding out of date from carrying out device activation.
Based on above-mentioned same inventive concept, the present invention also proposes a kind of equipment realizing device activation.It is the device structure schematic diagram realizing device activation in the specific embodiment of the invention see Fig. 4, Fig. 4.This equipment comprises: generation unit 401, acquiring unit 402, activation unit 403 and processing unit 404.
Generation unit 401, is connected with acquiring unit, generates equipment DID for device id being added random number encryption; Wherein, equipment DID is for obtaining active coding.
Acquiring unit 402, be connected with activation unit 403, for obtaining active coding, wherein, active coding comprises equipment DID.
Activate unit 403, be connected with processing unit 404, if be legal for the active coding determining acquisition, then use the active coding of acquisition to carry out device activation and enter the normal operating condition of self place equipment.
Processing unit 404, if out of date for the active coding carrying out device activation, delete active coding out of date, and starts generation unit 401 and generate new equipment DID; Otherwise, make self place equipment keep normal operating condition.
Preferably,
The active coding that acquiring unit 402 obtains also comprises capable field and relational check code; Relational check code is that equipment DID and capable field obtain through computations.
Preferably,
Activate unit 403, capable field for comprising in the active coding that equipment DID and acquiring unit 402 obtained obtains relational check code through computations, by the relational check code calculated compared with the relational check code comprised in the active coding of acquisition, if comparative result is consistent, then determine that the active coding obtained is legal.
Preferably,
Activate unit 403, when being further used for using active coding out of date to carry out device activation, if find the identical active coding of active coding code out of date with this at self place equipment, then can not use this active coding activated equipment out of date; If do not find the active coding that active coding out of date with this is identical, then the capable field comprised in equipment DID and this active coding out of date is obtained relational check code through computations, compared with the relational check code that comprises in active coding out of date to the relational check code calculated and this, comparative result is inconsistent, then can not use this active coding activated equipment out of date.
The unit of above-described embodiment can be integrated in one, and also can be separated deployment; A unit can be merged into, also can split into multiple subelement further.
In sum, the present invention is by the incidence relation between device id, equipment DID, active coding, by verification relational check code, ensure that the active coding legal to theoretical form accomplishes to carry out the determination of legitimacy on freestanding environment under not by the environment of On line inspection.Because equipment DID is variable, active coding out of date on equipment can be deleted, and generate new equipment DID immediately, verification is participated in by newly-generated equipment DID, prevent out of date and deleted active coding reconditioning equipment, therefore, when reaching the active coding function of expection, the storage space of equipment has been saved, and then can normal Activate when guaranteeing that equipment needs to activate.
The above, be only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.