CN108595930B - Terminal device control method and device - Google Patents

Terminal device control method and device Download PDF

Info

Publication number
CN108595930B
CN108595930B CN201810369120.7A CN201810369120A CN108595930B CN 108595930 B CN108595930 B CN 108595930B CN 201810369120 A CN201810369120 A CN 201810369120A CN 108595930 B CN108595930 B CN 108595930B
Authority
CN
China
Prior art keywords
included angle
screen
terminal equipment
gravity
terminal device
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810369120.7A
Other languages
Chinese (zh)
Other versions
CN108595930A (en
Inventor
李龙飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201810369120.7A priority Critical patent/CN108595930B/en
Publication of CN108595930A publication Critical patent/CN108595930A/en
Application granted granted Critical
Publication of CN108595930B publication Critical patent/CN108595930B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/32User authentication using biometric data, e.g. fingerprints, iris scans or voiceprints
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0346Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of the device orientation or free movement in a 3D space, e.g. 3D mice, 6-DOF [six degrees of freedom] pointers using gyroscopes, accelerometers or tilt-sensors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2133Verifying human interaction, e.g., Captcha

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Telephone Function (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure relates to a terminal device control method and device. The method comprises the following steps: when the screen of the terminal device is placed upwards and the screen of the terminal device moves towards the direction facing the user, the terminal device is controlled to execute the face unlocking function so as to unlock the face, so that the situation that the terminal device unlocks the face without unlocking the face is avoided, and the user experience is effectively improved.

Description

Terminal device control method and device
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method and an apparatus for controlling a terminal device.
Background
At present, most terminal devices have a screen unlocking function, when a screen of the terminal device is in a locked state, when a user wants to use the terminal device, the validity of the user identity needs to be verified first, and only the user who is verified to be legal can unlock the screen of the terminal device and use the terminal device, so that the use safety of the terminal device is ensured. In order to provide better user experience, the unlocking modes of the terminal equipment are also various, such as fingerprint unlocking, password unlocking and the like, and the face unlocking is used more and more along with the development of artificial intelligence.
Disclosure of Invention
In order to overcome the problems in the related art, the embodiments of the present disclosure provide a terminal device control method and apparatus. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a terminal device control method, including:
detecting whether a screen of the terminal equipment is placed upwards or not;
when the screen of the terminal device is detected to be placed upwards, detecting whether the screen of the terminal device moves towards the direction facing the user;
and when detecting that the screen of the terminal equipment moves towards the direction facing the user, controlling the terminal equipment to execute a face unlocking function.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the fact that the screen of the terminal device is placed upwards and the screen of the terminal device moves towards the direction facing the user is detected, the terminal device is controlled to execute the face unlocking function so as to unlock the face, the situation that the terminal device does not unlock the face under the situation that the face unlocking is not needed is avoided, and user experience is effectively improved.
In one embodiment, the detecting whether the screen of the terminal device is placed upwards includes:
detecting whether an included angle between the first direction and the gravity direction is smaller than a first preset included angle or not; the first direction is a direction which is perpendicular to a plane corresponding to a screen of the terminal equipment and points to a backboard of the terminal equipment from the screen of the terminal equipment;
the detecting that the screen of the terminal device is placed upwards comprises:
and when the included angle between the first direction and the gravity direction is smaller than the first preset included angle, determining that the screen of the terminal equipment is placed upwards.
In one embodiment, the detecting whether the screen of the terminal device moves towards the direction facing the user includes:
detecting whether an included angle between the second direction and the gravity direction is smaller than a second preset included angle or not; the second direction is a direction which is parallel to a side frame of a screen of the terminal equipment and points to the bottom of the terminal equipment from the top of the terminal equipment;
the detecting that the screen of the terminal device moves towards the direction facing the user comprises:
and when the included angle between the second direction and the gravity direction is smaller than the second preset included angle, determining that the screen of the terminal equipment moves towards the direction facing the user.
In one embodiment, the determining that the screen of the terminal device moves towards the direction facing the user when it is detected that the included angle between the second direction and the gravity direction is smaller than the second preset included angle includes:
when detecting that the included angle between the second direction and the gravity direction is smaller than a second preset included angle, detecting whether the change value of the included angle between the second direction and the gravity direction is larger than a third preset included angle within a preset time period;
and when the included angle change value of the included angle between the second direction and the gravity direction is detected to be larger than a third preset included angle within a preset time period, determining that the screen of the terminal equipment moves towards the direction facing the user.
In one embodiment, the method comprises:
acquiring acceleration values of all directions through an acceleration sensor;
calculating a gravity acceleration value according to the acceleration values in all directions;
acquiring an acceleration value corresponding to the first direction through the acceleration sensor;
and acquiring an included angle value between the first direction and the gravity direction according to the gravity acceleration value and the acceleration value corresponding to the first direction.
In one embodiment, the method comprises:
acquiring acceleration values of all directions through an acceleration sensor;
calculating a gravity acceleration value according to the acceleration values in all directions;
acquiring an acceleration value corresponding to the second direction through the acceleration sensor;
and acquiring an included angle value between the second direction and the gravity direction according to the gravity acceleration value and the acceleration value corresponding to the second direction.
According to a second aspect of the embodiments of the present disclosure, there is provided a terminal device control apparatus including:
the first detection module is used for detecting whether a screen of the terminal equipment is placed upwards;
the second detection module is used for detecting whether the screen of the terminal equipment moves towards the direction facing the user or not when the first detection module detects that the screen of the terminal equipment is placed upwards;
and the control module is used for controlling the terminal equipment to execute a face unlocking function when the second detection module detects that the screen of the terminal equipment moves towards the direction facing the user.
In one embodiment, the first detection module comprises: a first detection submodule and a first determination submodule;
the first detection submodule is used for detecting whether an included angle between the first direction and the gravity direction is smaller than a first preset included angle or not; the first direction is a direction which is perpendicular to a plane corresponding to a screen of the terminal equipment and points to a backboard of the terminal equipment from the screen of the terminal equipment;
and the first determining submodule is used for determining that the screen of the terminal equipment is placed upwards when the first detecting submodule detects that the included angle between the first direction and the gravity direction is smaller than the first preset included angle.
In one embodiment, the second detection module comprises: a second detection submodule and a second determination submodule;
the second detection submodule is used for detecting whether an included angle between the second direction and the gravity direction is smaller than a second preset included angle or not; the second direction is a direction which is parallel to a side frame of a screen of the terminal equipment and points to the bottom of the terminal equipment from the top of the terminal equipment;
and the second determining submodule is used for determining that the screen of the terminal equipment moves towards the direction facing the user when the second detecting submodule detects that the included angle between the second direction and the gravity direction is smaller than the second preset included angle.
In one embodiment, the second determination submodule includes: a third detection sub-module and the third determination sub-module;
the third detection submodule is configured to detect whether an included angle change value of an included angle between the second direction and the gravity direction is greater than a third preset included angle within a preset time period when the second detection submodule detects that the included angle between the second direction and the gravity direction is smaller than the second preset included angle;
and the third determining submodule is used for determining that the screen of the terminal equipment moves towards the direction facing the user when the third detecting submodule detects that the change value of the included angle between the second direction and the gravity direction is greater than a third preset included angle in a preset time period.
In one embodiment, the apparatus comprises: the device comprises a first acquisition module, a first calculation module, a second acquisition module and a third acquisition module;
the first acquisition module is used for acquiring acceleration values in all directions through an acceleration sensor;
the first calculation module is used for calculating gravity acceleration values according to the acceleration values in all directions acquired by the first acquisition module;
the second acquisition module is used for acquiring an acceleration value corresponding to the first direction through the acceleration sensor;
and the third acquisition module is used for acquiring an included angle value between the first direction and the gravity direction according to the gravity acceleration value and the acceleration value corresponding to the first direction acquired by the second acquisition module.
In one embodiment, the apparatus comprises: the device comprises a fourth acquisition module, a second calculation module, a fifth acquisition module and a sixth acquisition module;
the fourth acquisition module is used for acquiring acceleration values in all directions through the acceleration sensor;
the second calculation module is used for calculating gravity acceleration values according to the acceleration values in all directions acquired by the fourth acquisition module;
the fifth obtaining module is configured to obtain an acceleration value corresponding to the second direction through the acceleration sensor;
and the sixth acquisition module is used for acquiring an included angle value between the second direction and the gravity direction according to the gravity acceleration value and the acceleration value corresponding to the second direction acquired by the fifth acquisition module.
According to a third aspect of the embodiments of the present disclosure, there is provided a terminal device control apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
detecting whether a screen of the terminal equipment is placed upwards or not;
when the screen of the terminal device is detected to be placed upwards, detecting whether the screen of the terminal device moves towards the direction facing the user;
and when detecting that the screen of the terminal equipment moves towards the direction facing the user, controlling the terminal equipment to execute a face unlocking function.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer instructions which, when executed by a processor, implement the steps of the method of any one of the first aspects.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart illustrating a terminal device control method according to an exemplary embodiment.
Fig. 2 is a schematic diagram illustrating the location of a terminal device according to an example embodiment.
Fig. 3 is a schematic diagram illustrating the location of a terminal device according to an example embodiment.
Fig. 4 is a schematic diagram illustrating a location of a terminal device according to an example embodiment.
Fig. 5 is a schematic diagram illustrating a first orientation according to an exemplary embodiment.
Fig. 6 is a schematic diagram illustrating a cross-section of a terminal device placed on a desktop according to an example embodiment.
Fig. 7 is a schematic diagram illustrating a location of a terminal device according to an example embodiment.
Fig. 8 is a schematic diagram illustrating a location of a terminal device according to an example embodiment.
Fig. 9 is a schematic diagram illustrating a location of a terminal device according to an example embodiment.
Fig. 10 is a schematic diagram illustrating a location of a terminal device according to an example embodiment.
Fig. 11 is a schematic diagram illustrating a second orientation according to an exemplary embodiment.
Fig. 12 is a schematic diagram illustrating a cross-section of a terminal device placed on a desktop according to an example embodiment.
Fig. 13 is a schematic diagram illustrating a location of a terminal device according to an example embodiment.
Fig. 14 is a schematic diagram illustrating a location of a terminal device according to an example embodiment.
Fig. 15 is a flowchart illustrating a terminal device control method according to an exemplary embodiment.
Fig. 16 is a schematic diagram illustrating positions of respective coordinate axes of an acceleration sensor in a terminal device according to an exemplary embodiment.
Fig. 17 is a block diagram illustrating a terminal device control apparatus according to an exemplary embodiment.
Fig. 18 is a block diagram illustrating a first detection module in a terminal device control apparatus according to an exemplary embodiment.
Fig. 19 is a block diagram illustrating a second detection module in a terminal device control apparatus according to an exemplary embodiment.
Fig. 20 is a block diagram illustrating a second determination submodule in a terminal device control apparatus according to an exemplary embodiment.
Fig. 21 is a block diagram illustrating a terminal device control apparatus according to an exemplary embodiment.
Fig. 22 is a block diagram illustrating a terminal device control apparatus according to an exemplary embodiment.
Fig. 23 is a block diagram illustrating a control apparatus 80 for a terminal device according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. The following description refers to the accompanying drawings in which the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below do not represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the disclosure, as detailed in the appended claims.
Fig. 1 is a flowchart illustrating a terminal device control method according to an exemplary embodiment, which is used in a terminal device, as shown in fig. 1, and includes the following steps S101 to S103:
in step S101, it is detected whether the screen of the terminal device is placed upward.
In step S102, when it is detected that the screen of the terminal device is placed upward, it is detected whether the screen of the terminal device is moving in a direction facing the user.
In step S103, when it is detected that the screen of the terminal device is moving in a direction facing the user, the terminal device is controlled to execute a face unlocking function.
The face unlocking in the existing terminal equipment has the problem of poor experience: when the terminal device is placed on a desk, the user only wants to light the screen for watching the time, but if the terminal device enables the face unlocking function, the terminal device recognizes the face of the user when the user lights the screen and then unlocks the terminal device. But the user just wants to see the time, so that the user experience is poor. For another example: when the terminal device receives a message in a screen locking state, the screen is lightened, and similarly, if the user looks at the screen to view the received message, the terminal device directly unlocks to enter once recognizing the face of the user. Therefore, experience optimization needs to be carried out on face unlocking, face unlocking of terminal equipment is avoided under the condition that face unlocking is not needed, and user experience is effectively improved.
In practical applications, although there are many ways in which the terminal device is picked up, the various ways of picking up the terminal device can be summarized as the following way of picking up the terminal device with the screen facing up and the way of picking up the terminal device with the screen facing down.
As shown in fig. 2, the bottom of the terminal device is close to the user, and the top of the terminal device is far from the user, further, as shown in fig. 3, the screen-up pick-up mode includes a mode in which the bottom is inclined upward higher than the top when the screen is facing upward (the screen moves in a direction facing the user), and further, as shown in fig. 4, the screen-up pick-up mode includes a mode in which the bottom is inclined downward lower than the top when the screen is facing upward (the screen moves in a direction away from the user). Similarly, the way of taking up the screen downward may also include: the bottom is tilted up higher than the top when the screen is down, and the bottom is tilted down lower than the top when the screen is down.
Taking fig. 3 and fig. 4 as an example, when the terminal device is picked up in the manner of fig. 3, the use habit of the user is better met at this time, because if the bottom of the terminal device rotates downward all the time, the terminal device itself exceeds the horizontal angle, which means that the screen of the terminal device will slowly face the face, so that the face is detected by the front face recognition camera, i.e. the greater probability indicates that the user wants to use the terminal device, and the probability of face unlocking by the terminal device is greater; when the terminal device is picked up in the manner of fig. 4, the use habit of the user is not met at this time, because if the bottom of the terminal device rotates upward all the time, the terminal device exceeds the horizontal angle, which means that the back of the terminal device will slowly face the face of the user, the front face recognition camera will enter the blind area, and the face cannot be detected, that is, the small probability indicates that the user wants to use the terminal device, so that the probability of face unlocking of the terminal device is smaller.
Therefore, in the disclosure, two conditions that the screen of the terminal device is placed upwards and the screen of the terminal device moves towards the direction facing the user are used as conditions for triggering the terminal device to execute the face unlocking function, so that the terminal device can more accurately execute face recognition.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: when the fact that the screen of the terminal device is placed upwards and the screen of the terminal device moves towards the direction facing the user is detected, the terminal device is controlled to execute the face unlocking function so as to unlock the face, the situation that the terminal device does not unlock the face under the situation that the face unlocking is not needed is avoided, and user experience is effectively improved.
In one embodiment, the step S101 includes the following sub-steps: detecting whether an included angle between the first direction and the gravity direction is smaller than a first preset included angle or not; the first direction is a direction which is perpendicular to a plane corresponding to a screen of the terminal device and points to a backboard of the terminal device from the screen of the terminal device. At this moment, the above-mentioned screen that detects terminal equipment places up includes: when detecting that the included angle between the first direction and the gravity direction is smaller than a first preset included angle, determining that the screen of the terminal device is placed upwards.
Fig. 5 is a schematic view showing a first direction according to an exemplary embodiment, and fig. 6 is a schematic view showing a cross section of a terminal device placed on a table top according to an exemplary embodiment, where as shown in fig. 5 and 6, the table is placed on a horizontal plane, the terminal device is placed on the table top with a screen of the terminal device facing upward, where an angle between the first direction and a direction of gravity is 90 °, and when the terminal device is taken up in the direction shown in fig. 7 or in the direction shown in fig. 8, where the screen of the terminal device faces upward, where an angle between the first direction and the direction of gravity is acute; as shown in fig. 9 and 10, when the terminal device is lifted in the direction shown in fig. 9 and 10, the screen of the terminal device faces downward, and the angle between the first direction and the gravity direction is obtuse in both modes. Therefore, whether the screen of the terminal device faces upward may be detected based on an included angle between the first direction and the gravity direction, and based on the scenarios shown in fig. 5 to 10, the first preset included angle may be 90 °, that is, when it is detected that the included angle between the first direction and the gravity direction is smaller than 90 °, it is determined that the screen of the terminal device faces upward.
For example, an acceleration sensor may be preset in the terminal device, and the acceleration value in each direction is obtained by the acceleration sensor; calculating a gravity acceleration value through the acceleration values in all directions; then, acquiring an acceleration value corresponding to the first direction through an acceleration sensor; and acquiring an included angle value between the first direction and the gravity direction according to the gravity acceleration value and the acceleration value corresponding to the first direction.
The included angle value between the first direction and the gravity direction can be obtained through the trigonometric function relationship, the gravity acceleration value and the acceleration value corresponding to the first direction, the calculation method is the same as that in the related technology, and details are not repeated here.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: whether the screen of the terminal equipment faces upwards is judged by detecting the plane corresponding to the screen perpendicular to the terminal equipment and the included angle between the direction of the screen of the terminal equipment pointing to the backboard of the terminal equipment and the gravity direction, and the judgment accuracy can be improved.
In one embodiment, the detecting whether the screen of the terminal device moves towards the direction facing the user includes the following sub-steps: detecting whether an included angle between the second direction and the gravity direction is smaller than a second preset included angle or not; the second direction is a direction which is parallel to a side frame of a screen of the terminal equipment and points to the bottom of the terminal equipment from the top of the terminal equipment; at this time, the detecting that the screen of the terminal device moves towards the direction facing the user includes the following sub-steps: and when detecting that the included angle between the second direction and the gravity direction is smaller than a second preset included angle, determining that the screen of the terminal equipment moves towards the direction facing the user.
Fig. 11 is a schematic diagram illustrating a second direction according to an exemplary embodiment, and fig. 12 is a schematic diagram illustrating a cross section of a terminal device placed on a desktop according to an exemplary embodiment, where as shown in fig. 11 and 12, the desk is placed on a horizontal plane, the terminal device is placed on the desktop, and a screen of the terminal device is placed upward, where an angle between the second direction and a direction of gravity is 90 °, and as shown in fig. 13, when the screen of the terminal device moves toward a direction facing a user, an angle between the second direction and the direction of gravity is an acute angle; as shown in fig. 14, when the screen of the terminal device moves in a direction away from the user, the angle between the second direction and the gravity direction is an obtuse angle. Therefore, whether the screen of the terminal device moves towards the direction facing the user may be detected based on an angle between the second direction and the gravity direction, and based on the scenarios shown in fig. 11 to 14, the second preset angle may be 90 °, that is, when it is detected that the angle between the second direction and the gravity direction is smaller than 90 °, it is determined that the screen of the terminal device moves towards the direction facing the user.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: whether the screen of the terminal equipment moves towards the direction facing the user or not is judged by detecting the side frame parallel to the screen of the terminal equipment and the included angle between the direction pointing to the bottom of the terminal equipment from the top of the terminal equipment and the gravity direction, and the judgment accuracy can be improved.
In one embodiment, to increase the fault tolerance, a positive offset may be given to 90 ° in the above embodiment, so that the determined second predetermined included angle is greater than 90 °, for example: the positive offset is 10 °, and the two preset included angles are 100 °.
The offset can be preset, and can also be optimized according to later debugging, so that the finally determined second preset value is more accurate, and the result of finally judging whether the screen of the terminal equipment moves towards the direction facing the user is more accurate.
If the user accidentally touches the terminal device, and the screen of the terminal device is moved towards the direction facing the user, at this time, if the face unlocking function is triggered, the user experience is poor, and therefore, in one embodiment, when it is detected that the included angle between the second direction and the gravity direction is smaller than a second preset included angle, it is determined that the screen of the terminal device is moved towards the direction facing the user, including the following sub-steps A1-A2:
in the step A1, when it is detected that the included angle between the second direction and the gravity direction is smaller than a second preset included angle, it is detected whether the change value of the included angle between the second direction and the gravity direction is greater than a third preset included angle within a preset time period.
In the step A2, when the fact that the change value of the included angle between the second direction and the gravity direction is larger than a third preset included angle in the preset time period is detected, the screen of the terminal device is determined to move towards the direction facing the user.
The screen of the terminal device can be determined to move towards the direction facing the user based on the acquired size of the change value of the included angle between the second direction and the gravity direction in the preset time period, and whether the terminal device is taken up by the user can also be determined.
For example, an acceleration sensor may be preset in the terminal device, and the acceleration value in each direction is obtained by the acceleration sensor; calculating a gravity acceleration value through the acceleration values in all directions; then, acquiring an acceleration value corresponding to the second direction through an acceleration sensor; and acquiring an included angle value between the second direction and the gravity direction according to the gravity acceleration value and the acceleration value corresponding to the second direction.
The angle between the second direction and the gravity direction can be obtained through the trigonometric function relationship and the gravity acceleration value and the acceleration value corresponding to the second direction, the calculation method is the same as that in the related art, and details are not repeated here.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: whether the screen of the terminal equipment moves towards the direction facing the user or not is judged according to the size of the change value of the included angle between the second direction and the gravity direction in the preset time period, and the judgment accuracy can be improved.
Fig. 15 is a flowchart illustrating a terminal device control method according to an exemplary embodiment, as shown in fig. 15, including the steps of:
in S201, acceleration values in respective directions are acquired by an acceleration sensor.
In S202, a gravitational acceleration value is calculated from the acceleration values of the respective directions.
In S203, an acceleration value corresponding to the first direction is acquired by the acceleration sensor.
In S204, an included angle value between the first direction and the gravity direction is obtained according to the gravity acceleration value and the acceleration value corresponding to the first direction.
In S205, detecting whether an included angle between the first direction and the gravity direction is smaller than a first preset included angle; the first direction is a direction which is perpendicular to a plane corresponding to the screen of the terminal equipment and points to the backboard of the terminal equipment by the screen of the terminal equipment.
In S206, when it is detected that the included angle between the first direction and the gravity direction is smaller than a first preset included angle, it is determined that the screen of the terminal device is placed upward.
In S207, when it is detected that the screen of the terminal device is placed upward, an acceleration value corresponding to the second direction is acquired by the acceleration sensor.
In S208, an included angle value between the second direction and the gravity direction is obtained according to the gravity acceleration value and the acceleration value corresponding to the second direction.
In S209, detecting whether an included angle between the second direction and the gravity direction is smaller than a second preset included angle; the second direction is a direction parallel to a side frame of a screen of the terminal device and pointing from a top of the terminal device to a bottom of the terminal device.
In S2010, when it is detected that the included angle between the second direction and the gravity direction is smaller than a second preset included angle, it is detected whether an included angle change value of the included angle between the second direction and the gravity direction is greater than a third preset included angle within a preset time period.
In S2011, when it is detected that the change value of the included angle between the second direction and the gravity direction is greater than a third preset included angle within the preset time period, it is determined that the screen of the terminal device moves toward the direction facing the user.
In S2012, the terminal device is controlled to execute a face unlock function when it is detected that the screen of the terminal device is moving in a direction facing the user.
Taking a three-axis acceleration sensor built in a terminal device as an example, directions of coordinate axes of the three-axis acceleration sensor are shown in fig. 16, and with reference to the above-described embodiment, a direction of a z-axis in fig. 16 is a first direction, and a direction of a y-axis is a second direction.
The acceleration value of the x-axis direction, the acceleration value of the y-axis direction and the acceleration value of the z-axis direction are obtained through the three-axis acceleration sensor, and the gravity acceleration value g can be calculated through a mathematical formula.
When the gravity acceleration value g is obtained, the included angle theta between the acceleration value in the z-axis direction and the gravity acceleration value g obtained by the three-axis acceleration sensor can be calculated according to the inclination degree of the terminal equipment in the three-dimensional space 1 And then through theta 1 Whether the screen of the terminal equipment faces upwards or downwards is judged according to the size of the angle theta 1 Is less than 90 deg. (which is the first preset angle in the above embodiment), it is determined that the screen of the terminal device is facing up. Simultaneously, the acceleration value and the gravity acceleration value g in the y-axis direction acquired by the three-axis acceleration sensor are used for calculating the included angle theta between the acceleration value and the gravity acceleration value g 2 Through theta 2 And judging whether the screen of the terminal equipment moves towards the direction facing the user. When the terminal equipment is placed parallel to the desktop, the included angle theta 2 Is 90 deg., so that only theta 2 The screen of the terminal device moves in a direction facing the user at less than 90 deg., where theta is given 2 A positive offset Δ θ =10 °, such that θ is obtained 2 Is less than 100 deg. (second predetermined angle) (where. DELTA. Theta. Is a tentative test value whose accuracy can be optimized by post-debugging), the screen of the terminal device is moved toward the user, and when. Theta. Is detected 2 When the value of (2) is less than 100 degrees, the current included angle is calculated through the acceleration value of the acceleration sensor in the y-axis direction currently acquired
Figure BDA0001638045190000134
And calculating the current included angle according to the acceleration value of the acceleration sensor in the y-axis direction acquired last time
Figure BDA0001638045190000131
When in use
Figure BDA0001638045190000132
And
Figure BDA0001638045190000133
angle difference between delta theta 2 When the angle is larger than 20 degrees (the third preset included angle), the camera is started to recognize the faceIn other words, the third preset included angle of 20 ° is a test value, and the accuracy of the third preset included angle needs to be optimized later according to actual conditions.
The following are embodiments of the disclosed apparatus that may be used to perform embodiments of the disclosed methods.
Fig. 17 is a block diagram illustrating a terminal device control apparatus, which may be implemented as part or all of an electronic device by software, hardware, or a combination of both, according to an exemplary embodiment. As shown in fig. 17, the terminal device control apparatus includes:
the first detection module 11 is used for detecting whether a screen of the terminal device is placed upwards;
the second detection module 12 is configured to detect whether the screen of the terminal device moves towards a direction facing a user when the first detection module 11 detects that the screen of the terminal device is placed upwards;
and the control module 13 is configured to control the terminal device to execute a face unlocking function when the second detection module 12 detects that the screen of the terminal device moves towards the direction facing the user.
In one embodiment, as shown in fig. 18, the first detection module 11 includes: a first detection submodule 111 and a first determination submodule 112;
the first detection submodule 111 is configured to detect whether an included angle between the first direction and the gravity direction is smaller than a first preset included angle; the first direction is a direction which is perpendicular to a plane corresponding to a screen of the terminal equipment and points to a backboard of the terminal equipment from the screen of the terminal equipment;
the first determining submodule 112 is configured to determine that the screen of the terminal device is placed upwards when the first detecting submodule 111 detects that an included angle between the first direction and the gravity direction is smaller than the first preset included angle.
In one embodiment, as shown in fig. 19, the second detection module 12 includes: a second detection submodule 121 and a second determination submodule 122;
the second detection submodule 121 is configured to detect whether an included angle between the second direction and the gravity direction is smaller than a second preset included angle; the second direction is a direction which is parallel to a side frame of a screen of the terminal equipment and points to the bottom of the terminal equipment from the top of the terminal equipment;
the second determining submodule 122 is configured to determine that the screen of the terminal device moves towards the direction facing the user when the second detecting submodule 121 detects that an included angle between the second direction and the gravity direction is smaller than the second preset included angle.
In one embodiment, as shown in fig. 20, the second determination sub-module 122 includes: a third detection submodule 1221 and the third determination submodule 1222;
the third detection submodule 1221 is configured to detect, when the second detection submodule 121 detects that the included angle between the second direction and the gravity direction is smaller than the second preset included angle, whether an included angle change value of the included angle between the second direction and the gravity direction is larger than a third preset included angle within a preset time period;
the third determining submodule 1222 is configured to determine that the screen of the terminal device moves towards the direction facing the user when the third detecting submodule 1221 detects that the included angle change value of the included angle between the second direction and the gravity direction is greater than a third preset included angle in a preset time period.
In one embodiment, as shown in fig. 21, the apparatus comprises: a first obtaining module 14, a first calculating module 15, a second obtaining module 16 and a third obtaining module 17;
the first obtaining module 14 is configured to obtain acceleration values in various directions through an acceleration sensor;
the first calculating module 15 is configured to calculate a gravitational acceleration value according to the acceleration values in each direction acquired by the first acquiring module 14;
the second obtaining module 16 is configured to obtain an acceleration value corresponding to the first direction through the acceleration sensor;
and the third obtaining module 17 is configured to obtain an included angle value between the first direction and the gravity direction according to the gravity acceleration value and the acceleration value corresponding to the first direction obtained by the second obtaining module 16.
In one embodiment, as shown in fig. 22, the apparatus comprises: a fourth obtaining module 18, a second calculating module 19, a fifth obtaining module 110 and a sixth obtaining module 111;
the fourth obtaining module 18 is configured to obtain acceleration values in various directions through an acceleration sensor;
the second calculating module 19 is configured to calculate a gravitational acceleration value according to the acceleration values in all directions acquired by the fourth acquiring module 18;
the fifth obtaining module 110 is configured to obtain an acceleration value corresponding to the second direction through the acceleration sensor;
the sixth obtaining module 111 is configured to obtain an included angle value between the second direction and the gravity direction according to the gravity acceleration value and the acceleration value corresponding to the second direction obtained by the fifth obtaining module 110.
According to a third aspect of the embodiments of the present disclosure, there is provided a terminal device control apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
detecting whether a screen of the terminal equipment is placed upwards or not;
when the screen of the terminal device is detected to be placed upwards, detecting whether the screen of the terminal device moves towards the direction facing the user;
and when detecting that the screen of the terminal equipment moves towards the direction facing the user, controlling the terminal equipment to execute a face unlocking function.
The processor may be further configured to:
whether detection terminal equipment's screen is placed up includes:
detecting whether an included angle between the first direction and the gravity direction is smaller than a first preset included angle or not; the first direction is a direction which is perpendicular to a plane corresponding to a screen of the terminal equipment and points to a backboard of the terminal equipment from the screen of the terminal equipment;
the detecting that the screen of the terminal device is placed upwards comprises:
and when the included angle between the first direction and the gravity direction is smaller than the first preset included angle, determining that the screen of the terminal equipment is placed upwards.
The detecting whether the screen of the terminal device moves towards the direction facing the user comprises the following steps:
detecting whether an included angle between the second direction and the gravity direction is smaller than a second preset included angle or not; the second direction is a direction which is parallel to a side frame of a screen of the terminal equipment and points to the bottom of the terminal equipment from the top of the terminal equipment;
the detecting that the screen of the terminal device moves towards the direction facing the user comprises:
and when the included angle between the second direction and the gravity direction is smaller than the second preset included angle, determining that the screen of the terminal equipment moves towards the direction facing the user.
When detecting that the second direction with the contained angle between the direction of gravity is less than when the second is predetermine the contained angle, confirm terminal equipment's screen is towards the direction motion towards the user, include:
when detecting that the included angle between the second direction and the gravity direction is smaller than a second preset included angle, detecting whether the change value of the included angle between the second direction and the gravity direction is larger than a third preset included angle within a preset time period;
and when the included angle change value of the included angle between the second direction and the gravity direction is detected to be larger than a third preset included angle within a preset time period, determining that the screen of the terminal equipment moves towards the direction facing the user.
The method comprises the following steps:
acquiring acceleration values of all directions through an acceleration sensor;
calculating a gravity acceleration value according to the acceleration values in all directions;
acquiring an acceleration value corresponding to the first direction through the acceleration sensor;
and acquiring an included angle value between the first direction and the gravity direction according to the gravity acceleration value and the acceleration value corresponding to the first direction.
The method comprises the following steps:
acquiring acceleration values of all directions through an acceleration sensor;
calculating a gravity acceleration value according to the acceleration values in all directions;
acquiring an acceleration value corresponding to the second direction through the acceleration sensor;
and acquiring an included angle value between the second direction and the gravity direction according to the gravity acceleration value and the acceleration value corresponding to the second direction.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 23 is a block diagram illustrating a control apparatus 80 for a terminal device according to an exemplary embodiment, which is suitable for a terminal device. For example, the apparatus 80 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
The apparatus 80 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the device 80, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 80. Examples of such data include instructions for any application or method operating on the device 80, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the device 80. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 80.
The multimedia component 808 includes a screen that provides an output interface between the device 80 and the user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 80 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 80 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 80. For example, the sensor assembly 814 may detect the open/closed status of the device 80, the relative positioning of the components, such as a display and keypad of the device 80, the change in position of the device 80 or a component of the device 80, the presence or absence of user contact with the device 80, the orientation or acceleration/deceleration of the device 80, and the change in temperature of the device 80. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the apparatus 80 and other devices. The device 80 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 80 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the apparatus 80 to perform the above-described method is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
A non-transitory computer-readable storage medium in which instructions, when executed by a processor of an apparatus 80, enable the apparatus 80 to perform the above-described terminal device control method, the method comprising:
detecting whether a screen of the terminal equipment is placed upwards or not;
when the screen of the terminal device is detected to be placed upwards, detecting whether the screen of the terminal device moves towards the direction facing the user;
and when detecting that the screen of the terminal equipment moves towards the direction facing the user, controlling the terminal equipment to execute a face unlocking function.
Whether the screen of detection terminal equipment is placed up includes:
detecting whether an included angle between the first direction and the gravity direction is smaller than a first preset included angle or not; the first direction is a direction which is perpendicular to a plane corresponding to a screen of the terminal equipment and points to a backboard of the terminal equipment from the screen of the terminal equipment;
the detecting that the screen of the terminal device is placed upwards comprises:
when detecting that an included angle between the first direction and the gravity direction is smaller than a first preset included angle, determining that a screen of the terminal equipment is placed upwards.
The detecting whether the screen of the terminal device moves towards the direction facing the user comprises the following steps:
detecting whether an included angle between the second direction and the gravity direction is smaller than a second preset included angle or not; the second direction is a direction which is parallel to a side frame of a screen of the terminal equipment and points to the bottom of the terminal equipment from the top of the terminal equipment;
the detecting that the screen of the terminal device moves towards the direction facing the user comprises:
and when the included angle between the second direction and the gravity direction is smaller than the second preset included angle, determining that the screen of the terminal equipment moves towards the direction facing the user.
When detecting that the second direction with the contained angle between the direction of gravity is less than when the second is predetermine the contained angle, confirm terminal equipment's screen is towards the direction motion towards the user, include:
when detecting that the included angle between the second direction and the gravity direction is smaller than a second preset included angle, detecting whether the change value of the included angle between the second direction and the gravity direction is larger than a third preset included angle within a preset time period;
and when the included angle change value of the included angle between the second direction and the gravity direction is detected to be larger than a third preset included angle within a preset time period, determining that the screen of the terminal equipment moves towards the direction facing the user.
The method comprises the following steps:
acquiring acceleration values of all directions through an acceleration sensor;
calculating a gravity acceleration value according to the acceleration values in all directions;
acquiring an acceleration value corresponding to the first direction through the acceleration sensor;
and acquiring an included angle value between the first direction and the gravity direction according to the gravity acceleration value and the acceleration value corresponding to the first direction.
The method comprises the following steps:
acquiring acceleration values of all directions through an acceleration sensor;
calculating a gravity acceleration value according to the acceleration values in all directions;
acquiring an acceleration value corresponding to the second direction through the acceleration sensor;
and acquiring an included angle value between the second direction and the gravity direction according to the gravity acceleration value and the acceleration value corresponding to the second direction.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A terminal device control method is characterized by comprising the following steps:
detecting whether a screen of the terminal equipment is placed upwards or not;
when the screen of the terminal equipment is detected to be placed upwards, detecting whether the screen of the terminal equipment moves towards the direction facing the user or not;
when the screen of the terminal equipment is detected to move towards the direction facing the user, the terminal equipment is controlled to execute a face unlocking function;
the detecting whether the screen of the terminal device moves towards the direction facing the user comprises the following steps:
detecting whether an included angle between the second direction and the gravity direction is smaller than a second preset included angle or not; the second direction is a direction which is parallel to a side frame of a screen of the terminal equipment and points to the bottom of the terminal equipment from the top of the terminal equipment;
the detecting that the screen of the terminal device moves towards the direction facing the user comprises:
when detecting that the included angle between the second direction and the gravity direction is smaller than a second preset included angle, determining that the screen of the terminal equipment moves towards the direction facing the user;
when detecting that the second direction with the contained angle between the direction of gravity is less than when the second is predetermine the contained angle, confirm terminal equipment's screen is towards the direction motion towards the user, include:
when detecting that the included angle between the second direction and the gravity direction is smaller than a second preset included angle, detecting whether the change value of the included angle between the second direction and the gravity direction is larger than a third preset included angle within a preset time period;
and when the included angle change value of the included angle between the second direction and the gravity direction is detected to be larger than a third preset included angle within a preset time period, determining that the screen of the terminal equipment moves towards the direction facing the user.
2. The method according to claim 1, wherein the detecting whether the screen of the terminal device is placed upwards comprises:
detecting whether an included angle between the first direction and the gravity direction is smaller than a first preset included angle or not; the first direction is a direction which is perpendicular to a plane corresponding to a screen of the terminal equipment and points to a backboard of the terminal equipment from the screen of the terminal equipment;
the detecting that the screen of the terminal device is placed upwards comprises:
and when the included angle between the first direction and the gravity direction is smaller than the first preset included angle, determining that the screen of the terminal equipment is placed upwards.
3. The method of claim 2, wherein the method comprises:
acquiring acceleration values of all directions through an acceleration sensor;
calculating a gravity acceleration value according to the acceleration values in all directions;
acquiring an acceleration value corresponding to the first direction through the acceleration sensor;
and acquiring an included angle value between the first direction and the gravity direction according to the gravity acceleration value and the acceleration value corresponding to the first direction.
4. The method according to claim 1, characterized in that it comprises:
acquiring acceleration values of all directions through an acceleration sensor;
calculating a gravity acceleration value according to the acceleration values in all directions;
acquiring an acceleration value corresponding to the second direction through the acceleration sensor;
and acquiring an included angle value between the second direction and the gravity direction according to the gravity acceleration value and the acceleration value corresponding to the second direction.
5. A terminal device control apparatus, characterized by comprising:
the first detection module is used for detecting whether a screen of the terminal equipment is placed upwards;
the second detection module is used for detecting whether the screen of the terminal equipment moves towards the direction facing the user or not when the first detection module detects that the screen of the terminal equipment is placed upwards;
the control module is used for controlling the terminal equipment to execute a face unlocking function when the second detection module detects that the screen of the terminal equipment moves towards the direction facing the user;
the second detection module includes: a second detection submodule and a second determination submodule;
the second detection submodule is used for detecting whether an included angle between the second direction and the gravity direction is smaller than a second preset included angle or not; the second direction is a direction which is parallel to a side frame of a screen of the terminal equipment and points to the bottom of the terminal equipment from the top of the terminal equipment;
the second determining submodule is used for determining that the screen of the terminal device moves towards the direction facing the user when the second detecting submodule detects that the included angle between the second direction and the gravity direction is smaller than the second preset included angle;
the second determination submodule includes: a third detection submodule and a third determination submodule;
the third detection submodule is configured to detect whether an included angle change value of an included angle between the second direction and the gravity direction is greater than a third preset included angle within a preset time period when the second detection submodule detects that the included angle between the second direction and the gravity direction is smaller than the second preset included angle;
and the third determining submodule is used for determining that the screen of the terminal equipment moves towards the direction facing the user when the third detecting submodule detects that the change value of the included angle between the second direction and the gravity direction is greater than a third preset included angle in a preset time period.
6. The apparatus of claim 5, wherein the first detection module comprises: a first detection submodule and a first determination submodule;
the first detection submodule is used for detecting whether an included angle between the first direction and the gravity direction is smaller than a first preset included angle or not; the first direction is a direction which is perpendicular to a plane corresponding to a screen of the terminal equipment and points to a backboard of the terminal equipment from the screen of the terminal equipment;
the first determining submodule is used for determining that the screen of the terminal device is placed upwards when the first detecting submodule detects that the included angle between the first direction and the gravity direction is smaller than the first preset included angle.
7. The apparatus of claim 6, wherein the apparatus comprises: the device comprises a first acquisition module, a first calculation module, a second acquisition module and a third acquisition module;
the first acquisition module is used for acquiring acceleration values in all directions through an acceleration sensor;
the first calculation module is used for calculating gravity acceleration values according to the acceleration values in all directions acquired by the first acquisition module;
the second acquisition module is used for acquiring an acceleration value corresponding to the first direction through the acceleration sensor;
and the third acquisition module is used for acquiring an included angle value between the first direction and the gravity direction according to the gravity acceleration value and the acceleration value corresponding to the first direction acquired by the second acquisition module.
8. The apparatus of claim 5, wherein the apparatus comprises: the device comprises a fourth acquisition module, a second calculation module, a fifth acquisition module and a sixth acquisition module;
the fourth acquisition module is used for acquiring acceleration values in all directions through the acceleration sensor;
the second calculation module is used for calculating gravity acceleration values according to the acceleration values in all directions acquired by the fourth acquisition module;
the fifth obtaining module is configured to obtain an acceleration value corresponding to the second direction through the acceleration sensor;
and the sixth acquisition module is used for acquiring an included angle value between the second direction and the gravity direction according to the gravity acceleration value and the acceleration value corresponding to the second direction acquired by the fifth acquisition module.
9. A terminal device control apparatus, characterized by comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
detecting whether a screen of the terminal equipment is placed upwards or not;
when the screen of the terminal device is detected to be placed upwards, detecting whether the screen of the terminal device moves towards the direction facing the user;
when the screen of the terminal equipment is detected to move towards the direction facing the user, the terminal equipment is controlled to execute a face unlocking function;
the detecting whether the screen of the terminal device moves towards the direction facing the user comprises the following steps:
detecting whether an included angle between the second direction and the gravity direction is smaller than a second preset included angle or not; the second direction is a direction which is parallel to a side frame of a screen of the terminal equipment and points to the bottom of the terminal equipment from the top of the terminal equipment;
the detecting that the screen of the terminal device moves towards the direction facing the user comprises:
when detecting that the included angle between the second direction and the gravity direction is smaller than a second preset included angle, determining that the screen of the terminal equipment moves towards the direction facing the user;
when detecting that the second direction with the contained angle between the direction of gravity is less than when the second is predetermine the contained angle, confirm terminal equipment's screen is towards the direction motion towards the user, include:
when detecting that the included angle between the second direction and the gravity direction is smaller than a second preset included angle, detecting whether the change value of the included angle between the second direction and the gravity direction is larger than a third preset included angle within a preset time period;
and when the included angle change value of the included angle between the second direction and the gravity direction is larger than a third preset included angle within a preset time period, determining that the screen of the terminal equipment moves towards the direction facing the user.
10. A computer-readable storage medium having stored thereon computer instructions, which when executed by a processor, carry out the steps of the method according to any one of claims 1 to 4.
CN201810369120.7A 2018-04-23 2018-04-23 Terminal device control method and device Active CN108595930B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810369120.7A CN108595930B (en) 2018-04-23 2018-04-23 Terminal device control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810369120.7A CN108595930B (en) 2018-04-23 2018-04-23 Terminal device control method and device

Publications (2)

Publication Number Publication Date
CN108595930A CN108595930A (en) 2018-09-28
CN108595930B true CN108595930B (en) 2023-01-10

Family

ID=63614228

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810369120.7A Active CN108595930B (en) 2018-04-23 2018-04-23 Terminal device control method and device

Country Status (1)

Country Link
CN (1) CN108595930B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111724578B (en) * 2019-03-21 2022-03-15 珠海格力电器股份有限公司 Remote control device and feedback method for remote control device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101257532A (en) * 2008-03-26 2008-09-03 宇龙计算机通信科技(深圳)有限公司 Method for automatically adjusting optimum view angle and mobile hand-hold equipment
CN103970259A (en) * 2013-01-31 2014-08-06 华为技术有限公司 Screen mode switching method and terminal equipment
CN105183156A (en) * 2015-08-31 2015-12-23 小米科技有限责任公司 Screen control method and apparatus
CN107483709A (en) * 2016-09-29 2017-12-15 维沃移动通信有限公司 A kind of horizontal/vertical screen switching method and mobile terminal
CN107563168A (en) * 2017-09-05 2018-01-09 广东欧珀移动通信有限公司 Unlocking method, device and the mobile terminal of mobile terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101257532A (en) * 2008-03-26 2008-09-03 宇龙计算机通信科技(深圳)有限公司 Method for automatically adjusting optimum view angle and mobile hand-hold equipment
CN103970259A (en) * 2013-01-31 2014-08-06 华为技术有限公司 Screen mode switching method and terminal equipment
CN105183156A (en) * 2015-08-31 2015-12-23 小米科技有限责任公司 Screen control method and apparatus
CN107483709A (en) * 2016-09-29 2017-12-15 维沃移动通信有限公司 A kind of horizontal/vertical screen switching method and mobile terminal
CN107563168A (en) * 2017-09-05 2018-01-09 广东欧珀移动通信有限公司 Unlocking method, device and the mobile terminal of mobile terminal

Also Published As

Publication number Publication date
CN108595930A (en) 2018-09-28

Similar Documents

Publication Publication Date Title
US10498873B2 (en) Screen control method, apparatus, and non-transitory tangible computer readable storage medium
CN106572299B (en) Camera opening method and device
CN105488527B (en) Image classification method and device
EP3032821B1 (en) Method and device for shooting a picture
EP3163404A1 (en) Method and device for preventing accidental touch of terminal with touch screen
US11061202B2 (en) Methods and devices for adjusting lens position
US20170031557A1 (en) Method and apparatus for adjusting shooting function
EP3173970A1 (en) Image processing method and apparatus
EP3179711A2 (en) Method and apparatus for preventing photograph from being shielded
CN108255369B (en) Method and device for displaying fingerprint icon in screen and computer readable storage medium
US10318069B2 (en) Method for controlling state of touch screen, and electronic device and medium for implementing the same
EP3016048B1 (en) Method and device for displaying a reminder based on geographic criteria
CN107944367B (en) Face key point detection method and device
CN107202574B (en) Motion trail information correction method and device
CN107222623B (en) Holding state recognition device and method and electronic equipment
CN112202962B (en) Screen brightness adjusting method and device and storage medium
CN108595930B (en) Terminal device control method and device
CN112799582A (en) Terminal, holding posture recognition method and device of terminal, and storage medium
CN107122356B (en) Method and device for displaying face value and electronic equipment
US9723218B2 (en) Method and device for shooting a picture
CN111651114A (en) Screen control method and device and storage medium
CN107329604B (en) Mobile terminal control method and device
CN113315904A (en) Imaging method, imaging device, and storage medium
CN105510939B (en) Obtain the method and device of motion path
CN109670432B (en) Action recognition method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant