Camera control method and device

By concurrently calling multiple cameras on electronic devices and using virtualized sharing services and hardware virtualization services to manage camera status, the shortcomings of camera control functions in the prior art are solved, and user experience and call efficiency are improved.

CN117714846BActive Publication Date: 2024-11-12HONOR DEVICE CO LTD
View PDF 16 Cites 0 Cited by

Patent Information

Application Number
CN202310862277.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-12
Publication Date
2024-11-12
Estimated Expiration
2043-07-12

AI Technical Summary

Technical Problem

The existing camera control function cannot realize concurrent calls of multiple cameras, resulting in poor user experience and the inability to prioritize the call requirements of certain cameras.

Method used

By using the first camera and the second camera concurrently invoked on the first electronic device, combining virtualization sharing services and hardware virtualization services, caching camera status and call information, optimizing the call and release process of the camera to ensure the accuracy of multiple cameras. and real-time calls.

Benefits of technology

It realizes better camera call functions and improves user experience, ensuring that concurrent calls of multiple cameras do not conflict, and prioritizes the execution of high-priority services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117714846B_ABST
    Figure CN117714846B_ABST
Patent Text Reader

Abstract

The present application provides a camera control method and device, wherein a first electronic device has a camera, and the camera includes a first camera and a second camera. The first camera is used to shoot to obtain a first channel of data, and in the process of shooting with the first camera, in response to calling the second camera, the second camera is used to shoot to obtain a second channel of data, and the first camera is used to continue shooting to obtain the first channel of data, thereby realizing concurrent use of multiple cameras on the first electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic information technology, and in particular to a camera control method and device. Background Art

[0002] Cameras are common devices on electronic devices, and cameras on electronic devices are usually used to capture images or video data. In order to meet users' increasingly high demands for images, electronic devices are usually equipped with multiple cameras.

[0003] There is room for improvement in the existing camera control functions. Summary of the invention

[0004] The present application provides a camera control method and device, aiming to solve the problem of how to improve the camera control function.

[0005] In order to achieve the above objectives, this application provides the following technical solutions:

[0006] The first aspect of the present application provides a camera control method, which is applied to a first electronic device, wherein the first electronic device has a camera, and the camera includes a first camera and a second camera, and the method includes: using the first camera to shoot and obtain a first channel of data; in the process of shooting with the first camera, in response to calling the second camera, using the second camera to shoot and obtain a second channel of data, and using the first camera to continue shooting and obtain the first channel of data. It can be seen that the first camera and the second camera on the first electronic device can be called concurrently, thereby improving the camera control function and obtaining a better user experience.

[0007] In some implementations, using the first camera to shoot and obtain the first data includes: in response to the second electronic device calling the first camera, using the first camera to shoot and obtain the first data; the method also includes: transmitting the first data to the second electronic device so that the second electronic device can call the camera of the first electronic device to obtain the data.

[0008] In some implementations, before continuing to shoot with the first camera to obtain the first channel of data, the method further includes:

[0009] In response to the first electronic device calling the camera of the first electronic device, the first camera is suspended for shooting. The purpose of pausing recording is to give priority to ensuring the first electronic device calling the camera of the first electronic device.

[0010] In some implementations, continuing to shoot with the first camera to obtain a first path of data includes: querying the status of the first camera, the first camera status indicating that the first camera is occupied or in an idle state; in response to the first camera being in an idle state, continuing to shoot with the first camera to obtain the first path of data, so as to prioritize the first electronic device's call to the camera of the first electronic device.

[0011] In some implementations, in response to the second electronic device calling the first camera, using the first camera to shoot includes: in response to the second electronic device calling the first camera, displaying a confirmation interface on the first electronic device; and in response to a confirmation operation based on the confirmation interface, using the first camera to shoot. The confirmation interface can both obtain a better user experience and reduce the leakage of private data such as videos.

[0012] In some implementations, the method further includes: transmitting an interface prompt instruction to the second electronic device, the interface prompt instruction being used to prompt that a confirmation interface is displayed on the first electronic device. Because the user's attention is on the second electronic device when the second electronic device calls the camera of the first electronic device, displaying the confirmation interface on the second electronic device prompting the first electronic device is conducive to obtaining a better user experience and facilitating the user to confirm in a timely manner.

[0013] In some implementations, the first electronic device runs a virtualization sharing service and a hardware virtualization service; before using the first camera to shoot and obtain the first data, it also includes: the virtualization sharing service receives a camera request instruction transmitted by the second electronic device, the camera request instruction includes information of the first electronic device and information of the first camera; the hardware virtualization service caches the information of the camera on the first electronic device based on the camera request instruction, the camera information includes: information of the device to which the camera belongs, the camera state, and information of the caller of the camera, wherein, in response to the camera request instruction, the camera state of the first camera is cached as occupied, and the caller of the first camera is cached as an application on the second electronic device. Caching the camera information can lay the foundation for subsequent camera calls, and, when multiple cameras are called concurrently, ensure that multiple cameras are called accurately without conflict.

[0014] In some implementations, before continuing to use the first camera to shoot and obtain the first data, it also includes: in response to the first electronic device calling the camera of the first electronic device, the virtualization sharing service notifies the hardware virtualization service to pause recording; the hardware virtualization service stops transmitting the first data to the second electronic device, and updates the cached first camera status; the virtualization sharing service queries the first camera status from the hardware virtualization service, thereby laying the foundation for whether to continue allowing the second electronic device to call the first camera.

[0015] In some implementations, using the first camera to continue shooting to obtain the first data path includes: the virtualization sharing service transmits a startup instruction of the first camera to the hardware virtualization service in response to the first camera being in an idle state; the hardware virtualization service resumes transmitting the first data path to the second electronic device in response to the startup instruction, and updates the cached state of the first camera. The state of the first camera is updated as the transmission of the first data path to the second electronic device is resumed, which is conducive to ensuring the accuracy and real-time performance of the camera state and laying a foundation for the accuracy of concurrent calls of multiple cameras.

[0016] In some implementations, using the first camera to shoot and obtain the first data path includes: in response to the first electronic device calling the first camera, using the first camera to shoot and obtain the first data path; in response to the call to the second camera, using the second camera to shoot, including: in response to the second electronic device calling the second camera, querying the second camera state, the second camera state indicating that the second camera is occupied or idle; in response to the second camera being idle, using the second camera to shoot; the method also includes: transmitting the second data path to the second electronic device. It can be seen that when the first electronic device has called the first camera, the second electronic device can still call the second camera, realizing the concurrent calling of multiple cameras on the first electronic device.

[0017] In some implementations, the method further includes: in response to the second camera being occupied, transmitting a prompt message indicating that the camera is occupied to the second electronic device to obtain a better user experience.

[0018] In some implementations, in response to the second electronic device calling the second camera, using the second camera to shoot, including: in response to the second electronic device calling the second camera, displaying a confirmation interface on the first electronic device; in response to a confirmation operation based on the confirmation interface, using the second camera to shoot, which is conducive to obtaining a better user experience and facilitates the user to confirm in time.

[0019] In some implementations, the method further includes: transmitting an interface prompt instruction to the second electronic device, where the interface prompt instruction is used to prompt that a confirmation interface is displayed on the first electronic device.

[0020] In some implementations, the first electronic device runs a virtualization sharing service and a hardware virtualization service; in response to a call to a second camera by a second electronic device, the second camera status is queried, including: the virtualization sharing service receives a camera request instruction transmitted by the second electronic device, the camera request instruction includes information of the first electronic device and information of the second camera; the virtualization sharing service queries the status information of the second camera from the hardware virtualization service in response to the camera request instruction. Through the collaboration of the virtualization sharing service and the hardware virtualization service, a foundation is laid for concurrent calls of multiple cameras.

[0021] In some implementations, before querying the status information of the first camera from the hardware virtualization service, it also includes: the hardware virtualization service caches the information of the camera on the first electronic device, and the camera information includes: information of the first electronic device to which the camera belongs, the camera status, and information of the caller of the camera.

[0022] In some implementations, after using the second camera to shoot, it also includes: the hardware virtualization service updates the cached second camera status to ensure the accuracy and real-time of the camera status indicating whether the camera is occupied or idle, laying the foundation for accurate calling of the camera.

[0023] A second aspect of the present application provides a camera control method, which is applied to a second electronic device, comprising: in response to an operation of selecting a virtual camera on the second electronic device, transmitting a camera request instruction to a first electronic device to which the virtual camera belongs, the camera request instruction instructing to call a first camera of the first electronic device, the virtual camera being the first camera; while the first electronic device is using the second camera of the first electronic device to shoot, receiving data obtained by calling the first camera to shoot, thereby realizing concurrent calling of multiple cameras on the same electronic device.

[0024] In some implementations, before the first electronic device uses the second camera of the first electronic device to shoot, and after transmitting a camera request instruction to the first electronic device to which the virtual camera belongs, it also includes: receiving data obtained by shooting with the first camera; while the first electronic device uses the second camera of the first electronic device to shoot, receiving data obtained by calling the first camera to shoot, including: while the first electronic device uses the second camera of the first electronic device to shoot, continuing to receive the first channel of data obtained by calling the first camera to shoot.

[0025] In some implementations, before receiving data obtained by calling the first camera to shoot, it also includes: receiving an interface prompt instruction transmitted by the first electronic device, the interface prompt instruction is used to prompt that a confirmation interface is displayed on the first electronic device, and the confirmation interface is used to confirm or reject the second electronic device's call to the first camera.

[0026] The third aspect of the present application provides an electronic device, comprising: a memory for storing applications; and one or more processors for running applications to implement the camera control method provided in the first aspect or the second aspect of the present application.

[0027] The fourth aspect of the present application provides a computer-readable storage medium having a program stored thereon, and when a computer device runs the program, the camera control method provided in the first aspect or the second aspect of the present application is implemented.

[0028] The fifth aspect of the present application provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the camera control method provided in the first aspect or the second aspect of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 Example of a scenario where a computer uses a mobile phone’s camera;

[0030] Figure 2 This is an example of a scenario where the computer uses the phone's rear camera and the phone uses the front camera.

[0031] Figure 3 Another example of a scenario where the computer uses the rear camera of the phone and the phone uses the front camera;

[0032] Figure 4 This is a structural example diagram of an electronic device disclosed in an embodiment of the present application;

[0033] Figure 5 An example diagram of a software framework in a first electronic device and a second electronic device disclosed in an embodiment of the present application;

[0034] Figure 6 This is a flow chart of a computer calling a mobile phone's camera according to an embodiment of the present application;

[0035] Figure 7 Another flow chart of the computer calling the camera of the mobile phone disclosed in the embodiment of the present application;

[0036] Figure 8 This is an example of the foreground application interface displayed on the mobile phone when the mobile phone's camera is called by the computer;

[0037] Fig. 9This is an example of the interface displayed on the mobile phone and the computer when the mobile phone's camera is called by the computer;

[0038] Fig.10 Another flow chart of the computer calling the camera of the mobile phone disclosed in the embodiment of the present application;

[0039] Fig.11 This is another flowchart of using a computer to call a mobile phone's camera as disclosed in an embodiment of the present application. DETAILED DESCRIPTION

[0040] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the embodiments of the present application, "one or more" refers to one, two or more; "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship.

[0041] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0042] The multiple involved in the embodiments of the present application means greater than or equal to two. It should be noted that in the description of the embodiments of the present application, the words "first", "second", etc. are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying an order.

[0043] Figure 1 Call the rear camera of mobile phone 2 for computer 1 ( Figure 1An example of a scenario for demonstration (not shown) is used. Since the mobile phone 2 is more portable than the computer 1, the method in which the computer 1 calls the rear camera 21 of the mobile phone 2 for demonstration has better convenience and is conducive to improving the user experience. Figure 1 The example in which the captured image is also displayed on the mobile phone is taken, but it is not limited to this.

[0044] However, the inventors found during the research that when any camera on the mobile phone 2 is called, even if other cameras on the mobile phone 2 are not called, that is, in an idle state, other cameras on the mobile phone 2 cannot be called. Figure 1 As shown, the front camera on mobile phone 2 ( Figure 1 ) is in idle state, but when the rear camera is called, the front camera cannot be called.

[0045] It can be seen that there is still room for improvement in the existing camera calling function.

[0046] The inventor also found in the process of research that the camera calling function can be improved as follows: Figure 2 and Figure 3 shown.

[0047] Figure 2 In the example of computer 1 accessing a remote conference, computer 1 calls the rear camera of mobile phone 2 ( Figure 2 During the demonstration (not shown), mobile phone 2 receives a video call request. After the user clicks the control to answer the video call on mobile phone 2, mobile phone 2 calls the front camera ( Figure 2 (not shown) to implement video call services, Figure 2 In the example, the front camera is used to shoot the face of a user holding a mobile phone, and computer 1 still uses the rear camera of mobile phone 2 for demonstration.

[0048] Figure 3 In Figure 3 As shown in (a), mobile phone 2 receives a video call request. After the user clicks the control to answer the video call on mobile phone 2, mobile phone 2 calls the front camera to implement the video call service. Figure 3 For example, the front camera captures the face of a user holding a mobile phone. During a video call, Figure 3 As shown in (b) in FIG. 1 , computer 1 joins the remote conference, and it is assumed that computer 1 has not yet called the camera of mobile phone 2. Figure 3 As shown in (c), computer 1 calls the rear camera on mobile phone 2 to obtain the demonstration image.

[0049] In some implementations, when the computer 1 calls the rear camera of the mobile phone 2, a prompt message indicating that the rear camera is called is displayed in the notification bar of the mobile phone 2 ( Figure 2 and Figure 3 not shown).

[0050] The embodiments of the present application provide a camera control method and device for providing a better camera call function. For examples of better camera call functions, see Figure 2 and Figure 3 .

[0051] In the camera control method provided in the embodiment of the present application, the electronic device whose camera is called is referred to as the first electronic device, and the electronic device that calls the camera of the first electronic device is referred to as the second electronic device.

[0052] In some embodiments, the first electronic device or the second electronic device can be a mobile phone, a tablet computer, a desktop, a laptop, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, a personal digital assistant (PDA), a wearable electronic device, a smart watch, and the like.

[0053] An example of the first electronic device is Figure 2 and Figure 3 The mobile phone 2 shown. An example of the second electronic device is Figure 2 and Figure 3 Computer 1 is shown.

[0054] Figure 4 The following is an example of the structure of an electronic device. Taking a mobile phone as an example, the electronic device 100 may include a processor 110, an internal memory 120, a display screen 130, a camera 140, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, and an audio module 170, etc.

[0055] It is to be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0056] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0057] The internal memory 120 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 120. The internal memory 120 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device (such as audio data, a phone book, etc.), etc. In addition, the internal memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 120, and / or the instructions stored in the memory provided in the processor.

[0058] The electronic device implements the display function through a GPU, a display screen 130, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 130 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0059] The display screen 130 is used to display images, videos, etc. The display screen 130 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oled, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 130, where N is a positive integer greater than 1.

[0060] The electronic device 100 can realize the shooting function through the ISP, the camera 140, the video codec, the GPU, the display screen 130 and the application processor.

[0061] The ISP is used to process the data fed back by the camera 140. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 140.

[0062] The camera 140 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 140, where N is a positive integer greater than 1. In combination with the control method provided in the embodiments of the present application, the camera 140 includes at least a front camera and a rear camera.

[0063] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0064] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0065] The internal memory 120 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 120. The internal memory 120 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 120, and / or the instructions stored in the memory provided in the processor.

[0066] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the microphone 170B and the application processor.

[0067] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110. The audio module 170 can support audio functions.

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

[0069] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering processing, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2. The wireless communication module 160 can realize the wireless connection function between the first electronic device and the second electronic device.

[0070] The software framework is run in the electronic device to implement the camera control method provided in the embodiment of the present application. Taking the first electronic device as a mobile phone and the second electronic device as an example, the software frameworks run in the first electronic device and the second electronic device are as follows: Figure 5 shown.

[0071] The software framework related to the camera control method provided in the embodiment of the present application and running in the computer includes: a business application layer, an office business middle platform, an interconnection middle platform, a windows OS, and a driver layer.

[0072] The business application layer runs various applications. Figure 5 For example, examples of applications are notes, instant messaging, and cameras, etc. These applications all have the function of supporting video services.

[0073] The office business center runs a virtualized sharing service. The virtualized sharing service includes scheduling management, status management, and settings management. Applications can schedule and interact with modules running in the interconnected center through virtualized sharing services. In some implementations, scheduling management is used to start or stop an Android camera, which can be understood as a camera on an electronic device running an Android operating system (referred to as the Android end). Status management is used to monitor the status of the Android end camera, including occupied or idle. Settings management is used to enable or disable whether the current device can support the camera sharing service.

[0074] The interconnection center runs device management middleware, MagicLink, and hardware virtualization services.

[0075] MagicLink can be understood as a physical channel protocol layer. Based on the pre-configured physical channel protocol, it establishes a physical channel with the peer device such as a mobile phone. Figure 5 In the present invention, the physical channel is exemplified by peer to peer (P2P), wireless local area network (WLAN), and Bluetooth (BT). In some implementations, device discovery is used to provide the function of discovering the peer device and being discovered by the peer device. Device connection is used to establish a physical channel. Data transmission is used to transmit data with the peer device based on the physical channel.

[0076] Hardware virtualization services include video virtualization and audio virtualization. Video virtualization is used to provide the function of calling virtualized hardware, such as a virtualized camera, to obtain video data. Audio virtualization is used to provide the function of calling virtualized hardware, such as a virtualized microphone, to obtain audio data.

[0077] Device management middleware includes service management and device management. Service management is used for service registration and mutual scheduling. Device management is used for device discovery (i.e., device online or offline).

[0078] Windows OS is the Windows operating system (OS) running in the computer, wherein the modules related to video acquisition include audio and video codec, camera, Transmission Control Protocol (TCP) / Internet Protocol (IP), and graphic display. The specific functions of each module will not be described here.

[0079] The driver layer runs various hardware drivers. Figure 5 The virtual camera (Camera) driver, Bluetooth (BT) driver and wireless LAN (Wireless Fidelity, WIFI) driver are taken as examples.

[0080] The software framework related to the control method provided in the embodiment of the present application and running in the mobile phone includes: an office business middle platform, an interconnection middle platform, an Android OS, and a driver layer.

[0081] The virtualized shared service is run in the office business. The virtualized shared service includes scheduling management and status management. Scheduling management is used to start or stop the Android camera. Status management is used to monitor the status of the Android camera, including occupied or idle. Figure 5 In this example, the computer can call the camera of the mobile phone, but the mobile phone does not have the function of calling the camera of other devices. In this example, the virtual sharing service of the mobile phone does not include setting management. But it is understandable that Figure 5 Just as an example, the virtualized sharing service of the mobile phone can also include setting management to enable or disable whether the current device can support the camera sharing service. The interconnection center runs device management middleware, MagicLink, and hardware virtualization services. The functions of the modules running in the interconnection center can be referred to the functions of the interconnection center in the computer, which will not be repeated here.

[0082] Android OS is the Android operating system (OS) running in the mobile phone, in which the modules related to video acquisition include audio and video codec, camera, TCP / IP, and graphic display.

[0083] The driver layer runs various hardware drivers. Figure 5 The virtual Camera driver, BT driver and WIFI driver are taken as examples.

[0084] based on Figure 5 The software framework shown in the figure implements Figure 2 The logical flow of the functions shown is as follows Figure 6 As shown, the following steps are included:

[0085] 1. The third-party application or system camera in the computer calls the virtual camera through the hardware virtualization service.

[0086] Examples of third-party applications include Figure 5 The system camera can be understood as the camera of the system running on the computer, such as Figure 5 The camera shown in .

[0087] The virtual camera can be understood as a virtual camera on the computer rather than a physical camera configured on the computer. Figure 6 In the process shown, an example of a virtual camera is a physical camera in a mobile phone, which can also be called an Android camera.

[0088] In some implementations, a third-party application or a system camera provides an interface, and the user triggers the call of the virtual camera through the interface. For example, in the system camera interface, the user clicks to select the information of the rear camera on the mobile phone, and triggers the call of the rear camera on the mobile phone.

[0089] It is understandable that the hardware virtualization service in the computer calls the corresponding camera in the mobile phone based on the information of the camera selected by the third-party application or the system camera.

[0090] After the call is completed, the hardware virtualization service in the computer transmits the data captured by the mobile phone's camera to the subject that calls the virtual camera (third-party application or system camera), and the subject can display the data based on the data captured by the mobile phone's camera.

[0091] Combination Figure 2 As shown, computer 1 uses the rear camera of mobile phone 2 for demonstration.

[0092] When the computer calls the camera of the mobile phone to obtain the video stream, the interface of the camera being called is displayed on the mobile phone. In the embodiment of the present application, this interface is called the virtualization sharing service application foreground interface. Figure 8 Taking (a) in FIG. 1 as an example, a pause control 81, a disconnect control 82, and a prompt message 83 indicating that the rear camera is in use are displayed in the foreground application interface of the virtualization sharing service application.

[0093] After the user clicks the pause control 81, the mobile phone pauses the computer's call to the mobile phone's camera, and, Figure 8 The interface shown in (a) is switched to Figure 8 The interface shown in (b). Figure 8 The interface shown in (b) includes a restore control 84, a disconnect control 82, and a prompt message 85 indicating that the rear camera has been suspended. The user can click the restore control 84 to restore the computer's call to the phone's camera. After the user clicks the restore control 84, the computer switches to Figure 8 The interface shown in (a).

[0094] Users can click Figure 8 (a) or Figure 8 The disconnect control in the interface shown in (b) controls the mobile phone to stop the computer from calling the mobile phone's camera.

[0095] Figure 8 (a) and Figure 8 The interface shown in (b) also includes a prompt message 86 of "Connected to XXXX" and a camera call mark 87. "XXXX" is the information of the device (such as a computer) that calls the camera of the mobile phone.

[0096] 2. When the camera of the mobile phone is called by the computer, the instant messaging client in the mobile phone receives the call. In response to the operation of answering the call, the instant messaging client sends an instruction to launch an application activity to the system framework.

[0097] In some implementations, the user answers a call in a call interface of an instant messaging client, and the instant messaging client sends an instruction to launch an application Activity to the system framework based on the answering operation.

[0098] An example of a system framework is a system framework layer in an Android operating system. An application Activity can be understood as an Activity that supports an instant messaging client to make a video call.

[0099] 3. The mobile phone's instant messaging client makes video calls by using the phone's camera.

[0100] exist Figure 6 In the process shown, the case where the mobile phone needs to use the mobile phone's camera is taken as a higher priority service. That is, if the user answers the call from the instant messaging client, it means that the user's more urgent need is to answer the call, so the mobile phone's camera is used for instant messaging first.

[0101] 4. The system framework notifies the virtualized shared service and applies the virtualized shared service to the foreground interface ( Figure 6 The application will then exit to the background.

[0102] In some implementations, the instant messaging client is configured to call the front camera of the mobile phone. In other implementations, the instant messaging client is configured to call the rear camera of the mobile phone.

[0103] 5. The virtualization sharing service moves the virtualization sharing service application foreground interface to the background, and sends a recording pause instruction to the hardware virtualization service.

[0104] The pause recording instruction is used to instruct the hardware virtualization service to pause the computer from calling the mobile phone's camera. Therefore, the computer cannot receive the data recorded by the mobile phone's camera.

[0105] The purpose of pausing recording is to ensure that the higher priority service, that is, the mobile phone's instant messaging client calling the mobile phone's camera for calls, is executed first and is not interrupted. For example, if the computer calls the mobile phone's rear camera, and the instant messaging client's video call also calls the mobile phone's rear camera, pausing the computer's call to the rear camera can ensure that the video call is executed first.

[0106] After the foreground interface of the virtualized shared service application retreats to the background, it can be minimized to be displayed in the notification bar, and the user can view the foreground interface of the virtualized shared service application by operating the notification bar.

[0107] 6. The virtualization sharing service queries the hardware virtualization service for the camera status of the mobile phone.

[0108] 7. The hardware virtualization service transmits the camera status of the mobile phone to the virtualization sharing service.

[0109] It is understandable that the camera status of the mobile phone includes information on whether the camera called by the computer is occupied.

[0110] 8. The virtualized sharing service of the mobile phone executes the following logic based on the camera status of the mobile phone: determine whether the camera called by the computer is occupied, if yes, execute 9, if not, execute 10.

[0111] 9. Keep recording paused.

[0112] It is understandable that the judgment result indicates that the camera being called by the mobile phone's instant messaging client is also the camera being called by the computer.

[0113] In order to ensure the execution of higher priority services, the computer continues to suspend calling the mobile phone's camera, that is, the camera is kept preferentially called by the mobile phone's instant messaging client.

[0114] 10. Continue recording.

[0115] It is understandable that a negative judgment result indicates that the camera called by the computer has not been called by the instant messaging client of the mobile phone, and therefore, can continue to be called by the computer.

[0116] Combination Figure 2 As shown, during the process of computer 1 calling the rear camera of mobile phone 2 for demonstration, mobile phone 2 receives a request for a video call. After the user clicks the control to answer the video call on mobile phone 2, because mobile phone 2 calls the front camera to implement the video call service, computer 1 still calls the rear camera of mobile phone 2 for demonstration.

[0117] on the contrary, Figure 2 An example of a scenario not shown is: if computer 1 calls the front camera of mobile phone 2 for a demonstration, and mobile phone 2 also calls the front camera to answer a video call, the call on mobile phone 2 is given priority, and the call of the front camera of mobile phone 2 by computer 1 is paused (i.e., the recording remains paused).

[0118] It is understandable that the time delay for making a judgment after pausing recording is short, and therefore, the pausing recording may not be perceived by the user on the computer 1 side, or may be perceived very briefly.

[0119] The following will be combined Figure 5 The software framework shown is Figure 6 The process shown is described in more detail. Figure 7 Another camera control method disclosed in an embodiment of the present application includes the following steps:

[0120] S11. A third-party application or a system camera of the computer receives an operation of selecting a virtual camera by the user.

[0121] As mentioned above, the third-party application or the system camera receives the user's operation of selecting a virtual camera through the displayed interface.

[0122] It is understandable that before executing S11, a virtual camera that can be called has been mounted in the computer. In some implementations, the computer has called the camera of a mobile phone or other device as a virtual camera. In this case, the information of the called virtual camera is stored in the computer and can be displayed in the interface. In other implementations, the camera of a mobile phone or other device is discovered by the computer and used as a virtual camera, and the information is stored in the computer and can be displayed in the interface.

[0123] S12. The hardware virtualization service of the computer continuously monitors the virtual camera, and monitors the switching of the virtual camera after the user selects the virtual camera.

[0124] In some implementations, the continuous monitoring is monitoring at a preset period.

[0125] It is understandable that after the user selects the virtual camera, the virtual camera is monitored to switch to the virtual camera selected by the user.

[0126] S13. In response to monitoring the switching of the virtual camera, the hardware virtualization service of the computer transmits an instruction to establish a P2P data stream channel to the MagicLink of the computer.

[0127] S14. A P2P data flow channel is established between the MagicLink of the computer and the MagicLink of the mobile phone.

[0128] It is understandable that before S14, the computer's MagicLink and the mobile phone's MagicLink had completed the mutual discovery process.

[0129] The specific steps for establishing a P2P data flow channel between the computer's MagicLink and the mobile phone's MagicLink are not described here.

[0130] The P2P data stream channel is used to transmit audio data stream and / or video data stream.

[0131] S15. The hardware virtualization service of the mobile phone monitors that a P2P data stream channel is established.

[0132] The hardware virtualization service needs to know whether the data stream channel is established successfully to facilitate scheduling actions such as destroying or recreating the data stream channel.

[0133] S16. The computer's hardware virtualization service transmits an instruction to turn on the camera to the computer's virtualization sharing service.

[0134] The execution order of S16 and S13-S15 is not limited. In one example, S16 and S13 are executed synchronously.

[0135] S17. In response to the instruction to turn on the camera, the computer's virtualized sharing service transmits an instruction to create a BT or WLAN signaling channel to the computer's MagicLink.

[0136] S18. Establish a BT or WLAN signaling channel between the MagicLink of the computer and the MagicLink of the mobile phone.

[0137] The BT signaling channel is a channel based on the BT protocol, and the WLAN signaling channel is a channel based on the WLAN protocol. The signaling channel is used to transmit signaling.

[0138] S19. The MagicLink of the mobile phone activates the virtualized sharing service of the mobile phone after confirming that the virtualized sharing service of the mobile phone is called for the first time.

[0139] It is understandable that if it is not the first time to call the virtualized sharing service of the mobile phone, it means that the virtualized sharing service is already in the started state and S19 can be skipped.

[0140] S20. Initialize the virtualized sharing service of the mobile phone.

[0141] Initialization can be understood as setting some parameters, examples of which include the display parameters of the aforementioned application foreground interface.

[0142] S21. The virtualized sharing service of the computer transmits a camera request signaling to the virtualized sharing service of the mobile phone.

[0143] It can be understood that in this step and subsequent steps, signaling is transmitted through the established BT or WLAN signaling channel.

[0144] The execution order of S21 and S17 - S20 is not limited. In one example, S21 and S17 are executed synchronously.

[0145] The camera request signaling (also referred to as an instruction) includes: information of the camera being called. The camera being called is the camera selected by the user. It is understandable that the camera selected by the user is a virtual camera for the computer and a physical camera for the mobile phone.

[0146] The information of the camera includes: information about the device to which the camera belongs, information about the camera type, and information about the user of the camera. In combination with the scenario where a third-party application or system camera in a computer calls the rear camera of a mobile phone, the device to which the camera belongs is a mobile phone, and an example of the device information is the mobile phone's identifier, such as 0000x123. The camera type is front-facing or rear-facing, and an example of the camera type information is 0 for front-facing and 1 for rear-facing. The user of the camera is a third-party application or system camera in a computer (collectively referred to as an application). An example of the camera user information is 0 for a system camera and 1 for a third-party application.

[0147] It is understandable that the information of the device to which the camera belongs and the type of the camera can be obtained in the process of discovering the camera. The mobile phone is an example of the device to which the camera belongs that can be called by the computer. The computer can also call the cameras in other devices such as PAD, etc., and the cameras of multiple devices can be discovered by the computer and the information of the cameras of multiple devices can be stored in the computer.

[0148] S22. The mobile phone's virtualization sharing service binds to the hardware virtualization service and registers a callback.

[0149] Binding the hardware virtualization service can be understood as starting the virtualization service to call the camera through the virtualization service.

[0150] Registering a callback can be understood as configuring the hardware virtualization service to be able to call back the function of the virtualization shared service.

[0151] S23. Binding service of hardware virtualization service of mobile phone.

[0152] The binding service can be understood as a service executed by the virtualized shared service of the binding mobile phone, that is, to achieve a handshake with the virtualized shared service of the mobile phone.

[0153] S24. The hardware virtualization service of the mobile phone caches the information of the camera called in the camera request signaling.

[0154] An example of information cached by the hardware virtualization service of the mobile phone is shown in Table 1:

[0155] Table 1

[0156]

[0157] Assume that the information of the camera called in the camera request signaling is: mobile phone ID: 0000x123, camera type 1, and user information 0. The hardware virtualization service of the mobile phone caches the information of the called camera in Table 1, that is, the first row in Table 1. In addition to the camera information, the state information is set to 1, indicating that it is called (i.e., occupied state).

[0158] It can be understood that in addition to the information of the called camera in the received camera request signaling, Table 1 can also store information of other cameras. For example, the second row in Table 1 indicates that the front camera on the mobile phone is in an idle state. Because it is in an idle state, the user is NA, which means invalid or empty.

[0159] In some implementations, after a previously called camera stops being called, the hardware virtualization service of the mobile phone does not delete the camera information, but changes the status from in use to idle. Therefore, all the information of the cameras that have been called will be cached. After receiving a request for the recorded camera to be called again, the status of the recorded camera is changed to in use.

[0160] S25. The hardware virtualization service of the mobile phone opens the called camera.

[0161] For example, if the camera being called is the rear camera of a mobile phone, the hardware virtualization service of the mobile phone turns on the rear camera of the mobile phone. However, at this time, the data captured by the called camera is not transmitted to the computer.

[0162] Combination Figure 5 In the framework shown, the hardware virtualization service controls the opening of the called camera through the Android OS and related modules of the driver layer.

[0163] S26. The virtualized sharing service of the mobile phone displays a confirmation pop-up window (an example of a confirmation interface).

[0164] In some implementations, when the function of calling the camera by other devices is used for the first time, a confirmation pop-up window is displayed. The first time can be understood as the first time within a preset time period, the first time after the mobile phone is turned on, or the first time called by the computer, etc.

[0165] An example of a confirmation pop-up window is Fig. 9 As shown in (a) in the figure, a "Smart Internet Service Sharing" interface pops up on the desktop of the mobile phone, and the interface includes authorization information 91 of the camera usage scenario, such as "To use the shared camera service, you need to agree to the following: the camera can be used in unlocked, locked, and off screen states." The interface also includes a non-repeated pop-up control 92, an agree control 93, and a cancel control 94.

[0166] After the user clicks the consent control 93, the pop-up window exits display and triggers execution of S27. After the user clicks the cancel control 94, the pop-up window exits display and stops executing subsequent steps. After the user checks the do not repeat pop-up control 92, the pop-up window will not be repeatedly popped up if the preset conditions are met. The preset conditions can be pre-configured. An example is: pausing the camera and resuming the call after it is adjusted.

[0167] The cancel control 94 may display countdown information such as “15 seconds”. After the countdown ends, the pop-up window receives a click operation on the consent control 93 by default.

[0168] The execution order of S26 and S22 - S25 is not limited here. In some implementations, S26 is executed while S22 is executed.

[0169] S27. The virtualization sharing service of the mobile phone transmits a pop-up prompt instruction to the virtualization sharing service of the computer.

[0170] The pop-up prompt command is used to instruct the display of pop-up prompt information.

[0171] It is understandable that the pop-up prompt instruction is transmitted through the signaling channel. In the following steps, except for the data flow, the instructions between the mobile phone and the computer are all transmitted through the signaling channel.

[0172] S28. The computer's virtualization sharing service displays a pop-up prompt message.

[0173] The pop-up window prompt message is used to remind that a confirmation pop-up window has been displayed on the phone.

[0174] Because the computer is calling the phone's camera, it is possible that the user's focus is on the computer rather than the phone. Therefore, S27-S28 reminds the user to promptly operate the confirmation pop-up window on the phone to achieve the purpose of improving the user's experience.

[0175] by Fig. 9 For example, in Figure (b), a reminder message "Please confirm camera sharing on your phone" pops up on the computer desktop. Before the user confirms in the pop-up confirmation window on the phone, the computer does not receive the data captured by the phone's camera, so the computer in Figure (b) does not display the data captured by the phone.

[0176] S29. In response to the user clicking “Agree” on the confirmation pop-up window, the mobile phone's virtualization sharing service transmits consent information to the mobile phone's hardware virtualization service.

[0177] As described above, if a cancel operation is received based on the confirmation pop-up window, the process ends, that is, the following steps are no longer executed.

[0178] It is understandable that after S29, the virtualized sharing service of the mobile phone is displayed in the front interface of the mobile phone application. Figure 8 Take (a) in the figure as an example, and the user can pause, resume and end the computer's call to the mobile phone's camera based on the application foreground interface.

[0179] S30. The hardware virtualization service of the mobile phone transmits a data stream to the MagicLink of the mobile phone in response to the consent information.

[0180] It can be understood that the data stream is the data stream captured by the called camera.

[0181] S31. The MagicLink of the mobile phone transmits data stream to the MagicLink of the computer.

[0182] It can be understood that the MagicLink of the mobile phone transmits data stream to the MagicLink of the computer through the established data stream channel.

[0183] S32. The computer's MagicLink transmits data stream to the computer's hardware virtualization service.

[0184] S33. The computer's hardware virtualization service transmits data streams to the computer's third-party applications or system camera.

[0185] In some implementations, the user selects a virtual camera based on the interface of a third-party application, and the computer's hardware virtualization service transmits a data stream to the computer's third-party application. In other implementations, the user selects a virtual camera based on the interface of a system camera, and the computer's hardware virtualization service transmits a data stream to the computer's system camera.

[0186] At this point, the user can see the data stream captured by the phone’s camera on the computer.

[0187] Combination Figure 2 As shown, the computer 1 displays the video stream captured by the rear camera of the mobile phone.

[0188] The purpose of executing S25 before S29 is to transmit the data stream to the computer with a lower delay after receiving the consent information. Of course, S25 can also be executed after S29.

[0189] Assume that after completing the above steps, the camera on the mobile phone is called. An example scenario is: the user uses the mobile phone's instant messaging client to initiate a video call, which triggers the following process:

[0190] S34. The third-party application of the mobile phone transmits an instruction to launch the application Activity to the system framework.

[0191] The instruction to launch the application Activity is used to instruct the system framework to launch the video call Activity to establish a video call.

[0192] S35. The third-party application of the mobile phone uses the camera of the mobile phone to make a video call.

[0193] It is understandable that the type of mobile phone camera called by the third-party application is pre-configured. In some implementations, the third-party application that implements the video call calls the front camera by default. In other implementations, the third-party application is configured to call the rear camera.

[0194] The specific implementation of S33 and S34 does not belong to the scope of this application and will not be described here.

[0195] S36. The system framework of the mobile phone notifies the virtualization sharing service of the mobile phone to move the foreground interface of the application to the background.

[0196] The specific implementation of S36 can be found in Figure 6 Step 4 in the above will not be repeated here.

[0197] S37. The virtualized sharing service of the mobile phone suspends recording.

[0198] Pause recording means stopping the computer from calling the camera to record.

[0199] In some implementations, the step of pausing recording includes setting the application foreground interface to Figure 8 The pause state shown in (b) in the figure is displayed, and the application foreground interface is set to run in the background.

[0200] It is understandable that when the application foreground interface is running in the background, the user can put the application foreground interface in the foreground by operating the notification bar. Figure 8 In the application foreground interface shown in (b), the recording is resumed. In this case, the mobile phone can respond to the user's operation based on the pre-configuration, for example, displaying a prompt message indicating a camera occupancy conflict.

[0201] S38. The virtualization sharing service of the mobile phone transmits a virtual camera recording pause instruction to the hardware virtualization service of the mobile phone.

[0202] S39. The hardware virtualization service of the mobile phone stops transmitting data stream to the computer and updates the cached camera information.

[0203] It can be understood that the mobile phone's hardware virtualization service stops transmitting data stream to the mobile phone's MagicLink, the mobile phone's MagicLink stops transmitting data stream to the computer's MagicLink, the computer's MagicLink stops transmitting data stream to the computer's virtualization sharing service, the computer's virtualization sharing service stops transmitting data stream to the computer's hardware virtualization service, and the computer's hardware virtualization service stops transmitting data stream to the computer's third-party applications or system camera. Figure 7 In short, the phone's hardware virtualization service stops streaming data to the computer.

[0204] Updating the cached camera information can be understood as updating the cached camera information based on the current camera being called. As shown in Table 1, because the computer's call to the mobile phone's rear camera is paused, the camera status recorded in the first row of Table 1 is updated from "1" to "0", indicating that the rear camera is in an idle state.

[0205] Furthermore, it can be understood that, because the aforementioned steps have called the front camera of the mobile phone for the video call, the status of the front camera is updated after it is called. Combined with Table 1, the status of the camera recorded in the second row of Table 1 is updated from "0" to "1", indicating that the front camera is in use, i.e., occupied.

[0206] The updating of the state of the camera called by the instant messaging client of the mobile phone may be performed after S34 or before S40.

[0207] S40: The virtualization sharing service of the mobile phone queries the hardware virtualization service of the mobile phone for the status of the virtual camera.

[0208] The virtual camera status is that the mobile phone is used as the virtual camera of the computer and is called by the computer.

[0209] It can be understood that the hardware virtualization service of the mobile phone is based on the cached information. Taking Table 1 (at least updated in S39) as an example, the status of the virtual camera is queried, and based on the different queried information, S41a-S42a and S43 are executed, or S41b-S42b is executed.

[0210] S41a. The hardware virtualization service of the mobile phone transmits information that the virtual camera is not occupied to the virtualization sharing service of the mobile phone.

[0211] In conjunction with the example in Table 1, the unoccupied information is a state flag of 0, indicating that it is not occupied.

[0212] S42a: The virtualized sharing service of the mobile phone transmits a virtual camera start instruction to the hardware virtualized service of the mobile phone.

[0213] It is understandable that after starting the virtual camera, the hardware virtualization service of the mobile phone updates the cached camera status information.

[0214] S43. The hardware virtualization service of the mobile phone resumes data flow transmission to the computer.

[0215] In some implementations, the hardware virtualization service of the mobile phone resumes transmitting the video stream captured by the virtual camera to the computer.

[0216] Combination Figure 2As shown, after the user answers the video call on mobile phone 2 through the front camera of mobile phone 2, computer 1 calls the rear camera of mobile phone 2 to obtain the video stream.

[0217] S41b. The hardware virtualization service of the mobile phone transmits the virtual camera occupied information to the virtualization sharing service of the mobile phone.

[0218] In conjunction with the example in Table 1, the occupied information is state flag 1, indicating occupied.

[0219] S42b. The virtualized shared service of the mobile phone refreshes the paused state of the application foreground interface.

[0220] In some implementations, the application foreground interface is still placed in the background after refreshing to reduce interference with the video call. In other implementations, after the call ends, the virtualized sharing service of the mobile phone places the application foreground interface in the foreground and remains in the paused state. The transmission of the data stream can be resumed based on the user's operation of resuming recording (see S43).

[0221] based on Figure 5 The software framework shown in the figure implements Figure 2 The logical flow of the functions shown is as follows Fig.10 As shown, the following steps are included:

[0222] 1. The instant messaging client in the mobile phone uses the mobile phone’s camera to make a video call.

[0223] In some implementations, the instant messaging client uses the front camera of the mobile phone for video calls by default, and in other implementations, the instant messaging client is configured to use the rear camera of the mobile phone for video calls.

[0224] Combination Fig.11 As shown, Fig.10 The specific implementation of step 1 is S101-S102. Among them, S101 can refer to S34, and S102 can refer to S35.

[0225] 2. During a video call, the third-party application or system camera in the computer calls the virtual camera through the computer's hardware virtualization service.

[0226] Combination Fig.11 As shown, Fig.10 The specific implementation of step 2 in is S103-S104. S103-S104 can be found in Figure 7 S11-S12 in.

[0227] 3. The computer's hardware virtualization service triggers the computer's virtualization sharing service and opens the virtual camera.

[0228] Combination Fig.11 The process shown, Fig.10 The specific implementation process of step 3 in can be found in S105-S125, and S105-S125 can be found in Figure 7 S13-S23 in .

[0229] 4. In response to the computer's virtualized sharing service opening the virtual camera, the mobile phone's virtualized sharing service queries the mobile phone's hardware virtualized service for the status of the called camera (ie, the virtual camera).

[0230] Combination Fig.11 The process shown, Fig.10 For the specific implementation process of step 4 in , please refer to S126.

[0231] It is understandable that in Fig.10 and Fig.11 In the illustrated scenario, before querying the camera status, the camera status on the mobile phone has been cached, in one example, cached by the hardware virtualization service of the mobile phone after S102, and updated after S129.

[0232] 5. The hardware virtualization service of the mobile phone transmits the called camera status to the virtualization sharing service of the mobile phone.

[0233] Combination Fig.11 The process shown, Fig.10 For the specific implementation process of step 5 in , please refer to S127a or S127b.

[0234] 6. The virtualized sharing service of the mobile phone executes the following logic based on the camera status of the mobile phone: determine whether the called camera is occupied, if yes, execute 7, if not, execute 8.

[0235] 7. Prompt that the camera is occupied.

[0236] In some implementations, a prompt message is displayed in the interface where the camera is called, indicating that the camera is occupied. In this case, the virtualized sharing service of the mobile phone transmits the prompt message to the caller (third-party application or system camera) of the computer through the established signaling channel. Fig.11 As shown, Fig.10 The specific method of step 7 in is S134.

[0237] 8. Start recording.

[0238] Combination Fig.11 The process shown, Fig.10 For the specific implementation process of step 8 in , please refer to S128-S133.

[0239] Combination Figure 3As shown, when mobile phone 2 uses the front camera to make a video call, computer 1 calls the rear camera of the mobile phone to obtain the video stream. Conversely, if the video call of mobile phone 2 uses the rear camera of mobile phone 2, when computer 1 calls the rear camera of mobile phone 2, mobile phone 2 refuses computer 1 to call the rear camera and prompts that the camera is occupied.

[0240] In some implementations, before starting recording (S129), if it is the first time that the camera is called by the computer, the mobile phone displays a confirmation pop-up window to Fig. 9 For example, in (a) of FIG. 1 , based on the user's confirmation operation on the confirmation pop-up window, the camera called by the computer is started to record. For example, in order to save resources, the virtualization sharing service of the mobile phone displays a confirmation pop-up window before S126. If the user clicks cancel on the confirmation pop-up window, there is no need to perform subsequent steps.

[0241] In addition, the mobile phone can also send a pop-up confirmation message to the computer, and a pop-up window with Fig. 9 The pop-up confirmation message is shown in (b) as an example.

[0242] Combination Figure 2-Figure 11 It can be understood that the camera control method provided in the embodiment of the present application can enable the second electronic device to call an idle camera on the first electronic device when a camera on the first electronic device is occupied, that is, multiple cameras on the first electronic device can be used concurrently.

[0243] It is understandable that the above embodiments all take the computer calling the camera of the mobile phone as an example, but this is not a limitation. That is, the types of the first electronic device and the second electronic device are not limited, and different cameras of the first electronic device are not limited to being called by different electronic devices.

Claims

1. A camera control method, characterized in that: Applied in a first electronic device, the first electronic device has a camera, the camera includes a first camera and a second camera, and the method includes: In response to the second electronic device calling the first camera, using the first camera to shoot and obtain a first channel of data; transmitting the first path of data to the second electronic device; In the process of shooting with the first camera, in response to calling the second camera, shooting with the second camera to obtain a second path of data, and continuing shooting with the first camera to obtain the first path of data; During shooting using the first camera, in response to the first electronic device calling the first camera, the transmission of the first channel of data to the second electronic device is suspended.

2. The method according to claim 1, characterized in that The using the first camera to continue shooting to obtain the first channel of data includes: Querying a first camera state, where the first camera state indicates that the first camera is occupied or in an idle state; In response to the first camera being in an idle state, the first camera is used to continue shooting to obtain the first channel of data.

3. The method according to claim 1, characterized in that In response to the second electronic device calling the first camera, using the first camera to shoot, including: In response to the second electronic device calling the first camera, displaying a confirmation interface on the first electronic device; In response to a confirmation operation based on the confirmation interface, shooting is performed using the first camera.

4. The method according to claim 3, characterized in that Also includes: An interface prompt instruction is transmitted to the second electronic device, where the interface prompt instruction is used to prompt that the confirmation interface is displayed on the first electronic device.

5. The method according to any one of claims 2 to 4, characterized in that: The first electronic device runs a virtualization sharing service and a hardware virtualization service; Before using the first camera to shoot and obtain the first channel of data, the method further includes: The virtualized sharing service receives a camera request instruction transmitted by the second electronic device, where the camera request instruction includes information of the first electronic device and information of the first camera; The hardware virtualization service caches information of the camera on the first electronic device based on the camera request instruction, the camera information including: information of the first electronic device to which the camera belongs, the camera status, and information of the caller of the camera, wherein, in response to the camera request instruction, the camera status of the first camera is cached as occupied, and the caller of the first camera is cached as an application on the second electronic device.

6. The method according to claim 5, characterized in that Before continuing to shoot with the first camera to obtain the first channel of data, the method further includes: In response to the first electronic device calling the camera of the first electronic device, the virtualization sharing service notifies the hardware virtualization service to suspend recording; The hardware virtualization service stops transmitting the first data to the second electronic device, and updates the cached state of the first camera; The virtualization sharing service queries the first camera status from the hardware virtualization service.

7. The method according to claim 6, characterized in that The using the first camera to continue shooting to obtain the first channel of data includes: In response to the first camera being in an idle state, the virtualization sharing service transmits a start instruction of the first camera to the hardware virtualization service; In response to the startup instruction, the hardware virtualization service resumes transmitting the first path of data to the second electronic device and updates the cached first camera state.

8. A camera control method, characterized in that: Applied in a first electronic device, the first electronic device has a camera, the camera includes a first camera and a second camera, and the method includes: In response to the first electronic device calling the first camera, using the first camera to shoot and obtain a first channel of data; In response to the second electronic device calling the second camera, querying the second camera state, where the second camera state indicates that the second camera is occupied or in an idle state; In response to the second camera being in an idle state, using the second camera to shoot; Transmitting a second path of data captured by the second camera to the second electronic device.

9. The method according to claim 8, characterized in that Also includes: In response to the second camera being occupied, a prompt message indicating that the camera is occupied is transmitted to the second electronic device.

10. The method according to claim 8, characterized in that The using the second camera to shoot includes: In response to the second electronic device calling the second camera, displaying a confirmation interface on the first electronic device; In response to a confirmation operation based on the confirmation interface, shooting is performed using the second camera.

11. The method according to claim 10, characterized in that Also includes: An interface prompt instruction is transmitted to the second electronic device, where the interface prompt instruction is used to prompt that the confirmation interface is displayed on the first electronic device.

12. The method according to any one of claims 8 to 11, characterized in that: The first electronic device runs a virtualization sharing service and a hardware virtualization service; In response to the second electronic device calling the second camera, querying the second camera state includes: The virtualized sharing service receives a camera request instruction transmitted by the second electronic device, where the camera request instruction indicates the second camera of the first electronic device; The virtualization sharing service queries the second camera status from the hardware virtualization service in response to the camera request instruction.

13. The method according to claim 12, characterized in that Before querying the second camera state from the hardware virtualization service, the method further includes: The hardware virtualization service caches information of a camera on the first electronic device, where the camera information includes: information of the first electronic device to which the camera belongs, a state of the camera, and information of a caller of the camera.

14. The method according to claim 13, characterized in that After the second camera is used to shoot, the method further includes: The hardware virtualization service updates the cached state of the second camera.

15. A camera control method, characterized in that: Application in second electronic equipment includes: In response to an operation of selecting a virtual camera on the second electronic device, transmitting a camera request instruction to a first electronic device to which the virtual camera belongs, wherein the camera request instruction indicates calling a first camera of the first electronic device, and the virtual camera is the first camera; Receiving data captured by the first camera; During the process in which the first electronic device uses the second camera of the first electronic device to shoot, continuing to receive a first channel of data obtained by calling the first camera to shoot; In response to the first electronic device calling the first camera, receiving the first channel of data is suspended.

16. The method according to claim 15, characterized in that Before receiving the data captured by the first camera, the method further includes: An interface prompt instruction transmitted by the first electronic device is received, where the interface prompt instruction is used to prompt that a confirmation interface is displayed on the first electronic device, where the confirmation interface is used to confirm or reject the call of the first camera by the second electronic device.

17. An electronic device, characterized in that: include: Memory for storing applications; One or more processors, used to run the application to implement the camera control method described in any one of claims 1-16.

18. A computer-readable storage medium having a program stored thereon, characterized in that: When the computer device runs the program, the camera control method described in any one of claims 1 to 16 is implemented.

Citation Information

Patent Citations

  • Single-lens reflex camera

    CN101035200A

  • Method and device for simultaneously opening multiple cameras

    CN107222677A

  • Photographing and fingerprint identification method and electronic equipment

    CN111414865A

  • Multi-channel video recording method and device

    CN112954218A

  • Video call method and electronic equipment

    CN114040144A