CN108668005B - Terminal detection method and terminal - Google Patents

Terminal detection method and terminal Download PDF

Info

Publication number
CN108668005B
CN108668005B CN201810210872.9A CN201810210872A CN108668005B CN 108668005 B CN108668005 B CN 108668005B CN 201810210872 A CN201810210872 A CN 201810210872A CN 108668005 B CN108668005 B CN 108668005B
Authority
CN
China
Prior art keywords
terminal
held
images
acceleration value
frames
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
CN201810210872.9A
Other languages
Chinese (zh)
Other versions
CN108668005A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201810210872.9A priority Critical patent/CN108668005B/en
Publication of CN108668005A publication Critical patent/CN108668005A/en
Application granted granted Critical
Publication of CN108668005B publication Critical patent/CN108668005B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10016Video; Image sequence

Abstract

The embodiment of the invention discloses a terminal detection method and a terminal, relates to the technical field of terminals, and can solve the problem that whether a mobile phone falls or not cannot be accurately judged. The specific scheme is as follows: detecting whether the terminal is held by hands; under the condition that the terminal is not held by hands, acquiring N frames of images through the terminal, wherein N is an integer greater than 1; and determining that the terminal falls off when at least two images in the N frames of images are different. The embodiment of the invention is applied to the process that whether the terminal falls or not is detected by the terminal.

Description

Terminal detection method and terminal
Technical Field
The embodiment of the invention relates to the technical field of terminals, in particular to a terminal detection method and a terminal.
Background
With the rapid development of terminal technology, the display screen of a terminal (such as a mobile phone) tends to be a full screen. However, the screen of the full screen is large and easy to break, so that the screen is easy to break after the mobile phone falls down. Because the mobile phone cannot judge whether the mobile phone falls or not, after the mobile phone screen is broken, when a user maintains the mobile phone screen in a mobile phone after-sale maintenance place, a mobile phone manufacturer may not judge whether the mobile phone screen is broken or not due to the user or due to the quality problem of the mobile phone.
Disclosure of Invention
The embodiment of the invention provides a terminal detection method and a terminal, and aims to solve the problem that whether a terminal falls or not cannot be judged.
In order to solve the technical problems, the invention adopts the following technical scheme:
in a first aspect of the present invention, a terminal detection method is provided, where the terminal detection method includes: detecting whether the terminal is held by hands; under the condition that the terminal is not held by hands, acquiring N frames of images through the terminal, wherein N is an integer greater than 1; and determining that the terminal falls off when at least two images in the N frames of images are different.
In a second aspect of the present invention, there is provided a terminal, including: the device comprises a detection unit, a collection unit and a determination unit. The detection unit is used for detecting whether the terminal is held by hands. And the acquisition unit is used for acquiring N frames of images through the terminal under the condition that the detection unit detects that the terminal is not held by hand, wherein N is an integer greater than 1. And the determining unit is used for determining that the terminal falls off under the condition that at least two frames of images are different in the N frames of images acquired by the acquiring unit.
In a third aspect of the present invention, a terminal is provided, which comprises a processor, a memory and a computer program stored on the memory and operable on the processor, and which, when executed by the processor, implements the steps of the terminal detection method according to the first aspect.
A fourth aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the terminal detection method according to the first aspect.
In the embodiment of the invention, the terminal can judge whether the terminal falls or not according to the image collected by the terminal under the condition that the terminal is not held by hands. The terminal can detect whether the terminal is held by hands or not, and N frames of images are collected through the terminal under the condition that the terminal is not held by hands; therefore, the terminal can determine whether the terminal falls according to whether at least two images in the N frames of images are different; therefore, the terminal can judge whether the terminal falls or not.
Drawings
Fig. 1 is a schematic structural diagram of an android operating system according to an embodiment of the present invention;
fig. 2 is a first flowchart of a terminal detection method according to an embodiment of the present invention;
fig. 3 is a flowchart of a terminal detection method according to an embodiment of the present invention;
fig. 4 is a flow chart of a terminal detection method provided in the embodiment of the present invention;
fig. 5 is a schematic structural diagram of a terminal according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of a terminal according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terms "first" and "second," and the like, in the description and in the claims of embodiments of the present invention are used for distinguishing between different objects and not for describing a particular order of the objects. For example, the first preset threshold value and the second preset threshold value, etc. are used to distinguish different preset threshold values, rather than to describe a specific order of the preset threshold values. In the description of the embodiments of the present invention, the meaning of "a plurality" means two or more unless otherwise specified.
The term "and/or" herein is an association relationship describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. The symbol "/" herein denotes a relationship in which the associated object is or, for example, a/B denotes a or B.
In the embodiments of the present invention, words such as "exemplary" or "for example" are used to mean serving as examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
The embodiment of the invention provides a terminal detection method and a terminal, which can be applied to the process of detecting whether the terminal falls or not by the terminal and can solve the problem that whether a mobile phone falls or not cannot be accurately judged by the mobile phone in the prior art.
The terminal in the embodiment of the present invention may be a terminal having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present invention are not limited in particular.
The following describes a software environment applied by the terminal detection method provided by the embodiment of the present invention, taking an android operating system as an example.
Fig. 1 is a schematic diagram of an architecture of a possible android operating system according to an embodiment of the present invention. In fig. 1, the architecture of the android operating system includes 4 layers, which are respectively: an application layer, an application framework layer, a system runtime layer, and a kernel layer (specifically, a Linux kernel layer).
The application program layer comprises various application programs (including system application programs and third-party application programs) in an android operating system.
The application framework layer is a framework of the application, and a developer can develop some applications based on the application framework layer under the condition of complying with the development principle of the framework of the application.
The system runtime layer includes libraries (also called system libraries) and android operating system runtime environments. The library mainly provides various resources required by the android operating system. The android operating system running environment is used for providing a software environment for the android operating system.
The kernel layer is an operating system layer of an android operating system and belongs to the bottommost layer of an android operating system software layer. The kernel layer provides kernel system services and hardware-related drivers for the android operating system based on the Linux kernel.
Taking an android operating system as an example, in the embodiment of the present invention, a developer may develop a software program for implementing the terminal detection method provided in the embodiment of the present invention based on the system architecture of the android operating system shown in fig. 1, so that the terminal detection method may operate based on the android operating system shown in fig. 1. Namely, the processor or the terminal can implement the terminal detection method provided by the embodiment of the invention by running the software program in the android operating system.
In a first embodiment of the present invention, fig. 2 illustrates a terminal detection method provided in an embodiment of the present invention, which may be applied to a terminal having an android operating system as illustrated in fig. 1. As shown in fig. 2, the terminal detection method includes steps 201 to 203:
step 201, the terminal detects whether the terminal is held by hand.
Optionally, in the embodiment of the present invention, before step 201, the method for detecting a terminal provided in the embodiment of the present invention further includes step 301 and step 302:
step 301, the terminal obtains an acceleration value of the terminal.
In the embodiment of the invention, the terminal can acquire the acceleration value of the terminal through the sensor of the terminal.
Step 302, the terminal determines whether the variation of the acceleration value of the terminal is greater than or equal to a first preset threshold, or whether the acceleration value of the terminal is a gravitational acceleration value.
Optionally, in the embodiment of the present invention, the terminal may determine whether the terminal has a falling trend according to the variation of the acceleration value of the terminal or the acceleration value of the terminal.
Illustratively, the terminal detects that the acceleration value of the terminal is a at a first moment, detects that the acceleration value of the terminal is b at a second moment, obtains that a difference value between a and b is c, and c is greater than a first preset threshold, and then determines that the terminal has a falling trend.
Illustratively, the terminal detects that the acceleration value of the terminal is d, compares the acceleration value d with a gravity acceleration value prestored in the terminal, and determines that the terminal has a falling trend under the condition that d is equal to the gravity acceleration value.
Of course, in the embodiment of the present invention, the terminal may also obtain the speed value of the terminal through the sensor, and determine whether the terminal has a falling trend according to the speed value.
Optionally, in this embodiment of the present invention, in combination with step 301 and step 302, step 201 in fig. 2 may specifically be implemented by step 303:
and 303, detecting whether the terminal is held by hand or not by the terminal under the condition that the variation of the acceleration value of the terminal is larger than or equal to a first preset threshold value or the acceleration value of the terminal is a gravity acceleration value.
Optionally, in the embodiment of the present invention, the terminal may determine whether the terminal is held by hand by detecting a contact area between the user and a touch screen of the terminal. Specifically, with reference to fig. 2, as shown in fig. 3, the step 201 may be specifically implemented by a step 201a and a step 201 b:
step 201a, the terminal acquires the contact area between the user and the touch screen of the terminal.
In the embodiment of the invention, the terminal can acquire the contact area between the user and the touch screen of the terminal through the sensor.
And step 201b, the terminal judges whether the terminal is held by hand according to the contact area.
Optionally, in this embodiment of the present invention, the step 201b may be specifically implemented by a step 201 b' and a step 201b ″:
step 201 b', in the case that the contact area is less than or equal to the second preset threshold, the terminal determines that the terminal is not held by hand.
For example, assuming that the second preset threshold is 0, the terminal may determine whether a contact area of the user with the touch screen of the terminal is equal to 0, and in a case that the contact area is equal to 0, the terminal determines that the terminal is not held in the hand.
Step 201b ″ the terminal determines that the terminal is held in the hand in case the contact area is larger than the second preset threshold.
For example, assuming that the second preset threshold is 0, the terminal may determine whether a contact area between the user and a touch screen of the terminal is greater than 0, and in a case that the contact area is greater than 0, the terminal determines that the terminal is held in a hand.
Step 202, under the condition that the terminal is not held by hands, the terminal collects N frames of images through the terminal.
Wherein N is an integer greater than 1.
Optionally, in the embodiment of the present invention, the step 202 may be specifically implemented by a step 202 a:
step 202a, the terminal collects N frames of images through the terminal according to the frame rate of image collection of the terminal.
Optionally, in the embodiment of the present invention, when it is determined that the terminal is not held by hand, the terminal may start to acquire a first frame of image through a camera of the terminal, adjust a frame rate of the image acquired by the camera to a maximum value, and continuously acquire N frames of images according to the frame rate, so that the terminal can acquire multiple frames of continuous images.
Optionally, in the embodiment of the present invention, the terminal may acquire N frames of images through at least one of a front camera and a rear camera of the terminal.
And 203, under the condition that at least two images in the N frames of images are different, the terminal determines that the terminal falls off.
In the embodiment of the invention, the terminal can compare at least two frames of images in the acquired N frames of images, and when the at least two frames of images are different, the terminal determines that the terminal falls.
Illustratively, the terminal acquires three frames of images through a camera of the terminal, the three frames of images are respectively an image corresponding to a waist part of a user, an image corresponding to a leg part of the user and an image corresponding to a foot part of the user, the terminal compares the three frames of images to determine that the three frames of images are different, and the terminal determines that the terminal falls.
Optionally, in the embodiment of the present invention, an image of M frames is included between any two images of the at least two images, M is a third preset threshold, and M is smaller than N.
Illustratively, assume that N is 10 and M is 3. The terminal can select a first frame image, a fourth frame image, a seventh frame image and a tenth frame image from the acquired 10 frames of images, and compares the first frame image, the fourth frame image, the seventh frame image and the tenth frame image to judge whether the terminal falls off.
Optionally, in the embodiment of the present invention, after the terminal is determined to fall, the terminal may store the acquired N frames of images in the terminal, so that when a subsequent user needs to maintain the screen of the mobile phone, a mobile phone manufacturer extracts a certificate from the terminal, thereby determining whether the mobile phone screen is broken due to the user or due to a quality problem of the mobile phone.
The embodiment of the invention provides a terminal detection method, and a terminal can judge whether the terminal falls or not according to an image acquired by a terminal under the condition that the terminal is not held by a hand. The terminal can detect whether the terminal is held by hands or not, and N frames of images are collected through the terminal under the condition that the terminal is not held by hands; therefore, the terminal can determine whether the terminal falls according to whether at least two images in the N frames of images are different; therefore, the terminal can judge whether the terminal falls or not.
Optionally, in the embodiment of the present invention, when it is determined that the terminal falls, the terminal may perform protection processing on hardware of the terminal. Specifically, referring to fig. 2, as shown in fig. 4, after step 203, the method for detecting a terminal according to the embodiment of the present invention further includes step 401:
step 401, the terminal performs protection processing on the hardware of the terminal according to a preset strategy.
Optionally, in the embodiment of the present invention, the terminal may perform protection processing on the hardware of the terminal by using at least one of the following preset policies:
(1) and carrying out power-off processing on the power module of the terminal.
For example, the terminal may disconnect a power circuit of the terminal at the moment when the terminal drops, so as to perform shutdown processing on the terminal.
(2) And retracting telescopic hardware such as a camera arranged outside the terminal.
The terminal can rapidly protect the hardware of the terminal when determining that the terminal falls off, so that the situation that part of the hardware of the terminal is damaged when the terminal falls off can be prevented, and the purpose of protecting part of the hardware of the terminal is achieved.
In a second embodiment of the present invention, fig. 5 shows a schematic diagram of a possible structure of a terminal involved in the embodiment of the present invention, and as shown in fig. 5, the terminal 50 may include: a detection unit 51, an acquisition unit 52 and a determination unit 53.
Wherein, the detecting unit 51 is used for detecting whether the terminal 50 is held by hand. And the acquisition unit 52 is configured to acquire N frames of images through the terminal 50 when the detection unit 51 detects that the terminal 50 is not held by hand, where N is an integer greater than 1. And the determining unit 53 is configured to determine that the terminal 50 falls when at least two images of the N frames of images acquired by the acquiring unit 52 are different.
In a possible implementation manner, the terminal 50 provided in the embodiment of the present invention further includes: an acquisition unit and a judgment unit. Wherein the acquiring unit is configured to acquire an acceleration value of the terminal 50 before the detecting unit 51 detects whether the terminal 50 is held by hand. And a judging unit for judging whether the variation of the acceleration value of the terminal 50 is greater than or equal to a first preset threshold, or whether the acceleration value of the terminal 50 is a gravitational acceleration value. The detection unit 51 is specifically configured to: in the case where the variation amount of the acceleration value of the terminal 50 is greater than or equal to the first preset threshold value, or the acceleration value of the terminal 50 is a gravitational acceleration value, it is detected whether the terminal 50 is held in the hand.
In a possible implementation manner, the detection unit 51 is specifically configured to: acquiring the contact area between a user and a touch screen of the terminal 50; and judging whether the terminal is held by hand or not according to the contact area.
In a possible implementation manner, the detection unit 51 is specifically configured to: determining that the terminal 50 is not held by hand in the case that the contact area is less than or equal to a second preset threshold; in the case where the contact area is greater than the second preset threshold value, it is determined that the terminal 50 is held in the hand.
In a possible implementation, the acquisition unit 52 is specifically configured to: the N frames of images are acquired by the terminal 50 according to the frame rate of image acquisition by the terminal 50.
In a possible implementation manner, the terminal 50 provided in the embodiment of the present invention further includes: and a processing unit. The processing unit is configured to, after the determining unit 53 determines that the terminal 50 falls, perform protection processing on hardware of the terminal 50 according to a preset policy.
The terminal 50 provided by the embodiment of the present invention can implement each process implemented by the terminal in the above method embodiments, and for avoiding repetition, detailed description and beneficial effects are not repeated here.
In a third embodiment of the present invention, fig. 6 is a schematic diagram of a hardware structure of a terminal for implementing various embodiments of the present invention. As shown in fig. 6, the terminal 100 includes, but is not limited to: radio frequency unit 101, network module 102, audio output unit 103, input unit 104, sensor 105, display unit 106, user input unit 107, interface unit 108, memory 109, processor 110, and power supply 111.
Those skilled in the art will appreciate that the terminal configuration shown in fig. 6 is not intended to be limiting, and that the terminal may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the terminal includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 110 may be configured to detect whether the terminal is held in a hand; under the condition that the terminal is not held by hands, acquiring N frames of images through the terminal, wherein N is an integer greater than 1; and determining that the terminal falls off when at least two images in the N frames of images are different.
In the embodiment of the invention, the terminal can judge whether the terminal falls or not according to the image collected by the terminal under the condition that the terminal is not held by hands. The terminal can detect whether the terminal is held by hands or not, and N frames of images are collected through the terminal under the condition that the terminal is not held by hands; therefore, the terminal can determine whether the terminal falls according to whether at least two images in the N frames of images are different; therefore, the terminal can judge whether the terminal falls or not.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 101 may be used for receiving and sending signals during a message transmission or call process, and specifically, after receiving downlink data from a base station, the downlink data is processed by the processor 110; in addition, the uplink data is transmitted to the base station. Typically, radio frequency unit 101 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 101 can also communicate with a network and other devices through a wireless communication system.
The terminal provides wireless broadband internet access to the user through the network module 102, such as helping the user send and receive e-mails, browse web pages, access streaming media, and the like.
The audio output unit 103 may convert audio data received by the radio frequency unit 101 or the network module 102 or stored in the memory 109 into an audio signal and output as sound. Also, the audio output unit 103 may also provide audio output related to a specific function performed by the terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 103 includes a speaker, a buzzer, a receiver, and the like.
The input unit 104 is used to receive an audio or video signal. The input Unit 104 may include a Graphics Processing Unit (GPU) 1041 and a microphone 1042, and the Graphics processor 1041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 106. The image frames processed by the graphic processor 1041 may be stored in the memory 109 (or other storage medium) or transmitted via the radio frequency unit 101 or the network module 102. The microphone 1042 may receive sound and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 101 in case of a phone call mode.
The terminal 100 also includes at least one sensor 105, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 1061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 1061 and/or a backlight when the terminal 100 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the terminal posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the sensors 105 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 106 is used to display information input by a user or information provided to the user. The Display unit 106 may include a Display panel 1061, and the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 107 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal. Specifically, the user input unit 107 includes a touch panel 1071 and other input devices 1072. Touch panel 1071, also referred to as a touch screen, may collect touch operations by a user on or near the touch panel 1071 (e.g., operations by a user on or near touch panel 1071 using a finger, stylus, or any suitable object or attachment). The touch panel 1071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 110, and receives and executes commands sent by the processor 110. In addition, the touch panel 1071 may be implemented in various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 1071, the user input unit 107 may include other input devices 1072. Specifically, other input devices 1072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 1071 may be overlaid on the display panel 1061, and when the touch panel 1071 detects a touch operation thereon or nearby, the touch panel 1071 transmits the touch operation to the processor 110 to determine the type of the touch event, and then the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Although in fig. 6, the touch panel 1071 and the display panel 1061 are two independent components to implement the input and output functions of the terminal, in some embodiments, the touch panel 1071 and the display panel 1061 may be integrated to implement the input and output functions of the terminal, and is not limited herein.
The interface unit 108 is an interface for connecting an external device to the terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal 100 or may be used to transmit data between the terminal 100 and the external device.
The memory 109 may be used to store software programs as well as various data. The memory 109 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 109 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 110 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal and processes data by operating or executing software programs and/or modules stored in the memory 109 and calling data stored in the memory 109, thereby performing overall monitoring of the terminal. Processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 110.
The terminal 100 may further include a power supply 111 (e.g., a battery) for supplying power to various components, and preferably, the power supply 111 may be logically connected to the processor 110 through a power management system, so as to manage charging, discharging, and power consumption management functions through the power management system.
In addition, the terminal 100 includes some functional modules that are not shown, and thus, the detailed description thereof is omitted.
Preferably, an embodiment of the present invention further provides a terminal, which includes a processor 110, a memory 109, and a computer program stored in the memory 109 and capable of running on the processor 110, where the computer program is executed by the processor 110 to implement the processes of the foregoing method embodiments, and can achieve the same technical effects, and details are not repeated here to avoid repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the processes of the method embodiments, and can achieve the same technical effects, and in order to avoid repetition, the details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (11)

1. A terminal detection method, characterized in that the method comprises:
detecting whether the terminal is held by a hand;
under the condition that the terminal is not held by a hand, acquiring a first frame of image through a camera of the terminal, adjusting the frame rate of the image acquired by the camera to the maximum value, and continuously acquiring N frames of images according to the frame rate, wherein N is an integer greater than 1;
and determining that the terminal falls off when at least two images in the N frames of images are different.
2. The method according to claim 1, wherein before the detecting whether the terminal is held, the method further comprises:
acquiring an acceleration value of the terminal;
judging whether the variation of the acceleration value of the terminal is larger than or equal to a first preset threshold value or not, or whether the acceleration value of the terminal is a gravity acceleration value or not;
correspondingly, the detecting whether the terminal is held by hand includes:
and detecting whether the terminal is held by hand or not under the condition that the variation of the acceleration value of the terminal is greater than or equal to the first preset threshold value or the acceleration value of the terminal is the gravity acceleration value.
3. The method according to claim 1 or 2, wherein the detecting whether the terminal is handheld comprises:
acquiring the contact area between a user and a touch screen of the terminal;
and judging whether the terminal is held by hand or not according to the contact area.
4. The method according to claim 3, wherein the determining whether the terminal is held by a hand according to the contact area comprises:
determining that the terminal is not held by hand under the condition that the contact area is smaller than or equal to a second preset threshold value;
and under the condition that the contact area is larger than the second preset threshold value, determining that the terminal is held by hand.
5. The method according to claim 1, wherein the acquiring, by the terminal, N frames of images comprises:
and acquiring N frames of images through the terminal according to the frame rate of image acquisition of the terminal.
6. A terminal, characterized in that the terminal comprises:
the detection unit is used for detecting whether the terminal is held by hands or not;
the acquisition unit is used for acquiring a first frame of image through a camera of the terminal under the condition that the detection unit detects that the terminal is not held by hands, adjusting the frame rate of the image acquired by the camera to the maximum value, and continuously acquiring N frames of images according to the frame rate, wherein N is an integer greater than 1;
and the determining unit is used for determining that the terminal falls off under the condition that at least two frames of images in the N frames of images acquired by the acquiring unit are different.
7. The terminal of claim 6, further comprising:
the acquisition unit is used for acquiring the acceleration value of the terminal before the detection unit detects whether the terminal is held by hands;
the judging unit is used for judging whether the variation of the acceleration value of the terminal is larger than or equal to a first preset threshold value or not, or whether the acceleration value of the terminal is a gravity acceleration value or not;
the detection unit is specifically configured to:
and detecting whether the terminal is held by hand or not under the condition that the variation of the acceleration value of the terminal is greater than or equal to the first preset threshold value or the acceleration value of the terminal is the gravity acceleration value.
8. The terminal according to claim 6 or 7, wherein the detecting unit is specifically configured to:
acquiring the contact area between a user and a touch screen of the terminal;
and judging whether the terminal is held by hand or not according to the contact area.
9. The terminal according to claim 8, wherein the detecting unit is specifically configured to:
determining that the terminal is not held by hand under the condition that the contact area is smaller than or equal to a second preset threshold value;
and under the condition that the contact area is larger than the second preset threshold value, determining that the terminal is held by hand.
10. The terminal according to claim 6, wherein the acquisition unit is specifically configured to:
and acquiring N frames of images through the terminal according to the frame rate of image acquisition of the terminal.
11. A terminal, characterized in that it comprises a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the terminal detection method according to any one of claims 1 to 5.
CN201810210872.9A 2018-03-14 2018-03-14 Terminal detection method and terminal Active CN108668005B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810210872.9A CN108668005B (en) 2018-03-14 2018-03-14 Terminal detection method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810210872.9A CN108668005B (en) 2018-03-14 2018-03-14 Terminal detection method and terminal

Publications (2)

Publication Number Publication Date
CN108668005A CN108668005A (en) 2018-10-16
CN108668005B true CN108668005B (en) 2020-09-15

Family

ID=63785196

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810210872.9A Active CN108668005B (en) 2018-03-14 2018-03-14 Terminal detection method and terminal

Country Status (1)

Country Link
CN (1) CN108668005B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209335B (en) * 2019-05-08 2021-12-14 珠海格力电器股份有限公司 Control method and device of intelligent terminal

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011100432A (en) * 2009-11-06 2011-05-19 Askey Computer Corp Handheld electronic device and method for protecting the same from shock due to falling
CN103310168A (en) * 2012-03-14 2013-09-18 联想(北京)有限公司 Method for preventing equipment from falling and equipment
CN104834583A (en) * 2015-05-22 2015-08-12 广东欧珀移动通信有限公司 Mobile terminal falling processing method and system
CN105072324A (en) * 2015-08-14 2015-11-18 深圳警翼数码科技有限公司 Falling detection law enforcement recorder and falling detection method
CN105550608A (en) * 2015-12-02 2016-05-04 普联技术有限公司 Equipment retrieving method and device
CN105912961A (en) * 2016-04-08 2016-08-31 上海卓易科技股份有限公司 Mobile terminal automatic crash-proof method and device
CN106325380A (en) * 2016-08-05 2017-01-11 珠海格力电器股份有限公司 Self-checking anti-drop method and device for terminal equipment screen
CN106878558A (en) * 2017-02-16 2017-06-20 北京小米移动软件有限公司 Dropproof based reminding method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011100432A (en) * 2009-11-06 2011-05-19 Askey Computer Corp Handheld electronic device and method for protecting the same from shock due to falling
CN103310168A (en) * 2012-03-14 2013-09-18 联想(北京)有限公司 Method for preventing equipment from falling and equipment
CN104834583A (en) * 2015-05-22 2015-08-12 广东欧珀移动通信有限公司 Mobile terminal falling processing method and system
CN105072324A (en) * 2015-08-14 2015-11-18 深圳警翼数码科技有限公司 Falling detection law enforcement recorder and falling detection method
CN105550608A (en) * 2015-12-02 2016-05-04 普联技术有限公司 Equipment retrieving method and device
CN105912961A (en) * 2016-04-08 2016-08-31 上海卓易科技股份有限公司 Mobile terminal automatic crash-proof method and device
CN106325380A (en) * 2016-08-05 2017-01-11 珠海格力电器股份有限公司 Self-checking anti-drop method and device for terminal equipment screen
CN106878558A (en) * 2017-02-16 2017-06-20 北京小米移动软件有限公司 Dropproof based reminding method and device

Also Published As

Publication number Publication date
CN108668005A (en) 2018-10-16

Similar Documents

Publication Publication Date Title
CN108182043B (en) Information display method and mobile terminal
CN108459797B (en) Control method of folding screen and mobile terminal
CN111142991A (en) Application function page display method and electronic equipment
CN110058836B (en) Audio signal output method and terminal equipment
CN109257505B (en) Screen control method and mobile terminal
CN109639887B (en) Control method and terminal equipment
CN109831359B (en) Method for detecting connection state of data network and terminal equipment thereof
CN109739300B (en) Antenna control method and terminal
CN109739394B (en) SAR value processing method and mobile terminal
CN110753155A (en) Proximity detection method and terminal equipment
CN111343710A (en) Power adjustment method and electronic equipment
CN109443261B (en) Method for acquiring folding angle of folding screen mobile terminal and mobile terminal
CN110621071B (en) Processing method of measurement interval, terminal and network node
CN108540642B (en) Mobile terminal and operation method thereof
CN108089935B (en) Application program management method and mobile terminal
CN111026263B (en) Audio playing method and electronic equipment
CN109067429B (en) Control method and terminal equipment
CN110764650A (en) Key trigger detection method and electronic equipment
CN108234745B (en) Signal receiving method, mobile terminal and computer readable storage medium
CN108668005B (en) Terminal detection method and terminal
CN110647727A (en) Terminal control method and terminal
CN110912284B (en) Wireless charging control method and wireless charging assembly
CN109828652B (en) Control method of power consumption mode and terminal equipment
CN111464737B (en) Electric quantity indication method and electronic equipment
CN110769153B (en) Image processing method and electronic equipment

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