CN112286599A - Terminal device control method and terminal device - Google Patents

Terminal device control method and terminal device Download PDF

Info

Publication number
CN112286599A
CN112286599A CN202010843710.6A CN202010843710A CN112286599A CN 112286599 A CN112286599 A CN 112286599A CN 202010843710 A CN202010843710 A CN 202010843710A CN 112286599 A CN112286599 A CN 112286599A
Authority
CN
China
Prior art keywords
terminal device
magnetic
azimuth angle
terminal equipment
sensor
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.)
Pending
Application number
CN202010843710.6A
Other languages
Chinese (zh)
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 CN202010843710.6A priority Critical patent/CN112286599A/en
Publication of CN112286599A publication Critical patent/CN112286599A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R33/00Arrangements or instruments for measuring magnetic variables
    • G01R33/02Measuring direction or magnitude of magnetic fields or magnetic flux
    • G01R33/06Measuring direction or magnitude of magnetic fields or magnetic flux using galvano-magnetic devices
    • G01R33/07Hall effect devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Telephone Function (AREA)

Abstract

The disclosure provides a control method of terminal equipment and the terminal equipment. The method is applied to terminal equipment, a Hall sensor is arranged on the terminal equipment, and the method comprises the following steps: when detecting that the magnetic flux reported by the Hall sensor is larger than a screen locking threshold value, acquiring a magnetic azimuth angle detected by a magnetic sensor on the terminal equipment at the current moment; calculating the azimuth angle of the terminal equipment at the current moment; and when the angle difference between the calculated azimuth angle and the magnetic azimuth angle is smaller than a preset threshold value, executing screen locking operation. According to the terminal equipment and the control method thereof, accidental screen locking caused by the fact that the terminal equipment enters an interference magnetic field can be avoided, and user experience can be improved.

Description

Terminal device control method and terminal device
Technical Field
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
In recent years, to improve the browsing experience of users, the display screen of the terminal device is getting larger. When a user uses a terminal device, a leather sheath is usually added to the terminal device to protect a display screen. Accordingly, in order to save resources, more and more terminal devices support the holster lock screen function.
Generally, in order to realize the screen locking function of the leather sheath, a hall sensor is arranged on the terminal equipment, and a magnet is arranged on the leather sheath, so that when the leather sheath is closed, the hall sensor is ensured to be in the magnetic field of the magnet. Therefore, when the terminal equipment detects that the magnetic flux reported by the Hall sensor is larger than the screen locking threshold value, the screen locking operation can be executed.
When terminal equipment got into high magnetic field, for example, when terminal equipment was close to the audio amplifier, at this moment, huge magnetic field can cause the influence to hall sensor in the audio amplifier, arouses unexpected lock screen, and unexpected lock screen seriously influences user experience. Therefore, how to avoid accidental screen locking becomes a problem to be solved urgently at present.
Disclosure of Invention
In view of this, the present disclosure provides a terminal device and a control method thereof, so as to avoid accidental screen locking caused by the terminal device entering an interfering magnetic field, and improve user experience.
According to a first aspect of the embodiments of the present disclosure, a method for controlling a terminal device is provided, where the method is applied to a terminal device, and the terminal device is provided with a hall sensor, and the method includes:
when detecting that the magnetic flux reported by the Hall sensor is larger than a screen locking threshold value, acquiring a magnetic azimuth angle detected by a magnetic sensor on the terminal equipment at the current moment;
calculating the azimuth angle of the terminal equipment at the current moment;
and when the angle difference between the calculated azimuth angle and the magnetic azimuth angle is smaller than a preset threshold value, executing screen locking operation.
According to a second aspect of the embodiments of the present disclosure, there is provided a terminal device, the terminal device being provided with a hall sensor, the terminal device further comprising an obtaining module, a calculating module and a processing module, wherein,
the acquisition module is used for acquiring a magnetic azimuth angle detected by a magnetic sensor on the terminal equipment at the current moment when detecting that the magnetic flux reported by the Hall sensor is greater than a screen locking threshold value;
the calculation module is used for calculating the azimuth angle of the terminal equipment at the current moment;
and the processing module is used for executing screen locking operation when the angle difference between the calculated azimuth angle and the magnetic azimuth angle is smaller than a preset threshold value.
According to a third aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium storing a computer program for executing the control method of the terminal device according to any one of the first aspect of the present disclosure.
According to a fourth aspect of the embodiments of the present disclosure, there is provided a terminal device, the apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement any of the methods provided by the first aspect of the present disclosure.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the embodiment of the disclosure, when it is detected that the magnetic flux reported by the hall sensor is greater than the screen locking threshold, the screen locking operation is executed by acquiring the magnetic azimuth detected by the magnetic sensor at the current moment and calculating the azimuth of the terminal device at the current moment, and further when the angle difference between the calculated azimuth and the magnetic azimuth is smaller than the preset threshold. Therefore, accidental screen locking caused by the fact that the terminal equipment enters the interference magnetic field can be avoided, and user experience can be improved.
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 control method of a terminal device according to an exemplary embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a control method of still another terminal device according to an exemplary embodiment of the present disclosure;
fig. 3 is a flowchart illustrating a control method of still another terminal device according to an exemplary embodiment of the present disclosure;
FIG. 4 is a schematic block diagram of a terminal device shown in accordance with an exemplary embodiment of the present disclosure;
FIG. 5 is a schematic block diagram of another terminal device shown in accordance with an exemplary embodiment of the present disclosure;
fig. 6 is a schematic block diagram of a terminal device shown in accordance with an exemplary embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as operated herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present disclosure. The word "if," as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination," depending on the context.
In view of this, the present disclosure provides a terminal device and a control method thereof, so as to avoid accidental screen locking caused by the terminal device entering an interfering magnetic field, and improve user experience.
The control method of the terminal device can be applied to the terminal device, for example, a smart phone, a tablet computer and the like.
Fig. 1 is a flowchart illustrating a control method of a terminal device according to an exemplary embodiment of the present disclosure. Referring to fig. 1, the method for controlling a terminal device provided in this embodiment is applied to a terminal device, where the terminal device is provided with a hall sensor, and the method may include:
s101, when detecting that the magnetic flux reported by the Hall sensor is larger than a screen locking threshold value, acquiring a magnetic azimuth angle detected by a magnetic sensor on the terminal equipment at the current moment.
And S102, calculating the azimuth angle of the terminal equipment at the current moment.
S103, when the angle difference between the calculated azimuth angle and the magnetic azimuth angle is smaller than a preset threshold value, screen locking operation is executed.
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 predetermined threshold may be 5 ° to 7 °. The preset threshold value is set to 5 ° as an example.
Optionally, the method further comprises:
and when the angle difference between the calculated azimuth angle and the magnetic azimuth angle is not less than the preset threshold value, refusing to execute the screen locking operation.
For example, in an embodiment, the magnetic azimuth angle detected by the magnetic sensor at the current time is 60 °, and the calculated azimuth angle of the device (the device refers to a terminal device, which is not described below) at the current time is 43 °. At this time, the calculated azimuth angle is greatly different from the magnetic azimuth angle detected by the magnetic sensor at the current moment, which indicates that the magnetic sensor is influenced by the interference magnetic field, and further indicates that the hall sensor is also influenced by the interference magnetic field.
For another example, in one embodiment, the magnetic azimuth angle detected by the magnetic sensor at the current time is 210 °, and the calculated azimuth angle of the current time of the device is 213 °. At this time, the difference between the calculated azimuth angle and the magnetic azimuth angle detected by the magnetic sensor at the current moment is not large, which indicates that the magnetic sensor is not influenced by the interference magnetic field, and further indicates that the hall sensor is not influenced by the interference magnetic field, at this time, it is considered that the magnetic flux reported by the hall sensor is caused by the magnet on the leather sheath, which is effective, and at this time, the screen locking operation is executed.
The specific implementation principle of calculating the azimuth angle at the current time of the present device will be described in detail in the following embodiments, and will not be described herein again.
It should be noted that the magnetic field generated by the magnet on the leather sheath is small, and does not affect the magnetic sensor. In this disclosure, through judging whether the magnetic azimuth detected by the magnetic sensor at the present moment and the calculated azimuth angle difference between the two are smaller than a preset threshold, and then when being smaller than the preset threshold, the screen locking event is executed, so that the accidental screen locking caused when the terminal device enters a magnetic field such as a magnetic field around a sound box and the like can be avoided, and the user experience can be improved.
In the method provided by this embodiment, when it is detected that the magnetic flux reported by the hall sensor is greater than the screen locking threshold, the screen locking event is executed by acquiring the magnetic azimuth detected by the magnetic sensor at the current time and calculating the azimuth of the terminal device at the current time, and further when the angle difference between the calculated azimuth and the magnetic azimuth is smaller than the preset threshold. Therefore, when the calculated azimuth angle and the detected magnetic azimuth angle are smaller than the preset threshold value, the magnetic azimuth angle detected by the magnetic sensor is more accurate, the magnetic sensor is not influenced by the interference magnetic field, accordingly, the Hall sensor is determined not to be influenced by the interference magnetic field, screen locking operation is executed, accidental screen locking caused by the fact that the terminal equipment enters the interference magnetic field can be avoided, and user experience can be improved.
Fig. 2 is a flowchart illustrating a control method of still another terminal device according to an exemplary embodiment of the present disclosure. Referring to fig. 2, the method provided in this embodiment, based on the foregoing embodiment, a specific implementation process of calculating the azimuth angle of the terminal device at the current time may include:
s201, determining a verification time period; and the ending time of the verification time period is the current time.
Specifically, the starting time of the verification time period may be a time before the current time and a time from the current time to the current time equal to a preset time. The preset duration is set according to actual needs, and in this embodiment, a specific value of the preset duration is not limited. For example, in one embodiment, the preset time period may be 5min, 10min, 20min, and the like. The preset time period is 10min for the following explanation.
In connection with the above example, for example, the current time is 2020, 7, 30, 15: 42, in this step, the checking time period is determined to be 2020, 7, 30, 15: 32-2020, 7-month, 30-day 15: 42, this time period.
S202, acquiring a first target magnetic azimuth angle detected by the magnetic sensor in the verification time period.
In combination with the above example, in this step, the magnetic sensor is acquired in the following steps of 7/30/15: 32-2020, 7-month, 30-day 15: 42 the first target magnetic azimuth detected during this time period. For example, in one embodiment, the first target magnetic azimuth angle detected by the magnetic force sensor during the verification period is 30 °.
S203, acquiring a plurality of pieces of motion data detected by a motion sensor on the terminal device in the verification time period, and determining a rotation angle of the terminal device on a horizontal plane in the verification time period according to the plurality of pieces of motion data.
In one possible implementation of the present disclosure, the motion sensor may be an acceleration sensor, and in this case, the motion data is an acceleration.
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.
In combination with the above example, in this step, the following data are obtained, namely, 7/month/30/15/2020: 32-2020, 7-month, 30-day 15: 42, all motion data output by the motion sensor. For example, in one embodiment, the motion sensor outputs 10 motion data in total during this time period.
Specifically, when the rotation angle of the device in the horizontal plane in the verification time period is determined based on a plurality of pieces of motion data, the partial motion data of the motion data in the horizontal plane may be determined for each piece of motion data, and the rotation angle of the terminal device in the horizontal plane in the verification time period may be determined according to the plurality of partial motion data.
In specific implementation, when the motion data is the acceleration, the multiple sub-accelerations can be subjected to secondary integration to obtain the rotation angle of the terminal device on the horizontal plane in the verification time period. When the motion data is angular velocity, the multiple sub-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 referred to the description in the related art, and are not described herein.
In addition, for a specific implementation principle and implementation process of determining the partial motion data of the motion data on the horizontal plane, reference may be made to the description in the related art, and details are not described herein.
And S204, calculating the azimuth angle of the terminal equipment at the current moment according to the target magnetic azimuth angle and the rotating angle.
In specific implementation, the sum of the target magnetic azimuth angle and the rotation angle can be determined as the azimuth angle of the terminal device at the current moment. For example, in one embodiment, the rotation angle is +13 ° (the terminal device is rotated 13 ° in the counterclockwise direction on the horizontal plane), and in combination with the above example, the azimuth angle at the current time of the terminal device is determined to be 43 °.
The method provided by the embodiment provides a method for calculating the azimuth angle of the terminal device at the current moment, and according to the method, the azimuth angle of the terminal device at the current moment can be calculated, and further when the angle difference between the magnetic azimuth angle detected at the current moment and the calculated azimuth angle is smaller than a preset threshold value, the magnetic azimuth angle detected at the current moment is considered to be not influenced by an interference magnetic field, the Hall sensor is determined not to be influenced by the interference magnetic field, and at the moment, a screen locking event is executed. Therefore, accidental screen locking caused by the fact that the terminal equipment enters the interference magnetic field can be avoided, and user experience can be improved.
Fig. 3 is a flowchart illustrating a control method of still another terminal device according to an exemplary embodiment of the present disclosure. Referring to fig. 3, the method provided in this embodiment may include:
s301, when the fact that the magnetic flux reported by the Hall sensor is larger than the screen locking threshold value is detected, a first magnetic azimuth detected by the magnetic sensor at the current moment is obtained.
S302, determining a verification time period, and acquiring a plurality of accelerations detected by the acceleration sensor in the verification time period.
And S303, acquiring the partial acceleration of the acceleration on the horizontal plane aiming at each acceleration.
S304, according to the plurality of sub-accelerations, the rotation angle of the terminal equipment on the horizontal plane in the verification time period is determined.
S305, acquiring a first target magnetic azimuth angle detected by the magnetic sensor in the verification time period.
S306, calculating the azimuth angle of the terminal equipment at the current moment according to the target magnetic azimuth angle and the rotating angle.
S307, judging whether the angle difference between the first magnetic azimuth and the calculated azimuth is smaller than a preset threshold value or not.
And S308, if so, executing the screen locking operation, otherwise, refusing to execute the screen locking operation.
For a specific implementation principle and implementation process of step S301 to step S308, reference may be made to the description in the foregoing embodiments, and details are not described here.
A specific example is given below to illustrate the technical solution provided in this embodiment in detail. For example, in one embodiment, 16, 7, 30, 2020: 32, detecting that the magnetic flux reported by the Hall sensor is larger than a screen locking threshold value, and acquiring 16 of the acceleration sensor from 7, 30 and 7 in 2020: 16, 7-month, 30-month, 28-2020: 32, all accelerations output in 5 minutes. For example, 15 accelerations are acquired. Further, for each acceleration, the partial acceleration on the horizontal plane is obtained, and then 15 partial accelerations are subjected to second integration to obtain the rotation angle of the terminal device on the horizontal plane within the 5 minutes. For example, a rotation angle of the terminal device in the horizontal plane of +30 ° is obtained within these 5 minutes. Further, the magnetic force sensor was acquired 16/7/30/2020: 28, 270 ° (positive east), i.e. 16 at 7/30/2020: 28, the initial orientation of the terminal device is east, and after 5 minutes the terminal device has turned 30 ° in a counter-clockwise direction in the horizontal plane, i.e. 16, 7, 30/2020: at the moment 32, the azimuth angle of the current moment of the terminal equipment is calculated to be 300 degrees.
For example, in one possible implementation, at 16, 7/30/2020: at the moment 32, the magnetic azimuth angle detected by the magnetic sensor is 304 °, and at this moment, the difference between the calculated azimuth angle (300 °) and the magnetic azimuth angle detected by the magnetic sensor is not large, which indicates that the magnetic sensor is not affected by the interference magnetic field, and further indicates that the magnetic flux reported by the hall sensor is caused by the magnet on the leather sheath, so that the magnetic sensor is effective, and at this moment, the screen locking operation is executed.
For example, in yet another possible implementation, at 16/7/30/2020: at the moment 32, the magnetic azimuth angle detected by the magnetic sensor is 310 degrees, at the moment, the difference between the calculated azimuth angle (300 degrees) and the magnetic azimuth angle detected by the magnetic sensor is large, the magnetic sensor is influenced by the interference magnetic field, at the moment, the Hall sensor is considered to be influenced by the interference magnetic field, at the moment, the screen locking event is not executed, and therefore accidental screen locking caused by the fact that the terminal equipment enters the interference magnetic field can be avoided, and user experience can be improved.
Corresponding to the foregoing method embodiment, the present disclosure also provides an embodiment of a terminal device.
As shown in fig. 4, fig. 4 is a schematic block diagram of a terminal device shown in the present disclosure according to an exemplary embodiment, the terminal device includes an obtaining module 410, a calculating module 420 and a processing module 430, wherein,
the obtaining module 410 is configured to obtain a magnetic azimuth detected by a magnetic sensor on the terminal device at a current moment when it is detected that a magnetic flux reported by the hall sensor is greater than a screen locking threshold;
the calculating module 420 is configured to calculate an azimuth angle of the terminal device at the current moment;
the processing module 430 is configured to execute a screen locking operation when an angle difference between the calculated azimuth angle and the magnetic azimuth angle is smaller than a preset threshold.
The apparatus of this embodiment may be used to implement the technical solution of the embodiment shown in fig. 1, and the implementation principle and the technical effect are similar, which are not described herein again.
Further, the processing module 430 is further configured to refuse to perform a screen locking operation when the angle difference between the calculated azimuth and the magnetic azimuth is not less than the preset threshold.
As shown in fig. 5, fig. 5 is a schematic block diagram of another terminal device shown in the present disclosure according to an exemplary embodiment, and on the basis of the foregoing fig. 4 embodiment, the computing module 420 includes a determining unit 4201, an obtaining unit 4202 and a processing unit 4203, wherein,
the determining unit 4201 is configured to determine a verification time period; the end time of the verification time period is the current time;
the obtaining unit 4202 is configured to obtain a first target magnetic azimuth detected by the magnetic sensor during the verification time period;
the obtaining unit 4202 is further configured to obtain a plurality of motion data detected by a motion sensor on the terminal device during the verification time period;
the processing unit 4203 is configured to determine, according to the plurality of motion data, a rotation angle of the terminal device on a horizontal plane within the verification time period;
the processing unit 4203 is configured to calculate an azimuth of the terminal device at the current moment according to the target magnetic azimuth and the rotation angle.
Further, the processing unit 4203 is specifically configured to determine, for each piece of motion data, partial motion data of the piece of motion data on a horizontal plane, and determine, according to the plurality of partial motion data, a rotation angle of the terminal device on the horizontal plane within the verification time period.
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 an angular velocity.
For the terminal device embodiment, since it basically corresponds to the method embodiment, the relevant points may be referred to the partial description of the method embodiment. The above-described terminal device embodiments are merely illustrative, and units illustrated as separate components may or may not be physically separate, and components displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the disclosed solution. One of ordinary skill in the art can understand and implement it without inventive effort.
Accordingly, the present disclosure also provides a computer-readable storage medium, in which a computer program is stored, where the computer program is used to execute any one of the above methods for controlling a terminal device.
Correspondingly, the present disclosure further provides a terminal device, where the terminal device includes:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement any of the methods provided by the first aspect of the present disclosure.
Fig. 6 is a schematic block diagram of a terminal device shown in accordance with an example embodiment. For example, the terminal device 600 may be a mobile phone, a tablet computer, an electronic book reader, a multimedia playing device, a wearable device, a vehicle-mounted terminal, or other terminals.
Referring to fig. 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.
The processing component 602 generally controls overall operations of the terminal device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602. For another example, the processing component 602 may read executable instructions from a memory to implement the steps of a control method of a terminal device provided by the foregoing embodiments.
The memory 604 is configured to store various types of data to support operation at the terminal device 600. Examples of such data include instructions for any application or method operating on the terminal device 600, contact data, phonebook data, messages, pictures, videos, and the like. The memory 604 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 606 provides power to the various components of the terminal device 600. The power components 606 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the terminal device 600.
The multimedia component 608 comprises a display screen providing an output interface between the terminal device 600 and a user. In some embodiments, the multimedia component 608 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 terminal device 600 is in an operation mode, such as a photographing 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 610 is configured to output and/or input audio signals. For example, the audio component 610 includes a Microphone (MIC) configured to receive an external audio signal when the terminal device 600 is in an operation 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 604 or transmitted via the communication component 618. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 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 component 616 includes one or more sensors for providing various aspects of status assessment for the terminal device 600. For example, sensor component 616 may detect an open/closed state of terminal device 600, the relative positioning of components, such as a display and keypad of terminal device 600, sensor component 616 may also detect a change in the position of terminal device 600 or a component of terminal device 600, the presence or absence of user contact with terminal device 600, orientation or acceleration/deceleration of terminal device 600, and a change in the temperature of terminal device 600. The sensor component 616 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 616 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 616 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 618 is configured to facilitate communication between the terminal device 600 and other devices in a wired or wireless manner. The terminal device 600 may 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 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 terminal device 600 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 machine-readable storage medium comprising instructions, such as the memory 604 comprising instructions, executable by the processor 620 of the terminal device 600 to perform the wireless charging method described above 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.
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 disclosure 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.
The above description is only exemplary of the present disclosure and should not be taken as limiting the disclosure, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.

Claims (10)

1. A control method of terminal equipment is characterized in that the method is applied to the terminal equipment, a Hall sensor is arranged on the terminal equipment, and the method comprises the following steps:
when detecting that the magnetic flux reported by the Hall sensor is larger than a screen locking threshold value, acquiring a magnetic azimuth angle detected by a magnetic sensor on the terminal equipment at the current moment;
calculating the azimuth angle of the terminal equipment at the current moment;
and when the angle difference between the calculated azimuth angle and the magnetic azimuth angle is smaller than a preset threshold value, executing screen locking operation.
2. The method of claim 1, further comprising:
and when the angle difference between the calculated azimuth angle and the magnetic azimuth angle is not less than the preset threshold value, refusing to execute the screen locking operation.
3. The method of claim 1, wherein the calculating the azimuth angle of the current time of the terminal device comprises:
determining a verification time period; the end time of the verification time period is the current time;
acquiring a first target magnetic azimuth detected by the magnetic sensor in the verification time period;
acquiring a plurality of pieces of motion data detected by a motion sensor on the terminal device in the verification time period, and determining a rotation angle of the terminal device on a horizontal plane in the verification time period according to the plurality of pieces of motion data;
and calculating the azimuth angle of the terminal equipment at the current moment according to the target magnetic azimuth angle and the rotation angle.
4. The method according to claim 3, wherein the calculating the azimuth of the terminal device at the current moment according to the target magnetic azimuth and the rotation angle comprises:
for each piece of motion data, determining partial motion data of the motion data on a horizontal plane;
and determining the rotation angle of the terminal equipment on the horizontal plane in the verification time period according to the plurality of partial motion data.
5. The method of claim 3, wherein the motion sensor is an acceleration sensor and the motion data is acceleration; or the like, or, alternatively,
the motion sensor is a gyroscope, and the motion data is angular velocity.
6. A terminal device is provided with a Hall sensor, and is characterized by further comprising an acquisition module, a calculation module and a processing module, wherein,
the acquisition module is used for acquiring a magnetic azimuth angle detected by a magnetic sensor on the terminal equipment at the current moment when detecting that the magnetic flux reported by the Hall sensor is greater than a screen locking threshold value;
the calculation module is used for calculating the azimuth angle of the terminal equipment at the current moment;
and the processing module is used for executing screen locking operation when the angle difference between the calculated azimuth angle and the magnetic azimuth angle is smaller than a preset threshold value.
7. The terminal device according to claim 6, wherein the processing module is further configured to refuse to perform a screen locking operation when an angle difference between the calculated azimuth and the magnetic azimuth is not less than the preset threshold.
8. The terminal device of claim 6, wherein the calculation module comprises a determination unit, an acquisition unit, and a processing unit, wherein,
the determining unit is used for determining a verification time period; the end time of the verification time period is the current time;
the acquisition unit is used for acquiring a first target magnetic azimuth angle detected by the magnetic sensor in the verification time period;
the obtaining unit is further configured to obtain a plurality of pieces of motion data detected by a motion sensor on the terminal device within the verification time period;
the processing unit is used for determining the rotation angle of the terminal equipment on the horizontal plane in the verification time period according to the plurality of motion data;
and the processing unit is used for calculating the azimuth angle of the terminal equipment at the current moment according to the target magnetic azimuth angle and the rotating angle.
9. A computer-readable storage medium, characterized in that the storage medium stores a computer program for executing the control method of the terminal device according to any one of claims 1 to 5.
10. A terminal device, characterized in that the terminal device comprises:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the method of any one of claims 1 to 5.
CN202010843710.6A 2020-08-20 2020-08-20 Terminal device control method and terminal device Pending CN112286599A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010843710.6A CN112286599A (en) 2020-08-20 2020-08-20 Terminal device control method and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010843710.6A CN112286599A (en) 2020-08-20 2020-08-20 Terminal device control method and terminal device

Publications (1)

Publication Number Publication Date
CN112286599A true CN112286599A (en) 2021-01-29

Family

ID=74420749

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010843710.6A Pending CN112286599A (en) 2020-08-20 2020-08-20 Terminal device control method and terminal device

Country Status (1)

Country Link
CN (1) CN112286599A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113804237A (en) * 2021-09-26 2021-12-17 东莞华贝电子科技有限公司 Detection distance testing method and device of electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113804237A (en) * 2021-09-26 2021-12-17 东莞华贝电子科技有限公司 Detection distance testing method and device of electronic equipment

Similar Documents

Publication Publication Date Title
EP3179711B1 (en) Method and apparatus for preventing photograph from being shielded
EP3300407B1 (en) Method and device for processing verification code
CN106339168B (en) Screen control method and device
CN109557999B (en) Bright screen control method and device and storage medium
EP3173970A1 (en) Image processing method and apparatus
US20170126826A1 (en) Method and device for presenting push notifications
EP3496391B1 (en) Method and device for capturing image and storage medium
CN107202574B (en) Motion trail information correction method and device
US20170064245A1 (en) Method, device, terminal device, and storage medium for video effect processing
US10248855B2 (en) Method and apparatus for identifying gesture
CN112969096A (en) Media playing method and device and electronic equipment
CN107562349B (en) Method and device for executing processing
CN107132769B (en) Intelligent equipment control method and device
EP3322227B1 (en) Methods and apparatuses for controlling wireless connection, computer program and recording medium
EP3276974A1 (en) Video sharing method and apparatus, computer program and recording medium
EP3839786A1 (en) Information acquisition method and device, and storage medium
CN110059548B (en) Target detection method and device
CN108629814B (en) Camera adjusting method and device
CN107656616B (en) Input interface display method and device and electronic equipment
EP3125514A1 (en) Method and device for state notification
CN105653903A (en) Application program authority management method and device
CN112286599A (en) Terminal device control method and terminal device
US20140120877A1 (en) System and method for protecting private information by using nfc tags
CN107357643B (en) Application calling method and device and computer readable storage medium
EP4132052A1 (en) Network connection method and device and readable storage medium

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