Camera control method, and device and storage medium

By adopting a dual-lens module design in mobile terminal devices, and utilizing the reuse of image sensors and the movement of control prisms and light-blocking baffles, zoom requirements in different scenarios are achieved, reducing equipment costs and vibration noise during lens switching, and improving camera startup performance and user experience.

WO2026237589A1PCT designated stage Publication Date: 2026-11-19HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2026/088016
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-15
Filing Date
2026-04-01
Publication Date
2026-11-19

AI Technical Summary

Technical Problem

How can we meet users' shooting needs in different scenarios while reducing the manufacturing cost of mobile terminal devices, especially by configuring multiple telephoto camera modules to achieve a larger zoom range, while reducing vibration noise and startup delay caused by lens switching?

Method used

It adopts a dual-lens module design, with one camera module including two telephoto lens groups and reusing an image sensor. By controlling the movement of the prism and light-blocking plate, optical zoom of different focal lengths can be achieved, avoiding lens switching. In particular, it keeps the lens status unchanged during the switching between the camera and the gallery, or switches to a lower magnification lens group in advance when exiting the camera.

Benefits of technology

It reduced equipment costs, improved camera startup performance and user experience, reduced vibration noise and startup delay caused by lens switching, and enhanced the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2026088016_19112026_PF_FP_ABST
    Figure CN2026088016_19112026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of terminals. Provided are a camera control method, and a device and a storage medium. The method is applied to an electronic device. The electronic device comprises a telephoto camera module, which comprises a first lens group, a second lens group and a first image sensor, wherein a focal length of the first lens group is less than that of the second lens group. When the telephoto camera module is in a target state and the electronic device displays a camera preview interface, the telephoto camera module remains in the target state in response to an operation of viewing a gallery on the preview interface. The target state comprises a first state or a second state, wherein in the first state, the first image sensor collects an image by means of the first lens group, and in the second state, the first image sensor collects an image by means of the second lens group. In this way, the camera startup performance when returning to the preview interface from the gallery can be improved while reducing manufacturing costs.
Need to check novelty before this filing date? Find Prior Art

Description

Camera control methods, devices and storage media

[0001] This application claims priority to Chinese Patent Application No. 202510631889.1, filed on May 15, 2025, entitled "Camera Control Method, Apparatus and Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of terminal technology, and in particular to a camera control method, device and storage medium. Background Technology

[0003] With the widespread adoption of smartphones and other mobile devices, camera functionality has become a crucial factor for users when choosing a device. To enhance the user's shooting experience, mobile devices are typically equipped with multiple camera modules, including wide-angle lenses, telephoto lenses, macro lenses, depth sensors, and more, to adapt to different shooting needs and scenarios.

[0004] Currently, most mobile devices typically feature a telephoto camera module that provides, for example, 2x or 3x optical zoom. Some flagship devices may also feature two telephoto camera modules to achieve a greater zoom range; for example, one telephoto camera module provides medium-magnification optical zoom (such as 3x), while the other provides higher-magnification optical zoom (such as 5x or 10x).

[0005] However, equipping mobile terminal devices with multiple telephoto camera modules will significantly increase the manufacturing cost of the devices. Therefore, how to meet users' shooting needs in different scenarios while reducing the manufacturing cost of the devices is an urgent problem to be solved. Summary of the Invention

[0006] This application provides a camera control method, device, and storage medium, which can improve camera startup performance in different scenarios while reducing device costs.

[0007] Firstly, embodiments of this application provide a camera control method applied to an electronic device. The electronic device includes a first camera module, which comprises a first lens group, a second lens group, and a first image sensor. The focal length of the first lens group is smaller than that of the second lens group. On one hand, since the first camera module includes two telephoto lens groups (i.e., the first lens group and the second lens group), the electronic device can achieve a wider zoom range using the first camera module. On the other hand, since the two telephoto lens groups share a single image sensor, compared to configuring two telephoto camera modules, which require two image sensors, equipment costs can be saved.

[0008] Based on the aforementioned electronic device, when the first camera module of the electronic device is in a first state and the electronic device displays a preview interface, the first camera module maintains the first state in response to the operation of viewing the gallery on the preview interface. When the first camera module is in a second state and the electronic device displays a preview interface, the first camera module maintains the second state in response to the operation of viewing the gallery on the preview interface.

[0009] In the first state, the first image sensor acquires images through a first lens group. In the second state, the first image sensor acquires images through a second lens group. In some embodiments, the first image sensor acquiring images through the first lens group in the first state can also be described as: the first image sensor is located in the optical path of the first lens group. The first image sensor acquiring images through the second lens group in the second state can also be described as: the first image sensor is located in the optical path of the second lens group.

[0010] In the above solution, when entering the gallery from the camera, the state of the first camera module remains unchanged; that is, the positions of the components within the first camera module do not change, and there is no lens switching. Thus, there is no lens switching when returning to the camera from the gallery, which improves camera startup performance and reduces startup latency. Furthermore, the absence of vibration noise caused by lens switching when returning to the camera from the gallery enhances the user experience.

[0011] In an optional embodiment of the first aspect, the first camera module further includes a light-shielding plate for blocking the light emitted from the first lens group or the second lens group. In the first state, the light-shielding plate is located in the optical path of the second lens group, and in the second state, the light-shielding plate is located in the optical path of the first lens group. The first camera module of this embodiment can be seen with reference to the embodiment in Figure 2.

[0012] In the above scheme, in the first state, the light-blocking baffle blocks the light emitted from the second lens group, and the electronic device can guide the light to the first image sensor through the first lens group, where the first image sensor captures the image. In the second state, the light-blocking baffle blocks the light emitted from the first lens group, and the electronic device can guide the light to the first image sensor through the second lens group, where the first image sensor captures the image.

[0013] In an optional embodiment of the first aspect, the first camera module further includes a prism for guiding the light emitted from the first lens group or the second lens group onto the first image sensor. In a first state, the prism is located in the optical path of the first lens group, and in a second state, the prism is located in the optical path of the second lens group.

[0014] In the above scheme, in the first state, the electronic device can guide light to the first image sensor through the first lens group and prism, and the first image sensor will then capture an image. In the second state, the electronic device can guide light to the first image sensor through the second lens group and prism, and the first image sensor will then capture an image.

[0015] In one optional embodiment of the first aspect, the first camera module further includes a prism and a light-shielding plate. In a first state, the light-shielding plate is located in the optical path of the second lens group, and the prism is located in the optical path of the first lens group. In a second state, the light-shielding plate is located in the optical path of the first lens group, and the prism is located in the optical path of the second lens group. The first camera module of this embodiment can be referred to the embodiment in Figure 1.

[0016] In one alternative embodiment of the first aspect, the first camera module maintains the target state in response to the operation of returning to the preview interface.

[0017] In one example, before entering the gallery from the camera preview interface, the first camera module is in a first state; when returning to the preview interface from the gallery, the first camera module remains in the first state. In another example, before entering the gallery from the camera preview interface, the first camera module is in a second state; when returning to the preview interface from the gallery, the first camera module remains in the second state.

[0018] In the above solution, when entering the gallery from the camera preview interface and then returning to the preview interface, the state of the first camera module remains unchanged. On one hand, since the electronic device does not need to switch lenses on the first camera module, there is no vibration noise caused by lens switching, which improves the user experience. On the other hand, since there is no need for lens switching, the camera startup performance when returning to the preview interface is improved, reducing startup latency.

[0019] In one alternative embodiment of the first aspect, in response to an operation of viewing the gallery in the preview interface, a first interface is displayed, displaying the most recently captured image. If the target state is a second state, in response to triggering an operation from the first interface to the second interface, the first camera module switches from the second state to the first state. The second interface includes a desktop or the interface of another application.

[0020] For example, the first interface can be referred to as interface 16 shown in Figure 4(d). The operation that triggers the transition from the first interface to the second interface can be the operation of thumbnail 15 in the motor interface 13, as shown in Figure 4(c).

[0021] In the above solution, before entering the gallery from the camera preview interface, the first camera module is in the second state. When entering the desktop or other application interface from the gallery, the first camera module switches from the second state to the first state, that is, the lens of the first camera module switches to the lower magnification first lens group. The reason for this setting is that when the user returns to the camera preview interface from the desktop or other application interface, the electronic device usually defaults to activating the second camera module (e.g., the main camera module). Furthermore, when the user switches to telephoto, it is more likely to use the lower magnification first lens group. Therefore, switching the lens of the first camera module to the lower magnification first lens group in advance when entering the desktop or other application interface from the gallery improves the startup performance when switching to the lower magnification telephoto when reopening the camera, reducing startup latency. In addition, since there is no vibration sound from lens switching when reopening the camera and switching to the lower magnification telephoto, the user experience is improved.

[0022] In one alternative embodiment of the first aspect, if the target state is a first state, the first camera module maintains the first state in response to triggering an operation from the first interface to the second interface.

[0023] In the above solution, the first camera module is in its first state before entering the gallery from the camera preview interface, and it remains in this first state when entering the desktop or other application interfaces from the gallery. Thus, when returning to the camera preview interface from the gallery, the electronic device does not need to switch lenses on the first camera module, improving camera startup performance and reducing startup latency when switching back to a lower magnification telephoto lens. Furthermore, the absence of vibration noise from lens switching when reopening the camera and switching to a lower magnification telephoto lens enhances the user experience.

[0024] In one alternative embodiment of the first aspect, if the target state is the second state, the first camera module changes from the second state to the first state in response to the operation of exiting the camera application.

[0025] Exiting the camera app can mean completely closing the camera app, or completely releasing the resources occupied by the camera app.

