Terminal device control method and terminal device

By detecting the magnetic flux reported by the Hall sensor and the magnetic azimuth angle of the magnetic sensor, the azimuth angle of the terminal device is calculated. If the difference is less than the threshold, the screen is locked. This solves the problem of the terminal device accidentally locking the screen under a strong magnetic field and improves the user experience. .

CN112286599BActive Publication Date: 2024-09-10BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010843710.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-20
Publication Date
2024-09-10
Estimated Expiration
2040-08-20

AI Technical Summary

Technical Problem

When the terminal device enters a strong magnetic field, the Hall sensor is susceptible to interference, causing accidental locking of the screen, affecting the user experience.

Method used

By detecting the magnetic flux reported by the Hall sensor, the magnetic azimuth angle of the magnetic sensor is obtained, and the azimuth angle of the terminal device is calculated. If the angle difference between the two is less than the preset threshold, the screen lock operation is performed to avoid accidental screen locking caused by interference with the magnetic field.

Benefits of technology

It effectively avoids accidental screen locking caused by interference magnetic fields and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112286599B
    Figure CN112286599B
Patent Text Reader

Abstract

The present disclosure provides a control method and terminal device of a terminal device. The method is applied to a terminal device, and a Hall sensor is provided on the terminal device, and the method includes: when it is detected that the magnetic flux reported by the Hall sensor is greater than the lock screen threshold, obtaining the magnetic azimuth detected by the magnetic sensor on the terminal device at the current moment; calculating the azimuth of the terminal device at the current moment; when the angle difference between the calculated azimuth and the magnetic azimuth is less than a preset threshold, performing a lock screen operation. The control method and terminal device of the terminal device provided by the present disclosure can avoid accidental lock screen caused by the terminal device entering an interfering magnetic field, and can improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of terminals, and in particular to a control method for a terminal device and a terminal device. Background Art

[0002] In recent years, in order to improve the user's browsing experience, the display screens of terminal devices have become larger and larger. When using terminal devices, users usually add a leather case to the terminal device to protect the display screen. Accordingly, in order to save resources, more and more terminal devices support the leather case lock screen function.

[0003] Usually, in order to realize the screen lock function of the leather case, a Hall sensor is set on the terminal device, and a magnet is set on the leather case so that when the leather case is closed, the Hall sensor is in the magnetic field of the magnet. In this way, when the terminal device detects that the magnetic flux reported by the Hall sensor is greater than the screen lock threshold, it will execute the screen lock operation.

[0004] When the terminal device enters a strong magnetic field, for example, when the terminal device is close to a speaker, the huge magnetic field in the speaker will affect the Hall sensor, causing an accidental screen lock, which seriously affects the user experience. Therefore, how to avoid accidental screen locks has become an urgent problem to be solved. Summary of the invention

[0005] In view of this, the present disclosure provides a control method of a terminal device and a terminal device to avoid accidental screen lock caused by the terminal device entering an interfering magnetic field, thereby improving user experience.

[0006] According to a first aspect of an embodiment of the present disclosure, a control method for a terminal device is provided. The method is applied to a terminal device, and a Hall sensor is provided on the terminal device. The method includes:

[0007] When it is detected that the magnetic flux reported by the Hall sensor is greater than the lock screen threshold, obtaining the magnetic azimuth detected by the magnetic sensor on the terminal device at the current moment;

[0008] Calculating the azimuth of the terminal device at the current moment;

[0009] When the angle difference between the calculated azimuth and the magnetic azimuth is less than a preset threshold, a screen lock operation is performed.

[0010] According to a second aspect of an embodiment of the present disclosure, a terminal device is provided, wherein a Hall sensor is provided on the terminal device, and the terminal device further comprises an acquisition module, a calculation module and a processing module, wherein:

[0011] The acquisition module is used to acquire the magnetic azimuth detected by the magnetic sensor on the terminal device at the current moment when it is detected that the magnetic flux reported by the Hall sensor is greater than the lock screen threshold;

[0012] The calculation module is used to calculate the azimuth of the terminal device at the current moment;

[0013] The processing module is used to perform a screen lock operation when the angle difference between the calculated azimuth and the magnetic azimuth is less than a preset threshold.

[0014] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute any of the terminal device control methods provided in the first aspect of the present disclosure.

[0015] According to a fourth aspect of an embodiment of the present disclosure, a terminal device is provided, the device comprising:

[0016] processor;

[0017] a memory for storing processor-executable instructions;

[0018] The processor is configured to implement any one of the methods provided in the first aspect of the present disclosure.

[0019] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0020] In the disclosed embodiment, when it is detected that the magnetic flux reported by the Hall sensor is greater than the lock screen threshold, the magnetic azimuth detected by the magnetic sensor at the current moment is obtained, and the azimuth of the terminal device at the current moment is calculated, and then when the angle difference between the calculated azimuth and the magnetic azimuth is less than a preset threshold, the lock screen operation is performed. In this way, accidental lock screen caused by the terminal device entering an interfering magnetic field can be avoided, and the user experience can be improved.

[0021] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] 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 present disclosure.

[0023] Figure 1 is a flow chart of a method for controlling a terminal device according to an exemplary embodiment of the present disclosure;

[0024] Figure 2is a flowchart of another method for controlling a terminal device according to an exemplary embodiment of the present disclosure;

[0025] Figure 3 is a flowchart of another method for controlling a terminal device according to an exemplary embodiment of the present disclosure;

[0026] Figure 4 is a schematic block diagram of a terminal device according to an exemplary embodiment of the present disclosure;

[0027] Figure 5 is a schematic block diagram of another terminal device according to an exemplary embodiment of the present disclosure;

[0028] Figure 6 It is a schematic block diagram of a terminal device according to an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0030] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms "a", "the" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0031] It should be understood that although the terms first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0032] In view of this, the present disclosure provides a control method of a terminal device and a terminal device to avoid accidental screen lock caused by the terminal device entering an interfering magnetic field, thereby improving user experience.

[0033] The control method of the terminal device provided in the present disclosure can be applied to the terminal device, for example, it can be applied to a smart phone, a tablet computer, etc.

[0034] Figure 1 This is a flow chart of a method for controlling a terminal device according to an exemplary embodiment of the present disclosure. Figure 1 The control method of the terminal device provided in this embodiment is applied to the terminal device, and the terminal device is provided with a Hall sensor. The method may include:

[0035] S101. When it is detected that the magnetic flux reported by the Hall sensor is greater than the lock screen threshold, the magnetic azimuth detected by the magnetic sensor on the terminal device at the current moment is obtained.

[0036] S102: Calculate the azimuth of the terminal device at the current moment.

[0037] S103. When the angle difference between the calculated azimuth and the magnetic azimuth is less than a preset threshold, a screen lock operation is performed.

[0038] Specifically, the preset threshold is set according to actual needs. In this embodiment, the specific value of the preset threshold is not limited. For example, in one embodiment, the preset threshold may be 5° to 7°. The following description is made by taking the preset threshold of 5° as an example.

[0039] Optionally, the method further comprises:

[0040] When the angle difference between the calculated azimuth and the magnetic azimuth is not less than the preset threshold, the screen lock operation is refused.

[0041] For example, in one embodiment, the magnetic azimuth detected by the magnetic sensor at the current moment is 60°, and the calculated azimuth of the device (the device refers to the terminal device, which will not be described below) at the current moment is 43°. At this time, the calculated azimuth is significantly different from the magnetic azimuth detected by the magnetic sensor at the current moment, indicating that the magnetic sensor is affected by the interfering magnetic field, and further indicating that the Hall sensor is also affected by the interfering magnetic field. At this time, it is considered that the magnetic flux reported by the Hall sensor is inaccurate, and the lock screen event is not executed, so that accidental lock screen can be avoided.

[0042] For another example, in one embodiment, the magnetic azimuth detected by the magnetic sensor at the current moment is 210°, and the calculated azimuth of the device at the current moment is 213°. At this time, the calculated azimuth is not much different from the magnetic azimuth detected by the magnetic sensor at the current moment, indicating that the magnetic sensor is not affected by the interfering magnetic field, and further indicating that the Hall sensor is not affected by the interfering magnetic field. At this time, it is believed that the magnetic flux reported by the Hall sensor is caused by the magnet on the leather case and is valid. At this time, the lock screen operation is performed.

[0043] The specific implementation principle of calculating the azimuth angle of the device at the current moment will be described in detail in the following embodiments and will not be repeated here.

