CN111246009A - Sliding cover type terminal, distance detection method and device and storage medium - Google Patents

Sliding cover type terminal, distance detection method and device and storage medium Download PDF

Info

Publication number
CN111246009A
CN111246009A CN201811446482.8A CN201811446482A CN111246009A CN 111246009 A CN111246009 A CN 111246009A CN 201811446482 A CN201811446482 A CN 201811446482A CN 111246009 A CN111246009 A CN 111246009A
Authority
CN
China
Prior art keywords
sliding
distance
hall sensor
state
slide
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.)
Granted
Application number
CN201811446482.8A
Other languages
Chinese (zh)
Other versions
CN111246009B (en
Inventor
陈朝喜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201811446482.8A priority Critical patent/CN111246009B/en
Publication of CN111246009A publication Critical patent/CN111246009A/en
Application granted granted Critical
Publication of CN111246009B publication Critical patent/CN111246009B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/0202Portable telephone sets, e.g. cordless phones, mobile phones or bar type handsets
    • H04M1/0206Portable telephones comprising a plurality of mechanically joined movable body parts, e.g. hinged housings
    • H04M1/0208Portable telephones comprising a plurality of mechanically joined movable body parts, e.g. hinged housings characterized by the relative motions of the body parts
    • H04M1/0235Slidable or telescopic telephones, i.e. with a relative translation movement of the body parts; Telephones using a combination of translation and other relative motions of the body parts
    • H04M1/0237Sliding mechanism with one degree of freedom
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/12Details of telephonic subscriber devices including a sensor for measuring a physical value, e.g. temperature or motion

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Telephone Function (AREA)
  • Measurement Of Velocity Or Position Using Acoustic Or Ultrasonic Waves (AREA)
  • Length Measuring Devices With Unspecified Measuring Means (AREA)

Abstract

The disclosure relates to a sliding closure type terminal, a distance detection method, a distance detection device and a storage medium, relating to the technical field of mobile terminals, and being applied to the sliding closure type terminal comprising an upper sliding closure, a lower sliding closure, an ultrasonic distance detection component and an optical distance detection component; the method comprises the following steps: detecting the sliding closure state of the sliding closure type terminal; when the sliding cover is in a closed state, distance detection is carried out through the ultrasonic distance detection component; when switching from the slide cover closed state to the slide cover slide open state is detected, distance detection is performed by the optical distance detection means. When the sliding cover state is the sliding closed state, the distance is detected in the ultrasonic detection mode, and when the sliding cover state is switched from the sliding closed state to the sliding open state, the distance is detected in the light detection mode switched from the ultrasonic detection mode, so that the problem that the detection result is inaccurate due to multiple reflections when the distance is detected in the light detection mode in the sliding cover closed state is solved.

Description

Sliding cover type terminal, distance detection method and device and storage medium
Technical Field
The embodiment of the disclosure relates to the technical field of mobile terminals, and in particular relates to a sliding-cover-type terminal, a distance detection method, a distance detection device and a storage medium.
Background
A slide type terminal is a terminal having an upper slide and a lower slide. The slide type terminal is one direction to realize a full screen terminal. The sliding cover type terminal can hide the distance sensor on the front surface of the lower sliding cover and is used for detecting the distance between the terminal screen and a front obstacle.
In the related art, the distance sensor includes a light emitter and a light receiver. A light hole is formed in a front panel of the mobile terminal, the light emitter emits light outwards, and the light receiver receives reflected light of the light reflected by the barrier. The mobile terminal can determine the distance between the terminal screen and the front barrier according to the light intensity of the reflected light.
Because the distance sensor is hidden in the front of the lower sliding cover, when the terminal is in a sliding cover closed state, and the distance detection is carried out in a light ray detection mode, the detection result is inaccurate due to multiple reflections of the inner wall of the light-transmitting hole of the upper sliding cover.
Disclosure of Invention
The embodiment of the disclosure provides a sliding-cover terminal, a distance detection method and device and a storage medium, which can solve the problem that a detection result is inaccurate due to multiple reflections when distance detection is performed in a light detection mode when a sliding cover is in a closed state. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a slide type terminal including an upper slide cover and a lower slide cover, and an ultrasonic type distance detection part and an optical type distance detection part;
the ultrasonic distance detection component comprises a sound production component and a sound collection component, the sound production component is arranged on a hidden area on the lower sliding cover, the hidden area is an area where the sliding cover type terminal is invisible when the sliding cover is in a closed state and is visible when the sliding cover type terminal is in a sliding open state, and a sound transmission hole is formed in the position, corresponding to the projection of the sound production component when the sliding cover is in the closed state, on the upper sliding cover;
the optical distance detection part is arranged on the hidden area on the lower sliding cover.
Optionally, a magnet is arranged in the upper sliding cover, a hall sensor is arranged in the lower sliding cover, the hall sensor is located on one side of the first magnetic pole of the magnet in the closed state of the sliding cover, the hall sensor is located on one side of the second magnetic pole of the magnet in the sliding state of the sliding cover, and the output level of the hall sensor corresponds to the sliding state of the sliding cover where the sliding cover terminal is located.
Optionally, the hall sensor comprises a first hall sensor and a second hall sensor;
in a closed state of the sliding cover, the distance between the first Hall sensor and the magnet is smaller than the distance between the second Hall sensor and the magnet;
the output levels of the first Hall sensor and the second Hall sensor correspond to the sliding closure state of the sliding closure terminal.
Optionally, the optical distance detection component comprises an emission viewing angle range and a reception viewing angle range;
the emission visual angle range and the receiving visual angle range of the distance detection component have an overlapping area, the vertex of the overlapping area is positioned below the upper surface of the lower sliding cover, the upper surface of the lower sliding cover is a surface which is invisible when the sliding cover type terminal is in a sliding cover closed state, and the sliding cover type terminal is partially visible when the sliding cover type terminal is in a sliding open state.
According to another aspect of the present disclosure, there is provided a distance detection method applied to a slide terminal as provided in the first aspect of the embodiments of the present disclosure, the method including:
detecting the sliding closure state of the sliding closure terminal, wherein the sliding closure state is the sliding closure closed state or the sliding closure sliding open state;
when the sliding cover type terminal is in a sliding cover closing state, distance detection is carried out through the ultrasonic distance detection component, and the ultrasonic detection component is used for transmitting sound wave signals through the sound generation component and receiving ultrasonic signals through the sound receiving component to detect the distance;
when the sliding cover type terminal is switched from the sliding cover closing state to the sliding cover sliding opening state, the optical distance detection component is used for detecting the distance through emitting and receiving light energy.
Optionally, when the slide-type terminal is in the slide-type closed state, the distance detection by the ultrasonic distance detection unit includes:
when the sliding cover type terminal is in a closed state of the sliding cover, controlling the sound production component to emit a sound wave signal with a preset frequency through the sound transmission hole;
and detecting the distance according to the sound wave energy corresponding to the preset frequency and received by the sound receiving component.
Optionally, the detecting a distance according to the acoustic energy corresponding to the preset frequency received by the acoustic receiving component includes:
and matching the acoustic wave energy with a pre-stored energy distance fitting curve table to obtain the distance corresponding to the acoustic wave energy.
Optionally, a magnet is arranged in the upper sliding cover, a hall sensor is arranged in the lower sliding cover, the hall sensor is located in one side direction of a first magnetic pole of the magnet in a closed state of the sliding cover, and the hall sensor is located in one side direction of a second magnetic pole of the magnet in a sliding state of the sliding cover;
the detecting the sliding closure state of the sliding closure terminal comprises:
and determining the sliding closure states corresponding to the upper sliding closure and the lower sliding closure according to the output level of the Hall sensor.
Optionally, the hall sensor includes a first hall sensor and a second hall sensor, and in a state where the sliding cover is closed, a distance from the first hall sensor to the magnet is smaller than a distance from the second hall sensor to the magnet;
the determining the sliding closure states of the upper sliding closure and the lower sliding closure according to the output level of the hall sensor comprises:
when the output levels of the first Hall sensor and the second Hall sensor change according to the sequence of 01, 11 and 10, determining that the sliding closure type terminal is in the sliding closure type state when the output level is 10;
when the output levels of the first Hall sensor and the second Hall sensor change according to the sequence of 10, 11 and 01, determining that the sliding cover type terminal is in the sliding open state when the output level is 01;
wherein the 1 represents a low level and the 0 represents a high level.
Optionally, the method further comprises:
when the detected distance is within the preset distance, controlling the display screen of the sliding-cover type terminal to be in a screen-off state;
and when the detection distance exceeds the preset distance, controlling the display screen of the sliding-cover type terminal to be in a bright screen state.
According to another aspect of the present disclosure, the method is applied to the slide terminal provided by the first aspect of the embodiment of the present disclosure;
the device comprises:
the detection module is configured to detect a sliding closure state of the sliding closure terminal, wherein the sliding closure state is a sliding closure closed state or a sliding closure sliding open state;
a control module configured to perform distance detection by the ultrasonic distance detection part when the slide type terminal is in the slide closure state, the ultrasonic detection part being configured to transmit a sound wave signal by the sound emitting part and receive an ultrasonic signal by the sound receiving part to detect a distance;
the control module is further configured to perform distance detection through the optical distance detection component when the slide type terminal is switched from the slide cover closed state to the slide cover sliding open state, wherein the optical distance detection component is used for detecting distance through emitting and receiving light energy.
Optionally, the control module is further configured to control the sound-generating component to emit a sound wave signal with a preset frequency through the sound-transparent hole when the slide-type terminal is in the slide-type closed state;
the detection module is further configured to detect a distance according to the acoustic energy corresponding to the preset frequency received by the sound receiving component.
Optionally, the detecting module is further configured to match the acoustic energy with a fitted curve table of distances between pre-stored energies, resulting in a distance corresponding to the acoustic energy.
Optionally, a magnet is arranged in the upper sliding cover, a hall sensor is arranged in the lower sliding cover, the hall sensor is located in one side direction of a first magnetic pole of the magnet in a closed state of the sliding cover, and the hall sensor is located in one side direction of a second magnetic pole of the magnet in a sliding state of the sliding cover;
the detection module is further configured to determine the sliding closure states of the upper sliding closure and the lower sliding closure according to the output level of the Hall sensor.
Optionally, the hall sensor includes a first hall sensor and a second hall sensor, and in a state where the sliding cover is closed, a distance from the first hall sensor to the magnet is smaller than a distance from the second hall sensor to the magnet;
the detection module is further configured to determine that the slide-type terminal is in the slide-type closed state when the output level is 10 when the output levels of the first hall sensor and the second hall sensor change in the order of 01, 11 and 10;
the detection module is further configured to determine that the slide-type terminal is in the slide-open state when the output level is 01 when the output levels of the first hall sensor and the second hall sensor change in the order of 10, 11 and 01;
wherein the 1 represents a low level and the 0 represents a high level.
Optionally, the control module is further configured to control the display screen of the slide-type terminal to be in a screen-off state when the detected detection distance is within a preset distance; and when the detection distance exceeds the preset distance, controlling the sliding cover to enable the display screen of the terminal to be in a bright screen state.
According to another aspect of the present disclosure, there is provided a distance detecting device, which is applied to the slide-type terminal provided in the first aspect of the embodiments of the present disclosure;
the device comprises:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
detecting the sliding closure state of the sliding closure terminal, wherein the sliding closure state is the sliding closure closed state or the sliding closure sliding open state;
when the sliding cover type terminal is in a sliding cover closing state, distance detection is carried out through the ultrasonic distance detection component, and the ultrasonic detection component is used for transmitting sound wave signals through the sound generation component and receiving ultrasonic signals through the sound receiving component to detect the distance;
when the sliding cover type terminal is switched from the sliding cover closing state to the sliding cover sliding opening state, the optical distance detection component is used for detecting the distance through emitting and receiving light energy.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the distance detection method as provided in the embodiments of the present disclosure above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
in the sliding type terminal, when the sliding cover state is the sliding closed state, the distance is detected through the ultrasonic distance detection component, and when the sliding cover state is switched from the sliding closed state to the sliding open state, the ultrasonic distance detection component is switched to detect the distance through the optical distance detection component, so that the problem that the detection result is inaccurate due to multiple reflections when the distance is detected in a light detection mode in the sliding closed state is solved.
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 an external view schematically illustrating a slide type terminal according to an exemplary embodiment of the present disclosure;
FIG. 2 is a flow chart of a distance detection method provided by an exemplary embodiment of the present disclosure;
fig. 3 is a schematic diagram illustrating a positional relationship between a magnet in the upper sliding cover and a hall sensor in the lower sliding cover in two states according to an exemplary embodiment of the disclosure;
FIG. 4 is a flow chart of a distance detection method provided by another exemplary embodiment of the present disclosure;
FIG. 5 is a schematic view of a distance sensor provided in an exemplary embodiment of the present disclosure;
FIG. 6 is a graph of energy distance scatter distribution provided by an exemplary embodiment of the present disclosure;
FIG. 7 is a schematic diagram of an energy distance fit curve provided by an exemplary embodiment of the present disclosure;
fig. 8 is a block diagram of a distance detection apparatus according to an exemplary embodiment of the present disclosure;
fig. 9 is a block diagram of a terminal according to 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.
First, in the test process, the following problem is obtained for the distance detection component test of the slide type terminal: when the sliding cover type terminal is in a closed state, when the distance detection is carried out in a light ray detection mode, light rays are reflected by multiple reflection on the inner wall of the light-transmitting hole of the upper sliding cover and the shielding object, the light ray energy received by the optical distance detection component is energy after multiple reflection and breakage, and along with the increase of the sliding times of the sliding cover, the accuracy of the projection relation between the light-transmitting hole and the optical distance detection component is also reduced, so that the detection result is inaccurate; since the detection accuracy of the ultrasonic distance detection unit is lower than that of the optical distance detection unit, and the distance detection accuracy is greatly affected by only using the ultrasonic distance detection unit, the distance is detected by combining the optical distance detection unit and the ultrasonic distance detection unit in the present disclosure.
The full-face screen is the development trend of the mobile terminal. The difficulty in realizing the full-screen is how to cancel or hide devices such as a front-facing camera, a distance sensor, a microphone, a fingerprint sensor, a physical key and the like on the front face of the terminal, so that the proportion of the display screen is increased as much as possible.
Fig. 1 schematically shows an external view of a slide type terminal 100. The slide type terminal 100 includes: the upper sliding cover 110 and the lower sliding cover 120 are connected by a sliding rail. The upper slider 110 and the lower slider 120 are switchable between a slider-open state and a slider-closed state.
The slide-open state is a state in which the relative sliding distance between the upper slide cover 110 and the lower slide cover 120 is greater than a predetermined value. In the slide-open state, the distance detection member 12 on the front surface of the lower slide cover 120 is in an exposed state. The distance detection means 12 may be ultrasonic distance detection means and/or optical distance detection means.
The closed state is a state in which the relative sliding distance between the upper sliding cover 110 and the lower sliding cover 120 is zero, that is, the front positions of the upper sliding cover 110 and the lower sliding cover 120 are coincident. In the closed state, the hidden area on the front surface of the lower slider 120 is in an unexposed state.
Optionally, the area on the lower sliding cover 120 that is visible when the sliding cover terminal is in the sliding cover open state and invisible when the sliding cover terminal is in the sliding cover closed state is a hidden area.
Optionally, the sliding terminal includes an ultrasonic distance detection component and an optical distance detection component, wherein the ultrasonic distance detection component includes a sound generation component and a sound reception component, the sound generation component is disposed on a hidden area on the lower sliding cover, a sound transmission hole is disposed on the upper sliding cover corresponding to a position of the sound generation component projected when the sliding cover is in a closed state, and optionally, the optical distance detection component is disposed on the hidden area on the lower sliding cover. Illustratively, the sound generating component may be a handset, or may be another component capable of generating sound, and optionally, the handset is a sound generating component made of piezoelectric ceramics.
Optionally, a slide detection assembly and a slide driving part are disposed between the upper slide cover 110 and the lower slide cover 120.
On one hand, the sliding detection component is configured to detect whether a relative sliding distance between the upper sliding cover 110 and the lower sliding cover 120 along a sliding direction reaches a threshold value when a user starts to slide the upper sliding cover and the lower sliding cover, and report a sliding event of the sliding covers when the relative sliding distance reaches the threshold value. The sliding driving part is used for controlling the upper sliding cover 110 and the lower sliding cover 120 to automatically slide when sliding according to the sliding cover sliding event until the sliding state is completely switched from the closed state to the sliding state.
On the other hand, the sliding detection component is configured to detect whether a relative sliding distance between the upper sliding cover 110 and the lower sliding cover 120 along the sliding direction reaches a threshold value when the user starts to slide the upper sliding cover and the lower sliding cover, and report a sliding cover closing event when the relative sliding distance reaches the threshold value. The sliding driving part is used for controlling the upper sliding cover 110 and the lower sliding cover 120 to automatically slide when the sliding cover is closed according to the sliding event until the sliding state is completely switched to the closed state.
Alternatively, the above-described slip detection assembly may be implemented by a magnet and a hall sensor.
Optionally, a magnet is arranged in the upper sliding cover, a hall sensor is arranged in the lower sliding cover, the hall sensor is located in one side direction where the first magnetic pole of the magnet is located when the sliding cover is closed, the hall sensor is located in one side direction where the second magnetic pole of the magnet is located when the sliding cover is slid open, and the output level of the hall sensor corresponds to the sliding cover state where the sliding cover terminal is located.
Optionally, the hall sensor may further include a first hall sensor and a second hall sensor, and when the closed state is damaged, the distance from the first hall sensor to the magnet is smaller than the distance from the second hall sensor to the magnet, and the output levels of the first hall sensor and the second hall sensor correspond to the slide state where the slide terminal is located.
Optionally, the optical detection component includes an emission visual angle range and a reception visual angle range, an overlapping region exists between the emission visual angle range and the reception visual angle range of the distance detection component, a vertex of the overlapping region is located below an upper surface of the lower sliding cover, the upper surface of the lower sliding cover is a surface where the sliding cover terminal is invisible when the sliding cover is in the sliding cover closed state, and the sliding cover terminal is partially visible when the sliding cover terminal is in the sliding cover open state.
With reference to the terminal 100 in fig. 1, fig. 2 is a flowchart of a distance detection method provided by an exemplary embodiment of the present disclosure, taking application of the method in the terminal 100 shown in fig. 1 as an example, where the terminal 100 is a slide terminal including an upper slide cover 110 and a lower slide cover 120, and a hidden area of the lower slide cover 120 is provided with a distance detection component, where the hidden area is an area where the terminal 100 is invisible when the slide cover is closed and visible when the slide cover is slid open, as shown in fig. 2, the method includes:
step 201, detecting the sliding closure state of the sliding closure type terminal.
Optionally, the sliding cover state is a sliding cover closed state or a sliding cover sliding open state. Optionally, the state of the sliding cover further includes a state in sliding, and optionally, the state in sliding is a state in which a relative sliding distance between the upper sliding cover and the lower sliding cover continuously changes.
Optionally, a magnet is disposed in the upper sliding cover, a HALL sensor (HALL) is disposed in the lower sliding cover, the HALL sensor is located in a side direction where the first magnetic pole of the magnet is located when the sliding cover is closed, and is located in a side direction where the second magnetic pole of the magnet is located when the sliding cover is slid open, and when the sliding cover state where the sliding cover terminal is located is detected, the sliding cover states corresponding to the upper sliding cover and the lower sliding cover can be determined according to the output level of the HALL sensor.
Optionally, when determining the state of the sliding cover according to the output level of the hall sensor, any one of the following modes is included:
firstly, a Hall sensor is arranged in a lower sliding cover, when an upper sliding cover slides along the sliding direction of the sliding cover and the Hall sensor is positioned under a magnet in the sliding process of the sliding cover, the output level of the Hall sensor is switched from high level to low level, namely when the output level of the Hall sensor is switched from high level to low level, the sliding distance between the upper sliding cover and the lower sliding cover is determined to reach the preset distance, namely the sliding cover type terminal is switched from the closing state of the sliding cover to the sliding state of the sliding cover; on the contrary, when the upper sliding cover slides along the sliding and closing direction of the sliding cover and the Hall sensor is positioned under the magnet in the sliding process of the sliding cover, the output level of the Hall sensor is switched from low level to high level, namely when the output level of the Hall sensor is switched from low level to high level, the sliding and closing distance between the upper sliding cover and the lower sliding cover is determined to reach the preset distance, namely the sliding and closing state of the sliding cover terminal is switched to the sliding and closing state of the sliding cover from the sliding and opening state of the sliding cover;
secondly, a first HALL sensor and a second HALL sensor are arranged in the lower sliding cover, wherein the distance from the first HALL sensor to the magnet is smaller than the distance from the second HALL sensor to the magnet in the sliding cover closed state, optionally, the distance from the second HALL sensor to the magnet is smaller than the distance from the first HALL sensor to the magnet in the sliding cover open state, schematically, referring to fig. 3, the sliding cover terminal includes an upper sliding cover 31 and a lower sliding cover 32, the upper sliding cover 31 includes a magnet 33, the lower sliding cover 32 includes HALL1 and HALL2, fig. 3 is a transverse schematic diagram of the sliding cover terminal, wherein when the sliding cover terminal is in the sliding cover closed state, the magnet 33 is located above the HALL1 and the HALL2, when the sliding cover terminal is in the sliding cover open state, the magnet 33 is located below the HALL1 and the HALL2, and when the upper sliding cover is switched from the sliding cover closed state to the sliding cover open state, the output level of HALL1 is switched from low level to high level, the output level of HALL2 is switched from high level to low level, and the output levels of HALL1 and HALL2 are both high level when the slide-type terminal is in the state of sliding, i.e., the magnet 33 is located between HALL1 and HALL 2. And when the output levels of the first Hall sensor and the second Hall sensor are changed according to the sequence of 01, 11 and 10, determining that the sliding closure type terminal is in a sliding closure state when the output level is 10, and when the output levels of the first Hall sensor and the second Hall sensor are changed according to the sequence of 10, 11 and 01, determining that the sliding closure type terminal is in a sliding closure state when the output level is 01, wherein 1 represents a low level, and 0 represents a high level.
And 202, when the sliding cover type terminal is in a sliding cover closing state, carrying out distance detection through an ultrasonic distance detection component.
Alternatively, the ultrasonic detection unit is configured to detect the distance by emitting an ultrasonic signal through the sound emitting unit and receiving the ultrasonic signal through the sound receiving unit.
Optionally, the distance detection component comprises a sound production component and a sound receiving component, wherein the sound production component is arranged on the lower sliding cover, the sound receiving component can be arranged on the upper sliding cover, and also can be arranged at any position of the top of the sliding cover type terminal, and optionally, a sound transmission hole is arranged on the upper sliding cover corresponding to the position of the projection of the receiver when the sliding cover is in a closed state; when the sliding cover type terminal is in a sliding cover closed state, the sound production component is controlled to emit sound wave signals with preset frequency through the sound transmission holes, and the distance is detected according to the sound wave energy corresponding to the preset frequency and received by the sound receiving component.
And step 203, when the sliding cover type terminal is detected to be switched from the sliding cover closed state to the sliding cover sliding open state, carrying out distance detection through the optical distance detection component.
Optionally, the optical distance detection unit is configured to detect the distance by emitting and receiving light energy.
Optionally, the distance detecting component includes a light emitter and a light receiver, the light emitter emits light, when a shielding object exists in front of the slide-type terminal, the shielding object reflects the light emitted by the light emitter, the light receiver receives the reflected light, and the distance between the shielding object and the slide-type terminal is determined according to the intensity of the received light.
Optionally, when it is detected that the sliding-cover terminal is switched from the sliding-cover open state to the sliding-cover closed state, the distance detection is performed by the ultrasonic detection component, that is, the distance detection mode is adjusted according to the sliding-cover state.
In summary, in the distance detection method provided in this embodiment, in the slide-type terminal, when the slide state is the slide-closed state, the ultrasonic distance detection unit detects the distance, and when the slide state is switched from the slide-closed state to the slide-open state, the ultrasonic distance detection unit switches to detect the distance through the optical distance detection unit, so as to avoid the problem that the detection result is inaccurate due to multiple reflections when the distance is detected in the light detection manner when the slide state is the slide-closed state.
In an alternative embodiment, when the distance detection is performed by the ultrasonic distance detection component, the distance detection is obtained by matching the received energy signal with a pre-stored energy distance fitting curve table, which is schematically illustrated with reference to fig. 4, taking as an example that the method is applied to the slide-type terminal 100 shown in fig. 1, the method includes:
step 401, detecting a sliding closure state of the sliding closure type terminal.
Optionally, the sliding cover state is a sliding cover closed state or a sliding cover sliding open state. Optionally, the sliding state further includes a sliding state.
Optionally, a magnet is arranged in the upper sliding cover, a hall sensor is arranged in the lower sliding cover, the hall sensor is located in a side direction where a first magnetic pole of the magnet is located in a closed state of the sliding cover, and is located in a side direction where a second magnetic pole of the magnet is located in an open state of the sliding cover, and when a sliding cover state where the sliding cover terminal is located is detected, a sliding cover state corresponding to the upper sliding cover and the lower sliding cover can be determined according to an output level of the hall sensor.
And 402, when the sliding cover type terminal is in a sliding cover closed state, controlling the sound production component to emit a sound wave signal with a preset frequency through the sound transmission hole.
Optionally, the distance detecting component includes a sound generating component and a sound receiving component, wherein the sound generating component is disposed on the lower sliding cover, and the sound receiving component may be disposed on the upper sliding cover or disposed at any position on the top of the sliding-cover terminal.
And step 403, matching the acoustic energy received by the acoustic receiving component with a pre-stored energy distance fitting curve table to obtain a distance corresponding to the acoustic energy.
Optionally, in the energy-distance fitting curve table, the sound wave energy received by the sound-receiving component is linearly related to the distance, and the farther the distance is, the weaker the sound wave energy is.
And step 404, when it is detected that the slide-cover terminal is switched from the slide-cover closed state to the slide-cover sliding open state, performing distance detection through the optical distance detection component.
Optionally, the optical distance detection unit is configured to detect the distance by emitting and receiving light energy.
Optionally, the distance detecting component includes a light emitter and a light receiver, the light emitter emits light, when a shielding object exists in front of the slide-type terminal, the shielding object reflects the light emitted by the light emitter, the light receiver receives the reflected light, and the distance between the shielding object and the slide-type terminal is determined according to the intensity of the received light.
Optionally, when the distance detection is performed in a light detection manner, an overlapping area exists between the emission visual angle range of the distance detection component and the receiving visual angle range of the distance detection component, and a vertex of the overlapping area is located below an upper surface of the lower sliding cover, where the upper surface of the lower sliding cover is a surface where the sliding cover terminal is invisible when the sliding cover is in the sliding cover closed state, and the sliding cover terminal is partially visible when the sliding cover terminal is in the sliding cover open state.
Illustratively, as shown in fig. 5, there is an overlapping area between the emission viewing angle range of the light emitter 510 and the reception viewing angle range of the light receiver 520, and the fixed point S of the overlapping area is located below the upper surface of the lower sliding cover 112.
The overlapping area of the transmitting viewing angle range of the light emitter 510 and the receiving viewing angle range of the light receiver 520 may be a sector area having a vertex S, as shown in fig. 5. If the vertex S of the overlap region is located above the upper surface of the lower sliding cover 112, a part of the region on the lower sliding cover 112 where no light is emitted and no light is received passes through may not be detected when the obstruction is located in the part of the region, thereby causing a distance misjudgment. Therefore, by reasonably designing the positions of the light emitter 510 and the light receiver 520 and reasonably designing the emission visual angle range and the reception visual angle range, the vertex S of the overlapping area is located below the upper surface of the lower sliding cover 112, the detection blind area is avoided, and the reliability and the accuracy of distance detection are improved.
Optionally, the light energy received by the light receiver is linearly related to the distance between the barrier and the terminal end, the further the distance, the weaker the light energy.
Optionally, the light energy received by the light receiver is matched with a pre-stored light energy distance fitting curve table to obtain a distance corresponding to the light energy. Optionally, the light energy distance fit curve is obtained by fitting a scatter diagram corresponding to actually measured light energy and distance, schematically, please refer to fig. 6 and 7, fig. 6 is a scatter diagram corresponding to actually measured light energy and distance, fig. 7 is a light energy distance fit curve obtained by fitting the scatter diagram of fig. 6, and optionally, the fit curve may be approximated by a formula y ═ axbWhere y is used to denote the light energy, a and b are coefficients, and x is used to denote the distance between the barrier and the terminal.
And 405, controlling the display screen of the sliding type terminal to be in a screen-off state when the detected detection distance is within the preset distance.
Optionally, the screen-off state refers to a state in which the terminal is continuously running, but the screen display function is temporarily turned off.
And 406, when the detected distance exceeds the preset distance, the display screen of the control sliding-cover type terminal is in a bright screen state.
In the distance detection method provided by this embodiment, in the slide terminal, when the slide state is the slide closed state, the distance is detected by the ultrasonic distance detection component, and when the slide state is switched from the slide closed state to the slide open state, the ultrasonic distance detection component is switched to detect the distance by the optical distance detection component, thereby avoiding the problem that the detection result is inaccurate due to multiple reflections when the slide state is switched to the slide closed state.
Fig. 8 is a block diagram of a distance detection device according to an exemplary embodiment of the present disclosure, where the distance detection device may be applied to a slide terminal 100 including an upper slide and a lower slide as shown in fig. 1, a hidden area of the lower slide is provided with a distance detection component, and the hidden area is an area where the slide terminal is invisible when the slide is in a slide closed state and visible when the slide terminal is in a slide open state;
the device comprises:
the detecting module 810 is configured to detect a sliding cover state of the sliding cover terminal, where the sliding cover state is a sliding cover closed state or a sliding cover open state;
a control module 820 configured to perform distance detection by the ultrasonic distance detection part for transmitting a sound wave signal through a sound emitting part and receiving an ultrasonic signal through a sound receiving part when the slide type terminal is in the slide closed state;
the control module 820 is further configured to perform distance detection through the optical distance detection component when the slide-type terminal is switched from the slide-type closed state to the slide-type open state, wherein the optical distance detection component is used for detecting distance by emitting and receiving light energy.
In an optional embodiment, the control module 820 is further configured to control the sound emitting component to emit a sound wave signal with a preset frequency through the sound-transparent hole when the slide-type terminal is in the slide-type closed state;
the detecting module 810 is further configured to detect a distance according to the acoustic energy received by the acoustic receiving component and corresponding to the preset frequency.
In an alternative embodiment, the detection module 810 is further configured to match the acoustic energy to a table of pre-stored energy distance fit curves to obtain the distance corresponding to the acoustic energy.
In an optional embodiment, a magnet is arranged in the upper sliding cover, a hall sensor is arranged in the lower sliding cover, the hall sensor is located in a direction of one side of a first magnetic pole of the magnet when the sliding cover is closed, and the hall sensor is located in a direction of one side of a second magnetic pole of the magnet when the sliding cover is slid open;
the detection module 810 is further configured to determine a sliding closure state corresponding to the upper sliding closure and the lower sliding closure according to the output level of the hall sensor.
In an optional embodiment, the hall sensor comprises a first hall sensor and a second hall sensor, and in the closed state of the sliding cover, the distance from the first hall sensor to the magnet is smaller than the distance from the second hall sensor to the magnet;
the detection module 810 is further configured to determine that the slide type terminal is in the slide closure state when the output level is 10 when the output levels of the first hall sensor and the second hall sensor change in the order of 01, 11 and 10;
the detection module 810 is further configured to determine that the slide type terminal is in the slide-open state when the output level is 01 when the output levels of the first hall sensor and the second hall sensor change in the order of 10, 11, 01;
wherein the 1 represents a low level and the 0 represents a high level.
In an optional embodiment, the control module 820 is further configured to control the display screen of the slide terminal to be in a screen-off state when the detected distance is within a preset distance; and when the detection distance exceeds the preset distance, controlling the sliding cover to enable the display screen of the terminal to be in a bright screen state.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the above functional modules is illustrated, and in practical applications, the above functions may be distributed by different functional modules according to actual needs, that is, the content structure of the device is divided into different functional modules, so as to complete all or part of the functions described above.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
An exemplary embodiment of the present disclosure further provides a distance detection apparatus, which can implement the distance detection method provided by the present disclosure. Applied to the slide type terminal 100 shown in fig. 1;
the device includes: a processor, and a memory for storing executable instructions for the processor. Wherein the processor is configured to:
detecting the sliding closure state of the sliding closure terminal, wherein the sliding closure state is the sliding closure closed state or the sliding closure sliding open state;
when the sliding cover type terminal is in a sliding cover closing state, distance detection is carried out through the ultrasonic distance detection component, and the ultrasonic detection component is used for transmitting ultrasonic signals through the sound production component and receiving the ultrasonic signals through the sound receiving component to detect the distance;
when the sliding cover type terminal is switched from the sliding cover closing state to the sliding cover sliding opening state, the optical distance detection component is used for detecting the distance through emitting and receiving light energy.
Optionally, when the slide-type terminal is in the slide-type closed state, the distance detection by the ultrasonic distance detection unit includes:
when the sliding cover type terminal is in a closed state of the sliding cover, controlling the sound production component to emit a sound wave signal with a preset frequency through the sound transmission hole;
and detecting the distance according to the sound wave energy corresponding to the preset frequency and received by the sound receiving component.
Optionally, the detecting a distance according to the acoustic energy corresponding to the preset frequency received by the acoustic receiving component includes:
and matching the acoustic wave energy with a pre-stored energy distance fitting curve table to obtain the distance corresponding to the acoustic wave energy.
Optionally, a magnet is arranged in the upper sliding cover, a hall sensor is arranged in the lower sliding cover, the hall sensor is located in one side direction of a first magnetic pole of the magnet in a closed state of the sliding cover, and the hall sensor is located in one side direction of a second magnetic pole of the magnet in a sliding state of the sliding cover;
the detecting the sliding closure state of the sliding closure terminal comprises:
and determining the sliding closure states corresponding to the upper sliding closure and the lower sliding closure according to the output level of the Hall sensor.
Optionally, the hall sensor includes a first hall sensor and a second hall sensor, and in a state where the sliding cover is closed, a distance from the first hall sensor to the magnet is smaller than a distance from the second hall sensor to the magnet;
the determining the sliding closure states of the upper sliding closure and the lower sliding closure according to the output level of the hall sensor comprises:
when the output levels of the first Hall sensor and the second Hall sensor change according to the sequence of 01, 11 and 10, determining that the sliding closure type terminal is in the sliding closure type state when the output level is 10;
when the output levels of the first Hall sensor and the second Hall sensor change according to the sequence of 10, 11 and 01, determining that the sliding cover type terminal is in the sliding open state when the output level is 01;
wherein the 1 represents a low level and the 0 represents a high level.
Optionally, the method further comprises:
when the detected distance is within the preset distance, controlling the display screen of the sliding-cover type terminal to be in a screen-off state;
and when the detection distance exceeds the preset distance, controlling the display screen of the sliding-cover type terminal to be in a bright screen state.
Fig. 9 is a block diagram illustrating an apparatus 900 according to an example embodiment. For example, the apparatus 900 may be a terminal as introduced above. For example, the terminal may be an electronic device such as a mobile phone, a tablet computer, an electronic book reader, a multimedia playing device, a PC, and a wearable device.
Referring to fig. 9, apparatus 900 may include one or more of the following components: processing component 902, memory 904, power component 906, multimedia component 908, audio component 910, input/output (I/O) interface 912, sensor component 914, and communication component 916.
The processing component 902 generally controls overall operation of the device 900, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. Processing component 902 may include one or more processors 920 to execute instructions to perform all or a portion of the steps of the methods described above. Further, processing component 902 can include one or more modules that facilitate interaction between processing component 902 and other components. For example, the processing component 902 can include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.
The memory 904 is configured to store various types of data to support operation at the apparatus 900. Examples of such data include instructions for any application or method operating on device 900, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 904 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 906 provides power to the various components of the device 900. The power components 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 900.
The multimedia component 908 comprises a screen providing an output interface between the device 900 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 908 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 900 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 910 is configured to output and/or input audio signals. For example, audio component 910 includes a Microphone (MIC) configured to receive external audio signals when apparatus 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 904 or transmitted via the communication component 916. In some embodiments, audio component 910 also includes a speaker for outputting audio signals.
I/O interface 912 provides an interface between processing component 902 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 914 includes one or more sensors for providing status assessment of various aspects of the apparatus 900. For example, sensor assembly 914 may detect an open/closed state of device 900, the relative positioning of components, such as a display and keypad of device 900, the change in position of device 900 or a component of device 900, the presence or absence of user contact with device 900, the orientation or acceleration/deceleration of device 900, and the change in temperature of device 900. The sensor assembly 914 may include a proximity sensor configured to detect the presence of a nearby object in the absence of any physical contact. The sensor assembly 914 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 914 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 916 is configured to facilitate communications between the apparatus 900 and other devices in a wired or wireless manner. The apparatus 900 may access a wireless network based on a communication standard, such as Wi-Fi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 900 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 control method of the terminal screen.
In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor of the apparatus 900, enables the apparatus 900 to implement the above-described control method of the terminal screen. 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.
It should be understood that reference to "a plurality" herein means two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
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.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (18)

1. A slide type terminal is characterized in that the slide type terminal comprises an upper slide cover, a lower slide cover, an ultrasonic distance detection component and an optical distance detection component;
the ultrasonic distance detection component comprises a sound production component and a sound collection component, the sound production component is arranged on a hidden area on the lower sliding cover, the hidden area is an area where the sliding cover type terminal is invisible when the sliding cover is in a closed state and is visible when the sliding cover type terminal is in a sliding open state, and a sound transmission hole is formed in the position, corresponding to the projection of the sound production component when the sliding cover is in the closed state, on the upper sliding cover;
the optical distance detection part is arranged on the hidden area on the lower sliding cover.
2. The slide-type terminal according to claim 1, wherein a magnet is disposed in the upper slide cover, a hall sensor is disposed in the lower slide cover, the hall sensor is located in a direction of a side of a first magnetic pole of the magnet in the closed state of the slide cover, the hall sensor is located in a direction of a side of a second magnetic pole of the magnet in the open state of the slide cover, and an output level of the hall sensor corresponds to a slide state of the slide-type terminal.
3. The slide-type terminal according to claim 2, wherein the hall sensor comprises a first hall sensor and a second hall sensor;
in a closed state of the sliding cover, the distance between the first Hall sensor and the magnet is smaller than the distance between the second Hall sensor and the magnet;
the output levels of the first Hall sensor and the second Hall sensor correspond to the sliding closure state of the sliding closure terminal.
4. The slide terminal according to any of claims 1 to 3, wherein the optical distance detection means comprises a transmission viewing angle range and a reception viewing angle range;
the emission visual angle range and the receiving visual angle range of the distance detection component have an overlapping area, the vertex of the overlapping area is positioned below the upper surface of the lower sliding cover, the upper surface of the lower sliding cover is a surface which is invisible when the sliding cover type terminal is in a sliding cover closed state, and the sliding cover type terminal is partially visible when the sliding cover type terminal is in a sliding open state.
5. A distance detection method applied to the slide terminal of claim 1, the method comprising:
detecting the sliding closure state of the sliding closure terminal, wherein the sliding closure state is the sliding closure closed state or the sliding closure sliding open state;
when the sliding cover type terminal is in a sliding cover closing state, distance detection is carried out through the ultrasonic distance detection component, and the ultrasonic detection component is used for transmitting ultrasonic signals through the sound production component and receiving the ultrasonic signals through the sound receiving component to detect the distance;
when the sliding cover type terminal is switched from the sliding cover closing state to the sliding cover sliding opening state, the optical distance detection component is used for detecting the distance through emitting and receiving light energy.
6. The method as claimed in claim 5, wherein the distance detection by the ultrasonic distance detection means when the slide type terminal is in the slide closed state comprises:
when the sliding cover type terminal is in a closed state of the sliding cover, controlling the sound production component to emit a sound wave signal with a preset frequency through the sound transmission hole;
and detecting the distance according to the sound wave energy corresponding to the preset frequency and received by the sound receiving component.
7. The method according to claim 6, wherein the detecting a distance according to the acoustic energy corresponding to the preset frequency received by the acoustic receiver comprises:
and matching the acoustic wave energy with a pre-stored energy distance fitting curve table to obtain the distance corresponding to the acoustic wave energy.
8. The method according to any one of claims 5 to 7, wherein a magnet is arranged in the upper sliding cover, a Hall sensor is arranged in the lower sliding cover, the Hall sensor is positioned in a direction of one side of a first magnetic pole of the magnet in a closed state of the sliding cover, and the Hall sensor is positioned in a direction of one side of a second magnetic pole of the magnet in a sliding state of the sliding cover;
the detecting the sliding closure state of the sliding closure terminal comprises:
and determining the sliding closure states corresponding to the upper sliding closure and the lower sliding closure according to the output level of the Hall sensor.
9. The method of claim 8, wherein the hall sensor comprises a first hall sensor and a second hall sensor, wherein the first hall sensor is less distant from the magnet than the second hall sensor is distant from the magnet in the slider closed state;
the determining the sliding closure states of the upper sliding closure and the lower sliding closure according to the output level of the hall sensor comprises:
when the output levels of the first Hall sensor and the second Hall sensor change according to the sequence of 01, 11 and 10, determining that the sliding closure type terminal is in the sliding closure type state when the output level is 10;
when the output levels of the first Hall sensor and the second Hall sensor change according to the sequence of 10, 11 and 01, determining that the sliding cover type terminal is in the sliding open state when the output level is 01;
wherein the 1 represents a low level and the 0 represents a high level.
10. The method of any of claims 5 to 7, further comprising:
when the detected distance is within the preset distance, controlling the display screen of the sliding-cover type terminal to be in a screen-off state;
and when the detection distance exceeds the preset distance, controlling the display screen of the sliding-cover type terminal to be in a bright screen state.
11. A distance detection device, which is applied to the slide terminal as claimed in claim 1;
the device comprises:
the detection module is configured to detect a sliding closure state of the sliding closure terminal, wherein the sliding closure state is a sliding closure closed state or a sliding closure sliding open state;
a control module configured to perform distance detection by the ultrasonic distance detection part when the slide type terminal is in the slide closure state, the ultrasonic detection part being configured to transmit a sound wave signal by the sound emitting part and receive an ultrasonic signal by the sound receiving part to detect a distance;
the control module is further configured to perform distance detection through the optical distance detection component when the slide type terminal is switched from the slide cover closed state to the slide cover sliding open state, wherein the optical distance detection component is used for detecting distance through emitting and receiving light energy.
12. The device of claim 11, wherein the control module is further configured to control the sound emitting component to emit a sound wave signal with a preset frequency through the sound-transparent hole when the slide-type terminal is in the slide-type closed state;
the detection module is further configured to detect a distance according to the acoustic energy corresponding to the preset frequency received by the sound receiving component.
13. The apparatus according to claim 12, wherein the detection module is further configured to match the acoustic energy to a pre-stored energy distance fit curve table, resulting in a distance corresponding to the acoustic energy.
14. The device according to any one of claims 11 to 13, wherein a magnet is arranged in the upper sliding cover, a hall sensor is arranged in the lower sliding cover, the hall sensor is located in a direction of one side of a first magnetic pole of the magnet in a closed state of the sliding cover, and the hall sensor is located in a direction of one side of a second magnetic pole of the magnet in a slid state of the sliding cover;
the detection module is further configured to determine the sliding closure states of the upper sliding closure and the lower sliding closure according to the output level of the Hall sensor.
15. The device of claim 14, wherein the hall sensor comprises a first hall sensor and a second hall sensor, wherein the first hall sensor is less distant from the magnet than the second hall sensor is distant from the magnet in the slide closed state;
the detection module is further configured to determine that the slide-type terminal is in the slide-type closed state when the output level is 10 when the output levels of the first hall sensor and the second hall sensor change in the order of 01, 11 and 10;
the detection module is further configured to determine that the slide-type terminal is in the slide-open state when the output level is 01 when the output levels of the first hall sensor and the second hall sensor change in the order of 10, 11 and 01;
wherein the 1 represents a low level and the 0 represents a high level.
16. The device according to any one of claims 11 to 13, wherein the control module is further configured to control the display screen of the slide terminal to be in a screen-off state when the detected distance is within a preset distance; and when the detection distance exceeds the preset distance, controlling the sliding cover to enable the display screen of the terminal to be in a bright screen state.
17. A distance detection device, which is applied to the slide type terminal according to claim 1;
the device comprises:
a processor;
a memory for storing executable instructions of the processor;
wherein the processor is configured to:
detecting the sliding closure state of the sliding closure terminal, wherein the sliding closure state is the sliding closure closed state or the sliding closure sliding open state;
when the sliding cover type terminal is in a sliding cover closing state, distance detection is carried out through the ultrasonic distance detection component, and the ultrasonic detection component is used for transmitting sound wave signals through the sound generation component and receiving ultrasonic signals through the sound receiving component to detect the distance;
when the sliding cover type terminal is switched from the sliding cover closing state to the sliding cover sliding opening state, the optical distance detection component is used for detecting the distance through emitting and receiving light energy.
18. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the distance detection method according to any one of claims 5 to 10.
CN201811446482.8A 2018-11-29 2018-11-29 Sliding cover type terminal, distance detection method and device and storage medium Active CN111246009B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811446482.8A CN111246009B (en) 2018-11-29 2018-11-29 Sliding cover type terminal, distance detection method and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811446482.8A CN111246009B (en) 2018-11-29 2018-11-29 Sliding cover type terminal, distance detection method and device and storage medium

Publications (2)

Publication Number Publication Date
CN111246009A true CN111246009A (en) 2020-06-05
CN111246009B CN111246009B (en) 2021-01-26

Family

ID=70863791

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811446482.8A Active CN111246009B (en) 2018-11-29 2018-11-29 Sliding cover type terminal, distance detection method and device and storage medium

Country Status (1)

Country Link
CN (1) CN111246009B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816634A (en) * 2022-04-26 2022-07-29 歌尔股份有限公司 Interaction method of electronic equipment and electronic equipment

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201153276Y (en) * 2007-05-28 2008-11-19 北京恒基伟业投资发展有限公司 Mobile phone having ultrasonic distance measurement function
US20140248926A1 (en) * 2010-06-25 2014-09-04 Kyocera Corporation Mobile terminal apparatus
US20140378810A1 (en) * 2013-04-18 2014-12-25 Digimarc Corporation Physiologic data acquisition and analysis
CN104918446A (en) * 2014-03-13 2015-09-16 三星电子株式会社 Electronic device cover
CN205725880U (en) * 2016-04-05 2016-11-23 天翼电信终端有限公司 A kind of Collapsible dual-screen mobile device
CN107682480A (en) * 2017-09-26 2018-02-09 深圳市金立通信设备有限公司 A kind of control method of flip terminal, flip terminal and computer-readable medium
CN207399273U (en) * 2017-10-13 2018-05-22 广东美晨通讯有限公司 A kind of full screen mobile terminal

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201153276Y (en) * 2007-05-28 2008-11-19 北京恒基伟业投资发展有限公司 Mobile phone having ultrasonic distance measurement function
US20140248926A1 (en) * 2010-06-25 2014-09-04 Kyocera Corporation Mobile terminal apparatus
US20140378810A1 (en) * 2013-04-18 2014-12-25 Digimarc Corporation Physiologic data acquisition and analysis
CN104918446A (en) * 2014-03-13 2015-09-16 三星电子株式会社 Electronic device cover
CN205725880U (en) * 2016-04-05 2016-11-23 天翼电信终端有限公司 A kind of Collapsible dual-screen mobile device
CN107682480A (en) * 2017-09-26 2018-02-09 深圳市金立通信设备有限公司 A kind of control method of flip terminal, flip terminal and computer-readable medium
CN207399273U (en) * 2017-10-13 2018-05-22 广东美晨通讯有限公司 A kind of full screen mobile terminal

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114816634A (en) * 2022-04-26 2022-07-29 歌尔股份有限公司 Interaction method of electronic equipment and electronic equipment

Also Published As

Publication number Publication date
CN111246009B (en) 2021-01-26

Similar Documents

Publication Publication Date Title
CN106797416B (en) Screen control method and device
EP3301551B1 (en) Electronic device for identifying touch
CN108509083B (en) Display panel and terminal
US10205817B2 (en) Method, device and storage medium for controlling screen state
CN109656317B (en) Apparatus having distance sensing function and distance sensing method
CN108989494B (en) Electronic equipment
US20180007185A1 (en) Method for switching screen state of terminal, terminal thereof, and computer-readable medium thereof
CN104618575A (en) Method and device for approaching detected objects
CN112327653A (en) Device control method, device control apparatus, and storage medium
CN106886019B (en) Distance measurement method and device
CN111123716A (en) Remote control method, remote control apparatus, and computer-readable storage medium
CN110166618B (en) Screen control method and device
CN111246009B (en) Sliding cover type terminal, distance detection method and device and storage medium
CN109061660A (en) Terminal device and distance measurement method and device for terminal device
CN106445122B (en) Equipment state control method and device
CN108206884B (en) Terminal, adjusting method for communication signal transmitted by terminal and electronic equipment
CN107682101B (en) Noise detection method and device and electronic equipment
CN107068031B (en) Method for controlling screen lightening of intelligent terminal and intelligent terminal
CN111398970B (en) Event detection method, distance sensor and terminal
CN107589861B (en) Method and device for communication
CN107506630B (en) Equipment with iris recognition function and iris recognition method
CN113391713A (en) Electronic device, control method for electronic device, and storage medium
CN112019677B (en) Electronic equipment control method and device
CN113225431A (en) Display screen control method and device and storage medium
CN110632600B (en) Environment identification method and device

Legal Events

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