[0026] In some embodiments, if the target state is the second state, in response to the operation of exiting the camera application, the first image sensor of the first camera module stops acquiring images, and after the first image sensor stops acquiring images, the first camera module switches from the second state to the first state.

[0027] In the above solution, before entering the gallery from the camera preview interface, the first camera module is in the second state. If the user exits the camera application, considering that the user is more likely to use the lower magnification first lens group when reopening the camera application, switching the lens of the first camera module to the lower magnification first lens group in advance when exiting the camera application can improve the startup performance when switching to the lower magnification telephoto lens when reopening the camera and reduce startup latency. In addition, since there is no vibration sound caused by lens switching when reopening the camera and switching to the lower magnification telephoto lens, the user experience can be improved.

[0028] In one optional embodiment of the first aspect, the electronic device further includes a second camera module, which includes a third lens group and a second image sensor. The focal length of the third lens group is less than the focal length of the first lens group. If the target state is the second state, in response to an operation of switching from a first zoom level to a second zoom level, the first camera module changes from the second state to the first state. The first zoom level corresponds to the second lens group, and the second zoom level corresponds to the third lens group.

[0029] For example, the second camera module can be the main camera module. The first zoom level can be 10x, and the second zoom level can be 1x. Switching from the first zoom level to the second zoom level can be done by clicking the 10x zoom level option on interface 12, as shown in Figure 7(a).

[0030] In some embodiments, if the target state is the second state, in response to the operation of switching from the first zoom level to the second zoom level, the first image sensor of the first camera module stops acquiring images, and after the first image sensor stops acquiring images, the first camera module switches from the second state to the first state.

[0031] In the above solution, before zooming, the first camera module is in the second state. When zooming to the second zoom level (e.g., 1x or 0.5x), considering that the user is more likely to use the lower-magnification first lens group when switching back to telephoto, the first camera module's lens is switched to the lower-magnification first lens group in response to the zoom operation. This improves the startup performance when switching back to the lower-magnification telephoto and reduces startup latency. Furthermore, since there is no vibration noise from lens switching when switching back to the lower-magnification telephoto, the user experience is improved.

[0032] In one alternative embodiment of the first aspect, in response to the operation of triggering long exposure shooting, the first camera module maintains the target state during the long exposure shooting process and from the end of the long exposure shooting until the preview interface is displayed.

[0033] For example, as shown in Figures 11(b), (c) and (d), the operation to trigger a long exposure shooting may include clicking the shutter speed S on interface 28, selecting the shutter speed S as 32s on interface 29, and clicking the shooting button.

[0034] In one example, before triggering a long exposure shot, the first camera module is in a first state. In response to the triggering of the long exposure shot, the first camera module remains in the first state during the long exposure shot and from the end of the long exposure shot until the preview interface is displayed.

[0035] In one example, before triggering a long exposure shot, the first camera module is in a second state. In response to the triggering of the long exposure shot, the first camera module remains in the second state during the long exposure shot and from the end of the long exposure shot until the preview interface is displayed.

[0036] In the above scheme, the first image sensor of the first camera module acquires an image before triggering the long exposure shooting. Since the first camera module does not switch lenses during the process from the end of the long exposure shooting until the preview interface is displayed (i.e., the first camera module always remains in either the first or second state), the time for the first image sensor to restart after a power outage can be shortened, thereby improving camera startup performance after long exposure shooting and reducing startup latency. Furthermore, since there is no vibration noise caused by lens switching after long exposure shooting, the user experience is improved.

[0037] Secondly, embodiments of this application provide a camera control method applied to an electronic device. The electronic device includes a first camera module and a second camera module. The first camera module includes a first lens group, a second lens group, and a first image sensor. The second camera module includes a third lens group and a second image sensor. The focal length of the first lens group is shorter than the focal length of the second lens group, and the focal length of the third lens group is shorter than the focal length of the first lens group.

[0038] When the first camera module is in the second state and the electronic device displays a preview interface, in response to the operation of switching from the first zoom level to the second zoom level, the first camera module switches from the second state to the first state. The first zoom level corresponds to the second lens group, and the second zoom level corresponds to the third lens group. In the first state, the first image sensor acquires images through the first lens group, and in the second state, the first image sensor acquires images through the second lens group.

[0039] In an optional embodiment of the second aspect, when the first camera module is in the target state and the electronic device displays a preview interface, in response to the operation of triggering long exposure shooting, the first camera module maintains the target state during the long exposure shooting process and from the end of the long exposure shooting until the preview interface is displayed. The target state includes either a first state or a second state.

[0040] Thirdly, embodiments of this application provide a camera control method applied to an electronic device. The electronic device includes a first camera module, which includes a first lens group, a second lens group, and a first image sensor. The focal length of the first lens group is smaller than the focal length of the second lens group.

[0041] When the first camera module is in the target state and the electronic device displays a preview interface, in response to the triggering of a long exposure shooting operation, the first camera module maintains the target state during the long exposure shooting process and from the end of the long exposure shooting until the preview interface is displayed. The target state includes a first state or a second state. In the first state, the first image sensor acquires images through the first lens group; in the second state, the first image sensor acquires images through the second lens group.

[0042] Fourthly, embodiments of this application provide an electronic device, comprising: a first camera module, one or more processors, and a memory; the first camera module includes a first lens group, a second lens group, and a first image sensor; the focal length of the first lens group is smaller than the focal length of the second lens group; the first camera module is used to acquire images through the first lens group and the first image sensor, or to acquire images through the second lens group and the first image sensor. The memory is coupled to one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, wherein one or more processors invoke the computer instructions to cause the electronic device to perform the method as described in any of the first aspects, or the method of the second aspect, or the method of the third aspect.

[0043] In an alternative embodiment of the fourth aspect, the electronic device further includes a second camera module; the second camera module includes a third lens group and a second image sensor, the focal length of the third lens group being less than the focal length of the first lens group. The second camera module is used to acquire images through the third lens group and the second image sensor.

[0044] Fifthly, embodiments of this application provide a chip or chip system applied to an electronic device. The chip or chip system includes one or more processors, which are used to invoke computer instructions to cause the electronic device to perform the method of any of the first aspects, or the method of the second aspect, or the method of the third aspect.

[0045] In a sixth aspect, embodiments of this application provide a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of the first aspects, or the method of the second aspect, or the method of the third aspect.

[0046] In a seventh aspect, embodiments of this application provide a computer program product, which includes computer program code. When the computer program code is run on an electronic device, it causes the electronic device to perform the method of any of the first aspects, or the method of the second aspect, or the method of the third aspect.

[0047] It should be understood that the second to seventh aspects of this application correspond to the technical solutions of the first aspect of this application, and the beneficial effects achieved by each aspect and the corresponding optional embodiments are similar, and will not be described again. Attached Figure Description

[0048] Figure 1 is a structural schematic diagram of a dual-lens module provided in an embodiment of this application;

[0049] Figure 2 is a schematic diagram of another dual-lens module provided in an embodiment of this application;

[0050] Figure 3 is a flowchart of a camera control method provided in an embodiment of this application;

[0051] Figure 4 is a schematic diagram of interface changes provided in an embodiment of this application;

[0052] Figure 5 is a schematic diagram of interface changes provided in an embodiment of this application;

[0053] Figure 6 is a flowchart of the camera control method provided in an embodiment of this application;

[0054] Figure 7 is a schematic diagram of interface changes provided in an embodiment of this application;

[0055] Figure 8 is a flowchart of the camera control method provided in an embodiment of this application;

[0056] Figure 9 is a flowchart of the camera control method provided in an embodiment of this application;

[0057] Figure 10 is a flowchart of the camera control method provided in an embodiment of this application;

[0058] Figure 11 is a schematic diagram of interface changes provided in an embodiment of this application;

[0059] Figure 12 is a schematic diagram of the structure of the electronic device provided in an embodiment of this application;

[0060] Figure 13 is a software structure block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0061] To facilitate understanding, the relevant terms and concepts involved in the embodiments of this application will be introduced below:

[0062] 1. Optical zoom and digital zoom

[0063] Optical zoom refers to a camera lens changing its focal length by physically moving lens elements, thus magnifying or reducing the size of the subject being photographed. Optical zoom relies on the lens's optical design, allowing for magnification without sacrificing image quality.

[0064] Digital zoom magnifies an image through software processing. It typically achieves this by cropping the center of the image and interpolating the magnification, similar to enlarging an image in image editing software. Digital zoom usually results in a decrease in image quality.

[0065] In most mobile devices, the optical zoom ratio of telephoto camera modules is usually fixed, meaning they offer a specific optical zoom ratio, such as 2x or 3x. This means users can only shoot at these fixed magnifications when using optical zoom and cannot continuously adjust between them. When users need higher zoom levels, the device typically relies on digital zoom to further magnify the image.

[0066] 2. Camera module and prism

[0067] A camera module, also known simply as a camera, typically includes a lens assembly and an image sensor. The lens assembly can include one or more lenses that work together to focus light, correct aberrations, and so on.

[0068] A prism is an optical element primarily used to deflect and split light. In smartphone camera designs, prisms are often used in conjunction with lens assemblies. For example, in a periscope camera system (a type of telephoto camera module), a prism is used to redirect the path of light from a vertical to a horizontal direction, enabling longer focal lengths and higher optical zoom ratios within a limited body thickness.

[0069] 3. Focal length, optical zoom ratio and digital zoom ratio

[0070] Focal length, also known as focal length, refers to the distance from the optical center of a lens to the imaging sensor (or image sensor), usually measured in millimeters (mm), and directly affects the field of view. For example, 70mm is considered medium telephoto, while 200mm and above are considered super telephoto.

