A kind of method of factory reset
Technical field
The present invention relates to electronic technology field, especially a kind of method of factory reset.
Background technique
In general, current many electronic products have the function of " factory reset ", for less understanding that electronics produces
For the user of product, the function of " factory reset " is significantly, and to realize the side of " factory reset " function
Method is also varied.
By taking intelligent switch as an example, it is internally provided with the mechanical key of " factory reset ", when needs restore switch
When default setting, need first dismantle the shell of switch, then could application entity key complete " factory reset ", this
Technology is referred to as " hard reset ".For user is using angle, the factory reset method operation of such " hard reset " is numerous
It is trivial, dangerous, and a degree of damage easily is caused to product.
Summary of the invention
Factory reset method for solution part electronic product " hard reset " is cumbersome, dangerous, and easily to production
Product cause the problem of a degree of damage, and the present invention provides a kind of method of factory reset.
The technical scheme adopted by the invention is as follows:
A kind of method of factory reset comprising following steps:
S1, initiation parameter, and according to the operating time demand of corresponding electronic products factory reset set one when
Between threshold values;
S2, at least one key assignment by the electronic product surface, and it is arranged one group by key value in control system
The numerical ciphers for realizing " factory reset " function formed in a certain order;
S3, when needing to make the electronic product factory reset, operation button, control system real-time detection, which is operated, presses
The corresponding key value of key is simultaneously compared with the numerical ciphers, if the first sequence of the key value detected and the numerical ciphers
Number corresponds to, i.e. unlatching " factory reset " mode, and control system starts timing at this time, continues operation button, control system
Real-time detection is compared by the corresponding key value of operation button and with the numerical ciphers in the time threshold, if
Numerical value after the key value successively detected in the time threshold removes first ordinal number to the numerical ciphers on corresponding order is complete
Corresponding and not vacant, then the password for completing the electronic product resets, i.e. factory reset;Otherwise, operation failure is this time resetted,
Step S3 need to be repeated, carries out resetting operation next time.
Further, the parameter includes identifier and key value.
Preferably, the time threshold is 8s~9s.
Preferably, in step S3, if resetting operation failure, the original state of control system auto-returned step S3, etc.
To reset operation next time.
Preferably, the numerical ciphers only with a key to it is corresponding when after the reset operation failure, need to continue to operate
Any key, when key value being made to rise to setting value, control system just can be carried out resets operation next time.
Further, the key is the key for controlling electronic product power source on-off.
Preferably, the key is touch sensible key or mechanical key.
Preferably, the electronic product is smart home device.
Preferably, the first ordinal number is one or more.
The present invention is by being arranged one group by pressing by least one key assignment on electronic product surface, and in control system
The numerical ciphers for realizing " factory reset " function that key assignments forms in a certain order, thus needing to electronic product
When factory reset, no longer needs to dismantle electronic product and go to operate its internal corresponding entity of " factory reset " function and press
Key, so that the factory reset method for solving part electronic product " hard reset " is cumbersome, dangerous, and easily to product
The problem of causing a degree of damage has good operability, using safe, and the advantages of will not damage product.
Specific embodiment
Below by specific embodiment, the invention will be further described.
One the present embodiment of embodiment is produced with the electronics with 1 key (key as controlled electronic product power source on-off)
Product illustrate the method for factory reset of the invention comprising following steps:
S1, initialisation identifications symbol Flag==0, according to usual operating time demand, setting time threshold values is 3S;
S2, the key on the electronic product surface is assigned a value of any number, such as 9, and one group is arranged in control system
The numerical ciphers for realizing " factory reset " function being made of key value 9, such as 9999;
S3, when needing to make the electronic product factory reset, quickly operate continuously key 9 twice, control system is real
When detection be compared by the corresponding key value of operation button and with the numerical ciphers, if the key value detected with it is described
The first ordinal number 99 of numerical ciphers is corresponding, i.e. unlatching " factory reset " mode, and control system starts timing at this time, continues to grasp
Make key, one key of every operation, the value of Flag increases 1, control system in the time threshold real-time detection by operation button
Corresponding key value is simultaneously compared with the numerical ciphers, if successively detected in the scheduled time threshold by
Numerical value after key assignments removes first ordinal number to the numerical ciphers on corresponding order is completely corresponding and not vacant, i.e., in scheduled time valve
In value, corresponding key on electronic product surface is successively operated by 99, then the password for completing the electronic product resets, that is, restores
Default setting;Otherwise, operation failure is this time resetted, step S3 need to be repeated, carries out resetting operation next time.
Recovery factory of two the present embodiment of embodiment at least there is the electronic product of two keys to illustrate of the invention
The method of setting comprising following steps:
S1, initialisation identifications symbol Flag==0, according to usual operating time demand, setting time threshold values is 8S;
S2, the two of them key on the electronic product surface is successively assigned a value of any number, such as 1 and 2, and be in control
One group of numerical ciphers for realizing " factory reset " function being made of in a certain order key value 1 and 2 is set in system,
Such as 2122;
S3, when needing to make the electronic product factory reset, operation button 2, control system real-time detection is operated
The corresponding key value of key is simultaneously compared with the numerical ciphers, if the head of the key value detected and the numerical ciphers
Ordinal number 2 is corresponding, i.e. unlatching " factory reset " mode, and control system starts timing at this time, continues operation button, every operation
One key, the value of Flag increase 1, control system in the time threshold real-time detection by the corresponding key value of operation button
And be compared with the numerical ciphers, if the key value and the number successively detected is close in the time threshold
Code is completely corresponding and not vacant except the numerical value after first ordinal number on corresponding order, i.e., in scheduled time threshold, successively grasps by 122
Corresponding key on electronic product surface is made, then the password for completing the electronic product resets, i.e. factory reset;Otherwise,
Operation failure is this time resetted, step S3 need to be repeated, carries out resetting operation next time.
Recovery factory of three the present embodiment of embodiment at least there is the electronic product of three keys to illustrate of the invention
The method of setting comprising following steps:
S1, initialisation identifications symbol Flag==0, according to usual operating time demand, setting time threshold values is 9S;
S2, wherein three keys on the electronic product surface are successively assigned a value of any number, such as 3,6 and 7, and controlling
One group of number for realizing " factory reset " function being made of in a certain order key value 3,6 and 7 is set in system
Password, such as 337673;
S3, when needing to make the electronic product factory reset, quickly operate continuously key 3 twice, control system is real
When detection be compared by the corresponding key value of operation button and with the numerical ciphers, if the key value detected with it is described
The first ordinal number 33 of numerical ciphers is corresponding, i.e. unlatching " factory reset " mode, and control system starts timing at this time, continues to grasp
Make key, one key of every operation, the value of Flag increases 1, control system in the time threshold real-time detection by operation button
Corresponding key value is simultaneously compared with the numerical ciphers, if the key value successively detected in the time threshold with
The numerical ciphers are completely corresponding and not vacant except the numerical value after first ordinal number on corresponding order, i.e., in scheduled time threshold,
Corresponding key on electronic product surface is successively operated by 7673, then the password for completing the electronic product resets, that is, recovers
Factory's setting;Otherwise, operation failure is this time resetted, step S3 need to be repeated, carries out resetting operation next time.
Preferably, in the step S3 of any of the above-described embodiment, if resetting operation failure, control system auto-returned step
The original state of S3 waits and resets operation next time.In this way, being convenient for resetting operation next time after resetting operation failure.
Preferably, in any of the above-described embodiment, the key is touch sensible key or mechanical key.
Preferably, in any of the above-described embodiment, the electronic product is smart home device.
Therefore when needing to electronic product factory reset, factory reset method of the invention is not necessarily to
It dismantles electronic product again to go to operate its internal corresponding mechanical key of " factory reset " function, to solve part electricity
The factory reset method of sub- product " hard reset " is cumbersome, dangerous, and easily causes a degree of damage to product
The problem of, the advantages of there is good operability, using safe, and product will not be damaged.
The embodiment of the present invention is explained in detail above, but the present invention is not limited to above-described embodiments, in ability
Domain those of ordinary skill within the scope of knowledge, can also make obtaining various changes without departing from the purpose of the present invention
Change, also should be regarded as protection scope of the present invention.