Camera module switching method and apparatus, device, storage medium, and chip

By automatically switching camera modules based on sensor data from foldable screen terminal devices, the problem of manual operation required in existing technologies is solved, improving the smoothness and convenience of using terminal devices.

CN119484739BActive Publication Date: 2026-04-17BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2023-08-09
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In existing foldable screen terminal devices, switching the camera module requires manual operation by the user, which reduces the smoothness and convenience of use.

Method used

By acquiring sensing data from the first and second sensors, the state of the first and second screens is automatically determined, and the corresponding camera module is intelligently switched according to the screen state.

Benefits of technology

It enables automatic and intelligent switching of camera modules, improving the smoothness and ease of use of terminal devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484739B_ABST
    Figure CN119484739B_ABST
Patent Text Reader

Abstract

This disclosure relates to a camera module switching method, apparatus, device, storage medium, and chip. The method includes: acquiring first sensing data and second sensing data, wherein the first sensing data is obtained by monitoring the screen state of a first screen using a first sensor, and the second sensing data is obtained by monitoring the screen state of a second screen using a second sensor; determining the respective screen states of the first and second screens based on the first and second sensing data; and switching between a first camera module corresponding to the first screen and a second camera module corresponding to the second screen based on the respective screen states of the first and second screens. This solves the technical problems in the aforementioned related technologies, such as reduced smoothness of terminal use and inconvenient operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of terminal technology, and in particular to a camera module switching method, apparatus, device, storage medium and chip. Background Technology

[0002] With the continuous development of terminal and display technologies, terminal devices with foldable displays have emerged. Currently, camera functionality is a common feature provided by terminal devices, allowing users to make video calls, take photos, or record videos using the camera lens. Foldable screen terminal devices have both inner and outer screen lenses. Current lens switching solutions require manual switching between the inner and outer screen lenses based on user needs. However, this manual operation significantly reduces the smoothness of the device's use and is inconvenient. Summary of the Invention

[0003] To overcome the problems existing in the related technologies, this disclosure provides a camera module switching method, device, equipment, storage medium and chip to solve the technical problems existing in the above-mentioned related technologies, such as reducing the smoothness of terminal use and inconvenience of operation.

[0004] According to a first aspect of the present disclosure, a camera module switching method is provided, comprising:

[0005] Acquire first sensing data and second sensing data, wherein the first sensing data is obtained by monitoring the screen state of the first screen based on the first sensor, and the second sensing data is obtained by monitoring the screen state of the second screen based on the second sensor.

[0006] Based on the first sensing data and the second sensing data, determine the screen state of the first screen and the second screen respectively;

[0007] Based on the respective screen states of the first screen and the second screen, a switching process is performed on the first camera module corresponding to the first screen and the second camera module corresponding to the second screen.

[0008] In some embodiments, the first sensing data and the second sensing data each include acceleration data, and determining the screen states of the first screen and the second screen based on the first sensing data and the second sensing data includes:

[0009] The acceleration data in the target sensing data is decomposed and calculated to obtain the target angle between the gravitational components in the first axis direction and the second axis direction corresponding to the acceleration data;

[0010] The target angle is converted to obtain the screen state of the target screen corresponding to the target sensing data;

[0011] Wherein, the first axis direction and the second axis direction are two axis directions of the plane coordinate system in which the target screen is located, the target sensing data includes the first sensing data or the second sensing data, the target screen includes the first screen or the second screen, and the screen state is used to indicate the angle between the target screen and the ground.

[0012] In some embodiments, the screen state includes any one of the following: a first state, a second state, a third state, and a fourth state, wherein different screen states are used to indicate that the processed target angle is located in different preset angle ranges, and the processed target angle is the angle between the target screen and the ground.

[0013] In some embodiments, the screen state further includes a fifth state, and the method further includes:

[0014] Determine whether the target sensing data meets the preset attitude conditions;

[0015] If so, continue with the step of decomposing and calculating the acceleration data in the target sensing data; otherwise, determine the screen state of the target screen as the fifth state.

[0016] The preset attitude conditions include the fact that the magnitude of the acceleration data in the target sensing data is not within a preset range, and / or the angle between the gravitational component of the acceleration data in the target sensing data in the third axis direction and the gravitational force of the center of gravity of the target screen in the preset gravity direction is within a preset first range, wherein the third axis direction is the axis direction perpendicular to the plane coordinate system in which the target screen is located.

[0017] In some embodiments, the switching process between the first camera module corresponding to the first screen and the second camera module corresponding to the second screen based on the respective screen states of the first screen and the second screen includes:

[0018] When the screen states of the first screen and the second screen meet the preset state conditions, the first camera module corresponding to the first screen and the second camera module corresponding to the second screen are switched.

[0019] The preset state conditions include the screen state indicator of the target screen being in a preset second range, and the screen angle between the first screen and the second screen being in a preset third range.

[0020] In some embodiments, the preset state condition is that the screen states of the first screen and the second screen respectively include the second state and the fifth state; or, the preset state condition is that the screen states of the first screen and the second screen respectively include the fourth state and the fifth state.

[0021] In some embodiments, if the first camera module is an external screen camera module and the second camera module is an internal screen camera module, then the switching process between the first camera module corresponding to the first screen and the second camera module corresponding to the second screen includes:

[0022] When the preset state condition is that the screen states of the first screen and the second screen each include the second state and the fifth state, the first camera module is switched to the second camera module to take pictures using the second camera module; or,

[0023] When the preset state condition is that the screen states of the first screen and the second screen respectively include the fourth state and the fifth state, the second camera module is switched to the first camera module to take pictures using the first camera module.

[0024] In some embodiments, the method further includes:

[0025] Output the target state; or,

[0026] When the screen states of the first screen and the second screen do not meet the preset state conditions, a target state is output, which is determined based on the screen states of the first screen and the second screen.

[0027] In some embodiments, before determining the respective screen states of the first screen and the second screen based on the first sensing data and the second sensing data, the method further includes:

[0028] Based on the first sensing data and the second sensing data, determine the screen angle between the first screen and the second screen;

[0029] When the screen angle is within a preset fourth interval, the step of determining the screen state of the first screen and the second screen based on the first sensor data and the second sensor data continues.

[0030] According to a second aspect of the present disclosure, a camera module switching device is provided, comprising:

[0031] The acquisition module is configured to acquire first sensing data and second sensing data, wherein the first sensing data is obtained by monitoring the screen state of the first screen based on the first sensor, and the second sensing data is obtained by monitoring the screen state of the second screen based on the second sensor.

