CN114554078B - Camera calling method and electronic equipment - Google Patents

Camera calling method and electronic equipment Download PDF

Info

Publication number
CN114554078B
CN114554078B CN202210023763.2A CN202210023763A CN114554078B CN 114554078 B CN114554078 B CN 114554078B CN 202210023763 A CN202210023763 A CN 202210023763A CN 114554078 B CN114554078 B CN 114554078B
Authority
CN
China
Prior art keywords
camera
folding
service
information
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210023763.2A
Other languages
Chinese (zh)
Other versions
CN114554078A (en
Inventor
栾振兴
冯帅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210023763.2A priority Critical patent/CN114554078B/en
Publication of CN114554078A publication Critical patent/CN114554078A/en
Application granted granted Critical
Publication of CN114554078B publication Critical patent/CN114554078B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/617Upgrading or updating of programs or applications for camera control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/667Camera operation mode switching, e.g. between still and video, sport and normal or high- and low-resolution modes

Abstract

The embodiment of the application discloses a camera calling method and electronic equipment, and relates to the field of electronic equipment. The system service can directly send the folding information to the camera equipment for management, and the camera can be quickly and accurately selected and called. The problems of complex flow and the like caused by interaction of a plurality of services are avoided. The method comprises the following steps: the method comprises the steps that system service of the electronic equipment obtains folding information of a current folding screen, the folding information comprises folding angles of the folding screen and/or state information of the folding screen, and the state information comprises a first state or a second state. The system service sends the fold information to a camera device management of the electronic device. And the camera equipment management determines a camera mark according to the folding information, wherein the camera mark is used for marking the first camera or the second camera. The camera device manages a camera driver that transmits the camera identification to the electronic device. And the camera driver calls the corresponding first camera or second camera according to the camera identification.

Description

Camera calling method and electronic equipment
Technical Field
The embodiment of the application relates to the field of electronic equipment, in particular to a camera calling method and electronic equipment.
Background
The electronic equipment can be provided with a plurality of cameras to realize the shooting function of the electronic equipment. To the electronic equipment who is provided with folding screen, under scenes such as exhibition flat, folding, leading camera can correspond different camera modules. Therefore, when shooting (such as self-timer shooting) using the front camera, the electronic device needs to be able to quickly and accurately determine the camera module as the front camera.
Disclosure of Invention
The embodiment of the application provides a camera calling method and electronic equipment, so that system services can directly send folding information to camera equipment management, and a calling camera can be selected quickly and accurately. The problems of complex flow and the like caused by interaction of a plurality of services are avoided.
In order to achieve the above purpose, the embodiments of the present application adopt the following technical solutions:
in a first aspect, a camera calling method is provided, and is applied to an electronic device, wherein a folding screen is arranged in the electronic device, a first camera and a second camera are arranged in the electronic device, and when the electronic device is in a flattened state, the first camera and the second camera are located on two surfaces of the electronic device. The method comprises the following steps: the system service of the electronic equipment acquires folding information of a current folding screen, wherein the folding information comprises a folding angle of the folding screen and/or state information of the folding screen, the state information comprises a first state or a second state, and the folding angle corresponding to the first state is larger than the folding angle corresponding to the second state. The system service sends the folding information to a camera device management of the electronic device. The camera device management determines a camera identification according to the folding information, wherein the camera identification is used for identifying the first camera or the second camera. The camera device manages a camera driver that transmits the camera identification to the electronic device. And the camera driver calls the corresponding first camera or second camera according to the camera identification.
Based on the scheme, the system service of the electronic equipment can directly transmit the folding information to the camera equipment management. For example, the system service may transmit the state information to the camera device management, so that the camera device management may determine the cameras that need to be called in each scene according to the correspondence between the state information and the cameras. For example, the correspondence may include a correspondence between a camera identifier as a front camera and the status information. The state information can be divided into two states at least according to different folding angles, so that the determination and flexible scheduling of the front cameras under at least two scenes can be realized.
In one possible design, the folding information includes status information, and the folding angle of the folding screen is greater than a preset angle when the status information is the first status. And when the state information is in the second state, the folding angle of the folding screen is smaller than the preset angle. Based on the scheme, a state information dividing mode is provided.
In one possible design, the first camera is disposed inside the electronic device, and the second camera is disposed outside the electronic device, where the outside of the electronic device is a side of the electronic device that is exposed to the outside when the electronic device is folded. When the state information is the first state, the system service sends the folding information to the camera device management of the electronic device, including: the system service manages and sends the first folding information to the camera device, the first folding information including the first state. The camera device management determining a camera identification according to the folding information, comprising: and the camera equipment management determines that the camera identification is a first identification according to the first state, and the first identification corresponds to the first camera. This camera equipment management transmits this camera sign for this electronic equipment's camera drive, and this camera drive calls corresponding first camera or second camera according to this camera sign, includes: the camera device manages a camera driver which transmits the first identifier to the electronic device, and the camera driver calls the first camera according to the first identifier. Based on the scheme, when the state information is the first state indicating the larger folding angle, the electronic equipment can call the first camera on the inner side to provide a self-shooting function.
In one possible design, when the state information is the second state, the system service sends the folding information to a camera device management of the electronic device, including: the system service manages and sends the second folding information to the camera device, where the second folding information includes the second status. The camera device management determining a camera identification according to the folding information, comprising: and the camera equipment management determines that the camera identification is a second identification according to the second state, and the second identification corresponds to the second camera. This camera equipment management transmits this camera sign for this electronic equipment's camera drive, and this camera drive calls corresponding first camera or second camera according to this camera sign, includes: and the camera device manages a camera driver which transmits the second identifier to the electronic device, and the camera driver calls the second camera according to the second identifier. Based on the scheme, when the state information is in the second state indicating that the folding angle is smaller, the electronic equipment can call the second camera on the outer side to provide a self-shooting function.
In one possible design, a screen management service is provided in the system service. The system service of the electronic equipment acquires the folding information of the current folding screen, and the method comprises the following steps: the screen management service obtains the folding information. Based on the scheme, the specific implementation of the system service for acquiring the folding information is provided.
In one possible design, the system service is provided with a camera service extension service and a camera data transmission service. The method further comprises the following steps: the camera service extension service obtains the folding information from the screen management service. The system service sends the folding information to camera device management of the electronic device, including: the camera service extension service manages and transmits the folding information to the camera device through the camera data transmission service. Based on the scheme, a specific mode that the system service directly transmits the folding information to the camera device management is provided.
In one possible design, before the camera service extension service obtains the folding information from the screen management service, the method further includes: the camera service extension service registers a folded screen state with the screen management service to acquire the folded information from the screen management. Based on the scheme, a scheme example that the camera service expansion service acquires the folding information is provided.
In one possible design, the camera service extension service obtains the folding information when a camera application of the electronic device begins running. Or, the camera service extension service acquires the folding information when the folding information is changed. Based on the scheme, a trigger mechanism for acquiring the folding information by the camera service extension service is provided.
In one possible design, after the camera device manages the abnormal restart, the method further includes: the system service sends the folding information of the current folding screen to the camera device for management. Based on the scheme, a processing mechanism for abnormal management of the camera equipment is provided. Therefore, after the camera equipment management is abnormal and the restart is successful, the latest folding information can be acquired, and the camera which needs to be called currently can be accurately determined according to the latest folding information.
In one possible design, before the system service sends the folding information of the current folding screen to the camera device management, the method further includes: and the system service acquires the folding information of the current folding screen again. Based on the scheme, limitation on folding information sent after abnormal restart is provided. The retransmitted folding information may be folding information of the current folding screen that is reacquired by the system service. Therefore, the camera equipment management after abnormal restart can accurately determine the camera which needs to be called currently.
In one possible design, the system service monitors an abnormal state managed by the camera device through a camera service of the electronic device. Based on the scheme, the scheme for monitoring whether the camera equipment management is abnormal or not by the system service is provided.
In one possible design, a status monitor is provided in the camera service, and the method further includes: upon the camera device managing an abnormal restart, the state monitor outputs an abnormal identification to the system service. Based on the scheme, a specific scheme implementation for monitoring abnormal management of the camera equipment is provided.
In one possible design, the method further includes: after the camera device management is abnormally restarted, the state monitor outputs a normal operation identifier to the system service. Based on this scheme, yet another operating mechanism of the status monitor is provided, thereby enabling system services to accurately know whether current camera device management has been functioning properly. For example, after receiving the normal operation identifier, the service of the system may resend the folding information of the latest folding screen.
In a second aspect, an electronic device is provided that includes one or more processors and one or more memories; one or more memories coupled with the one or more processors, the one or more memories storing computer instructions; the computer instructions, when executed by the one or more processors, cause the electronic device to perform the camera call method as described above in the first aspect and any of the various possible designs.
In a third aspect, a chip system is provided, which includes an interface circuit and a processor; the interface circuit and the processor are interconnected through a line; the interface circuit is used for receiving signals from the memory and sending signals to the processor, and the signals comprise computer instructions stored in the memory; when the processor executes the computer instructions, the system-on-chip performs the camera call method as described above in the first aspect and in any of a variety of possible designs.
In a fourth aspect, there is provided a computer readable storage medium comprising computer instructions which, when executed, perform the camera call method of the first aspect and any one of the various possible designs as described above.
In a fifth aspect, there is provided a computer program product comprising instructions which, when run on a computer, enable the computer to perform the camera call method according to the first aspect and any one of the various possible designs as described above.
It should be understood that, in the technical solutions provided in the second aspect, the third aspect, the fourth aspect, and the fifth aspect, technical features of the technical solutions may all correspond to the camera invoking method provided in the first aspect and possible designs thereof, so that beneficial effects that can be achieved are similar, and are not described herein again.
Drawings
Fig. 1 is a perspective view of a foldable electronic device provided in an embodiment of the present application;
FIG. 2 is a schematic view of the foldable electronic device in a flattened state;
FIG. 3 is a schematic diagram of the foldable electronic device in a folded state;
FIG. 4 is a perspective view of a supporting device in an electronic apparatus;
FIG. 5 is an exploded view of a support device in an electronic device;
FIG. 6A is a simplified schematic diagram of a foldable electronic device in different states;
FIG. 6B is a schematic diagram of a scheme for determining a front camera;
fig. 7 is a schematic hardware composition diagram of an electronic device according to an embodiment of the present disclosure;
fig. 8 is a schematic diagram of a software component of an electronic device according to an embodiment of the present application;
fig. 9 is a logic diagram of a camera call method according to an embodiment of the present application;
fig. 10 is a schematic flowchart of a camera invoking method according to an embodiment of the present application;
FIG. 11 is a schematic view of an interface provided by an embodiment of the present application;
FIG. 12 is a schematic view of yet another interface provided by an embodiment of the present application;
fig. 13 is a logic diagram of another camera invoking method according to an embodiment of the present application;
fig. 14 is a schematic flowchart of another camera invoking method provided in the embodiment of the present application;
fig. 15 is a schematic composition diagram of another electronic device provided in the embodiment of the present application;
fig. 16 is a schematic composition diagram of a chip system according to an embodiment of the present disclosure.
Detailed Description
With the development of display screen manufacturing technology, in order to meet the demand of larger display area of electronic equipment, the foldable screen is gradually and widely used in the electronic equipment. In the following examples, an electronic device provided with a folding screen may also be referred to as a foldable electronic device. For example, the electronic device is taken as a mobile phone. A mobile phone provided with a folding screen may also be referred to as a foldable mobile phone or a folding screen mobile phone.
Referring to fig. 1, fig. 1 is a perspective view of a foldable electronic device 100 according to some embodiments of the present application. In the present embodiment, the foldable electronic device 100 is a folding screen mobile phone. The foldable electronic device 100 includes a folding screen 10 and a support device 20. It is to be understood that fig. 1 only schematically illustrates some components included in the electronic device 100, and the actual shape, the actual size, the actual position, and the actual configuration of these components are not limited by fig. 1.
The folding screen 10 is used to display images, video, etc. The folded screen 10 is foldable into a first section 11 and a second section 12. The folding screen 10 also comprises a third portion 13 located between the first portion 11 and the second portion 12. At least a third portion 13 of the folded screen 10 is made of a flexible material. The first portion 11 and the second portion 12 may be made of a flexible material, may also be made of a rigid material partially, and may also be made of a flexible material partially, and is not limited herein.
Specifically, the folding screen 10 may be an organic light-emitting diode (OLED) screen, a micro organic light-emitting diode (micro OLED) screen, a quantum dot light-emitting diode (QLED) screen, a Liquid Crystal Display (LCD), or the like.
The folding screen 10 is switchable between a flattened state and a folded state.
Referring to fig. 2, fig. 2 is a schematic structural diagram of the electronic device 100 shown in fig. 1 when the foldable screen 10 is in a flat state. When the folded screen 10 is in the flattened state, the first portion 11, the second portion 12 and the third portion 13 are disposed coplanar and oriented in the same direction. Under this state, can realize the large-size screen display and show, can provide richer information for the user, bring better use experience for the user.
Referring to fig. 3, fig. 3 is a schematic structural diagram of the foldable electronic device 100 shown in fig. 1 when the foldable screen 10 is in a folded state. When the folding screen 10 is in the folded state, the third portion 13 is in a folded state, with the first portion (not shown in fig. 3) being opposite the second portion (not shown in fig. 3). In this state, the folding screen 10 is not visible to the user, and the supporting means 20 protects the folding screen 10 from being scratched by hard objects. Meanwhile, in this state, the volume of the foldable electronic device 100 can be reduced, facilitating the storage of the foldable electronic device 100.
The support device 20 serves to support the folding screen 10 and allows the folding screen 10 to be folded between a flattened state and a folded state. Referring to fig. 4, fig. 4 is a perspective view of the supporting device 20 in the electronic apparatus 100 shown in fig. 1. In the present embodiment, the supporting device 20 includes a first housing 21, a second housing 22, and a rotating assembly 23. It is to be understood that fig. 4 only schematically illustrates some of the components comprised by the support device 20, and the actual shape, actual size, actual position and actual configuration of these components are not limited by fig. 4.
The first housing 21 is used to hold and support the first portion 11 of the folding screen 10 of figure 1. Specifically, the first housing 21 has an attachment surface M1, and the first housing 21 is fixed and supports the first portion 11 of the folding screen 10 in fig. 1 through the attachment surface M1.
The second housing 22 is used to hold and support the second portion 12 of the folding screen 10 of figure 1. Specifically, the second casing 22 has an abutting surface M2, and the second casing 22 is fixed and supports the second portion 12 of the folding screen 10 in fig. 1 through the abutting surface M2.
The interior of the first housing 21 forms a first accommodation chamber (not shown in the drawings). The inside of the second housing 22 forms a second accommodation chamber (not shown in the drawings). The first accommodating cavity and the second accommodating cavity are used for accommodating electronic devices such as a mainboard, a battery, a camera module, a loudspeaker and a receiver of the foldable electronic device 100.
The first housing 21 may be a unitary structure or may be formed by assembling a plurality of parts. Similarly, the second housing 22 may be a unitary structural member or may be formed by assembling a plurality of portions.
In some embodiments, referring to fig. 5, fig. 5 is an exploded view of the support device 20 shown in fig. 4. The first housing 21 includes a first middle frame 211 and a first back cover 212. The attachment surface M1 is located on the first middle frame 211. The first back cover 212 is fixed to a side of the first middle frame 211 away from the attachment surface M1. The first receiving cavity is formed between the first middle frame 211 and the first back cover 212.
The second casing 22 includes a second middle frame 221 and a second back cover 222. The attaching surface M2 is located on the second middle frame 221. The second back cover 222 is fixed to a side of the second middle frame 221 away from the attachment surface M2. The second receiving cavity is formed between the second middle frame 221 and the second back cover 222.
The pivoting assembly 23 is used to support the third portion 13 of the folding screen 10. The rotating assembly 23 is connected between the first housing 21 and the second housing 22, and the first housing 21 and the second housing 22 are rotatably connected by the rotating assembly 23. In some embodiments, the rotating assembly 23 is connected between the first middle frame 211 of the first housing 21 and the second middle frame 221 of the second housing 22. In other embodiments, the rotating assembly 23 may also be connected between the first back cover 212 of the first casing 21 and the second back cover 222 of the second casing 22.
In this example, the rotating assembly 23 of the foldable electronic device 100 may correspond to one folding edge. During the folding process of the foldable electronic device 100, the first housing 21 and the second housing 22 can be folded along the folding edge. When the included angle between the planes of the first housing 21 and the second housing 22 is different, different states of the foldable electronic device 100 can be corresponded. In this application, the angle between the planes of the first and second housings 21 and 22 may be referred to as a fold angle.
Illustratively, the states of the foldable electronic device 100 may include a flat state, a folded state, a half-folded state, and the like. Referring to fig. 6A, several simplified illustrations of the foldable electronic device 100 in different states are shown. Here, (a) in fig. 6A is a flattened state, (b) in fig. 6A is a half-folded state, and (c) in fig. 6A is a folded state. In this example, the foldable electronic device 100 is taken as a folding screen mobile phone as an example.
As shown in fig. 6A (a), in the case where the folding screen phone is fully opened (i.e., in a flattened state), the folding angle is 180 degrees. As shown in (b) of fig. 6A, in the half-folded state, the folding angle may be between 0 degrees and 180 degrees. As shown in (c) of fig. 6A, in the folded state, the folding angle may be 0 °.
For ease of illustration, in this application, a folding screen handset may include an inner side and an outer side. The inner side and the outer side can be two opposite surfaces of the folding screen mobile phone when the folding screen mobile phone is in an unfolded state. In the folded state, the inner side surface is wrapped inside the folding screen mobile phone and cannot be seen. Correspondingly, in a folded state, the outer side surface corresponds to the appearance surface of the folding screen mobile phone. In different implementations, the folding screen 10 may be disposed on the inside or the outside. In the following description, the folded screen 10 is provided on the inner side as an example.
As shown in fig. 6A (a), the folding screen 10 disposed inside may include a screen a disposed inside the first casing 21, and a screen B disposed inside the second casing 22. The screen a may also be referred to as an a screen, and the screen B may also be referred to as a B screen. The folding screen mobile phone is provided with a folding screen 10 at the inner side and a screen at the outer side. For example, as shown in fig. 6A (C), a screen C, or referred to as a C screen, may be disposed outside the folding screen mobile phone. The C-screen may be disposed outside the first housing 21. In other embodiments, the C-screen may be disposed outside of the second housing 22.
It is understood that a plurality of cameras may be provided in the foldable electronic device 100 to provide the user with the shooting function by calling different cameras in different states. Illustratively, the foldable electronic device 100 provides a self-timer function to the user.
Combine (a) in fig. 6A and (b) in fig. 6A. A camera 1 may be disposed on an inner side (e.g., an a screen or a B screen) of the foldable electronic device 100. In this example, the B screen is provided with the camera 1 as an example. Thus, in some states (e.g., the unfolded state), the foldable electronic device 100 can provide a self-timer function to the user through the camera 1. In conjunction with (c) of fig. 6A. A camera 2 may be provided on the outside (e.g., C-screen) of the foldable electronic device 100. Thus, in other states (e.g., folded state), the foldable electronic device 100 can provide a self-timer function to the user through the camera 2. It should be understood that when the foldable electronic device 100 provides other photographing functions than the self-photographing function, it is also necessary to photograph using a corresponding camera.
Since different cameras need to be used for self-shooting in different states, the foldable electronic device 100 needs to be able to determine which camera is called to provide the self-shooting function in the current state. In the following description, a camera providing a self-timer function may also be referred to as a front camera. That is, in different folded states, the cameras or camera modules corresponding to the front camera may be different.
In the present solution, the foldable electronic device 100 needs to perform data transfer through a plurality of services running therein to achieve the determination of the front camera. For example, fig. 6B shows an example of a scheme in which the foldable electronic device 100 determines a self-portrait camera. As shown in fig. 6B, the foldable electronic device 100 may acquire a folding angle through the system service and perform S601, i.e., transmit the folding angle to the camera service. S602 may then be performed, i.e., the camera service may pass the fold angle to camera device management. Therefore, the camera equipment management can determine which camera needs to be called currently as the front camera according to the folding angle.
It can be seen that in order to achieve the purpose of determining the front camera, in the current scheme, data such as the folding angle needs to be transmitted in multiple services. For example, the fold angle needs to be communicated between system services, camera services, and camera device management. In the determination of the front camera, it may be impossible to determine which camera should be used due to a service abnormality. In order to solve the problem, in the solution provided in the embodiment of the present application, a related function module is set in a system service, so that data can be directly transmitted from the system service to the camera device management. Illustratively, related modules such as screen management, camera service extension and camera data transmission are added in the system service, so that direct transmission of data from the system service to the camera device management is realized.
The scheme provided by the embodiment of the application is described below with reference to the accompanying drawings.
It should be noted that the camera calling method provided in the embodiment of the present application may be applied to an electronic device of a user. The electronic device may be a device capable of providing a photographing function. This electronic equipment can be provided with the folding screen, can be provided with two at least cameras on the electronic equipment. For example, the electronic device may be a portable mobile device with a shooting function, such as a mobile phone, a tablet computer, a Personal Digital Assistant (PDA), an Augmented Reality (AR) \ Virtual Reality (VR) device, a media player, and the like, and may also be a wearable electronic device, such as a smart watch. The embodiment of the present application does not specifically limit the specific form of the apparatus.
For example, the solution provided by the embodiment of the present application may be applied to the foldable electronic device 100 shown in any one of fig. 1 to 6A. The foldable electronic device is mainly explained from the structural point of view as in fig. 1-6A. The embodiment of the present application further provides a hardware composition diagram of the electronic device 700. As shown in fig. 7, the electronic device 100 may include a processor 710, an external memory interface 720, an internal memory 721, a Universal Serial Bus (USB) interface 730, a charging management module 740, a power management module 741, a battery 742, an antenna 1, an antenna 2, a mobile communication module 750, a wireless communication module 760, an audio module 770, a sensor module 780, buttons 790, a motor 791, an indicator 792, a camera 793, a display 794, and a Subscriber Identity Module (SIM) card interface 795, and the like. Among them, the sensor module 780 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc. In some embodiments, the electronic device 100 may further include a speaker, a receiver, a microphone, an earphone interface, and the like for implementing audio-related functions of the electronic device 100.
It is to be understood that the illustrated structure of the present embodiment does not constitute a specific limitation to the electronic apparatus 100. In other embodiments, electronic device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Illustratively, the electronic device 100 may include 1 or N cameras 793, N being a positive integer greater than 1. For example, in the present application, the camera 593 may include a camera (such as the camera 1 shown in fig. 6A) disposed inside the electronic apparatus. The camera 593 may also include a camera (such as the camera 2 shown in fig. 6A) or the like disposed outside the electronic device. Taking the camera 1 as an example, in different implementations, the camera 1 may have different implementations. For example, the camera 1 may be provided on a screen a of the electronic apparatus, or may be provided on a screen B of the electronic apparatus. In the present application, the camera 793 may also be referred to as a camera module.
The display screen 794 in the electronic device 100 is used to display images, video, and the like. The display screen 794 includes a display panel. The display panel may be a Liquid Crystal Display (LCD) 794, an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-OLED, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the electronic device 100 may include 1 or N display screens 794, N being a positive integer greater than 1. In embodiments of the present application, the display screen may include one or more screens. The display screen may include a folding screen. For example, in connection with the example of FIG. 6A, the display screen may include a folding screen disposed inside the electronic device. The display screen may further include a screen disposed outside the electronic device. In some implementations, the folding screen may be implemented by a single complete screen. That is, the a screen and the B screen may correspond to one complete screen. The screen may have a folding feature that allows normal display in either a flat or semi-folded state. In other implementations, the foldable screen may also implement the display function inside the electronic device by two screens respectively disposed at the positions of the a screen and the B screen. It should be noted that the maximum folding angle of the folding screen may be different in different implementations. For example, in some implementations, the maximum fold angle of the folded screen may be 180 degrees. In some implementations, the maximum fold angle of the folded screen may be 270 degrees. In some implementations, the maximum fold angle of the folded screen may be 360 degrees. In the embodiment of the present application, the maximum folding angle of the folding screen may be 180 degrees.
It should be understood that fig. 7 described above illustrates one hardware structural component in the electronic device. In the present application, the electronic device 100 may also be divided from another perspective. For example, referring to FIG. 8, a software partitioning diagram of electronic device 100 is shown.
Illustratively, in the example shown in FIG. 8, the electronic device may have a hierarchical architecture. Wherein the layered architecture divides the software intoThe method is characterized in that the method is divided into a plurality of layers, and each layer has a clear role and division of labor. The layers communicate with each other through a software interface. In this example, the electronic device operates as
Figure BDA0003463576080000081
The (Android) operating system is an example. The system can be divided into five layers, namely an application program Layer (APP Layer) 810, an application program Framework Layer (Framework Layer) 820, a Hardware abstraction Layer (Hardware Abstract Layer, HAL) 830, a kernel Layer 840, a Hardware Layer 850 and the like from top to bottom.
The application layer 810, which is simply referred to as the application layer 810, may include a series of application packages. Illustratively, the application packages may include camera, gallery, calendar, phone, map, navigation, WLAN, bluetooth, music, video, short message, etc. applications. In these application packages, one or more APPs for photographing may be included. In this example, the APP layer 810 may include a Camera APP (Camera APP) 811 for implementing a photographing function. The shooting function may include a self-timer, camera, etc.
The application framework layer 820 is simply referred to as the framework layer 810. The framework layer 810 may provide an Application Programming Interface (API) and a programming framework for applications of the application layer 810. The framework layer 820 includes some predefined functions. Illustratively, the framework layer 820 may include a window manager, a content provider, a view system, an explorer, a notification manager, an activity manager, an input manager, and the like. The Window Manager provides Window Management (WMS), which may be used for Window management, window animation management, surface management, and a relay station as an input system. The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc. The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures. The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like. The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a brief dwell, and does not require user interaction. Such as a notification manager used to notify download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc. The Activity Manager may provide Activity Manager Service (AMS), which may be used for the start-up, switching, scheduling of system components (e.g., activities, services, content providers, broadcast receivers), and management and scheduling work of application processes. The Input Manager may provide Input Manager Service (IMS), which may be used to manage inputs to the system, such as touch screen inputs, key inputs, sensor inputs, and the like. The IMS takes events from the input device nodes and assigns them to the appropriate windows through interaction with the WMS.
In the embodiment of the present application, a system service 821 and a camera service 822 may be provided in the framework layer 820. Illustratively, the system service 821 may be a SystemServer. The camera service 822 may be a CameraService. In system services 821, there may be multiple sub-processes running, with different sub-processes being used to implement different functions. Different sub-processes may correspond to different services. Such as screen management 821a, camera service extension 821b, camera data transmission 821c, etc. As an example, the screen management 821a may be hwfoldscreenmanager service. Where Hw is an abbreviation for Hardware (Hardware), and is similar below. The camera service extension 821b can be an HwCameraServiceProxy. Camera data transmission 821c may be PostCamera.
In the present application, the screen management 821a may be used to acquire folding information of the current folding screen from the electronic device. Wherein the folding information may comprise folding angle and/or status information. The state information may include a first state and a second state. The first state corresponds to a range of the folding angle between 0 degrees and a preset angle. The second state corresponds to the folding angle being in a range between a preset angle and 180 degrees. The preset angle may be an angle between 0 and 180 degrees. For example, the preset angle may be 45 degrees, or 60 degrees, or 75 degrees, or 80 degrees, etc. The camera service extension 821b can be used to obtain folding information of the current electronic device from the screen management 821a. The camera service extension 821b may also be used to transmit the fold information to other hardware or software modules through the camera data transmission 821 c. In addition, the camera service 822 may be used to manage various camera-related functions. For example, it is possible to monitor an abnormal state of camera device management or the like by providing a state monitor 822a in the camera service 822. In this application, the folding information of the current electronic device may also be referred to as the folding information of the current folding screen.
As one possible implementation, it is exemplified that the folding information includes state information. The screen management 821a may obtain the fold information from other services in the system service 821. For example, as shown in fig. 8, a posture status module 821d may also be provided in the system service 821. As shown in fig. 7, after the electronic device is started, the sensor module 780 may transmit information related to a folded state of the electronic device to a corresponding sensor HUB (sensor HUB) in real time. For example, the gravitational acceleration sensor (a + G sensor) in the sensor module 780 may report the gravitational acceleration data of XYZ directions of the current electronic device to the sensor HUB in real time. The sensorHUB may determine the current fold angle of the electronic device from the gravitational acceleration data. Pose state module 821d can obtain the fold angle from sensorHUB. The posture state module 821d may further determine the state information of the current electronic device according to the folding angle of the current electronic device and the preset angle. The screen management 821a can thereby obtain the status information from the posture status module 821d.
In other possible implementations, the screen management 821a may also obtain status information and/or fold angle from other modules or components, either directly or indirectly. The embodiments of the present application do not limit this.
The HAL layer 830 runs in user space (user space), encapsulates the kernel layer 840 driver, and provides a calling interface to the upper layers. In the embodiment of the present application, the HAL layer 830 may include a camera hardware abstraction 831, and a camera device management 831a may be provided in the camera hardware abstraction 831. In some embodiments, the camera device management 831a can be configured to determine the front camera that needs to be invoked based on the current fold information. If in a self-timer scene, determining which camera module is used as a front camera according to the current folding information. Illustratively, when the folding angle is large, or when the state information includes the first state, the inner camera 1 is called as the front camera. For another example, when the folding angle is small or when the state information is the second state, the outer camera 2 is called. The camera device management 831a may also transmit an Identification (ID) of the determined front camera to the kernel layer 840 to call the corresponding camera. For example, when the camera 1 is a front camera, the camera device management 831a may send the first identifier corresponding to the camera 1 to the kernel layer 840. For another example, when the camera 2 is a front camera, the camera device management 831a may send the second identifier corresponding to the camera 2 to the kernel layer 840. In the present application, the camera device management 831a may also be simply referred to as camera device management 831a.
The core layer 840 may include a number of different component drivers such as a display driver, a camera driver 841, an audio driver, and a sensor driver. In some embodiments, different cameras may correspond to the same camera drive 841. The camera drive 841 can call the corresponding camera to perform shooting and other operations according to the ID of the front camera. In other embodiments, multiple camera drivers 841 may be disposed in the HAL layer 830, with different camera drivers 841 for driving different cameras. To call up a certain camera, the electronic device may send a shooting instruction to the corresponding camera drive 841, thereby calling up the corresponding camera through the camera drive 841 to perform shooting.
A plurality of cameras may be provided in the hardware layer 850. For example, as shown in fig. 8, in the present application, two cameras, such as a camera 1 and a camera 2, may be provided in the electronic apparatus. The camera 1 and the camera 2 may be disposed inside and outside the electronic apparatus, respectively. For example, in connection with the example as shown in fig. 6A, the camera 1 may be disposed inside the electronic apparatus. The camera 2 may be arranged outside the electronic device. In addition, a sensor module 780 (not shown in fig. 8) as shown in fig. 7 may be further disposed in the hardware layer 850, so that the folding information of the current electronic device can be determined by the sensor module 780.
Furthermore, in some embodiments, android runtime, native C/C + + libraries, and the like may also be included in the electronic device. The android runtime comprises a core library and an android runtime. Android runtime is responsible for converting source code into machine code. Android runtime mainly includes adopting Advanced (AOT) compilation technology and Just In Time (JIT) compilation technology. The core library is mainly used for providing basic functions of the Java class library, such as basic data structure, mathematics, input Output (IO), tool, database, network and other libraries. The core library provides an API for android application development of users. The native C/C + + library may include a plurality of functional modules. For example: surface manager (surface manager), media Framework (Media Framework), standard C library (libc), open graphics library for Embedded Systems (OpenGL for Embedded Systems, openGL ES), vulkan, SQLite, webkit, and the like.
It should be understood that the solutions provided in the embodiments of the present application can be applied to electronic devices having the structural components shown in fig. 1-6A. The scheme provided by the embodiment of the application can also be applied to the electronic equipment with the hardware composition shown in fig. 7 or the software composition shown in fig. 8.
The following provides a detailed description of the embodiments of the present application.
In addition, it should be understood that the solutions provided in the embodiments of the present application can be applied to different shooting scenes, such as self-shooting through a front camera, or shooting other objects through a rear camera, and the like. For a folding screen mobile phone, because the folding state of the mobile phone is different (such as a flattening state, a half-folding state, a folding state, etc.) in different scenes, the corresponding front camera and the rear camera are also different. Therefore, taking a self-timer scene as an example, the folding screen mobile phone determines which camera is used, that is, determines which camera is taken as a front camera. The implementation of the scheme is similar for the scene shot by the rear camera or the scene of video recording and the like. In the following example, a self-timer shooting is taken as an example of a shooting scene.
As an example, a software composition as shown in fig. 8 is incorporated. FIG. 9 shows a schematic of a scenario of interaction between modules. It should be noted that the improvement of the present solution mainly relates to the data transmission link between the framework layer 820 and the HAL layer 830, and therefore, in the example as shown in fig. 9, an interaction schematic based on the framework layer 820 and the HAL layer 830 is given. The functionality of the other software layers is similar to existing logic and will be set forth in detail in the description that follows.
As shown in fig. 9, the implementation process of the scheme may include at least the following 3 steps:
s901, the camera service extension 821b registers the collapsed screen state with the screen management 821a.
In this example, the camera service extension 821b can acquire current folding information from the screen management 821a by registering a folded screen state. In connection with the foregoing examples, the fold information may include fold angle and/or state information. The state information may include a first state and a second state. The first state corresponds to a range of the folding angle between 0 degrees and a preset angle. The second state corresponds to the fold angle being in the range between the preset angle and 180 degrees. The preset angle may be an angle between 0 and 180 degrees.
Illustratively, the camera service extension 821b acquires the folding information from the screen management 821a through the first function as an example. The registering the folded screen state may include: the camera service extension 821b encapsulates the first function, and passes a pointer to call back the first function to the screen management 821a. In this way, by calling back the first function, the camera service extension 821b can acquire the folding information maintained by the screen management 821a.
In connection with the example of fig. 8, the execution of S901 may be performed before the electronic device needs to determine the front camera. For example, the electronic device may execute the S901 when the electronic device is powered on or the system service is started. This enables the fold information to be acquired quickly by calling back the first function when the camera service extension 821b needs to acquire the fold information.
For example, when the user opens a camera application, the camera service extension 821b may acquire the folding information from the screen management 821a by calling back the first function. For another example, in the process that the user uses the folding-screen mobile phone, the folding-screen mobile phone is folded or unfolded, and when the state information is changed from the first state to the second state or from the second state to the first state, the camera service extension 821b may retrieve the new folding information by calling back the first function.
S902, the camera service extension 821b sends the fold information to the camera data transmission 821 c.
In the present example, in the system service 821, a camera data transmission 821c may be created to communicate directly with the camera hardware abstraction 831. Illustratively, the camera service extension 821b may transmit the folding information to the camera data transmission 821c, and perform the following S903.
It is understood that the camera service extension 821b may acquire current folding information from the screen management 821a when the camera application is started or when the folding information is changed. Then the fold information may be sent to the camera data transmission 821c each time the fold information is acquired at the camera service extension 821b.
S903, camera data transmission 821c sends the folding information to the camera device management 831a.
Thereby enabling direct transfer of the fold information from the system service 821 to the camera hardware abstraction. For example, the folding information may be transmitted to the camera device management 831a through the camera data transmission 821 c.
It can be seen that in the solution provided in the embodiment of the present application, by creating the screen management 821a, the camera service extension 821b, and the camera data transmission 821c in the system service 821, the folding information is only transmitted in the system service 821, that is, the folding information can be transmitted to the camera hardware abstraction 831. And further allows the camera hardware abstraction 831 to determine the front camera based on the fold information.
Illustratively, the folding information includes state information. When the state information included in the folding information is the first state, that is, the current electronic device is folded less, the camera device manager 831a may transmit the corresponding second identifier of the outer camera, for example, the camera 2, to the camera driver. Thus, the camera driver can call the camera 2 to work according to the second identifier. When the state information included in the folding information is the second state, that is, the folding of the electronic device is larger currently, the camera device manager 831a may transmit the corresponding first identifier of the inner camera, for example, the camera 1, to the camera driver. Therefore, the camera driver can call the camera 1 to work according to the first identifier.
Therefore, in the process of determining the front camera, the transmission of the folding information of the front camera can be transmitted to the camera device management without the two services shown in fig. 6B, namely, the system service and the camera service. Thereby avoiding data transmission between multiple services (processes).
The scheme shown in fig. 9 will be described in detail below with reference to specific examples in order to enable those skilled in the art to more clearly understand the scheme shown in fig. 9.
Fig. 10 is a schematic flowchart illustrating a camera invoking method according to an embodiment of the present disclosure. The scheme can be applied to the folding screen mobile phone and is used for flexibly, accurately and quickly determining the front camera to be called. As shown in fig. 10, the scheme may include:
s1001, the camera service extension registers the folded screen state with the screen management.
In the embodiment of the application, the camera service extension can acquire folding information of the folding screen through screen management.
For example, the composition of the folding information and the registration timing may refer to the description of S901 shown in fig. 9.
Take the example that the folding information includes state information. In some embodiments, the state information may indicate a first state corresponding to the current fold angle being in a range of 0 degrees to a preset angle. In other embodiments, the state information may indicate the second state corresponding to the current fold angle being in a range of a preset angle to 180 degrees.
In other implementations, the fold information may also include a specific fold angle. Alternatively, in other implementations, the fold information may also include fold information and a specific fold angle. The embodiment of the present application does not limit the specific content of the folding information.
Take the example that the folding information includes state information. The screen management can acquire the state information of the current folding screen in real time. In connection with fig. 8, the status information may be determined by the posture management module 821d according to the current folding angle. In some embodiments, the fold angle may be determined by the sensorHUB from data transmitted by one or more sensors in the sensor module. For example, the sensorHUB may determine the current folding angle according to the attitude information of the a + G sensor output in XYZ direction of the current electronic device.
In some embodiments of the present application, the execution of S1001 may be executed after the folding-screen mobile phone is turned on. For example, after the folding screen mobile phone is turned on, S1001 may be executed, so that the camera service extension may quickly acquire the current folding information after receiving a command that the user opens the camera to perform shooting. In other embodiments, the step S1001 may also be executed when the mobile phone opens the camera application. Therefore, the program running pressure in the starting process can be reduced.
As an example, S1001 is executed when a camera application is opened. The folding screen mobile phone can open the camera application, i.e., run the camera application, in response to an operation of opening the camera input by a user after receiving the operation. Fig. 11 shows an example of an operation of opening a camera in which a folding-screen cellular phone receives a user input. In this example, the user's unfolding of the folding screen input operation is taken as an example. When the folding screen phone is in the unfolded state, an interface 1101 as shown in fig. 11 may be displayed. In connection with the foregoing example, a camera 1 may be provided on the folding screen. After receiving an operation of the user on the icon 1102 corresponding to the camera application on the interface 1101, the folding screen mobile phone may start to run the camera application, i.e., execute S1001. The operation performed by the user on the icon 1102 may be a touch (e.g., touching or pressing) operation.
S1002, the camera service extension acquires first folding information from screen management.
For example, in some embodiments, the camera service extension may obtain the fold information from the screen management when the user opens the camera application for self-portrait. It is to be understood that in the application scenario of the present example, there may be a scenario for determining a front camera. Then, the execution of S1002 may be performed when the user opens the camera application to perform self-timer shooting, that is, when the front camera needs to be determined.
It should be understood that after the camera application runs, if a self-timer scene is entered by default, the timing when the user opens the camera application for self-timer shooting may be that the camera application starts running.
After the camera application runs, if the default is not a self-timer scene, the user is required to control to switch to the front camera for self-timer shooting, so that the self-timer scene is triggered to enter. Then, in this case, the instruction of switching to the front camera input by the user may be a trigger mechanism for executing S1002. Illustratively, in connection with the example of fig. 12. Take the default shooting with the rear camera when the camera application is started as an example. After the folded screen phone begins running the camera application, interface 1201 may be displayed. An icon 1202 for switching to a front camera may be included on the interface 1201. The user can switch to the front camera for self-timer shooting by inputting an operation to the icon 1202. The electronic device may execute this S1002 in response to an operation input to the icon 1202 by the user.
In other embodiments, the camera service extension may also perform S1002 when the status information of the folding screen changes. It will be appreciated that when the status information changes, then the corresponding front-facing camera may need to be adjusted. For example, the camera 1 is switched to the camera 2, or the camera 2 is switched to the camera 1. Then, the camera service extension may obtain the latest folding information when the state information changes, so that the electronic device can accurately determine the current front camera according to the updated folding information.
S1003, the camera service extension delivers the first folding information to the camera device management through the camera data transmission.
In the present application, the camera data transmission may be used as a data interface or channel for data transfer for camera device management in the system service of the framework layer. In this example, the camera service extension may transmit the acquired fold information, such as the first fold information, to the camera device management via the camera data transmission.
It should be understood that, in the present application, in conjunction with the description in S1002, when a self-timer shooting is started, or when state information changes, the camera service extension updates the fold information from the screen management. Correspondingly, in S1003, the camera service extension may deliver the updated folding information, such as the first folding information, to the camera device management through the camera data transmission when the self-timer shooting is started or the status information changes.
And S1004, the camera equipment management determines that the identifier of the called camera is a first identifier according to the first folding information.
In the application, different cameras may correspond to different Identifications (IDs). For example, the identifier of the camera 1 may be the first identifier. The identification of the camera 2 may be a second identification or the like. The identification of different cameras may be different. By distinguishing different identifications, the corresponding camera can be determined.
For example, the camera device management may store a correspondence relationship between different folding information and an identifier of the front camera to be called. For example, when the folding information is the first folding information including the state information as the first state, the corresponding folding angle is in the range of [ x,180], and x is a preset angle. For example, x may be 45 degrees, or 60 degrees, or 75 degrees, or 80 degrees, etc. The corresponding mark of the front camera is a first mark. The first mark may be used to indicate the camera 1 inside the electronic device. Correspondingly, when the state information included in the folding information is in the second state, the corresponding folding angle is in the range of [0, x ], and x is a preset angle. The corresponding mark of the front camera is a second mark. The second identification may be used to indicate the camera 2 outside the electronic device.
Taking x as an example of 80 degrees, then, in the case that the folding angle is greater than 80 degrees, the camera device management may determine that the identifier of the camera that needs to be called is the first identifier. I.e. the camera 1 that needs to be called up as a front camera.
Therefore, the camera equipment management can correspondingly determine the effect of the front camera needing to be called according to the acquired folding information of the current folding screen.
S1005, the camera device management sends the first identifier to the camera driver.
In this example, the camera device management may send the identification of the camera that needs to be called, determined from the current fold angle, to the camera driver. The camera driver can call the corresponding camera to execute the shooting instruction according to the received camera identification.
For example, the camera driver may determine, according to the first identifier, that the front-facing camera that needs to be called is the camera 1 corresponding to the first identifier.
S1006, the camera driver sends an operation instruction to the camera 1.
In this application, the operation instruction may be used to instruct the corresponding camera to power up and start to acquire an image.
As an example, the execution instructions may include one of the following: the command for indicating the camera to be electrified, the initialization command and the stream starting command.
Therefore, when the camera application is started and a self-timer function needs to be provided for the user, the camera 1 can start to acquire images according to the received operation instruction, so that the electronic equipment provides the self-timer function for the user through the camera 1.
Correspondingly, in the self-photographing process of a user, the folding screen mobile phone is in a folding state or a state close to the folding state, a self-photographing function can be provided through the camera 2, and the camera 1 can be in a standby state or a non-working state at the moment. When the user gradually expands the folding screen of the folding screen mobile phone, if the folding angle changes from being smaller than the preset angle to being larger than the preset angle, the folding information is triggered to change, and after the step S1006 is executed, the camera 1 may receive the operation instruction to start working, so that the electronic device is switched from the camera 2 to the camera 1, and the self-shooting function is continuously provided for the user.
It should be noted that, in some embodiments of the present application, in a scenario of performing camera switching, the camera may further send an instruction to stop running to the camera 2, where the instruction may be used to instruct the camera 2 to stop flowing and/or power down. Therefore, after the camera 1 is switched to, the camera 2 can stop working, and corresponding power consumption overhead is saved.
It is understood that in the example as S1002-S1006, the description is given taking the example that the current folding angle is large, and the corresponding state information is the first state. Then, in this implementation, in the case where the folding angle is small, the electronic apparatus can automatically call the outer camera 2 to perform self-timer shooting.
In other embodiments of the present application, reference may be made to S1012-S1016 in the case that the folding angle is smaller, for example, the folding angle is smaller than the preset angle.
S1012, the camera service extension acquires the second folding information from the screen management.
For example, the second folding information may be used to indicate that the state information is the second state, i.e., the current folding angle is in a range from 0 degrees to a preset angle.
And S1013, the camera service extension transmits the second folding information to the camera device management through camera data transmission.
And S1014, the camera equipment management determines that the identifier of the called camera is the second identifier according to the second folding information.
And S1015, the camera device management sends the second identifier to the camera driver.
S1016, the camera driver sends an operation instruction to the camera 2.
It should be understood that the specific implementations of S1012-S1016 described above are similar to S1002-S1006 and may be referred to one another. By the scheme as S1012-S1016, the electronic device can automatically call the outer camera 2 to perform self-timer shooting in the case of a small folding angle.
Based on the above-described example of the scheme shown in fig. 10, it can be seen that the camera device management functions to determine the cameras that need to be called according to the folding information. In conjunction with the foregoing description, the camera device management may also implement its functions through one process. While for all processes, exceptions may occur during the run for various reasons. In the event of an exception, the process may restart the resume period function. For example, the process corresponding to the camera device management may be restarted by itself after an exception occurs, so that the scheme shown in fig. 10 is continued after the restart, and the camera to be called is determined according to the folding information from the camera service extension.
It should be appreciated that during operation of a service in an electronic device, anomalies in the service may occur. For example, an exception may occur to any one or more of the system service 821, the camera service 822, and the camera device management 831a. In order to cope with the influence of these service exceptions on the scheme provided by the embodiments of the present application, the scheme shown in fig. 9 or fig. 10 is provided. In some embodiments of the present application, an abnormal restart mechanism of the service may be set, so that the abnormal service may be automatically determined and restarted, and the scheme provided by the embodiments of the present application may be continuously executed after the restart. The service exception may refer to a null pointer inside the process itself, an execution exception, a resource failure, a call exception, a system low memory time, and the like.
Illustratively, the system service 821 is taken as an example. An anomaly monitoring module may be provided in the system service 821 or at the system bottom layer, and may monitor an anomaly status of each service in the system service 821. For example, when any one of the screen management 821a, the camera service extension 821b and the camera data transmission 821c has a service exception, the exception monitoring module may kill a process corresponding to the service. The exception monitoring module may also reinitiate the service after killing the service, thereby enabling a restart of the exception service. After the restart, the service may continue to perform the corresponding functions according to the scheme shown in fig. 9 or fig. 10. However, in the restart process after the process corresponding to the camera device management is abnormal, if there is the folding information from the camera service extension, the camera device management may not be able to quickly and accurately determine the front-facing camera to be called according to the folding information. To solve the problem, embodiments of the present application further provide a monitoring mechanism, so that the camera service extension can send the latest folding information again after the camera device management is abnormally restarted. And further, the restarted camera equipment management can determine the front camera needing to be called according to the latest folding information and indicate the corresponding camera to start working.
Note that, in the following example, the exception monitoring for the camera device management by the camera service is taken as an example. In other implementations of the present application, the system service may itself monitor camera device management for anomalies. For example, a camera service extension in a system service may be used to implement this functionality by calling a corresponding plug-in. The specific implementation is similar and will not be described again.
Illustratively, fig. 13 is a schematic diagram of still another inter-module interaction provided in the embodiment of the present application. In connection with brief explanation of the scheme shown in fig. 9, in the present example, the abnormal state of the camera device management 831a can be monitored by the state monitor 822a provided in the camera service 822, thereby enabling the camera service extension 821b to perform corresponding processing. As shown in fig. 13, the scheme may include:
s1301, the camera service extension 821b registers the folder state with the screen management 821a.
For example, the execution of S1301 may refer to S901 described above, and details are not described here.
S1302, the status monitor 822a monitors an abnormal status of the camera device management 831a.
In conjunction with fig. 13. In this example, a status monitor 822a is provided in the camera service 822. The status monitor 822a may be used to monitor whether the camera device management 831a is in an abnormal state. In the present example, the camera device management 831a is in the process of the abnormal restart, and the corresponding camera device management 831a is in an abnormal state. Upon monitoring that the camera device management 831a is in an abnormal state, the following S1303 may be executed.
S1303, the status monitor 822a issues an exception flag.
Upon determining that the camera device management 831a is in an abnormal state, the state monitor 822a may output an abnormality flag so that other modules, such as the camera service extension 821b, know that the camera device management 831a is in an abnormal state.
In this example, when the camera device management 831a is abnormal, the status monitor 822a outputs corresponding abnormal information to the camera service extension 821b. As a possible implementation, the abnormality information may include an identifier (e.g., an abnormality identifier) indicating that the camera device management 831a is in an abnormal state. Then, the camera service extension 821b can determine that the camera device management 831a is abnormal in the case where the status monitor 822a outputs an abnormality flag.
Note that, after an abnormality occurs in the camera device management 831a, the device can be restarted by itself. During the restart, the camera device management 831a still cannot normally implement its function. Therefore, in some embodiments of the present application, the status monitor 822a may also output an exception flag during the restart of the camera device management 831a, so that the camera service extension 821b determines that the camera device management 831a cannot work normally.
In some implementations of the present application, the status monitor 822a may continually output an exception identification during an exception reboot of the camera device management 831a. After the camera device management 831a abnormal restart process, the status monitor 822a may stop outputting the abnormal flag. Thus, the camera service extension 821b can determine that the camera device management 831a has recovered to normal when the status monitor 822a stops outputting the abnormality flag.
In some implementations of the present application, the status monitor 822a may output a normal operation identification to the camera service extension 821b upon an abnormal restart of the camera device management 831a. Then, the camera service extension 821b can determine that the camera device management 831a can already operate normally according to the normal operation flag.
S1304, the camera service extension 821b sends the current fold information to the camera data transmission 821 c.
S1305, camera data transmission 821c sends the folding information to the camera device management 831a.
In this example, the camera service extension may resend the latest fold information to the camera device management when it is determined that the camera device management cannot work normally according to the abnormality flag.
Illustratively, the status monitor 822a continuously outputs an exception flag during the abnormal restart of the camera device management 831a. The camera service extension 821b can send the current fold information to the camera data transmission 821c after the status monitor 822a stops outputting the exception identification.
In other embodiments, the status monitor 822a outputs a normal operation flag after the abnormal restart of the camera device management 831a is taken as an example. The camera service extension 821b can send the current fold information to the camera data transmission 821c after the status monitor 822a outputs the normal operation identification.
Wherein the current folding information may include folding angle and/or state information of the current folding screen. The step of obtaining the folding information may refer to step S1002, which is not described herein.
In this way, the camera service extension 821b can determine that the camera device management 831a has an abnormal state according to the output of the abnormal identifier, and then perform corresponding measures, thereby avoiding the problem that the front camera cannot be determined due to the loss of the folding angle. The scheme shown in fig. 13 is explained in the following with reference to fig. 14.
Exemplarily, please refer to fig. 14, which is a schematic flowchart of another camera invoking method provided in the embodiment of the present application. In this example, in combination with the example of the scheme shown in fig. 10, the camera apparatus management is taken as an example that an abnormal restart occurs before the corresponding camera is determined according to the third folding information, which is the camera 2. As shown in fig. 14, the scheme may include:
s1401, the camera service extension registers the folded screen state with the screen management.
S1402, the camera service extension acquires third folding information from the screen management.
S1403, the camera service extension transfers the third folding information to the camera device management through the camera data transmission.
The execution processes of S1401-S1403 may refer to the execution processes of S1001-S1003 shown in fig. 10, and are not described herein again.
And S1404, managing abnormal restart by the camera equipment.
In this example, the camera device management may restart the corresponding process by itself in the case where it is determined that the process is abnormal. So that the restarted process can realize the corresponding function of the camera device management.
It is understood that after the camera device management is restarted, the loss of the received third folding information may be caused. And the camera device management has not determined which camera needs to be invoked from this third fold information. Therefore, in the present example, the above-described problem can be solved in combination with S1405 to S1409 as follows.
S1405, the camera service extension acquires information of camera device management abnormality through a status monitor in the camera service.
S1406, the camera service extension passes the third folding information to the camera device management again through the camera data transmission.
Illustratively, the process may refer to 1302-1305 as shown in FIG. 13. The specific implementations may be referred to one another.
It will be appreciated that, in this way, after the camera device management is successfully restarted, the latest folding information, such as the third folding information, can be received again.
And S1407, the camera device management determines that the identifier of the called camera is the second identifier according to the third folding information.
S1408, the camera device management sends the second identifier to the camera driver.
S1409, the camera driver sends an operation instruction to the camera 2.
The execution of S1407 to S1409 may correspond to S1013 to S1016 shown in fig. 10. And will not be described in detail herein.
In this way, by using the example of the scheme shown in fig. 14, the camera service extension can acquire the abnormal state managed by the camera device in time, so as to ensure that the current folding information can still be acquired after the abnormal restart of the camera device management, and the camera to be called can be determined accurately in time.
In this way, even if an abnormality occurs in at least one of the system service, the camera service and/or the camera device management, the recovery of the abnormal state can be realized based on the above abnormal restart mechanism and the schemes shown in fig. 13 and fig. 14, and the scheme provided by the embodiment of the present application can be smoothly executed.
For example, in some scenarios, the system service may be restarted when an exception occurs. After the restart, the screen management may acquire current folding information according to a scheme as shown in fig. 9 or fig. 10, and the camera service extension may acquire the current folding information from the screen management after the restart, thereby re-transmitting the folding information to the camera device management through the camera data transmission.
In other scenes, the system service and the camera equipment management can be restarted when abnormal conditions occur. Then the re-transmission of the folding information can be implemented in combination with the scheme shown in fig. 10 and the scheme shown in fig. 14.
The above description mainly introduces the solutions provided in the embodiments of the present application from the perspective of each service module. To implement the above functions, it includes hardware structures and/or software modules for performing the respective functions. Those of skill in the art would readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
Fig. 15 shows a schematic block diagram of an electronic device 1500. As shown in fig. 15, the electronic device 1500 may include: a processor 1501 and memory 1502. The memory 1502 is used to store computer-executable instructions. For example, in some embodiments, the processor 1501, when executing instructions stored by the memory 1502, can cause the electronic device 1500 to perform the camera call method shown in any of the above embodiments.
It should be noted that all relevant contents of each step related to the method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
Fig. 16 shows a schematic diagram of a chip system 1600. The chip system 1600 may include: a processor 1601 and a communication interface 1602 for supporting relevant devices to implement the functions involved in the above embodiments. In one possible design, the system-on-chip further includes a memory for storing necessary program instructions and data for the terminal. The chip system may be formed by a chip, or may include a chip and other discrete devices. It should be noted that, in some implementations of the present application, the communication interface 1602 may also be referred to as an interface circuit.
It should be noted that all relevant contents of each step related to the above method embodiment may be referred to the functional description of the corresponding functional module, and are not described herein again.
The functions or actions or operations or steps, etc., in the above embodiments may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The procedures or functions described in accordance with the embodiments of the present application are all or partially generated upon loading and execution of computer program instructions on a computer. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored on a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website, computer, server, or data center to another website, computer, server, or data center via wire (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or can comprise one or more data storage devices, such as a server, a data center, etc., that can be integrated with the medium. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
Although the present application has been described in conjunction with specific features and embodiments thereof, it will be evident that various modifications and combinations may be made thereto without departing from the spirit and scope of the application. Accordingly, the specification and figures are merely exemplary of the present application as defined in the appended claims and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the present application. It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include such modifications and variations.

Claims (16)

1. The camera calling method is characterized by being applied to electronic equipment, wherein a folding screen is arranged in the electronic equipment, a first camera and a second camera are arranged in the electronic equipment, and when the electronic equipment is in a flattening state, the first camera and the second camera are positioned on two surfaces of the electronic equipment; the method comprises the following steps:
a camera service in system service of the electronic device expands to acquire folding information of a current folding screen, wherein the folding information comprises a folding angle of the folding screen and/or state information of the folding screen, the state information comprises a first state or a second state, and the folding angle corresponding to the first state is larger than the folding angle corresponding to the second state;
the camera service extension sends the folding information to a camera device management of the electronic device;
the camera equipment management determines a camera identifier according to the folding information, wherein the camera identifier is used for marking the first camera or the second camera;
the camera device manages a camera driver which transmits the camera identification to the electronic device;
the camera driver calls a corresponding first camera or a corresponding second camera according to the camera identification;
when the folding angle corresponding to the folding information is greater than a preset angle, the camera mark is used for marking the first camera; when the folding angle corresponding to the folding information is smaller than a preset angle, the camera identifier is used for marking the second camera; the first camera corresponds to an internal camera, and the second camera corresponds to an external camera.
2. The method of claim 1, wherein the folding information includes state information, and when the state information is the first state, a folding angle of the folding screen is greater than a preset angle;
and when the state information is in the second state, the folding angle of the folding screen is smaller than the preset angle.
3. The method of claim 2, wherein the first camera is disposed inside the electronic device and the second camera is disposed outside the electronic device, the outside of the electronic device being a side of the electronic device that is exposed to the outside when the electronic device is folded;
when the state information is the first state, the system service sends the folding information to a camera device management of the electronic device, including:
the system service sending first folding information to the camera device management, the first folding information including the first state;
the camera device management determining a camera identification according to the folding information, comprising:
the camera equipment management determines that the camera identification is a first identification according to the first state, and the first identification corresponds to the first camera;
the camera device management transmits the camera identification to the camera drive of the electronic device, and the camera drive calls the corresponding first camera or second camera according to the camera identification, including:
and the camera equipment management transmits the first identifier to a camera driver of the electronic equipment, and the camera driver calls the first camera according to the first identifier.
4. The method of claim 3,
when the state information is in the second state, the system service sends the folding information to a camera device management of the electronic device, including:
the system service manages and sends second folding information to the camera device, wherein the second folding information comprises the second state;
the camera device management determining a camera identification according to the folding information, comprising:
the camera equipment management determines that the camera identification is a second identification according to the second state, and the second identification corresponds to the second camera;
the camera device management will camera identification transmits the camera drive of electronic equipment, the camera drive is according to camera identification calls corresponding first camera or second camera, include:
and the camera equipment management transmits the second identifier to a camera driver of the electronic equipment, and the camera driver calls the second camera according to the second identifier.
5. The method according to any one of claims 1 to 4,
the system service is provided with a screen management service;
the method for acquiring the folding information of the current folding screen by the system service of the electronic equipment comprises the following steps:
the screen management service obtains the folding information.
6. The method according to claim 5, wherein the system service is provided with a camera service extension service and a camera data transmission service; the method further comprises the following steps:
the camera service extension service acquires the folding information from the screen management service;
the system service sending the folding information to camera device management of the electronic device, including:
the camera service extension service manages and transmits the folding information to the camera device through the camera data transmission service.
7. The method of claim 6,
before the camera service extension service acquires the folding information from the screen management service, the method further includes:
the camera service extension service registers a folded screen state with the screen management service to acquire the folded information from the screen management.
8. The method according to claim 6 or 7,
the camera service extension service acquires the folding information when a camera application of the electronic equipment starts to run; alternatively, the first and second electrodes may be,
and the camera service expansion service acquires the folding information when the folding information is changed.
9. The method of claim 1, wherein after the camera device manages an abnormal restart, the method further comprises:
and the system service sends the folding information of the current folding screen to the camera equipment for management.
10. The method of claim 9, wherein before the system service sends the folding information of the current folded screen to the camera device for management, the method further comprises:
and the system service acquires the folding information of the current folding screen again.
11. The method according to claim 9 or 10,
the system service monitors an abnormal state managed by the camera device through a camera service of the electronic device.
12. The method of claim 11, wherein a status monitor is provided in the camera service, the method further comprising:
the state monitor outputs an exception identification to the system service upon the camera device managing an exception restart.
13. The method of claim 12, further comprising:
and after the camera equipment management is abnormally restarted, the state monitor outputs a normal working identifier to the system service.
14. An electronic device, comprising one or more processors and one or more memories; the one or more memories coupled with the one or more processors, the one or more memories storing computer instructions;
the computer instructions, when executed by the one or more processors, cause the electronic device to perform the camera call method of any of claims 1-13.
15. A computer-readable storage medium comprising computer instructions which, when executed, perform the camera call method of any of claims 1-13.
16. A system-on-chip, the system-on-chip comprising a processor and a communication interface; the processor is used for calling and running a computer program stored in a storage medium from the storage medium and executing the camera calling method according to any one of claims 1-13.
CN202210023763.2A 2022-01-10 2022-01-10 Camera calling method and electronic equipment Active CN114554078B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210023763.2A CN114554078B (en) 2022-01-10 2022-01-10 Camera calling method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210023763.2A CN114554078B (en) 2022-01-10 2022-01-10 Camera calling method and electronic equipment

Publications (2)

Publication Number Publication Date
CN114554078A CN114554078A (en) 2022-05-27
CN114554078B true CN114554078B (en) 2023-01-31

Family

ID=81669748

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210023763.2A Active CN114554078B (en) 2022-01-10 2022-01-10 Camera calling method and electronic equipment

Country Status (1)

Country Link
CN (1) CN114554078B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110456938A (en) * 2019-06-28 2019-11-15 华为技术有限公司 A kind of the false-touch prevention method and electronic equipment of Curved screen

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968315B (en) * 2012-10-30 2015-11-11 广东欧珀移动通信有限公司 A kind of smart machine starts the method for camera preview, system and smart machine fast
CN104699391B (en) * 2015-04-07 2018-10-12 联想(北京)有限公司 The control method of electronic equipment and its camera
CN107613196A (en) * 2017-09-05 2018-01-19 珠海格力电器股份有限公司 A kind of self-timer method and its device, electronic equipment
KR20200129584A (en) * 2019-05-09 2020-11-18 삼성전자주식회사 Foldable apparatus and method for controlling photographing using a plurality of cameras
CN113366819B (en) * 2019-05-29 2022-08-16 深圳市欢太科技有限公司 Camera starting method, related device, electronic equipment and storage medium
CN112104807B (en) * 2019-06-17 2023-07-04 北京小米移动软件有限公司 Control method, system and device for front camera
CN110798568B (en) * 2019-09-30 2022-01-14 华为技术有限公司 Display control method of electronic equipment with folding screen and electronic equipment

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110456938A (en) * 2019-06-28 2019-11-15 华为技术有限公司 A kind of the false-touch prevention method and electronic equipment of Curved screen

Also Published As

Publication number Publication date
CN114554078A (en) 2022-05-27

Similar Documents

Publication Publication Date Title
CN103197991B (en) Mobile terminal and its control method
US9746948B2 (en) Mobile terminal and control method thereof
CN107193524B (en) Multi-display device and method of operating the same
CN114461239B (en) Software upgrading system and software upgrading method
KR101303236B1 (en) Mobile terminal and control method thereof
CN113360222A (en) Application information display method and related equipment
JP2019067308A (en) Display apparatus
CN114442969A (en) Inter-device screen cooperation method and device
WO2022063037A1 (en) Method and apparatus for installing patch package
WO2022089407A1 (en) Display method and electronic device
CN113190362B (en) Service calling method and device, computer equipment and storage medium
CN114554078B (en) Camera calling method and electronic equipment
WO2023109764A1 (en) Wallpaper display method and electronic device
CN115328563B (en) System starting method and electronic equipment
CN113632041A (en) System, method, computer program, mobile device and kit for operating a device with low computing power
CN114138343A (en) Terminal and terminal starting method
CN113935427A (en) Training task execution method and device, electronic equipment and storage medium
CN114995591A (en) Sensor registration method, control system and related equipment
CN112783533A (en) Version information updating method, version information updating device, terminal and storage medium
CN116709004B (en) Image processing method and electronic equipment
CN116708615B (en) Device registration method, device registration apparatus and storage medium
CN114513760B (en) Font library synchronization method, device and storage medium
CN116366957B (en) Virtualized camera enabling method, electronic equipment and cooperative work system
WO2023143377A1 (en) Content management method, and electronic device and system
CN115941674B (en) Multi-device application connection method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant