Photographing method, electronic equipment and storage medium

CN121890101APending Publication Date: 2026-04-17HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-08-13
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

In electronic devices equipped with folding screens, users need to manually switch the front camera and rear camera for selfies, which is cumbersome.

Method used

By installing motion sensors on electronic devices, users can recognize their flipped selfie actions and automatically switch to the rear camera to take selfies, reducing user operations.

Benefits of technology

It realizes that electronic devices automatically recognize the user's intention to take selfies through the rear camera, automatically switch the camera, save user operations and improve Selfie experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121890101A_ABST
    Figure CN121890101A_ABST
Patent Text Reader

Abstract

The invention provides a photographing method, electronic equipment and a storage medium. The photographing method is applied to the electronic equipment comprising a flexible display screen. The electronic equipment receives first user operation, the electronic equipment displays a first selfie picture on a first display screen, the first selfie picture comprises a face image, and the first selfie picture is a picture frame collected by a front camera; the electronic equipment receives a second user operation; the electronic equipment obtains first motion data collected by a first motion sensor; the electronic equipment determines that the second user operation is a flip selfie action based on the first motion data; the electronic equipment starts a rear camera, a second selfie picture is displayed on a second display screen, and the second selfie picture is a picture frame collected by the rear camera. Through the method, the electronic equipment can identify the intention of the user for self-photographing through the rear camera, and automatically switch to the rear camera for self-photographing, so that the operation of the user is saved.
Need to check novelty before this filing date? Find Prior Art

Description

Photographing method, electronic device and storage medium

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on September 19, 2023, with application number 202311215558.7 and application name “A photographing method, electronic device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field

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

[0003] With the rapid development of digital technology, smart terminal devices have become indispensable items in people's lives.

[0004] Flexible screens are currently attracting significant attention for their unique properties and enormous potential. Compared to traditional screens, flexible screens are more flexible and bendable, offering users new ways to interact with their devices based on their bendability, meeting their diverse needs for electronic devices. For electronic devices equipped with foldable screens, the foldable display can be switched between a small screen in its folded form and a large screen in its unfolded form at any time.

[0005] A foldable screen can include an upper and lower folding screen and an outward folding screen. Both the upper and lower folding screens include front and rear cameras. The foldable screen can be switched back and forth between the folded and unfolded states. When the foldable screen is in the folded state, the user can manually switch to the front camera or the rear camera for selfies, which is relatively cumbersome.

[0006] Summary of the Invention

[0007] The present application provides a photographing method, an electronic device and a storage medium, which enable the electronic device to recognize the user's intention to take a selfie with the rear camera and automatically switch to the rear camera for selfie, saving user operation.

[0008] In a first aspect, the present application provides a photographing method, which is applied to an electronic device including a flexible display screen, the flexible display screen including a first display screen and a second display screen, the first display screen including a front camera and a first motion sensor, the back of the first display screen including a rear camera, and when the flexible display screen is in a folded state, the first display screen and the second display screen are arranged back to back to each other, the method including: the electronic device receives a first user operation; in response to the first user operation, the electronic device displays a first selfie picture on the first display screen, the first selfie picture includes a face image, and the first selfie picture is a picture frame captured by the front camera; the electronic device receives a second user operation; the electronic device obtains first motion data captured by the first motion sensor; the electronic device determines that the second user operation is a flip selfie action based on the first motion data; in response to the second user operation being a flip selfie action, the electronic device turns on the rear camera and displays a second selfie picture on the second display screen, and the second selfie picture is a picture frame captured by the rear camera.

[0009] Through this method, the electronic device can recognize the user's intention to take a selfie with the rear camera and automatically switch to the rear camera to take a selfie, saving user operations.

[0010] In combination with the first aspect, in a possible implementation method, the electronic device determines that the second user operation is a flip selfie action based on the first motion data, specifically including: the electronic device inputs the first motion data into the intention recognition model, and determines that the second user operation is a flip action through the intention recognition model; in response to the second user operation being a flip action, when the first motion data meets the first condition, the electronic device determines that the first user operation is a flip selfie action; wherein the first condition includes any one or more of the following: the linear acceleration of the electronic device is less than the third value, the motion trajectory length of the electronic device is less than the third value, and the rotation radius of the electronic device is less than the fifth value.

[0011] In conjunction with the first aspect, in one possible implementation, a direction perpendicular to the left and right edges of the electronic device and pointing from the left edge of the electronic device to the right edge of the electronic device is used as the positive direction of the X axis, a direction perpendicular to the upper and lower edges of the electronic device and pointing from the lower left edge of the electronic device to the upper edge of the electronic device is used as the positive direction of the Y axis, and a direction perpendicular to the X and Y axes and away from the rear camera is used as the positive direction of the Z axis; before the electronic device inputs the first motion data into the intent recognition model, the method further includes: if the first motion data satisfies the second condition, the electronic device inputs the first motion data into the intent recognition model;

[0012] The second condition includes any one or more of the following: the angular velocity moduli of the X-axis, Y-axis, and Z-axis are greater than a first value, and the integral of the Y-axis angular velocity within the first time period is greater than a second value.

[0013] In combination with the first aspect, in a possible implementation method, the electronic device obtains the first motion data collected by the first motion sensor, specifically including: after monitoring that the face image in the picture frame collected by the front camera disappears, the electronic device obtains the first motion data collected by the first motion sensor.

[0014] In combination with the first aspect, in a possible implementation, the method further includes: in response to displaying the second selfie picture on the second display screen, the electronic device turns off the front camera and turns off the first display screen.

[0015] In combination with the first aspect, in a possible implementation, after the electronic device turns on the rear camera, the method further includes: the electronic device turns off the front camera and turns off the first display screen.

[0016] In combination with the first aspect, in one possible implementation, the electronic device displays a second selfie picture on the second display screen, specifically including: when it is detected that the picture frame captured by the rear camera includes a face image, the electronic device starts displaying the second selfie picture on the second display screen.

[0017] In combination with the first aspect, in one possible implementation, the electronic device displays a second selfie picture on the second display screen, specifically including: when it is monitored that the picture frame captured by the rear camera does not include a facial image and no user operation is received on the first display screen within a second time period, the electronic device displays the second selfie picture on the second display screen.

[0018] In combination with the first aspect, in a possible implementation, the method also includes: when it is monitored that the picture frame captured by the rear camera does not include a facial image, and the electronic device receives an operation performed by the user on the first display screen within a second time period, the electronic device turns off the rear camera.

[0019] In combination with the first aspect, in a possible implementation, the method further includes: the electronic device turns on the front camera and continues to display the picture frames captured by the front camera on the first display screen.

[0020] In combination with the first aspect, in a possible implementation, the second display screen also includes a second motion sensor; before the electronic device determines that the second user operation is a flip selfie action based on the first motion data, the method also includes: the electronic device obtains the second motion data collected by the second motion sensor; the electronic device determines that the second user operation is a flip selfie action based on the first motion data, specifically including: the electronic device determines that the second user operation is a flip selfie action based on the first motion data and the second motion data.

[0021] With reference to the first aspect, in a possible implementation, the first motion sensor includes an acceleration sensor and / or an angular velocity sensor, and the first motion data includes acceleration data or angular velocity data.

[0022] With reference to the first aspect, in a possible implementation, the second motion sensor includes an acceleration sensor and / or an angular velocity sensor, and the second motion data includes acceleration data or angular velocity data.

[0023] In a second aspect, the present application provides an electronic device comprising one or more cameras, one or more processors and one or more memories; wherein, the one or more cameras, one or more memories are coupled to one or more processors, and the one or more memories are used to store computer program code, and the computer program code includes computer instructions. When the one or more processors execute the computer instructions, a shooting method in any possible implementation of any of the above aspects is executed.

[0024] In a third aspect, an embodiment of the present application provides a computer storage medium comprising computer instructions, which, when executed on an electronic device, enables a communication device to execute a shooting method in any possible implementation of any of the above aspects.

[0025] In a fourth aspect, an embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute a shooting method in any possible implementation of any of the above aspects.

[0026] For the beneficial effects of the second to fourth aspects, reference may be made to the description of the beneficial effects in the first aspect, and this application will not go into details here. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] FIG1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0028] FIG2 is a software structure block diagram of an electronic device 100 provided in an embodiment of the present application;

[0029] FIG3A is a schematic diagram of a display configuration of an outward folding screen in an unfolded state provided by an embodiment of the present application;

[0030] FIG3B is a schematic diagram of a display configuration of an external folding screen in a folded state provided by an embodiment of the present application;

[0031] FIG3C is a schematic diagram of a display configuration of an outward folding screen in an intermediate state provided by an embodiment of the present application;

[0032] FIG4A shows a schematic diagram of the electronic device 100. FIG7 shows a schematic diagram of the composition structure of the server 200 in the unfolded state;

[0033] FIG4B shows a schematic diagram of the electronic device 100 in a folded state;

[0034] Figures 5A-5C show schematic diagrams of a user switching between front and rear cameras to take a selfie;

[0035] 6A-6E are schematic diagrams showing the electronic device 100 automatically turning on the rear camera and displaying a facial image captured by the rear camera on screen B;

[0036] FIG7 shows a schematic diagram of a functional module provided by the present application;

[0037] FIG8 is a schematic diagram showing the working principle of the motion detection module;

[0038] FIG9A shows a schematic diagram of the X-axis, Y-axis and Z-axis directions;

[0039] FIG9B is a schematic diagram showing the modulus values ​​of three-axis angular velocity in window data obtained by a motion detection module;

[0040] 9C-9D are schematic diagrams showing a flipping motion trajectory of the electronic device 100;

[0041] FIG10 is a schematic diagram showing the working principle of the intention correction module. DETAILED DESCRIPTION

[0042] The following is a clear and detailed description of the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0043] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0044] The term "user interface (UI)" in the following embodiments of this application refers to the media interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. A common form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operations that is displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.

[0045] Referring to FIG1 , FIG1 shows a schematic structural diagram of an electronic device.

[0046] The electronic device 100 may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, an artificial intelligence (AI) device, a wearable device, an in-vehicle device, a smart home device, and / or a smart city device. The embodiments of the present application do not impose any particular restrictions on the specific type of the electronic device.

[0047] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, 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.

[0048] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0049] 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.

[0050] 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.

[0051] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0052] 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.

[0053] 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 bus lines. 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 implementing the touch function of the electronic device 100.

[0054] 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.

[0055] 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.

[0056] 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.

[0057] 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 electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.

[0058] 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.

[0059] 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 electronic device 100, or to transfer data between the electronic device 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.

[0060] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0061] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.

[0062] 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, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

[0063] The wireless communication function of the electronic device 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.

[0064] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

[0065] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 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.

[0066] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0067] 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 electronic device 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.

[0068] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0069] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A 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.

[0070] Display screen 194 is used to display images, videos, and the like. 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 (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.

[0071] Display screen 194 can be a folding screen. Display screen 194 can include but is not limited to inner folding screen, outer folding screen and upper and lower folding screen etc.

[0072] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0073] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise and brightness. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.

[0074] 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 light 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 electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0075] The electronic device 100 may include one or more front cameras, one or more rear cameras, etc.

[0076] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0077] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0078] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.

[0079] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).

[0080] Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory.

[0081] Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle; single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage cell potential level; universal flash storage (UFS) and embedded multi media card (eMMC) can be divided into UFS and eMMC according to the storage specification.

[0082] The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data.

[0083] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .

[0084] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 via the external memory interface 120 to implement data storage. For example, files such as music and videos can be stored in the external non-volatile memory.

[0085] The electronic device 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.

[0086] 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. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0087] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.

[0088] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.

[0089] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.

[0090] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0091] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.

[0092] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0093] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0094] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.

[0095] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). It can also detect the magnitude and direction of gravity when electronic device 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.

[0096] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.

[0097] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0098] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 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 light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.

[0099] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0100] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.

[0101] The touch sensor 180K is also called a "touch-sensitive 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 electronic device 100, at a location different from that of the display screen 194.

[0102] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals from the vibrating bones of the human body. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulse signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bones of the human body obtained by the bone conduction sensor 180M to implement voice functions. The application processor can parse heart rate information based on the blood pressure pulse signals obtained by the bone conduction sensor 180M to implement heart rate detection functions.

[0103] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0104] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0105] 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.

[0106] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0107] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.

[0108] FIG2 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present invention.

[0109] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0110] The application layer can include a series of application packages.

[0111] As shown in FIG2 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.

[0112] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0113] As shown in FIG2 , the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.

[0114] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0115] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0116] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0117] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).

[0118] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0119] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include text messages in the status bar, beeps, vibrations on electronic devices, and flashing indicator lights.

[0120] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.

[0121] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0122] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0123] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0124] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0125] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0126] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0127] A 2D graphics engine is a drawing engine for 2D drawings.

[0128] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0129] Next, the form of the electronic device 100 will be described.

[0130] The electronic device 100 provided in this application can be an outward folding screen or an upward and downward folding screen.

[0131] 1. External folding screen

[0132] The external folding screen can be divided into three display states: unfolded, intermediate and folded.

[0133] (a) and (b) in FIG. 3A show the display form when the outer folding screen is in the unfolded state.

[0134] Among them, (a) in Figure 3A exemplarily shows a front view of the outer folding screen when it is in the unfolded state. Among them, when the outer folding screen is in the unfolded state, the displayable screens of the folding screen include screen A and screen B. Screen A and screen B can be a complete display screen or two independent display screens. Exemplarily, when the inner folding screen is in the unfolded state, the angle α between screen A and screen B is greater than angle one and less than or equal to 180 degrees. Exemplarily, the value of angle one can be between 170 degrees and 180 degrees. Exemplarily, if the value of angle one is 180 degrees, when the outer folding screen is in the unfolded state, the angle α between screen A and screen B can be 180 degrees.

[0135] As shown in (a) of FIG3A , a front camera is displayed on screen B, and the user can take a selfie using the front camera.

[0136] Figure 3A(b) shows an exemplary rear view of the outer folding screen in the unfolded state. When the outer folding screen is in the unfolded state, screen A and screen B cannot be displayed compared to when the inner folding screen is in the unfolded state.

[0137] FIG3B shows the display form when the outer folding screen is in a folded state.

[0138] As shown in (a) of Figure 3B, when the outer folding screen is in the folded state, screen B and screen A are arranged relative to each other. Exemplarily, when the outer folding screen is in the folded state, screen B is in the screen-on state, screen A is in the screen-off state, and the angle α between screens A and B is greater than or equal to 0 degrees and less than angle 2. Exemplarily, the value of angle 2 can be between 0 degrees and 10 degrees. Exemplarily, if the value of angle 2 is 0 degrees, when the outer folding screen is in the folded state, the angle α between screens A and B can be 0 degrees. When screen B is in the screen-on state, users can take selfies with the front camera.

[0139] As shown in (b) of Figure 3B, when the outer folding screen is in the folded state, screen B and screen A are arranged relative to each other. Exemplarily, when the outer folding screen is in the folded state, screen B is in the off state, screen A is in the bright state, and the angle α between screens A and B is greater than or equal to 0 degrees and less than angle 2. Exemplarily, the value of angle 2 can be between 0 degrees and 10 degrees. Exemplarily, if the value of angle 2 is 0 degrees, when the outer folding screen is in the folded state, the angle α between screens A and B can be 0 degrees. When screen A is in the bright state, users can take selfies with the rear camera.

[0140] FIG3C shows the display state when the outer folding screen is in an intermediate state.

[0141] The intermediate state is when the external folding screen can bend in a direction opposite to screen A and screen B, forming a folded configuration with a certain angle. When the external folding screen is in the intermediate state, the display screens of the folding screen include screen A and screen B, and the angle α between screens A and B is greater than or equal to angle 2 and less than or equal to angle 1. For example, the angle α between screens A and B can be 120 degrees.

[0142] In some embodiments, screen B may be referred to as a first display screen, and screen A may be referred to as a second display screen.

[0143] 2. Folding screen up and down

[0144] The upper and lower folding screens can be divided into three display states: unfolded, intermediate and folded.

[0145] FIG4A shows a schematic diagram of the electronic device 100 in an unfolded state.

[0146] FIG4A(a) shows a front view of the electronic device 100 in an unfolded state. As shown in FIG4A(a), the electronic device 100 includes a screen A, a screen B, and a folding line 201.

[0147] Optionally, screen A and screen B can be a complete display screen.

[0148] In the unfolded state, screens A and B face the user, and the angle between them is approximately 180°. That is, the plane of screen A and the plane of screen B are on the same horizontal plane. In the unfolded state, electronic device 100 can display images on screens A and B simultaneously. This allows the user to view images from both screens A and B simultaneously.

[0149] Fig. 4A(b) shows a rear view of the electronic device 100 in an unfolded state. As shown in Fig. 4A(b), the electronic device 100 includes a rear camera.

[0150] FIG4B(a) shows a front view of the electronic device 100 in the folded state. FIG4B(b) shows a rear view of the electronic device 100 in the folded state.

[0151] As shown in (a) and (b) of Figure 4B , in the folded state, the angle formed by the plane of screen A and the plane of screen B is close to 0°, and screens A and B are arranged opposite each other. For example, when the electronic device 100 is in the folded state, screen A is in the on-screen state and screen B is in the off-screen state. Alternatively, when the electronic device 100 is in the folded state, screen B is in the on-screen state and screen A is in the off-screen state.

[0152] In some embodiments, screen B may be referred to as a first display screen, and screen A may be referred to as a second display screen.

[0153] The following embodiments of the present application are described using an external folding screen as an example. The present application is also applicable to an upper and lower folding screen.

[0154] 5A-5C are schematic diagrams showing a user switching between the front and rear cameras to take a selfie.

[0155] For example, the electronic device 100 is in a folded state, screen A of the electronic device 100 is in a bright screen state, and screen B of the electronic device 100 is in a dark screen state. The user can open the camera on screen A to take a selfie, and the electronic device 100 can display the selfie image on screen A.

[0156] For example, FIG5A shows the main interface of the electronic device 100. The main desktop of the electronic device 100 includes icons for multiple applications, such as a clock application icon, a calendar application icon, a smart life application icon, a memo application icon, a game application icon, a recipe application icon, a recorder application icon, a calculator application icon, a video application icon, a weather application icon, a browser application icon, a map application icon, a music application icon, a sports and health application icon, etc. A page indicator is also displayed below the icons of the multiple applications to indicate the total number of desktops, the position of the negative one screen, the position of the currently displayed desktop, and the positional relationship between the currently displayed desktop and other desktops. A tray area or dock bar (Dock bar) is displayed below the page indicator. The tray area includes multiple tray icons, such as a camera application icon, a contacts application icon, a phone application icon, and an information application icon. The tray area remains displayed when the page is switched. In some embodiments, the above-mentioned page indicator and the above-mentioned tray icon are also optional, and the embodiments of the present application are not limited to this.

[0157] As shown in Figure 5A, electronic device 100 can receive a user input operation (e.g., a single click) on a camera application icon. In response to the user input operation, electronic device 100 can display user interface 510 shown in Figure 5B. User interface 510 is a user interface for a shooting and display service provided by electronic device 100 according to an embodiment of the present application, and can also be called a preview interface.

[0158] As shown in FIG5B , the preview interface may include a mode bar, a shooting control, a preview window, a review control, and an option to switch between front and rear cameras.

[0159] The mode bar may include multiple shooting mode options, such as "Night Scene", "Portrait", "Photo", "Video", etc. Different shooting modes can provide users with shooting services with different effects. Users can select any of the multiple shooting modes to shoot according to different needs. For example, "Photo" may be the default shooting mode for taking photos. "Video" is used to record videos. The "Night Scene" mode is suitable for shooting scenes with dim light, such as at night. The "Portrait" mode is suitable for shooting scenes where the subject is a person. The electronic device 100 can also provide more shooting modes, such as "Large Aperture", "Movie", "Professional", etc., which will not be listed here one by one.

[0160] The electronic device 100 can detect user operations on the shooting mode options in the mode bar and change the currently used shooting mode according to the above user operations. The above user operations are, for example, left / right swipe operations. For example, when it is detected that the mode bar is dragged and swiped to the left (left swipe operation) and the float stops at the "Portrait" option, the electronic device 100 can switch to the "Portrait" mode. By default, the electronic device 100 first uses the "Photograph" mode.

[0161] The capture control is used to trigger a photo. The electronic device 100 can detect whether a user action, such as a click, is applied to the capture control. Upon detecting a user action on the capture control, the electronic device 100 can generate a capture instruction. Based on the capture instruction, the electronic device 100 can retrieve the image reported by the camera at the corresponding timestamp and save it as a photo.

[0162] The preview window can be used to display the image reported by the camera in real time. In different shooting modes, the electronic device 100 can process the image reported by the camera to improve the display effect of the image. For example, in "portrait" mode, the electronic device 100 can blur the background of the image reported by the camera to highlight the portrait. Here, the preview window can display the image processed by the image processing algorithm corresponding to the different shooting modes in real time, so that the user can perceive the shooting effects corresponding to the different shooting modes in real time. The image shown in Figure 5B is a face image captured by the front camera of the electronic device 100.

[0163] The review control can be used to browse thumbnails of photos / videos that have been taken. When a user operation acting on the review control is detected, the electronic device 100 can also display the best photo corresponding to the thumbnail.

[0164] The preview interface also includes a quick function area. The quick function area may include controls for the protagonist video mode, controls for switching selfie mode, flash controls, color mode controls, setting controls, and the like. The controls for the protagonist video mode can be used to trigger the electronic device 100 to identify the protagonist among multiple characters in the preview screen when turned on. The control for switching selfie mode can be used to switch the front camera selfie mode or the rear camera selfie mode. For example, if the front camera is currently in selfie mode, the electronic device 100 can click the control for switching selfie mode, and the electronic device 100 will turn on the rear camera and display the image captured by the rear camera on the B screen. The flash control can be used to trigger the electronic device 100 to turn on or off the flash. The color mode control can be used to trigger the electronic device 100 to use a color filter to process the image captured by the camera.

[0165] The switch front / rear camera option can be used to receive a user operation to switch back and forth between the front camera and the rear camera. For example, the electronic device 100 can receive a user input operation for switching the front / rear camera option and display the image captured by the rear camera on the A screen.

[0166] For example, as shown in FIG5B , the electronic device 100 may receive a user input operation (e.g., a single click) for switching the selfie mode control in the user interface 510. In response to the user input operation, the electronic device 100 may turn on the rear camera, light up the B screen, and display the image captured by the rear camera on the B screen.

[0167] The user can flip the electronic device 100 180 degrees so that the B screen of the electronic device 100 faces the user and the A screen of the electronic device 100 faces away from the user. Then the rear camera of the electronic device 100 can capture the user's facial image and display the facial image on the B screen.

[0168] 5C , the electronic device 100 may display the user interface 520 shown in FIG5C on screen B. The user interface 520 includes a mode bar, a shooting control, a preview window, a review control, and a front / rear camera switch option.

[0169] The Mode bar includes multiple shooting mode options, such as "Portrait," "Photo," and "Video." Different shooting modes provide users with different shooting effects. Users can select any of these shooting modes to suit their needs. For example, "Photo" is the default shooting mode for taking photos. "Video" is used for recording videos. "Portrait" mode is suitable for shooting scenes with people as the subject.

[0170] The electronic device 100 can detect user operations on the shooting mode options in the mode bar and change the currently used shooting mode according to the above user operations. The above user operations are, for example, left / right swipe operations. For example, when it is detected that the mode bar is dragged and swiped to the left (left swipe operation) and the float stops at the "Portrait" option, the electronic device 100 can switch to the "Portrait" mode. By default, the electronic device 100 first uses the "Photograph" mode.

[0171] The capture control is used to trigger a photo. The electronic device 100 can detect whether a user action, such as a click, is applied to the capture control. Upon detecting a user action on the capture control, the electronic device 100 can generate a capture instruction. Based on the capture instruction, the electronic device 100 can retrieve the image reported by the camera at the corresponding timestamp and save it as a photo.

[0172] The preview window can be used to display the image reported by the camera in real time. In different shooting modes, the electronic device 100 can process the image reported by the camera to improve the display effect of the image. For example, in "portrait" mode, the electronic device 100 can blur the background of the image reported by the camera to highlight the portrait. Here, the preview window can display the image processed by the image processing algorithm corresponding to the different shooting modes in real time, so that the user can perceive the shooting effects corresponding to the different shooting modes in real time. The image shown in Figure 5C is a face image captured by the rear camera of the electronic device 100.

[0173] The review control can be used to browse thumbnails of photos / videos that have been taken. When a user operation acting on the review control is detected, the electronic device 100 can also display the best photo corresponding to the thumbnail.

[0174] The preview interface also includes a quick function area. The quick function area may include a selfie mode switch control, a color mode control, a settings control, and the like. The selfie mode switch control can be used to switch between the front camera selfie mode and the rear camera selfie mode. For example, if the rear camera is currently in selfie mode, the electronic device 100 can click the selfie mode switch control to turn off the rear camera and turn off the B screen. The color mode control can be used to trigger the electronic device 100 to use a color filter to process the image captured by the camera.

[0175] The switch front / rear camera option can be used to receive a user operation to switch back and forth between the front camera and the rear camera. For example, the electronic device 100 can receive a user input operation for switching the front / rear camera option and display the image captured by the front camera on the B screen.

[0176] The user is not limited to switching the front camera selfie mode or the rear camera selfie mode by switching the selfie mode control. The user can also switch the front camera selfie mode or the rear camera selfie mode by gesture operation or shortcut keys, etc. This application does not limit this.

[0177] As can be seen from Figures 5A to 5C, if the user wants to take a selfie with the rear camera of the electronic device 100, the user needs to manually turn on the rear camera of the electronic device 100 and then flip the phone before taking a selfie with the rear camera of the electronic device 100 and viewing the user's facial image captured by the rear camera on screen B. The operation is rather cumbersome.

[0178] Based on this, the present application provides a shooting method that does not require user operation. The electronic device 100 can recognize the user's intention to use the rear camera and automatically turn on the rear camera. The user only needs to flip the phone, and the electronic device 100 can display the facial image captured by the rear camera on the B screen, thereby improving the user's selfie experience.

[0179] In some embodiments, the image quality of the rear camera is higher than that of the front camera. Image quality may include, but is not limited to, image clarity, image color, image noise, image jitter, image exposure, etc.

[0180] Selfie scene

[0181] 6A-6E are schematic diagrams showing the electronic device 100 automatically turning on the rear camera and displaying a facial image captured by the rear camera on screen B. FIG.

[0182] Figure 6A shows the main interface of the electronic device 100. The electronic device 100 can receive a user input operation (e.g., a single click) on the camera application icon in the main interface. In response to the user input operation, the electronic device 100 can display the user interface 610 shown in Figure 6B. The user interface 610 includes a mode bar, a shooting control, a preview window, a review control, and an option to switch between the front and rear cameras. In response to the user input operation on the camera application icon in the main interface, the electronic device 100 can turn on the rear camera. The image displayed in the preview window in the user interface 610 is the image captured by the rear camera of the electronic device 100.

[0183] As shown in Figure 6B, the electronic device 100 can receive the user's input operation (such as a single click) for switching the front / rear camera option in the user interface 610. In response to the user's input operation, the electronic device 100 can turn on the front camera and display the facial image captured by the front camera in the preview window shown in Figure 6C.

[0184] In some embodiments, the user's input operation for switching the front / rear camera option in the user interface 610 may be referred to as a first user operation.

[0185] If the user wants to take a selfie with the rear camera, which has better image quality, the user can rotate the electronic device 100 180 degrees along the Y axis shown in Figure 6D, so that the B screen of the electronic device 100 faces the user and the A screen of the electronic device 100 is away from the user. In this way, the rear camera of the electronic device 100 can capture a facial image. When it is detected that the user wants to take a selfie with the rear camera of the electronic device 100, the electronic device 100 can turn on the rear camera of the electronic device 100 and display the image captured by the rear camera of the electronic device 100 on the B screen.

[0186] In some embodiments, the user can rotate the electronic device 100 180 degrees along the Y axis shown in Figure 6D so that the B screen of the electronic device 100 faces the user and the A screen of the electronic device 100 moves away from the user. This operation can be called a second user operation.

[0187] As shown in Figure 6E , user interface 630 is displayed on screen B of electronic device 100. As shown in Figures 6E and 6C , the display area of ​​screen B is smaller than the display area of ​​screen A, and the area of ​​user interface 630 is smaller than the area of ​​user interface 620. The image displayed in user interface 630 is a facial image captured by the rear camera of electronic device 100.

[0188] In this way, the electronic device 100 can recognize the user's intention to take a selfie through the rear camera, automatically turn on the rear camera for the user and display the image captured by the rear camera on the B screen, reducing user operations and improving the user's shooting experience.

[0189] Recognize the user's intention to take a selfie with the rear camera.

[0190] Next, how the electronic device 100 recognizes the user's intention to take a selfie through the rear camera is described in detail.

[0191] FIG7 shows a schematic diagram of a functional module provided by the present application.

[0192] As shown in FIG7 , the functional modules on the electronic device 100 include but are not limited to a detection trigger module, an action detection module, and an intention correction module.

[0193] The detection trigger module is turned on after the front camera of the electronic device 100 is turned on. When the front camera of the electronic device 100 is not turned on, that is, it is detected that the user is not taking a selfie, the detection trigger module may not be turned on to save power consumption of the electronic device 100.

[0194] Optionally, the detection trigger module can also be turned on for a long time, which is not limited in this application.

[0195] After the detection trigger module is turned on, the detection trigger module is used to obtain the first motion data collected by the first motion sensor on screen A and / or the second motion data collected by the second motion sensor on screen B.

[0196] In some embodiments, the first motion sensor and the second motion sensor may start collecting motion data only after the detection trigger module is turned on. The first motion sensor and the second motion sensor may also continuously collect motion data, which is not limited in this application.

[0197] In a possible implementation, the motion sensor is only provided on screen A of the electronic device 100 , and the detection trigger module may only obtain the first motion data collected by the first motion sensor on screen A.

[0198] In a possible implementation, only screen B of the electronic device 100 is provided with a motion sensor, and the detection trigger module may only obtain the second motion data collected by the second motion sensor on screen B.

[0199] In one possible implementation, motion sensors are provided on both screens A and B of electronic device 100, and the detection trigger module can obtain first motion data collected by the first motion sensor on screen A and second motion data collected by the second motion sensor on screen B. By using dual motion sensors to recognize the user's flipping action, the accuracy of the user's flipping action can be improved.

[0200] The first motion sensor may be an inertial measurement unit (IMU) for identifying a user's flipping motion of the phone. The first motion data may be acceleration data and angular velocity data collected by the inertial sensor.

[0201] The second motion sensor may also be an inertial sensor for identifying the user's action of flipping the phone. The second motion data may also be acceleration data and angular velocity data collected by the inertial sensor.

[0202] The detection trigger module monitors whether a face disappears from an image captured by the front camera. If the front camera is on and the face remains in the image captured by the front camera, and the user is still taking a selfie with the front camera, the motion detection module remains disabled.

[0203] When the front camera is turned on and the face image disappears from the image captured by the front camera, the user may flip the phone over. The motion detection module may be turned on, and the detection trigger module may obtain the first motion data and / or the second motion data and send it to the motion detection module. The motion detection module may determine the user's action of flipping the phone based on the first motion data and / or the second motion data.

[0204] The motion detection module is used to receive the first motion data and / or the second motion data sent by the detection trigger module after being turned on, and identify the flipping motion and the non-flipping motion based on the first motion data and / or the second motion data.

[0205] In the case of identifying a non-flipping action, the action detection module determines that the user has no intention of taking a selfie using the rear camera, and the process ends.

[0206] When a flipping action is identified, in some scenarios, the user may flip the phone and place it on a table or in a pocket. The action detection module needs to further determine whether the flipping action is a flipping selfie action or a flipping non-selfie action.

[0207] The action detection module is also used to send the identified flip selfie action result to the intention correction module after determining the flip selfie action.

[0208] The intention correction module is used to confirm or correct the flip selfie action identified by the action detection module through face detection and screen touch information after receiving the flip selfie action result sent by the action detection module, and confirm whether to turn on the rear camera and light up the B screen.

[0209] Optionally, the intention correction module may be turned on only after receiving the flip selfie action result sent by the action detection module to save power consumption of the electronic device 100. Optionally, the intention correction module may also be turned on for a long time, which is not limited in this application.

[0210] The intention correction module is specifically configured to, upon receiving the flip selfie action result from the action detection module, activate the rear camera and capture images through the rear camera. At this point, the electronic device 100 has not yet turned on screen B, and further determination is required based on face detection and screen touch information to determine whether the user is using the rear camera to take a selfie.

[0211] Specifically, when the rear camera recognizes a face image, it means that the user is currently using the rear camera to take a selfie. The electronic device 100 lights up the B screen and displays the image captured by the rear camera on the B screen.

[0212] When the rear camera does not recognize a facial image and detects that the user has not operated screen A, it means that the user is most likely using the rear camera to take a selfie, but the rear camera has not captured a facial image. The electronic device 100 lights up screen B and displays the image captured by the rear camera on screen B.

[0213] When the rear camera does not recognize a facial image and detects that the user is operating screen A, it means that the user is not currently using the rear camera to take a selfie. The electronic device 100 does not light up screen B and turns off the rear camera.

[0214] Next, we will introduce the working principles of the action detection module and intention correction module in detail.

[0215] First, the working principle of the motion detection module is introduced.

[0216] FIG8 is a schematic diagram showing the working principle of the motion detection module.

[0217] S801: The motion detection module pre-processes the first motion data and the second motion data to obtain first processed motion data and second processed motion data.

[0218] After the detection trigger module monitors that the face image disappears from the image captured by the front camera, the detection trigger module can send the first motion data and the second motion data to the action detection module. The action detection module can obtain the first motion data and the second motion data.

[0219] Optionally, the detection trigger module may also send only the first motion data or the second motion data to the action detection module. This application uses the example of the detection trigger module sending the first motion data and the second motion data to the action detection module at the same time as an example, which is not intended to be limiting.

[0220] After acquiring the first motion data and the second motion data, the motion detection module may preprocess the first motion data and the second motion data to obtain first processed motion data and second processed motion data. Preprocessing includes, but is not limited to, filtering. The filtering may be mean filtering, or other filtering methods, which are not limited in this application. In this way, the motion detection module preprocesses the first motion data and the second motion data to eliminate noise effects and achieve a smoother signal.

[0221] In some embodiments, the electronic device 100 may not execute S801, and this application does not limit this.

[0222] S802: The motion detection module needs to determine whether the first processed motion data and the second processed motion data meet a first preset condition.

[0223] Before inputting the first processed motion data and the second processed motion data into the intent recognition model, the motion detection module may determine whether the first processed motion data and the second processed motion data meet a first preset condition. The first processed motion data and the second processed motion data are then input into the intent recognition model after the first preset condition is met. If the first preset condition is not met, the motion detection module does not input the first processed motion data and the second processed motion data into the intent recognition model, thereby reducing the workload of the intent recognition model and saving power consumption of the electronic device 100.

[0224] If it is determined that the first processed motion data and the second processed motion data meet the first preset condition, S804 is executed. If it is determined that the first processed motion data and the second processed motion data do not meet the first preset condition, S803 is executed.

[0225] The first preset condition may include but is not limited to one or more of the following:

[0226] 1. The angular velocity modulus of the three axes (X-axis, Y-axis, and Z-axis) is greater than the first value.

[0227] FIG. 9A shows a schematic diagram of the X-axis, Y-axis, and Z-axis directions.

[0228] In some embodiments, the X-axis, Y-axis, and Z-axis coordinate systems shown in FIG. 9A may also be referred to as carrier coordinate systems.

[0229] As shown in FIG9A , the direction parallel to the left or right edge of the electronic device 100 and pointing from the lower edge of the electronic device 100 to the upper edge of the electronic device 100 is the positive direction of the Y axis. The direction parallel to the upper or lower edge of the electronic device 100 and pointing from the left edge of the electronic device 100 to the right edge of the electronic device 100 is the positive direction of the X axis. The positive direction of the X axis and the positive direction of the Y axis can determine the XY plane. The direction perpendicular to the XY plane and pointing from the back cover of the electronic device 100 to the screen of the electronic device 100 is the positive direction of the Z axis.

[0230] The modulus of the three-axis angular velocity indicates how quickly the user is flipping the phone. A larger modulus indicates a faster flip. When the modulus is greater than the first value, it indicates the user is flipping the phone quickly enough, suggesting the user is likely performing a flipping motion.

[0231] 2. The integral of the Y-axis angular velocity within the first duration is greater than the second value.

[0232] Exemplarily, the second value may be 120 degrees.

[0233] The first duration is approximately equal to the time it takes for the user to flip the phone.

[0234] The integral of the Y-axis angular velocity over the first duration indicates the angle at which the phone has been flipped. Generally speaking, when a user flips their phone to take a selfie with the rear camera, the angle is close to 180 degrees. If the change in the Y-axis angular velocity is greater than the second value, the angle is sufficiently large, indicating that the user may be flipping the phone.

[0235] The first preset condition may also be other conditions, which are not limited in this application.

[0236] In some embodiments, the first preset condition may also be referred to as the second condition.

[0237] The motion detection module needs to determine whether the first processed motion data and the second processed motion data meet the first preset condition. That is, the motion detection module needs to determine whether the first processed motion data meets the first preset condition and whether the second processed motion data meets the first preset condition. S804 is executed only when both the first processed motion data and the second processed motion data meet the first preset condition.

[0238] In some embodiments, after the motion detection module is enabled, it continuously acquires the first motion data and the second motion data. The motion detection module can read the motion data according to a fixed-length window and determine whether the motion data within the window meets a preset condition. If the motion data within the window meets the preset condition, the motion detection module then inputs the motion data within the window into the intention recognition model to determine whether a flipping action or a non-flipping action is involved.

[0239] The action detection module can obtain data from multiple windows. If each window data is input into the intent recognition model for detection, the intent recognition model will have a large workload. The action detection module will perform an initial screening of the window data, and only the window data that meets the first preset condition will be sent to the intent recognition model for detection. This reduces the workload of the intent recognition model and saves power consumption of electronic device 100.

[0240] The maximum value of the modulus of the angular velocity in the window data is greater than the first value, and the integral of the Y-axis angular velocity in the first time period in the window data is greater than the second value.

[0241] For example, FIG9B shows a schematic diagram of three-axis angular velocity modulus values ​​in window data obtained by a motion detection module.

[0242] As shown in FIG9B , window 1, window 2, and window 3 are of fixed length. The horizontal axis represents the data frame acquired by the motion detection module, and the vertical axis represents the angular velocity modulus.

[0243] For example, the first value may be 4.

[0244] The maximum value of the three-axis angular velocity modulus of window 1 is 3.6, which is less than 4. Therefore, the motion detection module does not input the motion data in window 1 into the intention recognition model.

[0245] The maximum value of the three-axis angular velocity modulus in window 2 is 4.1, which is greater than 4. Therefore, the motion detection module must also calculate the change in the Y-axis angular velocity corresponding to the motion data in window 2. If the change in the Y-axis angular velocity corresponding to the motion data in window 2 is greater than a second value, for example, greater than 120 degrees, the motion detection module must input the motion data in window 21 into the intent recognition model. If the change in the Y-axis angular velocity corresponding to the motion data in window 2 is less than the second value, for example, less than 120 degrees, the motion detection module does not input the motion data in window 2 into the intent recognition model.

[0246] The maximum value of the three-axis angular velocity modulus in window 3 is 4.95, which is greater than 4. The motion detection module must also calculate the change in the Y-axis angular velocity corresponding to the motion data in window 3. If the change in the Y-axis angular velocity corresponding to the motion data in window 3 is greater than a second value, for example, greater than 120 degrees, the motion detection module must input the motion data in window 3 into the intent recognition model. If the change in the Y-axis angular velocity corresponding to the motion data in window 3 is less than the second value, for example, less than 120 degrees, the motion detection module does not input the motion data in window 3 into the intent recognition model.

[0247] S803, end.

[0248] When it is determined that the first processed motion data and the second processed motion data do not satisfy the first preset condition, the first processed motion data and the second processed motion data may not be input into the intention recognition model, and the process ends.

[0249] S804: The motion detection module obtains first feature data through the first motion data and obtains second feature data through the second motion data.

[0250] The first motion data may include acceleration data and angular velocity data collected by the first motion sensor on screen A.

[0251] The second motion data may include acceleration data and angular velocity data collected by the second motion sensor on screen B.

[0252] The characteristic data include but are not limited to: three-axis acceleration of the carrier system, three-axis angular velocity of the carrier system, three-axis acceleration of the navigation system, acceleration modulus, angular velocity modulus, horizontal angular increment, vertical angular increment, three-axis velocity, position, gyroscope data differential, etc.

[0253] The three-axis acceleration of the carrier system may refer to the original three-axis acceleration collected by the first motion sensor, and the three-axis acceleration of the carrier system includes gravity acceleration and motion acceleration.

[0254] The three-axis angular velocity of the carrier system may refer to the original three-axis angular velocity collected by the first motion sensor.

[0255] The three-axis acceleration of the navigation system can refer to the three-axis acceleration projected to the geodetic coordinate system after removing the gravity acceleration from the three-axis acceleration of the carrier system.

[0256] The acceleration modulus can be the value obtained by taking the square root of the sum of the squares of the three-axis acceleration of the flight system or the three-axis acceleration of the carrier system, namely, the X-axis angular velocity, the Y-axis angular velocity, and the Z-axis angular velocity.

[0257] The angular velocity modulus may refer to a value obtained by square rooting the sum of the squares of the X-axis angular velocity, the Y-axis angular velocity, and the Z-axis angular velocity of the three-axis angular velocity of the carrier system.

[0258] The horizontal angular increment may refer to projecting the three-axis angular velocity of the carrier system into the three-axis angular velocity of the geodetic coordinate system and calculating the angular velocity integral of the horizontal component.

[0259] The vertical angular increment may refer to projecting the three-axis angular velocity of the carrier system to the three-axis angular velocity of the geodetic coordinate system and calculating the angular velocity integral of the vertical component.

[0260] The three-axis velocity can refer to projecting the acceleration into the geodetic coordinate system and integrating it to obtain the three-axis velocity in the geodetic coordinate system.

[0261] Position can refer to the acceleration projected into the geodetic coordinate system, and performing a second integration can obtain the three-axis displacement components in the geodetic coordinate system.

[0262] The gyroscope data difference may refer to a value obtained after differential processing of the three-axis angular velocity of the carrier system, that is, a value obtained by subtracting the three-axis angular velocity of the carrier system in the previous frame from the three-axis angular velocity of the carrier system in the next two adjacent frames.

[0263] The first characteristic data includes but is not limited to one or more of the following: the three-axis acceleration of the first carrier system, the three-axis angular velocity of the first carrier system, the three-axis acceleration of the first navigation system, the first acceleration modulus, the first angular velocity modulus, the first horizontal angular increment, the first vertical angular increment, the first three-axis velocity, the first position, the first gyroscope data differential, etc.

[0264] The second characteristic data includes but is not limited to one or more of the following: three-axis acceleration of the second carrier system, three-axis angular velocity of the second carrier system, three-axis acceleration of the second navigation system, second acceleration modulus, second angular velocity modulus, second horizontal angular increment, second vertical angular increment, second three-axis velocity, second position, second gyroscope data differential, etc.

[0265] S805: The action detection module inputs the first feature data and the second feature data into the intention recognition model, and the intention recognition model outputs a first intention recognition result and a second intention recognition result.

[0266] In some embodiments, the intent recognition model can be a GRU model.

[0267] The action detection module inputs the first feature data and the second feature data into the intention recognition model, and the intention recognition model can output a first intention recognition result based on the first feature data and a second intention recognition result based on the second feature data.

[0268] The first intention recognition result includes a flipping action or a non-flipping action.

[0269] The second intention recognition result includes a flipping action or a non-flipping action.

[0270] The intent recognition model can be trained based on multiple sets of training samples obtained through preprocessing, and the intent recognition model can obtain a flipping action or a non-flipping action based on the feature data. The intent recognition model can be a neural network model, such as a convolutional neural network model or a recurrent neural network model. The embodiments of this application do not limit the type of intent recognition model.

[0271] The training samples may include multiple sets of feature data corresponding to flipping actions and multiple sets of feature data corresponding to non-flipping actions.

[0272] The characteristic data corresponding to the flipping action may include one or more of the following: the three-axis acceleration of the carrier system, the three-axis angular velocity of the carrier system, the three-axis acceleration of the navigation system, the acceleration modulus, the angular velocity modulus, the horizontal angular increment, the vertical angular increment, the three-axis velocity, the position, the gyroscope data differential, etc. corresponding to the flipping action.

[0273] The characteristic data corresponding to the non-flipping action may include one or more of the following: the three-axis acceleration of the carrier system, the three-axis angular velocity of the carrier system, the three-axis acceleration of the navigation system, the acceleration modulus, the angular velocity modulus, the horizontal angular increment, the vertical angular increment, the three-axis velocity, the position, the gyroscope data differential, etc. corresponding to the non-flipping action.

[0274] The above process of training the intention recognition model using multiple sets of training samples is to enable the intention recognition model to recognize a flipping action or a non-flipping action based on input feature data.

[0275] A trained intent recognition model can receive input feature data. This input feature data can include one or more of the following: carrier system three-axis acceleration, carrier system three-axis angular velocity, navigation system three-axis acceleration, acceleration modulus, angular velocity modulus, horizontal angular increment, vertical angular increment, three-axis velocity, position, gyroscope data differential, and the like. Based on the received input data, the trained intent recognition model can output a recognition result. This recognition result can include a flip action or a non-flip action.

[0276] Optionally, S804 and S805 may not be performed. S804 and S805 may be replaced by the following steps:

[0277] The motion detection module inputs the first processed motion data and the second processed motion data into the intention recognition model, and the intention recognition model outputs a first intention recognition result and a second intention recognition result.

[0278] That is to say, there is no need to process the first processed motion data and the second processed motion data to obtain the first feature data and the second feature data. The intention recognition model can directly obtain the first intention recognition result and the second intention recognition result based on the first processed motion data and the second processed motion data.

[0279] The intent recognition model can be trained based on multiple sets of training samples obtained through preprocessing, and the intent recognition model can obtain a flipping action or a non-flipping action based on the feature data. The intent recognition model can be a neural network model, such as a convolutional neural network model or a recurrent neural network model. The embodiments of this application do not limit the type of intent recognition model.

[0280] The training samples may include multiple sets of motion data corresponding to flipping actions and multiple sets of motion data corresponding to non-flipping actions.

[0281] The motion data corresponding to the flipping action may include acceleration data and angular velocity data corresponding to the flipping action.

[0282] The feature data corresponding to the non-flipping action may include acceleration data and angular velocity data corresponding to the non-flipping action.

[0283] The above process of training the intention recognition model using multiple sets of training samples is to enable the intention recognition model to recognize a flipping action or a non-flipping action based on the input motion data.

[0284] The trained intent recognition model can receive input motion data. The input motion data can include acceleration data and angular velocity data. Based on the received input data, the trained intent recognition model can output a recognition result. The recognition result can include a flip action or a non-flip action.

[0285] Preferably, the method steps shown in S804 and S805 can be used. Feature data is obtained based on motion data, and the intention recognition model then outputs a recognition result based on the feature data. Compared with the intention recognition model directly outputting a recognition result based on motion data, the recognition result output by the intention recognition model is more accurate.

[0286] S806: The action detection module needs to determine whether the first intention recognition result and the second intention recognition result are both flipping actions.

[0287] When it is determined that both the first intention recognition result and the second intention recognition result are flipping actions, the action detection module may determine that the user has flipped the phone, ie, execute S808 .

[0288] When it is determined that any one or both of the first intention recognition result and the second intention recognition result are not flipping actions, the action detection module may determine that the user has not flipped the phone, ie, execute S807.

[0289] S807, end.

[0290] S808: The action detection module needs to determine whether the flipping action is a flipping selfie action based on the first processed motion data and the second processed motion data.

[0291] After the motion detection module identifies a flipping action, it must further determine whether the flipping action is a flipping selfie action or a non-flipping selfie action. In some scenarios, users may flip their phone over and place it on a table, or rotate it 360 degrees to take a selfie. To improve the accuracy of the motion detection module's determination of a flipping selfie action, the module must exclude non-flipping selfie actions to avoid misjudgment.

[0292] The action detection module may determine that the flipping action is a flipping selfie action when the first processed motion data and the second processed motion data satisfy a second preset condition.

[0293] The second precondition may include but is not limited to any one or more of the following:

[0294] 1. The linear acceleration of the electronic device 100 is less than the third value.

[0295] The linear acceleration of the electronic device 100 may be obtained by subtracting the acceleration of gravity from the acceleration value collected by the motion sensor on the electronic device 100 .

[0296] 2. The length of the motion trajectory of the electronic device 100 is less than the fourth value. d = 0.5*a 2 Formula (1)

[0297] The electronic device 100 can obtain the length of the motion trajectory of the electronic device 100 through formula (1). As shown in formula (1), d represents the length of the motion trajectory of the electronic device 100, and a represents the linear acceleration of the electronic device 100.

[0298] 3. The rotation radius of the electronic device 100 is less than the fifth value. r = a / w 2 Formula (2)

[0299] The electronic device 100 can obtain the rotation radius of the electronic device 100 through formula (2). As shown in formula (2), r represents the rotation radius of the electronic device 100, a represents the linear acceleration of the electronic device 100, and w represents the angular velocity collected by the motion sensor on the electronic device.

[0300] As shown in FIG9C , when the user rotates the handheld electronic device 100 to take a selfie, the length of the motion trajectory of the electronic device 100 is d1 , and the rotation radius of the electronic device 100 is r1 .

[0301] As shown in FIG9D , when the user turns over the electronic device 100 and takes a selfie through the rear camera, the length of the motion trajectory of the electronic device 100 is d2, and the rotation radius of the electronic device 100 is r2.

[0302] As can be seen from Figures 9C and 9D, d1 is much greater than d2, and r1 is much greater than r2. Whether the flipping action is a flipping selfie action or a non-flipping selfie action can be determined based on one or more of the linear acceleration of the electronic device 100, the length of the motion trajectory of the electronic device 100, and the rotation radius of the electronic device 100.

[0303] Specifically, when the linear acceleration of the electronic device 100 is less than the third value and / or the motion trajectory length of the electronic device 100 is less than the fourth value and / or the rotation radius of the electronic device 100 is less than the fifth value, the action detection module can determine that the flipping action is a flip selfie action.

[0304] When the linear acceleration of the electronic device 100 is greater than the third value and / or the motion trajectory length of the electronic device 100 is greater than the fourth value and / or the rotation radius of the electronic device 100 is greater than the fifth value, the action detection module can determine that the flipping action is a non-flipping selfie action.

[0305] In some embodiments, the second preset condition may also be referred to as the first condition.

[0306] After the electronic device 100 determines that the flipping action is a flipping selfie action, S809 is executed.

[0307] After the electronic device 100 determines that the flipping action is a non-flipping selfie action, S810 is executed.

[0308] S809, end.

[0309] S810: The action detection module outputs a flip selfie action result.

[0310] After the electronic device 100 determines that the flipping action is a flipping selfie action, the action detection module outputs the flipping selfie action result. The action detection module can send the flipping selfie action result to the intention correction module, so that the intention correction module can determine whether to turn on the rear camera and light up the B screen.

[0311] Next, we will introduce the working principle of the intention correction module.

[0312] FIG10 is a schematic diagram showing the working principle of the intention correction module.

[0313] S1001. The intention correction module receives the flip selfie action result sent by the action detection module and turns on the rear camera.

[0314] After the action detection module obtains the flip selfie action result, the action detection module sends the flip selfie action result to the intention correction module.

[0315] In response to the flip selfie action result, the intention correction module turns on the rear camera. The intention correction module turns on the rear camera to monitor whether the rear camera recognizes a face image, thereby determining whether the user is taking a selfie with the rear camera.

[0316] At this time, the front camera is still on, and the image captured by the front camera is still displayed on screen A.

[0317] S1002: The intention correction module needs to determine whether the image captured by the rear camera includes a face image.

[0318] In response to the flip selfie action result, the intention correction module turns on the rear camera. The rear camera of the electronic device 100 begins to capture images. The intention correction module needs to determine whether the image captured by the rear camera includes a face image.

[0319] When it is determined that the image captured by the rear camera includes a face image, it can be determined that the user flips over the electronic device 100 and takes a selfie using the rear camera of the electronic device 100 , and S1003 is executed.

[0320] When it is determined that the image captured by the rear camera does not include a face image, the intention correction module needs to further confirm whether the user takes a selfie through the rear camera of the electronic device 100 and executes S1004.

[0321] In some embodiments, when it is determined that the image captured by the rear camera does not include a face image, if it is detected for a first consecutive period of time that the image captured by the rear camera does not include a face image, S1004 is executed again.

[0322] S1003. The intention correction module lights up screen B and displays the image captured by the rear camera on screen B.

[0323] If it is determined that the image captured by the rear camera includes a face image, it can be determined that the user turned the electronic device 100 over and took a selfie using the rear camera of the electronic device 100. The intention correction module lights up screen B and displays the image captured by the rear camera on screen B. In this way, when the user takes a selfie using the rear camera, the user can view the image captured by the rear camera on screen B.

[0324] At this time, the intention correction module turns off the front camera and turns off the A screen.

[0325] S1004. The intention correction module needs to determine whether screen A detects the user's touch operation.

[0326] When it is determined that the image captured by the rear camera does not include a face image, the intention correction module needs to further confirm whether the user is taking a selfie through the rear camera of the electronic device 100 .

[0327] The intention correction module can determine whether the user is taking a selfie with the rear camera after flipping the phone through the touch point on screen A. Specifically, when the intention correction module needs to determine that screen A has not detected the user's touch operation, it means that there is no touch point on screen A. The intention correction module can determine that the user is taking a selfie with the rear camera of electronic device 100, execute S1003, and the intention correction module lights up screen B and displays the image captured by the rear camera on screen B.

[0328] In some embodiments, when it is determined that the image captured by the rear camera does not include a facial image, if no touch is detected on screen A for the second consecutive period, that is, it is determined that screen A has not detected the user's touch operation for the first consecutive period, the intention correction module lights up screen B and displays the image captured by the rear camera on screen B.

[0329] When the intention correction module needs to determine that screen A detects a user's touch operation, it means that there is a touch point on screen A, that is, the user operates on screen A, and S1005 is executed.

[0330] At this time, the electronic device 100 still turns on the front camera and displays the image captured by the front camera on screen A.

[0331] S1005. The intention correction module turns off the rear camera and does not light up screen B.

[0332] When it is determined that the image captured by the rear camera does not include a facial image, and when it is determined that screen A detects a user's touch operation, it means that there is a touch point on screen A, that is, the user operates on screen A, and the intention correction module turns off the rear camera and does not light up screen B.

[0333] At this time, the electronic device 100 still turns on the front camera and displays the image captured by the front camera on screen A.

[0334] In other embodiments, after the action detection module obtains the flip selfie action result, the action detection module sends the flip selfie action result to the intention correction module.

[0335] In response to the flip selfie action result, the intention correction module turns on the rear camera and lights up screen B, and displays the image captured by the rear camera on screen B. At the same time, the intention correction module turns off the front camera and turns screen A off.

[0336] The various implementation modes of this application can be combined arbitrarily to achieve different technical effects.

[0337] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0338] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0339] In short, the above description is only an embodiment of the technical solution of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made based on the disclosure of the present invention should be included in the scope of protection of the present invention.

Claims

1. A photographing method, applied to an electronic device including a flexible display screen, characterized in that: The flexible display screen includes a first display screen and a second display screen, the first display screen includes a front camera and a first motion sensor, the back of the first display screen includes a rear camera, and when the flexible display screen is in a folded state, the first display screen and the second display screen are arranged opposite to each other, and the method includes: The electronic device receives a first user operation; In response to the first user operation, the electronic device displays a first selfie picture on the first display screen, wherein the first selfie picture includes a face image and is a picture frame captured by the front camera; The electronic device receives a second user operation; The electronic device acquires first motion data collected by the first motion sensor; The electronic device determines, based on the first motion data, that the second user operation is a flip selfie action; In response to the second user operation being the flip selfie action, the electronic device turns on the rear camera and displays a second selfie picture on the second display screen, where the second selfie picture is a picture frame captured by the rear camera.

2. The method according to claim 1, characterized in that The electronic device determines, based on the first motion data, that the second user operation is a flip selfie action, specifically including: The electronic device inputs the first motion data into an intention recognition model, and determines through the intention recognition model that the second user operation is a flipping action; In response to the second user operation being the flipping action, when the first motion data satisfies a first condition, the electronic device determines that the first user operation is the flipping selfie action; The first condition includes any one or more of the following: the linear acceleration of the electronic device is less than a third value, the length of the motion trajectory of the electronic device is less than a third value, and the rotation radius of the electronic device is less than a fifth value.

3. The method according to claim 2, characterized in that The direction perpendicular to the left and right edges of the electronic device and pointing from the left edge of the electronic device to the right edge of the electronic device is taken as the positive direction of the X axis, the direction perpendicular to the upper and lower edges of the electronic device and pointing from the lower left edge of the electronic device to the upper edge of the electronic device is taken as the positive direction of the Y axis, and the direction perpendicular to the X axis and the Y axis and away from the rear camera is taken as the positive direction of the Z axis; Before the electronic device inputs the first motion data into an intention recognition model, the method further includes: When the first motion data satisfies a second condition, the electronic device inputs the first motion data into the intention recognition model; The second condition includes any one or more of the following: the angular velocity moduli of the X-axis, the Y-axis and the Z-axis are greater than a first value, and the integral of the angular velocity of the Y-axis within a first time period is greater than a second value.

4. The method according to any one of claims 1 to 3, characterized in that: The electronic device obtains the first motion data collected by the first motion sensor, specifically including: After monitoring that the face image in the picture frame captured by the front camera disappears, the electronic device obtains the first A first motion data collected by a motion sensor.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: In response to displaying the second selfie picture on the second display screen, the electronic device turns off the front camera and turns off the first display screen.

6. The method according to any one of claims 1 to 4, characterized in that: After the electronic device turns on the rear camera, the method further includes: The electronic device turns off the front camera and turns off the first display screen.

7. The method according to any one of claims 1 to 6, characterized in that: The electronic device displays a second self-portrait picture on the second display screen, specifically comprising: When it is detected that the picture frame captured by the rear camera includes a face image, the electronic device starts displaying the second selfie picture on the second display screen.

8. The method according to any one of claims 1 to 6, characterized in that: The electronic device displays a second self-portrait picture on the second display screen, specifically comprising: When it is detected that the picture frames captured by the rear camera do not include a facial image and no user operation is received on the first display screen within a second time period, the electronic device displays the second selfie picture on the second display screen.

9. The method according to claim 8, characterized in that The method further comprises: When it is detected that the picture frames captured by the rear camera do not include a face image and when an operation performed by the user on the first display screen is received within a second time period, the electronic device turns off the rear camera.

10. The method according to claim 9, characterized in that The method further comprises: The electronic device turns on the front camera and continues to display the picture frames captured by the front camera on the first display screen.

11. The method according to any one of claims 1 to 10, characterized in that: The second display screen also includes a second motion sensor; before the electronic device determines that the second user operation is a flip selfie action based on the first motion data, the method also includes: The electronic device acquires second motion data collected by the second motion sensor; The electronic device determines, based on the first motion data, that the second user operation is a flip selfie action, specifically including: The electronic device determines that the second user operation is the flip selfie action based on the first motion data and the second motion data.

12. The method according to any one of claims 1 to 11, characterized in that: The first motion sensor includes an acceleration sensor and / or an angular velocity sensor, and the first motion data includes acceleration data or angular velocity data.

13. The method according to claim 11, characterized in that The second motion sensor includes an acceleration sensor and / or an angular velocity sensor, and the second motion data includes acceleration data or angular velocity data.

14. An electronic device, characterized in that: The method comprises one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, wherein the computer program codes include computer instructions, and when the one or more processors execute the computer instructions, the method as described in any one of claims 1 to 13 is executed.

15. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the method according to any one of claims 1 to 13 is executed.