[0032] The processing module is configured to determine the screen state of the first screen and the second screen respectively based on the first sensing data and the second sensing data;

[0033] The processing module is further configured to switch between the first camera module corresponding to the first screen and the second camera module corresponding to the second screen based on the respective screen states of the first screen and the second screen.

[0034] In some embodiments, the first sensing data and the second sensing data each include acceleration data, and the processing module is configured to:

[0035] The acceleration data in the target sensing data is decomposed and calculated to obtain the target angle between the gravitational components in the first axis direction and the second axis direction corresponding to the acceleration data;

[0036] The target angle is converted to obtain the screen state of the target screen corresponding to the target sensing data;

[0037] Wherein, the first axis direction and the second axis direction are two axis directions of the plane coordinate system in which the target screen is located, the target sensing data includes the first sensing data or the second sensing data, the target screen includes the first screen or the second screen, and the screen state is used to indicate the angle between the target screen and the ground.

[0038] In some embodiments, the screen state includes any one of the following: a first state, a second state, a third state, and a fourth state, wherein different screen states are used to indicate that the processed target angle is located in different preset angle ranges, and the processed target angle is the angle between the target screen and the ground.

[0039] In some embodiments, the screen state further includes a fifth state, and the processing module is further configured to:

[0040] Determine whether the target sensing data meets the preset attitude conditions;

[0041] If so, continue with the step of decomposing and calculating the acceleration data in the target sensing data; otherwise, determine the screen state of the target screen as the fifth state.

[0042] The preset attitude conditions include the fact that the magnitude of the acceleration data in the target sensing data is not within a preset range, and / or the angle between the gravitational component of the acceleration data in the target sensing data in the third axis direction and the gravitational force of the center of gravity of the target screen in the preset gravity direction is within a preset first range, wherein the third axis direction is the axis direction perpendicular to the plane coordinate system in which the target screen is located.

[0043] In some embodiments, the processing module is configured to:

[0044] When the screen states of the first screen and the second screen meet the preset state conditions, the first camera module corresponding to the first screen and the second camera module corresponding to the second screen are switched.

[0045] The preset state conditions include the screen state indicator of the target screen being in a preset second range, and the screen angle between the first screen and the second screen being in a preset third range.

[0046] In some embodiments, the preset state condition is that the screen states of the first screen and the second screen respectively include the second state and the fifth state; or, the preset state condition is that the screen states of the first screen and the second screen respectively include the fourth state and the fifth state.

[0047] In some embodiments, if the first camera module is an external screen camera module and the second camera module is an internal screen camera module, then the processing module is configured to:

[0048] When the preset state condition is that the screen states of the first screen and the second screen each include the second state and the fifth state, the first camera module is switched to the second camera module to take pictures using the second camera module; or,

[0049] When the preset state condition is that the screen states of the first screen and the second screen respectively include the fourth state and the fifth state, the second camera module is switched to the first camera module to take pictures using the first camera module.

[0050] In some embodiments, the processing module is further configured to:

[0051] Output the target state; or,

[0052] When the screen states of the first screen and the second screen do not meet the preset state conditions, the target state is output.

[0053] The target state is determined based on the respective screen states of the first screen and the second screen.

[0054] For any content not introduced or described in the embodiments of this disclosure, please refer to the relevant descriptions in the foregoing method embodiments. This disclosure does not limit the scope of the embodiments.

[0055] According to a third aspect of the present disclosure, a terminal device is provided, including a first screen, a second screen, a first sensor, a second sensor, a first camera module, and a second camera module, wherein the first camera module is disposed on the first screen, the second camera module is disposed on the second screen, and the terminal device further includes a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the executable instructions to implement the steps of the above-described camera module switching method.

[0056] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, having stored thereon computer program instructions that, when executed by a processor, implement the steps of the camera module switching method provided in the first aspect of the present disclosure.

[0057] According to a fifth aspect of the present disclosure, a chip is provided, comprising: a processor and an interface; the processor is configured to read instructions to execute the steps of the camera module switching method described above.

[0058] The technical solutions provided by the embodiments of this disclosure can include the following beneficial effects: A terminal device acquires first sensing data and second sensing data, wherein the first sensing data is obtained by monitoring the screen state of a first screen using a first sensor, and the second sensing data is obtained by monitoring the screen state of a second screen using a second sensor; based on the first sensing data and the second sensing data, the screen states of the first screen and the second screen are determined; based on the screen states of the first screen and the second screen, a switching process is performed on the first camera module corresponding to the first screen and the second camera module corresponding to the second screen. Therefore, the terminal device can automatically and intelligently switch between the camera modules corresponding to the first screen and the second screen according to their respective screen states. This solves the problems of manual operation required by the user, reduced smoothness of terminal use, and inconvenience in operation in existing solutions, and also improves the convenience and practicality of camera module switching.

[0059] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0060] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0061] Figure 1 This is a schematic diagram illustrating the unfolding of a foldable screen phone according to an exemplary embodiment.

[0062] Figures 2(a) and 2(b) are schematic diagrams illustrating two possible folding methods of a foldable screen phone according to an exemplary embodiment.

[0063] Figure 3 This is a schematic diagram of the structure of a terminal device according to an exemplary embodiment.

[0064] Figure 4 This is a flowchart illustrating a camera module switching method according to an exemplary embodiment.

[0065] Figure 5 This is a schematic diagram illustrating the three-dimensional coordinate system of different screens in a terminal device according to an exemplary embodiment.

[0066] Figures 6(a) to 6(d) This is a schematic diagram illustrating four screen states according to an exemplary embodiment.

[0067] Figure 7 This is a schematic diagram of the structure of a camera module switching device according to an exemplary embodiment.

[0068] Figure 8 This is a schematic diagram of the structure of a terminal device according to an exemplary embodiment.

[0069] Figure 9 This is a schematic diagram of the structure of a chip according to an exemplary embodiment. Detailed Implementation

[0070] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0071] It should be noted that all actions involving the acquisition of signals, information, or data in this disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the location is situated, and with authorization from the owner of the relevant device.

[0072] With the rapid development of foldable screen devices (such as foldable phones), hovering hinges can be added to foldable screens, allowing the screen to be fixed at various angles. However, this new feature requires corresponding software logic to improve the smoothness of screen operation. Currently, camera operation on most foldable screen devices requires manual switching by the user, which significantly reduces the smoothness of the device's use.

