Shooting method, readable medium, and electronic device

By automatically matching logical cameras and physical cameras in foldable devices through system software, the problem of increased application development costs is solved and the user experience is improved.

CN116489494BActive Publication Date: 2025-09-16HONOR DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310369097.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-09-16
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

In foldable electronic devices, applications need to determine the physical camera used for the logical front/rear camera based on the device form factor, which increases development costs.

Method used

The system software/service/module of the electronic device determines the physical camera corresponding to the logical camera according to the folding shape, thereby reducing the development cost of the application.

Benefits of technology

This reduces the workload of application developers in determining the physical camera and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116489494B_ABST
    Figure CN116489494B_ABST
Patent Text Reader

Abstract

The present application relates to the field of terminal technology, and discloses a shooting method, a readable medium, and an electronic device. The electronic device includes a first screen and multiple physical cameras, and the first screen is a folding screen; the method includes: a first application receives a first shooting instruction from a second application, and the first shooting instruction includes a perspective identifier for front shooting; when the first screen is in an unfolded state, in response to the first shooting instruction, the first application activates the first physical camera; when the first screen is in a folded state, in response to the first shooting instruction, the first application activates the second physical camera; the second application completes the first shooting instruction through the physical camera activated by the first application; wherein the second application is independent of the first application. In this way, the developer of the second application does not need to develop instructions for determining the physical camera for responding to the same shooting perspective identifier according to the folding form of the first screen, thereby reducing development costs.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The application number of the original application is 202111651361.9, and the original application date is December 30, 2021. The entire content of the original application is incorporated into this application by reference. Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to a shooting method, a readable medium, and an electronic device. Background Art

[0003] With the development of flexible screen technology, foldable electronic devices equipped with flexible screens are becoming increasingly popular. Foldable electronic devices are typically equipped with multiple physical cameras. When the device is in different configurations, such as folded or unfolded, the logical front / logical rear cameras used by the device may use different physical cameras. Therefore, applications need to determine the physical camera used for the logical front / logical rear cameras based on the device's configuration. Summary of the Invention

[0004] In view of this, embodiments of the present application provide a shooting method, a readable medium, and an electronic device. By having the electronic device's system software / service / module determine the physical camera corresponding to the logical camera to be launched by an application based on the folded form of the electronic device, the development cost of the application can be reduced.

[0005] In a first aspect, an embodiment of the present application provides a shooting method, which is applied to an electronic device, wherein the electronic device includes a first screen and a second screen located on different sides of the electronic device, wherein the first screen is a folding screen, and at least one first physical camera is provided on the same side of the first screen, and at least one second physical camera is provided on the same side of the second screen; and the method includes: a first application receives a shooting instruction from a second application, and the shooting instruction includes a shooting perspective identifier, and the shooting perspective includes front shooting and rear shooting; the first application determines the physical camera used to complete the shooting instruction based on the shooting perspective identifier, the folding form of the first screen, and the pre-stored correspondence between the physical cameras and the shooting visual identifiers of the first screen in different folding forms; the second application completes the shooting instruction through the determined physical camera; wherein the second application is independent of the first application.

[0006] In an embodiment of the present application, a first application in an electronic device (e.g., the system software / service / module / system application of the electronic device, such as the camera provider below) determines the physical camera corresponding to the same shooting angle identifier (i.e., the logical camera identifier below, such as the logical front camera identifier, the logical rear camera identifier, etc.) according to the folding state of the folding screen (first screen) of the electronic device, so that the second application can capture images / videos through the determined corresponding physical camera. Therefore, the developer of the second application does not need to develop instructions for determining the physical camera that responds to the same shooting angle identifier according to the folding form of the folding screen of the electronic device, thereby reducing development costs.

[0007] In a possible implementation of the first aspect above, the first application determines the physical camera used to complete the shooting instruction based on the shooting perspective identifier, the folding form of the first screen, and the pre-stored correspondence between the physical cameras and the shooting visual identifiers of the first screen in different folding forms, including: when the shooting perspective identifier is a front-facing shooting identifier and the first screen is in an unfolded state, the first application determines that the shooting instruction is completed through the first physical camera; when the shooting perspective identifier is a front-facing shooting identifier and the first screen is in a folded state, the second application determines that the shooting instruction is completed through the second physical camera.

[0008] In a possible implementation of the first aspect, the method further includes: when the folding form of the first screen changes, the first application switches the physical camera used to complete the shooting instruction.

[0009] In a possible implementation of the first aspect above, the first application switches the physical camera used to complete the shooting instruction when the folding form of the first screen changes, including: when the first screen is switched from an unfolded state to a folded state, the first application switches the physical camera used to complete the shooting instruction from the first physical camera to the second physical camera; when the first screen is switched from a folded state to an unfolded state, the first application switches the physical camera used to complete the shooting instruction from the second physical camera to the first physical camera.

[0010] That is, while the second application is capturing images or videos using the determined physical camera, if the folded shape of the first screen of the electronic device changes, the first application can switch the corresponding physical camera based on the changed folded shape of the electronic device. This prevents the second application from still capturing images or videos using the physical camera corresponding to the folded shape before the electronic device changes, thus improving the user experience.

[0011] In a possible implementation of the first aspect above, the electronic device also includes at least one third physical camera arranged on a different side from the first screen; and the method also includes: when the shooting angle is identified as a rear shooting indicator and the first screen is in an unfolded state, the first application determines that the shooting instruction is completed through the third physical camera and / or the second physical camera; when the shooting angle is identified as a rear shooting indicator and the first screen is in a folded state, the first application determines that the shooting instruction is completed through the third physical camera.

[0012] That is, when the shooting perspective of the electronic device in the second application is rear shooting (that is, when the logical rear camera is used to capture images or videos in the following text), the third physical camera is used to complete the shooting instruction when the first screen is in the folded state, and the third physical camera and / or the second physical camera are used to complete the shooting instruction when the first screen is in the unfolded state.

[0013] In a possible implementation of the first aspect, the method further includes:

[0014] When the first application encounters an exception and recovers, the physical camera used to complete the shooting instruction is re-determined based on the shooting perspective identifier, the folded form of the first screen, and the pre-stored correspondence between the physical cameras and the shooting perspective identifiers in different forms of the first screen.

[0015] That is, when an electronic device encounters an abnormality in the first application and recovers, for example, after the first application can no longer provide services and restarts, the first application can re-determine the physical camera used to complete the shooting instruction based on the shooting angle identifier, the folded form of the first screen, and the pre-stored correspondence between the physical cameras and the shooting angle identifiers in different forms of the first screen, thereby avoiding the second application being unable to capture images or videos through the correct physical camera due to the restart of the first application, thereby improving the user experience.

[0016] In a possible implementation of the first aspect, the method further includes:

[0017] The first application obtains the folding state of the first screen from the third application.

[0018] In a possible implementation of the first aspect, the operating system of the electronic device includes a hardware abstraction layer and an application framework layer; the first application is set in the hardware abstraction layer; and the third application is set in the application framework layer.

[0019] In a possible implementation of the first aspect, the second application includes any one of the following applications: a camera application, an instant messaging application, a browser application, and a video conferencing application.

[0020] In a second aspect, an embodiment of the present application provides a readable medium, which contains instructions. When the instructions are executed by a processor of an electronic device, the electronic device implements any one of the shooting methods provided by the above-mentioned first aspect and possible implementations of the above-mentioned first aspect.

[0021] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a plurality of physical cameras;

[0022] A memory for storing instructions executed by one or more processors of an electronic device; and at least one processor for running the instructions so that the electronic device selects at least one from a plurality of physical cameras to complete the shooting instructions through any one of the shooting methods provided by the first aspect and any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 According to some embodiments of the present application, a schematic structural diagram of a foldable mobile phone 100 is shown;

[0024] Figure 2A According to some embodiments of the present application, a front view of a mobile phone 100 in an unfolded state ( Figure 1 A schematic diagram of the side shown;

[0025] Figure 2B According to some embodiments of the present application, a back side ( Figure 1 The schematic diagram of the B / C side shown is below the front side;

[0026] Figure 3A According to some embodiments of the present application, a front view of a mobile phone 100 in a folded state ( Figure 1 Schematic diagram of surface C shown;

[0027] Figure 3B According to some embodiments of the present application, a back side ( Figure 1 Schematic diagram of side B shown;

[0028] Figure 4A According to some embodiments of the present application, a schematic diagram of a scenario in which a user takes a selfie with a mobile phone 100 in an unfolded state is shown;

[0029] Figure 4B According to some embodiments of the present application, a schematic diagram of a scenario in which a user takes a selfie using a mobile phone 100 in a folded state is shown;

[0030] Figure 5 According to some embodiments of the present application, a schematic flow chart of a shooting method is shown;

[0031] Figure 6 According to some embodiments of the present application, a schematic diagram of the software architecture of a mobile phone 100 is shown;

[0032] Figure 7 According to some embodiments of the present application, a schematic diagram of an interactive process of a shooting method is shown;

[0033] Figure 8A According to some embodiments of the present application, a schematic diagram of a display interface of a mobile phone 100 when a user switches to a logical front camera is shown;

[0034] Figure 8B According to some embodiments of the present application, a schematic diagram of a display interface when the mobile phone 100 starts the camera 011 is shown;

[0035] Figure 9 According to some embodiments of the present application, a schematic diagram of an interactive process of a shooting method is shown;

[0036] Figure 10 According to some embodiments of the present application, a structural diagram of a mobile phone 100 is shown. DETAILED DESCRIPTION

[0037] Illustrative embodiments of the present application include, but are not limited to, a photographing method, a readable medium, and an electronic device.

[0038] The technical solutions of the embodiments of the present application are described below with reference to the accompanying drawings.

[0039] To facilitate understanding, an electronic device to which the shooting method provided in some embodiments of the present application is applicable is first introduced.

[0040] It is understood that the physical camera referred to in this application refers to a physical camera installed on an electronic device or connected to an electronic device. In some embodiments, different physical cameras / camera units typically have different physical camera identifiers, and applications in the electronic device can use the physical camera identifiers to call the corresponding physical camera to collect image data.

[0041] It can be understood that compared with the above-mentioned physical camera, the logical camera mentioned in this application is a conceptual camera defined for different usage scenarios. According to the application with image acquisition or video acquisition function used by the user on the electronic device, when acquiring images or videos, the shooting direction of the physical camera is different. The logical camera can be divided into a logical front camera (for example, a camera with a shooting direction facing outward from the display screen currently used by the user in the electronic device, that is, a front shooting angle of view) and a logical rear camera (for example, a camera with a shooting direction facing inward from the display screen currently used by the user in the electronic device, that is, a rear shooting angle of view).

[0042] It can be understood that in other embodiments, the logical camera may also include other types of logical cameras, such as a logical depth camera for capturing 3D images determined according to the function of the camera, which is not limited here.

[0043] Specifically, for example, Figure 1 According to some embodiments of the present application, a schematic structural diagram of a foldable mobile phone 100 is shown; Figure 2A According to some embodiments of the present application, a front view of a mobile phone 100 in an unfolded state ( Figure 1 A schematic diagram of the side shown; Figure 2B According to some embodiments of the present application, a back side ( Figure 1 Schematic diagram of B / C surface shown); Figure 3A According to some embodiments of the present application, a front view of a mobile phone 100 in a folded state ( Figure 1 Schematic diagram of surface C shown; Figure 3B According to some embodiments of the present application, a back side ( Figure 1 Schematic diagram of side B).

[0044] When the mobile phone 100 is in the unfolded state, that is, when the folding screen 1941 is in the unfolded state, refer to Figure 1 and Figure 2A , the logical front camera of mobile phone 100 is camera unit 1931, reference Figure 2B , the logical rear camera of the mobile phone 100 is the camera unit 1933; and when the mobile phone 100 is in the folded state, that is, when the folding screen 1941 is in the folded state, reference Figure 3A , the logical front camera of mobile phone 100 is camera unit 1932, reference Figure 3B The logical rear camera of the mobile phone 100 is the camera unit 1933. Therefore, the same physical camera can be used as a logical front camera or a logical rear camera in different usage scenarios.

[0045] It can be understood that a foldable screen is a foldable and bendable display screen made of flexible materials, such as a flexible screen made of organic light-emitting diodes (OLED).

[0046] It is understood that the structure and form of the mobile phone 100 are only examples. In other embodiments, the mobile phone 100 may also be other forms of foldable electronic devices, such as Figure 1 The mobile phone 100 shown is folded toward the B / C surface, but this is not limited here.

[0047] It can be understood that the aforementioned unfolded state and folded state of the mobile phone 100 are only examples. In some embodiments, when the angle between the left half screen and the right half screen of the display screen 1941 is greater than the preset unfolding angle, it can be determined that the mobile phone 100 is in the unfolded state; when the angle between the left half screen and the right half screen of the display screen 1941 is less than the preset folding angle, it can be determined that the mobile phone 100 is in the folded state. No limitation is made here.

[0048] It can be understood that the distribution of the camera units of the aforementioned mobile phone 100 is only an example. In other embodiments, the mobile phone 100 may include more or fewer camera units, and the camera units may also be set at other positions of the mobile phone 100, which is not limited here.

[0049] It can be understood that a camera unit may include any number of cameras. For example, the camera unit 1931 may include a common camera for capturing 2D images and a depth camera for capturing 3D images.

[0050] As mentioned above, when the mobile phone 100 is in different forms, the logical front camera of the mobile phone 100 uses different physical cameras, so the application installed on the mobile phone 100 should select the corresponding physical camera as the logical front camera of the mobile phone 100 according to the form of the mobile phone 100. Figure 4A and Figure 4B When a user uses the camera application to take a selfie, the camera application selects camera unit 1931 as the logical front camera when the mobile phone 100 is in the unfolded state, that is, the user's image is obtained through camera unit 1931; when the mobile phone 100 is in the folded state, the camera application selects camera unit 1932 as the logical front camera, that is, the user's image is obtained through camera unit 1932.

[0051] That is to say, in order to ensure that the applications installed on the mobile phone 100 can use the corresponding physical camera to capture images or videos when the mobile phone 100 is in different states (folded state and unfolded state), the application developers need to integrate the detection of the state of the mobile phone 100 for each application that uses the camera of the mobile phone 100, and select the corresponding physical camera as the logical camera according to the state of the mobile phone 100, which increases the development cost of the application. Figure 4A and Figure 4BTo ensure that the camera application can use the physical camera set in the mobile phone 100 on the same side of the display screen currently used by the user to capture images or videos when the user is taking selfies, whether the mobile phone 100 is in the unfolded state or the folded state, the developer needs to integrate the acquisition of the form of the mobile phone 100 in the camera application, and determine the instructions of the physical camera corresponding to each logical camera in the current form of the mobile phone 100 based on the form of the mobile phone 100 and the correspondence between each logical camera and each physical camera in different forms of the mobile phone 100, so that during the operation of the camera application, it can capture images or videos through the camera unit 1931 when the mobile phone 100 is in the folded state, and capture images or videos through the camera unit 1932 when the mobile phone 100 is in the unfolded state.

[0052] In view of this, an embodiment of the present application provides a method for shooting, in which the system software of the mobile phone 100, such as a camera provider, establishes a correspondence between the logical front camera and the physical camera, and a correspondence between the logical rear camera and the physical camera when the mobile phone 100 is in different forms. In this way, when an application in the mobile phone 100 wants to capture images or videos through the logical front camera or the logical rear camera, it only needs to provide the identification of the logical front camera or the logical rear camera to the system software of the mobile phone 100. The system software of the mobile phone 100 can determine the physical camera for the application to capture images or videos based on the aforementioned correspondence, and start the physical camera through the physical camera identification of the physical camera, without the need for the application developer to separately write instructions for the application to obtain the form of the mobile phone 100 and determine the physical camera corresponding to each logical camera according to the form of the mobile phone 100, thereby reducing the development cost of the application.

[0053] For example, the mobile phone 100 includes three physical camera units, namely, camera unit 1931, camera unit 1932, and camera unit 1933. The mobile phone 100 processes in different modes. The correspondence between each logical camera and each physical camera is shown in Table 1:

[0054] Table 1: Correspondence between logical cameras and physical cameras when the mobile phone 100 is in different states

[0055] Mobile Phone 100 Form Logical front camera (ID: 1) Logical rear camera (ID: 0) Expanded state Camera unit 1931 Camera unit 1933 Folded state Camera unit 1932 Camera unit 1933

[0056] As shown in Table 1, the system software of the mobile phone 100 can set the identifier of the logical front camera (front shooting identifier) ​​to 1 and the identifier of the logical rear camera (rear shooting identifier) ​​to 0, so that the application on the mobile phone 100 can capture images or videos through the logical front camera of the mobile phone 100, for example, Figure 4A and Figure 4BIn the scenario where the user takes a selfie through the camera application, the camera application provides the logical front camera flag "1" to the system software of the mobile phone 100, which can be used to Figure 4A When the mobile phone 100 is in the unfolded state, the camera unit 1931 is used to capture images or videos; Figure 4B When in the folded state shown, images or videos are captured through the camera unit 1932, and the developer of the camera application does not need to integrate instructions for capturing images or videos through the camera unit 1931 when the mobile phone 100 is in the unfolded state and for capturing images or videos through the camera unit 1932 when the mobile phone 100 is in the folded state into the camera application, thereby reducing the development cost of the camera application.

[0057] It can be understood that the correspondence between each logical camera and each physical camera when the mobile phone 100 shown in Table 1 is in different forms is only an example. In other embodiments, there may be other correspondences. For example, when the mobile phone 100 is in the unfolded state, the logical rear camera may also include the camera unit 1932, which is not limited here.

[0058] It can be understood that the aforementioned logical front camera identifier can be set to 1 is only an example. In other embodiments, the logical front camera identifier can also be other identifiers, which is not limited here.

[0059] It can be understood that in other embodiments, when the mobile phone 100 is in different forms and uses different physical cameras as logical rear cameras, the system software of the mobile phone 100 can also provide a unified logical rear camera identifier for the physical camera that can be used as the logical rear camera, such as 0, so that the application in the mobile phone 100 can capture images or videos through the corresponding physical camera when the mobile phone 100 is in different forms according to the logical rear camera identifier, and there is no limitation here.

[0060] It can be understood that the camera provider is a service in the system software of the mobile phone 100 that can provide applications in the mobile phone 100 with interfaces for accessing the physical cameras / camera units of the mobile phone 100. The following describes the technical solution of the embodiment of the present application by taking the system software of the embodiment of the present application as the camera provider as an example.

[0061] Specifically, Figure 5 According to some embodiments of the present application, a flow chart of a shooting method implemented by a camera provider is shown. Figure 5 As shown, the process includes the following steps:

[0062] S501: Receive a request from an application to start a camera.

[0063] That is to say, when the camera provider receives a request from an application to start the camera, it triggers the shooting method provided in the embodiment of the present application.

[0064] It is understood that the request to start the camera sent by the application includes the logical camera identifier to be started, such as the logical front camera identifier, the logical rear camera identifier, the logical depth camera identifier, etc. In some embodiments, the logical front camera identifier can be set to 1 and the logical rear camera identifier can be set to 0.

[0065] Specifically, for Figure 4A and Figure 4B In the scenario shown, the camera provider may receive a request for starting a camera from a camera application that includes a logical front-facing camera identifier 1.

[0066] S502: Obtain the form of the mobile phone 100, and determine the physical camera to be started according to the form of the mobile phone 100 and the logical camera identifier.

[0067] That is to say, after receiving the request to start the camera sent by the application, the camera provider obtains the form of the mobile phone 100, and determines the physical camera corresponding to the logical camera identifier in the current form based on the form of the mobile phone 100 and the logical camera identifier in the request to start the camera, as well as the correspondence between the logical cameras and the physical cameras in different forms of the mobile phone 100.

[0068] For example, for Figure 4A and Figure 4B In the scenario shown, the camera application can include the logical front camera ID 1 in the start camera request sent to the camera provider. Figure 4A , when the camera provider detects that the mobile phone 100 is in the unfolded state, it determines that the physical camera corresponding to the logical front camera identifier 1 is the camera unit 1931; Figure 4B When the camera provider detects that the mobile phone 100 is in a folded state, it determines that the physical camera corresponding to the logical front camera identifier 1 is the camera unit 1932.

[0069] It can be understood that in other embodiments, when the logical camera to be started by the application is the logical rear camera (identified as 0), the camera provider can also determine that the physical camera corresponding to the logical camera identification 0 is the camera unit 1933 when the mobile phone 100 is in the folded state; when the mobile phone 100 is in the unfolded state, the physical camera corresponding to the logical camera identification 0 is determined to be the camera unit 1933 and / or camera unit 1932, that is, when the mobile phone 100 is in the unfolded state, the application can capture images or videos through the camera unit 1933 or the camera unit 1932, or can capture images or videos through the collaborative shooting of the camera unit 1933 and the camera unit 1932.

[0070] S503: Start the determined physical camera.

[0071] That is, the camera provider starts the corresponding physical camera according to the physical camera identifier of the physical camera determined in step S502, and provides an interface for the application to capture images or videos through the physical camera.

[0072] For example, in Figure 4A In the scenario shown, the camera provider can start the camera unit 1931 and provide an interface for the camera application to capture images or videos through the camera unit 1931; Figure 4B In the scenario shown, the camera provider can start the camera unit 1932 and provide an interface for the camera application to capture images or videos through the camera unit 1932.

[0073] It can be understood that after the camera provider starts the corresponding physical camera and provides an interface for the application to collect images or videos through the physical camera, the application can collect images or videos through the physical camera.

[0074] It can be understood that the process of executing the aforementioned steps S501 to S503 by the camera provider is only an example. In other embodiments, it can also be executed by other applications / modules / services in the mobile phone 100, such as application software located at the application layer, services located at the application framework layer, etc., which are not limited here.

[0075] It can be understood that the execution order of the aforementioned steps S501 to S503 is only an example. In other embodiments, other orders may be adopted, and some steps may be combined or split, which is not limited here.

[0076] Through the method provided in the embodiment of the present application, the application in the mobile phone 100 can capture images or videos through the corresponding physical camera when the mobile phone 100 is in different forms through the same logical camera identifier, without the need for the application developer to integrate instructions for determining the physical camera corresponding to each logical camera according to the form of the mobile phone 100 into the application, thereby reducing the development cost of the application.

[0077] For ease of understanding, the following introduces a software architecture of a mobile phone 100 suitable for the shooting method provided in an embodiment of the present application.

[0078] Specifically, Figure 6 According to some embodiments of the present application, a schematic diagram of the software structure of the mobile phone 100 is shown.

[0079] refer to Figure 6 The software architecture of the mobile phone 100 includes an application layer 01, an application framework layer 02, a hardware abstraction layer 03, and a kernel layer 04, wherein:

[0080] The application layer 01 includes applications on the mobile phone 100, such as a camera and / or third-party applications 011 that can capture images or videos through the camera of the mobile phone 100. The camera and / or third-party applications 011 can send a camera startup request to the camera service 025 in the application framework layer 02 to obtain an access interface through the physical camera of the mobile phone 100. In some embodiments, the camera and / or third-party applications 011 include but are not limited to camera applications, instant messaging applications, browser applications, video conferencing applications, etc. As previously described, the request to start the camera can include the identifier of the logical camera to be started, such as the logical front camera identifier 1, the logical rear camera identifier 0, etc.

[0081] It is understandable that in other implementations, when there is only one physical camera corresponding to the logical camera, the camera startup request may also include the physical camera identifier, which is not limited here.

[0082] It is understandable that in other embodiments, the application layer 01 may also include more application programs, such as "information", "calendar", "memo", etc., which are not limited here.

[0083] The application framework layer 02 provides an application programming interface (API) and programming framework for the applications of the application layer 01, so that the applications can interact with the services / applications / modules / drivers in the hardware abstraction layer 03 and the kernel layer 04. In some embodiments, the application framework layer 02 may include:

[0084] The screen folding management (HwFoldScreenManager) 021 can obtain the shape of the mobile phone 100 from the data of each sensor based on the sensor service (SensorService) 022, and send the shape to the system service management 023, so that each system service or application can obtain the folding (screen) shape of the mobile phone 100.

[0085] In some embodiments, when the screen folding management 021 determines that the form of the mobile phone 100 has changed, for example, when the mobile phone 100 has switched from an unfolded state to a folded state, it can send a notification of the form change of the mobile phone 100 to each service / module in the system service management (SystemManager) 023 so that the system services / applications can respond to the notification. For example, when the camera provider 032 receives a notification that the mobile phone 100 has switched from an unfolded state to a folded state, it switches the physical camera corresponding to the logical front camera identifier 1 from camera unit 1931 to camera unit 1932.

[0086] The sensor service 022 is used to provide an interface for applications / services in the mobile phone 100 to obtain sensor data of the mobile phone 100. In some embodiments, the sensor service 022 may include a posture sensor service (Posture Sensor) 0221, a hinge sensor service (Hinge Sensor) 0222, and a Hall sensor service (Hall Sensor) 0223. The posture sensor service 0221 can obtain the data of the gyroscope and thereby determine the rotation angle of the mobile phone 100 based on the data. The hinge sensor service 0222 can determine the form of the mobile phone 100, such as the folding angle, through the angle determination unit 031 and the hinge sensor driver 041. The Hall sensor service 0223 can obtain the data of the Hall sensor of the mobile phone 100 through the Hall sensor driver 042. In some embodiments, the data of the Hall sensor can be used to determine the form of the mobile phone 100.

[0087] It is understandable that in other embodiments, the sensor service 022 may also include more or fewer sensor services, which is not limited here.

[0088] System Service Management 023 is used to manage and run various services in the mobile phone 100. For example, in some embodiments, System Service Management 023 may include a camera service proxy (HwCameraServiceProxy) 0231 and a camera folding screen extension module (HwCameraFoldExImpl) 0232. Camera Service Proxy 0231 is used to start the camera service (Camera Service) 025. Camera folding screen extension module 0232 is used to obtain the state of the mobile phone 100 from the screen folding management 021 and send the state of the mobile phone 100 to the camera post-processing 024.

[0089] It is understandable that in other embodiments, the system service 023 may also include more or fewer services, which is not limited in the embodiments of the present application.

[0090] The camera post-processing (Postcamera) 024 is used to provide an interactive interface between the camera folding screen expansion module 0232 and the hardware abstraction layer (HAL) 03. For example, the camera post-processing 024 can receive the state of the mobile phone 100 sent by the camera folding screen expansion module and forward the state of the mobile phone 100 to the camera provider 032 in the hardware abstraction layer 03 through the hardware abstraction layer interface definition language (HAL Interface Definition Language, HIDL).

[0091] The camera service 025 is used to provide an interface for accessing the camera provider 032 to the application in the application layer 01. For example, in some embodiments, the camera service 025 can forward the identifier of the camera to be started, such as the logical front camera identifier 1 and the logical rear camera identifier 0, sent by the camera / third-party application 011 to the camera service 025 to the camera provider 032.

[0092] It is understandable that in other embodiments, the application framework layer 02 may also include more or fewer modules, which is not limited in the embodiments of the present application.

[0093] The hardware abstraction layer 03 is used to provide an access interface to the hardware of the mobile phone 100 to the application framework layer 02 or the application layer 01. For example, in some embodiments, the hardware abstraction layer 03 may include an angle determination unit 031 and a camera provider 032. The angle determination unit 031 is used to determine the folding angle of the mobile phone 100 based on data from the hinge sensor. The camera provider 032 is used to determine the physical camera corresponding to the logical camera identifier based on the logical camera identifier or physical camera identifier sent by the application or camera service 025 in the application layer 01, the form of the mobile phone 100 obtained from the camera post-processing 024, and the correspondence between each logical camera and each physical camera, and provide the application layer 01 with an access interface to the physical camera.

[0094] It is understandable that in other embodiments, the hardware abstraction layer 03 may further include more modules, such as Bluetooth, audio, and video, etc., which are not limited here.

[0095] The kernel layer 04 is used to provide an access interface to the hardware of the mobile phone 100 to the hardware abstraction layer 03, the application framework layer 02, and the application layer 01, so that the hardware abstraction layer 03, the application framework layer 02, and the application layer 01 can obtain data from the hardware of the mobile phone 100 or send data to the hardware of the mobile phone 100 through this interface. For example, in some embodiments, the kernel layer 04 may include a hinge sensor driver 041, a Hall sensor driver 042, a camera unit 1931 driver 043, a camera unit 1932 driver 044, and a camera unit 1933 driver 045. Each of these driver modules can be used to drive the corresponding hardware so that applications / services / modules in the mobile phone 100 can obtain data from the corresponding hardware or send data through the corresponding hardware. For example, the camera unit 1931 driver 043 can provide image data captured by the camera unit 1931 to the camera / third-party application 011.

[0096] I understand. Figure 6 The software architecture of the mobile phone 100 shown is only an example. In other embodiments, the software architecture of the mobile phone 100 may include more or fewer modules, merge or split some modules, change the positions of some modules, or adopt other software architectures, which is not limited in the embodiments of the present application.

[0097] In order to make the technical solution of this application clearer, the following Figure 6 The software architecture diagram of the mobile phone 100 shown introduces the interactive process of the shooting method provided in the embodiment of the present application.

[0098] Specifically, Figure 7 According to some embodiments of the present application, a schematic diagram of an interactive process of a shooting method is shown. Figure 7As shown, the interaction process includes the following steps.

[0099] S701: The system service management 023 starts the camera service 025. That is, when the mobile phone 100 is started, the system service management 023 starts the camera service 025 through the camera service agent 0231.

[0100] It is understandable that in some embodiments, only after the camera service 025 is started, the application in the mobile phone 100 can send a request to start the camera to the camera provider 032 through the camera service 025.

[0101] S702: The system service management 023 starts the folding screen service 021. That is, when the mobile phone 100 is started, the system service management 023 starts the screen folding management 021 so that other services / modules / applications can obtain the form of the mobile phone 100 provided by the screen folding management 021 by registering a monitoring service in the screen folding management 021.

[0102] It can be understood that in some embodiments, the system service management 023 can also start other services that implement related functions of the mobile phone 100 when the mobile phone 100 is started, such as the camera folding screen expansion module 0232, etc., which is not limited here.

[0103] S703: The system service management 023 sends a startup completion notification to the camera service agent 0231.

[0104] When the mobile phone 100 is booted up, that is, all related services in the mobile phone 100 are started, for example, the camera service 025 and the screen folding management 021 are started up, the system service management 023 sends a notification of boot completion to the camera service agent 0231.

[0105] It can be understood that in some embodiments, the system service management 023 can also send the power-on completion notification to other services / applications / modules, etc., for example, to the camera service 025, the camera provider 032, the camera folding screen expansion module 0232, etc.

[0106] S704: The camera service agent 0231 sends a power-on completion notification to the camera folding screen expansion module 0232.

[0107] After receiving the notification of the completion of the startup of the mobile phone 100 sent by the system service management 023, the camera service agent 0231 forwards the startup completion notification to the camera folding screen expansion module 0232.

[0108] It is understandable that in other embodiments, the power-on completion notification can also be sent directly by the system service management 023 to the camera folding screen expansion module 0232, which is not limited here.

[0109] S705: The camera folding screen expansion module 0232 registers the form of the monitored mobile phone 100 with the screen folding management 021.

[0110] After receiving the notification that the mobile phone 100 has been turned on, the camera folding screen expansion module 0232 determines that the screen folding management 021 has been started, and registers with the screen folding management 021 to monitor the form of the mobile phone 100.

[0111] It can be understood that after the camera folding screen expansion module 0232 registers to monitor the shape of the mobile phone 100 with the screen folding management 021, it can obtain the shape of the mobile phone 100 through the screen folding management 021.

[0112] It can be understood that in some embodiments, after the camera folding screen expansion module 0232 registers to monitor the shape of the mobile phone 100 with the screen folding management 021, the screen folding management 021 will actively send a notification of the change in the shape of the mobile phone 100 to the camera folding expansion module 0232 when the shape of the mobile phone 100 changes.

[0113] S706: The camera folding screen expansion module 0232 obtains the shape of the mobile phone 100 from the screen folding management 021 and sends it to the camera post-processing 024.

[0114] After the camera folding screen expansion module 0232 successfully registers and monitors the form of the mobile phone 100 in the screen folding management 021, it obtains the form of the mobile phone 100 and sends it to the camera post-processing 024.

[0115] S707 : The camera post-processing 024 sends the state of the mobile phone 100 to the camera provider 032 .

[0116] That is, when the camera post-processing 024 receives the form of the mobile phone 100, it forwards it to the camera provider 032.

[0117] S708: The camera 011 sends a request to the camera service 025 to start the camera.

[0118] That is, the camera 011 sends a request to start the camera to the camera service 025. The request to start the camera may include the logical camera identifier of the camera to be started. For example, if the camera to be started by the camera 011 is the logical front camera, the request to start the camera may include the logical front camera identifier, such as 1.

[0119] Specifically, for example, refer to Figure 8A When the camera 011 detects the user's operation on switching the logical front camera control 81, it sends a request to the camera service 025 to start the logical front camera, and the request may include the front camera identifier 1.

[0120] It can be understood that in some embodiments, when the default logical camera of the camera 011 or the logical camera when the camera 011 is last closed is the logical front camera, reference Figure 8B After the user starts the camera 011 application by clicking the camera 011 icon 82, the camera 011 sends a request to the camera service 025 to start the logical front camera.

[0121] S709: The camera service 025 sends a request to the camera provider 032 to start the camera.

[0122] After receiving the request to start the camera sent by the camera 011, the camera service 025 forwards the request to the camera provider 032.

[0123] S710: The camera provider 032 starts the corresponding physical camera according to the camera ID and the form of the mobile phone 100.

[0124] The camera provider 032 first determines whether the physical camera to be started is the camera unit 1931 or the camera unit 1932 according to the camera identifier to be started in the camera start request, such as the logical front camera identifier 1; then determines whether to start the camera unit 1931 or the camera unit 1932 according to the corresponding relationship between the logical front cameras and the physical cameras in different forms of the mobile phone 100, for example, Figure 4A , when the mobile phone 100 is in the unfolded state, the physical camera to be started is determined to be the camera unit 1931. For example, Figure 4B When the mobile phone 100 is in a folded state, the physical camera to be started is determined to be the camera unit 1932; finally, the determined physical camera is started, and an interface for accessing the determined physical camera is provided to the camera 011, so that the camera 011 can capture images or videos from the physical camera.

[0125] S711: The screen folding management 021 detects whether the shape of the mobile phone 100 has changed.

[0126] That is, the screen folding management 021 detects whether the shape of the mobile phone 100 has changed. If the shape of the mobile phone 100 is detected to have changed, it indicates that a new physical camera needs to be switched, and the process goes to step S712 to send the shape of the mobile phone 100 to the camera folding screen expansion module 0232. Otherwise, it indicates that there is no need to switch to a new physical camera, and the process continues to detect whether the shape of the mobile phone 100 has changed.

[0127] S712: The camera folding screen expansion module 0232 sends the shape of the mobile phone 100 to the camera post-processing 024.

[0128] S713: The camera post-processing 024 sends the state of the mobile phone 100 to the camera provider 032.

[0129] S714: The camera provider 032 switches the physical camera according to the form of the mobile phone 100.

[0130] That is, the camera provider 032 switches the camera 011 to use the physical camera according to the received form of the mobile phone 100. For example, when the mobile phone 100 is switched from a folded state to an unfolded state, the physical camera is switched from the camera unit 1932 to the camera unit 1931; when the mobile phone 100 is switched from an unfolded state to a folded state, the physical camera is switched from the camera unit 1931 to the camera unit 1932.

[0131] It can be understood that in some embodiments, the camera provider 032 can also actively obtain the shape of the mobile phone 100 from the screen of the camera folding screen expansion module 0232, and detect whether the shape of the mobile phone 100 has changed, and switch the physical camera after detecting that the shape of the mobile phone 100 has changed. This is not limited to the embodiments of the present application.

[0132] It can be understood that the execution order of the aforementioned steps S701 to S714 is only an example. In other embodiments, the execution order of each step can be adjusted. For example, the execution order of step S701 and step S702 can be interchanged, or some steps can be merged or split. The embodiments of this application do not limit this.

[0133] Through the shooting method provided in the embodiment of the present application, the application in the mobile phone 100 can use the same logical camera identifier to capture images or videos through the physical camera corresponding to the logical camera when the mobile phone 100 is in different forms, without the need for the application developer to integrate instructions for determining the physical camera corresponding to each logical camera according to the form of the mobile phone 100 in the application, thereby reducing the development cost of the application.

[0134] The above embodiment introduces the interactive process of shooting by the mobile phone 100 when the various services / applications of the mobile phone 100 are operating normally. However, in some embodiments, some modules of the mobile phone 100 may unexpectedly restart, become unresponsive, or become stuck during operation. In order to ensure that the mobile phone 100 can start the corresponding physical camera according to the form of the mobile phone 100 based on the application's request to start the camera when some services are abnormal. The embodiment of the present application also provides a shooting method, which re-acquires the form of the mobile phone 100 and starts the corresponding physical camera according to the form of the mobile phone 100 based on the abnormal recovery of some services after some modules in the mobile phone 100 are abnormal. The technical solution of the embodiment of the present application is introduced below by taking the example of the camera provider 032 having an abnormality during the use of the camera 011 as an example.

[0135] Specifically, Figure 9 According to some embodiments of the present application, a schematic diagram of the interactive process of a shooting method is shown. Figure 9 As shown, the interaction process includes the following steps.

[0136] S901: The camera provider 032 sends a notification of going online or offline to the camera service 025.

[0137] That is, when the camera provider 032 cannot continue to provide services due to an abnormality, for example, when the camera provider 032 restarts or freezes due to a software failure, it sends an offline notification to the camera service 025, and sends an online notification to the camera service 025 when the abnormality is recovered.

[0138] It is understandable that in other embodiments, when the camera provider 032 cannot send an offline notification to the camera service 025, other modules in the mobile phone 100 may also send an offline notification of the camera provider 032 to the camera service 025, which is not limited here.

[0139] S902 : The camera service 025 sends the status of the camera provider 032 to the camera service agent 0231 .

[0140] That is, when the camera service 025 receives the online or offline notification of the camera provider 032, it sends the status of the camera provider 032 to the camera service agent 0231.

[0141] It can be understood that, in some embodiments, the status of the camera provider 032 may include the camera provider 032 being online or the camera provider 032 being offline.

[0142] S903: The camera service agent 0231 sends the status of the camera provider to the camera folding screen extension module 0232.

[0143] That is, after receiving the status of the camera provider 032 , the camera service agent 0231 forwards the status of the camera provider 032 to the camera folding screen expansion module 0232 .

[0144] S904: The camera folding screen expansion module 0232 detects whether the status of the camera provider 032 is online. If so, it means that the camera provider 032 needs to be provided with the form of the mobile phone 100 again, and the process goes to step S905; otherwise, it means that the camera provider 032 has a fault and no processing is performed.

[0145] S905: The camera folding screen expansion module 0232 obtains the shape of the mobile phone 100 from the screen folding management 021, and sends the shape of the mobile phone 100 to the camera post-processing 024.

[0146] That is, when the status of the camera provider 032 is online, the camera folding screen expansion module 0232 obtains the shape of the mobile phone 100 from the screen folding management 021 and sends the shape of the mobile phone 100 to the camera post-processing 024.

[0147] S906: The camera post-processing 024 sends the state of the mobile phone 100 to the camera provider 032.

[0148] That is, after receiving the status of the mobile phone 100, the camera post-processing 024 forwards the status of the mobile phone 100 to the camera provider 032.

[0149] S907: The camera provider 032 starts the corresponding physical camera according to the logical camera identifier sent by the camera 011 and the form of the mobile phone 100.

[0150] For example, when the camera identifier sent by camera 011 is 1, that is, the activated camera is the logical front camera, camera provider 032 activates camera unit 1931 when mobile phone 100 is in the unfolded state, and activates camera unit 1932 when mobile phone 100 is in the folded state.

[0151] It can be understood that the execution process of the above-mentioned steps S901 to S907 is only an example. In other embodiments, the execution order of each step can be adjusted, and some steps can be merged or split, which is not limited here.

[0152] Through the shooting method provided in the embodiment of the present application, after the camera provider 032 has an abnormality and recovers, the mobile phone 100 re-acquires the state of the mobile phone 100 and sends it to the camera provider 032, ensuring that the camera provider 032 can start the corresponding physical camera based on the identifier of the logical camera to be started by the camera 011, the state of the mobile phone 100 and the correspondence between the logical cameras and physical cameras of the mobile phone 100 in different states after the abnormality is eliminated, thereby improving the user experience.

[0153] It can be understood that in other embodiments, after other modules / services in the mobile phone 100 have an abnormality and recover, the state of the mobile phone 100 can also be sent to the camera provider 032 through a similar method to ensure that the camera provider 032 can start the corresponding physical camera based on the identifier of the logical camera to be started by the camera 011, the state of the mobile phone 100 and the correspondence between the logical cameras and physical cameras in different states of the mobile phone 100 after the abnormality of other modules / services is eliminated. This is not limited here.

[0154] further, Figure 10 According to some embodiments of the present application, a schematic diagram of the structure of a mobile phone 100 is shown. Figure 10 As shown, the mobile phone 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, an earphone interface 170D, a sensor module 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. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0155] The processor 110 may include one or more processing units. For example, the processor 110 may include 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). The different processing units may be independent devices or integrated into one or more processors.

[0156] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0157] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or is reusing. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system. In some embodiments, the processor 110 may call and execute the execution instructions of the shooting method provided in each embodiment of the present application stored in the memory to implement the shooting method provided in the embodiment of the present application.

[0158] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0159] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C busses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby enabling the touch function of the mobile phone 100.

[0160] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.

[0161] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0162] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.

[0163] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the mobile phone 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the mobile phone 100.

[0164] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0165] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the mobile phone 100 and to transfer data between the mobile phone 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.

