Camera sharing method, electronic equipment and system

Through the trust ring automatic discovery and networking, the first electronic device loads the virtual camera driver and establishes an image transmission channel, solving the problem of manual configuration in the prior art and improving the degree of automation of user experience and image sharing between devices.

CN119071516APending Publication Date: 2024-12-03HONOR DEVICE CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310631665.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In a live broadcast scenario, the user needs to use one electronic device to display images taken by the camera of another electronic device, but the prior art requires manual configuration of the current device, which reduces the user experience.

Method used

Automatic discovery and automatic networking are carried out through the trust ring. The first electronic device detects the online status of the second electronic device, and loads the virtual camera driver to establish an image transmission channel to realize automatic configuration and real-time display of the camera.

Benefits of technology

It saves the manual operation authentication process, improves the user experience, realizes automatic configuration and real-time display of the camera, and simplifies the image sharing process between devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071516A_ABST
    Figure CN119071516A_ABST
Patent Text Reader

Abstract

The invention discloses a camera sharing method, electronic equipment and a camera sharing system, and relates to the technical field of electronics, and the camera sharing method comprises the following steps: first electronic equipment detects that second electronic equipment subjected to identity authentication is online in a trust ring; the first electronic equipment determines that the second electronic equipment supports camera sharing and a camera sharing switch of the second electronic equipment is turned on, parameters of a virtual camera are obtained, a virtual camera drive is loaded, and the virtual camera is added into a camera list of the first electronic equipment; the virtual camera refers to a camera of the second electronic equipment, and the virtual camera drive is used for adapting to parameters of the virtual camera; the first electronic equipment displays a camera list; and in response to an operation of selecting a virtual camera in the camera list by the user, establishing an image transmission channel with the second electronic equipment, and displaying an image shot by the virtual camera in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic technology, and in particular to a camera sharing method, electronic equipment and system. Background Art

[0002] With the rapid development of online self-media, in some live broadcasting scenarios, users need to use an electronic device (such as a personal computer (PC)) to display images captured by the camera of another electronic device (such as a mobile phone). However, before using the camera of another electronic device to capture images, it is necessary to manually configure the current electronic device before use, which reduces the user experience. Summary of the invention

[0003] The embodiments of the present application provide a camera sharing method, electronic device and system for realizing automatic configuration of a shared camera.

[0004] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0005] In a first aspect, a camera sharing method is provided, comprising: a first electronic device detects that an authenticated second electronic device is online in a trust ring, where the trust ring refers to a networking form in which multiple authenticated devices perform automatic discovery and automatic networking, and point-to-point direct communication is performed between the first electronic device and the second electronic device; the first electronic device determines that the second electronic device supports camera sharing and the camera sharing switch of the second electronic device is turned on, obtains parameters of a virtual camera and loads a virtual camera driver, and adds the virtual camera to a camera list of the first electronic device; the virtual camera refers to the camera of the second electronic device, and the virtual camera driver is used to adapt the parameters of the virtual camera; the first electronic device displays a camera list; in response to a user selecting a virtual camera in the camera list, the first electronic device establishes an image transmission channel with the second electronic device, and displays an image captured by the virtual camera in real time.

[0006] In the camera sharing method provided by the embodiment of the present application, the first electronic device and the second electronic device automatically discover and automatically network based on the trust ring, saving the process of manually operating the two electronic devices to authenticate each other. Under the condition that the second electronic device is determined to be able to share the virtual camera, the first electronic device obtains the parameters of the virtual camera and loads the adapted virtual camera driver, thereby automatically adapting the virtual camera. The first electronic device adds the virtual camera to the camera list of the first electronic device for the user to select. When the user selects the virtual camera in the camera list, the first electronic device establishes an image transmission channel with the second electronic device and displays the image taken by the virtual camera. Thereby, the automatic configuration of the shared camera is realized.

[0007] In a possible implementation, the method further includes: the first electronic device detects that the second electronic device is offline in the trust loop, or detects that the user uninstalls the virtual camera driver, or the communication with the second electronic device is abnormal; the first electronic device uninstalls the virtual camera driver and deletes the virtual camera from the camera list of the first electronic device. This implementation provides several scenarios for uninstalling the virtual camera driver.

[0008] In a possible implementation, the method further includes: if the virtual camera driver is occupied before uninstalling the virtual camera driver, the first electronic device displays a prompt message to prompt the user whether to uninstall the virtual camera driver; in response to the user's determination to uninstall the virtual camera driver, the first electronic device stops the image transmission service and instructs the second electronic device to stop the image transmission service; the first electronic device disconnects the image transmission channel and stops displaying the image captured by the virtual camera. If the virtual camera is occupied, the virtual camera cannot be uninstalled to avoid image transmission errors.

[0009] In a possible implementation, the method further includes: the first electronic device receives a pause message from the second electronic device, the pause message being used to instruct the user to pause sharing the virtual camera; the first electronic device receives the image captured by the virtual camera at a frame rate that maintains the image transmission service, and blurs and displays the image captured by the virtual camera. Since the image captured by the virtual camera at this time has a lower frame rate, if it is still displayed at the original clarity, obvious freezes will occur, so blurring the image captured by the virtual camera can make the image freeze less obvious.

[0010] In a possible implementation, the method further includes: in response to the user stopping the operation of using the virtual camera, or receiving a stop message from the second electronic device, the stop message being used to instruct the user to stop sharing the virtual camera, the first electronic device stops the image transmission service and stops displaying the image captured by the virtual camera. This implementation provides several scenarios for stopping the use of the virtual camera.

[0011] In a possible implementation, the method further includes: in response to the user's operation of loading the virtual camera driver, the first electronic device determines whether the number of enabled second electronic devices is greater than or equal to a preset value; if the number of enabled second electronic devices is less than the preset value, the first electronic device loads the virtual camera driver. This implementation is applicable to the scenario where the user manually loads the virtual camera driver.

[0012] In a second aspect, an electronic device is provided, including a processor and a memory, wherein instructions are stored in the memory, and when the processor executes the instructions, the electronic device executes the method described in the first aspect and any embodiment thereof.

[0013] In a third aspect, a camera sharing system is provided, including a first electronic device and a second electronic device, wherein the first electronic device is the first electronic device as described in the first aspect and any embodiment thereof, and the second electronic device includes a camera, and the first electronic device displays an image captured by the camera of the second electronic device.

[0014] In a fourth aspect, a computer-readable storage medium is provided, comprising instructions, which, when executed on an electronic device, enable the electronic device to execute the method as described in the first aspect and any embodiment thereof.

[0015] In a fifth aspect, a computer program product comprising instructions is provided. When the instructions are executed on the electronic device, the electronic device executes the method as described in the first aspect and any embodiment thereof.

[0016] In a sixth aspect, a chip system is provided, the chip system including a processor for supporting an electronic device to implement the functions involved in the first aspect. In one possible design, the device also includes an interface circuit, which can be used to receive signals from other devices (such as a memory) or send signals to other devices (such as a communication interface). The chip system may include a chip and may also include other discrete devices.

[0017] The technical effects of the second to sixth aspects refer to the technical effects of the first aspect and any of its embodiments, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A schematic diagram of the structure of a camera sharing system provided in an embodiment of the present application;

[0019] Figure 2 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0020] Figure 3 A schematic diagram of a software architecture in an electronic device provided in an embodiment of the present application;

[0021] Figure 4 A schematic diagram of a flow chart of a first camera sharing method provided in an embodiment of the present application;

[0022] Figure 5 A schematic diagram of a display interface of a first electronic device provided in an embodiment of the present application;

[0023] Figure 6 A schematic diagram of a display interface of a second first electronic device provided in an embodiment of the present application;

[0024] Figure 7 A schematic diagram of a display interface of a third first electronic device provided in an embodiment of the present application;

[0025] Figure 8 A schematic diagram of a display interface of a fourth first electronic device provided in an embodiment of the present application;

[0026] Fig. 9 A schematic diagram of a display interface of a fifth first electronic device provided in an embodiment of the present application;

[0027] Fig.10 A schematic diagram of a flow chart of a second camera sharing method provided in an embodiment of the present application;

[0028] Fig.11 A schematic diagram of a flow chart of a third camera sharing method provided in an embodiment of the present application;

[0029] Fig.12 A schematic diagram of a fourth camera sharing method provided in an embodiment of the present application;

[0030] Fig.13 A schematic diagram of a fifth camera sharing method provided in an embodiment of the present application;

[0031] Fig.14 A schematic diagram of a display interface of a sixth first electronic device provided in an embodiment of the present application;

[0032] Fig.15 A schematic diagram of a sixth camera sharing method provided in an embodiment of the present application;

[0033] Fig.16 A schematic diagram of a display interface of a first second electronic device provided in an embodiment of the present application;

[0034] Fig.17 A schematic diagram of a display interface of a second electronic device provided in an embodiment of the present application;

[0035] Fig.18 A schematic diagram of a display interface of a third second electronic device provided in an embodiment of the present application;

[0036] Fig.19 A schematic diagram of a display interface of a seventh first electronic device provided in an embodiment of the present application;

[0037] Fig. 20 A schematic diagram of a display interface of a fourth second electronic device provided in an embodiment of the present application;

[0038] Fig.21 A flowchart of a seventh camera sharing method provided in an embodiment of the present application;

[0039] Fig. 22A schematic diagram of a display interface of an eighth first electronic device provided in an embodiment of the present application;

[0040] Fig.23 A schematic diagram of a display interface of a fifth second electronic device provided in an embodiment of the present application;

[0041] Fig.24 A schematic diagram of a display interface of a ninth first electronic device provided in an embodiment of the present application;

[0042] Fig.25 A schematic diagram of a flow chart of an eighth camera sharing method provided in an embodiment of the present application;

[0043] Fig.26 A schematic diagram of the structure of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] First, some concepts involved in this application are described.

[0045] The terms "first", "second", etc. involved in the embodiments of the present application are only used to distinguish features of the same type and cannot be understood as indicating relative importance, quantity, order, etc.

[0046] The terms "exemplary" or "for example" and the like in the embodiments of the present application are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the terms "exemplary" or "for example" is intended to present the related concepts in a specific way.

[0047] A trust ring is a networking form in which multiple authenticated devices automatically discover and network together, enabling multiple devices across systems to interconnect with each other with low power consumption, thereby sharing resources and services among multiple devices. Identity authentication in a trust ring usually refers to multiple devices logging in with the same account, and multiple devices communicating directly point-to-point through near-field communication. This application uses the trust ring MagicRing as an example for illustration, but is not intended to be limited to this, and other networking forms with similar functions may also be used.

[0048] With the rapid development of online self-media, in some live broadcast scenarios, users need to use an electronic device (such as a personal computer (PC)) to display images taken by the camera of another electronic device (such as a mobile phone). For example, a painting host broadcasts live through a live broadcast application running on a PC, while displaying the hand painting process captured by the camera of a mobile phone; for another example, a teaching host broadcasts live through an online class conference application running on a PC, while displaying close-up shots of the experiment captured by the camera of a mobile phone. However, before using the camera of another electronic device to capture images, it is necessary to manually configure the current electronic device before it can be used, which reduces the user experience.

[0049] The camera sharing method, electronic device and system provided by the embodiments of the present application, the first electronic device and the second electronic device are automatically discovered and automatically networked based on a trust ring, without the need for manual operation of the two electronic devices to connect point-to-point and authenticate each other. Moreover, under the condition that the second electronic device can share the virtual camera, the first electronic device obtains the parameters of the virtual camera and loads the adapted virtual camera driver, so that the virtual camera driver automatically adapts the parameters of the virtual camera, thereby correctly parsing and displaying the image captured by the virtual camera. When the user selects the virtual camera, the first electronic device can display the image taken by the virtual camera. Therefore, the automatic configuration of the shared camera is achieved.

[0050] In view of the above scenario, the present application embodiment provides a camera sharing system, such as Figure 1 As shown, the camera sharing system includes a first electronic device (such as Figure 1 PC 110 shown) and at least one second electronic device (such as Figure 1 The mobile phone 120 is shown).

[0051] The first electronic device and the second electronic device can communicate with each other, such as Internet communication, near field communication, etc., wherein near field communication includes Bluetooth, wireless fidelity (WiFi), near field communication (NFC), etc. It should be noted that compared with Internet connection, near field communication is more conducive to ensuring information security because it is point-to-point direct communication. In addition, the transmission rate will not be affected by network factors, and a larger bandwidth transmission can be achieved.

[0052] In some examples, the first electronic device and the second electronic device may have the same system-level user account logged in, such as the same Account. It should be understood that multiple electronic devices (such as the first electronic device and the second electronic device) logged in to the same user account can be added to the same trust ring through identity authentication. Therefore, communication can be performed only within the trust ring to ensure device security. For example, the first electronic device and the second electronic device can discover each other online in the trust ring, synchronize virtual camera capabilities between the first electronic device and the second electronic device, transmit call requests, transmit images, etc.

[0053] The first electronic device has a target application installed (for example, a live broadcast application, an online class conference application, etc.). During the process of the first electronic device running the target application, it may also display an image captured by a camera of a second electronic device. The camera of the second electronic device may be called a virtual camera or a remote camera, which is referred to as a virtual camera in this application. There may be one or more virtual cameras, and multiple virtual cameras may belong to the same or different second electronic devices.

[0054] The second electronic device includes a camera application that implements remote shooting and image distribution functions. The second electronic device can send a message to the first electronic device indicating that the second electronic device supports the function of sharing a camera, so that the first electronic device can find and call the virtual camera. The second electronic device can receive the request of the first electronic device to call the virtual camera, and send the image captured by the camera to the first electronic device in real time and display it on the first electronic device.

[0055] like Figure 1 As shown, the basic working principle of the above-mentioned camera sharing system is as follows: 1) After the first electronic device finds that the second electronic device is online in the trust loop, it loads the virtual camera driver. The virtual camera driver can provide a driver for the virtual camera and adapt the parameters of the virtual camera. 2) After the first electronic device successfully loads the virtual camera driver, the virtual camera is added to the camera list for the user to select. 3) When the user selects the virtual camera, the first electronic device establishes an image transmission channel with the second electronic device. 4) The second electronic device transmits the image taken by the virtual camera to the first electronic device through the image transmission channel. It should be noted that the user can stop or pause sharing the virtual camera on the second electronic device side, and the user can also stop using the virtual camera on the first electronic device side.

[0056] The first electronic device and the second electronic device are merely divided based on the different functional roles played by the electronic devices in the scene of acquiring pictures. The first electronic device is the image demanding device, and the second electronic device is the image providing device. It should be understood that the same electronic device can be used as the first electronic device in some scenes and as the second electronic device in other scenes. For example, if the above Figure 1The mobile phone 120 or tablet 130 in the embodiment obtains images from other devices, that is, the image requesting device, and can also serve as the first electronic device. Figure 1 The laptop computer 110 has a shared camera capability and can also serve as an image providing device, that is, as a second electronic device.

[0057] Exemplarily, the first electronic device and the second electronic device may be handheld devices, vehicle-mounted devices, etc., such as mobile phones, tablets, laptop computers, PDAs, mobile internet devices (MID), virtual reality (VR) devices, augmented reality (AR) devices, wireless devices in industrial control, wireless devices in self-driving, wireless devices in remote medical surgery, wireless devices in smart grids, wireless devices in transportation safety, wireless devices in smart cities, wireless devices in smart homes, cellular phones, cordless phones, session initiation protocol (SIP) phones, wireless local loop (WLL) stations, personal digital assistants (PDA), handheld devices with wireless communication functions, personal computers (PCs), etc. Computer, PC), computing device or other processing device connected to a wireless modem, vehicle-mounted device, wearable device, terminal device in a 5G network, or terminal device in a future evolved public land mobile communication network (public landmobile network, PLMN), etc., the embodiments of the present application are not limited to this.

[0058] The first electronic device and the second electronic device may also be wearable devices, such as smart watches or smart glasses, and devices that focus on a certain type of application function and can be used in conjunction with other devices such as smart phones, such as various smart bracelets and smart jewelry for vital sign detection. The first electronic device and the second electronic device may also be terminal devices in an Internet of Things (IoT) system.

[0059] like Figure 2, is a hardware structure diagram of an electronic device (e.g., a first electronic device or a second electronic device) provided in an embodiment of the present application. Taking the electronic device as a mobile phone as an example, it may include: a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc.

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

[0061] The processor 210 may include one or more processing units, for example, the processor 210 may include a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a microcontroller unit (MCU), a programmable logic device (PLD), 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. Among them, different processing units may be independent devices or integrated in one or more processors.

[0062] The controller can be the nerve center and command center of the electronic device. The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.

[0063] The charging management module 240 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. While the charging management module 240 charges the battery 242, it can also power the electronic device through the power management module 241.

[0064] The power management module 241 is used to connect the battery 242, the charging management module 240 and the processor 210. The power management module 241 receives input from the battery 242 and / or the charging management module 240, and supplies power to the processor 210, the internal memory 221, the external memory, the display screen 294, the camera 293, and the wireless communication module 260. The power management module 241 can also be used to detect parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc.

[0065] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modem processor and baseband processor.

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

[0067] The electronic device can realize the shooting function through ISP, camera 293, video codec, GPU, display screen 294 and application processor.

[0068] In some embodiments, when the electronic device acts as the second electronic device, it can call the camera 293 to capture images based on the request of the first electronic device and return the images to the first electronic device.

[0069] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 210 through the external memory interface 220 to implement a data storage function. For example, files such as music and videos can be stored in the external memory card.

[0070] The internal memory 221 can be used to store computer executable program codes, which include instructions. The processor 210 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 221. The internal memory 221 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 221 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.

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

[0072] The electronic device can implement audio functions such as music playing and recording through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone jack 270D, and the application processor.

[0073] The key 290 includes a power key, a volume key, etc. The key 290 can be a mechanical key or a touch key. The electronic device can receive key input and generate key signal input related to user settings and function control of the electronic device.

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

[0075] Indicator 292 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0076] The SIM card interface 295 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device by inserting the SIM card interface 295 or removing the SIM card from the SIM card interface 295. The electronic device can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 295 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.

[0077] In the embodiment of the present application, the software system of the electronic device (such as the first electronic device and the second electronic device) can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. Taking the system as an example, the software structures of the first electronic device and the second electronic device are exemplified.

[0078] like Figure 3 As shown, the first electronic device and the second electronic device both include a driver layer, a system basic capability layer, a security middle platform, an interconnection middle platform, and an office business middle platform. The first electronic device also includes a business application.

[0079] The driver layer includes a virtual camera driver (located in the first electronic device), a camera driver, a Bluetooth driver, and a WiFi driver. The system basic capability layer includes audio and video codecs, cameras, TCP / IP, and graphic display. The security middle platform includes device authentication and identity authentication. The interconnection middle platform includes device management middleware, device interconnection (such as MagicLink), and device virtualization services. The office business middle platform includes virtualization services and a control center. Business applications include camera applications, live broadcast applications, and online class and conference applications.

[0080] The virtualization service is used to provide a virtualization interface for upper-layer service applications, which can realize scheduling management, status management (such as enabling or disabling a virtual camera) and setting management of virtualized devices.

[0081] The control center is used for status storage and service scheduling of each device in the trust ring.

[0082] The device management middleware is used to provide service sharing for each device in the trust ring, and can realize service management and device management.

[0083] Device interconnection (such as MagicLink) is used to realize the discovery, channel connection and data transmission functions of each device in the trust ring.

[0084] The device virtualization service is used to provide video or audio virtualization functions.

[0085] The virtual camera driver is used to provide drivers for the virtual camera and adapt the parameters of the virtual camera.

[0086] like Figure 4 As shown, the camera sharing method provided in the embodiment of the present application includes:

[0087] S101: A first electronic device detects that an authenticated second electronic device is online in a trust loop.

[0088] Please refer to the previous description about the trust ring, which will not be repeated here. Both the first electronic device and the second electronic device have undergone identity authentication, for example, both have logged into the cloud with the same Honor account, and thus belong to the same trust ring. When the second electronic device is within the near-field communication range of the first electronic device, it can automatically go online in the trust ring, allowing the first electronic device to discover the second electronic device and communicate directly point-to-point with the second electronic device, making the user unaware of the online process. Please refer to the following text for the process after the second electronic device goes online in the trust ring. Fig.10 The contents shown will not be repeated here.

[0089] The second electronic device also sends to the first electronic device whether the second electronic device supports camera sharing and whether the camera sharing switch of the second electronic device is turned on. Optionally, the second electronic device can also send to the first electronic device whether the virtual camera is occupied. The first electronic device assigns a unique identifier to the second electronic device.

[0090] S102: The first electronic device determines that the second electronic device supports camera sharing and the camera sharing switch of the second electronic device is turned on, obtains parameters of a virtual camera, loads a virtual camera driver, and adds the virtual camera to a camera list of the first electronic device.

[0091] Optionally, the first electronic device may also determine that the second electronic device supports camera sharing, the camera sharing switch of the second electronic device is turned on, and the virtual camera is not occupied, and then load the virtual camera driver and add the virtual camera to the camera list of the first electronic device.

[0092] After the second electronic device goes online in the trust ring, it sends the parameters of the virtual camera to the first electronic device, such as resolution (or image sensor size), etc. Alternatively, the first electronic device can obtain the parameters of the virtual camera from the network, and the specific method is not limited.

[0093] The virtual camera driver can adapt the parameters of the virtual camera and can also control the virtual camera, so as to correctly parse and display the images captured by the virtual camera. For example, the virtual camera driver of the first electronic device can control the virtual camera to start or stop shooting, and control the virtual camera to adjust the focal length, aperture, etc. The virtual camera driver is not limited to only one, and different virtual camera drivers can be used to adapt to different cameras of the second electronic device (such as the front camera and rear camera of a mobile phone).

[0094] It should be noted that the images involved in this application include not only one image, but also each frame of images in a video stream.

[0095] The system of the first electronic device maintains a camera list, which includes cameras that can be called by the first electronic device for selection by the user. The camera list includes cameras of the first electronic device and virtual cameras. That is, the camera list can include the front camera of the first electronic device or the second electronic device, and can also include the rear camera of the first electronic device or the second electronic device. That is, the first electronic device can not only display images taken by its own front camera or rear camera, but also display images taken by the front camera or rear camera of the second electronic device.

[0096] S103: The first electronic device displays a camera list.

[0097] The camera list may be displayed in the target application, or may be displayed in the system (eg, the status bar of the operating system), which is not limited in this application.

[0098] For example, Figure 5 As shown in the figure, taking the online class conference application running on the PC as an example, a virtual camera (i.e. "mobile phone camera") can be added to the system's camera list. When the user selects a camera, he can choose whether to call the virtual camera to shoot images. This process is invisible to the user, and the user does not need to manually add a virtual camera. When the user selects a camera, he can directly see the virtual camera options that have been added, thus improving the user experience.

[0099] S104: In response to the user selecting a virtual camera in the camera list, displaying an image captured by the virtual camera in real time in the target application.

[0100] In the default state, the target application can display the image captured by the camera of the first electronic device itself, or display the image captured by the virtual camera of the second electronic device, or display the image captured by the camera of the first electronic device itself, or display the image captured by the virtual camera of the second electronic device at the same time, and this application does not limit this.

[0101] It should be noted that the present application does not limit the first electronic device's own camera and the virtual camera to be mutually exclusive. Figure 6 As shown, not only can the first electronic device display the image captured by the virtual camera in the target application, but also can display the image captured by the camera of the first electronic device in the target application. In other words, the first electronic device can simultaneously display the image captured by the camera of the first electronic device and the image captured by the virtual camera. For example, it can be in the form of picture-in-picture (such as Figure 7 as shown) or split screen (as shown Figure 8 As shown), the image captured by the camera of the first electronic device and the image captured by the virtual camera are displayed respectively.

[0102] Optionally, if the first electronic device detects that the second electronic device is offline in the trust loop, or the first electronic device and the second electronic device have abnormal communication (for example, abnormal signaling transmission), or detects that the user uninstalls (or disables) the virtual camera driver (for example, Fig. 9 As shown, the user right-clicks and selects the virtual camera in the camera list and selects "Uninstall"), then the first electronic device uninstalls the virtual camera driver and deletes the virtual camera from the camera list of the first electronic device. Fig.11 S1101-S1107 shown, Fig.12 S1201-S1207 shown and Fig.13 S1301-S1311 shown.

[0103] In addition, in order to avoid uninstalling the virtual camera driver during the image transmission process, causing data transmission errors. Therefore, before uninstalling the virtual camera driver, if the virtual camera driver is occupied (that is, the first electronic device is receiving the image captured by the virtual camera through the virtual camera driver), the first electronic device displays a prompt message to prompt the user whether to uninstall the virtual camera driver. In response to the user's determination to uninstall the virtual camera driver, the first electronic device stops the image transmission service and instructs the second electronic device to also stop the image transmission service, and the image transmission service is used to transmit the image captured by the virtual camera. Then, the first electronic device and the second electronic device disconnect the image transmission channel, and the first electronic device stops displaying the image captured by the virtual camera, and the image transmission channel is used to carry the image transmission service. Finally, the first electronic device uninstalls the virtual camera driver.

[0104] In the camera sharing method provided in the embodiment of the present application, the first electronic device and the second electronic device automatically discover and automatically network based on the trust ring, saving the process of manual operation authentication. The first electronic device obtains the parameters of the virtual camera from the second electronic device and loads the adapted virtual camera driver under the condition that the second electronic device can share the virtual camera, thereby automatically adapting the virtual camera. The first electronic device adds the virtual camera to the camera list of the first electronic device for the user to select. When the user selects the virtual camera in the camera list, the first electronic device establishes an image transmission channel with the second electronic device and displays the image taken by the virtual camera. Thereby, the automatic configuration of the shared camera is realized.

[0105] Combine the following Figure 3 The software layers shown describe the camera sharing method described above.

[0106] like Fig.10 As shown, the process of enabling the virtual camera when the second electronic device goes online includes S1001-S1009:

[0107] S1001. A virtualization service of a first electronic device (eg, a PC) detects whether an authenticated second electronic device (eg, a mobile phone) is online in a trust ring.

[0108] The virtualization service of the first electronic device manages the status of all authenticated virtual cameras (i.e. Figure 3 The state management shown in FIG. 1 shows that, under the initial condition, the state of the virtual camera that is online in the trust ring is a disabled state. The state of the virtual camera is used to indicate whether the virtual camera can be used by the first electronic device. If the state of the virtual camera is an enabled state, it indicates that the virtual camera can be used by the first electronic device. If the state of the virtual camera is a disabled state, it indicates that the virtual camera cannot be used by the first electronic device.

[0109] For other contents of this step, refer to step S101.

[0110] S1002: When a new second electronic device comes online, the device management middleware of the first electronic device sends a message that the new second electronic device comes online to the virtualization service of the first electronic device.

[0111] The device interconnection of the first electronic device discovers that a new second electronic device has joined the trust ring where the first electronic device is located, establishes a connection with the second electronic device, and then the device management middleware of the first electronic device sends a message that the new second electronic device is online to the virtualization service of the first electronic device.

[0112] In addition, the virtualization service of the second electronic device configures the device management middleware of the second electronic device: whether the second electronic device supports camera sharing, and whether the camera sharing switch of the second electronic device is turned on. When the second electronic device goes online, the device management middleware of the second electronic device sends the above configuration to the device management middleware of the first electronic device.

[0113] S1003: The virtualization service of the first electronic device determines whether the number of enabled second electronic devices is greater than or equal to a preset value (eg, 2).

[0114] If the number of enabled second electronic devices is greater than or equal to the preset value, no processing is performed. The purpose of limiting the number of enabled second electronic devices is to reduce memory consumption, and generally two virtual cameras of second electronic devices are sufficient for daily use. Of course, the number of enabled second electronic devices may not be limited, or may be limited to other numbers.

[0115] S1004. If the number of enabled second electronic devices is less than a preset value, the virtualization service of the first electronic device queries the device management middleware of the first electronic device: whether the newly online second electronic device supports camera sharing, and whether the camera sharing switch of the second electronic device is turned on.

[0116] S1005: The device management middleware of the first electronic device feeds back the query result to the virtualization service of the first electronic device.

[0117] The query result includes: whether the newly-launched second electronic device supports camera sharing, and whether the camera sharing switch of the second electronic device has been turned on.

[0118] S1006: If the second electronic device supports camera sharing, and the camera sharing switch of the second electronic device has been turned on, the virtualization service of the first electronic device calls the enabling interface of the device virtualization service of the first electronic device to load the virtual camera driver.

[0119] S1007: The device virtualization service of the first electronic device loads a virtual camera driver.

[0120] If the loading is successful, the device virtualization service of the first electronic device adds the virtual camera to the camera list of the first electronic device.

[0121] The rest of steps S102 - S107 refer to step S102 and will not be described in detail here.

[0122] S1008. If loading the virtual camera driver fails, the device virtualization service of the first electronic device returns an error code to the virtualization service of the first electronic device to indicate the reason for the loading failure; if loading the virtual camera driver succeeds, the device virtualization service of the first electronic device returns an indication of successful loading to the virtualization service of the first electronic device.

[0123] The reason for the loading failure may be prompted in the form of a prompt box, so that the user can change the settings of the second electronic device to achieve camera sharing.

[0124] S1009: The virtualization service of the first electronic device updates the state of the virtual camera from a disabled state to an enabled state.

[0125] It should be noted that the present application involves updating the state of the virtual camera from a disabled state to an enabled state, and updating the state of the virtual camera from an enabled state to a disabled state, and refreshing the display interface of the first electronic device at the same time. For example, when updating the state of the virtual camera from a disabled state to an enabled state, a new option of the virtual camera is added to the camera list displayed by the target application (for example, Figure 5 ); when the state of the virtual camera is updated from the enabled state to the disabled state, the option of the virtual camera is deleted from the camera list displayed by the target application, and the specific method is not limited.

[0126] like Fig.11 As shown, the process of disabling the virtual camera of the second electronic device due to the second electronic device going offline includes S1101-S1107:

[0127] S1101: A virtualization service of a first electronic device (eg, a PC) detects whether an authenticated second electronic device has gone offline in a trust loop.

[0128] This step refers to step S1001 and will not be repeated here.

[0129] S1102: When a second electronic device (such as a mobile phone) goes offline, the device management middleware of the first electronic device sends a message indicating that the second electronic device is offline to the virtualization service of the first electronic device.

[0130] S1103: The virtualization service of the first electronic device determines whether the state of the virtual camera is enabled.

[0131] S1104: If the state of the virtual camera is enabled, the virtualization service of the first electronic device calls the disabling interface of the device virtualization service of the first electronic device to uninstall the virtual camera driver. If the state of the virtual camera is disabled, no processing is performed.

[0132] S1105: The device virtualization service of the first electronic device uninstalls the virtual camera driver.

[0133] If the uninstallation is successful, the device virtualization service of the first electronic device deletes the virtual camera from the camera list of the first electronic device.

[0134] S1106: The device virtualization service of the first electronic device feeds back the uninstallation result to the virtualization service of the first electronic device.

[0135] The uninstall result indicates whether the virtual camera driver is uninstalled successfully.

[0136] S1107: If the virtual camera is uninstalled successfully, the virtualization service of the first electronic device updates the state of the virtual camera from an enabled state to a disabled state.

[0137] like Fig.12 As shown, the process of disabling the virtual camera due to abnormal communication between the first electronic device and the second electronic device includes S1201-S1207:

[0138] S1201: The device virtualization service of the first electronic device (eg, PC) detects whether the communication between the first electronic device and the second electronic device is normal.

[0139] S1202: If a communication anomaly with the second electronic device is detected, the device virtualization service of the first electronic device sends communication anomaly indication information to the virtualization service of the first electronic device.

[0140] S1203: The virtualization service of the first electronic device determines whether the abnormality is caused by the second electronic device being offline. If the abnormality is not caused by the second electronic device being offline, the virtualization service of the first electronic device updates the state of the virtual camera from an enabled state to a disabled state.

[0141] If the abnormality is caused by the second electronic device being offline, then execute S1102-S1107 described above, otherwise continue to execute S1204.

[0142] S1204: The virtualization service of the first electronic device calls the enabling interface of the device virtualization service of the first electronic device to try to reload the virtual camera driver.

[0143] S1205: The device virtualization service of the first electronic device attempts to reload the virtual camera driver.

[0144] If the reloading fails, the device virtualization service of the first electronic device deletes the virtual camera from the camera list of the first electronic device, otherwise the camera list of the first electronic device is not processed.

[0145] S1206: The device virtualization service of the first electronic device feeds back a reloading result to the virtualization service of the first electronic device.

[0146] The reload result indicates whether the virtual camera is reloaded successfully.

[0147] S1207: If the virtual camera is reloaded successfully, the virtualization service of the first electronic device updates the state of the virtual camera from a disabled state to an enabled state, otherwise no processing is performed.

[0148] like Fig.13 As shown, the process of disabling the virtual camera due to the user uninstalling the virtual camera driver includes S1301-S1311. The process of the virtual camera driver not being occupied includes S1301-S1303, and the process of the virtual camera driver being occupied includes S1304-S1311.

[0149] S1301. The virtualization service of the first electronic device detects an operation of uninstalling a virtual camera driver by a user. If the virtual camera driver is not occupied, the virtualization service of the first electronic device calls a disabling interface of a device virtualization service of the first electronic device to uninstall the virtual camera driver.

[0150] S1302: The device virtualization service of the first electronic device uninstalls the virtual camera driver and sends the uninstallation result to the virtualization service.

[0151] The uninstall result indicates whether the virtual camera driver is uninstalled successfully.

[0152] S1303: If the uninstallation is successful, the virtualization service of the first electronic device updates the virtual camera state from the enabled state to the disabled state, and prompts the user that the virtual camera uninstallation is successful; if the uninstallation fails, the user is prompted that the virtual camera uninstallation fails.

[0153] If the uninstallation is successful, the device virtualization service of the first electronic device also deletes the virtual camera from the camera list of the first electronic device.

[0154] S1304: If the virtual camera driver is occupied, the virtualization service of the first electronic device displays a prompt message to prompt the user whether to confirm uninstalling the virtual camera driver. If the user confirms uninstalling the virtual camera driver, the virtualization service of the first electronic device sends a stop message to the device virtualization service of the first electronic device to stop the image transmission service.

[0155] S1305: The device virtualization service of the first electronic device stops the image transmission service and sends a stop result to the virtualization service of the first electronic device.

[0156] The stop result may include that the image transmission service stops successfully or fails to stop the image transmission service.

[0157] S1306: The virtualization service of the first electronic device sends a stop message to the virtualization service of the second electronic device to stop the image transmission service.

[0158] S1307: If the image transmission service is stopped successfully, the virtualization service of the second electronic device disconnects the image transmission channel and exits the shared virtual camera interface.

[0159] S1308: If the image transmission service is stopped successfully, the virtualization service of the first electronic device disconnects the image transmission channel and stops displaying the image captured by the virtual camera.

[0160] The device virtualization service of the first electronic device may also prompt the user that the sharing of the virtual camera of the second electronic device has been stopped. Fig.14 As shown, the first electronic device may display “the mobile phone camera has stopped sharing”, indicating that the second electronic device has stopped sharing the virtual camera.

[0161] S1309: The virtualization service of the first electronic device calls a disabling interface of the device virtualization service of the first electronic device to uninstall the virtual camera driver.

[0162] The virtual camera driver being occupied means that an image transmission service is being performed through the virtual camera driver, that is, the first electronic device is receiving an image captured by the virtual camera through the virtual camera driver.

[0163] S1310: The device virtualization service of the first electronic device uninstalls the virtual camera driver and sends an uninstallation result to the virtualization service of the first electronic device.

[0164] The uninstall result indicates whether the virtual camera driver is uninstalled successfully.

[0165] S1311. If the uninstallation is successful, the virtualization service of the first electronic device updates the state of the virtual camera from an enabled state to a disabled state, and prompts the user that the virtual camera uninstallation is successful; if the uninstallation fails, the user is prompted that the virtual camera uninstallation fails.

[0166] like Fig.15As shown, the process of using the virtual camera by the target application includes S1501-S1522. Among them, the process of establishing an image transmission channel and performing image transmission services includes steps S1501-S1508, the process of performing image transmission service failure includes steps S1509-S1511, the process of performing image transmission service success includes steps S1512-S1515, and the process of processing image transmission channel abnormality after performing image transmission service success includes steps S1516-S1522.

[0167] S1501: A target application of a first electronic device detects that a user selects a virtual camera from a displayed camera list, and requests a device virtualization service of the first electronic device to capture an image using the virtual camera.

[0168] S1502: The device virtualization service of the first electronic device requests the virtualization service of the first electronic device to capture an image using a virtual camera.

[0169] S1503: The virtualization service of the first electronic device establishes an image transmission channel.

[0170] The image transmission channel may be an image transmission channel based on near field communication such as Bluetooth or wireless local area network (WLAN).

[0171] S1504: The virtualization service of the second electronic device queries the device management middleware of the second electronic device whether the camera sharing switch is turned on.

[0172] Correspondingly, the device management middleware of the second electronic device feeds back to the virtualization service of the second electronic device whether the camera sharing switch has been turned on.

[0173] S1505: If the camera sharing switch is already turned on, the virtualization service of the second electronic device displays a dialog box to prompt the user whether to allow camera sharing. If the camera sharing switch is already turned off, a dialog box is displayed to prompt the user to turn on the camera sharing switch.

[0174] For example, Fig.16 As shown, if the camera sharing switch is turned on, no matter the second electronic device is in the locked screen, off screen or on screen state, the second electronic device can display a dialog box to prompt the user whether to allow the camera to be shared. If the user selects "Yes", the second electronic device allows the first electronic device to share the camera; if the user selects "No", the second electronic device does not allow the first electronic device to use the virtual camera.

[0175] like Fig.17As shown, if the camera sharing switch is turned off, the second electronic device can display a dialog box to prompt the user to turn on the camera sharing switch regardless of whether the second electronic device is in a locked screen, off screen, or on screen state. If the user selects "Yes", the second electronic device jumps to the setting interface so that the user can operate the camera sharing switch to allow the first electronic device to use the virtual camera; if the user selects "No", the second electronic device does not allow the first electronic device to share the camera. Optionally, the second electronic device can also prompt whether to allow camera sharing to simplify the user's operation process and improve the user experience.

[0176] S1506: If the user allows camera sharing, the virtualization service of the second electronic device sends a confirmation message to the virtualization service of the first electronic device to indicate that camera sharing is allowed. If the user does not allow camera sharing, the virtualization service of the second electronic device sends a negative message to the virtualization service of the first electronic device to refuse camera sharing.

[0177] S1507: The virtualization service of the first electronic device sends a confirmation message or a negative message to the device virtualization service of the first electronic device.

[0178] S1508: If a negative message is received, the device virtualization service of the first electronic device terminates the process. If a confirmation message is received, the device virtualization service of the first electronic device performs an image transmission service (i.e., transmits the image captured by the virtual camera) with the device virtualization service of the second electronic device.

[0179] S1509: If the image transmission service fails, the device virtualization service of the first electronic device sends a transmission failure message to the virtualization service of the first electronic device.

[0180] S1510. The virtualization service of the first electronic device sends a transmission failure message to the virtualization service of the second electronic device.

[0181] The virtualization service of the second electronic device may display a prompt message to prompt the user that an image transmission channel cannot be established with the first electronic device. Fig.18 As shown, a dialog box may be displayed to prompt the user that an image transmission channel cannot be established with the first electronic device.

[0182] If the failure is caused by the second electronic device being offline, then execute S1102-S1107 described above, otherwise continue to execute S1511.

[0183] S1511. The virtualization service of the first electronic device displays a prompt message to prompt the user that the image captured by the virtual camera cannot be received.

[0184] For example, Fig.19 As shown, a dialog box may be displayed to prompt the user that "the mobile phone camera cannot be used".

[0185] S1512: If the image transmission service is successful, the device virtualization service of the second electronic device initializes the virtual camera and determines whether there is an image transmission anomaly. If there is no anomaly, a transmission success message is sent to the device virtualization service of the first electronic device.

[0186] S1513. The device virtualization service of the first electronic device sends a transmission success message to the virtualization service of the first electronic device.

[0187] S1514. The virtualization service of the first electronic device sends a transmission success message to the virtualization service of the second electronic device.

[0188] The virtualization service of the second electronic device may display a prompt message to prompt the user to establish an image transmission channel with the first electronic device. Fig. 20 As shown, the second electronic device can prompt the user that an image transmission channel has been established with the first electronic device (for example, "connection with the computer has been established").

[0189] And the target application displays the image captured by the virtual camera in real time.

[0190] S1515. The virtualized service display interface of the second electronic device is used to prompt the user that the virtual camera has been occupied by the first electronic device.

[0191] For example, Fig. 20 As shown, no matter the second electronic device is in a locked screen, off screen or on screen state, the second electronic device can display an interface to prompt the user that the virtual camera has been occupied by the first electronic device.

[0192] S1516: If the image transmission channel is abnormal, the virtualization service of the first electronic device instructs the device virtualization service of the first electronic device to try to reconnect the image transmission service, and stop displaying the image captured by the virtual camera.

[0193] S1517: The virtualization service of the second electronic device instructs the device virtualization service of the second electronic device to try to reconnect to the image transmission service, and prompts the user that the image transmission service is being reconnected.

[0194] S1518: If the reconnection fails, the device virtualization service of the first electronic device sends a reconnection failure message to the virtualization service of the first electronic device.

[0195] S1519: The virtualization service of the first electronic device prompts the user to re-request to use the virtual camera to capture an image.

[0196] S1520: The virtualization service of the first electronic device sends a channel abnormality message to the virtualization service of the second electronic device.

[0197] S1521: The virtualization service of the first electronic device updates the state of the virtual camera of the second electronic device from an enabled state to a disabled state.

[0198] S1522: The virtualized service of the second electronic device prompts the user that the connection with the first electronic device has been disconnected.

[0199] like Fig.21 As shown, the process of pausing or stopping the shared virtual camera by the user includes S2101-S2120. Among them, the processing flow of pausing the shared virtual camera by the user includes steps S2101-S2105, the processing flow of resuming the shared virtual camera by the user includes steps S2106-S2110, the processing flow of stopping the shared virtual camera on the second electronic device side by the user includes steps S2111-S2115, and the processing flow of stopping the use of the shared virtual camera on the first electronic device side by the user includes steps S2116-S2120.

[0200] S2101. The virtualization service of the second electronic device detects that the user suspends the operation of sharing the virtual camera, sends a pause message to the device virtualization service of the second electronic device, and sends a pause message to the device virtualization service of the first electronic device through the virtualization service of the first electronic device.

[0201] For example, when a user clicks Fig. 20 The "Pause" button is shown, and the virtualization service of the second electronic device detects that the user pauses the operation of sharing the virtual camera.

[0202] It should be noted that when the user clicks pause, the second electronic device reduces the frame rate of the image transmitted to the first electronic device, that is, the second electronic device sends the image captured by the virtual camera to the first electronic device at a frame rate that maintains the image transmission service, and correspondingly, the first electronic device receives the image captured by the virtual camera at a frame rate that maintains the image transmission service. On the one hand, it can reduce power consumption, and on the other hand, it can prevent the interruption of the image transmission service so that the image display can be restored at any time. Otherwise, it will take a long time to restart the image transmission service, during which the image transmission service cannot be carried out and the image cannot be displayed.

[0203] S2102: The device virtualization service of the second electronic device performs blur processing on the displayed image, and sends the blur processing result to the virtualization service of the second electronic device through the virtualization service of the first electronic device.

[0204] For example, Fig. 22 As shown, the second electronic device can display the blurred image.

[0205] The obfuscation result can include obfuscation success or obfuscation failure.

[0206] S2103: The virtualized service display of the second electronic device suspends the sharing of the virtual camera.

[0207] For example, Fig. 22 As shown, the second electronic device can display a "start" button to indicate that the shared virtual camera is paused.

[0208] S2104: The device virtualization service of the first electronic device displays the image captured by the virtual camera in a blurred manner.

[0209] Since the image captured by the virtual camera at this time has a lower frame rate, if it is still displayed with the original clarity, there will be obvious lag. Therefore, blurring the image captured by the virtual camera can make the image lag less obvious.

[0210] For example, Fig. 22 As shown, the first electronic device can display the image taken by the virtual camera after blurring.

[0211] S2105. The virtualized service display of the first electronic device suspends sharing of the virtual camera.

[0212] For example, Fig. 22 As shown, the first electronic device can display "Mobile phone camera has been suspended", indicating that the sharing of the virtual camera is suspended.

[0213] S2106. The virtualization service of the second electronic device detects the user's operation of re-sharing the virtual camera, sends a restart message to the device virtualization service of the second electronic device, and sends a restart message to the virtualization service of the first electronic device through the virtualization service of the first electronic device.

[0214] For example, Fig.23 As shown in the figure, if the user clicks the "Start" button, the virtual camera sharing will start again.

[0215] S2107: The device virtualization service of the second electronic device restores the shared virtual camera, and sends a restoration result to the virtualization service of the second electronic device through the virtualization service of the first electronic device.

[0216] For example, Fig. 20 As shown, the second electronic device can redisplay the interface of the shared virtual camera.

[0217] Restoring the shared virtual camera means transmitting images at a normal frame rate through the image transmission channel. The restoration result may include restoration success or restoration failure.

[0218] S2108. The virtualized service of the second electronic device displays a shared virtual camera.

[0219] Exemplarily, the second electronic device may redisplay Fig. 20 The interface shown indicates that the virtual camera is being shared.

[0220] S2109. The device virtualization service of the first electronic device resumes displaying the image captured by the virtual camera.

[0221] The device virtualization service of the first electronic device displays the unblurred image at a normal frame rate.

[0222] S2110. The virtualized service of the first electronic device displays that the second electronic device resumes sharing the virtual camera.

[0223] For example, Fig.24 As shown, the first electronic device may display “Mobile phone camera has been restored”, indicating that the second electronic device has restored the shared virtual camera.

[0224] S2111. The virtualization service of the second electronic device detects that the user stops sharing the virtual camera, sends a stop message to the device virtualization service of the second electronic device, and sends a stop message to the device virtualization service of the first electronic device through the virtualization service of the first electronic device.

[0225] For example, when a user clicks Fig. 20 The "disconnect" button is shown, and the virtualization service of the second electronic device detects that the user stops the operation of the virtual camera.

[0226] S2112: The device virtualization service of the second electronic device stops capturing images and stops image transmission services, and sends a stop result to the virtualization service of the first electronic device through the virtualization service of the second electronic device.

[0227] The stop result may include a success in stopping the image transmission service or a failure in stopping the image transmission service.

[0228] S2113. The virtualization service of the second electronic device disconnects the image transmission channel and exits the shared virtual camera interface.

[0229] S2114. The device virtualization service of the first electronic device stops the image transmission service, and stops displaying the image captured by the virtual camera.

[0230] For example, Fig.14 As shown, if the first electronic device is still capturing images through its own camera at this time, the images captured through its own camera will be displayed in the target application.

[0231] S2115: The virtualization service of the first electronic device disconnects the image transmission channel and prompts the user that the sharing of the virtual camera of the second electronic device has been stopped.

[0232] S2116: The virtualization service of the first electronic device detects that the user stops using the virtual camera, and sends a stop message to the device virtualization service of the first electronic device.

[0233] For example, when a user clicks Figure 5 When the "End Sharing" button is clicked or the mobile phone camera option is canceled, the virtualization service of the first electronic device detects that the user stops sharing the virtual camera.

[0234] S2117. The device virtualization service of the first electronic device stops the image transmission service, stops displaying the image captured by the virtual camera, and sends a stop result to the virtualization service of the first electronic device.

[0235] The stop result may include that the image transmission service stops successfully or fails to stop the image transmission service.

[0236] S2118. The virtualization service of the first electronic device sends a stop message to the virtualization service of the second electronic device to stop the image transmission service.

[0237] S2119: If the image transmission service is stopped successfully, the virtualization service of the second electronic device disconnects the image transmission channel and exits the shared virtual camera interface.

[0238] S2120: The device virtualization service of the first electronic device disconnects the image transmission channel and prompts the user that the sharing of the virtual camera of the second electronic device has been stopped.

[0239] The process of loading the virtual camera driver described above is performed automatically, and the user may load the virtual camera driver manually. Fig.25 As shown, the processing flow of a user loading a virtual camera driver includes S2501-S2502 and S1007-S1009.

[0240] S2501: The virtualization service of the first electronic device detects an operation of loading a virtual camera driver by a user, and determines whether the number of enabled second electronic devices is greater than or equal to a preset value (eg, 2).

[0241] This step refers to step S1003 and will not be repeated here.

[0242] S2502: If the number of enabled second electronic devices is less than a preset value, the virtualization service of the first electronic device calls an enabling interface of the device virtualization service of the first electronic device to load a virtual camera driver.

[0243] The following contents refer to steps S1007-S1009 and will not be repeated here.

[0244] The user may manually switch the virtual camera on the second electronic device, for example, from the first virtual camera of the second electronic device (such as the front camera of the mobile phone) to the second virtual camera of the second electronic device (such as the rear camera of the mobile phone). Fig.13 Steps S1301-S1311 shown in FIG. 1301 uninstall the first camera driver, and then follow Fig.10 The steps S1006-S1009 shown load the second camera driver, thereby switching the virtual camera. For details, see the relevant steps, which will not be repeated here.

[0245] like Fig.26 As shown, the embodiment of the present application also provides a chip system. The chip system 2600 includes at least one processor 2601 and at least one interface circuit 2602. The at least one processor 2601 and the at least one interface circuit 2602 can be interconnected through a line. The processor 2601 is used to support the electronic device to implement each step in the above method embodiment, such as Figure 4 , Fig.10 , Fig.11 , Fig.12 , Fig.13 , Fig.15 , Fig.21 , Fig.25 In the method shown, at least one interface circuit 2602 may be used to receive signals from other devices (eg, memory) or to send signals to other devices (eg, communication interface). The chip system may include a chip and may also include other discrete devices.

[0246] The present application also provides a computer-readable storage medium, which includes instructions. When the instructions are executed on the electronic device, the electronic device executes each step in the method embodiment, such as executing Figure 4 , Fig.10 , Fig.11 , Fig.12 , Fig.13 , Fig.15 , Fig.21 , Fig.25 The method shown.

[0247] The present application also provides a computer program product including instructions. When the instructions are executed on the electronic device, the electronic device executes each step in the method embodiment, such as executing Figure 4 , Fig.10 , Fig.11 , Fig.12 , Fig.13 , Fig.15 , Fig.21 , Fig.25 The method shown.

[0248] Regarding the technical effects of the chip system, computer-readable storage medium, and computer program product, refer to the technical effects of the previous method embodiments.

[0249] It should be understood that in the various embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0250] Those of ordinary skill in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0251] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0252] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple modules or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0253] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules, that is, they may be located in one device or distributed on multiple devices. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0254] In addition, each functional module in each embodiment of the present application may be integrated into one device, or each module may exist physically separately, or two or more modules may be integrated into one device.

[0255] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can 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. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or may contain one or more servers, data centers and other data storage devices that can be integrated with the medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0256] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A camera sharing method, characterized in that: include: The first electronic device detects that the second electronic device that has been authenticated is online in a trust ring, where the trust ring refers to a networking form in which multiple authenticated devices automatically discover and automatically network, and the first electronic device and the second electronic device perform point-to-point direct communication; The first electronic device determines that the second electronic device supports camera sharing and a camera sharing switch of the second electronic device is turned on, obtains parameters of a virtual camera, loads a virtual camera driver, and adds the virtual camera to a camera list of the first electronic device; The virtual camera refers to the camera of the second electronic device, and the virtual camera driver is used to adapt the parameters of the virtual camera; The first electronic device displays the camera list; In response to the user selecting the virtual camera in the camera list, the first electronic device establishes an image transmission channel with the second electronic device, and displays the image captured by the virtual camera in real time.

2. The method according to claim 1, characterized in that Also includes: The first electronic device detects that the second electronic device is offline in the trust ring, or detects that a user uninstalls the virtual camera driver, or that communication with the second electronic device is abnormal; The first electronic device uninstalls the virtual camera driver and deletes the virtual camera from the camera list of the first electronic device.

3. The method according to claim 2, characterized in that Also includes: If the virtual camera driver is occupied before the virtual camera driver is uninstalled, the first electronic device displays a prompt message to prompt the user whether to uninstall the virtual camera driver; In response to the user determining to uninstall the virtual camera driver, the first electronic device stops the image transmission service and instructs the second electronic device to stop the image transmission service; The first electronic device disconnects the image transmission channel and stops displaying the image captured by the virtual camera.

4. The method according to any one of claims 1 to 3, characterized in that: Also includes: The first electronic device receives a pause message from the second electronic device, where the pause message is used to instruct a user to pause sharing the virtual camera; The first electronic device receives the image taken by the virtual camera at a frame rate that maintains the image transmission service, and blurs and displays the image taken by the virtual camera.

5. The method according to any one of claims 1 to 4, characterized in that: Also includes: In response to the user stopping the operation of using the virtual camera, or receiving a stop message from the second electronic device, wherein the stop message is used to instruct the user to stop sharing the virtual camera, the first electronic device stops the image transmission service and stops displaying the image captured by the virtual camera.

6. The method according to any one of claims 1 to 5, characterized in that: Also includes: In response to a user's operation of loading the virtual camera driver, the first electronic device determines whether the number of enabled second electronic devices is greater than or equal to a preset value; If the number of enabled second electronic devices is less than the preset value, the first electronic device loads the virtual camera driver.

7. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores instructions, and when the processor executes the instructions, the electronic device executes the method according to any one of claims 1 to 6.

8. A camera sharing system, characterized in that: The device comprises a first electronic device and a second electronic device, wherein the first electronic device is the electronic device as claimed in claim 7, the second electronic device comprises a camera, and the first electronic device displays an image captured by the camera of the second electronic device.

9. A computer-readable storage medium, characterized in that: The method comprises instructions, and when the instructions are executed on an electronic device, the electronic device executes the method according to any one of claims 1 to 6.

Citation Information

Cited By

  • Camera sharing method, electronic device, and system

    EP4648400A1

  • Camera sharing method, electronic device, and system

    WO2024244578A1