[0073] To address the aforementioned problems, embodiments of this disclosure provide a camera module switching method, apparatus, device, storage medium, and chip. The terminal device involved in this disclosure includes a foldable screen, which can be unfolded or folded along a folding axis. For example, the foldable screen may include a first screen and a second screen, which can also be referred to as a first display screen and a second display screen, respectively. The first screen and the second screen can be unfolded or folded along the folding axis, etc. To improve image capture quality, this disclosure allows the installation / setting of corresponding camera modules on different screens of the foldable screen. For example, a first camera module is correspondingly set on the first screen, and a second camera module is correspondingly set on the second screen, etc. The corresponding camera module is activated / switched in different states to capture images, thereby obtaining clearer images with better image quality. This disclosure does not limit the quantity and type of the aforementioned first camera module and second camera module, for example, see the following... Figure 1 The first camera module described above can be an external screen camera module, and the second camera module can be an internal screen camera module, etc. The different states of the screen in the foldable screen can be monitored and obtained through corresponding sensors, including but not limited to, inertial measurement units (IMUs) or other sensors used to monitor screen states.

[0074] In practical applications, each screen that makes up a foldable screen can be equipped with at least one sensor to monitor the screen's state. The installation location of the sensor for each screen is not limited; for example, it can be installed at a preset center position on the screen. When there are multiple sensors, this disclosure can select a master sensor from among them and use its sensing data to monitor and obtain the screen state. Typically, the master sensor is user-defined or is a sensor in a default position on the terminal device. In one example embodiment, this disclosure can directly acquire the sensing data of the master sensor and use it to determine the screen state. In another example embodiment, this disclosure can use sensing data from other sensors besides the master sensor to correct the master sensor's sensing data, obtaining corrected master sensor data; and then determine the screen state based on this corrected master sensor data. The specific implementation of the above correction is not limited; for example, it can use sensing data from other sensors to correct for abnormal average values ​​in the master sensor's sensing data. How to determine the screen state based on sensor data will be explained in detail below in this disclosure, and will not be repeated here.

[0075] The terminal devices involved in this disclosure refer to terminal devices with foldable screens, which may include, but are not limited to, electronic devices with foldable screens such as mobile phones, tablets, personal computers (PCs), personal digital assistants (PDAs), smartwatches, netbooks, wearable electronic devices, augmented reality (AR) devices, virtual reality (VR) devices, in-vehicle devices, smart cars, and smart speakers. This disclosure does not impose any limitations on these devices. The following examples, using foldable screen mobile phones as terminal devices, illustrate several possible application scenarios involved in this disclosure, but these are not intended to limit the scope of the disclosure.

[0076] Please see Figure 1 This is a schematic diagram illustrating a foldable screen phone when unfolded, according to an exemplary embodiment. Figure 1As shown, the terminal device includes a first screen 100 and a second screen 200. An inner screen camera module 300 can be installed / set on the second screen 200, and a corresponding outer screen camera module 400 can be installed / set on the first screen 100. This disclosure does not limit the number of the inner screen camera module 300 and the outer screen camera module 400; they can be set according to actual usage needs. The illustration only shows one inner screen camera module 300 and one outer screen camera module 400 as an example, but it does not constitute a limitation. In practical applications, the outer screen camera module 400 may include an outer screen front camera module and an outer screen rear camera module. Typically, the outer screen rear camera module serves as the main outer screen camera module for image capture. This disclosure does not impose further limitations or details on this aspect.

[0077] like Figure 1 As shown, a first sensor 101 is installed / set in the first screen 100, and a second sensor 201 is installed / set in the second screen 200. The first sensor 101 and the second sensor 201 can be used to monitor the screen state of their respective screens to determine the usage state of the foldable phone (e.g., unfolded or folded), and then select the appropriate camera module for image capture. Figure 1 In the scenario shown, the foldable phone is in the unfolded state. At this time, the foldable phone can call / use the external screen camera module 400 (usually the external screen main camera module) to take corresponding images in order to obtain clearer images.

[0078] Please refer to Figures 2(a) and 2(b), which are schematic diagrams illustrating two possible foldable screen phones when folded according to an exemplary embodiment. Due to the foldable nature of foldable screens, many usage modes have emerged, such as a calendar mode. The following uses Figures 2(a) and 2(b) as examples to illustrate two possible application scenarios that this disclosure may involve, but these are not intended to limit the scope of the invention. As shown in Figures 2(a) and 2(b), the first screen 100 and the second screen 200 are folded along the folding axis to a mutually perpendicular state, that is, the first screen 100 and the second screen 200 are in a folded state, and the screen angle between them is 90° (i.e., mutually perpendicular). In the scenario shown in Figure 2(a), the foldable screen phone can call / use the inner screen camera module 300 to take corresponding images. In the scenario shown in Figure 2(b), the foldable screen phone can call / use the outer screen camera module 400 (usually the outer screen main camera module) to take corresponding images.

[0079] Please see also Figure 3 This is a schematic diagram illustrating the structure of a terminal device according to an exemplary embodiment. For example... Figure 3The terminal device shown may include components such as: a radio frequency (RF) circuit 310, a memory 320, an input unit 330, a display unit 340, a sensor 350, an audio circuit 360, a wireless fidelity (WiFi) module 370, a processor 380, and a power supply 390. Those skilled in the art will understand that... Figure 3 The device structure shown does not constitute a limitation on the terminal device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0080] The following is combined with Figure 3 A detailed introduction to each component of the terminal device:

[0081] RF circuit 310 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink information from the base station and processes it with processor 380; additionally, it transmits uplink data to the base station. Typically, RF circuit 310 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, etc. Furthermore, RF circuit 310 can also communicate wirelessly with networks and other devices. The aforementioned wireless communication can use any communication standard or protocol, including but not limited to Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.

[0082] The memory 320 can be used to store software programs and modules. The processor 380 executes various functional applications and data processing of the terminal device by running the software programs and modules stored in the memory 320. The memory 320 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the terminal device (such as audio data, phone book, etc.). In addition, the memory 320 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0083] The input unit 330 can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the terminal device. Specifically, the input unit 330 may include a touch panel 331 and other input devices 332. The touch panel 331, also known as a touch screen, can collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel 331), and drive the corresponding connection devices according to a pre-set program. Optionally, the touch panel 331 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 380, and can also receive and execute commands sent by the processor 380. In addition, the touch panel 331 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 331, the input unit 330 may also include other input devices 332. Specifically, other input devices 332 may include, but are not limited to, one or more of the following: physical keyboard, function keys (such as volume control buttons, power buttons, etc.), trackball, mouse, joystick, etc.

[0084] The display unit 340 can be used to display information input by the user or information provided to the user, as well as various menus of the terminal device. The display unit 340 may include a display panel 341, optionally configured as a Liquid Crystal Display (LCD), Organic Light-Emitting Diode (OLED), or similar display panel 341. Furthermore, a touch panel 331 may cover the display panel 341. When the touch panel 331 detects a touch operation on or near it, it transmits the information to the processor 380 to determine the type of touch event. Subsequently, the processor 380 provides corresponding visual output on the display panel 341 based on the type of touch event. Although in Figure 3 In this embodiment, the touch panel 331 and the display panel 341 are two separate components to realize the input and output functions of the terminal device. However, in some embodiments, the touch panel 331 and the display panel 341 can be integrated to realize the input and output functions of the terminal device.

[0085] The terminal device may also include at least one sensor 350, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 341 according to the ambient light level, and the proximity sensor can turn off the display panel 341 and / or the backlight when the terminal device is moved to the ear. As a type of motion sensor, an inertial measurement unit (IMU) can detect and measure data such as acceleration and angular velocity when the terminal device is moving. For example, it can detect the magnitude of acceleration and angular velocity in various directions (generally three axes) when the terminal device is moving, and can be used for applications that identify the attitude of the terminal device or the screen status, as detailed below in this disclosure, and will not be repeated here. For example, accelerometer sensors can detect the magnitude of acceleration in various directions (usually three axes), and can detect the magnitude and direction of gravity when stationary. They can be used for applications that identify the posture of terminal devices (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition functions (such as pedometers, tapping), etc. Other sensors that terminal devices can be equipped with, such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors, will not be elaborated here.

[0086] Audio circuit 360, speaker 361, and microphone 362 provide an audio interface between the user and the terminal device. Audio circuit 360 converts received audio data into electrical signals and transmits them to speaker 361, where speaker 361 converts them into sound signals for output. On the other hand, microphone 362 converts collected sound signals into electrical signals, which are then received by audio circuit 360, converted into audio data, and then output to processor 380 for processing. The audio data is then transmitted via RF circuit 310 to, for example, another terminal device, or output to memory 320 for further processing.

[0087] WiFi is a short-range wireless transmission technology. Terminal devices using the WiFi module 370 can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 3 WiFi module 370 is shown, but it is understood that it is not a necessary component of the terminal device and can be omitted as needed without changing the essence of the invention.

[0088] The processor 380 is the control center of the terminal device. It connects various parts of the terminal device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 320, and by calling data stored in the memory 320, it performs various functions and processes data of the terminal device, thereby providing overall monitoring of the terminal device. Optionally, the processor 380 may include one or more processing units; preferably, the processor 380 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 380.

[0089] The terminal device also includes a power supply 390 (such as a battery) to power various components. Preferably, the power supply can be logically connected to the processor 380 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Although not shown, the terminal device may also include devices such as a camera and a Bluetooth module, which will not be described in detail here.

[0090] Based on the foregoing embodiments, please refer to Figure 4 This is a flowchart illustrating a camera module switching method according to an exemplary embodiment. Figure 4 The method shown is applied to a terminal device and may include the following implementation steps:

[0091] S401. Acquire first sensing data and second sensing data, wherein the first sensing data is obtained by monitoring the screen state of the first screen based on the first sensor, and the second sensing data is obtained by monitoring the screen state of the second screen based on the second sensor.

[0092] As an example, the first sensing data mentioned above in this disclosure refers to the sensing data obtained by monitoring the screen state of the first screen 100 using the first sensor 101, and the second sensing data refers to the sensing data obtained by monitoring the screen state of the second screen 200 using the second sensor 201. For a detailed description of the first sensor 101 and the second sensor 201, please refer to the relevant descriptions in the foregoing embodiments; they will not be repeated here. When the first sensor 101 and the second sensor 201 are inertial measurement units (IMUs), the sensing data may include, but is not limited to, acceleration data, angular velocity data, or other measurement data obtained by the IMU.

[0093] Understandably, since an IMU can measure the magnitude of acceleration and angular velocity in different directions (typically the three axes of the IMU), the acceleration and angular velocity data disclosed herein exhibit both direction and magnitude. For example, please refer to... Figure 5 This is a schematic diagram of the three-axis orientation of an IMU in a terminal device according to an exemplary embodiment, that is, a schematic diagram of the three-dimensional coordinate system O-XYZ in which the first screen 100 and the second screen 200 are respectively located. Figure 5 The three axes shown can form the three-dimensional coordinate system O-XYZ of the screen. The three axes include the first axis (OX axis in the figure), the second axis (OY axis in the figure), and the third axis (OZ axis in the figure), and any two axes are perpendicular to each other.

[0094] This disclosure does not limit the implementation methods for acquiring the first sensor data and the second sensor data as described above. For example, in one example, when the first screen 100 and the second screen 200 are respectively equipped with a first sensor 101 and a second sensor 201 (e.g. Figure 1In this case, the present disclosure can directly collect and acquire the sensing data monitored by the first sensor 101 as the first sensing data, and directly collect and acquire the sensing data monitored by the second sensor 201 as the second sensing data. In another example, when the first screen 100 and the second screen 200 are respectively equipped with multiple first sensors 101 and multiple second sensors 201, the present disclosure can collect and acquire the sensing data monitored by the first main sensor, which is one of the multiple first sensors 101; then, the sensing data of the first main sensor is corrected using the data monitored by other first sensors besides the first main sensor, thereby obtaining the corrected data of the first main sensor, and finally the corrected data of the first main sensor is used as the first sensing data. The specific implementation of the above correction is not limited, for example, the mean correction method is used for correction, etc. Similarly, referring to the processing method of the first sensing data, the sensing data monitored by multiple second sensors 201 can be processed to obtain the second sensing data, which will not be elaborated here.

[0095] S402. Based on the first sensing data and the second sensing data, determine the screen state of the first screen and the second screen respectively.

[0096] This disclosure can determine the screen state of a first screen based on first sensing data and the screen state of a second screen based on second sensing data. This disclosure does not limit the implementation of the above-described screen state determination method. Taking the determination of the screen state of a corresponding target screen based on target sensing data as an example, possible implementation methods are described. The target sensing data includes either the first sensing data or the second sensing data described above, and the target screen is either the first screen 100 or the second screen 200 corresponding to the target sensing data. The target sensing data may include acceleration data, angular velocity data, or other data measured by an IMU.

[0097] In one embodiment, this disclosure can decompose and calculate the acceleration data in the target sensing data to obtain the target angle between the gravity components in the first axis direction (X-axis direction) and the second axis direction (Y-axis direction) corresponding to the acceleration data. The first axis direction and the second axis direction are the two axis directions of the XOY plane coordinate system where the target screen is located. In implementation, this disclosure can decompose the acceleration data in the target sensing data to obtain the gravity component in the first axis direction (referred to as the X-axis component) and the gravity component in the second axis direction (referred to as the Y-axis component); then, the target angle between them can be calculated based on the two gravity components (X-axis component and Y-axis component), for example, using the formula arcsinY / X to obtain the target angle between them. In practical applications, the target angle is usually located in the range of -360° to 360°.

[0098] Furthermore, this disclosure performs a conversion process on the aforementioned target angle to obtain a processed target angle; then, based on the processed target angle, the screen state of the target screen is obtained. This disclosure does not limit the specific implementation of the above conversion process. For example, this disclosure can use a preset normalization algorithm to normalize the aforementioned target angle. This normalization algorithm is a processing algorithm pre-defined by the user or terminal device. For example, for a target angle greater than 180°, 360° can be subtracted to obtain the processed target angle; for a target angle less than -180°, 360° can be added to obtain the processed target angle, etc. The processed target angle is typically located in the range of -180° to 180°.

[0099] The screen state of the aforementioned target screen refers to the display state of the target screen (e.g., the first screen 100 or the second screen 200), which is typically used to indicate / reflect the angle between the target screen and the ground, such as the angle between the target screen direction (third axis direction, Z-axis direction) and the ground. In other words, the processed target angle is the angle between the target screen and the ground. Based on the different preset angle ranges within which the processed target angle falls, this disclosure can categorize the screen state of the target screen into various types. For example, the screen state may include a first state, a second state, a third state, and a fourth state. These four states correspond to the processed target angle being located in different preset angle ranges. For instance, the first state indicates that the processed target angle is located in a first preset range, the second state indicates that the processed target angle is located in a second preset range, the third state indicates that the processed target angle is located in a third preset range, and the fourth state indicates that the processed target angle is located in a fourth preset range. The first, second, third, and fourth preset intervals here are all different angle intervals that are user-defined or set by the terminal device, and they can be different from each other; for example, the first preset interval of this disclosure can be (-45°, 45°], the second preset interval can be (45°, 135°], the third preset interval can be (135°, 180°] and [-180°, -135°], and the fourth preset interval can be [-135°, -45°], etc.

[0100] Please see Figures 6(a) to 6(d)This is a schematic diagram illustrating four screen states according to an exemplary embodiment. As shown in FIG6(a), the screen state is a first state, used to indicate that the angle between the target screen and the ground is within a first preset range, such as (-45°, 45°). As shown in FIG6(b), the screen state is a second state, used to indicate that the angle between the target screen and the ground is within a second preset range, such as (45°, 135°). As shown in FIG6(c), the screen state is a third state, used to indicate that the angle between the target screen and the ground is within a third preset range, such as (135°, 180°) and [-180°, -135°). As shown in FIG6(d), the screen state is a fourth state, used to indicate that the angle between the target screen and the ground is within a fourth preset range, such as [-135°, -45°].

[0101] In another embodiment, after acquiring the first sensing data and the second sensing data, before decomposing and calculating the acceleration data in the target sensing data, the present disclosure may further determine whether the target sensing data meets the preset attitude conditions. If so, the step of decomposing and calculating the acceleration data in the target sensing data can continue to be executed; otherwise, the screen state of the target screen can be determined to be the fifth state, which may refer to other screen states besides the first to fourth states.

[0102] The aforementioned preset posture conditions in this disclosure are posture conditions customized by the user or terminal device. For example, they may include any one or more of the following combinations: (1) The magnitude of the acceleration data in the target sensing data is not within a preset range. The preset range is a numerical range customized by the user or terminal device in advance, and this disclosure does not limit it. That is to say, if the magnitude of the acceleration data is too large or too small (not within the preset range), the terminal device is in motion, which may cause the screen state determination error, thereby affecting the reliability of the camera module switching.

[0103] (2) The angle between the gravitational component of the acceleration data in the third axis direction (Z-axis direction) of the target sensing data and the gravitational force of the target screen in the preset gravity direction is within a preset first interval. The third axis direction is the axis direction perpendicular to the XOY plane coordinate system where the target screen is located, i.e., the Z-axis direction. The preset gravity direction refers to the direction of gravity perpendicular to the ground downwards, i.e., the vertically downward direction. In practical applications, considering the usage state of the terminal device, the gravitational force of the target screen in the preset gravity direction is usually the magnitude of the acceleration data in the target sensing data. That is to say, in this disclosure, the angle between the gravitational component of the acceleration data in the Z-axis direction (referred to as the Z-axis component) and the magnitude of the acceleration data is within a preset first interval. This angle can be calculated using a preset trigonometric function, such as arcsinZ / G, where G is the magnitude of the acceleration data and Z is the gravitational component of the acceleration data in the Z-axis direction. In practical applications, this angle is usually located in the range of -90° to 90°. The preset first interval is an angle range pre-defined by the user or terminal device. For example, in this disclosure, the preset first interval can be (-40°, 80°), etc. When the included angle is within the preset first interval, it can be determined that the terminal device is in a reverse usage state, such as when the terminal device is held above the user's head. Conversely, when the included angle is not within the preset first interval, it can be determined that the user is using the terminal device normally, that is, the terminal device is in a normal usage state, etc.

[0104] In some optional embodiments, after obtaining the first and second sensing data, and before determining the respective screen states of the first screen 100 and the second screen 200, this disclosure may also determine the screen angle between the first screen 100 and the second screen 200 based on the first and second sensing data. The implementation method for determining the screen angle is not limited. For example, this disclosure can calculate the angle based on the angular velocity data in the first and second sensing data to obtain the screen angle between the first screen 100 and the second screen 200. Further, this disclosure can determine whether the screen angle is within a preset fourth interval. If so, it can be determined that the first screen 100 and the second screen 200 (i.e., the terminal device) are in a folded state, and the step S402 of determining the respective screen states of the first screen 100 and the second screen 200 based on the first and second sensing data can continue. Otherwise, it can be determined that the first screen 100 and the second screen 200 (i.e., the terminal device) are not in a folded state, for example, in an unfolded state, and the process can end. The preset fourth interval is an angle interval that is customized by the user or terminal device. It can be determined according to the actual situation. For example, the preset fourth interval can be a range of 30° to 140°, etc. This disclosure does not limit it.

[0105] S403. Based on the respective screen states of the first screen and the second screen, switch between the first camera module corresponding to the first screen and the second camera module corresponding to the second screen.

[0106] This disclosure does not limit the specific representation of the above-mentioned screen states. For example, screen states can be represented by at least one of numbers, letters, and strings. Taking the use of numbers to represent screen states as an example, when the screen state is -1, it can be used to indicate that the screen state is the fifth state mentioned above; when the screen state is 0, it can be used to indicate that the screen state is the first state mentioned above; when the screen state is 1, it can be used to indicate that the screen state is the second state mentioned above; when the screen state is 2, it can be used to indicate that the screen state is the third state mentioned above; and when the screen state is 3, it can be used to indicate that the screen state is the fourth state mentioned above.

[0107] This disclosure can determine the final target state (also called output state) supported by the terminal device based on the respective screen states of the first screen 100 and the second screen 200. This target state can reflect the screen rotation result of the terminal device to a certain extent. For example, when the target state is the first state, it indicates that the screen rotation result of the terminal device is in portrait mode; or when the target state is the second state, it indicates that the screen rotation result of the terminal device is in landscape mode, etc. For example, please refer to Table 1 below for a possible target state illustration.

[0108] Table 1

[0109]

[0110] As shown in Table 1 above, the first row of the table represents the screen state of the first screen, the first column of the table represents the screen state of the second screen, and the values ​​in the other columns of the table represent the final output target state determined based on the screen states of the first and second screens respectively.

[0111] After obtaining the screen states of the first screen 100 and the second screen 200, this disclosure can perform switching processing on the corresponding first camera module and second camera module based on the screen states of the first screen 100 and the second screen 200.

[0112] This disclosure does not limit the specific implementation of the above-mentioned switching process. For example, this disclosure can determine whether the screen states of the first screen 100 and the second screen 200 meet the preset state conditions. If they meet the conditions, the first camera module corresponding to the first screen 100 and the second camera module corresponding to the second screen 200 can be switched. Otherwise, it can be determined that there is no need to switch the camera modules at present, and the process can be terminated. Alternatively, the target state can be output.

[0113] The preset state conditions disclosed herein are pre-defined conditions for switching camera modules, set by the user or terminal device. For example, these conditions may include the screen state of the target screen indicating that the angle between the target screen and the ground is within a preset second interval, and the screen angle between the first screen 100 and the second screen 200 is within a preset third interval. The preset second and third intervals are system-defined angle intervals; for example, the preset second interval may be [-5°, 5°], and the preset third interval may be [30°, 140°]. The preset third and fourth intervals may be the same or different, but are usually the same, and this disclosure does not limit this. In other words, the preset state conditions may include the target screen and the ground being approximately horizontal or level, and an angle existing between the first and second screens (i.e., in a folded state). The target screen is either the first screen 100 or the second screen 200.

[0114] Referring to the state table shown in Table 1 above, the above preset state conditions can be in the following two cases: (1) The screen states of the first screen 100 and the second screen 200 respectively include the second state and the fifth state. For example, in the scenario shown in Figure 2(b), the first screen 100 is approximately horizontal with the ground, and the second screen 200 is in a folded state. The screen state of the first screen 100 is the second state, and the screen state of the second screen 200 is the fifth state. (2) The screen states of the first screen 100 and the second screen 200 respectively include the fourth state and the fifth state. For example, in the scenario shown in Figure 2(a), the second screen 200 is approximately horizontal with the ground, and the first screen 100 is in a folded state. The screen state of the first screen 100 is the fifth state, and the screen state of the second screen 200 is the fourth state.

[0115] For example, referring to the examples shown in Figures 2(a) and 2(b) above, taking the first camera module correspondingly set on the first screen 100 as the outer screen camera module and the second camera module correspondingly set on the second screen 200 as the inner screen camera module as an example, the specific implementation of the above switching process is described. When the above preset state condition is that the screen states of the first screen 100 and the second screen 200 respectively include the second state and the fifth state, this disclosure can switch the outer screen camera module (second camera module) to the inner screen camera module (first camera module), which facilitates the subsequent use of the inner screen camera module for corresponding image capture.

[0116] When the preset state conditions are such that the screen states of the first screen 100 and the second screen 200 include the fourth state and the fifth state, this disclosure can switch the inner screen camera module (first camera module) to the outer screen camera module (second camera module) to facilitate subsequent image capture using the outer screen camera module. The outer screen camera module can be the outer screen main camera module.

[0117] In some optional embodiments, this disclosure may also output the aforementioned target state. For example, after switching between the first camera module and the second camera module, the target state may be further output to display the rotation result of the corresponding screen. Alternatively, when it is determined that the screen states of the first screen 100 and the second screen 200 do not meet the aforementioned preset state conditions, this disclosure may also output the aforementioned target state to display the rotation result of the corresponding screen, etc.

[0118] By implementing the embodiments of this disclosure, the terminal device acquires first sensing data and second sensing data. The first sensing data is obtained by monitoring the screen state of the first screen using a first sensor, and the second sensing data is obtained by monitoring the screen state of the second screen using a second sensor. Based on the first sensing data and the second sensing data, the screen states of the first screen and the second screen are determined. Based on the screen states of the first screen and the second screen, a switching process is performed on the first camera module corresponding to the first screen and the second camera module corresponding to the second screen. Therefore, the terminal device can automatically and intelligently switch between the camera modules corresponding to the first screen and the second screen according to their respective screen states. This solves the problems of manual operation required by the user in existing solutions, which reduces the smoothness of terminal use and makes operation inconvenient. It also improves the convenience and practicality of camera module switching.

[0119] Based on the foregoing embodiments, please refer to Figure 7 This is a schematic diagram illustrating the structure of a camera module switching device according to an exemplary embodiment. Figure 7The illustrated device can be applied to a terminal device, and the device may include an acquisition module 701 and a processing module 702. Wherein:

[0120] The acquisition module 701 is configured to acquire first sensing data and second sensing data. The first sensing data is obtained by monitoring the screen state of the first screen based on the first sensor, and the second sensing data is obtained by monitoring the screen state of the second screen based on the second sensor.

[0121] The processing module 702 is configured to determine the screen state of the first screen and the second screen respectively based on the first sensing data and the second sensing data.

[0122] The processing module 702 is further configured to switch between the first camera module corresponding to the first screen and the second camera module corresponding to the second screen based on the respective screen states of the first screen and the second screen.

[0123] In some embodiments, the first sensing data and the second sensing data include acceleration data, and the processing module 702 is configured to:

[0124] The acceleration data in the target sensing data is decomposed and calculated to obtain the target angle between the gravitational components in the first axis direction and the second axis direction corresponding to the acceleration data;

[0125] The target angle is converted to obtain the screen state of the target screen corresponding to the target sensing data;

[0126] Wherein, the first axis direction and the second axis direction are two axis directions of the plane coordinate system in which the target screen is located, the target sensing data includes the first sensing data or the second sensing data, the target screen includes the first screen or the second screen, and the screen state is used to indicate the angle between the target screen and the ground.

[0127] In some embodiments, the screen state includes any one of the following: a first state, a second state, a third state, and a fourth state, wherein different screen states are used to indicate that the processed target angle is located in different preset angle ranges, and the processed target angle is the angle between the target screen and the ground.

[0128] In some embodiments, the first state is used to indicate that the processed target angle is located in a first preset interval; the second state is used to indicate that the processed target angle is located in a second preset interval; the third state is used to indicate that the processed target angle is located in a third preset interval; and the fourth state is used to indicate that the processed target angle is located in a fourth preset interval; wherein the first preset interval, the second preset interval, the third preset interval, and the fourth preset interval are all different.

[0129] In some embodiments, the screen state further includes a fifth state, and the processing module 702 is further configured to:

[0130] Determine whether the target sensing data meets the preset attitude conditions;

[0131] If so, continue with the step of decomposing and calculating the acceleration data in the target sensing data; otherwise, determine the screen state of the target screen as the fifth state.

[0132] The preset attitude conditions include the fact that the magnitude of the acceleration data in the target sensing data is not within a preset range, and / or the angle between the gravitational component of the acceleration data in the target sensing data in the third axis direction and the gravitational force of the center of gravity of the target screen in the preset gravity direction is within a preset first range, wherein the third axis direction is the axis direction perpendicular to the plane coordinate system in which the target screen is located.

[0133] In some embodiments, the gravitational force at the center of gravity is the magnitude of the acceleration data.

[0134] In some embodiments, the processing module 702 is configured to:

[0135] When the screen states of the first screen and the second screen meet the preset state conditions, the first camera module corresponding to the first screen and the second camera module corresponding to the second screen are switched.

[0136] The preset state conditions include the screen state indicator of the target screen being in a preset second range, and the screen angle between the first screen and the second screen being in a preset third range.

[0137] In some embodiments, the preset state condition is that the screen states of the first screen and the second screen respectively include the second state and the fifth state; or, the preset state condition is that the screen states of the first screen and the second screen respectively include the fourth state and the fifth state.

[0138] In some embodiments, if the first camera module is an external screen camera module and the second camera module is an internal screen camera module, then the processing module 702 is configured to:

[0139] When the preset state condition is that the screen states of the first screen and the second screen each include the second state and the fifth state, the first camera module is switched to the second camera module to take pictures using the second camera module; or,

[0140] When the preset state condition is that the screen states of the first screen and the second screen respectively include the fourth state and the fifth state, the second camera module is switched to the first camera module to take pictures using the first camera module.

[0141] In some embodiments, the processing module 702 is further configured to:

[0142] Output the target state; or,

[0143] When the screen states of the first screen and the second screen do not meet the preset state conditions, the target state is output.

[0144] The target state is determined based on the respective screen states of the first screen and the second screen.

[0145] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0146] This disclosure also provides a computer-readable storage medium having stored thereon computer program instructions that, when executed by a processor, implement the steps of the camera module switching method provided in this disclosure.

[0147] Figure 8 This is a schematic diagram illustrating the structure of a terminal device according to an exemplary embodiment. For example, the terminal device 800 may be a mobile phone, computer, digital broadcasting terminal, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, or other terminal device.

[0148] Reference Figure 8 The terminal device 800 may include one or more of the following components: a processing component 8002, a memory 8004, and a communication component 8006.

[0149] The processing component 8002 can be used to control the overall operation of the terminal device 800, such as operations associated with display, telephone calls, data communication, camera operation, and recording. The processing component 8002 may include one or more processors 8020 to execute instructions to complete all or part of the steps of the camera module switching method described above. Furthermore, the processing component 8002 may include one or more modules to facilitate interaction between the processing component 8002 and other components. For example, the processing component 8002 may include a multimedia module to facilitate interaction between multimedia components and the processing component 8002.

[0150] Memory 8004 is configured to store various types of data to support operation on terminal device 800. Examples of this data include instructions for any application or method operating on terminal device 800, contact data, phonebook data, messages, pictures, videos, etc. Memory 8004 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0151] Communication component 8006 is configured to facilitate wired or wireless communication between terminal device 800 and other devices. Terminal device 800 can access wireless networks based on communication standards, such as Wi-Fi, 2G, 3G, 4G, 5G, 6G, NB-IoT, eMTC, etc., or combinations thereof. In one exemplary embodiment, communication component 8006 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 8006 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0152] In an exemplary embodiment, the terminal device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the camera module switching method described above.

