Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be noted that the following examples are only illustrative of the present invention, and do not limit the scope of the present invention. Likewise, the following examples are only some but not all examples of the present invention, and all other examples obtained by those skilled in the art without any inventive step are within the scope of the present invention.
The terms "first", "second" and "third" in the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of the feature. In the description of the present invention, "a plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise. All directional indicators (such as up, down, left, right, front, and rear … …) in the embodiments of the present invention are only used to explain the relative positional relationship between the components, the movement, and the like in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indicator is changed accordingly. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments.
As used herein, a "communication terminal" (or simply "terminal") includes, but is not limited to, a device that is configured to receive/transmit communication signals via a wireline connection, such as via a Public Switched Telephone Network (PSTN), a Digital Subscriber Line (DSL), a digital cable, a direct cable connection, and/or another data connection/network, and/or via a wireless interface (e.g., for a cellular network, a Wireless Local Area Network (WLAN), a digital television network such as a DVB-H network, a satellite network, an AM-FM broadcast transmitter, and/or another communication terminal). A communication terminal arranged to communicate over a wireless interface may be referred to as a "wireless communication terminal", "wireless terminal" or "mobile terminal". Examples of mobile terminals include, but are not limited to, satellite or cellular telephones; a Personal Communications System (PCS) terminal that may combine a cellular radiotelephone with data processing, facsimile and data communications capabilities; PDAs that may include radiotelephones, pagers, internet/intranet access, Web browsers, notepads, calendars, and/or Global Positioning System (GPS) receivers; and conventional laptop and/or palmtop receivers or other electronic devices that include a radiotelephone transceiver. The mobile phone is a mobile terminal equipped with a cellular communication module.
The following describes a control method of a mobile terminal according to several embodiments.
Example 1
Referring to fig. 1, fig. 1 is a flowchart illustrating a control method of a mobile terminal according to an embodiment of the present application, where it is to be noted that the embodiment of the present application may be applied to a mobile terminal or a server, where the mobile terminal may be a mobile phone, a tablet computer, a wearable device, and the like, and the server may be a cloud server.
The control method of the mobile terminal in the embodiment includes, but is not limited to, the following steps:
step 110, detecting data change values of the acceleration sensor and the distance sensor.
In this step, the acceleration sensor may be a gyroscope inside the mobile terminal, and detecting the data change value of the acceleration sensor in this step refers to detecting the change condition of the acceleration sensor, that is, detecting the change condition of the acceleration or speed state of the mobile terminal, for example, the mobile terminal is originally in a constant-speed moving state and is now in an acceleration moving state; or the mobile terminal is originally in a stationary state and now changes to a mobile state.
The distance sensor is generally an infrared sensor, and the data change value detected by the distance sensor refers to a change of a distance between an object and the distance detected by the distance sensor, for example, the original distance between the object and the distance detected by the distance sensor is 30cm, and now the distance is changed to 2cm, and the difference of 28cm is the data change value of the distance sensor.
Step 120, determining whether the data variation value of the acceleration sensor is greater than a first threshold and the data variation value of the distance sensor is less than a second threshold.
In step 120, the first threshold and the second threshold may be set in advance, and in the determination of this step, it is necessary to simultaneously satisfy the condition that the data change value of the acceleration sensor is greater than the first threshold and the data change value of the distance sensor is less than the second threshold to trigger the next step.
And step 130, if yes, resetting the distance sensor.
In this step, if it is determined that the data change value of the acceleration sensor is greater than the first threshold and the data change value of the distance sensor is smaller than the second threshold while being satisfied, the distance sensor is reset and restarted. When the trigger condition is judged, if the data change value of the acceleration sensor is greater than a first threshold value, the mobile terminal is indicated to be moved, and the speed or the acceleration of the mobile terminal is changed; and if the data change value of the distance sensor is smaller than the second threshold value, the mobile terminal is not shielded, namely the mobile terminal is not subjected to the telephone answering action close to the head, and when the two conditions are simultaneously met, the fact that the distance sensor is abnormal can be judged, and then the reset and restart action of the distance sensor is executed. Normally, when there is an action of answering a call, the data change value of the acceleration sensor is larger than the first threshold value, and the data change value of the distance sensor is also larger than the second threshold value.
According to the mobile terminal control method provided by the embodiment, whether the distance sensor is abnormal or not is judged according to the data change conditions of the acceleration sensor and the distance sensor, and then the distance sensor is reset, so that the distance sensor in an abnormal state can be ensured to be automatically restarted.
Example 2
Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a control method of a mobile terminal according to another embodiment of the present application, where the control method in the embodiment mainly includes the following steps:
step 210, determining whether the mobile terminal is in a call service state.
In this step, the call service state of the mobile terminal refers to a prompt state that a call is incoming or outgoing and is temporarily not answered. That is to say, the mobile terminal is in a state of un-answering ringing or vibration prompting of the call incoming call, or in a state of not answering the outgoing call. And if the mobile terminal is in the conversation service state, performing the next step, otherwise, repeating the step until the mobile terminal is in the conversation service state.
In step 220, data change values of the acceleration sensor and the distance sensor are detected.
For details and principles of the step, reference is made to the related description of the previous embodiment, and details are not provided here.
In step 230, it is determined whether the data variation of the acceleration sensor is greater than the first threshold and the data variation of the distance sensor is less than the second threshold.
In this step, if the two conditions that the data change value of the acceleration sensor is greater than the first threshold and the data change value of the distance sensor is less than the second threshold are not simultaneously satisfied, the process returns to step 220 to continue to detect the data change values of the acceleration sensor and the distance sensor; and if the data change value of the acceleration sensor is larger than the first threshold value and the data change value of the distance sensor is smaller than the second threshold value, the next step is carried out.
Step 240, the distance sensor is reset.
In this step, resetting the distance sensor is to perform a restart operation on the distance sensor.
And step 250, ending.
Compared with the previous embodiment, in the mobile terminal control method provided in this embodiment, when the mobile terminal is in a call service state, whether the distance sensor is abnormal is determined according to the data change conditions of the acceleration sensor and the distance sensor, and then the distance sensor is reset and restarted, so that the problem of mistaken touch of the display screen caused by failure of the distance sensor can be avoided.
Example 3
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating a control method of a mobile terminal according to another embodiment of the present application, where the control method in the embodiment mainly includes the following steps:
step 310, determining whether the mobile terminal is in a call service state.
In this step, the call service state of the mobile terminal also refers to a prompt state that a call is incoming or outgoing and is temporarily not answered. And if the mobile terminal is in the conversation service state, performing the next step, otherwise, repeating the step until the mobile terminal is in the conversation service state.
In step 320, data change values of the acceleration sensor and the distance sensor are detected.
For details and principles of this step, please refer to the related description of embodiment 1, and detailed description is omitted here.
Step 330, determine whether the data variation of the acceleration sensor is greater than the first threshold and the data variation of the distance sensor is less than the second threshold.
In this step, if the two conditions that the data change value of the acceleration sensor is greater than the first threshold and the data change value of the distance sensor is less than the second threshold are not simultaneously satisfied, the process returns to step 320 to continue to detect the data change values of the acceleration sensor and the distance sensor; and if the data change value of the acceleration sensor is larger than the first threshold value and the data change value of the distance sensor is smaller than the second threshold value, the next step is carried out.
Step 340, reset the distance sensor.
In this step, resetting the distance sensor is to perform a restart operation on the distance sensor.
In step 350, data change values of the acceleration sensor and the distance sensor are detected.
Step 360, it is determined whether the data variation value of the acceleration sensor is greater than the first threshold and the data variation value of the distance sensor is less than the second threshold.
As can be seen from the above, step 350 and step 360 are repeated step 320 and step 330, and the detailed procedures of these steps are not described in detail here. In step 360, if the result of determining whether the data change value of the acceleration sensor is greater than the first threshold and the data change value of the distance sensor is less than the second threshold is still yes, it indicates that the reset and restart of the distance sensor is invalid and the purpose of recovering the function of the distance sensor is not achieved, so the next step is performed; and when the result that whether the data change value of the acceleration sensor is greater than the first threshold value and the data change value of the distance sensor is smaller than the second threshold value is judged to be negative, the reset and restart of the distance sensor are effective, the distance sensor recovers the normal function, the screen turning-off and the screen lighting of the display screen can be normally controlled through the distance sensor, and therefore the step 300 is entered, and the process is ended.
Step 370, determining whether the mobile terminal is in a call state.
In this step, the call state of the mobile terminal refers to a state in which the mobile terminal is performing a voice call, which is different from the aforementioned call service state (the call service state refers to a state in which a call is incoming or outgoing and is temporarily not answered). In this step, if the mobile terminal is determined to be in the call state, the process proceeds to step 380, and if the mobile terminal is determined not to be in the call state, the process proceeds to step 390.
The method for determining whether the mobile terminal is in the call state specifically includes the steps in fig. 4, please refer to fig. 4, fig. 4 is a flowchart illustrating an embodiment of the method for determining whether the mobile terminal is in the call state, and the method includes:
in step 371, it is determined whether the data change value of the acceleration sensor is greater than the third threshold and the data change value of the ambient light detection sensor is greater than the fourth threshold.
As can be seen from the above steps, since the distance sensor still does not recover the normal function after the restart, in this step, the acceleration sensor may also be a gyroscope inside the mobile terminal, and detecting the data change value of the acceleration sensor in this step refers to detecting the change condition of the acceleration sensor, that is, detecting the change condition of the acceleration or speed state of the mobile terminal, for example, the mobile terminal is originally in a constant-speed moving state and is now changed into an acceleration moving state; or the mobile terminal is originally in a stationary state and now changes to a mobile state.
The ambient light detection sensor is generally implemented by using a phototransistor, a photoresistor or a photodiode, and detecting the data change value of the ambient light detection sensor means that the ambient light detection sensor detects the change condition of the ambient light at the position where the ambient light detection sensor is located, and when the mobile terminal is in a continuous call process or in a non-call state, the ambient light detected by the ambient light detection sensor should be in a stable brightness state.
In this step, when the ambient light detected by the ambient light detection sensor changes (the data change value of the ambient light detection sensor is greater than the fourth threshold), and the acceleration sensor also detects that the moving state of the mobile terminal changes (the data change value of the acceleration sensor is greater than the third threshold), then step 372 is performed; otherwise, go to step 373.
And 372, judging that the mobile terminal is in a call state.
Step 373, determining that the mobile terminal is not in a call state.
Wherein step 372 is connected to step 380, and step 373 is connected to step 380.
And 380, controlling a display screen information screen of the mobile terminal.
And step 390, controlling the display screen of the mobile terminal to be always on.
And step 300, ending.
Compared with the foregoing embodiment, in the mobile terminal control method provided in this embodiment, after the distance sensor is restarted, the validity of the distance sensor is detected again, and when it is determined that the distance sensor is still not recovered, the screen turning-off and the screen turning-on of the display screen are controlled according to the data change conditions of the acceleration sensor and the ambient light detection sensor, so as to avoid the problem of the mistaken touch of the display screen due to the failure of the distance sensor.
Example 4
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating a control method of a mobile terminal according to another embodiment of the present application, where the control method in this embodiment mainly includes the following steps:
step 401, determining whether the mobile terminal is in a call service state.
In step 402, data change values of the acceleration sensor and the distance sensor are detected.
In step 403, it is determined whether the data change value of the acceleration sensor is greater than the first threshold and the data change value of the distance sensor is less than the second threshold.
At step 404, the distance sensor is reset.
In step 405, data change values of the acceleration sensor and the distance sensor are detected.
Step 406, determining whether the data variation value of the acceleration sensor is greater than a first threshold and the data variation value of the distance sensor is less than a second threshold.
Please refer to the related description of the corresponding steps in embodiment 3 for steps 401 and 406, which are not repeated here.
Step 407, determine whether the mobile terminal is in a call state.
In this step, the call state of the mobile terminal refers to a state in which the mobile terminal is performing a voice call, which is different from the aforementioned call service state (the call service state refers to a state in which a call is incoming or outgoing and is temporarily not answered). In this step, if it is determined that the mobile terminal is in the call state, the process proceeds to step 408, and if it is determined that the mobile terminal is not in the call state, the process proceeds to step 409.
Please refer to the related description of the foregoing embodiments for a method for determining whether a mobile terminal is in a call state.
And step 408, controlling a display screen information screen of the mobile terminal.
And step 409, controlling the display screen of the mobile terminal to be normally bright.
Unlike embodiment 3, in this embodiment, step 410 is further included after the step of controlling the display screen of the mobile terminal in step 408, and it is determined whether the mobile terminal is finished in a call or changes an answering state. If yes, go to step 411; if the determination result is negative, go to step 412. Specifically, please refer to fig. 6, where fig. 6 is a flowchart illustrating an embodiment of a method for determining whether a mobile terminal is in an off state.
Step 4101, it is determined whether the data change value of the acceleration sensor is larger than a fifth threshold value and the data change value of the ambient light detection sensor is larger than a sixth threshold value.
In this step, if it is determined whether the data change value of the acceleration sensor is greater than the fifth threshold value and the data change value of the ambient light detection sensor is greater than the sixth threshold value, the process proceeds to step 4102, otherwise, the process proceeds to step 4103.
Step 4102, determining that the mobile terminal has changed the listening status.
Step 4103, determining that the mobile terminal has not changed the listening status.
The above is only a method for determining whether the mobile terminal changes the answering state, and certainly, in other embodiments, it may also be determined whether the mobile terminal changes its answering state by other ways, which are not listed and described in detail herein.
And step 411, controlling a display screen of the mobile terminal to be lightened.
Step 412, the mobile terminal is kept in the screen turning state.
And step 413, ending.
According to the mobile terminal control method provided by the embodiment, after the distance sensor is restarted, the effectiveness of the distance sensor is detected again, and when the distance sensor is judged not to be recovered, the screen turning-off and the screen lighting of the display screen are controlled through the data change conditions of the acceleration sensor and the ambient light detection sensor, so that the problem that the display screen is touched by mistake due to the failure of the distance sensor is avoided; in addition, the acceleration sensor and the ambient light detection sensor are further utilized to judge that the mobile terminal changes the answering state, so that the reliable control of the screen displaying and the screen lightening is realized.
Referring to fig. 7, fig. 7 is a schematic block diagram illustrating a structure of an embodiment of a mobile terminal provided in the present application, where the mobile terminal 70 includes a processor 71 and a memory 72. The processor 71 is coupled to a memory 72.
The processor 71 is specifically configured to detect data change values of the acceleration sensor and the distance sensor; judging whether the data change value of the acceleration sensor is larger than a first threshold value and the data change value of the distance sensor is smaller than a second threshold value; and if so, resetting the distance sensor. For a detailed control method flow, reference is made to the detailed description of the method embodiment shown in fig. 1-6.
Further, please refer to fig. 8, fig. 8 is a schematic block diagram illustrating a structural configuration of another embodiment of the mobile terminal provided in the present application, where the mobile terminal in the present embodiment includes a detecting module 81, a determining module 82, and an executing module 83.
Specifically, the detection module 81 is configured to detect data change values of an acceleration sensor and a distance sensor; the judging module 82 is configured to judge whether a data change value of the acceleration sensor is greater than a first threshold and a data change value of the distance sensor is less than a second threshold; the execution module 83 is configured to reset the distance sensor.
Further, the judging module 82 is further configured to judge whether the mobile terminal is in a call state, and when the judging module 82 judges that the mobile terminal is in the call state, the executing module 83 is configured to control the screen of the display screen of the mobile terminal; when the determining module 82 determines that the mobile terminal is not in a call state, the executing module 83 is configured to control the display screen of the mobile terminal to be normally on. The determining module 82 is specifically configured to determine whether the data change value of the acceleration sensor is greater than a third threshold and the data change value of the ambient light detection sensor is greater than a fourth threshold, and if yes, determine that the mobile terminal is in a call state. The judging module 82 is further configured to judge whether the mobile terminal is finished in a call or changes a call receiving state; if the determining module 82 determines that the mobile terminal is in a call end state or changes an answering state, the executing module 83 controls the display screen of the mobile terminal to be lit.
In addition, the determining module 82 is further specifically configured to determine whether the data change value of the acceleration sensor is greater than a fifth threshold and the data change value of the ambient light detection sensor is greater than a sixth threshold, and if so, determine that the mobile terminal changes the answering state. Further, the determining module 82 is further configured to determine whether the mobile terminal is in a call service state.
For the specific control process of each module, please refer to the related description of the foregoing method embodiment, which is not repeated herein. The mobile terminal provided by the embodiment judges whether the distance sensor is abnormal or not according to the data change conditions of the acceleration sensor and the distance sensor, and then resets and restarts the distance sensor; after the distance sensor is restarted, the effectiveness of the distance sensor is detected again, and when the distance sensor is judged to be still not recovered, the screen turning-off and the screen lighting of the display screen are controlled through the data change conditions of the acceleration sensor and the ambient light detection sensor, so that the problem that the display screen is touched by mistake due to the failure of the distance sensor is avoided; in addition, the acceleration sensor and the ambient light detection sensor are further utilized to judge that the mobile terminal changes the answering state, so that the reliable control of the screen displaying and the screen lightening is realized.
Referring to fig. 9, fig. 9 is a schematic structural diagram of an embodiment of a computer storage medium provided in the present application, where the computer storage medium 90 is used to store a computer program 91, and the computer program 91 is used to implement the control method provided in the embodiments of fig. 1 to fig. 6 when executed by a processor, and the computer storage medium 90 may be used in the above-mentioned mobile terminal or may be used in a server.
The computer program stored in the computer-readable storage medium of this embodiment is similar to the computer program stored in the memory in the embodiment of the electronic device described above, and the method steps implemented when the computer program is executed by the processor are similar, and are not described herein again.
In the several embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a module or a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be substantially or partially implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, a network device, or the like) or a processor (processor) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only a part of the embodiments of the present invention, and not intended to limit the scope of the present invention, and all equivalent devices or equivalent processes performed by the present invention through the contents of the specification and the drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.