[0071] Optical zoom ratio refers to the percentage change in focal length achieved by a lens through physical means (e.g., lens movement or camera switching). For example, the zoom ratio from a wide-angle camera (e.g., 24mm focal length) to a telephoto camera (e.g., 72mm focal length) is 3x (72 / 24).

[0072] Digital zoom ratio refers to the linear magnification factor of the final image size relative to the original photosensitive area size after the original image has been cropped and interpolated using image processing algorithms.

[0073] It should be noted that the zoom ratio displayed on the mobile phone's camera interface may be an optical zoom ratio, such as 3x, or a digital zoom ratio, such as 3.5x, 8x, etc. In this embodiment, both optical zoom ratio and digital zoom ratio are collectively referred to as zoom ratio.

[0074] 4. Starting and stopping the flow

[0075] "Start-up" can refer to the image sensor in the camera module starting up and beginning to acquire images.

[0076] "Stopped flow" can refer to the image sensor in a camera module ceasing to function.

[0077] 5. Electronic equipment

[0078] The electronic devices in this application embodiment can be referred to as user equipment (UE), terminal, etc. For example, electronic devices can be mobile phones, tablets, personal digital assistants (PDAs), handheld devices with shooting functions, computing devices, in-vehicle devices or wearable devices, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in smart homes, etc. The form of the electronic devices is not specifically limited in this application embodiment.

[0079] Currently, some electronic devices (such as mobile phones or tablets) are equipped with multiple camera modules to meet users' shooting needs in different scenarios. Below, we will briefly introduce the various possible camera modules in a mobile phone, using it as an example.

[0080] The main camera, also known as the wide-angle lens, is the most commonly used camera on a mobile phone and is typically used for most everyday shooting scenarios. The main camera provides a standard field of view, suitable for shooting portraits, landscapes, architecture, etc.

[0081] Ultra-wide-angle cameras are used to capture wider scenes, such as landscapes, architecture, and group photos. With a wider field of view, typically 120 degrees or more, ultra-wide-angle cameras can capture more of the background and surrounding environment.

[0082] Telephoto cameras are used to capture distant objects, providing optical zoom capabilities and are suitable for shooting close-ups, wildlife, or sporting events. Telephoto cameras can offer 2x, 3x, or higher optical zoom, magnifying distant objects without sacrificing image quality.

[0083] Macro cameras are used to photograph small objects at close range, such as flowers and insects. They can focus at very close distances and reveal the details of the objects.

[0084] Depth sensors, also known as time-of-flight (TOF) sensors, are used to measure the distance between an object and a camera. They can generate point cloud data containing the object's three-dimensional coordinates, helping to achieve background blur effects (e.g., portrait mode) and virtual reality applications.

[0085] A monochrome sensor, used to enhance image detail and dynamic range, typically works in conjunction with the main camera. Monochrome sensors capture more light information, improving image quality.

[0086] Typically, flagship smartphones may feature three to five camera modules, while mid-range devices may have two to three. The specific camera configuration in a phone depends on the manufacturer's design and market positioning.

[0087] In some embodiments, the electronic device may be configured with two telephoto camera modules to achieve optical zoom at different focal lengths. Both telephoto camera modules are complete optical systems, each including a lens assembly, sensor, focusing motor, and other components. The electronic device can achieve a wider zoom range by switching between the telephoto camera modules.

[0088] In some embodiments, to further reduce device manufacturing costs, a dual-lens module can be configured in the electronic device, that is, a camera module includes two lens groups, which can also achieve optical zoom at different focal lengths. The dual-lens module is described below with reference to Figures 1 and 2.

[0089] For example, Figure 1 is a schematic diagram of a dual-lens module provided in an embodiment of this application. As shown in (a) or (b) of Figure 1, the dual-lens module includes: a first telephoto lens group 10 (which can be simply referred to as telephoto A in this embodiment) and a second telephoto lens group 20 (which can be simply referred to as telephoto B in this embodiment), a prism 30, a light-blocking baffle 40, and an image sensor 50. The focal length of the first telephoto lens group 10 is shorter than the focal length of the second telephoto lens group 20. The first telephoto lens group 10 can be used for optical zoom at a lower magnification (e.g., 3x), and the second telephoto lens group 20 can be used for optical zoom at a higher magnification (e.g., 10x).

[0090] The first telephoto lens group 10 and the second telephoto lens group 20 reuse the following components: prism 30, light-blocking plate and image sensor 50.

[0091] As shown in Figure 1(a), when the electronic device activates telephoto lens A, it can control a motor to move prism 30 below the first telephoto lens group 10 and light-shielding plate 40 below the second telephoto lens group 20. After passing through the first telephoto lens group 10, the incident light is reflected by prism 30 and finally reaches image sensor 50. Image sensor 50 converts the light signal into an electrical signal to generate a digital image for subsequent processing and storage. In some embodiments, moving prism 30 below the first telephoto lens group 10 can also be described as moving prism 30 into the optical path of the first telephoto lens group 10, so that light can pass through the first telephoto lens group 10 and prism 30 to reach image sensor 50. Similarly, moving light-shielding plate 40 below the second telephoto lens group 20 can also be described as moving light-shielding plate 40 into the optical path of the second telephoto lens group 20 to block the transmission of light.

[0092] In some embodiments, the motor (not shown in FIG1) may also be described as a drive device, which can simultaneously control the movement of the prism 30 and the light-shielding plate 40. When the electronic device is activated with telephoto lens A or telephoto lens B, the prism 30 and the light-shielding plate 40 are respectively located below the different telephoto lens groups.

[0093] As shown in Figure 1(b), when the electronic device activates the telephoto lens B, it can control a motor to move the prism 30 below the second telephoto lens group 20 and the light-shielding plate 40 below the first telephoto lens group 10. After passing through the second telephoto lens group 20, the incident light is reflected by the prism 30 and finally reaches the image sensor 50. The image sensor 50 converts the light signal into an electrical signal to generate a digital image for subsequent processing and storage. In some embodiments, moving the prism 30 below the second telephoto lens group 20 can also be described as moving the prism 30 into the optical path of the second telephoto lens group 20, so that light can pass through the second telephoto lens group 20 and the prism 30 to reach the image sensor 50. Similarly, moving the light-shielding plate 40 below the first telephoto lens group 10 can also be described as moving the light-shielding plate 40 into the optical path of the first telephoto lens group 10 to block the transmission of light.

[0094] In the dual-lens module shown in Figure 1, the two telephoto lens groups reuse the prism, light shield, and image sensor. At the same time, the prism and light shield are located below the different telephoto lens groups.

[0095] For example, Figure 2 is a schematic diagram of another dual-lens module provided in an embodiment of this application. As shown in (a) or (b) of Figure 2, the dual-lens module includes: a first telephoto lens group 60 (which can be simply referred to as telephoto A in this embodiment), a second telephoto lens group 70 (which can be simply referred to as telephoto B in this embodiment), a light-blocking baffle 80, and an image sensor 90. The attribute information of the two telephoto lens groups can be referred to the embodiment in Figure 1. Unlike Figure 1, in this embodiment, the first telephoto lens group 60 and the second telephoto lens group 70 reuse the image sensor 90, and the dual-lens module in this embodiment does not include a prism. Therefore, compared with the dual-lens module shown in Figure 1, light only passes through one of the telephoto lens groups to reach the image sensor, which simplifies the optical path and further reduces the cost of manufacturing the dual-lens module.

[0096] As shown in Figure 2(a), when the electronic device activates telephoto lens A, it can control a motor to move the image sensor 90 below the first telephoto lens group 60 and to move the light-shielding plate 80 below the second telephoto lens group 70, so that incident light passes through the first telephoto lens group 60 and reaches the image sensor 90. In some embodiments, moving the image sensor 90 below the first telephoto lens group 60 can also be described as moving the image sensor 90 into the optical path of the first telephoto lens group 60. Moving the light-shielding plate 80 below the second telephoto lens group 70 can also be described as moving the light-shielding plate 80 into the optical path of the second telephoto lens group 70 to block the transmission of light.

[0097] As shown in Figure 2(b), when the electronic device activates the telephoto lens B, it can control a motor to move the image sensor 90 below the second telephoto lens group 70 and to move the light-shielding plate 80 below the first telephoto lens group 60, so that the incident light passes through the second telephoto lens group and reaches the image sensor. In some embodiments, moving the image sensor 90 below the second telephoto lens group 70 can also be described as moving the image sensor 90 into the optical path of the second telephoto lens group 70. Moving the light-shielding plate 80 below the first telephoto lens group 60 can also be described as moving the light-shielding plate 80 into the optical path of the first telephoto lens group 60 to block the transmission of light.

[0098] In the dual-lens module shown in Figure 2, the two telephoto lens groups reuse the light-blocking baffle and the image sensor. At the same time, the light-blocking baffle and the image sensor are located below different telephoto lens groups.

[0099] In some embodiments, the activation of telephoto lens A by the electronic device can also be described as the electronic device enabling telephoto lens A. For example, the electronic device shown in Figure 1 uses a first telephoto lens group, a prism, and an image sensor to acquire images. As another example, the electronic device shown in Figure 2 uses a first telephoto lens group and an image sensor to acquire images.

[0100] In some embodiments, the activation of telephoto lens B by the electronic device can also be described as the electronic device enabling telephoto lens B. For example, the electronic device shown in Figure 1 uses a second telephoto lens group, a prism, and an image sensor to acquire images. As another example, the electronic device shown in Figure 2 uses a second telephoto lens group and an image sensor to acquire images.

[0101] Based on any of the aforementioned dual-lens modules, how to control the dual-lens module to improve the camera performance of the device when the shooting scene changes is an urgent problem to be solved. To address this, this application provides a camera control method applicable to any electronic device with shooting capabilities, equipped with any of the aforementioned dual-lens modules. The method involves the following key points:

[0102] 1) When entering the gallery (or thumbnails) from the camera (e.g., the camera's preview interface), or when returning to the camera after entering the gallery from the camera, the electronic device does not perform lens switching on the dual-lens module. Since no lens switching occurs when returning to the camera, camera startup performance is improved. Furthermore, the absence of vibration noise during lens switching when switching between the camera and the gallery improves the user experience. When returning to the desktop or other applications after entering the gallery from the camera, the electronic device can determine whether to switch the dual-lens module based on the telephoto lens used before entering the gallery. If the telephoto lens used before entering the gallery was a longer focal length telephoto lens, the electronic device will switch the dual-lens module to the shorter focal length telephoto lens when entering the desktop or other applications. Thus, when reopening the camera, the electronic device does not need to perform lens switching on the dual-lens module, and the absence of vibration noise during lens switching improves the user experience. See Figures 3 and 6 for specific examples.

[0103] 2) When switching from the longer focal length telephoto lens (telephoto B) to the main camera or ultra-wide-angle lens, or when exiting the camera after activating the longer focal length telephoto lens, the electronic device first stops the dual-lens module's power supply. After the dual-lens module's power supply is stopped, the electronic device switches the lens to the shorter focal length telephoto lens (telephoto A). Since the user is more likely to use the shorter focal length telephoto lens when switching back to telephoto, switching the lens in advance after the dual-lens module's power supply is stopped can improve camera startup performance and reduce startup delay when switching back to telephoto or when reopening the camera and switching back to telephoto. In addition, if the camera is reopened after exiting, the lack of vibration noise from the dual-lens module during lens switching improves the user experience. See Figures 8 and 9 for specific examples.

[0104] Among them, "dual-lens module outage" can refer to the image sensor in the dual-lens module stopping working.

[0105] 3) When one of the telephoto lenses (telephoto A or telephoto B) of the dual-lens module is activated, if the user triggers a long exposure shot, the electronic device first stops streaming to the dual-lens module and then restarts streaming. During this process, the electronic device does not switch lenses within the dual-lens module. Since there is no lens switching before restarting streaming, the camera startup performance upon restarting streaming is improved, and startup latency is reduced. Furthermore, the absence of vibration noise caused by lens switching during restarting streaming enhances the user experience. See the embodiment in Figure 10 for details.

[0106] Before introducing the camera control methods, we will first introduce the configuration of the camera in the electronic device.

[0107] In the following embodiments, the electronic device is equipped with a first camera module and a second camera module. The first camera module is a telephoto camera module with a dual-lens group, and the first camera module can refer to the dual-lens module shown in Figure 1 or Figure 2. The second camera module includes a main camera module, a wide-angle camera module, or an ultra-wide-angle camera module.

[0108] In one example, the first camera module includes a first lens group, a second lens group, a prism, a light-blocking plate, and a first image sensor. Referring to Figure 1, the first telephoto lens group in Figure 1 corresponds to the first lens group, the second telephoto lens group in Figure 1 corresponds to the second lens group, and the image sensor in Figure 1 corresponds to the first image sensor. In this example, the first camera module includes a first state and a second state. In the first state, the light-blocking plate in the first camera module is located in the optical path of the second lens group, and the prism in the first camera module is located in the optical path of the first lens group. In the second state, the light-blocking plate in the first camera module is located in the optical path of the first lens group, and the prism in the first camera module is located in the optical path of the second lens group.

[0109] In another example, the first camera module includes a first lens group, a second lens group, a light-shielding plate, and a first image sensor. Referring to Figure 2, the first telephoto lens group in Figure 2 corresponds to the first lens group, the second telephoto lens group in Figure 2 corresponds to the second lens group, and the image sensor in Figure 2 corresponds to the first image sensor. In this example, the first camera module includes a first state and a second state. In the first state, the light-shielding plate in the first camera module is located on the optical path of the second lens group, and the first image sensor in the first camera module is located on the optical path of the first lens group. In the second state, the light-shielding plate in the first camera module is located on the optical path of the first lens group, and the first image sensor in the first camera module is located on the optical path of the second lens group.

[0110] The second camera module includes a third lens group and a second image sensor.

[0111] In this design, the focal length of the first lens group is shorter than that of the second lens group, and the focal length of the first lens group is longer than that of the third lens group. The first lens group corresponds to a zoom ratio of 2, the second lens group corresponds to a zoom ratio of 3, and the third lens group corresponds to a zoom ratio of 1, wherein zoom ratio 1 is less than zoom ratio 2, and zoom ratio 2 is less than zoom ratio 3. For example, zoom ratio 1 is 1x, zoom ratio 2 is 3.7x, and zoom ratio 3 is 10x.

[0112] It should be noted that the light-shielding plate in the first camera module in the two examples above is an optional component.

[0113] For the electronic device configured as described above, the first camera module can be a dual-lens telephoto camera module, and the second camera module can be the main camera module. On one hand, since the first camera module contains two telephoto lens groups (a first lens group and a second lens group), the electronic device can achieve a wider zoom range by switching between the lens groups in the first camera module. On the other hand, since the two lens groups in the first camera module reuse a single image sensor, compared to an electronic device that uses two telephoto camera modules to achieve a wider zoom range, at least one image sensor can be saved, thus reducing the device's manufacturing cost.

[0114] For ease of description, the following embodiments all use a first camera module comprising a first lens group, a second lens group, a prism, a light-blocking plate, and a first image sensor as examples for scheme illustration. The camera control method provided in this application will be described in detail below with reference to several specific embodiments. These embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0115] Figure 3 is a flowchart of a camera control method provided in an embodiment of this application. As shown in Figure 3, the method includes the following steps:

[0116] S101, in response to the operation of opening the camera application, a preview interface is displayed. The preview interface includes multiple images 1, which are images captured by the second image sensor in the second camera module. During the display of multiple images 1, the first camera module is in a first state.

[0117] When a user turns on the camera, the electronic device automatically activates the second camera module. The second image sensor of the second camera module captures multiple images (1), which are then sent to the display screen for display. For example, the second camera module can function as the main camera module. During the display of multiple images (1), the first camera module in the electronic device is in a first state. In this first state, the light-shielding plate in the first camera module is located in the optical path of the second lens group, and the prism is also located in the optical path of the first lens group.

[0118] For example, Figure 4 is a schematic diagram of interface changes provided in an embodiment of this application. As shown in Figure 4(a), opening the camera application can be done by clicking the camera application icon 11 in interface 10. In response to this operation, the electronic device defaults to activating the main camera module, which captures images. As shown in Figure 4(b), the electronic device displays interface 12, and the image displayed on interface 12 is one frame captured by the main camera module. The zoom ratio corresponding to the third lens group in the main camera module is 1x.

[0119] S102, in response to the operation of adjusting the zoom ratio to zoom ratio 2, multiple images 2 are displayed on the preview interface. The multiple images 2 are images captured by the first image sensor in the first camera module. During the display of multiple images 2, the first camera module maintains the first state.

[0120] Referring again to Figure 4, as shown in Figure 4(b), adjusting the zoom level to 2 can be done by clicking the 3.7x zoom level on interface 12, sliding left to 3.7x in area 1211 of interface 12, or by user voice input to zoom to 3.7x. In response to this operation, the electronic device activates the first camera module, acquiring an image through the first lens group, prism, and first image sensor within the first camera module. In response to this operation, the electronic device displays interface 13, as shown in Figure 4(c), where the image displayed is one frame acquired by the first image sensor. During this process, the light-shielding plate in the first camera module is located in the optical path of the second lens group, and the prism is located in the optical path of the first lens group.

[0121] The activation of the first camera module by an electronic device specifically refers to the activation of the first image sensor within the first camera module.

[0122] Optionally, as shown in Figure 4(c), in response to clicking the shutter button 14 on the interface 13, the electronic device captures the image acquired by the first image sensor when the user presses the shutter button 14, and stores the image in the gallery application.

[0123] In some embodiments, after adjusting the zoom ratio to a zoom ratio of 2, the electronic device can turn off the second camera module. Turning off the second camera module specifically refers to turning off the second image sensor in the second camera module, thereby saving device power consumption.

[0124] In some embodiments, after adjusting the zoom ratio to a zoom ratio of 2, the second camera module of the electronic device can remain powered on, that is, the second image sensor in the second camera module continues to work so that when necessary (e.g., zoomed to 10x), the image captured by the second image sensor can be displayed on the preview interface.

[0125] S103, in response to the operation of viewing the gallery, a first interface is displayed. The first interface includes image 3, which is the most recently captured image in the gallery. During the display of image 3, the first camera module remains in a first state.

[0126] Optionally, image 3 can be an image that was most recently downloaded to the gallery app.

[0127] Referring to Figure 4, as shown in Figure 4(c), viewing the gallery can be done by clicking on thumbnail 15 in interface 13. In response to this operation, the electronic device displays interface 16, as shown in Figure 4(d). Interface 16 displays the most recently captured image. During this process, the light-shielding plate in the first camera module is located in the optical path of the second lens group, and the prism is located in the optical path of the first lens group.

[0128] In other words, before the camera enters the gallery, the first camera module is in the first state, and after the camera enters the gallery, the first camera module remains in the first state. That is, when the camera enters the gallery, the electronic device does not switch the lens of the first camera module.

[0129] In some embodiments, the first camera module is in a first state before the camera enters another application, and the first camera module remains in the first state after the camera enters another application. That is, when the camera enters another application, the electronic device does not switch the lens of the first camera module.

[0130] Once the camera is accessed by the gallery or other applications, the camera app runs in the background. While the camera app is in the background, some of its functions may still be running, including image acquisition and image processing.