[0153] The aforementioned terminal device 800 can be a standalone electronic device or a part of a standalone electronic device. For example, in one embodiment, the electronic device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be a single IC or a collection of multiple ICs. The chip can include, but is not limited to, the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip), etc. The aforementioned integrated circuit or chip can be used to execute executable instructions (or code) to implement the aforementioned camera module switching method. The executable instructions can be stored in the integrated circuit or chip or obtained from other devices or equipment. For example, the integrated circuit or chip includes a processor, memory, and an interface for communicating with other devices. The executable instructions can be stored in the processor, and when the executable instructions are executed by the processor, the above-mentioned camera module switching method is implemented; or, the integrated circuit or chip can receive the executable instructions through the interface and transmit them to the processor for execution to implement the above-mentioned camera module switching method.

[0154] In an exemplary embodiment, this disclosure also provides a computer-readable storage medium storing computer program instructions thereon, which, when executed by a processor, implement the steps of the camera module switching method provided in this disclosure. For example, the computer-readable storage medium may be a non-transitory computer-readable storage medium including instructions, such as the aforementioned memory 8004 including instructions, which can be executed by the processor 8020 of the terminal device 800 to complete the aforementioned camera module switching method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device, etc.

[0155] In another exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program executable by a programmable device, the computer program having a code portion for performing the above-described camera module switching method when executed by the programmable device.