[0044] It should be noted that the magnetic field generated by the magnet on the leather case is small and will not affect the magnetic sensor. In the present disclosure, by judging whether the angle difference between the magnetic azimuth detected by the magnetic sensor at the current moment and the calculated azimuth is less than a preset threshold, the screen lock event is executed only when it is less than the preset threshold. In this way, accidental screen lock caused by the terminal device entering an interfering magnetic field such as the magnetic field around the speaker can be avoided, and the user experience can be improved.

[0045] The method provided in this embodiment, when it is detected that the magnetic flux reported by the Hall sensor is greater than the lock screen threshold, obtains the magnetic azimuth detected by the magnetic sensor at the current moment, and calculates the azimuth of the terminal device at the current moment, and then executes the lock screen event when the angle difference between the calculated azimuth and the magnetic azimuth is less than the preset threshold. In this way, when the calculated azimuth and the detected magnetic azimuth are less than the preset threshold, it means that the magnetic azimuth detected by the magnetic sensor is more accurate, and the magnetic sensor is not affected by the interfering magnetic field. Accordingly, it is determined that the Hall sensor is not affected by the interfering magnetic field, and the lock screen operation is executed, which can avoid accidental lock screen caused by the terminal device entering the interfering magnetic field, and can improve the user experience.

[0046] Figure 2 is a flowchart of another method for controlling a terminal device according to an exemplary embodiment of the present disclosure. Figure 2 The method provided in this embodiment, based on the above embodiment, specifically implements the process of calculating the azimuth of the terminal device at the current moment, which may include:

[0047] S201. Determine a verification time period; wherein the end time of the verification time period is the current time.

[0048] Specifically, the start time of the verification time period may be a time before the current time and the time length from the current time is equal to the preset time length. The preset time length is set according to actual needs. In this embodiment, the specific value of the preset time length is not limited. For example, in one embodiment, the preset time length may be 5 minutes, 10 minutes, 20 minutes, etc. The following is described by taking the preset time length of 10 minutes as an example.

[0049] Combined with the above example, for example, the current time is 15:42 on July 30, 2020. In this step, the verification time period is determined to be from 15:32 on July 30, 2020 to 15:42 on July 30, 2020.

[0050] S202: Obtain the first target magnetic azimuth detected by the magnetic sensor within the verification time period.

[0051] In combination with the above example, in this step, the first target magnetic azimuth detected by the magnetic sensor in the time period from 15:32 on July 30, 2020 to 15:42 on July 30, 2020 is obtained. For example, in one embodiment, the first target magnetic azimuth detected by the magnetic sensor in the verification time period is 30°.

[0052] S203: Acquire a plurality of motion data detected by the motion sensor on the terminal device within the verification time period, and determine a rotation angle of the terminal device on a horizontal plane within the verification time period according to the plurality of motion data.

[0053] In a possible implementation of the present disclosure, the motion sensor may be an acceleration sensor, and in this case, the motion data is acceleration.

[0054] In another possible implementation of the present disclosure, the motion sensor may be a gyroscope, and in this case, the motion data is an angular velocity.

[0055] In combination with the above example, in this step, all motion data output by the motion sensor in the time period from 15:32 on July 30, 2020 to 15:42 on July 30, 2020 are obtained. For example, in one embodiment, in this time period, the motion sensor outputs a total of 10 motion data.

[0056] Specifically, when determining the rotation angle of the device on the horizontal plane within the verification time period based on multiple motion data, the sub-motion data of the motion data on the horizontal plane can be determined for each motion data, and then the rotation angle of the terminal device on the horizontal plane within the verification time period can be determined based on the multiple sub-motion data.

[0057] In specific implementation, when the motion data is acceleration, multiple acceleration components can be integrated twice to obtain the rotation angle of the terminal device on the horizontal plane within the verification time period. When the motion data is angular velocity, multiple angular velocities can be integrated once to obtain the rotation angle of the terminal device on the horizontal plane within the verification time period. The specific implementation principle and implementation process of the integration can be found in the description of the relevant technology, which will not be repeated here.

[0058] In addition, the specific implementation principle and implementation process of determining the sub-motion data of the motion data on the horizontal plane can be found in the description of the relevant technology, which will not be repeated here.

[0059] S204. Calculate the azimuth of the terminal device at the current moment according to the target magnetic azimuth and the rotation angle.

