Disclosure of Invention
In view of the above, the present invention provides a method for detecting a screenless smart watch, which can acquire device internal information by pressing a key when wireless communication is unavailable.
The specific technical scheme of the invention is as follows:
a method of detecting a screenless smart watch, the method comprising:
presetting a test initial code;
presetting function codes of various functions of the watch; all the function codes and the initial codes are N digits with the same digits, and the digits of the same digits of the function codes and the initial codes are different;
carrying out first operation on the watch key, and entering a detection step:
s1, inputting the code of the first digit: performing second operation on the watch key, wherein each time the second operation is performed, the digit of the current initial code of the counter is increased by 1 until the code of the first digit is equal to the numerical value of the function code of the function required to be detected by the user in the digit; carrying out third operation on the watch key;
s2, inputting a second digit code: performing second operation on the watch key, wherein each time the second operation is performed, the digit of the current initial code of the counter is increased by 1 until the code of the second digit is equal to the numerical value of the function code of the function required to be detected by the user in the digit; carrying out third operation on the watch key;
s3, if the initial code is N digits larger than 2, sequentially inputting codes of all digits after the second digit, and performing a third operation on the hand-table keys;
s4, matching the input N-digit code with the function code, if the matching is successful, the watch executes the function corresponding to the function code, and restores the N-digit code to the initial code and terminates the detection step; if the matching is unsuccessful, directly restoring the N-bit code number to the initial code and terminating the detection step;
in the detecting step, in the counting process of the counter, if the number of a certain number of bits after the counter is increased by 1 is equal to the number of the initial code at the number of the bits, the counter is increased by 1; if the code number of a certain digit is 9, the counter is marked as 0 and not carried after being increased by 1, and if the code number of the initial code of the digit is 0, the counter is marked as 1 and not carried after being increased by 1.
Furthermore, the watch is a single-key watch.
Further, the first operation and the third operation are both long-press keys.
Further, the long-press key is pressed for a time longer than 2 seconds.
Further, the second operation is a short key press.
Further, the second operation is a short press for more than 0.2 seconds and less than 2 seconds.
Further, in the detecting step, if the time length between any two times of the watch key operations is longer than 5 seconds, the N-bit code number is directly restored to the initial code, and the detecting step is terminated.
By the mode, the current state of the equipment can be effectively read on the equipment without a screen by a key password combination method, more useful information can be found when the equipment has problems, the direction for solving the problems is reduced, and the efficiency for solving the problems is improved.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below, and it is obvious that the described embodiments are a part of the embodiments of the present invention, but not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, and "a" and "an" generally include at least two, but do not exclude at least one, unless the context clearly dictates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe … … in embodiments of the present invention, these … … should not be limited to these terms. These terms are used only to distinguish … …. For example, the first … … can also be referred to as the second … … and similarly the second … … can also be referred to as the first … … without departing from the scope of embodiments of the present invention.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
Sometimes, the condition that Bluetooth cannot be connected exists in the screen-free watch, and at this time, a user cannot acquire information of the watch by Bluetooth binding with the watch. For a watch with a fault, once the Bluetooth binding fails, an operator or a developer has no way to start to detect the watch. In the prior art, except that a watch provided with a USB interface can be judged through a mobile terminal, a developer does not have any relevant solution at present for watches without screens (users cannot interact with the screens) and USB interfaces (no way to connect with terminals such as computers and the like).
The invention aims to provide a method for detecting various items of internal information of equipment under the conditions that no screen is provided, only keys are pressed, and wireless communication is unavailable.
As shown in fig. 1, function codes and initial codes of various functions of the watch are preset, wherein the function codes and the initial codes are preferably 3 digits, and the initial codes are preferably 000.
Pressing the key in the time length, entering the step II, telling the equipment that the first password X is to be input next, pressing for a short time, entering the step III, adding 1 to the X, returning to the step II after the addition is finished, pressing for a short time again, entering the step III, adding 1 to the X, and returning to the step II after the addition is finished. After confirming the first password X, pressing the key for a long time, entering a step IV, telling the equipment that the first password X is confirmed, waiting for inputting a second password Y, pressing for a short time, entering a step V, adding 1 to the Y, returning to the step IV after the addition is finished, pressing for a short time, entering the step V, adding 1 to the Y, and returning to the step IV after the addition is finished. After confirming the second password Y, pressing the key for a long time, entering step sixthly, telling the equipment that the second password Y is confirmed, waiting for inputting the third password Z, pressing for a short time, entering step seventy, adding 1 to Z, returning to step sixthly after adding, pressing for a short time again, entering step seventy, adding 1 to Z, and returning to step sixthly after adding. After the third password Z is confirmed, the key is pressed for a long time, the step is carried out, the device is told that the third password Z is confirmed, and the step ninthly is automatically carried out to match the passwords as 3 passwords are input at the moment. If the password is matched successfully, jump to the function corresponding to the password in the step (R). If the matching is not successful, jumping to the step I, and initializing the password to be 0. In the process of inputting the password by pressing the key, if the interval between two times of pressing the key exceeds 5 seconds, the password input is regarded as invalid, and the step I is returned to, and the password is initialized to be 000 again.
Each time short press and long press, the program will be recorded, until the corresponding password combination is satisfied, the corresponding test function will not be executed, so the function can be added without affecting the normal use of the client.
The method is described in detail below with respect to several functions.
Example one
The function is for obtaining the state that the bluetooth is connected, because the wrist-watch does not have the connection status of screen display bluetooth, at this moment, the user can't know whether the bluetooth of wrist-watch has connected.
The functions are as follows: and acquiring the Bluetooth connection state.
The initial code 000 is preset.
Function code for bluetooth connection status 321.
The detection method comprises the following steps:
firstly, initializing a password to be 000, pressing for a long time, entering a second step, and then pressing a key for a short time for 3 times, wherein the first password X is 3. And (4) after the first password is confirmed, long-time pressing is carried out to enter a step (iv), the key is pressed for 2 times in short time, and the second password Y is 2. After confirming the second password, the long press enters step (c), at this time, the short press is performed for 1 time, and at this time, the third password Z is 1. After confirming the third password, long-pressing again, entering the step (b), and confirming that the input of the third password is finished. Jumping to step ninthly because 3 passwords are filled, matching successfully because the input password accords with the function code 321 stored in the program in advance, executing step (c), and if the Bluetooth is connected at the moment, rotating the pointer in an anticlockwise direction for 1 circle; if the Bluetooth is not connected, the minute hand rotates clockwise for 2 circles, the tester knows that the current Bluetooth state of the device is the disconnected state, and after the minute hand rotates, the function is executed, the step I is skipped, and the input password is recovered to be 000. The manner in which the functions of the test procedure are performed may be customized.
Example two
Function name: and acquiring the percentage of the electric quantity.
Initial code: 000; function code: 411.
As a result: the functions performed after matching are ten times 30 degrees of the hour hand rotation electric quantity (the size between every two scale marks is 30 degrees), and one time 30 degrees of the minute hand rotation electric quantity.
The process is as follows: firstly, initializing the password to be 000, pressing for a long time, entering the step II, and then pressing the key for a short time for 4 times, wherein the first password X is 4. After confirming the first password, the long press is performed to step (c), the key is pressed for 1 time, and the second password Y is 1. After confirming the second password, the long press enters step (c), at this time, the short press is performed for 1 time, and at this time, the third password Z is 1. After confirming the third password, long-pressing again, entering the step (b), and confirming that the input of the third password is finished. And (c) jumping to step ninthly after the 3 passwords are filled, matching successfully because the input password accords with the password '411' stored in the program in advance, executing step (r), if the electric quantity is 98%, rotating the hour hand by 270 degrees (9) by 30 degrees and rotating the minute hand by 240 degrees (8) by 30 degrees, and obtaining the electric quantity percentage by the tester according to the rotation angles of the hour hand and the minute hand. And when the pointer is rotated, the function is executed, the step I is skipped back, and the input password is recovered to be 000.
EXAMPLE III
Function name: and setting a factory restoration function.
An initial code 111; password: 999.
As a result: the function executed after matching is that the hour hand and the minute hand rotate for one circle at the same time and represents the successful factory restoration.
The process is as follows: firstly, initializing the password to be 000, pressing for a long time, entering the step II, and then pressing the key for a short time for 8 times, wherein the first password X is 9. After confirming the first password, the long press is performed to step (iv), where the short press is performed 8 times, and the second password Y is 9. After confirming the second password, the long press enters step (c), at this time, the short press is performed 8 times, and at this time, the third password Z is 9. After confirming the third password, long-pressing again, entering the step (b), and confirming that the input of the third password is finished. And (3) jumping to step (ninthly) because the password is filled with 3 passwords, matching successfully because the input password accords with the password of '999' stored in the program in advance, executing step (r), running the program to restore the flow of factory functions, rotating a circle, informing a tester that the password key-press is successful and confirming to restart the flow. And when the pin is rotated completely, the function is executed completely, and the step I is skipped back to, and the input password is recovered to be 000.
Example four
In the counting process of the counter, if the number of codes is already 9 in the accumulation process of the counter, at this time, 1 is added, theoretically, the number of codes is changed into 0 and advances by 1, however, the method is not simple counting, and needs code number matching, the number of codes of each digit is independent, and the conditions of carry and bit reduction do not exist, so that the method is specially set to change from 9 to 0 and cannot advance by 1;
meanwhile, just because the code number matching is needed, the condition that the code number of the functional code at a certain bit number is equal to the code number of the initial code is not allowed to exist, namely if the code number of the certain bit number is equal to the code number of the initial code at the bit number after the counter is increased by 1, the counter is increased by 1; therefore, in the counting process, assuming that the initial code is 1, the counting process is repeated for 2, 3, 4, 5, 6, 7, 8, 9, 0, 2, the number of values in each counting period is 9, but not 10, and the number value of the initial code in the number of bits is skipped in the counting process.
If the initial code of a certain number of bits is 0, if the number of codes is already 9, the number is increased by 1 again, the number should be changed to 0 without carry, but since 0 is the initial code, the number of the initial code needs to be increased by 1 again to 1, and 0 is skipped.
After 1 is added, the code number of a certain bit number is equal to the code number of the initial code in the bit number, and then the counter is added by 1; if the code number of a certain digit is 9, the counter is marked as 0 and not carried after being increased by 1, and if the code number of the initial code of the digit is 0, the counter is marked as 1 and not carried after being increased by 1.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.