[0156] Please see Figure 9This is a schematic diagram illustrating the structure of a chip according to an exemplary embodiment. For example... Figure 9 The chip 900 shown includes a processor 901 and an interface 902. Optionally, it may also include a memory 903. The number of processors 901 can be one or more, and the number of interfaces 902 can be multiple.

[0157] In one embodiment, for the case where the chip is used to implement the method embodiments described in this disclosure:

[0158] The interface 902 is used to receive or output signals;

[0159] The processor 901 is used to execute some or all of the contents of the camera module switching method embodiment.

[0160] Understandably, the processor in this embodiment can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method embodiment can be completed by integrated logic circuits in the processor's hardware or by software instructions. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0161] Understandably, the memory in the embodiments of this disclosure may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory may be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0162] It should be noted that the descriptions of the storage media, devices, and chip embodiments above are similar to the descriptions of the method embodiments above, and have similar beneficial effects. For technical details not disclosed in the storage media, storage media, and device embodiments of this disclosure, please refer to the descriptions of the method embodiments of this disclosure for understanding.

[0163] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of this disclosure. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0164] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A camera module switching method, characterized in that, include: Acquire first sensing data and second sensing data, wherein the first sensing data is obtained by monitoring the screen state of the first screen based on the first sensor, and the second sensing data is obtained by monitoring the screen state of the second screen based on the second sensor. Based on the first sensing data and the second sensing data, the screen states of the first screen and the second screen are determined respectively. The screen states are used to indicate the angle between the target screen and the ground. The target screen includes the first screen or the second screen. Based on the respective screen states of the first screen and the second screen, a switching process is performed on the first camera module corresponding to the first screen and the second camera module corresponding to the second screen; The screen state includes a fifth state, and the method further includes: Determine whether the target sensing data meets the preset attitude conditions; If so, continue with the step of decomposing and calculating the acceleration data in the target sensing data; otherwise, determine the screen state of the target screen as the fifth state. The preset attitude conditions include the fact that the magnitude of the acceleration data in the target sensing data is not within a preset range, and / or the angle between the gravitational component of the acceleration data in the target sensing data in the third axis direction and the gravitational force of the center of gravity of the target screen in the preset gravity direction is within a preset first range, wherein the third axis direction is the axis direction perpendicular to the plane coordinate system in which the target screen is located.

2. The method according to claim 1, characterized in that, The first sensing data and the second sensing data each include acceleration data. Determining the screen states of the first screen and the second screen based on the first sensing data and the second sensing data includes: The acceleration data in the target sensing data is decomposed and calculated to obtain the target angle between the gravitational components in the first axis direction and the second axis direction corresponding to the acceleration data; The target angle is converted to obtain the screen state of the target screen corresponding to the target sensing data; Wherein, the first axis direction and the second axis direction are two axis directions of the plane coordinate system in which the target screen is located, and the target sensing data includes the first sensing data or the second sensing data.

3. The method according to claim 2, characterized in that, The screen state also includes any one of the following: a first state, a second state, a third state, and a fourth state, wherein different screen states are used to indicate that the processed target angle is located in different preset angle ranges, and the processed target angle is the angle between the target screen and the ground.

4. The method according to claim 3, characterized in that, The switching process for the first camera module corresponding to the first screen and the second camera module corresponding to the second screen based on the respective screen states of the first screen and the second screen includes: When the screen states of the first screen and the second screen meet the preset state conditions, the first camera module corresponding to the first screen and the second camera module corresponding to the second screen are switched. The preset state conditions include the screen state indicator of the target screen being in a preset second range, and the screen angle between the first screen and the second screen being in a preset third range.

5. The method according to claim 4, characterized in that, The preset state condition is that the screen states of the first screen and the second screen respectively include the second state and the fifth state; or, the preset state condition is that the screen states of the first screen and the second screen respectively include the fourth state and the fifth state.

6. The method according to claim 5, characterized in that, If the first camera module is an external screen camera module and the second camera module is an internal screen camera module, then the switching process between the first camera module corresponding to the first screen and the second camera module corresponding to the second screen includes: When the preset state condition is that the screen states of the first screen and the second screen each include the second state and the fifth state, the first camera module is switched to the second camera module to take pictures using the second camera module; or, When the preset state condition is that the screen states of the first screen and the second screen respectively include the fourth state and the fifth state, the second camera module is switched to the first camera module to take pictures using the first camera module.

7. The method according to claim 6, characterized in that, The method further includes: Output the target state; or, When the screen states of the first screen and the second screen do not meet the preset state conditions, the target state is output. The target state is determined based on the respective screen states of the first screen and the second screen.

8. The method according to any one of claims 1-7, characterized in that, Before determining the screen states of the first screen and the second screen based on the first sensing data and the second sensing data, the method further includes: Based on the first sensing data and the second sensing data, determine the screen angle between the first screen and the second screen; When the screen angle is within a preset fourth interval, the step of determining the screen state of the first screen and the second screen based on the first sensor data and the second sensor data continues to be executed.

9. A camera module switching device, characterized in that, include: The acquisition module is configured to acquire first sensing data and second sensing data, wherein the first sensing data is obtained by monitoring the screen state of the first screen based on the first sensor, and the second sensing data is obtained by monitoring the screen state of the second screen based on the second sensor. The processing module is configured to determine the screen state of the first screen and the second screen respectively based on the first sensing data and the second sensing data, wherein the screen state is used to indicate the angle between the target screen and the ground, and the target screen includes the first screen or the second screen. The processing module is further configured to switch between the first camera module corresponding to the first screen and the second camera module corresponding to the second screen based on the respective screen states of the first screen and the second screen. The screen state includes a fifth state, and the processing module is further configured to: Determine whether the target sensing data meets the preset attitude conditions; If so, continue with the step of decomposing and calculating the acceleration data in the target sensing data; otherwise, determine the screen state of the target screen as the fifth state. The preset attitude conditions include the fact that the magnitude of the acceleration data in the target sensing data is not within a preset range, and / or the angle between the gravitational component of the acceleration data in the target sensing data in the third axis direction and the gravitational force of the center of gravity of the target screen in the preset gravity direction is within a preset first range, wherein the third axis direction is the axis direction perpendicular to the plane coordinate system in which the target screen is located.

10. A terminal device, characterized in that, The terminal device includes a first screen, a second screen, a first sensor, a second sensor, a first camera module, and a second camera module, wherein the first camera module is disposed on the first screen, and the second camera module is disposed on the second screen. The terminal device further includes: processor; Memory used to store processor-executable instructions; The processor is configured to execute the executable instructions to implement the steps of the method according to any one of claims 1-8.

11. A computer-readable storage medium storing computer program instructions thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-8.

12. A chip, characterized in that, It includes a processor and an interface; the processor is used to read instructions to execute the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Image display method and electronic equipment

    CN114257671A

  • Electronic device

    CN115733910A