[0060] In specific implementation, the sum of the target magnetic azimuth and the rotation angle can be determined as the azimuth of the terminal device at the current moment. For example, in one embodiment, the rotation angle is +13° (the terminal device rotates 13° counterclockwise on the horizontal plane). Combined with the above example, at this time, the azimuth of the terminal device at the current moment is determined to be 43°.

[0061] The method provided in this embodiment provides a method for calculating the azimuth of the terminal device at the current moment. Through this method, the azimuth of the terminal device at the current moment can be calculated, and then when the angle difference between the magnetic azimuth detected at the current moment and the calculated azimuth is less than a preset threshold, it is considered that the magnetic azimuth detected at the current moment is not affected by the interfering magnetic field, and it is determined that the Hall sensor is not affected by the interfering magnetic field. At this time, the lock screen event is executed. In this way, accidental lock screen caused by the terminal device entering the interfering magnetic field can be avoided, and the user experience can be improved.

[0062] Figure 3 is a flowchart of another method for controlling a terminal device according to an exemplary embodiment of the present disclosure. Figure 3 , the method provided in this embodiment may include:

[0063] S301. When it is detected that the magnetic flux reported by the Hall sensor is greater than the screen lock threshold, obtain a first magnetic azimuth detected by the magnetic sensor at the current moment.

[0064] S302: Determine a verification time period, and obtain multiple accelerations detected by the acceleration sensor within the verification time period.

[0065] S303: For each acceleration, obtain the component acceleration of the acceleration on the horizontal plane.

[0066] S304: Determine, based on the multiple component accelerations, a rotation angle of the terminal device on a horizontal plane within the verification time period.

[0067] S305: Obtain the first target magnetic azimuth detected by the magnetic sensor within the verification time period.

[0068] S306. Calculate the azimuth of the terminal device at the current moment according to the target magnetic azimuth and the rotation angle.

[0069] S307: Determine whether the angle difference between the first magnetic azimuth and the calculated azimuth is less than a preset threshold.

[0070] S308: If yes, execute the lock screen operation; otherwise, refuse to execute the lock screen operation.

[0071] The specific implementation principles and implementation processes of steps S301 to S308 can be found in the description of the previous embodiments, and will not be repeated here.

[0072] A specific example is given below to illustrate in detail the technical solution provided by this embodiment. For example, in one embodiment, at 16:32 on July 30, 2020, it is detected that the magnetic flux reported by the Hall sensor is greater than the lock screen threshold. At this time, all accelerations output by the acceleration sensor from 16:28 on July 30, 2020 to 16:32 on July 30, 2020 are obtained. For example, 15 accelerations are obtained. Furthermore, for each acceleration, its partial acceleration on the horizontal plane is obtained, and then the 15 partial accelerations are integrated twice to obtain the rotation angle of the terminal device on the horizontal plane within these 5 minutes. For example, the rotation angle of the terminal device on the horizontal plane within these 5 minutes is +30°. Furthermore, it was obtained that the target magnetic azimuth output by the magnetic sensor at 16:28 on July 30, 2020 was 270° (due east), that is, at 16:28 on July 30, 2020, the initial orientation of the terminal device was due east. After 5 minutes, the terminal device turned 30° counterclockwise in the horizontal plane, that is, at 16:32 on July 30, 2020, the azimuth of the terminal device at the current moment was calculated to be 300°.

[0073] For example, in one possible implementation, at 16:32 on July 30, 2020, the magnetic azimuth detected by the magnetic sensor is 304°. At this time, the calculated azimuth (300°) is not much different from the magnetic azimuth detected by the magnetic sensor, indicating that the magnetic sensor is not affected by the interfering magnetic field, and further indicating that the magnetic flux reported by the Hall sensor is caused by the magnet on the leather case and is valid. At this time, the screen lock operation is executed.

[0074] For example, in another possible implementation, at 16:32 on July 30, 2020, the magnetic azimuth detected by the magnetic sensor is 310°. At this time, the calculated azimuth (300°) is significantly different from the magnetic azimuth detected by the magnetic sensor, indicating that the magnetic sensor is affected by the interfering magnetic field. At this time, it is considered that the Hall sensor is affected by the interfering magnetic field. At this time, the lock screen event is not executed. In this way, accidental screen lock caused by the terminal device entering the interfering magnetic field can be avoided, thereby improving the user experience.

[0075] Corresponding to the aforementioned method embodiments, the present disclosure also provides embodiments of terminal equipment.

[0076] like Figure 4 As shown, Figure 4is a schematic block diagram of a terminal device according to an exemplary embodiment of the present disclosure, wherein the terminal device includes an acquisition module 410, a calculation module 420 and a processing module 430, wherein:

[0077] The acquisition module 410 is used to acquire the magnetic azimuth detected by the magnetic sensor on the terminal device at the current moment when it is detected that the magnetic flux reported by the Hall sensor is greater than the lock screen threshold;

[0078] The calculation module 420 is used to calculate the azimuth of the terminal device at the current moment;

[0079] The processing module 430 is used to perform a screen lock operation when the angle difference between the calculated azimuth and the magnetic azimuth is less than a preset threshold.

[0080] The device of this embodiment can be used to perform Figure 1 The technical solution of the illustrated embodiment has similar implementation principles and technical effects, which will not be described in detail here.

[0081] Furthermore, the processing module 430 is also used to refuse to perform a screen lock operation when the angle difference between the calculated azimuth and the magnetic azimuth is not less than the preset threshold.

[0082] like Figure 5 As shown, Figure 5 is a schematic block diagram of another terminal device according to an exemplary embodiment of the present disclosure. Figure 4 Based on the embodiment, the calculation module 420 includes a determination unit 4201, an acquisition unit 4202 and a processing unit 4203, wherein:

[0083] The determining unit 4201 is used to determine a verification time period; wherein the end time of the verification time period is the current time;

[0084] The acquisition unit 4202 is used to acquire the first target magnetic azimuth detected by the magnetic sensor within the verification time period;

[0085] The acquisition unit 4202 is further configured to acquire a plurality of motion data detected by the motion sensor on the terminal device within the verification time period;

[0086] The processing unit 4203 is used to determine the rotation angle of the terminal device on the horizontal plane within the verification time period according to the multiple motion data;

[0087] The processing unit 4203 is used to calculate the azimuth of the terminal device at a current moment according to the target magnetic azimuth and the rotation angle.

[0088] Furthermore, the processing unit 4203 is specifically used to determine, for each of the motion data, sub-motion data of the motion data on the horizontal plane, and determine the rotation angle of the terminal device on the horizontal plane within the verification time period based on the multiple sub-motion data.

[0089] Further, the motion sensor is an acceleration sensor, and the motion data is acceleration; or, the motion sensor is a gyroscope, and the motion data is angular velocity.

[0090] As for the terminal device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The terminal device embodiment described above is only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution. A person of ordinary skill in the art may understand and implement it without creative work.

[0091] Correspondingly, the present disclosure also provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program is used to execute any of the above-mentioned control methods for the terminal device.

[0092] Accordingly, the present disclosure further provides a terminal device, the terminal device comprising:

[0093] processor;

[0094] a memory for storing processor-executable instructions;

[0095] The processor is configured to implement any one of the methods provided in the first aspect of the present disclosure.

[0096] Figure 6 This is a schematic block diagram of a terminal device according to an exemplary embodiment. For example, the terminal device 600 may be a mobile phone, a tablet computer, an e-book reader, a multimedia player, a wearable device, a vehicle-mounted terminal, or the like.

[0097] Reference Figure 6 The terminal device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 616 , and a communication component 618 .

[0098] The processing component 602 generally controls the overall operation of the terminal device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602. For another example, the processing component 602 can read executable instructions from a memory to implement the steps of a control method of a terminal device provided in the above-mentioned embodiments.

[0099] The memory 604 is configured to store various types of data to support operations on the terminal device 600. Examples of such data include instructions for any application or method operating on the terminal device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, 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 disk or optical disk.

[0100] The power supply component 606 provides power to various components of the terminal device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the terminal device 600.

[0101] The multimedia component 608 includes a display screen that provides an output interface between the terminal device 600 and the user. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the terminal device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0102] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the terminal device 600 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 618. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.

[0103] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as 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.