[0166] The charging management module 140 is configured to receive charging input from a charger. While charging the battery 142 , the charging management module 140 can also provide power to the mobile phone 100 through the power management module 141 .

[0167] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to provide power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160.

[0168] The wireless communication function of the mobile phone 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0169] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.

[0170] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied on the mobile phone 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0171] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the mobile phone 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0172] Mobile phone 100 implements display functionality through a GPU, display screen 194, and an application processor. The GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0173] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini-LED, a Micro-LED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the mobile phone 100 may include one or N display screens 194, where N is a positive integer greater than 1. For example, in some implementations, the display screen 194 may include the aforementioned display screen 1941 disposed on side A and the display screen 1942 disposed on side C.

[0174] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the mobile phone 100 may include 1 or N cameras 193, where N is a positive integer greater than 1. For example, in some embodiments, the camera 193 may include a camera unit 1931, a camera unit 1932, and a camera unit 1933, and each camera unit may include at least one camera.

[0175] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

[0176] The internal memory 121 can be used to store computer executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The program storage area may store an operating system, at least one application required for a function, etc. The data storage area may store data created during the use of the mobile phone 100, etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications of the mobile phone 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor 110. In some embodiments, the internal memory 121 may be used to store the correspondence between each logical camera and the physical camera of the mobile phone 100 in different forms.

[0177] The mobile phone 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0178] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals.

[0179] The speaker 170A, also called a "horn", is used to convert audio electrical signals into sound signals.

[0180] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals.

[0181] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.

[0182] The headphone jack 170D is used to connect a wired headphone.

[0183] The pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a device comprising at least two parallel plates with conductive material. When force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The mobile phone 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation is applied to the display screen 194, the mobile phone 100 detects the intensity of the touch operation based on the pressure sensor 180A. The mobile phone 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions.

[0184] Hall effect sensor 180C is used to sense changes in magnetic fields and convert them into electrical signals. For example, in some embodiments, Hall effect sensors can be placed on both sides of display screen 1941, so that mobile phone 100 can determine the angle between the left and right halves of display screen 1941 based on the data from the Hall effect sensors.

[0185] The hinge sensor 180D is used to obtain the angle change of the mobile phone 100 during the folding or unfolding process, so that the mobile phone 100 can determine the shape of the mobile phone 100 based on the angle change.

[0186] Accelerometer 180E detects the magnitude of acceleration of the phone 100 in all directions (generally three axes). It can also detect the magnitude and direction of gravity when the phone 100 is stationary. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.

[0187] Ambient light sensor 180L is used to sense ambient light brightness. Mobile phone 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity sensor 180G to detect whether mobile phone 100 is in a pocket to prevent accidental touches.