[0131] In some embodiments, after the camera enters the gallery or other applications, the electronic device can turn off the first camera module. Turning off the first camera module specifically refers to turning off the first image sensor in the first camera module, which can save device power consumption.

[0132] In some embodiments, after the camera enters the gallery or other applications, the first camera module of the electronic device can remain powered on, that is, the first image sensor in the first camera module continues to work. In this way, when returning to the camera from the gallery or other applications, since it is not necessary to turn on the first image sensor again, the latency can be reduced and the camera startup performance can be improved.

[0133] In some embodiments, after S103, the following can be performed:

[0134] S104, in response to the operation of returning to the preview interface, multiple images 4 are displayed in the preview interface. Images 4 are images captured by the first image sensor in the first camera module. During the display of multiple images 4, the first camera module maintains the first state.

[0135] Referring again to Figure 4, as shown in Figure 4(d), the operation to return to the preview interface can be clicking the return control 17 in interface 16, or sliding from the left edge of interface 16 to the right, or sliding from the right edge of interface 16 to the left, or sliding down from the center of interface 16. In response to the operation to return to the preview interface, the electronic device displays interface 18, which displays one frame of an image captured by the first image sensor. During this process, the light-shielding plate in the first camera module is located in the optical path of the second lens group, and the prism is located in the optical path of the first lens group.

[0136] In other words, when the camera enters the gallery, the first camera module remains in the first state. If the camera returns to the gallery, the first camera module will still remain in the first state. That is, when returning to the camera from the gallery, the electronic device does not switch the lens of the first camera module.

[0137] In some embodiments, after S103, the following can be performed:

[0138] S105, in response to the operation of exiting the gallery to the second interface, the first camera module remains in the first state.

[0139] The second interface can be a desktop application or an interface provided by other applications.

[0140] For example, Figure 5 is a schematic diagram of interface changes provided in an embodiment of this application. As shown in Figure 5(a), the operation of exiting the gallery to the second interface can be an operation of sliding upward from the bottom edge of the interface 16. In response to this operation, the electronic device displays the interface 10, which is the desktop. During this process, the light-shielding plate in the first camera module is still located on the optical path of the second lens group, and the prism is located on the optical path of the first lens group.

[0141] In other words, when the camera enters the gallery, the first camera module remains in the first state. If the user returns to the desktop or other applications after entering the gallery, the first camera module will still remain in the first state, meaning the electronic device will not switch the lens of the first camera module.

[0142] S106, in response to the operation of reopening the camera application, multiple images 5 are displayed in the preview interface. The multiple images 5 are images captured by the second image sensor in the second camera module. During the display of multiple images 5, the first camera module remains in the first state.

[0143] Referring again to Figure 5, as shown in Figure 5(b), reopening the camera application can be done by clicking the camera application icon 11 in interface 10. In response to this action, as shown in Figure 5(c), the electronic device displays interface 19, which shows a frame captured by the main camera module. The zoom ratio corresponding to the third lens group in the main camera module is 1x. During this process, the light-shielding plate in the first camera module remains on the optical path of the second lens group, and the prism is also on the optical path of the first lens group.

[0144] In other words, when returning to the camera from the desktop or other applications, the electronic device does not need to switch lenses for the first camera module.

[0145] The camera control method shown in this embodiment allows the electronic device to use the first lens group, prism, and first image sensor in the first camera module (i.e., the first camera module is in a first state) before entering the gallery from the camera. The first image sensor captures the image and transmits it to the display screen for display. Afterwards, when entering the gallery from the camera, or returning to the camera after entering the gallery, the electronic device does not need to switch lenses on the first camera module; that is, the first camera module remains in the first state. Since there is no lens switching when returning to the camera from the gallery, camera startup performance is improved, and startup latency is reduced. Furthermore, since there is no vibration noise generated by lens switching when switching between the camera and the gallery, the user experience is improved.

[0146] Figure 6 is a flowchart of a camera control method provided in an embodiment of this application. As shown in Figure 6, the method includes the following steps:

[0147] S101, in response to the operation of opening the camera application, a preview interface is displayed. The preview interface includes multiple images 1, which are images captured by the second image sensor in the second camera module. During the display of multiple images 1, the first camera module is in a first state.

[0148] S201, in response to the operation of adjusting the zoom ratio to zoom ratio 3, the first camera module changes from the first state to the second state.

[0149] Among them, zoom ratio 3 is the zoom ratio corresponding to the second lens group in the first camera module.

[0150] For example, Figure 7 is a schematic diagram of interface changes provided in an embodiment of this application. As shown in Figure 7(a), adjusting the zoom ratio to a zoom ratio of 3 can be done by clicking the 10x zoom ratio on interface 12, or by sliding left to the 10x zoom ratio in area 1211 of interface 12, or by user voice input to adjust the zoom to 10x. In response to this operation, the electronic device switches the lens of the first camera module, for example, by moving the light-blocking baffle in the first camera module from below the second lens group to below the first lens group, and by moving the prism in the first camera module from below the first lens group to below the second lens group, so that the first camera module switches from a first state to a second state.

[0151] In some embodiments, after adjusting the zoom ratio to a zoom ratio of 3, the electronic device can turn off the second camera module, thereby saving device power consumption.

[0152] In some embodiments, after adjusting the zoom ratio to a zoom ratio of 3, the second camera module of the electronic device can remain powered on so that, when necessary (e.g., zoomed to 10x), the image captured by the second image sensor can be displayed on the preview interface.

[0153] S202, multiple images 2 are displayed on the preview interface. Multiple images 2 are images captured by the first image sensor in the first camera module. During the display of multiple images 2, the first camera module maintains the second state.

[0154] After the first camera module switches from the first state to the second state, the electronic device activates the first image sensor in the first camera module and displays multiple images 2 captured by the first image sensor on the preview interface. In the second state, the light-shielding plate in the first camera module is located in the optical path of the first lens group, and the prism is located in the optical path of the second lens group. The electronic device can capture images through the second lens group, prism, and first image sensor in the first camera module.

[0155] Referring again to Figure 7, in response to the operation of adjusting the zoom to 10x, as shown in Figure 7(b), the electronic device displays interface 20, and the image displayed on interface 20 is one of the frames captured by the first image sensor.

[0156] Optionally, as shown in Figure 7(b), in response to clicking the shutter button 21 on the interface 20, the electronic device captures the image acquired by the first image sensor when the user presses the shutter button 21 and stores the image in the gallery application.

[0157] S203, in response to the operation of viewing the gallery, a first interface is displayed. The first interface includes image 3, which is the most recently captured image in the gallery. During the display of image 3, the first camera module remains in the second state.

[0158] Referring again to Figure 7, as shown in Figure 7(c), viewing the image library can be done by clicking on thumbnail 22 in interface 20. In response to this action, the electronic device displays interface 23, the first interface, as shown in Figure 7(d), which displays the most recently captured image. During this process, the light-shielding plate in the first camera module is located in the optical path of the first lens group, and the prism is located in the optical path of the second lens group.

[0159] In other words, before the camera enters the gallery, the first camera module is in the second state, and after the camera enters the gallery, the first camera module remains in the second state. That is, when the camera enters the gallery, the electronic device does not switch the lens of the first camera module.

[0160] In some embodiments, the first camera module is in a second state before the camera enters another application, and the first camera module remains in the second state after the camera enters another application. That is, when the camera enters another application, the electronic device does not switch the lens of the first camera module.

[0161] In some embodiments, after S203, the following can be performed:

[0162] S204, in response to the operation of returning to the preview interface, multiple images 4 are displayed on the preview interface. The multiple images 4 are images captured by the first image sensor in the first camera module. During the display of multiple images 4, the first camera module maintains the second state.

[0163] Referring again to Figure 7, as shown in Figure 7(c), the operation to return to the preview interface can be clicking the return control 24 in interface 23, or sliding from the left edge of interface 23 to the right, or sliding from the right edge of interface 23 to the left, or sliding down from the center of interface 23. In response to the operation to return to the preview interface, the electronic device displays interface 25, which displays one frame of an image captured by the first image sensor. During this process, the light-shielding plate in the first camera module is located in the optical path of the first lens group, and the prism is located in the optical path of the second lens group.

[0164] In other words, if the first camera module remains in the second state when the camera enters the gallery, and then returns to the camera after entering the gallery, the first camera module will still remain in the second state. That is, when returning to the camera from the gallery, the electronic device does not switch the lens of the first camera module.

[0165] In some embodiments, after S203, the following can be performed:

[0166] S205, in response to the operation of exiting the gallery to the second interface, the first camera module changes from the second state to the first state.

[0167] The operation of exiting the gallery to the second interface can be referred to Figure 5(a). When the camera enters the gallery, if the first camera module remains in the second state, and the user returns to the desktop or other applications after entering the gallery, the electronic device switches the lens of the first camera module. For example, it moves the light-blocking plate in the first camera module from below the first lens group to below the second lens group, and moves the prism in the first camera module from below the second lens group to below the first lens group, so that the first camera module switches from the second state to the first state.

[0168] S206, in response to the operation of reopening the camera application, multiple images 5 are displayed. The multiple images 5 are images captured by the second image sensor in the second camera module. During the display of multiple images 5, the first camera module remains in the first state.

[0169] To reopen the camera app, refer to Figure 5(b).

[0170] In other words, when returning to the camera from the desktop or other applications, the electronic device does not need to switch lenses for the first camera module.