[0104] The sensor assembly 616 includes one or more sensors for providing various aspects of status assessment for the terminal device 600. For example, the sensor assembly 616 can detect the open / closed state of the terminal device 600, the relative positioning of the components, such as the display and keypad of the terminal device 600, and the sensor assembly 616 can also detect the position change of the terminal device 600 or a component of the terminal device 600, the presence or absence of contact between the user and the terminal device 600, the orientation or acceleration / deceleration of the terminal device 600, and the temperature change of the terminal device 600. The sensor assembly 616 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 616 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 616 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0105] The communication component 618 is configured to facilitate wired or wireless communication between the terminal device 600 and other devices. The terminal device 600 can access a wireless network based on a communication standard, such as Wi-Fi, 2G, 3G, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 618 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 618 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0106] In an exemplary embodiment, the terminal device 600 can 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, microcontrollers, microprocessors, or other electronic components to perform the above method.

[0107] In an exemplary embodiment, a non-transitory machine-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of a terminal device 600 to complete the wireless charging method described above. For example, the non-transitory computer-readable storage medium can 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.

[0108] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0109] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included in the scope of protection of the present disclosure.

Claims

1. A method for controlling a terminal device, characterized in that: The method is applied to a terminal device, and a Hall sensor is provided on the terminal device. The method includes: When it is detected that the magnetic flux reported by the Hall sensor is greater than the lock screen threshold, obtaining the magnetic azimuth detected by the magnetic sensor on the terminal device at the current moment; Calculating the azimuth of the terminal device at the current moment; When the angle difference between the calculated azimuth and the magnetic azimuth is less than a preset threshold, performing a screen lock operation; The calculating the azimuth of the terminal device at the current moment includes: Determine a verification time period; wherein the end time of the verification time period is the current time; Obtaining the first target magnetic azimuth detected by the magnetic sensor within the verification time period; Acquire a plurality of motion data detected by a motion sensor on the terminal device within the verification time period, and determine a rotation angle of the terminal device on a horizontal plane within the verification time period according to the plurality of motion data; The azimuth of the terminal device at the current moment is calculated based on the target magnetic azimuth and the rotation angle.

2. The method according to claim 1, characterized in that The method further comprises: When the angle difference between the calculated azimuth and the magnetic azimuth is not less than the preset threshold, the screen lock operation is refused.

3. The method according to claim 1, characterized in that The calculating the azimuth of the terminal device at a current moment according to the target magnetic azimuth and the rotation angle includes: For each of the motion data, determining sub-motion data of the motion data on a horizontal plane; The rotation angle of the terminal device on the horizontal plane within the verification time period is determined according to the multiple sub-motion data.

4. The method according to claim 1, characterized in that: The motion sensor is an acceleration sensor, and the motion data is acceleration; or, The motion sensor is a gyroscope, and the motion data is angular velocity.

5. A terminal device, wherein a Hall sensor is provided on the terminal device, characterized in that: The terminal device also includes an acquisition module, a calculation module and a processing module, wherein: The acquisition module is used to acquire the magnetic azimuth detected by the magnetic sensor on the terminal device at the current moment when it is detected that the magnetic flux reported by the Hall sensor is greater than the lock screen threshold; The calculation module is used to calculate the azimuth of the terminal device at the current moment; The processing module is used to perform a screen lock operation when the angle difference between the calculated azimuth and the magnetic azimuth is less than a preset threshold; The calculation module includes a determination unit, an acquisition unit and a processing unit, wherein: The determining unit is used to determine a verification time period; wherein the end time of the verification time period is the current time; The acquisition unit is used to acquire the first target magnetic azimuth detected by the magnetic sensor within the verification time period; The acquisition unit is further used to acquire a plurality of motion data detected by the motion sensor on the terminal device within the verification time period; The processing unit is used to determine the rotation angle of the terminal device on the horizontal plane within the verification time period according to the multiple motion data; The processing unit is used to calculate the azimuth of the terminal device at a current moment based on the target magnetic azimuth and the rotation angle.

6. The terminal device according to claim 5, characterized in that: The processing module is also used to refuse to perform the screen lock operation when the angle difference between the calculated azimuth and the magnetic azimuth is not less than the preset threshold.

7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program is used to execute the control method of the terminal device described in any one of claims 1 to 4 above.

8. A terminal device, characterized in that: The terminal device comprises: processor; a memory for storing processor-executable instructions; The processor is configured to implement the method according to any one of claims 1 to 4.