[0188] Fingerprint sensor 180H is used to collect fingerprints. Mobile phone 100 can use the collected fingerprints to unlock the phone, access app locks, take photos, answer calls, and more. In this embodiment, different unlocking fingerprints can be used for login verification in the Main Space and the Private Space to ensure the security of private data within the Private Space. Users can verify different fingerprints on mobile phone 100 to access the Main Space and the Private Space respectively.

[0189] The touch sensor 180K is also called a "touch device." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the mobile phone 100, in a location different from that of the display screen 194.

[0190] Keys 190 include a power button, a volume button, etc. Keys 190 may be mechanical keys or touch keys. Mobile phone 100 may receive key inputs and generate key signal inputs related to user settings and function control of mobile phone 100.

[0191] Motor 191 can generate vibration prompts.

[0192] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.

[0193] The SIM card interface 195 is used to connect a SIM card.

[0194] It should be understood that the structure of the mobile phone 100 shown in the embodiment of the present application does not constitute a specific limitation on the mobile phone 100. In other embodiments of the present application, the mobile phone 100 may include more or fewer components than shown, or some components may be combined or separated, or the components may be arranged differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0195] It can be understood that the various embodiments of the present application are introduced using the mobile phone 100 as an example, which is only an example. The technical solutions of the embodiments of the present application are also applicable to other foldable electronic devices, including but not limited to laptop computers, tablet computers, wearable devices, head-mounted displays, mobile email devices, portable game consoles, portable music players, reader devices, etc., and the embodiments of the present application are not limited thereto.

[0196] The various embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0197] Program code can be applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices in a known manner. For purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0198] Program code can be implemented with a high-level programming language or an object-oriented programming language to communicate with the processing system. Where necessary, program code can also be implemented in assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any particular programming language. In either case, the language can be a compiled language or an interpreted language.

[0199] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, the instructions may be distributed over a network or through other computer-readable media. Therefore, a machine-readable medium may include any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer), including but not limited to floppy disks, optical disks, optical discs, read-only memories (CD-ROMs), magneto-optical disks, read-only memories (ROMs), random access memories (RAMs), erasable programmable read-only memories (EPROMs), electrically erasable programmable read-only memories (EEPROMs), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Therefore, a machine-readable medium includes any type of machine-readable medium suitable for storing or transmitting electronic instructions or information in a form readable by a machine (e.g., a computer).

[0200] In the accompanying drawings, some structural or method features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or order may not be required. Rather, in some embodiments, these features may be arranged in a manner and / or order different from that shown in the illustrative drawings. In addition, the inclusion of a structural or method feature in a particular figure does not imply that such feature is required in all embodiments, and in some embodiments, such features may not be included or may be combined with other features.

[0201] It should be noted that the units / modules mentioned in the various device embodiments of the present application are all logical units / modules. Physically, a logical unit / module can be a physical unit / module, or a part of a physical unit / module, or can be implemented as a combination of multiple physical units / modules. The physical implementation of these logical units / modules themselves is not the most important. The combination of functions implemented by these logical units / modules is the key to solving the technical problems raised by this application. In addition, in order to highlight the innovative part of this application, the above-mentioned device embodiments of this application do not introduce units / modules that are not closely related to solving the technical problems raised by this application. This does not mean that other units / modules do not exist in the above-mentioned device embodiments.

[0202] It should be noted that in the examples and description of this patent, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "including a" does not exclude the presence of other identical elements in the process, method, article or device that includes the element.

[0203] Although the present application has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present application.

Claims

1. A shooting method, applied to a foldable electronic device, characterized in that: The electronic device includes a first screen and a second screen respectively located on the front and back sides of the electronic device in an unfolded state, wherein the first screen is a folding screen, at least one first physical camera is provided on the same side of the electronic device as the first screen, and at least one second physical camera is provided on the same side of the electronic device as the second screen; and The method comprises: The first application receives a first shooting instruction from the second application, where the first shooting instruction includes a perspective identifier for front-facing shooting; When the first screen is in the expanded state, in response to the first shooting instruction, the first application activates the first physical camera; When the first screen is in a folded state, in response to the first shooting instruction, the first application activates the second physical camera; The second application completes the first shooting instruction through the physical camera started by the first application; The second application is independent of the first application.

2. The method according to claim 1, characterized in that The first application starting the first physical camera in response to the first shooting instruction when the first screen is in the expanded state includes: The first application determines to respond to the first shooting instruction and start the first physical camera through the first physical camera based on the viewing angle identifier of the front-facing camera, the folding form of the first screen, and the pre-stored correspondence between the physical cameras and shooting visual identifiers of the first screen in different folding forms.

