Electronic device and method therefor, and readable storage medium
By using distance sensors in smart terminal devices to detect the distance of surrounding objects and automatically retract the retractable lens when approaching, the problem of the lens module being easily damaged when the device is put into a pocket or handbag is solved, and the protection of the device and the service life are extended.
Patent Information
- Application Number
- PCT/CN2024/101965
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-23
- Filing Date
- 2024-06-27
- Publication Date
- 2025-05-01
AI Technical Summary
When a user uses a smart terminal device equipped with a retractable lens, if the retractable lens is in an extended state and the device is placed in a pocket or handbag, it is easy to cause dust or foreign objects to enter the lens module and cause damage.
By configuring a distance sensor in the terminal device, the distance between the device and the surrounding objects is continuously detected. When the distance is less than the preset distance, the retractable lens of the control lens module is retracted to avoid damage.
It effectively protects the telescopic mechanism of the retractable lens and lens module, extends the service life of the device, and improves the user experience.
Smart Images

Figure CN2024101965_01052025_PF_FP_ABST
Abstract
Description
Electronic device, method thereof, and readable storage medium
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on October 23, 2023, with application number 202311381982.9 and application name “Electronic device and method thereof, readable storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] This specification relates to the technical field of smart terminals, and more particularly to an electronic device, a method thereof, and a readable storage medium. Background Art
[0003] With the development of terminal devices, more and more users begin to use terminal devices to take photos and videos, etc. In order to improve the shooting capabilities of terminal devices, terminal devices will be equipped with lens modules with retractable lenses. The above lens modules can provide multiple focal lengths, so that scenes at different distances can be captured without changing the lens, which can meet various shooting needs, such as: landscapes, portraits and close-ups.
[0004] However, when a user uses a smart terminal equipped with a lens module with a retractable lens, that is, when the lens module is in operation, if the retractable lens is extended (for example, when the user has not closed the camera application), the user may place the terminal device directly in a pocket or handbag. This may cause dust or foreign matter to enter the interior of the lens module through the gap in the lens retracting mechanism, and may also easily cause damage to the lens module. If the user places the terminal device with the retractable lens facing downward, the retractable lens in the extended state will be directly squeezed, causing the lens retracting mechanism to be easily damaged. Therefore, a method for protecting the retractable lens in the extended state is needed.
[0005] Summary of the Invention
[0006] This specification provides an electronic device, a method thereof, and a readable storage medium.
[0007] In a first aspect, this specification provides a method, which is applied to an electronic device, wherein the electronic device includes a lens module, and the lens module is located on a first side of the electronic device; and the method includes:
[0008] When the retractable lens of the lens module is in a retracted state, the electronic device receives a first input;
[0009] In response to the first input, the retractable lens of the lens module switches from a retracted state to an extended state;
[0010] When the retractable lens of the lens module is in an extended state, in response to the distance between the first object and the electronic device being less than a preset distance, the retractable lens of the lens module is controlled to switch from the extended state to the retracted state.
[0011] In this specification, an electronic device may be any electronic device equipped with a lens module capable of supporting a camera function. The first side may be a side of the main body of the electronic device, such as the back of the electronic device. A retracted state of the retractable lens of the lens module indicates that the retractable lens of the lens module is retracted relative to the main body of the electronic device, that is, the retractable lens is retracted within the lens module on the back of the body. An extended state indicates that the retractable lens is extended relative to the main body of the electronic device, that is, the retractable lens extends beyond the lens module.
[0012] It can be seen that after determining the distance between the electronic device and the surrounding object (the first object), if the distance is less than the preset distance (distance threshold), that is, the surrounding object is close to the electronic device and the lens module is in a working state, the lens module is promptly controlled to exit the working state, which can protect the retractable lens and the lens retracting mechanism of the lens module from damage, thereby increasing the service life of the lens module and bringing a better user experience.
[0013] In a possible implementation of the first aspect, responding to the distance between the first object and the electronic device being less than a preset distance includes: responding to the time duration during which the distance between the first object and the electronic device is less than the preset distance exceeding a preset time duration.
[0014] It can be seen that in the process of continuously detecting the distance between the first object and the electronic device, if the distance is less than the preset distance (distance threshold), it is also possible to further determine whether the time period during which the distance between the first object and the electronic device is less than the preset distance exceeds the preset time period based on the preset time period (time threshold). If exceeded, the lens module is controlled to exit the working state and retract the retractable lens; otherwise, the retractable lens is kept extended. By determining that the time period during which the distance between the first object and the electronic device is less than the preset distance exceeds the preset time period, it is possible to avoid the lens module exiting the working state due to accidental touch operations on the electronic device when the lens module of the electronic device is in the working state, such as: the user briefly holding and blocking the lens module, etc., thereby affecting the user's normal use.
[0015] In a possible implementation of the first aspect above, the electronic device includes a first distance sensor, a light exit hole of the first distance sensor is located on a decorative component of the lens module, and the orientation of the light exit hole of the first distance sensor is the same as the orientation of the light entrance hole of the lens module; the method also includes: determining, through the first distance sensor, that the distance between the first object and the electronic device is less than a first preset distance.
[0016] In this specification, the decorative part here may include a protective cover, a housing, etc. of the lens module. The first distance sensor is configured on the decorative part, that is, the first distance sensor is located close to the lens module. The first distance sensor can emit a light signal and receive a returned light signal through the light exit hole. The orientation of the light exit hole of the first distance sensor is the same as the orientation of the light entrance hole of the lens module, which means that the orientation of the first distance sensor and the lens module is the same. For example, if the first distance sensor and the lens module are both configured on the back of the fuselage, then the orientation of the first distance sensor and the lens module are both towards the back of the fuselage. If the distance between the first object and the electronic device determined by the first distance sensor is less than the first preset distance, it means that the first object is close to the back of the fuselage of the electronic device, such as if the lens module of the electronic device is placed face down on the desktop.
[0017] In a possible implementation of the first aspect above, the electronic device further includes a display screen and a second distance sensor, the light-emitting surface of the display screen is oriented opposite to the light-entering hole of the lens module, the light-emitting hole of the second distance sensor and the light-emitting surface of the display screen are oriented in the same direction, and the method further includes: determining, by the second distance sensor, that the distance between the first object and the electronic device is less than a second preset distance.
[0018] In this specification, the second distance sensor is configured on the display side of the electronic device. When the second distance sensor determines that the distance between the first object and the electronic device is less than a second predetermined distance, it indicates that the first object is close to the display (front) of the electronic device, such as when the display of the electronic device is placed face down on a table.
[0019] In a second aspect, this specification provides a computer-readable storage medium comprising instructions, wherein when the instructions are executed on an electronic device, the electronic device is caused to execute the method of the first aspect.
[0020] In a third aspect, this specification provides an electronic device, comprising
[0021] A lens module, the lens module including a retractable lens;
[0022] a memory for storing instructions to be executed by one or more processors of the electronic device, and
[0023] The processor is one of the processors of the electronic device, and is used to execute the method of the first aspect.
[0024] In a possible implementation of the third aspect, the electronic device is a mobile phone. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figures 1(a) to 1(d) are schematic diagrams of a scene in which a group of users use a terminal device equipped with a lens module with a retractable lens to take photos, as provided in this specification;
[0026] Figures 2(a) to 2(c) are schematic diagrams of a scene in which a group of users use a terminal device equipped with a lens module and a distance sensor to take photos, as provided in this specification;
[0027] Figures 3(a) to 3(c) are schematic diagrams of a set of user interfaces provided in this specification;
[0028] FIG4 is a schematic diagram of the structure of a terminal device provided in this specification;
[0029] FIG5 is a block diagram of the software structure of the terminal device provided in this specification;
[0030] FIG6 is a flow chart of the method provided in this specification. DETAILED DESCRIPTION
[0031] The technical solutions in the embodiments of this specification will be described clearly and in detail below with reference to the accompanying drawings.
[0032] It can be understood that the technical methods of this specification are applicable to any electronic device, for example, it can be used to various electronic devices that are equipped with camera modules (lens modules) that can support shooting functions, such as mobile phones, tablets, laptops, wearable devices, vehicle-mounted devices and other terminal devices.
[0033] 1(a) to 1(d), which exemplarily illustrate a schematic structural diagram of a terminal device equipped with a lens module provided in an embodiment of this specification and a schematic diagram of a scene in which a user uses the terminal device to take photos.
[0034] As shown in FIG1(a), the terminal device 100 is equipped with a lens module 101, which includes a retractable lens 1011 and a lens retracting mechanism 1012. As shown in FIG1(b), when a user uses the terminal device 100 to take a photo, if the user does not close the photo application and puts the terminal device 100 into a pocket or handbag, the retractable lens 1011 of the lens module 101 is still in an extended state, causing the retractable lens 1011 to be directly squeezed or collided, thereby affecting the life of the retractable lens 1011. The extended state here can mean that the retractable lens 1011 is extended relative to the main body of the terminal device 100. For example, referring to FIG1(b), the retractable lens 1011 is extended relative to the lens module 101 on the back of the terminal device 100. In some embodiments, as shown in FIG1( c ) and FIG1 ( d ), the user places the lens module 101 upward / downward on the desktop without closing the photo-taking application, causing the retractable lens 1011 to collide with the desktop or other objects, affecting the life of the retractable lens 1011 .
[0035] In order to solve the problem of damage to the retractable lens of the lens module of a terminal device when the user directly places the terminal device into a storage container when the retractable lens is in the extended state, an embodiment of the present specification provides a control method. When the lens module of the terminal device is detected to be in the working state, that is, when the retractable lens is in the extended state, the control method continuously detects the relative distance between the terminal device and surrounding objects in the environment based on the distance sensor of the terminal device. If the relative distance is within the distance range, the control method controls the lens module to retract the retractable lens, so that the lens module exits the working state and the retractable lens of the lens module is in the retracted state. It can be understood that, relative to the extended state, the retracted state here can mean that the retractable lens is retracted relative to the main body of the terminal device 100, that is, the retractable lens 1011 is retracted into the lens module 101 on the back of the body.
[0036] In this specification, when the relative distance between the terminal device and the surrounding objects in the environment is within the distance range, the distance state between the terminal device and the surrounding objects can also be referred to as a close state; relatively speaking, when the relative distance is outside the distance range, the distance state between the terminal device and the surrounding objects can be referred to as a far state.
[0037] It can be seen that through the control method in the embodiments of this specification, the terminal device can determine the distance status between the terminal device and surrounding objects based on the commonly configured distance sensor. No matter what placement posture the terminal device is in (such as: facing up / down or in a storage container), if the surrounding objects are close to the terminal device and the lens module is in working state, the lens module is promptly controlled to exit the working state. When the user is temporarily not using the lens module of the terminal device, the retractable lens and the lens retracting mechanism of the lens module can be protected from damage, thereby improving the service life of the lens module and bringing a better user experience.
[0038] In an embodiment of the present specification, a method for detecting the distance state between a terminal device and surrounding objects in an environment may include: the terminal device controlling a distance sensor to emit a detection signal, calculating the relative distance between the terminal device and the surrounding objects in the environment based on the time when the terminal device emits the detection signal, the time when a return signal corresponding to the detection signal is received, and the signal propagation speed, and determining the distance state based on a comparison result between the relative distance and a distance threshold (preset distance). For example, if the relative distance is less than the distance threshold (the relative distance is within the distance range), it is determined to be a close state; if the relative distance is greater than or equal to the distance threshold (the relative distance is outside the distance range), it is determined to be a distant state.
[0039] In an embodiment of the present specification, the above-mentioned method of detecting the distance status between the terminal device and the surrounding objects in the environment may also include: the terminal device controls the distance sensor to send a detection signal, based on the time point when the distance sensor sends the detection signal and the time point when the return signal corresponding to the detection signal is received, if the time difference between the two time points is less than a preset time period, it is determined to be a close state; if it exceeds the preset time period, it is determined to be a distant state.
[0040] 2(a) to 2(c), and FIG3(a) to 3(c) exemplarily illustrate a schematic structural diagram of a terminal device provided with a lens module and a distance sensor according to an embodiment of this specification.
[0041] As shown in FIG2( a ), the terminal device 100 is equipped with a lens module 101, which includes a retractable lens 1011 and a lens retracting mechanism 1012. The terminal device 100 is also equipped with a distance sensor 102. The distance sensor 102 can be positioned near the lens module 101, for example, on the outer periphery of the lens module 101. In some embodiments, the distance sensor 102 can be positioned on a decorative member 1013 of the lens module 101. The decorative member 1013 can include a protective cover, a housing, etc. of the lens module 101. The light output aperture of the distance sensor 102 is oriented in the same direction as the light input aperture of the lens module 101. The light output aperture of the distance sensor 102 can be used to emit light signals and receive return light signals, while the light input aperture of the lens module 101 can be used to capture image signals. The distance sensor 102 (referred to as a first distance sensor) can include an optical distance sensor, an infrared distance sensor, an ultrasonic distance sensor, etc. Taking the distance sensor 102 as an infrared distance sensor as an example, the distance sensor 102 includes an infrared emitting tube and an infrared receiving tube. When the infrared ray emitted by the infrared emitting tube is received by the infrared receiving tube within a preset time period, it indicates that the distance between the terminal device 100 and the surrounding objects is relatively close, that is, the proximity state. When the infrared receiving tube receives the infrared ray emitted by the infrared emitting tube after exceeding the preset time period or fails to receive the infrared ray emitted by the infrared emitting tube, it indicates that the distance between the terminal device 100 and the surrounding objects is relatively far. Referring to Figure 2(b), when the user uses the terminal device 100 to take pictures, if the user does not close the picture-taking application, the terminal device 100 is placed on the desktop with the lens module 101 facing downward. When the terminal device 100 detects through the distance sensor 102 that the distance between the terminal device 100 and the desktop is in a close state, that is, the distance between the terminal device 100 and the desktop is close, as shown in Figure 2(c), the terminal device 100 can control the lens module 101 to exit the working state, that is, control the lens retractable mechanism 1012 of the lens module 101 to retract the retractable lens 1011.
[0042] In some embodiments, as shown in FIG3( a ), the distance sensor 103 of the terminal device 100 can be disposed on the front side (the side where the display screen displays the viewfinder frame) of the terminal device 100. That is, the light-emitting surface of the display screen of the terminal device 100 faces opposite directions from the light-entering hole of the lens module 101, and the light-emitting hole of the distance sensor 103 faces the same direction as the light-emitting surface of the display screen of the terminal device 100. Referring to Figure 3(b), when the user uses the terminal device 100 to take pictures, if the user does not close the photo-taking application, the terminal device 100 is placed on the desktop with the lens module 101 facing upward. When the terminal device 100 detects that the distance between the terminal device 100 and the desktop is in a close state through the distance sensor 103 (which can be called a second distance sensor), that is, the distance between the terminal device 100 and the desktop is close, as shown in Figure 3(c), the terminal device 100 can control the lens module 101 to exit the working state, that is, control the lens retractable mechanism 1012 of the lens module 101 to retract the retractable lens 1011.
[0043] FIG4 is a schematic diagram of the structure of an example terminal device provided in an embodiment of this specification. As shown in FIG4 , the terminal device (such as a mobile phone, tablet computer, etc.) may include: a processor 410, an external memory interface 420, an internal memory 421, a universal serial bus (USB) interface 430, a charging management module 440, a power management module 441, a battery 442, an antenna 1, an antenna 2, a mobile communication module 450, a wireless communication module 460, an audio module 470, a speaker 470A, a receiver 470B, a microphone 470C, an earphone interface 470D, a sensor module 480, a button 490, a motor 491, an indicator 492, a camera 493, a display 494, and a subscriber identification module (SIM) card interface 495, etc.
[0044] Among them, the above-mentioned sensor module 480 may include sensors such as pressure sensor, gyroscope sensor, air pressure sensor, magnetic sensor, acceleration sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor and ambient light sensor.
[0045] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the terminal device. In other embodiments, the terminal device may include more or fewer components than shown, or may combine or separate certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0046] The processor 410 may include one or more processing units. For example, the processor 410 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.
[0047] Processor 410 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 410 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 410. If processor 410 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 410 latency, and thus improves system efficiency.
[0048] In some embodiments, the processor 410 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0049] In some embodiments, the processor 410 is used to execute the control method of this specification. When the camera 493 is in a working state, it detects the distance between the terminal device and the surrounding objects. If the terminal device and the surrounding objects are in a close state, the camera 493 is controlled to exit the working state.
[0050] It is understood that the interface connection relationship between the modules illustrated in this embodiment is only for illustrative purposes and does not constitute a structural limitation on the terminal device. In other embodiments, the terminal device may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0051] The terminal device implements display functionality through a GPU, display screen 494, and an application processor. The GPU is a microprocessor for image processing that connects display screen 494 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 410 may include one or more GPUs that execute program instructions to generate or modify display information.
[0052] The display screen 494 is used to display images, videos, etc. The display screen 494 includes a display panel.
[0053] The terminal device can implement a camera function through an ISP, a camera 493 (also known as a lens module), a video codec, a GPU, a display 494, and an application processor. The ISP is responsible for processing data fed back by the camera 493. The camera 493 is responsible for capturing still images or videos. In some embodiments, the terminal device may include one or N cameras 493, where N is a positive integer greater than one.
[0054] External memory interface 420 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device. The external memory card communicates with processor 410 via external memory interface 420 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0055] The internal memory 421 can be used to store computer executable program code, which includes instructions. The processor 410 executes various functional applications and data processing of the terminal device by running the instructions stored in the internal memory 421. For example, in the embodiment of this specification, the processor 410 can execute instructions stored in the internal memory 421, and the internal memory 421 can include a program storage area and a data storage area.
[0056] The program storage area may store an operating system, at least one application required for a function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the terminal device (such as audio data, a phone book, etc.), etc. In addition, the internal memory 421 may include a high-speed random access memory and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0057] It should be understood that the structures illustrated in the embodiments of this specification do not constitute specific limitations on the terminal device. In other embodiments of this specification, the terminal device may include more or fewer components than shown, or may combine or separate certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0058] FIG5 is a software structure block diagram of the terminal device of this specification.
[0059] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0060] As shown in Figure 5, the application layer may include applications such as life, video, reading, shopping, gallery, calendar, call, navigation, and music. It is understood that the applications here can be applications or services installed on the terminal device, or applications or services not installed on the terminal device that are retrieved through the quick service center.
[0061] The application framework layer may include layout services, window management services, event input services, a distance detection module, and so on. The layout service is used to determine the position of each display element on the terminal device's display screen. The event input service is used to respond to user operations on the terminal device and change the displayed content on the terminal device's display screen. The window management service is used to obtain the properties of the window corresponding to the application. The distance detection module is used to detect the distance between the terminal device and surrounding objects, that is, the distance between the terminal device and surrounding objects.
[0062] The hardware abstraction layer can include a rendering service module (SurfaceFlinger), a call module, and so on. The rendering service module (SurfaceFlinger) is used to render and synthesize one or more layers in one or more application windows to generate frame data. The call module is used to transmit incoming call messages to the call processing module, process and transmit received hang-up messages, and so on.
[0063] The kernel layer includes display driver, event driver, sensor driver, etc.
[0064] The control method provided by the embodiment of this specification is described in detail below based on the method flow diagram shown in Figure 6. The method shown in Figure 6 can be implemented by a processor of a terminal device executing relevant instructions.
[0065] Referring to FIG6 , the control method may include the following steps:
[0066] S601: Determine that a lens module of a terminal device is in an operating state and a retractable lens in the lens module is in an extended state.
[0067] For example, the terminal device here may be the terminal device 100 shown in FIG3( a ), and the distance sensor 103 of the terminal device 100 may be configured at the front of the terminal device 100. The user may be using the terminal device to take a photo, and at this time, the lens module is in an operating state and the retractable lens in the lens module is in an extended state.
[0068] In some embodiments, the method for determining that the lens module of the terminal device is in a working state and the retractable lens in the lens module is in an extended state may also include: determining that the terminal device is running an application that requires the use of the lens module, such as: a photo-taking application, a video recording application, and a live broadcast application, etc.
[0069] S602: Continuously detect the distance status between the terminal device and surrounding objects in the surrounding environment.
[0070] For example, the distance state here can include a close state and a far state. The detection terminal device detects the relative distance between the terminal device and the surrounding objects through the distance sensor. If the relative distance is within the distance range, it can be determined that the terminal device and the surrounding objects are in a close state; if the relative distance is outside the distance range, it can be determined that the terminal device and the surrounding objects are in a far state.
[0071] In the specification, the comparison result of the relative distance between the terminal device and the surrounding objects and the distance range can be determined by comparing the relative distance with the distance threshold. Assuming that the distance threshold corresponding to the configured proximity state is 0.6cm, it means that when the relative distance between the terminal device and the surrounding objects detected by the distance sensor is less than or equal to (<=) 0.6cm, the distance state will be determined to be proximity; conversely, when the above relative distance is greater than (>) 0.6cm, the distance state is far. The distance threshold here is not fixed, and any distance threshold can be configured, such as: 0.6cm, 2cm, etc., and this specification does not make specific restrictions.
[0072] S603: Determine whether the distance state is a close state.
[0073] For example, if yes, step S604 is executed to control the lens module to exit the working state. Otherwise, the process returns to step S601 to control the lens module to maintain the working state.
[0074] In some embodiments, if the distance state between the lens module and the surrounding objects is detected as a proximity state by the distance sensor, the lens module is controlled to exit the working state, that is, the lens retractable mechanism of the lens module is controlled to retract the retractable lens.
[0075] S604: Control the lens module to exit the working state and retract the retractable lens.
[0076] For example, with continued reference to FIG3( a ), the terminal device may control the lens module 101 to exit the working state, that is, control the lens retracting mechanism 1012 of the lens module 101 to retract the retractable lens 1011. In other words, for a terminal device equipped with a lens module 101 having a retractable lens 1011 with a lens retracting mechanism 1012, when the lens module 101 is in the working state, the retractable lens 1011 is in the extended state, and when the lens module 101 is controlled to exit the working state, the retractable lens 1011 is in the retracted state.
[0077] It can be seen that through the control method shown in FIG6 and the structure of the terminal device 100 shown in FIG3(a), the distance sensor 103 configured on the front face (viewfinder face) of the terminal device can detect the distance state between the terminal device and surrounding objects, including the approach state or the distance state. When the lens module of the terminal device is in the working state, that is, when the retractable lens is in the extended state, the user directly puts the terminal device into a pocket / handbag or places the front face (viewfinder face) of the terminal device downward or places the front face downward on the table, that is, when the user temporarily stops using the terminal device, the terminal device can detect based on the distance sensor that the terminal device is in a proximity state with the surrounding objects in the surrounding environment, that is, when the terminal device detects that the lens module is close to the inside of the pocket / handbag or the front face (display screen) of the terminal device is close to the table, and automatically retracts the retractable lens, thereby protecting the retractable lens and the lens retracting mechanism from damage or foreign object intrusion.
[0078] In some embodiments, through the control method shown in FIG6 and the structure of the terminal device 100 shown in FIG2(a), the distance sensor 102 configured on the back of the terminal device 100 near the lens module 101 can detect the distance state between the terminal device and the surrounding objects, including the approaching state or the distant state. When the lens module of the terminal device is in the working state, that is, when the retractable lens is in the extended state, the user turns the lens module of the terminal device downward or places the lens module of the terminal device downward on the table or the user holds and blocks the lens module, that is, when the user temporarily stops using the terminal device, the terminal device can detect based on the distance sensor that the terminal device is in a close state with the surrounding objects in the surrounding environment, that is, the terminal device detects that the lens module is close to the table or detects that the lens module is close to the user's palm, and automatically retracts the retractable lens, thereby protecting the retractable lens and the lens retracting mechanism from damage or foreign object intrusion.
[0079] In some embodiments, for the control method described in FIG. 6 , during the process of continuously detecting the distance state between the terminal device and surrounding objects in the surrounding environment, if it is determined that the terminal device and the surrounding objects are in a proximity state, the device can further determine whether the duration of the proximity state between the terminal device and the surrounding objects exceeds the duration threshold based on a set duration threshold (preset duration). That is, whether the duration of time that the surrounding objects maintain a distance from the terminal device less than the distance threshold exceeds the duration threshold. If so, the lens module is controlled to exit the working state and retract the retractable lens; otherwise, the retractable lens is maintained extended. For example, the distance threshold corresponding to the proximity state is 0.6 cm, and the duration threshold is 3 seconds. If it is detected that the relative distance between the terminal device and the surrounding objects is less than or equal to (<=) 0.6 cm and maintained for more than 3 seconds, that is, it is determined that the duration of the proximity state between the terminal device and the surrounding objects is relatively long, the lens module is controlled to exit the working state, that is, the lens retracting mechanism of the lens module is controlled to retract the retractable lens. Otherwise, the lens module is maintained in the working state. The duration threshold here is not fixed, and any duration threshold can be configured, such as 3s, 5s, etc., and this specification does not make a specific limitation.
[0080] It can be seen that by judging whether the proximity between the terminal device and the surrounding objects meets the time threshold, it is possible to avoid the lens module of the terminal device being in working state due to accidental touch operations on the terminal device, such as: the user briefly holding and blocking the lens module, etc., causing the lens module to exit the working state and affecting the user's normal use.
[0081] It should be understood that although the terms "first," "second," and the like may be used herein to describe various features, these features should not be limited by these terms. These terms are used merely to distinguish and should not be understood as indicating or implying relative importance. For example, a first feature may be referred to as a second feature, and similarly, a second feature may be referred to as a first feature, without departing from the scope of the exemplary embodiments.
[0082] Furthermore, various operations will be described as multiple, separate operations in a manner that is most helpful for understanding the illustrative embodiments; however, the order of description should not be construed to imply that the operations must be performed in order of description, and many of the operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can terminate when the described operations are completed, but can also have additional operations not included in the figures. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0083] References in the specification to "one embodiment," "an embodiment," "an illustrative embodiment," etc., indicate that the described embodiment may include a particular feature, structure, or property, but that every embodiment may or may not necessarily include the particular feature, structure, or property. Furthermore, these phrases are not necessarily referring to the same embodiment. Furthermore, while particular features may be described in conjunction with a specific embodiment, the knowledge of those skilled in the art may affect how those features may be combined with other embodiments, whether or not those embodiments are explicitly described.
[0084] Unless the context dictates otherwise, the terms "comprising," "having," and "including" are synonymous. The phrase "comprising" is synonymous with "A or B." The phrase "and / or B" means "(A), (B), or (A and B)."
[0085] As used herein, the term "module" may refer to, be part of, or include: memory (shared, dedicated, or group) for running one or more software or firmware programs, application-specific integrated circuits (ASICs), electronic circuits and / or processors (shared, dedicated, or group), combinational logic circuits, and / or other suitable components that provide the functionality.
[0086] In the accompanying drawings, some structural or method features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or order is not required. Rather, in some embodiments, these features may be illustrated in a manner and / or order that differs from that shown in the illustrative drawings. Furthermore, the inclusion of structural or method features in a particular drawing does not mean that all embodiments need to include such features. In some embodiments, such features may not be included, or may be combined with other features.
[0087] The embodiments of this specification are described in detail above in conjunction with the accompanying drawings. However, the use of the technical solutions of this specification is not limited to the various applications mentioned in the embodiments of this patent. Various structures and variations can be easily implemented with reference to the technical solutions of this specification to achieve the various beneficial effects mentioned herein. Various changes made within the scope of knowledge possessed by ordinary technicians in this field without departing from the purpose of this specification should fall within the scope of the patent covered by this specification.
Claims
1. A method, characterized in that Applied to an electronic device, the electronic device comprises a lens module, and the lens module is located on a first side of the electronic device; and The method comprises: When the retractable lens of the lens module is in a retracted state, the electronic device receives a first input; In response to the first input, the retractable lens of the lens module is switched from the retracted state to the extended state; When the retractable lens of the lens module is in an extended state, in response to the distance between the first object and the electronic device being less than a preset distance, the retractable lens of the lens module is controlled to switch from the extended state to the retracted state.
2. The method according to claim 1, characterized in that The responding to the distance between the first object and the electronic device being less than a preset distance includes: responding to the time duration during which the distance between the first object and the electronic device is less than the preset distance exceeding a preset time duration.
3. The method according to claim 1, characterized in that The electronic device comprises a first distance sensor, a light exit hole of the first distance sensor is located on the decorative component of the lens module, and the direction of the light exit hole of the first distance sensor is the same as the direction of the light entrance hole of the lens module; the method further comprises: It is determined by the first distance sensor that the distance between the first object and the electronic device is less than a first preset distance.
4. The method according to any one of claims 1 to 3, characterized in that: The electronic device further includes a display screen and a second distance sensor, the light emitting surface of the display screen is oriented opposite to the light incident hole of the lens module, the light emitting hole of the second distance sensor is oriented in the same direction as the light emitting surface of the display screen, and the method further includes: It is determined by the second distance sensor that the distance between the first object and the electronic device is less than a second preset distance.
5. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 4.
6. An electronic device, characterized in that: include A lens module, wherein the lens module comprises a retractable lens; a memory for storing instructions to be executed by one or more processors of the electronic device, and The processor is one of the processors of the electronic device, and is used to execute the method according to any one of claims 1 to 4.
7. The electronic device according to claim 6, characterized in that: The electronic device is a mobile phone.
Citation Information
Patent Citations
Electronic equipment, method thereof and readable storage medium
CN119892963A
Camera protection method, and mobile terminal
CN108390964A
Mode switch method of camera and electronic device
CN108810284A
Telescopic camera control method and device, electronic device and storage medium
CN111385413A
Control method and device of image acquisition assembly and storage medium
CN112135035A