[0171] The camera control method shown in this embodiment allows the electronic device to use the second lens group, prism, and first image sensor in the first camera module (i.e., the first camera module is in its second state) before entering the gallery from the camera. The first image sensor captures the image and transmits it to the display screen. Afterward, when entering the gallery from the camera, the electronic device does not need to switch the lens of the first camera module. When returning to the desktop or other applications after entering the gallery from the camera, the electronic device switches the lens of the first camera module, that is, switches the first camera module from the second state to the first state. Since the electronic device has already completed the lens switching of the first camera module before returning to the camera from the desktop or other applications, there is no lens switching when returning to the camera from the desktop or other applications. This improves camera startup performance when switching back to telephoto and reduces startup latency. Furthermore, the absence of vibration noise caused by lens switching when returning to the camera from the desktop or other applications improves the user experience.

[0172] Figure 8 is a flowchart of the camera control method provided in this embodiment of the application. As shown in Figure 8, the method includes the following steps:

[0173] S101, in response to the operation of opening the camera application, a preview interface is displayed. The preview interface includes multiple images 1, which are images captured by the second image sensor in the second camera module. During the display of multiple images 1, the first camera module is in a first state.

[0174] S201, in response to the operation of adjusting the zoom ratio to zoom ratio 3, the first camera module changes from the first state to the second state.

[0175] S202, multiple images 2 are displayed on the preview interface. Multiple images 2 are images captured by the first image sensor in the first camera module. During the display of multiple images 2, the first camera module maintains the second state.

[0176] After the first camera module switches from the first state to the second state, the electronic device activates the first image sensor in the first camera module and displays multiple images 2 captured by the first image sensor on the preview interface.

[0177] S301, in response to the operation of adjusting the zoom ratio to zoom ratio 1, multiple images 3 are displayed on the preview interface, and the first image sensor in the first camera module stops acquiring images. The multiple images 3 are images acquired by the second image sensor in the second camera module.

[0178] Among them, zoom ratio 1 is the zoom ratio corresponding to the third lens group in the second camera module.

[0179] For example, the second camera module can be the main camera module, and the zoom ratio 1 can be 1x. The second camera module can also be an ultra-wide-angle camera module, and the zoom ratio 1 can be 0.5x.

[0180] The cessation of image acquisition by the first image sensor in the first camera module can also be described as the first camera module stopping operation.

[0181] S302, after the first image sensor in the first camera module stops acquiring images, the first camera module changes from the second state to the first state.

[0182] In some embodiments, after the first image sensor in the first camera module stops acquiring images, the electronic device switches the lens of the first camera module. For example, it moves the light-shielding plate in the first camera module from below the first lens group to below the second lens group, and moves the prism in the first camera module from below the second lens group to below the first lens group, so that the first camera module switches from the second state to the first state.

[0183] The camera control method shown in this embodiment involves the electronic device's first camera module stopping streaming when the camera zooms from 3x to 1x (e.g., from 10x to 1x). The electronic device then switches the lens of the first camera module, transitioning it from a second state to a first state, i.e., switching the lens to a lower-magnification first lens group. Since the user is more likely to use the lower-magnification first lens group when switching back to telephoto, performing the lens switch on the first camera module before it stops streaming improves camera startup performance and reduces startup latency when switching back to telephoto or restarting the camera and switching to telephoto.

[0184] Figure 9 is a flowchart of the camera control method provided in this embodiment of the application. As shown in Figure 9, the method includes the following steps:

[0185] S101, in response to the operation of opening the camera application, a preview interface is displayed. The preview interface includes multiple images 1, which are images captured by the second image sensor in the second camera module. During the display of multiple images 1, the first camera module is in a first state.

[0186] S201, in response to the operation of adjusting the zoom ratio to zoom ratio 3, the first camera module changes from the first state to the second state.

[0187] S202, multiple images 2 are displayed on the preview interface. Multiple images 2 are images captured by the first image sensor in the first camera module. During the display of multiple images 2, the first camera module maintains the second state.

[0188] After the first camera module switches from the first state to the second state, the electronic device activates the first image sensor in the first camera module and displays multiple images 2 captured by the first image sensor on the preview interface.

[0189] S401, in response to the operation of exiting the camera application, the first image sensor in the first camera module stops acquiring images.

[0190] Exiting the camera app can refer to completely releasing the resources occupied by the camera app.

[0191] S402, after the first image sensor in the first camera module stops acquiring images, the first camera module changes from the second state to the first state.

[0192] This step can be referred to in S302 above, and will not be repeated here.

[0193] The camera control method shown in this embodiment, when the camera zooms to a zoom ratio of 3, exits the camera. The first image sensor in the first camera module of the electronic device first stops acquiring images. Then, the electronic device switches the lens of the first camera module, so that the first camera module changes from a second state to a first state, that is, switches the lens to a lower magnification first lens group. Since the user is more likely to use the lower magnification first lens group when switching back to telephoto, switching the lens of the first camera module in advance after the first camera module stops receiving data can improve the camera startup performance when switching back to telephoto and reduce startup delay. In addition, since there is no vibration sound generated by lens switching when switching back to telephoto, the user experience is improved.

[0194] Figure 10 is a flowchart of the camera control method provided in an embodiment of this application. As shown in Figure 10, the method includes the following steps:

[0195] S501, when the shooting mode is the first shooting mode and the zoom ratio is zoom ratio 1, a preview interface is displayed. The preview interface includes multiple images 1, which are images captured by the second image sensor in the second camera module. During the display of multiple images 1, the first camera module is in the first state.

[0196] The first shooting mode can be either night scene shooting mode or professional shooting mode. In the first shooting mode, users can customize shooting parameters, including but not limited to shutter speed, ISO sensitivity, and exposure compensation.

[0197] For example, Figure 11 is a schematic diagram of interface changes provided in an embodiment of this application. As shown in Figure 11(a), interface 26 is a preview interface in night scene shooting mode. Interface 26 includes shooting parameters that the user can select, such as ISO and shutter speed S. The zoom ratio displayed on interface 26 is 1x. The image displayed on interface 26 is the image captured by the main camera module. At this time, the first camera module is not activated. The prism in the first camera module is in the optical path of the first lens group, and the light-blocking plate in the first camera module is in the optical path of the second lens group.

[0198] S502, in response to the operation of adjusting the zoom ratio to zoom ratio 3, the first camera module changes from the first state to the second state.

[0199] Referring again to Figure 11, as shown in Figure 11(a), adjusting the zoom ratio to zoom ratio 3 can be done by sliding left in area 27 to zoom ratio 3, or by clicking on zoom ratio 3 in area 27, or by the user voice inputting zoom ratio 3. In response to this operation, interface 28 displays the user-defined zoom ratio of 10x, as shown in Figure 11(b). In response to this operation, the electronic device switches the lens of the first camera module, for example, by moving the light-blocking baffle in the first camera module from below the second lens group to below the first lens group, and by moving the prism in the first camera module from below the first lens group to below the second lens group, thereby switching the first camera module from a first state to a second state.

[0200] S503, multiple images 2 are displayed on the preview interface. Multiple images 2 are images captured by the first image sensor in the first camera module. During the display of multiple images 2, the first camera module maintains the second state.

[0201] After the first camera module switches from the first state to the second state, the electronic device activates the first image sensor in the first camera module and displays multiple images 2 captured by the first image sensor on the preview interface.

[0202] S504, in response to the operation of triggering long exposure shooting, displays a third interface, which is the interface for long exposure shooting.

[0203] Referring again to Figure 11, as shown in Figures 11(b), (c), and (d), the operations for triggering a long exposure shot include: clicking the shutter speed S on interface 28, selecting a shutter speed of 32s on interface 29, and clicking the shutter button. In response to triggering the long exposure shot, the electronic device displays interface 30, which is the interface for long exposure shooting, i.e., the third interface. Interface 30 may include prompts instructing the user to keep the camera stable until the countdown ends or to click the shutter button to end the shooting. After the long exposure shot is completed, the electronic device displays interface 31, as shown in Figure 11(e), which displays the user-defined shutter speed of 32s.

[0204] In this embodiment, the first camera module is in the second state before triggering long exposure shooting.

[0205] In some embodiments, in response to triggering a long exposure shooting operation, the first image sensor in the first camera module of the electronic device captures a frame of image according to a user-defined shutter speed. For example, if the user-defined shutter speed is 32s, in response to clicking the long exposure shooting operation, the first image sensor outputs a long exposure image after 32s.

[0206] In some embodiments, after a long exposure shot, to quickly display a preview interface, the first image sensor first stops acquiring images. Then, the electronic device configures a default shutter speed (e.g., 33ms) for the first image sensor, and the first image sensor restarts. After the first image sensor restarts, the electronic device displays a preview interface, and the image displayed in the preview interface is the image acquired by the restarted first image sensor according to the configured default shutter speed. In this embodiment, after a long exposure shot, the first image sensor of the first camera module of the electronic device first stops and then restarts its output.

[0207] It should be understood that during the period after long exposure shooting and before the first image sensor restarts, no image is transmitted to the display screen because the first image sensor has not started working. During this period, the electronic device does not display an image (black screen). However, this period is short, and users may perceive a brief lag in the preview screen.

[0208] During the long exposure shooting process and from the end of the long exposure shooting until the preview interface is displayed, the first camera module of the S505 maintains the second state.

[0209] In the relevant solution, after the long exposure shooting ends, the first image sensor in the first camera module of the electronic device first stops acquiring images. Then, the electronic device switches the lens of the first camera module, switching it from a second state to a first state. Before restarting the first image sensor, the electronic device switches the first camera module back from the first state to the second state. After the first camera module is in the second state, the first image sensor restarts and begins acquiring images. In this embodiment, because there are two lens switches between the end of the long exposure shooting and the display of the preview interface, the time for the first image sensor to restart after stopping is relatively long, resulting in noticeable stuttering in the preview image after the long exposure shooting ends.

[0210] The camera control method shown in this embodiment, because the first camera module does not switch lenses during the process from the end of long exposure shooting until the first frame image is displayed (i.e., the first camera module always remains in the second state), can shorten the time for the first image sensor to restart after power outage, thereby improving the camera startup performance after long exposure shooting and reducing startup latency. Furthermore, since there is no vibration noise caused by lens switching after long exposure shooting, the user experience is improved.

[0211] In some embodiments, in the first shooting mode and with a zoom ratio of 2 (e.g., 3.7x), if the user triggers a long exposure shot, the first camera module of the electronic device remains in a first state during the long exposure shooting process and from the end of the long exposure shooting until the preview interface is displayed; that is, the electronic device does not switch lenses for the first camera module. In this embodiment, the first camera module is in the first state before triggering the long exposure shot. Since the first camera module remains in the first state throughout the long exposure shooting process until the preview interface is displayed, the time for the first image sensor to restart after a power outage can be shortened, thereby improving the camera startup performance after a long exposure shot and reducing startup latency. Furthermore, since there is no vibration noise from lens switching after the long exposure shot, the user experience is improved.

[0212] Figure 12 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. As shown in Figure 1, the electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 100.

[0213] Processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, 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. In this embodiment, processor 110 can execute the camera control method provided in the foregoing method embodiments.

[0214] Camera 193 can also be described as a camera module, which may include a lens group and an image sensor, etc. In this embodiment, multiple camera modules can be configured in the electronic device, such as a main camera module, a (telephoto) dual-lens module, etc., wherein the dual-lens module can be referred to the embodiment of Figure 1 or Figure 2.

[0215] In some embodiments, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0216] The software system of an electronic device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application uses a layered architecture as an example to illustrate the software structure of an electronic device. Figure 13 is a block diagram of a software structure of an electronic device provided in this application embodiment. The layered architecture divides the software system of the electronic device into several layers, each with a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, as shown in Figure 13, the electronic device may include: an application layer, an application framework layer, a hardware abstraction layer (HAL), and a kernel layer.

[0217] It is understood that the software structure division of the electronic device in this application embodiment is just an example. This application embodiment does not limit the hierarchical division method in the software system of the electronic device. The modules in each level in the following embodiments are the modules involved in the embodiments of this application. Each level may also include more or fewer modules than shown in the figure, or combine some modules, or split some modules.

[0218] The application layer may include a series of application packages. The application layer runs applications by calling the application programming interface (API) provided by the application framework layer. In this embodiment, as shown in Figure 13, the application layer may include applications such as a camera and a gallery.

[0219] The application framework layer provides APIs and a programming framework for applications in the application layer. The application framework layer includes some predefined functions. In this embodiment, the application framework layer may include a camera management module. The camera management module receives control flow from the application layer and can send control flow to the camera driver via the camera HAL. The control flow can be used to indicate whether to switch lenses in the dual-lens module in the hardware layer.

[0220] For example, when an electronic device acquires images via the image sensor of a dual-lens module (e.g., telephoto B) and transmits the images to a display screen, in response to an operation from the camera to the gallery, the camera application can send a notification to the camera HAL via the camera management module to indicate that lens switching of the dual-lens module is not required (e.g., keep telephoto B). In one example, in response to an operation from the gallery back to the camera, the gallery application can send a notification to the camera HAL via the camera management module to indicate that lens switching of the dual-lens module is not required (e.g., keep telephoto B). In another example, in response to an operation from the gallery to the desktop or other applications, the gallery application can send a notification to the camera HAL via the camera management module to indicate that the lens of the dual-lens module needs to be switched to the shorter focal length lens group (e.g., switch to telephoto A).

[0221] The hardware abstraction layer can contain multiple library modules, such as a camera library module and a motor library module. Electronic devices can load the corresponding library modules for the hardware, thereby enabling the application framework layer to access the device hardware. In this embodiment, as shown in Figure 13, the hardware abstraction layer can include a camera HAL. The camera HAL can receive control flows from the camera management module and, based on these flows, send control commands to the motor of the dual-lens module via a camera driver (specifically, a lens switching driver). For example, the control command may instruct the motor whether to switch the lenses of the dual-lens module. If the control command instructs the electrodes to switch the lenses of the dual-lens module, the motor moves the prism and light-blocking plate (optional) in the dual-lens module based on the control command, or moves the image sensor and light-blocking plate (optional) in the dual-lens module, thereby switching the state of the dual-lens module (e.g., from the first state to the second state, or from the second state to the first state). The camera HAL can also be used to determine that it is necessary to stop the flow in the telephoto focal length and then restart the flow (see the embodiment in Figure 10). When the image sensor of the dual-lens module is stopped, the camera driver is notified that there is no need to switch lenses for the dual-lens module.

[0222] In some embodiments, the camera HAL is also used to send control commands to the motor driver to drive the motor in the camera module. In some embodiments, the camera HAL is also used to send control commands to the image sensor driver to drive the image sensor in the camera module.

[0223] The kernel layer is the layer between hardware and software. It drives the hardware, enabling it to function. In this embodiment, as shown in Figure 13, the kernel layer may include a camera driver, which includes, for example, a lens switching driver, a motor driver, and an image sensor driver. The lens switching driver drives the motors of the dual-lens module based on control commands, enabling lens switching between the two lenses. The motor driver drives the motors in the camera module to perform focusing, zooming, and image stabilization control. The image sensor driver drives the image sensor in the camera module to acquire images.

[0224] In this embodiment, the hardware layer may include various devices, such as a main camera module and a dual-lens module. The main camera module may include a lens group 1, an image sensor 1, and a motor 1. The dual-lens module may include, for example, a lens group 2 with a shorter focal length, a lens group 3 with a longer focal length, a prism (optional), a light-blocking plate (optional), an image sensor 2, a motor 2, and a motor. For example, the motor can drive the prism and the light-blocking plate to move, as shown in Figure 1. As another example, the motor can drive the light-blocking plate and the image sensor to move, as shown in Figure 2.

[0225] In some embodiments, the hardware layer may also include an ultra-wide-angle camera module.

[0226] This application provides an electronic device, including: a first camera module, one or more processors, and a memory; the first camera module includes a first lens group, a second lens group, and a first image sensor; the focal length of the first lens group is smaller than the focal length of the second lens group; the first camera module is used to acquire images through the first lens group and the first image sensor, or to acquire images through the second lens group and the first image sensor. The memory is coupled to one or more processors, and the memory is used to store computer program code, including computer instructions, which are invoked by the one or more processors to cause the electronic device to perform the method as described in any of the above embodiments.

[0227] Optionally, the electronic device also includes a second camera module, which includes a third lens group and a second image sensor. The focal length of the third lens group is shorter than that of the first lens group. The second camera module is used to acquire images through the third lens group and the second image sensor.

[0228] This application provides a chip or chip system applied to an electronic device. The chip or chip system includes one or more processors, which are used to invoke computer instructions to cause the electronic device to perform the methods as described in any of the above embodiments.

[0229] This application provides a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of the above embodiments.

[0230] The methods described in the above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. If implemented in software, the functionality can be stored as one or more instructions or code on or transmitted on a computer-readable medium. A computer-readable medium can include computer storage media and communication media, and can also include any medium that can transfer a computer program from one place to another. A storage medium can be any target medium accessible by a computer.

[0231] In one possible implementation, a computer-readable medium may include random access memory (RAM), read-only memory (ROM), compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage or other magnetic storage devices, or any other medium intended to carry or store the required program code in the form of instructions or data structures, and accessible by a computer. Furthermore, any connection is appropriately referred to as a computer-readable medium. For example, if software is transmitted from a website, server, or other remote source using coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL), or wireless technologies such as infrared, radio, and microwave, then coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Magnetic disks typically reproduce data magnetically, while optical disks optically reproduce data using lasers. Combinations of the above should also be included within the scope of computer-readable media.

[0232] This application provides a computer program product, which includes computer program code. When the computer program code is run on an electronic device, it causes the computer to perform the method of any of the above embodiments.

[0233] It should be noted that the modules or components described in the above embodiments can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more digital signal processors (DSPs), or one or more field-programmable gate arrays (FPGAs), etc. Furthermore, when a module is implemented through processing element scheduler code, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processors capable of calling program code, such as a controller. Additionally, these modules can be integrated together to implement a system-on-a-chip (SOC).

[0234] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).

[0235] The term "multiple" in this document refers to two or more. The term "and / or" describes a relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Furthermore, the character " / " generally indicates an "or" relationship between the preceding and following related objects; in formulas, " / " indicates a "division" relationship. Additionally, it should be understood that in the description of this application, words such as "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or order.

[0236] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application.

[0237] It is understood that, in the embodiments of this application, the order of the above-mentioned process numbers does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

Claims

1. A camera control method characterized by, The method is applied to an electronic device, the electronic device including a first camera module, the first camera module including a first lens group, a second lens group, a first image sensor, a light-blocking plate, and a prism; both the first lens group and the second lens group are telephoto lens groups, and the focal length of the first lens group is different from that of the second lens group; the method includes: The preview interface is displayed, in which the first camera module is in the first state; In response to the operation of switching the shooting focal length, the first camera module is put into the second state; When the first camera module is in the second state, in response to the operation of viewing the gallery on the preview interface, the gallery interface is displayed, wherein the first camera module remains in the second state; In the first state, the light-blocking plate is located on the optical path of the second lens group; in the second state, the light-blocking plate is located on the optical path of the first lens group; and in the second state, the prism is located on the optical path of the second lens group.

2. The method of claim 1, wherein, The light-blocking plate is used to block the light emitted from the first lens group or the second lens group.

3. The method according to claim 1 or 2, characterized in that, The prism is used to guide the light emitted from the first lens group or the second lens group onto the first image sensor.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: In response to the operation of returning to the preview interface, the first camera module is kept in the second state.

5. The method according to any one of claims 1 to 4, characterized in that, The focal length of the first lens group is less than the focal length of the second lens group; After displaying the gallery interface, the method further includes: In response to an operation triggering a transition from the gallery interface to a second interface, the first camera module transitions from the second state to the first state; wherein the second interface includes a desktop or other application interface, and the gallery interface displays the most recently captured image.

6. The method of claim 5, wherein, After the first camera module changes from the second state to the first state, the method further includes: in response to the operation of returning to the preview interface, displaying the preview interface, wherein the first camera module is in the first state; When the first camera module is in the first state, in response to the operation of viewing the gallery on the preview interface, the gallery interface is displayed, wherein the first camera module maintains the first state; In response to an operation that triggers a transition from the gallery interface to the second interface, the first camera module maintains the first state.

7. The method according to any one of claims 1 to 6, characterized in that, After the first camera module is put into the second state in response to the operation of switching the shooting focal length, the method further includes: In response to exiting the camera application, the first camera module is switched from the second state to the first state.

8. The method according to any one of claims 1 to 7, characterized in that, The electronic device further includes a second camera module, which includes a third lens group and a second image sensor. The focal length of the third lens group is less than that of the first lens group, and the focal length of the third lens group is less than that of the second lens group. The method further includes: When the first camera module is in the second state, in response to the operation of switching from the first zoom ratio to the second zoom ratio, the first camera module is switched from the second state to the first state, wherein the first zoom ratio corresponds to the second lens group and the second zoom ratio corresponds to the third lens group.

9. The method according to any one of claims 1 to 8, characterized in that, The method further includes: In response to the operation that triggers long exposure shooting, the first camera module remains unchanged during the long exposure shooting process and from the end of the long exposure shooting until the preview interface is displayed.

10. A camera control method characterized by, The method is applied to an electronic device, which includes a first camera module and a second camera module. The first camera module includes a first lens group, a second lens group, a first image sensor, a light-blocking plate, and a prism. Both the first and second lens groups are telephoto lens groups. The second camera module includes a third lens group and a second image sensor. The focal lengths of the first and second lens groups are different, and the focal length of the third lens group is less than that of the first lens group. The method includes: The preview interface is displayed, in which the first camera module is in the second state; In response to the operation of switching from a first zoom ratio to a second zoom ratio, the first camera module is changed from the second state to the first state, wherein the first zoom ratio corresponds to the second lens group and the second zoom ratio corresponds to the third lens group; In the first state, the light-blocking plate is located on the optical path of the second lens group; in the second state, the light-blocking plate is located on the optical path of the first lens group; and in the second state, the prism is located on the optical path of the second lens group.

11. The method of claim 10, wherein, The method further includes: In response to the operation that triggers long exposure shooting, the first camera module remains unchanged during the long exposure shooting process and from the end of the long exposure shooting until the preview interface is displayed.

12. A camera control method characterized by, The method is applied to an electronic device, the electronic device including a first camera module, the first camera module including a first lens group, a second lens group, a first image sensor, a light-blocking plate, and a prism; both the first lens group and the second lens group are telephoto lens groups, and the focal length of the first lens group is different from that of the second lens group; the method includes: The preview interface is displayed, in which the first camera module is in the first state; In response to the operation of switching the shooting focal length, the first camera module is put into the second state; When the first camera module is in the second state, in response to the operation of triggering long exposure shooting, the first camera module is kept in the second state during the long exposure shooting process and during the process from the end of the long exposure shooting until the preview interface is displayed; In the first state, the light-blocking plate is located on the optical path of the second lens group; in the second state, the light-blocking plate is located on the optical path of the first lens group; and in the second state, the prism is located on the optical path of the second lens group.

13. An electronic device, comprising: The electronic device includes: a first camera module, one or more processors, and a memory; The first camera module includes a first lens group, a second lens group, a first image sensor, a light-blocking plate, and a prism; both the first lens group and the second lens group are telephoto lens groups, and the focal length of the first lens group is different from that of the second lens group. The memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, which the one or more processors invoke to cause the electronic device to perform the following method: The preview interface is displayed, in which the first camera module is in the first state; In response to the operation of switching the shooting focal length, the first camera module is put into the second state; When the first camera module is in the second state, in response to the operation of viewing the gallery on the preview interface, the gallery interface is displayed, wherein the first camera module remains in the second state; In the first state, the light-blocking plate is located on the optical path of the second lens group; in the second state, the light-blocking plate is located on the optical path of the first lens group; and in the second state, the prism is located on the optical path of the second lens group.

14. The electronic device of claim 13, wherein, The light-blocking plate is used to block the light emitted from the first lens group or the second lens group.

15. The electronic device of claim 13 or 14, wherein, The prism is used to guide the light emitted from the first lens group or the second lens group onto the first image sensor.

16. The electronic device of any of claims 13 to 15, wherein, The one or more processors invoke the computer instructions to cause the electronic device to further perform the following method: In response to the operation of returning to the preview interface, the first camera module is kept in the second state.

17. The electronic device of any of claims 13 to 16, wherein, The focal length of the first lens group is less than the focal length of the second lens group; after displaying the gallery interface, the one or more processors invoke the computer instructions to cause the electronic device to further execute the following method: In response to an operation triggering a transition from the gallery interface to a second interface, the first camera module transitions from the second state to the first state; wherein the second interface includes a desktop or other application interface, and the gallery interface displays the most recently captured image.

18. The electronic device of claim 17, wherein, After the first camera module transitions from the second state to the first state, the one or more processors invoke the computer instructions to cause the electronic device to further perform the following method: In response to the operation of returning to the preview interface, the preview interface is displayed, wherein the first camera module is in the first state; When the first camera module is in the first state, in response to the operation of viewing the gallery on the preview interface, the gallery interface is displayed, wherein the first camera module maintains the first state; In response to an operation that triggers a transition from the gallery interface to the second interface, the first camera module maintains the first state.

19. The electronic device of any of claims 13 to 18, wherein, After the first camera module is put into the second state in response to the operation of switching the shooting focus, the one or more processors call the computer instructions to cause the electronic device to further perform the following method: In response to exiting the camera application, the first camera module is switched from the second state to the first state.

20. The electronic device according to any one of claims 13 to 19, characterized in that, The electronic device further includes a second camera module, which includes a third lens group and a second image sensor. The focal length of the third lens group is less than the focal length of the first lens group, and the focal length of the third lens group is less than the focal length of the second lens group. The one or more processors invoke the computer instructions to cause the electronic device to further perform the following method: When the first camera module is in the second state, in response to the operation of switching from the first zoom ratio to the second zoom ratio, the first camera module is switched from the second state to the first state, wherein the first zoom ratio corresponds to the second lens group and the second zoom ratio corresponds to the third lens group.

21. The electronic device according to any one of claims 13 to 20, characterized in that, The one or more processors invoke the computer instructions to cause the electronic device to further perform the following method: In response to the operation that triggers long exposure shooting, the first camera module remains unchanged during the long exposure shooting process and from the end of the long exposure shooting until the preview interface is displayed.

22. An electronic device, characterized in that, The electronic device includes: a first camera module, a second camera module, one or more processors and a memory; The first camera module includes a first lens group, a second lens group, a first image sensor, a light-blocking plate, and a prism; both the first lens group and the second lens group are telephoto lens groups, and the second camera module includes a third lens group and a second image sensor; the focal length of the first lens group is different from the focal length of the second lens group, and the focal length of the third lens group is less than the focal length of the first lens group and less than the focal length of the second lens group. The memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, which the one or more processors invoke to cause the electronic device to perform the following method: The preview interface is displayed, in which the first camera module is in the second state; In response to the operation of switching from a first zoom ratio to a second zoom ratio, the first camera module is changed from the second state to the first state, wherein the first zoom ratio corresponds to the second lens group and the second zoom ratio corresponds to the third lens group; In the first state, the light-blocking plate is located on the optical path of the second lens group; in the second state, the light-blocking plate is located on the optical path of the first lens group; and in the second state, the prism is located on the optical path of the second lens group.

23. The electronic device according to claim 22, characterized in that, The one or more processors invoke the computer instructions to cause the electronic device to further perform the following method: In response to the operation that triggers long exposure shooting, the first camera module remains unchanged during the long exposure shooting process and from the end of the long exposure shooting until the preview interface is displayed.

24. An electronic device, characterized in that, The electronic device includes a first camera module, one or more processors, and memory; The first camera module includes a first lens group, a second lens group, a first image sensor, a light-blocking plate, and a prism; both the first lens group and the second lens group are telephoto lens groups, and the focal length of the first lens group is different from that of the second lens group. The memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code including computer instructions, which the one or more processors invoke to cause the electronic device to perform the following method: The preview interface is displayed, in which the first camera module is in the first state; In response to the operation of switching the shooting focal length, the first camera module is put into the second state; When the first camera module is in the second state, in response to the operation of triggering long exposure shooting, the first camera module is kept in the second state during the long exposure shooting process and during the process from the end of the long exposure shooting until the preview interface is displayed; In the first state, the light-blocking plate is located on the optical path of the second lens group; in the second state, the light-blocking plate is located on the optical path of the first lens group; and in the second state, the prism is located on the optical path of the second lens group.

25. A chip, characterized in that, The chip is applied to an electronic device, the chip including one or more processors, the one or more processors being configured to invoke computer instructions to cause the electronic device to perform the method as described in any one of claims 1 to 12.

26. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in any one of claims 1 to 12.

27. A computer program product, characterized in that, The computer program product includes computer program code that, when run on an electronic device, causes the electronic device to perform the method as described in any one of claims 1 to 12.