3. The method according to claim 1, characterized in that The method of activating the second physical camera by the first application in response to the first shooting instruction when the first screen is in the folded state includes: The first application determines to respond to the first shooting instruction through the second physical camera and start the second physical camera based on the viewing angle identifier of the front-facing camera, the folding form of the second screen, and the pre-stored correspondence between the physical cameras and shooting visual identifiers of the first screen in different folding forms.

4. The method according to claim 1, wherein Also includes: When the folding state of the first screen changes, the first application switches the activated physical camera.

5. The method according to claim 4, characterized in that When the folding state of the first screen changes, the first application switches the activated physical camera, including: When the first screen is switched from an expanded state to a folded state, the first application switches the activated physical camera from the first physical camera to the second physical camera; When the first screen is switched from a folded state to an unfolded state, the first application switches the activated physical camera from the second physical camera to the first physical camera.

6. The method according to claim 1, characterized in that The electronic device further includes at least one third physical camera disposed on a different side from the first screen; and The method further comprises: The first application receives a second shooting instruction from the second application, where the second shooting instruction includes a perspective identifier for post-shooting; When the first screen is in the expanded state, in response to the second shooting instruction, the first application activates at least one of the third physical camera and the second physical camera; When the first screen is in a folded state, in response to the second shooting instruction, the first application activates the third physical camera; The second application completes the second shooting instruction through the physical camera started by the first application.

7. The method according to any one of claims 1 to 6, characterized in that Also includes: When an exception occurs and the first application recovers, the physical camera used to complete the first shooting instruction is restarted.

8. The method according to any one of claims 1 to 6, characterized in that Also includes: The first application obtains the folding state of the first screen from a third application.

9. The method according to claim 8, characterized in that The operating system of the electronic device includes a hardware abstraction layer and an application framework layer; and The first application is set in the hardware abstraction layer; The third application is set in the application framework layer.

10. The method according to claim 9, characterized in that The second application includes any one of the following applications: a camera application, an instant messaging application, a browser application, and a video conferencing application.

11. A readable medium, characterized in that The readable medium includes instructions, which, when executed by a processor of an electronic device, enable the electronic device to implement the shooting method according to any one of claims 1 to 10.

12. An electronic device, characterized in that: include: Multiple physical cameras; a memory for storing instructions to be executed by one or more processors of the electronic device; as well as At least one processor is used to run the instruction so that the electronic device selects at least one from the multiple physical cameras to complete the shooting instruction through the shooting method described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Method and device for starting front camera and rear camera of electronic device during system hibernation during system hibernation

    CN103516900A

  • Photographing method and mobile terminal

    CN107368150A