WO2022105716A1 - Camera control method based on distributed control, and terminal device - Google Patents

Camera control method based on distributed control, and terminal device Download PDF

Info

Publication number
WO2022105716A1
WO2022105716A1 PCT/CN2021/130672 CN2021130672W WO2022105716A1 WO 2022105716 A1 WO2022105716 A1 WO 2022105716A1 CN 2021130672 W CN2021130672 W CN 2021130672W WO 2022105716 A1 WO2022105716 A1 WO 2022105716A1
Authority
WO
WIPO (PCT)
Prior art keywords
camera
local
authorized
task
virtual
Prior art date
Application number
PCT/CN2021/130672
Other languages
French (fr)
Chinese (zh)
Inventor
占航
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022105716A1 publication Critical patent/WO2022105716A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/18Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast
    • H04N7/181Closed-circuit television [CCTV] systems, i.e. systems in which the video signal is not broadcast for receiving images from a plurality of remote sources
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Definitions

  • the present application relates to the field of terminal technologies, and in particular, to a distributed control-based camera control method and terminal device.
  • a device equipped with a camera can be remotely controlled through a terminal device such as a mobile phone or a system, so as to implement tasks such as image shooting and video shooting.
  • a terminal device such as a mobile phone or a system
  • tasks such as image shooting and video shooting.
  • each drone performs network signal transmission with the control terminal through Ethernet, and the control terminal transmits control commands such as taking pictures to each drone.
  • the man-machine After analyzing, the man-machine further performs the photographing action, and then transmits the photographic data network back to the control terminal.
  • each drone needs to include a network module and can be connected to the control terminal to realize the direct control of the drone, and this method causes the control terminal to only control the unmanned aerial vehicle directly connected to the network through the network.
  • this method causes the control terminal to only control the unmanned aerial vehicle directly connected to the network through the network.
  • drones that cannot be directly connected to the control terminal through the network it cannot be controlled.
  • How to realize the indirect control of the camera device on the basis of the direct control of the camera device to meet the needs of different camera device usage scenarios is a technical problem to be solved urgently.
  • an embodiment of the present application provides a distributed control-based camera control method, which is applied to a first device, and the method includes:
  • the detected operation of creating a task for the camera to be selected determine the selected camera and a target task to be performed by the selected camera from the cameras to be selected;
  • the first device includes at least one first virtual camera, each first virtual camera is used to control the local camera of the mapped second device, and each first virtual camera is connected to the mapped second device There is at least one-level mapping relationship between the local cameras of ,
  • the second device and the first device are in different local area networks.
  • a first device can be used to control local cameras in multiple second devices, and the second devices can directly establish a connection with the first device through the same local area network, or use an intermediate
  • the device establishes an indirect connection with the first device in a different local area network, which realizes the distributed and hierarchical control of the local cameras of different second devices, and can meet the camera control requirements of different application scenarios.
  • the method further includes:
  • connection condition includes: the third device is provided with a local camera and/or a third device in the third device at least one second virtual camera is created;
  • the authorized first authorized camera After determining the authorized first authorized camera according to the first authorization instruction, obtain a second camera identification of the first authorized camera in the third device, where the first authorized camera includes the third camera the local camera of the device and/or the local camera of the fourth device mapped by the second virtual camera;
  • a first camera identification of the first authorized camera in the first device is determined according to the second camera identification, and a first camera identification for controlling the first authorization is created according to the first camera identification of the first authorized camera Camera's first virtual camera,
  • each second virtual camera is used to control the local camera of the fourth device mapped by the second virtual camera, and there is at least one connection between the second virtual camera and the mapped local camera of the fourth device. level mapping.
  • a first virtual camera capable of controlling an authorized camera is created.
  • a first authorization control request is sent to the third device, and a response from the third device to the first authorization is received
  • the first authorization indication returned by the control request includes:
  • the camera generates the first authorization control request according to the first request, and sends the first authorization control request to the third device, so that the third device can make the third device according to the detected authorization for the first authorization
  • the authorization operation of the control request generates the first authorization indication.
  • the first request camera can be selected according to the user's needs, so as to meet the authorization control requirements of different users.
  • a first camera identification of the first authorized camera in the first device is determined according to the second camera identification , and create a first virtual camera for controlling the first authorized camera according to the first camera identification of the first authorized camera, including:
  • the first authorized camera includes a local camera of the fourth device mapped by the second virtual camera, indicating the mapping between the first authorized camera and the second virtual camera according to the second camera identifier the mapping relationship level of the relationship, determining the first mapping relationship level between the first authorized camera and the first virtual camera that needs to be created to control the first authorized camera;
  • the identification in the second camera identification and the identification of the existing camera in the first device corresponding to the first mapping relationship level it is determined that the first authorized camera is in the first device 's primary identity
  • a first camera identification of the first authorized camera in the first device is determined according to the first mapping relationship level and the first identification identification, and a first camera identification for controlling all cameras is created according to the first camera identification.
  • the first device can directly determine the relationship between the first device and the first authorized camera according to the first camera identifier of the first virtual camera and the first mapping relationship level The level of the mapping relationship between them is convenient for sending commands and receiving data.
  • a first camera identification of the first authorized camera in the first device is determined according to the second camera identification , and create a first virtual camera for controlling the first authorized camera according to the first camera identification of the first authorized camera, including:
  • a first-level mapping relationship is determined as a first-level mapping relationship between the first authorized camera and a first virtual camera that needs to be created to control the first authorized camera The first mapping relationship level.
  • the first device corresponds to the first mapping relationship level
  • the identity identifier of the existing camera is determined, and the first identity identifier of the first authorized camera in the first device is determined, including:
  • the identity identifier of the existing camera corresponding to the first mapping relationship level in the first device when the identity identifier in the second camera identifier already exists, create the identity identifier according to a preset identity identifier creation rule the first identity of the first authorized camera in the first device; or
  • the identity identifier in the second camera identifier is different from the identity identifier of the existing camera corresponding to the first mapping relationship level in the first device, the identity identifier in the second camera identifier is changed to It is determined as the first identity identifier of the first authorized camera in the first device.
  • the first identity of the first authorized camera can be guaranteed to be unique among the identities of all cameras corresponding to the first mapping relationship level that can be controlled by the first device, so as to facilitate The distinction between cameras at the same mapping relationship level that can be controlled by the first device.
  • the selected camera and the selected camera are determined from the candidate cameras according to the detected operation of creating the task for the candidate camera.
  • Select the target tasks to be performed by the camera including:
  • the target task to be performed by the selected camera is determined
  • the task parameters of the target task include at least one of task type, execution time information, and camera parameter settings when the selected camera performs the target task, and the task type includes at least one of the following: photographing tasks, image preview tasks.
  • the target task can be precisely set so that the selected camera can perform the target task.
  • the first task command is sent to the selected camera, so that the selected camera controls execution according to the first task command
  • the target task includes at least one of the following operations:
  • the first task command is sent to the local camera of the first device, so that the local camera of the first device executes the first task the target task indicated by the command;
  • the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a first-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, pass The first virtual camera corresponding to the selected camera in the first device forwards the first task command to the local camera of the second device, so that the local camera of the second device executes the first task command. a target task indicated by the task command;
  • the selected camera includes the local camera of the second device mapped by the first virtual camera, and there is a multi-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, according to The first mapping relationship level between the selected camera and the corresponding first virtual camera determines at least one intermediate device that completes the forwarding of the first task command, and sequentially passes through each intermediate device corresponding to the selected camera.
  • the virtual camera of the camera forwards the first task command to the local camera of the second device, so that the local camera of the second device executes the target task indicated by the first task command.
  • the first task command can be forwarded to the selected camera by means of at least one intermediate device, so as to realize the control of the local camera of the device in a different local area network from the first device.
  • the method further includes:
  • receiving the target task data includes at least one of the following ways:
  • the selected camera includes the local camera of the first device, directly receiving target task data sent from the local camera of the first device;
  • the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a first-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, use The first virtual camera corresponding to the selected camera directly receives the target task data sent by the local camera of the second device;
  • the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a multi-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, use
  • the first virtual camera corresponding to the selected camera receives the target task data sequentially sent by the local camera of the second device and forwarded by at least one intermediate device.
  • the first device may receive target task data after the selected camera performs the target task, and perform image and/or video presentation according to the target task data.
  • the method further includes:
  • the camera When receiving the second authorization control request from the fifth device, the camera displays an authorization prompt according to the second request in the second authorization control request;
  • a second authorization instruction is generated according to the first camera identification of the second authorized camera in the first device, and the second authorization instruction is sent to the fifth device, so that the fifth device
  • the second authorization instruction creates a virtual camera for controlling the second authorized camera.
  • the first device can directly control its local camera and the local camera of the second device mapped by the set first virtual camera according to the command issued by the user, and can also establish control with the fifth device. relationship, controlled by the fifth device.
  • an embodiment of the present application provides a terminal device, which can execute the distributed control-based camera of the first aspect or one or more of various possible implementation manners of the first aspect. Control Method.
  • embodiments of the present application provide a computer program product, comprising computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in an electronic
  • the processor in the electronic device executes the first aspect or one or more of the distributed control-based camera control methods in the first aspect or multiple possible implementation manners of the first aspect.
  • FIG. 1 shows a schematic structural diagram of a terminal device according to an embodiment of the present application.
  • FIG. 2 shows a block diagram of a software structure of a terminal device according to an embodiment of the present application.
  • FIG. 3 shows a flowchart of a camera control method based on distributed control according to an embodiment of the present application.
  • FIG. 4 shows a schematic diagram of an application scenario of a camera control method based on distributed control according to an embodiment of the present application.
  • FIG. 5 shows a schematic diagram of a process of determining a target task according to an embodiment of the present application.
  • FIG. 6 shows a flowchart of a camera control method based on distributed control according to an embodiment of the present application.
  • FIG. 7 shows a schematic diagram of selecting an authorized camera according to an embodiment of the present application.
  • FIG. 8 shows a schematic diagram of an implementation process of a camera control method based on distributed control according to an embodiment of the present application.
  • the present application provides a camera control method based on distributed control.
  • the distributed control-based camera control method in the embodiment of the present application can realize multi-level indirect control of camera devices, and is suitable for different camera devices.
  • the method can be applied to devices such as a terminal device, a control device for implementing camera control, and the like, so as to implement the above method.
  • the equipment involved in this application may refer to the equipment with the wireless connection function, and the wireless connection function refers to the wireless connection methods such as wifi and bluetooth.
  • the device of the present application may also have the function of wired connection for communication.
  • the device of the present application can be a touch screen, a non-touch screen, or no screen.
  • the touch screen can control the device by clicking, sliding, etc. on the display screen with a finger, a stylus pen, etc.
  • a device with a touch screen can be connected to input devices such as a mouse, keyboard, and touch panel, and the device can be controlled through the input device.
  • a device without a screen can be a Bluetooth speaker without a screen.
  • the terminal devices in the devices involved in this application may be smart phones, netbooks, tablet computers, notebook computers, wearable electronic devices (such as smart bracelets, smart watches, etc.), TVs, virtual reality devices, audio, electronic ink, etc.
  • FIG. 1 shows a schematic structural diagram of a terminal device according to an embodiment of the present application. Taking the terminal device being a mobile phone as an example, FIG. 1 shows a schematic structural diagram of the mobile phone 200 .
  • the mobile phone 200 may include a processor 210, an external memory interface 220, an internal memory 221, a 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 251, a wireless communication module 252, Audio module 270, speaker 270A, receiver 270B, microphone 270C, headphone jack 270D, sensor module 280, buttons 290, motor 291, indicator 292, camera 293, display screen 294, SIM card interface 295, etc.
  • a processor 210 an external memory interface 220, an internal memory 221, a 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 251, a wireless communication module 252, Audio module 270, speaker 270A, receiver 270B, microphone 270C, headphone jack 270D, sensor module 280, buttons 290, motor 291, indicator 292, camera 293, display screen 294, SIM card interface 295, etc.
  • the sensor module 280 may include a gyroscope sensor 280A, an acceleration sensor 280B, a proximity light sensor 280G, a fingerprint sensor 280H, and a touch sensor 280K (of course, the mobile phone 200 may also include other sensors, such as a temperature sensor, a pressure sensor, a distance sensor, and a magnetic sensor. , ambient light sensor, air pressure sensor, bone conduction sensor, etc., not shown in the figure).
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the mobile phone 200 .
  • the mobile phone 200 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or Neural-network Processing Unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • the controller may be the nerve center and command center of the mobile phone 200 . The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 210 for storing instructions and data.
  • the memory in processor 210 is cache memory.
  • the memory may hold instructions or data that have just been used or recycled by the processor 210 . If the processor 210 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided, and the waiting time of the processor 210 is reduced, thereby improving the efficiency of the system.
  • the processor 210 may execute the distributed control-based camera control method provided by the embodiments of the present application, so as to facilitate multi-level indirect control of the camera device, which is suitable for use scenarios of different camera devices.
  • the processor 210 may include different devices. For example, when a CPU and a GPU are integrated, the CPU and the GPU may cooperate to execute the distributed control-based camera control method provided in the embodiments of the present application. The CPU is executed, and another part of the algorithm is executed by the GPU to obtain faster processing efficiency.
  • Display screen 294 is used to display images, videos, and the like.
  • Display screen 294 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 (active-matrix organic light).
  • LED organic light-emitting diode
  • AMOLED organic light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • cell phone 200 may include 1 or N display screens 294, where N is a positive integer greater than 1.
  • the display screen 294 may be used to display information entered by or provided to the user as well as various graphical user interfaces (GUIs).
  • GUIs graphical user interfaces
  • display 294 may display photos, videos, web pages, or documents, and the like.
  • display 294 may display a graphical user interface.
  • the GUI includes a status bar, a hideable navigation bar, a time and weather widget, and an application icon, such as a browser icon.
  • the status bar includes operator name (eg China Mobile), mobile network (eg 4G), time and remaining battery.
  • the navigation bar includes a back button icon, a home button icon, and a forward button icon.
  • the status bar may further include a Bluetooth icon, a Wi-Fi icon, an external device icon, and the like.
  • the graphical user interface may further include a Dock bar, and the Dock bar may include commonly used application icons and the like.
  • the display screen 294 may be an integrated flexible display screen, or a spliced display screen composed of two rigid screens and a flexible screen located between the two rigid screens.
  • the terminal device as the first device can establish a communication connection with the second device that can be directly connected through the antenna 1 and the antenna 2, and according to the present application
  • the distributed control-based camera control method provided by the embodiment realizes the control of the local camera of the second device by the first device, and the control of the local camera of the second device that cannot directly establish a communication connection with the first device.
  • Camera 293 front camera or rear camera, or a camera that can be both a front camera and a rear camera is used to capture still images or video.
  • the camera 293 may include a photosensitive element such as a lens group and an image sensor, wherein the lens group includes a plurality of lenses (convex or concave) for collecting the light signal reflected by the object to be photographed, and transmitting the collected light signal to the image sensor .
  • the image sensor generates an original image of the object to be photographed according to the light signal.
  • Internal memory 221 may be used to store computer executable program code, which includes instructions.
  • the processor 210 executes various functional applications and data processing of the mobile phone 200 by executing the instructions stored in the internal memory 221 .
  • the internal memory 221 may include a storage program area and a storage data area.
  • the storage program area may store operating system, code of application programs (such as camera application, WeChat application, etc.), and the like.
  • the storage data area may store data created during the use of the mobile phone 200 (such as images and videos collected by the camera application) and the like.
  • the internal memory 221 may also store one or more computer programs 1310 corresponding to the distributed control-based camera control methods provided in the embodiments of the present application.
  • the one or more computer programs 1304 are stored in the aforementioned memory 221 and configured to be executed by the one or more processors 210, and the one or more computer programs 1310 include instructions that may be used to perform the execution of FIG. 3 6, the computer program 1310 may include one or more modules for executing the following steps to realize multi-level indirect control of the camera device, which is suitable for use scenarios of different camera devices.
  • the internal memory 221 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • non-volatile memory such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the codes of the distributed control-based camera control method provided by the embodiments of the present application may also be stored in an external memory.
  • the processor 210 may execute the codes of the distributed control-based camera control method stored in the external memory through the external memory interface 220 .
  • the function of the sensor module 280 is described below.
  • the gyro sensor 280A can be used to determine the movement posture of the mobile phone 200 .
  • the angular velocity of cell phone 200 about three axes ie, x, y, and z axes
  • the gyro sensor 280A can be used to detect the current motion state of the mobile phone 200, such as shaking or still.
  • the gyro sensor 280A can be used to detect a folding or unfolding operation acting on the display screen 294 .
  • the gyroscope sensor 280A may report the detected folding operation or unfolding operation to the processor 210 as an event to determine the folding state or unfolding state of the display screen 294 .
  • the acceleration sensor 280B can detect the magnitude of the acceleration of the mobile phone 200 in various directions (generally three axes). That is, the gyro sensor 280A can be used to detect the current motion state of the mobile phone 200, such as shaking or still. When the display screen in the embodiment of the present application is a foldable screen, the acceleration sensor 280B can be used to detect a folding or unfolding operation acting on the display screen 294 . The acceleration sensor 280B may report the detected folding operation or unfolding operation to the processor 210 as an event to determine the folding state or unfolding state of the display screen 294 .
  • Proximity light sensor 280G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the mobile phone emits infrared light outward through light-emitting diodes.
  • Phones use photodiodes to detect reflected infrared light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the phone. When insufficient reflected light is detected, the phone can determine that there are no objects near the phone.
  • the proximity light sensor 280G can be arranged on the first screen of the foldable display screen 294, and the proximity light sensor 280G can detect the first screen according to the optical path difference of the infrared signal.
  • the gyroscope sensor 280A (or the acceleration sensor 280B) may send the detected motion state information (such as angular velocity) to the processor 210 .
  • the processor 210 determines, based on the motion state information, whether the current state is the hand-held state or the tripod state (for example, when the angular velocity is not 0, it means that the mobile phone 200 is in the hand-held state).
  • the fingerprint sensor 280H is used to collect fingerprints.
  • the mobile phone 200 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering incoming calls with fingerprints, and the like.
  • Touch sensor 280K also called “touch panel”.
  • the touch sensor 280K may be disposed on the display screen 294, and the touch sensor 280K and the display screen 294 form a touch screen, also called a "touch screen”.
  • the touch sensor 280K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 294 .
  • the touch sensor 280K may also be disposed on the surface of the mobile phone 200 , which is different from the location where the display screen 294 is located.
  • the display screen 294 of the mobile phone 200 displays a main interface, and the main interface includes icons of multiple applications (such as a camera application, a WeChat application, etc.).
  • Display screen 294 displays an interface of a camera application, such as a viewfinder interface.
  • the wireless communication function of the mobile phone 200 can be realized by the antenna 1, the antenna 2, the mobile communication module 251, the wireless communication module 252, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in handset 200 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 251 can provide a wireless communication solution including 2G/3G/4G/5G, etc. applied on the mobile phone 200 .
  • the mobile communication module 251 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 251 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 251 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 251 may be provided in the processor 210 .
  • the mobile communication module 251 may be provided in the same device as at least part of the modules of the processor 210 .
  • the mobile communication module 251 may also be used to interact with other terminal devices in information such as first task commands, target task data, and the like.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 270A, the receiver 270B, etc.), or displays images or videos through the display screen 294 .
  • the modem processor may be a stand-alone device.
  • the modulation and demodulation processor may be independent of the processor 210, and may be provided in the same device as the mobile communication module 251 or other functional modules.
  • the wireless communication module 252 can provide applications on the mobile phone 200 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • WLAN wireless local area networks
  • BT wireless fidelity
  • GNSS global navigation satellite system
  • frequency modulation frequency modulation, FM
  • NFC near field communication technology
  • infrared technology infrared, IR
  • the wireless communication module 252 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 252 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 210 .
  • the wireless communication module 252 can also receive the signal to be sent from the processor 210 , perform frequency modulation on the signal, amplify the signal, and then convert it into an electromagnetic wave for radiation through the antenna 2 .
  • the wireless communication module 252 is configured to transmit data between other terminal devices under the control of the processor 210.
  • the processor in the first device can control the wireless communication module 252 to send the first task command to the local camera of the second device that establishes a direct communication connection with the first device, and send the first task command to the local camera of the second device that cannot directly communicate with the first device through the mapping of the first virtual camera.
  • the local camera of the second device to which the device establishes a communication connection sends the first task command to realize multi-level indirect control of the camera device, which is suitable for use scenarios of different camera devices.
  • the mobile phone 200 can implement audio functions through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, and an application processor. Such as music playback, recording, etc.
  • the cell phone 200 can receive key 290 input and generate key signal input related to user settings and function control of the cell phone 200 .
  • the mobile phone 200 can use the motor 291 to generate vibration alerts (eg, vibration alerts for incoming calls).
  • the indicator 292 in the mobile phone 200 may be an indicator light, which may be used to indicate a charging state, a change in power, and may also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 295 in the mobile phone 200 is used to connect the SIM card. The SIM card can be contacted and separated from the mobile phone 200 by inserting into the SIM card interface 295 or pulling out from the SIM card interface 295 .
  • the mobile phone 200 may include more or less components than those shown in FIG. 1 , which is not limited in this embodiment of the present application.
  • the illustrated handset 200 is merely an example, and the handset 200 may have more or fewer components than those shown, two or more components may be combined, or may have different component configurations.
  • the various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
  • the software system of the terminal device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiments of the present application take an Android system with a layered architecture as an example to exemplarily describe the software structure of a terminal device.
  • FIG. 2 shows a block diagram of a software structure of a terminal device according to an embodiment of the present application.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
  • the application layer can include a series of application packages.
  • the application package may include applications such as phone, camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • the data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the telephony manager is used to provide the communication function of the terminal device. For example, the management of call status (including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the terminal device vibrates, and the indicator light flashes.
  • Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
  • a system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • surface manager surface manager
  • media library Media Libraries
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
  • the embodiment of the present application provides a distributed control-based camera control method, which can realize control of local cameras in multiple second devices through a first device, and the second device can directly communicate with the first device through the same local area network Establishing a connection, or establishing an indirect connection with a first device in a different local area network by means of an intermediate device, realizes distributed and hierarchical control of local cameras of different second devices, and can meet camera control requirements in different application scenarios.
  • FIG. 3 shows a flowchart of a camera control method based on distributed control according to an embodiment of the present application.
  • FIG. 4 shows a schematic diagram of an application scenario of a camera control method based on distributed control according to an embodiment of the present application. As shown in FIG. 3, the method is applied to the first device, and the method includes steps S11 to S14.
  • a camera to be selected that can be controlled by the first device is displayed, and the camera to be selected includes a local camera of the first device and a camera of the second device mapped by the first virtual camera in the first device.
  • the first device includes at least one first virtual camera, each first virtual camera is used to control the local camera of the mapped second device, and each first virtual camera is connected to the mapped second device
  • the second device and the first device are in different local area networks.
  • the mapping relationship between the first virtual camera and the mapped local camera of the second device may instruct the first virtual camera to realize the local camera of the mapped second device under the control of the first device
  • the number of mappings to be controlled, the data transmission process obtained by the two commands and the task performed by the camera need to be forwarded several times to complete the transmission process.
  • the mapping relationship between the first virtual camera and the mapped local camera of the second device can also be considered as the mapping relationship between the first device and the local camera of the second device mapped by the first virtual camera.
  • the lower the level of the mapping relationship the less the number of times of mapping between the first virtual camera and the mapped local camera of the second device, and the less the number of times of transmission and forwarding.
  • the mapping relationship level includes zero-level mapping relationship, first-level mapping relationship, second-level mapping relationship... level mapping.
  • the first device A includes a local camera 100 and at least one first virtual camera 200 .
  • the mapping relationship between the local camera 100 of the first device A and the first device A is a zero-level mapping relationship.
  • the second device mapped by each first virtual camera 200 may be a device that can be directly connected to the first device through a network, such as device B1 shown in FIG. 4 , the local camera in device B1 and the corresponding first virtual camera 200 is a first-level mapping relationship, and the device B1 and the first device A may be in the same local area network.
  • the second device mapped by the first virtual camera 200 may also be a device that cannot be directly connected to the first device through the network, and communicates with the first device A indirectly through other devices, such as device B2 and device A as shown in FIG. B3.
  • the device B2 is mapped to the first virtual camera 202, and the first device A passes the first virtual camera 202 according to the "first virtual camera 202"
  • the second virtual camera 301 The communication mode of the "local camera of the device B2" realizes the control of the local camera of the device B2, including sending the first task command and receiving the target task data;
  • the device B2 and the first virtual camera 202 are the secondary mapping relationship, and the device B2 and the second A device A is in a different local area network, the device B2 and the device C1 can be in the same local area network, and the device C1 and the first device A can be in the same local area network.
  • the device B3 is mapped to the first virtual camera 203, and the first device A
  • the virtual camera 203 follows the "first virtual camera 203
  • the communication mode of the second virtual camera 303...the local camera of the device B3" realizes the control of the local camera of the device B3, including sending the first task command and receiving the target task data;
  • the device B1, the device B2, and the device B3 may be the same or different types of devices, for example, the device B1 is a mobile phone, the device B2 is a surveillance camera, and the device B3 is a drone with a camera.
  • the local camera of the device C1, the local camera of the device C2, and the local camera of the device C3 can also be mapped to the first device A to form a virtual camera after being authorized.
  • the mapping relationship is not shown in FIG. 4 .
  • those skilled in the art can implement the method according to the method provided in this application according to the implementation example of mapping the device B1, the device B2, and the device B3 to the first device A, which is not repeated here.
  • step S12 according to the detected operation of creating a task for the camera to be selected, the selected camera and the target task to be performed by the selected camera are determined from the cameras to be selected.
  • step S12 may include: determining the selected camera according to the detected selection operation for the to-be-selected camera; determining the selected camera according to the task setting operation for the selected camera
  • the task parameters of the target task may include at least one of task type, execution time information, and camera parameter settings when the selected camera performs the target task, and the task type includes at least one of the following: a photo-taking task, Camera tasks, image preview tasks. In this way, the target task can be precisely set so that the selected camera can perform the target task.
  • the execution time information and camera parameters corresponding to different task types need to be set accordingly.
  • the execution time information may include the number of photos taken and the time when the photo was taken, and the camera parameters may include the pixels of the photo taken, the exposure duration of the photo, and the photo mode (such as day mode, night mode, panorama mode, etc.)
  • the parameters of the photo shooting may include the start and end time of the photographing, the photographing duration, etc.
  • the camera parameters may include the pixels of the photographing, the photographing mode (such as day mode, night mode, etc.), which are used to set the parameters for the camera to shoot video.
  • the execution time information may include the shooting time of the photo to be previewed (the photo taken by opening the camera viewfinder in real time or the photo taken before the camera), the video to be previewed (the video taken by the camera being opened in real time or the video taken before the camera is turned on)
  • the camera parameters can include the pixels for taking pictures, the exposure time for taking pictures, and the camera mode (such as day mode, night mode, panorama mode, etc.), which are used to set the parameters for the camera to take photos.
  • FIG. 5 shows a schematic diagram of a process of determining a target task according to an embodiment of the present application.
  • the first device is the first device A shown in FIG.
  • the interface T1 displays the camera to be selected by the user “local camera 100 , the local camera mapped to the device B1 ”
  • the selected camera selected by the user "the local camera of the device B1 mapped by the first virtual camera 201" is determined.
  • the interface T1 in the display screen can be further switched to T2, and the task type "photographing, videography, image preview" can be displayed in the interface T2, and then determined according to the detected trigger operations such as clicking, sliding, etc. on the selected control K in the interface T2.
  • the task type selected by the user is "photographing task".
  • the interface T2 in the display screen can be further switched to T3, and the camera parameter setting prompt corresponding to the task type "camera task” can be displayed in the interface T3.
  • “Camera parameters and multiple blank boxes after that” are used to prompt the user to directly input or drop-down selection to determine the camera parameters for photography.
  • Those skilled in the art can set the implementation manner of step S11 and step S12 according to actual needs, which is not limited in this application.
  • step S13 a first task command is generated according to the first camera identifier of the selected camera in the first device and the target task.
  • the generated first task command includes the target task to be performed by the selected camera and the first camera identifier.
  • the first camera identifier includes a first mapping relationship level and a first identity identifier, and the first mapping relationship level can be used to represent the mapping relationship between the selected camera and its corresponding first virtual camera, or to represent the selected camera and the first virtual camera.
  • the first identity identifier may be used to represent the difference between the selected camera and the existing cameras corresponding to the first mapping relationship level in the first device.
  • Those skilled in the art can set the mapping relationship level and the way of identity identification according to actual needs, which is not limited in this application. In this way, different cameras that can be controlled by the first device can be distinguished by the first identity identifier, and the accurate delivery of the first task command is also ensured.
  • step S14 the first task command is sent to the selected camera, so that the selected camera is controlled to execute the target task according to the first task command.
  • step S14 may include at least one of the following operation 1, operation 2, and operation 3:
  • Operation 1 when the selected camera includes the local camera of the first device, send the first task command to the local camera of the first device, so that the local camera of the first device executes the The target task indicated by the first task command.
  • the first device A may directly send the first task command to its own local device 100 .
  • the selected camera includes the local camera of the second device mapped by the first virtual camera, and there is a first-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera when the first task command is forwarded to the local camera of the second device through the first virtual camera corresponding to the selected camera in the first device, so that the local camera of the second device executes The target task indicated by the first task command.
  • the first device A may control the first virtual camera 201 to send the first task command to the “local camera of device B1”.
  • the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a multi-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera
  • At least one intermediate device that completes the forwarding of the first task command is determined according to the first mapping relationship level between the selected camera and the corresponding first virtual camera, and sequentially passes through the corresponding intermediate devices in each intermediate device.
  • the virtual camera of the selected camera forwards the first task command to the local camera of the second device, so that the local camera of the second device executes the target task indicated by the first task command.
  • the intermediate device may directly forward it in a transparent transmission manner, or may encrypt it according to a preset encryption method. Forwarding is not limited in this application.
  • the first device A can control the first virtual camera 202 to send the first task command to "the second virtual camera 301 of the device C1", and the second virtual camera 301 of the device C1 will then send the first task command to the "second virtual camera 301 of the device C1".
  • the command is forwarded to the "local device of device B2", and the intermediate device is device C1 in this process.
  • the first device A can control the first virtual camera 203 to send the first task command to the "second virtual camera 302 of the device C2", and the second virtual camera 302 of the device C2 forwards the first task command to the "second virtual camera 302 of the device C3".
  • the first task command can be forwarded to the selected camera by means of at least one intermediate device, so as to realize the control of the local camera of the device in a different local area network from the first device.
  • the device with the highest priority can be selected according to the priority of the device sending the target task. target task execution. Alternatively, randomly select one of multiple target tasks for execution. Or, in order to avoid the occurrence of "the selected camera needs to perform conflicting target tasks from different devices at the same time", the device where the selected camera is located can control each camera it can control only when it is authorized. License to only one device to control via virtual camera.
  • FIG. 6 shows a flowchart of a camera control method based on distributed control according to an embodiment of the present application.
  • the method may further include steps S15 to S18 of a “virtual camera creation step”.
  • the "virtual camera creation step” may be performed before step S11 (as shown in FIG. 6 ), or may be performed after step S11 (not shown in the figure).
  • the “virtual camera creation step” may be performed before step S11.
  • the "virtual camera creation step” may be performed before, after, or simultaneously with step S11 , which is not limited in this application.
  • a first virtual camera capable of controlling an authorized camera is created through the "virtual camera creation step".
  • a third device that can be connected to the first device and satisfies a connection condition is searched for, and the connection condition may include: the third device is provided with a local camera and/or At least one second virtual camera is created in the third device.
  • each second virtual camera is used to control the local camera of the fourth device mapped by the second virtual camera, and there is at least one connection between the second virtual camera and the mapped local camera of the fourth device. level mapping.
  • the setting of the connection conditions can ensure that the existence of the determined third device can be controlled by the first device by creating a virtual camera.
  • the third device may be any device such as a mobile phone, a drone, etc., which is not made in this application.
  • the third devices that satisfy the connection condition determined by the first device A after searching are the device B1 and the device C1 .
  • the first device A can access the third device to determine the cameras that can be controlled in each third device. For example, it can be determined through the access that the device B1 can only control its own local camera, the device C1 can control its own local camera, and the local camera of the device B2 mapped by the second virtual camera 301 .
  • step S16 a first authorization control request is sent to the third device, and a first authorization indication returned by the third device in response to the first authorization control request is received.
  • step S16 may include: according to the local camera of the third device that can be controlled by the third device and/or the local camera of the fourth device mapped by the second virtual camera select the first requesting camera; generate the first authorization control request according to the first requesting camera, and send the first authorization control request to the third device, so that the third The device generates the first authorization indication according to the detected authorization operation for the first authorization control request.
  • the first request camera can be selected according to the needs of the user, so as to meet the authorization control requirements of different users.
  • information about the third device that the first device can connect to and the camera that the third device can control can be displayed on the display screen of the first device with reference to the display mode of the interface T1 in FIG. 5 .
  • the third device to be connected by the user and the first request camera to be controlled by the third device are determined according to the detected click and other operations (that is, the request operation), and the first authorization control request is generated, and the first authorization control request is generated.
  • the authorization control request is sent to the corresponding third device.
  • the third device receives the first authorization control request, it generates the first authorization indication according to the user's authorization operation (for this process, refer to the implementation process and manner of the first device responding to the second authorization control request below).
  • the voice issued by the user can also be recognized, and the third device to be connected by the user and the first request camera controlled by the third device to be connected are determined according to the recognition result.
  • the information of the third device and the cameras that can be controlled by the third device can also be played to the user by voice, and then the third device to be connected by the user and the capabilities of the third device that needs to be connected can be determined according to the voice sent by the user's response.
  • the first request to control the camera can set the manner of generating the first authorization control request according to the request operation according to actual needs, which is not limited in this application.
  • a first authorization control request for each camera controlled by the detected third device may be sent directly to each detected third device, without requiring user-based requests
  • the operation generates a first authorization control request.
  • step S17 after determining the authorized first authorized camera according to the first authorization instruction, obtain the second camera identification of the first authorized camera in the third device, the first authorized camera Including the local camera of the third device and/or the local camera of the fourth device mapped by the second virtual camera.
  • the second camera identification of the first authorized camera in the third device also includes a mapping relationship level and an identification identification, and the meanings indicated by the first authorized camera are referred to above in the first mapping relationship level and the first identification identification. description, which will not be repeated here.
  • step S18 a first camera identification of the first authorized camera in the first device is determined according to the second camera identification, and a first camera identification for controlling the first authorized camera is created according to the first camera identification of the first authorized camera A first virtual camera of the first authorized camera.
  • step S18 may include: when the first authorized camera includes the local camera of the fourth device mapped by the second virtual camera, according to the indication in the second camera identifier, the first authorized camera A mapping relationship level of the mapping relationship between the authorized camera and the second virtual camera, to determine the first mapping between the first authorized camera and the first virtual camera that needs to be created to control the first authorized camera relationship level; it is determined that the first authorized camera is in the A first identity identifier in a device; determine the first camera identifier of the first authorized camera in the first device according to the first mapping relationship level and the first identity identifier, and determine the first camera identifier of the first authorized camera in the first device according to the first A camera identification creates a first virtual camera for controlling the first authorized camera.
  • the first device can directly determine the mapping relationship level between the first device and the first authorized camera according to the first camera identification of the first virtual camera and the first mapping relationship level, which is convenient for Send commands and receive data.
  • the first camera is determined according to the identification in the second camera identification and the identification of the existing camera in the first device corresponding to the first mapping relationship level.
  • Authorizing the first identity of the camera in the first device may include: in the identity of the existing camera corresponding to the first mapping relationship level in the first device, the second camera already exists When identifying the identity in the identity, the first identity of the first authorized camera in the first device is created according to the preset identity creation rule; or the identity of the second camera is the same as the When the identities of the existing cameras corresponding to the first mapping relationship level in the first device are different, determine the identity in the second camera identity as the first authorized camera in the first device.
  • the first identity in . In this way, the uniqueness of the first identification of the first authorized camera among the identifications of all cameras corresponding to the first mapping relationship level that the first device can control can be ensured, so as to facilitate the control of the first device.
  • step S18 may further include:
  • a first-level mapping relationship is determined as a first-level mapping relationship between the first authorized camera and a first virtual camera that needs to be created to control the first authorized camera The first mapping relationship level.
  • the first mapping relationship level can be obtained by adding one level to "the mapping relationship level in the second camera identifier indicating the mapping relationship between the first authorized camera and the second virtual camera".
  • Different mapping relationship levels can be distinguished by different numbers, letters and other characters.
  • the identity of different cameras at the same mapping relationship level can be distinguished by different numbers, letters and other characters of the camera. identity identification.
  • the identity of its local camera is “2" in device B1
  • the identity of its local camera is “2” in device C1
  • its local camera is identified as "2" in device B2.
  • the identity of the local camera is "1”
  • the identity of the local camera in the first device A is "3”.
  • the zero-level mapping relationship, the first-level mapping relationship, the second-level mapping relationship are represented by 0000, 1000, 2000... respectively. but,
  • the camera ID of its local camera may be 0002.
  • the camera ID of its local camera may be 0001.
  • the camera identifier of its local camera may be 0002, and the camera identifier of the local camera of the device B2 mapped by the second virtual camera 301 may be 1001.
  • the first identity of its local camera is 0003
  • the first identity of the local camera of device C1 can be 1002
  • the first identity of the local camera of device B2 is 2001 .
  • the local camera ID of device B1 "2 in 0002" has been occupied by the local camera of device C1
  • the local camera ID of device B1 can be adjusted.
  • the first identity of the camera is 1004.
  • the method may further include: when receiving a command result returned by the selected camera after receiving the first task command, determining whether the selected camera successfully performs the target task according to the command result , whether to receive the first task command and other information.
  • receiving the command result may include at least one of the following ways:
  • the selected camera includes the local camera of the first device, directly receiving a command result from the local camera of the first device;
  • the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a first-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, use The first virtual camera corresponding to the selected camera directly receives the command result sent by the local camera of the second device;
  • the first virtual camera corresponding to the selected camera receives the command result sent by the local camera of the second device in sequence and forwarded by at least one intermediate device.
  • the method may further include: when receiving target task data obtained by the selected camera performing the target task, performing image and/or video presentation according to the target task data.
  • the first device may also store target task data.
  • receiving the target task data includes at least one of the following ways:
  • the selected camera includes the local camera of the first device, directly receiving target task data sent from the local camera of the first device;
  • the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a first-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, use The first virtual camera corresponding to the selected camera directly receives the target task data sent by the local camera of the second device;
  • the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a multi-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, use
  • the first virtual camera corresponding to the selected camera receives the target task data sequentially sent by the local camera of the second device and forwarded by at least one intermediate device.
  • the method may further include:
  • the camera When receiving the second authorization control request from the fifth device, the camera displays an authorization prompt according to the second request in the second authorization control request;
  • a second authorization instruction is generated according to the first camera identification of the second authorized camera in the first device, and the second authorization instruction is sent to the fifth device, so that the fifth device
  • the second authorization instruction creates a virtual camera for controlling the second authorized camera.
  • the first device can directly control its local camera and the local camera of the second device mapped by the set first virtual camera according to the command issued by the user, and can also establish a control relationship with the fifth device and be controlled by the fifth device.
  • the fifth device may itself be provided with a local camera, or may not have a local camera.
  • FIG. 7 shows a schematic diagram of selecting an authorized camera according to an embodiment of the present application.
  • the second requested camera in the second authorization control request is the local camera 100 of the first device A, the local camera of the device B1 to which the first virtual camera 201 is mapped, and the first virtual camera in FIG. 4
  • the local camera of the device B2 to which the camera 202 is mapped, and the local camera of the device B3 to which the first virtual camera 203 is mapped, the interface T4 may be displayed on the display screen of the first device A, according to each detected second Trigger operations such as clicking, sliding, etc.
  • the first device A can generate a second authorization instruction according to the first camera identifier of the local camera of the device B1 to which the first virtual camera 201 is mapped in the first device A and send it to the fifth device D, so that the fifth device D creates a virtual camera 401 for controlling the second authorized camera according to the second authorization instruction (refer to the implementation process of steps S17 and S18 above).
  • FIG. 8 shows a schematic diagram of an implementation process of a camera control method based on distributed control according to an embodiment of the present application. As shown in FIG. 8, it shows the process that the first device A controls the local camera of the second device B2 through the intermediate device C1, wherein,
  • the "camera application” in the application layer of the first device A detects the task setting operations issued by the user for the preview task, the photographing task and the camera task, and then the "camera service” module in the service layer of the first device A is based on the detected task.
  • the device operation generates camera command 1 (also referred to as command 1 in the following and in the figure), photographing command 2 (also referred to as command 2 in the following and in the figure), and preview command 3 (also referred to as command 3 in the following and in the figure).
  • Task parameters required to execute the task (for the process of determining the command and task parameters, refer to the above, and will not be repeated here).
  • FIG. 8 shows the issuing process of the target tasks of three different task types. , all three commands are shown, but in fact, the issuing times of the three commands do not affect each other.
  • the virtual camera device that is, the second virtual camera 301 in FIG. 4
  • the virtual camera HAL in the HAL layer Hardware Abstraction Layer, English Hardware Abstraction Layer
  • the virtual camera device converts “command 1, command 2 and/or Command 3" is sent to the "Distributed Device Virtualization Platform Service" in the service layer of the first device A.
  • the "Distributed Device Virtualization Platform Service” of the first device A transparently transmits the "Distributed Device Virtualization Platform Service” through its own transparent transmission pipeline.
  • Command 1, Command 2 and/or Command 3" are sent to the intermediate device C1.
  • the “multi-device virtualization module” in the application layer of the middle device C1 receives and transmits "command 1, command 2 and/or command 3" to the "distributed device virtualization module” of its own service layer through the transparent transmission pipeline. Platform Services”.
  • the “distributed device virtualization platform service” also sends "command 1, command 2 and/or command 3" to the second device B2 in a transparent transmission manner through a transparent transmission channel.
  • the "multi-device virtualization module" of the application layer of the second device B2 receives "command 1, command 2 and/or command 3" through the transparent transmission pipeline, and then sends "command 1, command 2 and/or command 3" to the service Layer "Camera Service”.
  • the "Camera Service” issues specific target tasks to be performed to its camera device (ie, the local camera of B2 shown in Figure 4) according to "Command 1, Command 2 and/or Command 3", so that the camera device can control the camera
  • the sensor of the hardware performs specific operations such as shooting, videography, framing preview, etc., and processes the data collected by the sensor through the image signal processor ISP (Image Signal Processing) of the camera hardware to generate target task data.
  • the target task data may include data corresponding to command 1, data corresponding to command 2, and/or data corresponding to command 3.
  • the "camera device” of the second device B2 sends the target task data of different task types to the corresponding buffers of its “camera service” respectively, and then the "multi-device virtualization module” of the second device B2 transfers the target task data to and send the target task data to the "Distributed Device Virtualization Platform Service" of the intermediate device through the transparent transmission pipeline.
  • the "Distributed Device Virtualization Platform Service" of the intermediate device C1 After the "Distributed Device Virtualization Platform Service" of the intermediate device C1 receives the target task data through the transparent transmission pipeline, it sends the target task data in a transparent transmission manner through the transparent transmission pipeline of the "Multi-device Virtualization Module” of the intermediate device C1. to the first device A.
  • the "distributed device virtualization platform service" of the first device A receives the target task data through its own transparent transmission pipeline, and processes the target task data to determine which task type data it corresponds to, and will correspond to different tasks.
  • the type of target task data is sent to the corresponding buffer area of the "camera service” in the service layer of the first device A, so that the "camera application” of the first device A can determine that the corresponding buffer area stores the target task data, and /or upon receiving a user's display instruction, perform preview display, photo display and/or video display.
  • An embodiment of the present application provides a terminal device, including: a local camera; a first virtual camera; a processor and a memory for storing instructions executable by the processor; wherein, when the processor is configured to execute the instructions
  • the above distributed control-based camera control method is implemented.
  • Embodiments of the present application provide a non-volatile computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, implement the above method.
  • Embodiments of the present application provide a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in a processor of an electronic device When running in the electronic device, the processor in the electronic device executes the above method.
  • a computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
  • Computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read-only memory (Electrically Programmable Read-Only-Memory, EPROM or flash memory), static random access memory (Static Random-Access Memory, SRAM), portable compact disk read-only memory (Compact Disc Read-Only Memory, CD - ROM), Digital Video Disc (DVD), memory sticks, floppy disks, mechanically encoded devices, such as punch cards or raised structures in grooves on which instructions are stored, and any suitable combination of the foregoing .
  • RAM random access memory
  • ROM read only memory
  • EPROM erasable programmable read-only memory
  • EPROM Errically Programmable Read-Only-Memory
  • SRAM static random access memory
  • portable compact disk read-only memory Compact Disc Read-Only Memory
  • CD - ROM Compact Disc Read-Only Memory
  • DVD Digital Video Disc
  • memory sticks floppy disks
  • Computer readable program instructions or code described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
  • the computer program instructions used to perform the operations of the present application may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in one or more source or object code written in any combination of programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages.
  • the computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
  • the remote computer may be connected to the user's computer through any kind of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or, may be connected to an external computer (eg, use an internet service provider to connect via the internet).
  • electronic circuits such as programmable logic circuits, Field-Programmable Gate Arrays (FPGA), or Programmable Logic Arrays (Programmable Logic Arrays), are personalized by utilizing state information of computer-readable program instructions.
  • Logic Array, PLA the electronic circuit can execute computer readable program instructions to implement various aspects of the present application.
  • These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in hardware (eg, circuits or ASICs (Application) that perform the corresponding functions or actions. Specific Integrated Circuit, application-specific integrated circuit)), or can be implemented by a combination of hardware and software, such as firmware.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Studio Devices (AREA)

Abstract

The present application relates to a camera control method based on distributed control, and a terminal device. The method, which is applied to a first device, comprises: displaying cameras to be selected that can be controlled by a first device, wherein the cameras to be selected comprise a local camera of the first device, and a local camera, to which a first virtual camera in the first device is mapped, of a second device; determining a selected camera from the cameras to be selected, and a target task the selected camera needs to execute; and generating a first task command according to a first camera identifier, in the first device, of the selected camera, and the target task, and sending the first task command to the selected camera, such that the selected camera controls the execution of the target task according to the first task command, wherein each first virtual camera of the first device is used for realizing control over the mapped local camera, which has at least one level of mapping relationship, of the second device. By means of the method and apparatus provided in the present application, direct and/or indirect control over local cameras in a plurality of second devices is realized by means of one first device, such that camera control requirements in different application scenarios are met.

Description

基于分布式控制的相机控制方法及终端设备Camera control method and terminal device based on distributed control
本申请要求于2020年11月20日提交中国专利局、申请号为202011308989.4、申请名称为“基于分布式控制的相机控制方法及终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202011308989.4 and the application title "Camera Control Method and Terminal Equipment Based on Distributed Control", which was filed with the China Patent Office on November 20, 2020, the entire contents of which are incorporated by reference in this application.
技术领域technical field
本申请涉及终端技术领域,尤其涉及一种基于分布式控制的相机控制方法及终端设备。The present application relates to the field of terminal technologies, and in particular, to a distributed control-based camera control method and terminal device.
背景技术Background technique
随着相机的发展,安装有相机的设备的类型日益增加,例如,安装有相机的智慧电视、蓝牙相机、家居摄像头、道路监控相机、安装有相机的无人机等等。相关技术中,可以通过手机等终端设备或者系统对安装有相机的设备进行远程控制,实现图像拍摄、视频拍摄等任务的执行。以控制终端多个无人机进行拍照控制为例,相关技术中每个无人机通过以太网与控制终端进行网络信号传输,控制终端将拍照等控制指令网络传递到每个无人机,无人机进行解析后进一步进行拍照动作,再将相片数据网络传回控制终端。为实现上述控制需要每个无人机均包含网络模块,并且能够与控制终端进行网络连接才能实现无人机的直接控制,且这种方式导致控制终端仅能控制通过网络直接连接到的无人机,对于不能直接与控制终端通过网络连接的无人机则无法控制。如何在实现相机设备的直接控制的基础上实现相机设备的间接控制,满足不同相机设备使用场景的需求,是亟待解决的技术问题。With the development of cameras, the types of devices equipped with cameras are increasing, for example, smart TVs with cameras, Bluetooth cameras, home cameras, road surveillance cameras, drones with cameras, and so on. In the related art, a device equipped with a camera can be remotely controlled through a terminal device such as a mobile phone or a system, so as to implement tasks such as image shooting and video shooting. Taking the control terminal of multiple drones for photographing control as an example, in the related art, each drone performs network signal transmission with the control terminal through Ethernet, and the control terminal transmits control commands such as taking pictures to each drone. After analyzing, the man-machine further performs the photographing action, and then transmits the photographic data network back to the control terminal. In order to achieve the above control, each drone needs to include a network module and can be connected to the control terminal to realize the direct control of the drone, and this method causes the control terminal to only control the unmanned aerial vehicle directly connected to the network through the network. For drones that cannot be directly connected to the control terminal through the network, it cannot be controlled. How to realize the indirect control of the camera device on the basis of the direct control of the camera device to meet the needs of different camera device usage scenarios is a technical problem to be solved urgently.
发明内容SUMMARY OF THE INVENTION
有鉴于此,提出了一种基于分布式控制的相机控制方法及终端设备。In view of this, a camera control method and terminal device based on distributed control are proposed.
第一方面,本申请的实施例提供了一种基于分布式控制的相机控制方法,应用于第一设备,所述方法包括:In a first aspect, an embodiment of the present application provides a distributed control-based camera control method, which is applied to a first device, and the method includes:
显示所述第一设备能够控制的待选相机,所述待选相机包括所述第一设备的本地相机、所述第一设备中第一虚拟相机所映射的第二设备的本地相机;Displaying a camera to be selected that can be controlled by the first device, the camera to be selected includes a local camera of the first device and a local camera of the second device mapped by the first virtual camera in the first device;
根据检测到的针对所述待选相机的创建任务操作,从所述待选相机中确定出被选中相机以及所述被选中相机所需执行的目标任务;According to the detected operation of creating a task for the camera to be selected, determine the selected camera and a target task to be performed by the selected camera from the cameras to be selected;
根据所述被选中相机在所述第一设备中的第一相机标识和所述目标任务生成第一任务命令;generating a first task command according to the first camera identifier of the selected camera in the first device and the target task;
将所述第一任务命令发送至所述被选中相机,以使所述被选中相机根据所述第一任务命令控制执行所述目标任务,sending the first task command to the selected camera, so that the selected camera controls the execution of the target task according to the first task command,
其中,所述第一设备包括至少一个第一虚拟相机,每个第一虚拟相机用于实现对所映射的第二设备的本地相机的控制,每个第一虚拟相机与所映射的第二设备的本地相机之间存在至少一级映射关系,The first device includes at least one first virtual camera, each first virtual camera is used to control the local camera of the mapped second device, and each first virtual camera is connected to the mapped second device There is at least one-level mapping relationship between the local cameras of ,
在第一虚拟相机与所映射的第二设备的本地相机之间为多级映射关系时,所述第二设备与所述第一设备处于不同的局域网络。When there is a multi-level mapping relationship between the first virtual camera and the mapped local camera of the second device, the second device and the first device are in different local area networks.
通过第一方面所提供的方法,可以通过一个第一设备实现对多个第二设备中的本地相机的控制,且第二设备可以通过同一局域网直接与第一设备建立连接、也可以是借助中间设备与处于不同局域网的第一设备建立间接连接,实现了对不同第二设备的本地相机的分布式、分级控制,可以满足不同应用场景的相机控制需求。With the method provided in the first aspect, a first device can be used to control local cameras in multiple second devices, and the second devices can directly establish a connection with the first device through the same local area network, or use an intermediate The device establishes an indirect connection with the first device in a different local area network, which realizes the distributed and hierarchical control of the local cameras of different second devices, and can meet the camera control requirements of different application scenarios.
根据第一方面,在所述方法的第一种可能的实现方式中,所述方法还包括:According to the first aspect, in a first possible implementation manner of the method, the method further includes:
在检测到设备连接请求时,查找能够与所述第一设备连接且满足连接条件的第三设备,所述连接条件包括:所述第三设备设置有本地相机和/或所述第三设备中创建有至少一个第二虚拟相机;When a device connection request is detected, search for a third device that can be connected to the first device and meets a connection condition, where the connection condition includes: the third device is provided with a local camera and/or a third device in the third device at least one second virtual camera is created;
向所述第三设备发出第一授权控制请求,并接收所述第三设备响应于所述第一授权控制请求返回的第一授权指示;sending a first authorization control request to the third device, and receiving a first authorization indication returned by the third device in response to the first authorization control request;
在根据所述第一授权指示确定出被授权的第一授权相机后,获取所述第一授权相机在所述第三设备中的第二相机标识,所述第一授权相机包括所述第三设备的本地相机和/或所述第二虚拟相机所映射的第四设备的本地相机;After determining the authorized first authorized camera according to the first authorization instruction, obtain a second camera identification of the first authorized camera in the third device, where the first authorized camera includes the third camera the local camera of the device and/or the local camera of the fourth device mapped by the second virtual camera;
根据所述第二相机标识确定出所述第一授权相机在所述第一设备中的第一相机标识,并根据所述第一授权相机的第一相机标识创建用于控制所述第一授权相机的第一虚拟相机,A first camera identification of the first authorized camera in the first device is determined according to the second camera identification, and a first camera identification for controlling the first authorization is created according to the first camera identification of the first authorized camera Camera's first virtual camera,
其中,每个第二虚拟相机用于实现对第二虚拟相机所映射的第四设备的本地相机的控制,所述第二虚拟相机与所映射的第四设备的本地相机与之间存在至少一级映射关系。Wherein, each second virtual camera is used to control the local camera of the fourth device mapped by the second virtual camera, and there is at least one connection between the second virtual camera and the mapped local camera of the fourth device. level mapping.
通过第一种可能的实现方式,创建了能够控制授权相机的第一虚拟相机。Through a first possible implementation, a first virtual camera capable of controlling an authorized camera is created.
根据第一种可能的实现方式,在所述方法的第二种可能的实现方式中,向所述第三设备发出第一授权控制请求,并接收所述第三设备响应于所述第一授权控制请求返回的第一授权指示,包括:According to a first possible implementation manner, in a second possible implementation manner of the method, a first authorization control request is sent to the third device, and a response from the third device to the first authorization is received The first authorization indication returned by the control request includes:
根据针对所述第三设备能够控制的所述第三设备的本地相机和/或所述第二虚拟相机所映射的第四设备的本地相机的请求操作,选择出第一请求相机;selecting a first requested camera according to a request operation for the local camera of the third device that can be controlled by the third device and/or the local camera of the fourth device mapped by the second virtual camera;
根据所述第一请求相机生成所述第一授权控制请求,并将所述第一授权控制请求发送至所述第三设备,以使所述第三设备根据检测到的针对所述第一授权控制请求的授权操作生成所述第一授权指示。The camera generates the first authorization control request according to the first request, and sends the first authorization control request to the third device, so that the third device can make the third device according to the detected authorization for the first authorization The authorization operation of the control request generates the first authorization indication.
通过第二种可能的实现方式,可以根据用户的需要选择出第一请求相机,满足不同用户的授权控制需求。Through the second possible implementation manner, the first request camera can be selected according to the user's needs, so as to meet the authorization control requirements of different users.
根据第一种可能的实现方式,在所述方法的第三种可能的实现方式中,根据所述第二相机标识确定出所述第一授权相机在所述第一设备中的第一相机标识,并根据所述第一授权相机的第一相机标识创建用于控制所述第一授权相机的第一虚拟相机,包括:According to a first possible implementation manner, in a third possible implementation manner of the method, a first camera identification of the first authorized camera in the first device is determined according to the second camera identification , and create a first virtual camera for controlling the first authorized camera according to the first camera identification of the first authorized camera, including:
在所述第一授权相机包括第二虚拟相机所映射的第四设备的本地相机时,根据所述第二相机标识中的指示所述第一授权相机与所述第二虚拟相机之间的映射关系的映射关系级别,确定出所述第一授权相机与需要创建的控制所述第一授权相机的第一虚拟相机之间的第一映射关系级别;When the first authorized camera includes a local camera of the fourth device mapped by the second virtual camera, indicating the mapping between the first authorized camera and the second virtual camera according to the second camera identifier the mapping relationship level of the relationship, determining the first mapping relationship level between the first authorized camera and the first virtual camera that needs to be created to control the first authorized camera;
根据所述第二相机标识中的身份标识、所述第一设备中对应于所述第一映射关系级别的已有相机的身份标识,确定出所述第一授权相机在所述第一设备中的第一身份标识;According to the identification in the second camera identification and the identification of the existing camera in the first device corresponding to the first mapping relationship level, it is determined that the first authorized camera is in the first device 's primary identity;
根据所述第一映射关系级别和所述第一身份标识确定出所述第一授权相机在所述第一设备中的第一相机标识,并根据所述第一相机标识创建出用于控制所述第一授权相机的第一虚 拟相机。A first camera identification of the first authorized camera in the first device is determined according to the first mapping relationship level and the first identification identification, and a first camera identification for controlling all cameras is created according to the first camera identification. The first virtual camera of the first authorized camera.
通过第三种可能的实现方式,在创建出第一虚拟相机后,第一设备可以根据第一虚拟相机的第一相机标识和第一映射关系级别直接确定出第一设备与第一授权相机之间的映射关系级别,便于进行命令的发送和数据的接收。Through the third possible implementation manner, after the first virtual camera is created, the first device can directly determine the relationship between the first device and the first authorized camera according to the first camera identifier of the first virtual camera and the first mapping relationship level The level of the mapping relationship between them is convenient for sending commands and receiving data.
根据第三种可能的实现方式,在所述方法的第四种可能的实现方式中,根据所述第二相机标识确定出所述第一授权相机在所述第一设备中的第一相机标识,并根据所述第一授权相机的第一相机标识创建用于控制所述第一授权相机的第一虚拟相机,包括:According to a third possible implementation manner, in a fourth possible implementation manner of the method, a first camera identification of the first authorized camera in the first device is determined according to the second camera identification , and create a first virtual camera for controlling the first authorized camera according to the first camera identification of the first authorized camera, including:
在所述第一授权相机包括所述第三设备的本地相机时,将一级映射关系确定为所述第一授权相机与需要创建的控制所述第一授权相机的第一虚拟相机之间的第一映射关系级别。When the first authorized camera includes a local camera of the third device, a first-level mapping relationship is determined as a first-level mapping relationship between the first authorized camera and a first virtual camera that needs to be created to control the first authorized camera The first mapping relationship level.
根据第三种可能的实现方式,在所述方法的第五种可能的实现方式中,根据所述第二相机标识中的身份标识、所述第一设备中对应于所述第一映射关系级别的已有相机的身份标识,确定出所述第一授权相机在所述第一设备中的第一身份标识,包括:According to a third possible implementation manner, in a fifth possible implementation manner of the method, according to the identity identifier in the second camera identifier, the first device corresponds to the first mapping relationship level The identity identifier of the existing camera is determined, and the first identity identifier of the first authorized camera in the first device is determined, including:
在所述第一设备中对应于所述第一映射关系级别的已有相机的身份标识中,已存在所述第二相机标识中的身份标识时,按照预设身份标识创建规则创建出所述第一授权相机在所述第一设备中的第一身份标识;或者In the identity identifier of the existing camera corresponding to the first mapping relationship level in the first device, when the identity identifier in the second camera identifier already exists, create the identity identifier according to a preset identity identifier creation rule the first identity of the first authorized camera in the first device; or
在所述第二相机标识中的身份标识,与所述第一设备中对应于所述第一映射关系级别的,已有相机的身份标识不同时,将所述第二相机标识中的身份标识确定为所述第一授权相机在所述第一设备中的第一身份标识。When the identity identifier in the second camera identifier is different from the identity identifier of the existing camera corresponding to the first mapping relationship level in the first device, the identity identifier in the second camera identifier is changed to It is determined as the first identity identifier of the first authorized camera in the first device.
通过第五种可能的实现方式,可以保证第一授权相机的第一身份标识,在第一设备所能控制的对应于第一映射关系级别的全部相机的身份标识中的唯一性,以便于进行第一设备所能控制的同一映射关系级别的相机的区分。Through the fifth possible implementation manner, the first identity of the first authorized camera can be guaranteed to be unique among the identities of all cameras corresponding to the first mapping relationship level that can be controlled by the first device, so as to facilitate The distinction between cameras at the same mapping relationship level that can be controlled by the first device.
根据第一方面,在所述方法的第六种可能的实现方式中,根据检测到的针对所述待选相机的创建任务操作,从所述待选相机中确定出被选中相机以及所述被选中相机所需执行的目标任务,包括:According to the first aspect, in a sixth possible implementation manner of the method, the selected camera and the selected camera are determined from the candidate cameras according to the detected operation of creating the task for the candidate camera. Select the target tasks to be performed by the camera, including:
根据检测到的针对所述待选相机的选择操作确定出被选中相机;determining the selected camera according to the detected selection operation on the camera to be selected;
根据针对所述被选中相机的任务设定操作,确定出所述被选中相机所需执行的目标任务,According to the task setting operation for the selected camera, the target task to be performed by the selected camera is determined,
其中,所述目标任务的任务参数包括任务类型、执行时间信息、所述被选中相机执行目标任务时的相机参数设置中的至少一种,所述任务类型包括以下至少一种:拍照任务、摄像任务、图像预览任务。Wherein, the task parameters of the target task include at least one of task type, execution time information, and camera parameter settings when the selected camera performs the target task, and the task type includes at least one of the following: photographing tasks, image preview tasks.
通过第六种可能的实现方式,可以对目标任务进行精确地设定,以便于被选中相机执行目标任务。Through the sixth possible implementation manner, the target task can be precisely set so that the selected camera can perform the target task.
根据第一方面,在所述方法的第七种可能的实现方式中,将所述第一任务命令发送至所述被选中相机,以使所述被选中相机根据所述第一任务命令控制执行所述目标任务,包括以下至少一项操作:According to the first aspect, in a seventh possible implementation manner of the method, the first task command is sent to the selected camera, so that the selected camera controls execution according to the first task command The target task includes at least one of the following operations:
在所述被选中相机包括所述第一设备的本地相机时,向所述第一设备的本地相机发送所述第一任务命令,以使所述第一设备的本地相机执行所述第一任务命令所指示的目标任务;When the selected camera includes the local camera of the first device, the first task command is sent to the local camera of the first device, so that the local camera of the first device executes the first task the target task indicated by the command;
在所述被选中相机包括第一虚拟相机所映射的第二设备的本地相机、且所述被选中相机与所述被选中相机所对应的第一虚拟相机之间为一级映射关系时,通过所述第一设备中与所述被选中相机对应的第一虚拟相机将所述第一任务命令转发至所述第二设备的本地相机,以 使所述第二设备的本地相机执行所述第一任务命令所指示的目标任务;When the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a first-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, pass The first virtual camera corresponding to the selected camera in the first device forwards the first task command to the local camera of the second device, so that the local camera of the second device executes the first task command. a target task indicated by the task command;
在所述被选中相机包括第一虚拟相机所映射的第二设备的本地相机、且所述被选中相机与所述被选中相机所对应的第一虚拟相机之间为多级映射关系时,根据所述被选中相机与对应的第一虚拟相机之间的第一映射关系级别,确定出完成所述第一任务命令转发的至少一个中间设备,依次通过每个中间设备中对应于所述被选中相机的虚拟相机将所述第一任务命令转发至所述第二设备的本地相机,以使所述第二设备的本地相机执行所述第一任务命令所指示的目标任务。When the selected camera includes the local camera of the second device mapped by the first virtual camera, and there is a multi-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, according to The first mapping relationship level between the selected camera and the corresponding first virtual camera determines at least one intermediate device that completes the forwarding of the first task command, and sequentially passes through each intermediate device corresponding to the selected camera. The virtual camera of the camera forwards the first task command to the local camera of the second device, so that the local camera of the second device executes the target task indicated by the first task command.
通过第七种可能的实现方式,可以借助至少一个中间设备将第一任务命令转发至被选中相机,实现对与第一设备处于不同局域网中的设备的本地相机的控制。Through the seventh possible implementation manner, the first task command can be forwarded to the selected camera by means of at least one intermediate device, so as to realize the control of the local camera of the device in a different local area network from the first device.
根据第一方面或第七种可能的实现方式,在所述方法的第八种可能的实现方式中,所述方法还包括:According to the first aspect or the seventh possible implementation manner, in an eighth possible implementation manner of the method, the method further includes:
在接收到所述被选中相机执行所述目标任务得到的目标任务数据时,根据所述目标任务数据进行图像和/或视频展示,When receiving the target task data obtained by the selected camera performing the target task, performing image and/or video display according to the target task data,
其中,接收所述目标任务数据包括以下至少一种方式:Wherein, receiving the target task data includes at least one of the following ways:
在所述被选中相机包括所述第一设备的本地相机时,直接接收来自所述第一设备的本地相机发出的目标任务数据;When the selected camera includes the local camera of the first device, directly receiving target task data sent from the local camera of the first device;
在所述被选中相机包括第一虚拟相机所映射的第二设备的本地相机、且所述被选中相机与所述被选中相机所对应的第一虚拟相机之间为一级映射关系时,利用所述被选中相机所对应的第一虚拟相机直接接收所述第二设备的本地相机发出的目标任务数据;When the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a first-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, use The first virtual camera corresponding to the selected camera directly receives the target task data sent by the local camera of the second device;
在所述被选中相机包括第一虚拟相机所映射的第二设备的本地相机、且所述被选中相机与所述被选中相机所对应的第一虚拟相机之间为多级映射关系时,利用所述被选中相机所对应的第一虚拟相机接收依次经过第二设备的本地相机发出、至少一个中间设备转发的目标任务数据。When the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a multi-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, use The first virtual camera corresponding to the selected camera receives the target task data sequentially sent by the local camera of the second device and forwarded by at least one intermediate device.
通过第八种可能的实现方式,第一设备可以接收被选中相机执行目标任务之后的目标任务数据,并根据目标任务数据进行图像和/或视频展示。Through the eighth possible implementation manner, the first device may receive target task data after the selected camera performs the target task, and perform image and/or video presentation according to the target task data.
根据第一方面,在所述方法的第九种可能的实现方式中,所述方法还包括:According to the first aspect, in a ninth possible implementation manner of the method, the method further includes:
在接收到来自第五设备的第二授权控制请求时,根据所述第二授权控制请求中的第二请求相机展示授权提示;When receiving the second authorization control request from the fifth device, the camera displays an authorization prompt according to the second request in the second authorization control request;
根据检测到的针对所述第二请求相机的授权操作,确定出授权的第二授权相机;determining an authorized second authorized camera according to the detected authorization operation for the second requested camera;
根据所述第二授权相机在所述第一设备中的第一相机标识生成第二授权指示,并将所述第二授权指示发送至所述第五设备,以使所述第五设备根据所述第二授权指示创建用于控制所述第二授权相机的虚拟相机。A second authorization instruction is generated according to the first camera identification of the second authorized camera in the first device, and the second authorization instruction is sent to the fifth device, so that the fifth device The second authorization instruction creates a virtual camera for controlling the second authorized camera.
通过第九种可能的实现方式,使得第一设备直接根据用户发出的命令控制其本地相机和设置的第一虚拟相机所映射的第二设备的本地相机的同时,还可以与第五设备建立控制关系,被第五设备控制。Through the ninth possible implementation manner, the first device can directly control its local camera and the local camera of the second device mapped by the set first virtual camera according to the command issued by the user, and can also establish control with the fifth device. relationship, controlled by the fifth device.
第二方面,本申请的实施例提供了一种终端设备,该终端设备可以执行上述第一方面或者第一方面的多种可能的实现方式中的一种或几种的基于分布式控制的相机控制方法。In a second aspect, an embodiment of the present application provides a terminal device, which can execute the distributed control-based camera of the first aspect or one or more of various possible implementation manners of the first aspect. Control Method.
第三方面,本申请的实施例提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备中 运行时,所述电子设备中的处理器执行上述第一方面或者第一方面的多种可能的实现方式中的一种或几种的基于分布式控制的相机控制方法。In a third aspect, embodiments of the present application provide a computer program product, comprising computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in an electronic When running in the device, the processor in the electronic device executes the first aspect or one or more of the distributed control-based camera control methods in the first aspect or multiple possible implementation manners of the first aspect.
本申请的这些和其他方面在以下(多个)实施例的描述中会更加简明易懂。These and other aspects of the present application will be more clearly understood in the following description of the embodiment(s).
附图说明Description of drawings
包含在说明书中并且构成说明书的一部分的附图与说明书一起示出了本申请的示例性实施例、特征和方面,并且用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features and aspects of the application and together with the description, serve to explain the principles of the application.
图1示出根据本申请一实施例的终端设备的结构示意图。FIG. 1 shows a schematic structural diagram of a terminal device according to an embodiment of the present application.
图2示出根据本申请一实施例的终端设备的软件结构框图。FIG. 2 shows a block diagram of a software structure of a terminal device according to an embodiment of the present application.
图3示出根据本申请一实施例的基于分布式控制的相机控制方法的流程图。FIG. 3 shows a flowchart of a camera control method based on distributed control according to an embodiment of the present application.
图4示出根据本申请一实施例的基于分布式控制的相机控制方法的应用场景示意图。FIG. 4 shows a schematic diagram of an application scenario of a camera control method based on distributed control according to an embodiment of the present application.
图5示出根据本申请一实施例的确定目标任务的过程示意图。FIG. 5 shows a schematic diagram of a process of determining a target task according to an embodiment of the present application.
图6示出根据本申请一实施例的基于分布式控制的相机控制方法的流程图。FIG. 6 shows a flowchart of a camera control method based on distributed control according to an embodiment of the present application.
图7示出根据本申请一实施例的选择授权相机示意图。FIG. 7 shows a schematic diagram of selecting an authorized camera according to an embodiment of the present application.
图8示出根据本申请一实施例的基于分布式控制的相机控制方法的实现过程示意图。FIG. 8 shows a schematic diagram of an implementation process of a camera control method based on distributed control according to an embodiment of the present application.
具体实施方式Detailed ways
以下将参考附图详细说明本申请的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numbers in the figures denote elements that have the same or similar functions. While various aspects of the embodiments are shown in the drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
另外,为了更好的说明本申请,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本申请同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本申请的主旨。In addition, in order to better illustrate the present application, numerous specific details are given in the following detailed description. It should be understood by those skilled in the art that the present application may be practiced without certain specific details. In some instances, methods, means, components and circuits well known to those skilled in the art have not been described in detail so as not to obscure the subject matter of the present application.
为了解决上述技术问题,本申请提供了一种基于分布式控制的相机控制方法,本申请实施例的基于分布式控制的相机控制方法能够实现相机设备的多级间接控制,适用于不同相机设备的使用场景,该方法可以应用于终端设备、用于实现相机控制的控制设备等设备中,从而实现上述方法。In order to solve the above technical problems, the present application provides a camera control method based on distributed control. The distributed control-based camera control method in the embodiment of the present application can realize multi-level indirect control of camera devices, and is suitable for different camera devices. Depending on the usage scenario, the method can be applied to devices such as a terminal device, a control device for implementing camera control, and the like, so as to implement the above method.
本申请涉及的设备(包括第一设备、第二设备、第三设备、第四设备等设备)可以是指具有无线连接功能的设备,无线连接的功能是指可以通过wifi、蓝牙等无线连接方式与其他设备进行连接,本申请的设备也可以具有有线连接进行通信的功能。本申请的设备可以是触屏的、也可以是非触屏的、也可以是没有屏幕的,触屏的可以通过手指、触控笔等在显示屏幕上点击、滑动等方式对设备进行控制,非触屏的设备可以连接鼠标、键盘、触控面板等输入设备,通过输入设备对设备进行控制,没有屏幕的设备比如说可以是没有屏幕的蓝牙音箱等。The equipment involved in this application (including the first equipment, the second equipment, the third equipment, the fourth equipment, etc.) may refer to the equipment with the wireless connection function, and the wireless connection function refers to the wireless connection methods such as wifi and bluetooth. To connect with other devices, the device of the present application may also have the function of wired connection for communication. The device of the present application can be a touch screen, a non-touch screen, or no screen. The touch screen can control the device by clicking, sliding, etc. on the display screen with a finger, a stylus pen, etc. A device with a touch screen can be connected to input devices such as a mouse, keyboard, and touch panel, and the device can be controlled through the input device. For example, a device without a screen can be a Bluetooth speaker without a screen.
举例来说,本申请涉及的设备中的终端设备可以是智能手机、上网本、平板电脑、笔记本电脑、可穿戴电子设备(如智能手环、智能手表等)、TV、虚拟现实设备、音响、电子墨水,等等。For example, the terminal devices in the devices involved in this application may be smart phones, netbooks, tablet computers, notebook computers, wearable electronic devices (such as smart bracelets, smart watches, etc.), TVs, virtual reality devices, audio, electronic ink, etc.
图1示出根据本申请一实施例的终端设备的结构示意图。以终端设备是手机为例,图1示出了手机200的结构示意图。FIG. 1 shows a schematic structural diagram of a terminal device according to an embodiment of the present application. Taking the terminal device being a mobile phone as an example, FIG. 1 shows a schematic structural diagram of the mobile phone 200 .
手机200可以包括处理器210,外部存储器接口220,内部存储器221,USB接口230,充电管理模块240,电源管理模块241,电池242,天线1,天线2,移动通信模块251,无线通信模块252,音频模块270,扬声器270A,受话器270B,麦克风270C,耳机接口270D,传感器模块280,按键290,马达291,指示器292,摄像头293,显示屏294,以及SIM卡接口295等。其中传感器模块280可以包括陀螺仪传感器280A,加速度传感器280B,接近光传感器280G、指纹传感器280H,触摸传感器280K(当然,手机200还可以包括其它传感器,比如温度传感器,压力传感器、距离传感器、磁传感器、环境光传感器、气压传感器、骨传导传感器等,图中未示出)。The mobile phone 200 may include a processor 210, an external memory interface 220, an internal memory 221, a 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 251, a wireless communication module 252, Audio module 270, speaker 270A, receiver 270B, microphone 270C, headphone jack 270D, sensor module 280, buttons 290, motor 291, indicator 292, camera 293, display screen 294, SIM card interface 295, etc. The sensor module 280 may include a gyroscope sensor 280A, an acceleration sensor 280B, a proximity light sensor 280G, a fingerprint sensor 280H, and a touch sensor 280K (of course, the mobile phone 200 may also include other sensors, such as a temperature sensor, a pressure sensor, a distance sensor, and a magnetic sensor. , ambient light sensor, air pressure sensor, bone conduction sensor, etc., not shown in the figure).
可以理解的是,本申请实施例示意的结构并不构成对手机200的具体限定。在本申请另一些实施例中,手机200可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the mobile phone 200 . In other embodiments of the present application, the mobile phone 200 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
处理器210可以包括一个或多个处理单元,例如:处理器210可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(Neural-network Processing Unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。其中,控制器可以是手机200的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or Neural-network Processing Unit (NPU) Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors. The controller may be the nerve center and command center of the mobile phone 200 . The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器210中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器210中的存储器为高速缓冲存储器。该存储器可以保存处理器210刚用过或循环使用的指令或数据。如果处理器210需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器210的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the memory in processor 210 is cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 210 . If the processor 210 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided, and the waiting time of the processor 210 is reduced, thereby improving the efficiency of the system.
处理器210可以运行本申请实施例提供的基于分布式控制的相机控制方法,以便于相机设备的多级间接控制,适用于不同相机设备的使用场景。处理器210可以包括不同的器件,比如集成CPU和GPU时,CPU和GPU可以配合执行本申请实施例提供的基于分布式控制的相机控制方法,比如基于分布式控制的相机控制方法中部分算法由CPU执行,另一部分算法由GPU执行,以得到较快的处理效率。The processor 210 may execute the distributed control-based camera control method provided by the embodiments of the present application, so as to facilitate multi-level indirect control of the camera device, which is suitable for use scenarios of different camera devices. The processor 210 may include different devices. For example, when a CPU and a GPU are integrated, the CPU and the GPU may cooperate to execute the distributed control-based camera control method provided in the embodiments of the present application. The CPU is executed, and another part of the algorithm is executed by the GPU to obtain faster processing efficiency.
显示屏294用于显示图像,视频等。显示屏294包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,手机200可以包括1个或N个显示屏294,N为大于1的正整数。显示屏294可用于显示由用户输入的信息或提供给用户的信息以及各种图形用户界面(graphical user interface,GUI)。例如,显示器294可以显示照片、视频、网页、或者文件等。再例如,显示器294可以显示图形用户界面。其中,图形用户界面上包括状态栏、可隐藏的导航栏、时间和天气小组件(widget)、以及应用的图标,例如浏览器图标等。状态栏中包括运营商名称(例如中国 移动)、移动网络(例如4G)、时间和剩余电量。导航栏中包括后退(back)键图标、主屏幕(home)键图标和前进键图标。此外,可以理解的是,在一些实施例中,状态栏中还可以包括蓝牙图标、Wi-Fi图标、外接设备图标等。还可以理解的是,在另一些实施例中,图形用户界面中还可以包括Dock栏,Dock栏中可以包括常用的应用图标等。当处理器210检测到用户的手指(或触控笔等)针对某一应用图标的触摸事件后,响应于该触摸事件,打开与该应用图标对应的应用的用户界面,并在显示器294上显示该应用的用户界面。 Display screen 294 is used to display images, videos, and the like. Display screen 294 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 (active-matrix organic light). emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, cell phone 200 may include 1 or N display screens 294, where N is a positive integer greater than 1. The display screen 294 may be used to display information entered by or provided to the user as well as various graphical user interfaces (GUIs). For example, display 294 may display photos, videos, web pages, or documents, and the like. As another example, display 294 may display a graphical user interface. The GUI includes a status bar, a hideable navigation bar, a time and weather widget, and an application icon, such as a browser icon. The status bar includes operator name (eg China Mobile), mobile network (eg 4G), time and remaining battery. The navigation bar includes a back button icon, a home button icon, and a forward button icon. In addition, it can be understood that, in some embodiments, the status bar may further include a Bluetooth icon, a Wi-Fi icon, an external device icon, and the like. It can also be understood that, in other embodiments, the graphical user interface may further include a Dock bar, and the Dock bar may include commonly used application icons and the like. After the processor 210 detects a touch event of the user's finger (or stylus, etc.) on an application icon, in response to the touch event, the user interface of the application corresponding to the application icon is opened and displayed on the display 294 The user interface of the application.
在本申请实施例中,显示屏294可以是一个一体的柔性显示屏,也可以采用两个刚性屏以及位于两个刚性屏之间的一个柔性屏组成的拼接显示屏。In this embodiment of the present application, the display screen 294 may be an integrated flexible display screen, or a spliced display screen composed of two rigid screens and a flexible screen located between the two rigid screens.
当处理器210运行本申请实施例提供的基于分布式控制的相机控制方法后,终端设备作为第一设备可以通过天线1、天线2与能够直接连接的第二设备建立通信连接,并根据本申请实施例提供的基于分布式控制的相机控制方法实现第一设备对第二设备的本地相机的控制,以及实现对无法直接与第一设备建立通信连接的第二设备的本地相机的控制。After the processor 210 runs the distributed control-based camera control method provided by the embodiment of the present application, the terminal device as the first device can establish a communication connection with the second device that can be directly connected through the antenna 1 and the antenna 2, and according to the present application The distributed control-based camera control method provided by the embodiment realizes the control of the local camera of the second device by the first device, and the control of the local camera of the second device that cannot directly establish a communication connection with the first device.
摄像头293(前置摄像头或者后置摄像头,或者一个摄像头既可作为前置摄像头,也可作为后置摄像头)用于捕获静态图像或视频。通常,摄像头293可以包括感光元件比如镜头组和图像传感器,其中,镜头组包括多个透镜(凸透镜或凹透镜),用于采集待拍摄物体反射的光信号,并将采集的光信号传递给图像传感器。图像传感器根据所述光信号生成待拍摄物体的原始图像。Camera 293 (front camera or rear camera, or a camera that can be both a front camera and a rear camera) is used to capture still images or video. Generally, the camera 293 may include a photosensitive element such as a lens group and an image sensor, wherein the lens group includes a plurality of lenses (convex or concave) for collecting the light signal reflected by the object to be photographed, and transmitting the collected light signal to the image sensor . The image sensor generates an original image of the object to be photographed according to the light signal.
内部存储器221可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器210通过运行存储在内部存储器221的指令,从而执行手机200的各种功能应用以及数据处理。内部存储器221可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,应用程序(比如相机应用,微信应用等)的代码等。存储数据区可存储手机200使用过程中所创建的数据(比如相机应用采集的图像、视频等)等。 Internal memory 221 may be used to store computer executable program code, which includes instructions. The processor 210 executes various functional applications and data processing of the mobile phone 200 by executing the instructions stored in the internal memory 221 . The internal memory 221 may include a storage program area and a storage data area. The storage program area may store operating system, code of application programs (such as camera application, WeChat application, etc.), and the like. The storage data area may store data created during the use of the mobile phone 200 (such as images and videos collected by the camera application) and the like.
内部存储器221还可以存储本申请实施例提供的基于分布式控制的相机控制方法对应的一个或多个计算机程序1310。该一个或多个计算机程序1304被存储在上述存储器221中并被配置为被该一个或多个处理器210执行,该一个或多个计算机程序1310包括指令,上述指令可以用于执行如图3、图6相应实施例中的各个步骤,该计算机程序1310可以包括执行下述步骤的一个或多个模块,实现相机设备的多级间接控制,适用于不同相机设备的使用场景。The internal memory 221 may also store one or more computer programs 1310 corresponding to the distributed control-based camera control methods provided in the embodiments of the present application. The one or more computer programs 1304 are stored in the aforementioned memory 221 and configured to be executed by the one or more processors 210, and the one or more computer programs 1310 include instructions that may be used to perform the execution of FIG. 3 6, the computer program 1310 may include one or more modules for executing the following steps to realize multi-level indirect control of the camera device, which is suitable for use scenarios of different camera devices.
此外,内部存储器221可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。In addition, the internal memory 221 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
当然,本申请实施例提供的基于分布式控制的相机控制方法的代码还可以存储在外部存储器中。这种情况下,处理器210可以通过外部存储器接口220运行存储在外部存储器中的基于分布式控制的相机控制方法的代码。Certainly, the codes of the distributed control-based camera control method provided by the embodiments of the present application may also be stored in an external memory. In this case, the processor 210 may execute the codes of the distributed control-based camera control method stored in the external memory through the external memory interface 220 .
下面介绍传感器模块280的功能。The function of the sensor module 280 is described below.
陀螺仪传感器280A,可以用于确定手机200的运动姿态。在一些实施例中,可以通过陀螺仪传感器280A确定手机200围绕三个轴(即,x,y和z轴)的角速度。即陀螺仪传感器280A可以用于检测手机200当前的运动状态,比如抖动还是静止。The gyro sensor 280A can be used to determine the movement posture of the mobile phone 200 . In some embodiments, the angular velocity of cell phone 200 about three axes (ie, x, y, and z axes) may be determined by gyro sensor 280A. That is, the gyro sensor 280A can be used to detect the current motion state of the mobile phone 200, such as shaking or still.
当本申请实施例中的显示屏为可折叠屏时,陀螺仪传感器280A可用于检测作用于显示屏294上的折叠或者展开操作。陀螺仪传感器280A可以将检测到的折叠操作或者展开操作作为事件上报给处理器210,以确定显示屏294的折叠状态或展开状态。When the display screen in the embodiment of the present application is a foldable screen, the gyro sensor 280A can be used to detect a folding or unfolding operation acting on the display screen 294 . The gyroscope sensor 280A may report the detected folding operation or unfolding operation to the processor 210 as an event to determine the folding state or unfolding state of the display screen 294 .
加速度传感器280B可检测手机200在各个方向上(一般为三轴)加速度的大小。即陀螺仪传感器280A可以用于检测手机200当前的运动状态,比如抖动还是静止。当本申请实施例中的显示屏为可折叠屏时,加速度传感器280B可用于检测作用于显示屏294上的折叠或者展开操作。加速度传感器280B可以将检测到的折叠操作或者展开操作作为事件上报给处理器210,以确定显示屏294的折叠状态或展开状态。The acceleration sensor 280B can detect the magnitude of the acceleration of the mobile phone 200 in various directions (generally three axes). That is, the gyro sensor 280A can be used to detect the current motion state of the mobile phone 200, such as shaking or still. When the display screen in the embodiment of the present application is a foldable screen, the acceleration sensor 280B can be used to detect a folding or unfolding operation acting on the display screen 294 . The acceleration sensor 280B may report the detected folding operation or unfolding operation to the processor 210 as an event to determine the folding state or unfolding state of the display screen 294 .
接近光传感器280G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。手机通过发光二极管向外发射红外光。手机使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定手机附近有物体。当检测到不充分的反射光时,手机可以确定手机附近没有物体。当本申请实施例中的显示屏为可折叠屏时,接近光传感器280G可以设置在可折叠的显示屏294的第一屏上,接近光传感器280G可根据红外信号的光程差来检测第一屏与第二屏的折叠角度或者展开角度的大小。 Proximity light sensor 280G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The mobile phone emits infrared light outward through light-emitting diodes. Phones use photodiodes to detect reflected infrared light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the phone. When insufficient reflected light is detected, the phone can determine that there are no objects near the phone. When the display screen in the embodiment of the present application is a foldable screen, the proximity light sensor 280G can be arranged on the first screen of the foldable display screen 294, and the proximity light sensor 280G can detect the first screen according to the optical path difference of the infrared signal. The size of the folding or unfolding angle between the screen and the second screen.
陀螺仪传感器280A(或加速度传感器280B)可以将检测到的运动状态信息(比如角速度)发送给处理器210。处理器210基于运动状态信息确定当前是手持状态还是脚架状态(比如,角速度不为0时,说明手机200处于手持状态)。The gyroscope sensor 280A (or the acceleration sensor 280B) may send the detected motion state information (such as angular velocity) to the processor 210 . The processor 210 determines, based on the motion state information, whether the current state is the hand-held state or the tripod state (for example, when the angular velocity is not 0, it means that the mobile phone 200 is in the hand-held state).
指纹传感器280H用于采集指纹。手机200可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 280H is used to collect fingerprints. The mobile phone 200 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering incoming calls with fingerprints, and the like.
触摸传感器280K,也称“触控面板”。触摸传感器280K可以设置于显示屏294,由触摸传感器280K与显示屏294组成触摸屏,也称“触控屏”。触摸传感器280K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏294提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器280K也可以设置于手机200的表面,与显示屏294所处的位置不同。 Touch sensor 280K, also called "touch panel". The touch sensor 280K may be disposed on the display screen 294, and the touch sensor 280K and the display screen 294 form a touch screen, also called a "touch screen". The touch sensor 280K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to touch operations may be provided through display screen 294 . In other embodiments, the touch sensor 280K may also be disposed on the surface of the mobile phone 200 , which is different from the location where the display screen 294 is located.
示例性的,手机200的显示屏294显示主界面,主界面中包括多个应用(比如相机应用、微信应用等)的图标。用户通过触摸传感器280K点击主界面中相机应用的图标,触发处理器210启动相机应用,打开摄像头293。显示屏294显示相机应用的界面,例如取景界面。Exemplarily, the display screen 294 of the mobile phone 200 displays a main interface, and the main interface includes icons of multiple applications (such as a camera application, a WeChat application, etc.). The user clicks the icon of the camera application in the main interface through the touch sensor 280K, which triggers the processor 210 to start the camera application and turn on the camera 293 . Display screen 294 displays an interface of a camera application, such as a viewfinder interface.
手机200的无线通信功能可以通过天线1,天线2,移动通信模块251,无线通信模块252,调制解调处理器以及基带处理器等实现。The wireless communication function of the mobile phone 200 can be realized by the antenna 1, the antenna 2, the mobile communication module 251, the wireless communication module 252, the modulation and demodulation processor, the baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。手机200中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in handset 200 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块251可以提供应用在手机200上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块251可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块251可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块251还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块251的至少部分功能模块可以被设置于处理器210中。在一些实施例中,移动通信模块251的至少部分功能模块可以与处理器210的至少部分模块被设置在同一个器件中。在本申请实施例中,移动通信模块251还可以用于与其它终端设备进行第一任务命令、目标任务数据等信息的交互。The mobile communication module 251 can provide a wireless communication solution including 2G/3G/4G/5G, etc. applied on the mobile phone 200 . The mobile communication module 251 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 251 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 251 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 251 may be provided in the processor 210 . In some embodiments, at least part of the functional modules of the mobile communication module 251 may be provided in the same device as at least part of the modules of the processor 210 . In this embodiment of the present application, the mobile communication module 251 may also be used to interact with other terminal devices in information such as first task commands, target task data, and the like.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号 调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器270A,受话器270B等)输出声音信号,或通过显示屏294显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器210,与移动通信模块251或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs sound signals through audio devices (not limited to the speaker 270A, the receiver 270B, etc.), or displays images or videos through the display screen 294 . In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modulation and demodulation processor may be independent of the processor 210, and may be provided in the same device as the mobile communication module 251 or other functional modules.
无线通信模块252可以提供应用在手机200上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块252可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块252经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器210。无线通信模块252还可以从处理器210接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。本申请实施例中,无线通信模块252,用于在处理器210的控制下与其他终端设备之间传输数据,比如,处理器210运行本申请实施例提供的基于分布式控制的相机控制方法时,第一设备中的处理器可以控制无线通信模块252向与第一设备建立直接通信连接的第二设备的本地相机发送第一任务命令、并通过第一虚拟相机的映射向无法直接与第一设备建立通信连接的第二设备的本地相机发送第一任务命令,实现相机设备的多级间接控制,适用于不同相机设备的使用场景。The wireless communication module 252 can provide applications on the mobile phone 200 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 252 may be one or more devices integrating at least one communication processing module. The wireless communication module 252 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 210 . The wireless communication module 252 can also receive the signal to be sent from the processor 210 , perform frequency modulation on the signal, amplify the signal, and then convert it into an electromagnetic wave for radiation through the antenna 2 . In this embodiment of the present application, the wireless communication module 252 is configured to transmit data between other terminal devices under the control of the processor 210. For example, when the processor 210 runs the distributed control-based camera control method provided in the embodiment of the present application , the processor in the first device can control the wireless communication module 252 to send the first task command to the local camera of the second device that establishes a direct communication connection with the first device, and send the first task command to the local camera of the second device that cannot directly communicate with the first device through the mapping of the first virtual camera. The local camera of the second device to which the device establishes a communication connection sends the first task command to realize multi-level indirect control of the camera device, which is suitable for use scenarios of different camera devices.
另外,手机200可以通过音频模块270,扬声器270A,受话器270B,麦克风270C,耳机接口270D,以及应用处理器等实现音频功能。例如音乐播放,录音等。手机200可以接收按键290输入,产生与手机200的用户设置以及功能控制有关的键信号输入。手机200可以利用马达291产生振动提示(比如来电振动提示)。手机200中的指示器292可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。手机200中的SIM卡接口295用于连接SIM卡。SIM卡可以通过插入SIM卡接口295,或从SIM卡接口295拔出,实现和手机200的接触和分离。In addition, the mobile phone 200 can implement audio functions through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, and an application processor. Such as music playback, recording, etc. The cell phone 200 can receive key 290 input and generate key signal input related to user settings and function control of the cell phone 200 . The mobile phone 200 can use the motor 291 to generate vibration alerts (eg, vibration alerts for incoming calls). The indicator 292 in the mobile phone 200 may be an indicator light, which may be used to indicate a charging state, a change in power, and may also be used to indicate a message, a missed call, a notification, and the like. The SIM card interface 295 in the mobile phone 200 is used to connect the SIM card. The SIM card can be contacted and separated from the mobile phone 200 by inserting into the SIM card interface 295 or pulling out from the SIM card interface 295 .
应理解,在实际应用中,手机200可以包括比图1所示的更多或更少的部件,本申请实施例不作限定。图示手机200仅是一个范例,并且手机200可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。It should be understood that, in practical applications, the mobile phone 200 may include more or less components than those shown in FIG. 1 , which is not limited in this embodiment of the present application. The illustrated handset 200 is merely an example, and the handset 200 may have more or fewer components than those shown, two or more components may be combined, or may have different component configurations. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
终端设备的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明终端设备的软件结构。The software system of the terminal device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present application take an Android system with a layered architecture as an example to exemplarily describe the software structure of a terminal device.
图2示出根据本申请一实施例的终端设备的软件结构框图。FIG. 2 shows a block diagram of a software structure of a terminal device according to an embodiment of the present application.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图2所示,应用程序包可以包括电话、相机,图库,日历,通话,地图,导航,WLAN, 蓝牙,音乐,视频,短信息等应用程序。As shown in FIG. 2, the application package may include applications such as phone, camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 2, the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make these data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供终端设备的通信功能。例如通话状态的管理(包括接通,挂断等)。The telephony manager is used to provide the communication function of the terminal device. For example, the management of call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the terminal device vibrates, and the indicator light flashes.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
本申请实施例提供了一种基于分布式控制的相机控制方法,可以通过一个第一设备实现对多个第二设备中的本地相机的控制,且第二设备可以通过同一局域网直接与第一设备建立连接、也可以是借助中间设备与处于不同局域网的第一设备建立间接连接,实现了对不同第二设备的本地相机的分布式、分级控制,可以满足不同应用场景的相机控制需求。The embodiment of the present application provides a distributed control-based camera control method, which can realize control of local cameras in multiple second devices through a first device, and the second device can directly communicate with the first device through the same local area network Establishing a connection, or establishing an indirect connection with a first device in a different local area network by means of an intermediate device, realizes distributed and hierarchical control of local cameras of different second devices, and can meet camera control requirements in different application scenarios.
图3示出根据本申请一实施例的基于分布式控制的相机控制方法的流程图。图4示出根据本申请一实施例的基于分布式控制的相机控制方法的应用场景示意图。如图3所示,该方法应用于第一设备,该方法包括步骤S11至步骤S14。FIG. 3 shows a flowchart of a camera control method based on distributed control according to an embodiment of the present application. FIG. 4 shows a schematic diagram of an application scenario of a camera control method based on distributed control according to an embodiment of the present application. As shown in FIG. 3, the method is applied to the first device, and the method includes steps S11 to S14.
在步骤S11中,显示所述第一设备能够控制的待选相机,所述待选相机包括所述第一设备的本地相机、所述第一设备中第一虚拟相机所映射的第二设备的本地相机。其中,所述第一设备包括至少一个第一虚拟相机,每个第一虚拟相机用于实现对所映射的第二设备的本地相机的控制,每个第一虚拟相机与所映射的第二设备的本地相机之间存在至少一级映射关系。在第一虚拟相机与所映射的第二设备的本地相机之间为多级映射关系时,所述第二设备与所述第一设备处于不同的局域网络。In step S11, a camera to be selected that can be controlled by the first device is displayed, and the camera to be selected includes a local camera of the first device and a camera of the second device mapped by the first virtual camera in the first device. local camera. The first device includes at least one first virtual camera, each first virtual camera is used to control the local camera of the mapped second device, and each first virtual camera is connected to the mapped second device There is at least one-level mapping relationship between the local cameras. When there is a multi-level mapping relationship between the first virtual camera and the mapped local camera of the second device, the second device and the first device are in different local area networks.
在本实施例中,第一虚拟相机与所映射的第二设备的本地相机之间的映射关系,可以指示第一虚拟相机在第一设备的控制下实现对所映射的第二设备的本地相机进行控制的映射次数,二者进行命令、相机执行任务得到的数据传输过程中需要通过几次转发才能完成传输过程。并且,第一虚拟相机与所映射的第二设备的本地相机之间的映射关系,也可以认为其为第一设备与第一虚拟相机所映射的第二设备的本地相机之间的映射关系。映射关系的级别越低,第一虚拟相机与所映射的第二设备的本地相机之间的映射次数少、传输转发的次数越少。映射关系级别包括零级映射关系、一级映射关系、二级映射关系…N级映射关系,一级映射关系的级别小于二级映射关系的级别,二级映射关系以及二级以上映射关系为多级映射关系。In this embodiment, the mapping relationship between the first virtual camera and the mapped local camera of the second device may instruct the first virtual camera to realize the local camera of the mapped second device under the control of the first device The number of mappings to be controlled, the data transmission process obtained by the two commands and the task performed by the camera need to be forwarded several times to complete the transmission process. Moreover, the mapping relationship between the first virtual camera and the mapped local camera of the second device can also be considered as the mapping relationship between the first device and the local camera of the second device mapped by the first virtual camera. The lower the level of the mapping relationship, the less the number of times of mapping between the first virtual camera and the mapped local camera of the second device, and the less the number of times of transmission and forwarding. The mapping relationship level includes zero-level mapping relationship, first-level mapping relationship, second-level mapping relationship… level mapping.
为进一步解释映射关系,下面结合图4给出的应用场景示例进行描述。如图4所示,第一设备A中包括本地相机100和至少一个第一虚拟相机200。第一设备A的本地相机100与第一设备A之间的映射关系即为零级映射关系。每个第一虚拟相机200所映射的第二设备可以是能够直接与第一设备通过网络进行连接的设备,如图4所示的设备B1,设备B1中的本地相机与对应的第一虚拟相机200之间即为一级映射关系,设备B1与第一设备A可以处于相同的局域网络中。第一虚拟相机200所映射的第二设备也可以是不能直接与第一设备通过网络进行连接的设备,通过其他设备间接实现与第一设备A的通信,如图4所示的设备B2、设备B3。其中,设备B2映射于第一虚拟相机202,第一设备A通过第一虚拟相机202按照“第一虚拟相机202
Figure PCTCN2021130672-appb-000001
第二虚拟相机301
Figure PCTCN2021130672-appb-000002
设备B2的本地相机”的通信方式实现对设备B2的本地相机的控制,包括发送第一任务命令和接收目标任务数据;设备B2与第一虚拟相机202即为二级映射关系,设备B2与第一设备A处于不同的局域网路,设备B2与设备C1可以处于同一局域网络,设备C1与第一设备A可以处于同一局域网络。设备B3映射于第一虚拟相机203,第一设备A通过第一虚拟相机203按照“第一虚拟相机203
Figure PCTCN2021130672-appb-000003
第二虚拟相机303…设备B3的本地相机”的通信方式实现对设备B3的本地相机的控制,包括发送第一任务命令和接收目标任务数据;设备B3与第一虚拟相机203即为x级映射关系(x=虚拟相机的个数),设备B3与第一设备A处于不同的局域网路,设备C2与设备C3可以处于同一局域网络,设备C2与第一设备A可以处于同一局域网络。
In order to further explain the mapping relationship, the following description will be given in conjunction with the application scenario example given in FIG. 4 . As shown in FIG. 4 , the first device A includes a local camera 100 and at least one first virtual camera 200 . The mapping relationship between the local camera 100 of the first device A and the first device A is a zero-level mapping relationship. The second device mapped by each first virtual camera 200 may be a device that can be directly connected to the first device through a network, such as device B1 shown in FIG. 4 , the local camera in device B1 and the corresponding first virtual camera 200 is a first-level mapping relationship, and the device B1 and the first device A may be in the same local area network. The second device mapped by the first virtual camera 200 may also be a device that cannot be directly connected to the first device through the network, and communicates with the first device A indirectly through other devices, such as device B2 and device A as shown in FIG. B3. Among them, the device B2 is mapped to the first virtual camera 202, and the first device A passes the first virtual camera 202 according to the "first virtual camera 202"
Figure PCTCN2021130672-appb-000001
The second virtual camera 301
Figure PCTCN2021130672-appb-000002
The communication mode of the "local camera of the device B2" realizes the control of the local camera of the device B2, including sending the first task command and receiving the target task data; the device B2 and the first virtual camera 202 are the secondary mapping relationship, and the device B2 and the second A device A is in a different local area network, the device B2 and the device C1 can be in the same local area network, and the device C1 and the first device A can be in the same local area network. The device B3 is mapped to the first virtual camera 203, and the first device A The virtual camera 203 follows the "first virtual camera 203
Figure PCTCN2021130672-appb-000003
The communication mode of the second virtual camera 303...the local camera of the device B3" realizes the control of the local camera of the device B3, including sending the first task command and receiving the target task data; the device B3 and the first virtual camera 203 are the x-level mapping. relationship (x=number of virtual cameras), device B3 and first device A are in different local area networks, device C2 and device C3 may be in the same local area network, and device C2 and first device A may be in the same local area network.
其中,设备B1、设备B2、设备B3可以是相同也可以是不同类型的设备,如设备B1为手机、设备B2为监控摄像装置、设备B3为带有相机的无人机。设备C1的本地相机、设备C2的本地相机、设备C3的本地相机也可以在被收权后映射到第一设备A中形成虚拟相机,为图示简洁,图4中并未示出其映射关系,本领域技术人员可以根据设备B1、设备B2、设备B3映射到第一设备A中的实现方式示例根据本申请所提供的方法实现,在此不再赘述。The device B1, the device B2, and the device B3 may be the same or different types of devices, for example, the device B1 is a mobile phone, the device B2 is a surveillance camera, and the device B3 is a drone with a camera. The local camera of the device C1, the local camera of the device C2, and the local camera of the device C3 can also be mapped to the first device A to form a virtual camera after being authorized. For the sake of simplicity, the mapping relationship is not shown in FIG. 4 . , those skilled in the art can implement the method according to the method provided in this application according to the implementation example of mapping the device B1, the device B2, and the device B3 to the first device A, which is not repeated here.
在步骤S12中,根据检测到的针对所述待选相机的创建任务操作,从所述待选相机中确定出被选中相机以及所述被选中相机所需执行的目标任务。In step S12, according to the detected operation of creating a task for the camera to be selected, the selected camera and the target task to be performed by the selected camera are determined from the cameras to be selected.
在一种可能的实现方式中,步骤S12可以包括:根据检测到的针对所述待选相机的选择操作确定出被选中相机;根据针对所述被选中相机的任务设定操作,确定出所述被选中相机所需执行的目标任务。其中,所述目标任务的任务参数可以包括任务类型、执行时间信息、所述被选中相机执行目标任务时的相机参数设置中的至少一种,所述任务类型包括以下至少一种:拍照任务、摄像任务、图像预览任务。这样,可以对目标任务进行精确地设定,以便于被选中相机执行目标任务。In a possible implementation manner, step S12 may include: determining the selected camera according to the detected selection operation for the to-be-selected camera; determining the selected camera according to the task setting operation for the selected camera The target task to be performed by the selected camera. The task parameters of the target task may include at least one of task type, execution time information, and camera parameter settings when the selected camera performs the target task, and the task type includes at least one of the following: a photo-taking task, Camera tasks, image preview tasks. In this way, the target task can be precisely set so that the selected camera can perform the target task.
其中,不同任务类型所对应的执行时间信息、相机参数需要进行对应设置。对于拍照任务,执行时间信息可以包括拍照数量、拍照的时刻,相机参数可以包括拍照的像素、拍照曝光时长、拍照模式(如日间模式、夜间模式、全景模式等)等用于设定相机进行照片拍摄的参数。对于摄像任务,执行时间信息可以包括摄像的起止时刻、摄像时长等,相机参数可以包括摄像的像素、摄像模式(如日间模式、夜间模式等)等用于设定相机进行视频拍摄的参数。对于图像预览任务,执行时间信息可以包括所要预览的照片(实时打开相机取景框拍摄的照片或者相机之前拍摄的照片)的拍摄时刻、所要预览的视频(实时打开相机拍摄的视频或者相机之前拍摄的视频)的拍摄时刻和时长,相机参数可以包括拍照的像素、拍照曝光时长、拍照模式(如日间模式、夜间模式、全景模式等)等用于设定相机进行照片拍摄的参数。The execution time information and camera parameters corresponding to different task types need to be set accordingly. For a photo-taking task, the execution time information may include the number of photos taken and the time when the photo was taken, and the camera parameters may include the pixels of the photo taken, the exposure duration of the photo, and the photo mode (such as day mode, night mode, panorama mode, etc.) The parameters of the photo shooting. For a photographing task, the execution time information may include the start and end time of the photographing, the photographing duration, etc., and the camera parameters may include the pixels of the photographing, the photographing mode (such as day mode, night mode, etc.), which are used to set the parameters for the camera to shoot video. For the image preview task, the execution time information may include the shooting time of the photo to be previewed (the photo taken by opening the camera viewfinder in real time or the photo taken before the camera), the video to be previewed (the video taken by the camera being opened in real time or the video taken before the camera is turned on) The camera parameters can include the pixels for taking pictures, the exposure time for taking pictures, and the camera mode (such as day mode, night mode, panorama mode, etc.), which are used to set the parameters for the camera to take photos.
在本实施例中,在第一设备设置有显示屏时,可以以图片和/或文字结合的形式在显示屏中显示待选相机。还可以利用第一设备中设置的喇叭等通过语音的方式提示用户可供选择的待选相机。图5示出根据本申请一实施例的确定目标任务的过程示意图。如图4、图5所示,第一设备即为图4所示的第一设备A,在界面T1中显示可供用户选择的待选相机“本地相机100、映射于设备B1的本地相机的第一虚拟相机201、映射于设备B2的本地相机的第一虚拟相机202、映射于设备B3的本地相机的第一虚拟相机203”,根据检测到的针对选择控件K的点击、滑动等触发操作确定出被用户选择的被选中相机“第一虚拟相机201所映射的设备B1的本地相机”。而后可以进一步将显示屏中的界面T1切换为T2,在界面T2中显示任务类型“拍照、摄像、图像预览”,再根据检测到的针对界面T2中选择控件K的点击、滑动等触发操作确定出被用户选择的任务类型为“拍照任务”。再之后可以进一步将显示屏中的界面T2切换为T3,在界面T3中显示任务类型“摄像任务”所对应的相机参数设置提示,如图5中,“时长以及其后的空白框”用于提示用户直接输入或下拉选择等方式确定出摄像的拍摄时长。“相机参数以及其后的多个空白框”用于提示用户直接输入或下拉选择等方式确定出摄像的相机参数。本领域技术人员可以根据实际需要对步骤S11和步骤S12的实现方式进行设置,本申请对此不作限制。In this embodiment, when the first device is provided with a display screen, the camera to be selected may be displayed on the display screen in the form of a combination of pictures and/or text. It is also possible to prompt the user for a camera to be selected for selection by means of a voice, such as a speaker set in the first device. FIG. 5 shows a schematic diagram of a process of determining a target task according to an embodiment of the present application. As shown in FIG. 4 and FIG. 5 , the first device is the first device A shown in FIG. 4 , and the interface T1 displays the camera to be selected by the user “local camera 100 , the local camera mapped to the device B1 ” The first virtual camera 201, the first virtual camera 202 mapped to the local camera of the device B2, and the first virtual camera 203″ mapped to the local camera of the device B3, trigger operations according to the detected click, slide, etc. of the selection control K The selected camera selected by the user "the local camera of the device B1 mapped by the first virtual camera 201" is determined. Then, the interface T1 in the display screen can be further switched to T2, and the task type "photographing, videography, image preview" can be displayed in the interface T2, and then determined according to the detected trigger operations such as clicking, sliding, etc. on the selected control K in the interface T2. The task type selected by the user is "photographing task". After that, the interface T2 in the display screen can be further switched to T3, and the camera parameter setting prompt corresponding to the task type "camera task" can be displayed in the interface T3. Prompt the user to directly input or drop-down selection to determine the shooting duration of the video. "Camera parameters and multiple blank boxes after that" are used to prompt the user to directly input or drop-down selection to determine the camera parameters for photography. Those skilled in the art can set the implementation manner of step S11 and step S12 according to actual needs, which is not limited in this application.
在步骤S13中,根据所述被选中相机在所述第一设备中的第一相机标识和所述目标任务生成第一任务命令。In step S13, a first task command is generated according to the first camera identifier of the selected camera in the first device and the target task.
在本实施例中,所生成的第一任务命令中包括被选中相机需要执行的目标任务以及第一相机标识。第一相机标识中包括第一映射关系级别和第一身份标识,第一映射关系级别可以用于表示被选中相机与其对应的第一虚拟相机之间的映射关系,或者说表示被选中相机与第一设备之间的映射关系。第一身份标识可以用于表示被选中相机在第一设备中对应于第一映射关系级别的已有相机之间的区别。本领域技术人员可以根据实际需要对映射关系级别、身 份标识的方式进行设置,本申请对此不作限制。这样,通过第一身份标识可以区分第一设备所能控制的不同相机,也保证了第一任务命令的准确送达。In this embodiment, the generated first task command includes the target task to be performed by the selected camera and the first camera identifier. The first camera identifier includes a first mapping relationship level and a first identity identifier, and the first mapping relationship level can be used to represent the mapping relationship between the selected camera and its corresponding first virtual camera, or to represent the selected camera and the first virtual camera. A mapping relationship between devices. The first identity identifier may be used to represent the difference between the selected camera and the existing cameras corresponding to the first mapping relationship level in the first device. Those skilled in the art can set the mapping relationship level and the way of identity identification according to actual needs, which is not limited in this application. In this way, different cameras that can be controlled by the first device can be distinguished by the first identity identifier, and the accurate delivery of the first task command is also ensured.
在步骤S14中,将所述第一任务命令发送至所述被选中相机,以使所述被选中相机根据所述第一任务命令控制执行所述目标任务。In step S14, the first task command is sent to the selected camera, so that the selected camera is controlled to execute the target task according to the first task command.
在一种可能的实现方式中,步骤S14可以包括以下操作一、操作二、操作三中至少一项操作:In a possible implementation manner, step S14 may include at least one of the following operation 1, operation 2, and operation 3:
操作一,在所述被选中相机包括所述第一设备的本地相机时,向所述第一设备的本地相机发送所述第一任务命令,以使所述第一设备的本地相机执行所述第一任务命令所指示的目标任务。例如,如图4所示,第一设备A可以直接将第一任务命令发送至其自身的本地设备100。Operation 1: when the selected camera includes the local camera of the first device, send the first task command to the local camera of the first device, so that the local camera of the first device executes the The target task indicated by the first task command. For example, as shown in FIG. 4 , the first device A may directly send the first task command to its own local device 100 .
操作三,在所述被选中相机包括第一虚拟相机所映射的第二设备的本地相机、且所述被选中相机与所述被选中相机所对应的第一虚拟相机之间为一级映射关系时,通过所述第一设备中与所述被选中相机对应的第一虚拟相机将所述第一任务命令转发至所述第二设备的本地相机,以使所述第二设备的本地相机执行所述第一任务命令所指示的目标任务。例如,如图4所示,第一设备A可以控制第一虚拟相机201向“设备B1的本地相机”中发送第一任务命令。Operation 3: The selected camera includes the local camera of the second device mapped by the first virtual camera, and there is a first-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera when the first task command is forwarded to the local camera of the second device through the first virtual camera corresponding to the selected camera in the first device, so that the local camera of the second device executes The target task indicated by the first task command. For example, as shown in FIG. 4 , the first device A may control the first virtual camera 201 to send the first task command to the “local camera of device B1”.
操作三,在所述被选中相机包括第一虚拟相机所映射的第二设备的本地相机、且所述被选中相机与所述被选中相机所对应的第一虚拟相机之间为多级映射关系时,根据所述被选中相机与对应的第一虚拟相机之间的第一映射关系级别,确定出完成所述第一任务命令转发的至少一个中间设备,依次通过每个中间设备中对应于所述被选中相机的虚拟相机将所述第一任务命令转发至所述第二设备的本地相机,以使所述第二设备的本地相机执行所述第一任务命令所指示的目标任务。其中,中间设备在进行第一任务命令的转发以及进行下文所述目标任务数据、命令结果的转发的过程中,可以采用透传的方式直接进行转发,也可以按照预先设定的加密方式加密后进行转发,本申请对此不作限制。例如,如图4所示,第一设备A可以控制第一虚拟相机202将第一任务命令发送至“设备C1的第二虚拟相机301”,设备C1的第二虚拟相机301再将第一任务命令转发至“设备B2的本地设备”,在这一过程中中间设备即为设备C1。第一设备A可以控制第一虚拟相机203将第一任务命令发送至“设备C2的第二虚拟相机302”,设备C2的第二虚拟相机302再将第一任务命令转发至“设备C3的第三虚拟相机400”,设备C3的第三虚拟相机400…直至将第一任务命令发送至设备B2的本地设备,在这一过程中中间设备即为设备C2、设备C3…。这样,可以借助至少一个中间设备将第一任务命令转发至被选中相机,实现对与第一设备处于不同局域网中的设备的本地相机的控制。Operation 3: The selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a multi-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera At least one intermediate device that completes the forwarding of the first task command is determined according to the first mapping relationship level between the selected camera and the corresponding first virtual camera, and sequentially passes through the corresponding intermediate devices in each intermediate device. The virtual camera of the selected camera forwards the first task command to the local camera of the second device, so that the local camera of the second device executes the target task indicated by the first task command. Wherein, in the process of forwarding the first task command and forwarding the target task data and command results described below, the intermediate device may directly forward it in a transparent transmission manner, or may encrypt it according to a preset encryption method. Forwarding is not limited in this application. For example, as shown in FIG. 4 , the first device A can control the first virtual camera 202 to send the first task command to "the second virtual camera 301 of the device C1", and the second virtual camera 301 of the device C1 will then send the first task command to the "second virtual camera 301 of the device C1". The command is forwarded to the "local device of device B2", and the intermediate device is device C1 in this process. The first device A can control the first virtual camera 203 to send the first task command to the "second virtual camera 302 of the device C2", and the second virtual camera 302 of the device C2 forwards the first task command to the "second virtual camera 302 of the device C3". Three virtual cameras 400 ″, the third virtual camera 400 of device C3 . . . until the first task command is sent to the local device of device B2, in this process, the intermediate devices are device C2, device C3 . . . In this way, the first task command can be forwarded to the selected camera by means of at least one intermediate device, so as to realize the control of the local camera of the device in a different local area network from the first device.
在一种可能的实现方式中,在被选中相机在同一时间段需要执行相互冲突的、来自不同设备的不同目标任务,可以按照发出目标任务的设备的优先级不同选择优先级在前的设备的目标任务执行。或者,随机选择多个目标任务中的一个执行。或者,为避免出现“被选中相机在同一时间段需要执行相互冲突的、来自不同设备的不同目标任务”,被选中相机所在的设备可以在授权许可时,控制其所能控制的每个相机仅授权给唯一一个设备通过虚拟相机控制。In a possible implementation manner, when the selected camera needs to perform different target tasks from different devices that conflict with each other in the same time period, the device with the highest priority can be selected according to the priority of the device sending the target task. target task execution. Alternatively, randomly select one of multiple target tasks for execution. Or, in order to avoid the occurrence of "the selected camera needs to perform conflicting target tasks from different devices at the same time", the device where the selected camera is located can control each camera it can control only when it is authorized. License to only one device to control via virtual camera.
图6示出根据本申请一实施例的基于分布式控制的相机控制方法的流程图。在一种可能的实现方式中,如图6所示,该方法还可以包括“虚拟相机创建步骤”步骤S15至步骤S18。 其中,“虚拟相机创建步骤”可以在步骤S11之前执行(如图6所示),也可以在步骤S11之后执行(图中未示出)。在下述第三设备与上述第二设备为同一设备时,“虚拟相机创建步骤”可以在步骤S11之前执行。在下述第三设备与上述第二设备为不同设备时,“虚拟相机创建步骤”可以在步骤S11之前、之后、或与步骤S11同时执行,本申请对此不作限制。通过“虚拟相机创建步骤”创建了能够控制授权相机的第一虚拟相机。FIG. 6 shows a flowchart of a camera control method based on distributed control according to an embodiment of the present application. In a possible implementation manner, as shown in FIG. 6 , the method may further include steps S15 to S18 of a “virtual camera creation step”. The "virtual camera creation step" may be performed before step S11 (as shown in FIG. 6 ), or may be performed after step S11 (not shown in the figure). When the third device described below is the same device as the second device described above, the "virtual camera creation step" may be performed before step S11. When the following third device is different from the above-mentioned second device, the "virtual camera creation step" may be performed before, after, or simultaneously with step S11 , which is not limited in this application. A first virtual camera capable of controlling an authorized camera is created through the "virtual camera creation step".
在步骤S15中,在检测到设备连接请求时,查找能够与所述第一设备连接且满足连接条件的第三设备,所述连接条件可以包括:所述第三设备设置有本地相机和/或所述第三设备中创建有至少一个第二虚拟相机。其中,每个第二虚拟相机用于实现对第二虚拟相机所映射的第四设备的本地相机的控制,所述第二虚拟相机与所映射的第四设备的本地相机与之间存在至少一级映射关系。连接条件的设置可以保证所确定的第三设备中存在能够被第一设备通过创建虚拟相机进行控制。其中,第三设备可以是手机、无人机等任意设备,本申请对此不作制。In step S15, when a device connection request is detected, a third device that can be connected to the first device and satisfies a connection condition is searched for, and the connection condition may include: the third device is provided with a local camera and/or At least one second virtual camera is created in the third device. Wherein, each second virtual camera is used to control the local camera of the fourth device mapped by the second virtual camera, and there is at least one connection between the second virtual camera and the mapped local camera of the fourth device. level mapping. The setting of the connection conditions can ensure that the existence of the determined third device can be controlled by the first device by creating a virtual camera. Wherein, the third device may be any device such as a mobile phone, a drone, etc., which is not made in this application.
例如,如图4所示,假定第一设备A查找后确定出的满足连接条件的第三设备即为设备B1和设备C1。而后第一设备A可以访问第三设备确定出每个第三设备中所能控制的相机。如,可以通过访问确定出设备B1仅能控制自身的本地相机、设备C1能控制自身的本地相机和第二虚拟相机301所映射的设备B2的本地相机。For example, as shown in FIG. 4 , it is assumed that the third devices that satisfy the connection condition determined by the first device A after searching are the device B1 and the device C1 . Then the first device A can access the third device to determine the cameras that can be controlled in each third device. For example, it can be determined through the access that the device B1 can only control its own local camera, the device C1 can control its own local camera, and the local camera of the device B2 mapped by the second virtual camera 301 .
在步骤S16中,向所述第三设备发出第一授权控制请求,并接收所述第三设备响应于所述第一授权控制请求返回的第一授权指示。In step S16, a first authorization control request is sent to the third device, and a first authorization indication returned by the third device in response to the first authorization control request is received.
在一种可能的实现方式中,步骤S16可以包括:根据针对所述第三设备能够控制的所述第三设备的本地相机和/或所述第二虚拟相机所映射的第四设备的本地相机的请求操作,选择出第一请求相机;根据所述第一请求相机生成所述第一授权控制请求,并将所述第一授权控制请求发送至所述第三设备,以使所述第三设备根据检测到的针对所述第一授权控制请求的授权操作生成所述第一授权指示。这样,可以根据用户的需要选择出第一请求相机,满足不同用户的授权控制需求。In a possible implementation manner, step S16 may include: according to the local camera of the third device that can be controlled by the third device and/or the local camera of the fourth device mapped by the second virtual camera select the first requesting camera; generate the first authorization control request according to the first requesting camera, and send the first authorization control request to the third device, so that the third The device generates the first authorization indication according to the detected authorization operation for the first authorization control request. In this way, the first request camera can be selected according to the needs of the user, so as to meet the authorization control requirements of different users.
在该实现方式中,可以参照图5中界面T1的显示方式在第一设备的显示屏中显示第一设备所能连接到的第三设备以及第三设备所能控制的相机的信息。进而根据检测到的点击等操作(也即请求操作)确定出用户所要连接的第三设备以及需要连接第三设备所能控制的第一请求相机,进而生成第一授权控制请求,并将第一授权控制请求发送至对应的第三设备。第三设备接收到的第一授权控制请求后根据用户的授权操作生成第一授权指示(此过程可以参考下文第一设备响应于第二授权控制请求的实现过程和方式)。还可以对用户发出的语音进行识别,根据识别结果确定出用户所要连接的第三设备以及需要连接第三设备所能控制的第一请求相机。还可以通过语音的方式将第三设备以及第三设备所能控制的相机的信息播放给用户,进而根据用户响应所发出的语音确定出用户所要连接的第三设备以及需要连接第三设备所能控制的第一请求相机。本领域技术人员可以根据实际需要对根据请求操作生成第一授权控制请求的方式进行设置,本申请对此不作限制。In this implementation manner, information about the third device that the first device can connect to and the camera that the third device can control can be displayed on the display screen of the first device with reference to the display mode of the interface T1 in FIG. 5 . Then, the third device to be connected by the user and the first request camera to be controlled by the third device are determined according to the detected click and other operations (that is, the request operation), and the first authorization control request is generated, and the first authorization control request is generated. The authorization control request is sent to the corresponding third device. After the third device receives the first authorization control request, it generates the first authorization indication according to the user's authorization operation (for this process, refer to the implementation process and manner of the first device responding to the second authorization control request below). The voice issued by the user can also be recognized, and the third device to be connected by the user and the first request camera controlled by the third device to be connected are determined according to the recognition result. The information of the third device and the cameras that can be controlled by the third device can also be played to the user by voice, and then the third device to be connected by the user and the capabilities of the third device that needs to be connected can be determined according to the voice sent by the user's response. The first request to control the camera. Those skilled in the art can set the manner of generating the first authorization control request according to the request operation according to actual needs, which is not limited in this application.
在一种可能的实现方式中,还可以在确定出第三设备之后,直接向检测到的每个第三设备发出针对其控制的每个相机的第一授权控制请求,无需根据基于用户的请求操作生成第一授权控制请求。这样,可以简化用户的操作,提高创建虚拟相机的速度,简化创建过程中用户所需进行的操作。In a possible implementation manner, after the third device is determined, a first authorization control request for each camera controlled by the detected third device may be sent directly to each detected third device, without requiring user-based requests The operation generates a first authorization control request. In this way, the operation of the user can be simplified, the speed of creating the virtual camera can be improved, and the operations required by the user during the creation process can be simplified.
在步骤S17中,在根据所述第一授权指示确定出被授权的第一授权相机后,获取所述第一授权相机在所述第三设备中的第二相机标识,所述第一授权相机包括所述第三设备的本地相机和/或所述第二虚拟相机所映射的第四设备的本地相机。In step S17, after determining the authorized first authorized camera according to the first authorization instruction, obtain the second camera identification of the first authorized camera in the third device, the first authorized camera Including the local camera of the third device and/or the local camera of the fourth device mapped by the second virtual camera.
在该实现方式中,第一授权相机在所述第三设备中的第二相机标识也包括映射关系级别和身份标识,其所表示的含义参见上文第一映射关系级别和第一身份标识的描述,此处不再赘述。In this implementation manner, the second camera identification of the first authorized camera in the third device also includes a mapping relationship level and an identification identification, and the meanings indicated by the first authorized camera are referred to above in the first mapping relationship level and the first identification identification. description, which will not be repeated here.
在步骤S18中,根据所述第二相机标识确定出所述第一授权相机在所述第一设备中的第一相机标识,并根据所述第一授权相机的第一相机标识创建用于控制所述第一授权相机的第一虚拟相机。In step S18, a first camera identification of the first authorized camera in the first device is determined according to the second camera identification, and a first camera identification for controlling the first authorized camera is created according to the first camera identification of the first authorized camera A first virtual camera of the first authorized camera.
在一种可能的实现方式中,步骤S18可以包括:在所述第一授权相机包括第二虚拟相机所映射的第四设备的本地相机时,根据所述第二相机标识中的指示所述第一授权相机与所述第二虚拟相机之间的映射关系的映射关系级别,确定出所述第一授权相机与需要创建的控制所述第一授权相机的第一虚拟相机之间的第一映射关系级别;根据所述第二相机标识中的身份标识、所述第一设备中对应于所述第一映射关系级别的已有相机的身份标识,确定出所述第一授权相机在所述第一设备中的第一身份标识;根据所述第一映射关系级别和所述第一身份标识确定出所述第一授权相机在所述第一设备中的第一相机标识,并根据所述第一相机标识创建出用于控制所述第一授权相机的第一虚拟相机。这样,在创建出第一虚拟相机后,第一设备可以根据第一虚拟相机的第一相机标识和第一映射关系级别直接确定出第一设备与第一授权相机之间的映射关系级别,便于进行命令的发送和数据的接收。In a possible implementation manner, step S18 may include: when the first authorized camera includes the local camera of the fourth device mapped by the second virtual camera, according to the indication in the second camera identifier, the first authorized camera A mapping relationship level of the mapping relationship between the authorized camera and the second virtual camera, to determine the first mapping between the first authorized camera and the first virtual camera that needs to be created to control the first authorized camera relationship level; it is determined that the first authorized camera is in the A first identity identifier in a device; determine the first camera identifier of the first authorized camera in the first device according to the first mapping relationship level and the first identity identifier, and determine the first camera identifier of the first authorized camera in the first device according to the first A camera identification creates a first virtual camera for controlling the first authorized camera. In this way, after the first virtual camera is created, the first device can directly determine the mapping relationship level between the first device and the first authorized camera according to the first camera identification of the first virtual camera and the first mapping relationship level, which is convenient for Send commands and receive data.
在一种可能的实现方式中,根据所述第二相机标识中的身份标识、所述第一设备中对应于所述第一映射关系级别的已有相机的身份标识,确定出所述第一授权相机在所述第一设备中的第一身份标识,可以包括:在所述第一设备中对应于所述第一映射关系级别的已有相机的身份标识中,已存在所述第二相机标识中的身份标识时,按照预设身份标识创建规则创建出所述第一授权相机在所述第一设备中的第一身份标识;或者在所述第二相机标识中的身份标识,与所述第一设备中对应于所述第一映射关系级别的,已有相机的身份标识不同时,将所述第二相机标识中的身份标识确定为所述第一授权相机在所述第一设备中的第一身份标识。这样,可以保证第一授权相机的第一身份标识,在第一设备所能控制的对应于第一映射关系级别的全部相机的身份标识中的唯一性,以便于进行第一设备所能控制的同一映射关系级别的相机的区分。In a possible implementation manner, the first camera is determined according to the identification in the second camera identification and the identification of the existing camera in the first device corresponding to the first mapping relationship level. Authorizing the first identity of the camera in the first device may include: in the identity of the existing camera corresponding to the first mapping relationship level in the first device, the second camera already exists When identifying the identity in the identity, the first identity of the first authorized camera in the first device is created according to the preset identity creation rule; or the identity of the second camera is the same as the When the identities of the existing cameras corresponding to the first mapping relationship level in the first device are different, determine the identity in the second camera identity as the first authorized camera in the first device. The first identity in . In this way, the uniqueness of the first identification of the first authorized camera among the identifications of all cameras corresponding to the first mapping relationship level that the first device can control can be ensured, so as to facilitate the control of the first device. The distinction between cameras at the same mapping level.
在一种可能的实现方式中,步骤S18还可以包括:In a possible implementation manner, step S18 may further include:
在所述第一授权相机包括所述第三设备的本地相机时,将一级映射关系确定为所述第一授权相机与需要创建的控制所述第一授权相机的第一虚拟相机之间的第一映射关系级别。When the first authorized camera includes a local camera of the third device, a first-level mapping relationship is determined as a first-level mapping relationship between the first authorized camera and a first virtual camera that needs to be created to control the first authorized camera The first mapping relationship level.
在该实现方式中,第一映射关系级别可以通过将“第二相机标识中的指示所述第一授权相机与所述第二虚拟相机之间的映射关系的映射关系级别”增加一个级别得到。不同映射关系级别可以使用不同的数字、字母等字符表示区分,同一映射关系级别的不同相机的身份标识可以通过相机不同的数字、字母等字符表示区分,也可以利用相机在其所在的设备中的身份标识进行区分。In this implementation manner, the first mapping relationship level can be obtained by adding one level to "the mapping relationship level in the second camera identifier indicating the mapping relationship between the first authorized camera and the second virtual camera". Different mapping relationship levels can be distinguished by different numbers, letters and other characters. The identity of different cameras at the same mapping relationship level can be distinguished by different numbers, letters and other characters of the camera. identity identification.
举例来说,参照图4中的第一设备A,假定在设备B1中其本地相机的身份标识为“2”,在设备C1中其本地相机的身份标识为“2”,在设备B2中其本地相机的身份标识为“1”,在 第一设备A中其本地相机的身份标识为“3”。零级映射关系、一级映射关系、二级映射关系…,分别用于0000、1000、2000…来表示。则,For example, referring to the first device A in FIG. 4, it is assumed that the identity of its local camera is "2" in device B1, the identity of its local camera is "2" in device C1, and its local camera is identified as "2" in device B2. The identity of the local camera is "1", and the identity of the local camera in the first device A is "3". The zero-level mapping relationship, the first-level mapping relationship, the second-level mapping relationship... are represented by 0000, 1000, 2000... respectively. but,
在设备B1中,其本地相机的相机标识可以为0002。In device B1, the camera ID of its local camera may be 0002.
在设备B2中,其本地相机的相机标识可以为0001。In device B2, the camera ID of its local camera may be 0001.
在设备C1中,其本地相机的相机标识可以为0002、第二虚拟相机301所映射的设备B2的本地相机的相机标识可以为1001。In the device C1, the camera identifier of its local camera may be 0002, and the camera identifier of the local camera of the device B2 mapped by the second virtual camera 301 may be 1001.
在第一设备A中,由于没有身份标识重用,其本地相机的第一身份标识为0003,设备C1的本地相机的第一身份标识可以为1002,设备B2的本地相机的第一身份标识为2001。而由于设备B1的本地相机的身份标识“0002中的2”已经被设备C1的本地相机占用,则可以调整设备B1的本地相机身份标识如将“2”调整为“4”,设备B1的本地相机的第一身份标识为1004。In the first device A, since there is no identity reuse, the first identity of its local camera is 0003, the first identity of the local camera of device C1 can be 1002, and the first identity of the local camera of device B2 is 2001 . However, since the local camera ID of device B1 "2 in 0002" has been occupied by the local camera of device C1, the local camera ID of device B1 can be adjusted. The first identity of the camera is 1004.
在一种可能的实现方式中,该方法还可以包括:在接收到所述被选中相机接收所述第一任务命令后返回的命令结果时,可以根据命令结果确定被选中相机是否成功执行目标任务、是否接收到第一任务命令等信息。其中,接收所述命令结果可以包括以下至少一种方式:In a possible implementation manner, the method may further include: when receiving a command result returned by the selected camera after receiving the first task command, determining whether the selected camera successfully performs the target task according to the command result , whether to receive the first task command and other information. Wherein, receiving the command result may include at least one of the following ways:
在所述被选中相机包括所述第一设备的本地相机时,直接接收来自所述第一设备的本地相机发出的命令结果;When the selected camera includes the local camera of the first device, directly receiving a command result from the local camera of the first device;
在所述被选中相机包括第一虚拟相机所映射的第二设备的本地相机、且所述被选中相机与所述被选中相机所对应的第一虚拟相机之间为一级映射关系时,利用所述被选中相机所对应的第一虚拟相机直接接收所述第二设备的本地相机发出的命令结果;When the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a first-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, use The first virtual camera corresponding to the selected camera directly receives the command result sent by the local camera of the second device;
在所述被选中相机包括第一虚拟相机所映射的第二设备的本地相机、且所述被选中相机与所述被选中相机所对应的第一虚拟相机之间为多级映射关系时,利用所述被选中相机所对应的第一虚拟相机接收依次经过第二设备的本地相机发出、至少一个中间设备转发的命令结果。When the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a multi-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, use The first virtual camera corresponding to the selected camera receives the command result sent by the local camera of the second device in sequence and forwarded by at least one intermediate device.
在一种可能的实现方式中,该方法还可以包括:在接收到所述被选中相机执行所述目标任务得到的目标任务数据时,根据所述目标任务数据进行图像和/或视频展示。第一设备除了进行图像和/或视频的展示还可以存储目标任务数据。In a possible implementation manner, the method may further include: when receiving target task data obtained by the selected camera performing the target task, performing image and/or video presentation according to the target task data. In addition to displaying images and/or videos, the first device may also store target task data.
其中,接收所述目标任务数据包括以下至少一种方式:Wherein, receiving the target task data includes at least one of the following ways:
在所述被选中相机包括所述第一设备的本地相机时,直接接收来自所述第一设备的本地相机发出的目标任务数据;When the selected camera includes the local camera of the first device, directly receiving target task data sent from the local camera of the first device;
在所述被选中相机包括第一虚拟相机所映射的第二设备的本地相机、且所述被选中相机与所述被选中相机所对应的第一虚拟相机之间为一级映射关系时,利用所述被选中相机所对应的第一虚拟相机直接接收所述第二设备的本地相机发出的目标任务数据;When the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a first-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, use The first virtual camera corresponding to the selected camera directly receives the target task data sent by the local camera of the second device;
在所述被选中相机包括第一虚拟相机所映射的第二设备的本地相机、且所述被选中相机与所述被选中相机所对应的第一虚拟相机之间为多级映射关系时,利用所述被选中相机所对应的第一虚拟相机接收依次经过第二设备的本地相机发出、至少一个中间设备转发的目标任务数据。When the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a multi-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, use The first virtual camera corresponding to the selected camera receives the target task data sequentially sent by the local camera of the second device and forwarded by at least one intermediate device.
在一种可能的实现方式中,所述方法还可以包括:In a possible implementation, the method may further include:
在接收到来自第五设备的第二授权控制请求时,根据所述第二授权控制请求中的第二请求相机展示授权提示;When receiving the second authorization control request from the fifth device, the camera displays an authorization prompt according to the second request in the second authorization control request;
根据检测到的针对所述第二请求相机的授权操作,确定出授权的第二授权相机;determining an authorized second authorized camera according to the detected authorization operation for the second requested camera;
根据所述第二授权相机在所述第一设备中的第一相机标识生成第二授权指示,并将所述第二授权指示发送至所述第五设备,以使所述第五设备根据所述第二授权指示创建用于控制所述第二授权相机的虚拟相机。A second authorization instruction is generated according to the first camera identification of the second authorized camera in the first device, and the second authorization instruction is sent to the fifth device, so that the fifth device The second authorization instruction creates a virtual camera for controlling the second authorized camera.
这样,使得第一设备直接根据用户发出的命令控制其本地相机和设置的第一虚拟相机所映射的第二设备的本地相机的同时,还可以与第五设备建立控制关系,被第五设备控制。其中,第五设备可以本身设置有本地相机,也可以没有本地相机。In this way, the first device can directly control its local camera and the local camera of the second device mapped by the set first virtual camera according to the command issued by the user, and can also establish a control relationship with the fifth device and be controlled by the fifth device. . Wherein, the fifth device may itself be provided with a local camera, or may not have a local camera.
举例来说,图7示出根据本申请一实施例的选择授权相机示意图。如图7所示,假定第二授权控制请求中的第二请求相机为图4中的第一设备A的本地相机100、第一虚拟相机201所映射到的设备B1的本地相机、第一虚拟相机202所映射到的设备B2的本地相机、第一虚拟相机203所映射到的设备B3的本地相机,则可以在第一设备A的显示屏中显示界面T4,根据检测到的每个第二请求相机的选择控件K的点击、滑动等触发操作确定出被用户授权的第二授权相机如第一虚拟相机201所映射到的设备B1的本地相机。而后第一设备A可以根据第一虚拟相机201所映射到的设备B1的本地相机在第一设备A中的第一相机标识生成第二授权指示并发送至第五设备D,以使得第五设备D根据所述第二授权指示创建用于控制所述第二授权相机的虚拟相机401(可以参考上文步骤S17和步骤S18的实现过程)。For example, FIG. 7 shows a schematic diagram of selecting an authorized camera according to an embodiment of the present application. As shown in FIG. 7 , it is assumed that the second requested camera in the second authorization control request is the local camera 100 of the first device A, the local camera of the device B1 to which the first virtual camera 201 is mapped, and the first virtual camera in FIG. 4 The local camera of the device B2 to which the camera 202 is mapped, and the local camera of the device B3 to which the first virtual camera 203 is mapped, the interface T4 may be displayed on the display screen of the first device A, according to each detected second Trigger operations such as clicking, sliding, etc. of the selection control K of the requesting camera determine the second authorized camera authorized by the user, such as the local camera of the device B1 to which the first virtual camera 201 is mapped. Then the first device A can generate a second authorization instruction according to the first camera identifier of the local camera of the device B1 to which the first virtual camera 201 is mapped in the first device A and send it to the fifth device D, so that the fifth device D creates a virtual camera 401 for controlling the second authorized camera according to the second authorization instruction (refer to the implementation process of steps S17 and S18 above).
图8示出根据本申请一实施例的基于分布式控制的相机控制方法的实现过程示意图。如图8所示,示出了第一设备A通过中间设备C1对第二设备B2的本地相机进行控制的过程,其中,FIG. 8 shows a schematic diagram of an implementation process of a camera control method based on distributed control according to an embodiment of the present application. As shown in FIG. 8, it shows the process that the first device A controls the local camera of the second device B2 through the intermediate device C1, wherein,
第一任务命令下发过程中:In the process of issuing the first task command:
第一设备A的应用层中“相机应用”检测用户发出的针对预览任务、拍照任务和摄像任务的任务设置操作,进而第一设备A的服务层中的“相机服务”模块根据检测到的任务设备操作生成摄像命令1(下文及图中也称命令1)、拍照命令2(下文及图中也称命令2)、预览命令3(下文及图中也称命令3),各命令中携带了执行任务所需的任务参数(确定命令及任务参数的过程参见上文,此处不再赘述)。其中,摄像命令1、拍照命令2、预览命令3的生成时间或者说用户发出这三个命令的时间是相同或不同的,图8中为示出三种不同任务类型的目标任务的下发过程,将三个命令均示出,但实际上三个命令的下发时间彼此不影响。第一设备A的HAL层(硬件抽象层,英文Hardware Abstraction Layer)中的虚拟相机HAL中的虚拟相机设备(也即图4中的第二虚拟相机301)将“命令1、命令2和/或命令3”发送到第一设备A的服务层中的“分布式设备虚拟化平台服务”,第一设备A的“分布式设备虚拟化平台服务”通过自身的透传管道以透传方式将“命令1、命令2和/或命令3”发送到中间设备C1中。The "camera application" in the application layer of the first device A detects the task setting operations issued by the user for the preview task, the photographing task and the camera task, and then the "camera service" module in the service layer of the first device A is based on the detected task. The device operation generates camera command 1 (also referred to as command 1 in the following and in the figure), photographing command 2 (also referred to as command 2 in the following and in the figure), and preview command 3 (also referred to as command 3 in the following and in the figure). Task parameters required to execute the task (for the process of determining the command and task parameters, refer to the above, and will not be repeated here). Among them, the generation time of the camera command 1, the camera command 2, and the preview command 3 or the time when the user issues these three commands is the same or different, and FIG. 8 shows the issuing process of the target tasks of three different task types. , all three commands are shown, but in fact, the issuing times of the three commands do not affect each other. The virtual camera device (that is, the second virtual camera 301 in FIG. 4 ) in the virtual camera HAL in the HAL layer (Hardware Abstraction Layer, English Hardware Abstraction Layer) of the first device A converts “command 1, command 2 and/or Command 3" is sent to the "Distributed Device Virtualization Platform Service" in the service layer of the first device A. The "Distributed Device Virtualization Platform Service" of the first device A transparently transmits the "Distributed Device Virtualization Platform Service" through its own transparent transmission pipeline. Command 1, Command 2 and/or Command 3" are sent to the intermediate device C1.
中间设备C1应用层中的“多设备虚拟化模块”接收并通过透传管道采用透传的方式将“命令1、命令2和/或命令3”发送至自身服务层的“分布式设备虚拟化平台服务”。“分布式设备虚拟化平台服务”同样通过透传管道采用透传的方式将“命令1、命令2和/或命令3”发送至第二设备B2。The "multi-device virtualization module" in the application layer of the middle device C1 receives and transmits "command 1, command 2 and/or command 3" to the "distributed device virtualization module" of its own service layer through the transparent transmission pipeline. Platform Services". The "distributed device virtualization platform service" also sends "command 1, command 2 and/or command 3" to the second device B2 in a transparent transmission manner through a transparent transmission channel.
第二设备B2应用层的“多设备虚拟化模块”通过透传管道接收到“命令1、命令2和/或命令3”,而后将“命令1、命令2和/或命令3”发送至服务层的“相机服务”。“相机服务”根据“命令1、命令2和/或命令3”向其相机设备(也即图4中所示的B2的本地相机)发出 所需执行的具体目标任务,使得相机设备可以控制相机硬件的传感器进行拍摄、摄像、取景预览等具体操作,并通过相机硬件的图像信号处理器ISP(Image Signal Processing)对传感器采集到的数据进行处理,生成目标任务数据。其中,目标任务数据可以包括命令1所对应的数据、命令2所对应的数据和/或命令3所对应的数据。The "multi-device virtualization module" of the application layer of the second device B2 receives "command 1, command 2 and/or command 3" through the transparent transmission pipeline, and then sends "command 1, command 2 and/or command 3" to the service Layer "Camera Service". The "Camera Service" issues specific target tasks to be performed to its camera device (ie, the local camera of B2 shown in Figure 4) according to "Command 1, Command 2 and/or Command 3", so that the camera device can control the camera The sensor of the hardware performs specific operations such as shooting, videography, framing preview, etc., and processes the data collected by the sensor through the image signal processor ISP (Image Signal Processing) of the camera hardware to generate target task data. The target task data may include data corresponding to command 1, data corresponding to command 2, and/or data corresponding to command 3.
目标任务数据上传过程中:During the upload of target task data:
第二设备B2的相“相机设备”将不同任务类型的目标任务数据分别发送至其“相机服务”的对应缓冲区中,而后第二设备B2的“多设备虚拟化模块”将目标任务数据调回,并通过透传管道以透传的方式将目标任务数据发送至中间设备的“分布式设备虚拟化平台服务”。The "camera device" of the second device B2 sends the target task data of different task types to the corresponding buffers of its "camera service" respectively, and then the "multi-device virtualization module" of the second device B2 transfers the target task data to and send the target task data to the "Distributed Device Virtualization Platform Service" of the intermediate device through the transparent transmission pipeline.
中间设备C1的“分布式设备虚拟化平台服务”通过透传管道接收到目标任务数据之后,通过中间设备C1的“多设备虚拟化模块”的透传管道以透传的方式将目标任务数据发送至第一设备A。After the "Distributed Device Virtualization Platform Service" of the intermediate device C1 receives the target task data through the transparent transmission pipeline, it sends the target task data in a transparent transmission manner through the transparent transmission pipeline of the "Multi-device Virtualization Module" of the intermediate device C1. to the first device A.
第一设备A的“分布式设备虚拟化平台服务”通过自身的透传管道接收到目标任务数据,并对目标任务数据进行处理,确定其是对应哪一任务类型的数据,并将对应不同任务类型的目标任务数据发送至第一设备A的服务层中的“相机服务”的对应缓冲区中,以使得第一设备A的“相机应用”可以在确定对应缓存区存储有目标任务数据、和/或接收到用户的显示指示时,进行预览显示、照片显示和/或视频显示。The "distributed device virtualization platform service" of the first device A receives the target task data through its own transparent transmission pipeline, and processes the target task data to determine which task type data it corresponds to, and will correspond to different tasks. The type of target task data is sent to the corresponding buffer area of the "camera service" in the service layer of the first device A, so that the "camera application" of the first device A can determine that the corresponding buffer area stores the target task data, and /or upon receiving a user's display instruction, perform preview display, photo display and/or video display.
通过上述方式,利用一个第一设备A就实现了对与其不再同一局域网络的第二设备B2的本地相机的控制。In the above manner, the control of the local camera of the second device B2 which is no longer in the same local area network is realized by using one first device A.
本申请的实施例提供了一种终端设备,包括:本地相机;第一虚拟相机;处理器以及用于存储处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令时实现上述基于分布式控制的相机控制方法。An embodiment of the present application provides a terminal device, including: a local camera; a first virtual camera; a processor and a memory for storing instructions executable by the processor; wherein, when the processor is configured to execute the instructions The above distributed control-based camera control method is implemented.
本申请的实施例提供了一种非易失性计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。Embodiments of the present application provide a non-volatile computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, implement the above method.
本申请的实施例提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述方法。Embodiments of the present application provide a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in a processor of an electronic device When running in the electronic device, the processor in the electronic device executes the above method.
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是――但不限于――电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(Random Access Memory,RAM)、只读存储器(Read Only Memory,ROM)、可擦式可编程只读存储器(Electrically Programmable Read-Only-Memory,EPROM或闪存)、静态随机存取存储器(Static Random-Access Memory,SRAM)、便携式压缩盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能盘(Digital Video Disc,DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。A computer-readable storage medium may be a tangible device that can hold and store instructions for use by the instruction execution device. The computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read-only memory (Electrically Programmable Read-Only-Memory, EPROM or flash memory), static random access memory (Static Random-Access Memory, SRAM), portable compact disk read-only memory (Compact Disc Read-Only Memory, CD - ROM), Digital Video Disc (DVD), memory sticks, floppy disks, mechanically encoded devices, such as punch cards or raised structures in grooves on which instructions are stored, and any suitable combination of the foregoing .
这里所描述的计算机可读程序指令或代码可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计 算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。Computer readable program instructions or code described herein may be downloaded to various computing/processing devices from a computer readable storage medium, or to an external computer or external storage device over a network such as the Internet, a local area network, a wide area network and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer-readable program instructions from a network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
用于执行本申请操作的计算机程序指令可以是汇编指令、指令集架构(Instruction Set Architecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(Local Area Network,LAN)或广域网(Wide Area Network,WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或可编程逻辑阵列(Programmable Logic Array,PLA),该电子电路可以执行计算机可读程序指令,从而实现本申请的各个方面。The computer program instructions used to perform the operations of the present application may be assembly instructions, Instruction Set Architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in one or more source or object code written in any combination of programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or, may be connected to an external computer (eg, use an internet service provider to connect via the internet). In some embodiments, electronic circuits, such as programmable logic circuits, Field-Programmable Gate Arrays (FPGA), or Programmable Logic Arrays (Programmable Logic Arrays), are personalized by utilizing state information of computer-readable program instructions. Logic Array, PLA), the electronic circuit can execute computer readable program instructions to implement various aspects of the present application.
这里参照根据本申请实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图描述了本申请的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。Aspects of the present application are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present application. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer or other programmable data processing apparatus to produce a machine that causes the instructions when executed by the processor of the computer or other programmable data processing apparatus , resulting in means for implementing the functions/acts specified in one or more blocks of the flowchart and/or block diagrams. These computer readable program instructions can also be stored in a computer readable storage medium, these instructions cause a computer, programmable data processing apparatus and/or other equipment to operate in a specific manner, so that the computer readable medium on which the instructions are stored includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。Computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other equipment to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process , thereby causing instructions executing on a computer, other programmable data processing apparatus, or other device to implement the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
附图中的流程图和框图显示了根据本申请的多个实施例的装置、系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,所述模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of apparatuses, systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more functions for implementing the specified logical function(s) executable instructions. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行相应的功能或动作的硬件(例如电路或ASIC(Application Specific Integrated Circuit,专用集成电路))来实现,或者可以用硬件和软件的组合,如固件等来实现。It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in hardware (eg, circuits or ASICs (Application) that perform the corresponding functions or actions. Specific Integrated Circuit, application-specific integrated circuit)), or can be implemented by a combination of hardware and software, such as firmware.
尽管在此结合各实施例对本发明进行了描述,然而,在实施所要求保护的本发明过程中, 本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其它变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其它单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。While the invention has been described herein in connection with various embodiments, those skilled in the art will appreciate the understanding and understanding of the accompanying drawings, the disclosure, and the appended claims in practicing the claimed invention. Other variations of the disclosed embodiments are implemented. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that these measures cannot be combined to advantage.
以上已经描述了本申请的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。Various embodiments of the present application have been described above, and the foregoing descriptions are exemplary, not exhaustive, and not limiting of the disclosed embodiments. Numerous modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terminology used herein was chosen to best explain the principles of the various embodiments, the practical application or improvement over the technology in the marketplace, or to enable others of ordinary skill in the art to understand the various embodiments disclosed herein.

Claims (12)

  1. 一种基于分布式控制的相机控制方法,其特征在于,应用于第一设备,所述方法包括:A camera control method based on distributed control, characterized in that, applied to a first device, the method comprising:
    显示所述第一设备能够控制的待选相机,所述待选相机包括所述第一设备的本地相机、所述第一设备中第一虚拟相机所映射的第二设备的本地相机;Displaying a camera to be selected that can be controlled by the first device, the camera to be selected includes a local camera of the first device and a local camera of the second device mapped by the first virtual camera in the first device;
    根据检测到的针对所述待选相机的创建任务操作,从所述待选相机中确定出被选中相机以及所述被选中相机所需执行的目标任务;According to the detected operation of creating a task for the camera to be selected, determine the selected camera and a target task to be performed by the selected camera from the cameras to be selected;
    根据所述被选中相机在所述第一设备中的第一相机标识和所述目标任务生成第一任务命令;generating a first task command according to the first camera identifier of the selected camera in the first device and the target task;
    将所述第一任务命令发送至所述被选中相机,以使所述被选中相机根据所述第一任务命令控制执行所述目标任务,sending the first task command to the selected camera, so that the selected camera controls the execution of the target task according to the first task command,
    其中,所述第一设备包括至少一个第一虚拟相机,每个第一虚拟相机用于实现对所映射的第二设备的本地相机的控制,每个第一虚拟相机与所映射的第二设备的本地相机之间存在至少一级映射关系,The first device includes at least one first virtual camera, each first virtual camera is used to control the local camera of the mapped second device, and each first virtual camera is connected to the mapped second device There is at least one-level mapping relationship between the local cameras of ,
    在第一虚拟相机与所映射的第二设备的本地相机之间为多级映射关系时,所述第二设备与所述第一设备处于不同的局域网络。When there is a multi-level mapping relationship between the first virtual camera and the mapped local camera of the second device, the second device and the first device are in different local area networks.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    在检测到设备连接请求时,查找能够与所述第一设备连接且满足连接条件的第三设备,所述连接条件包括:所述第三设备设置有本地相机和/或所述第三设备中创建有至少一个第二虚拟相机;When a device connection request is detected, search for a third device that can be connected to the first device and meets a connection condition, where the connection condition includes: the third device is provided with a local camera and/or a third device in the third device at least one second virtual camera is created;
    向所述第三设备发出第一授权控制请求,并接收所述第三设备响应于所述第一授权控制请求返回的第一授权指示;sending a first authorization control request to the third device, and receiving a first authorization indication returned by the third device in response to the first authorization control request;
    在根据所述第一授权指示确定出被授权的第一授权相机后,获取所述第一授权相机在所述第三设备中的第二相机标识,所述第一授权相机包括所述第三设备的本地相机和/或所述第二虚拟相机所映射的第四设备的本地相机;After determining the authorized first authorized camera according to the first authorization instruction, obtain a second camera identification of the first authorized camera in the third device, where the first authorized camera includes the third camera the local camera of the device and/or the local camera of the fourth device mapped by the second virtual camera;
    根据所述第二相机标识确定出所述第一授权相机在所述第一设备中的第一相机标识,并根据所述第一授权相机的第一相机标识创建用于控制所述第一授权相机的第一虚拟相机,A first camera identification of the first authorized camera in the first device is determined according to the second camera identification, and a first camera identification for controlling the first authorization is created according to the first camera identification of the first authorized camera Camera's first virtual camera,
    其中,每个第二虚拟相机用于实现对第二虚拟相机所映射的第四设备的本地相机的控制,所述第二虚拟相机与所映射的第四设备的本地相机与之间存在至少一级映射关系。Wherein, each second virtual camera is used to control the local camera of the fourth device mapped by the second virtual camera, and there is at least one connection between the second virtual camera and the mapped local camera of the fourth device. level mapping.
  3. 根据权利要求2所述的方法,其特征在于,向所述第三设备发出第一授权控制请求,并接收所述第三设备响应于所述第一授权控制请求返回的第一授权指示,包括:The method according to claim 2, wherein sending a first authorization control request to the third device, and receiving a first authorization indication returned by the third device in response to the first authorization control request, comprising: :
    根据针对所述第三设备能够控制的所述第三设备的本地相机和/或所述第二虚拟相机所映射的第四设备的本地相机的请求操作,选择出第一请求相机;selecting a first requested camera according to a request operation for the local camera of the third device that can be controlled by the third device and/or the local camera of the fourth device mapped by the second virtual camera;
    根据所述第一请求相机生成所述第一授权控制请求,并将所述第一授权控制请求发送至所述第三设备,以使所述第三设备根据检测到的针对所述第一授权控制请求的授权操作生成所述第一授权指示。The camera generates the first authorization control request according to the first request, and sends the first authorization control request to the third device, so that the third device can make the third device according to the detected authorization for the first authorization The authorization operation of the control request generates the first authorization indication.
  4. 根据权利要求2所述的方法,其特征在于,根据所述第二相机标识确定出所述第一授 权相机在所述第一设备中的第一相机标识,并根据所述第一授权相机的第一相机标识创建用于控制所述第一授权相机的第一虚拟相机,包括:The method according to claim 2, wherein a first camera identification of the first authorized camera in the first device is determined according to the second camera identification, and a first camera identification of the first authorized camera is determined according to the identification of the first authorized camera. The first camera identification creates a first virtual camera for controlling the first authorized camera, including:
    在所述第一授权相机包括第二虚拟相机所映射的第四设备的本地相机时,根据所述第二相机标识中的指示所述第一授权相机与所述第二虚拟相机之间的映射关系的映射关系级别,确定出所述第一授权相机与需要创建的控制所述第一授权相机的第一虚拟相机之间的第一映射关系级别;When the first authorized camera includes a local camera of the fourth device mapped by the second virtual camera, indicating the mapping between the first authorized camera and the second virtual camera according to the second camera identifier the mapping relationship level of the relationship, determining the first mapping relationship level between the first authorized camera and the first virtual camera that needs to be created to control the first authorized camera;
    根据所述第二相机标识中的身份标识、所述第一设备中对应于所述第一映射关系级别的已有相机的身份标识,确定出所述第一授权相机在所述第一设备中的第一身份标识;According to the identification in the second camera identification and the identification of the existing camera in the first device corresponding to the first mapping relationship level, it is determined that the first authorized camera is in the first device 's primary identity;
    根据所述第一映射关系级别和所述第一身份标识确定出所述第一授权相机在所述第一设备中的第一相机标识,并根据所述第一相机标识创建出用于控制所述第一授权相机的第一虚拟相机。A first camera identification of the first authorized camera in the first device is determined according to the first mapping relationship level and the first identification identification, and a first camera identification for controlling all cameras is created according to the first camera identification. The first virtual camera of the first authorized camera.
  5. 根据权利要求4所述的方法,其特征在于,根据所述第二相机标识确定出所述第一授权相机在所述第一设备中的第一相机标识,并根据所述第一授权相机的第一相机标识创建用于控制所述第一授权相机的第一虚拟相机,包括:The method according to claim 4, wherein a first camera identification of the first authorized camera in the first device is determined according to the second camera identification, and a first camera identification of the first authorized camera is determined according to the identification of the first authorized camera. The first camera identification creates a first virtual camera for controlling the first authorized camera, including:
    在所述第一授权相机包括所述第三设备的本地相机时,将一级映射关系确定为所述第一授权相机与需要创建的控制所述第一授权相机的第一虚拟相机之间的第一映射关系级别。When the first authorized camera includes a local camera of the third device, a first-level mapping relationship is determined as a first-level mapping relationship between the first authorized camera and a first virtual camera that needs to be created to control the first authorized camera The first mapping relationship level.
  6. 根据权利要求4所述的方法,其特征在于,根据所述第二相机标识中的身份标识、所述第一设备中对应于所述第一映射关系级别的已有相机的身份标识,确定出所述第一授权相机在所述第一设备中的第一身份标识,包括:The method according to claim 4, characterized in that, according to the identification in the second camera identification and the identification of the existing camera in the first device corresponding to the first mapping relationship level, determining The first identity of the first authorized camera in the first device, including:
    在所述第一设备中对应于所述第一映射关系级别的已有相机的身份标识中,已存在所述第二相机标识中的身份标识时,按照预设身份标识创建规则创建出所述第一授权相机在所述第一设备中的第一身份标识;或者In the identity identifier of the existing camera corresponding to the first mapping relationship level in the first device, when the identity identifier in the second camera identifier already exists, create the identity identifier according to a preset identity identifier creation rule the first identity of the first authorized camera in the first device; or
    在所述第二相机标识中的身份标识,与所述第一设备中对应于所述第一映射关系级别的,已有相机的身份标识不同时,将所述第二相机标识中的身份标识确定为所述第一授权相机在所述第一设备中的第一身份标识。When the identity identifier in the second camera identifier is different from the identity identifier of the existing camera corresponding to the first mapping relationship level in the first device, the identity identifier in the second camera identifier is changed to It is determined as the first identity identifier of the first authorized camera in the first device.
  7. 根据权利要求1所述的方法,其特征在于,根据检测到的针对所述待选相机的创建任务操作,从所述待选相机中确定出被选中相机以及所述被选中相机所需执行的目标任务,包括:The method according to claim 1, characterized in that, according to the detected operation of creating a task for the camera to be selected, the selected camera and the tasks to be performed by the selected camera are determined from the cameras to be selected. Objective tasks, including:
    根据检测到的针对所述待选相机的选择操作确定出被选中相机;determining the selected camera according to the detected selection operation for the camera to be selected;
    根据针对所述被选中相机的任务设定操作,确定出所述被选中相机所需执行的目标任务,其中,所述目标任务的任务参数包括任务类型、执行时间信息、所述被选中相机执行目标任务时的相机参数设置中的至少一种,所述任务类型包括以下至少一种:拍照任务、摄像任务、图像预览任务。According to the task setting operation for the selected camera, the target task to be executed by the selected camera is determined, wherein the task parameters of the target task include task type, execution time information, and execution time of the selected camera. At least one of the camera parameter settings during the target task, and the task type includes at least one of the following: a photographing task, a photographing task, and an image previewing task.
  8. 根据权利要求1所述的方法,其特征在于,将所述第一任务命令发送至所述被选中相机,以使所述被选中相机根据所述第一任务命令控制执行所述目标任务,包括以下至少一项 操作:The method according to claim 1, wherein sending the first task command to the selected camera, so that the selected camera controls the execution of the target task according to the first task command, comprising: At least one of the following actions:
    在所述被选中相机包括所述第一设备的本地相机时,向所述第一设备的本地相机发送所述第一任务命令,以使所述第一设备的本地相机执行所述第一任务命令所指示的目标任务;When the selected camera includes the local camera of the first device, the first task command is sent to the local camera of the first device, so that the local camera of the first device executes the first task the target task indicated by the command;
    在所述被选中相机包括第一虚拟相机所映射的第二设备的本地相机、且所述被选中相机与所述被选中相机所对应的第一虚拟相机之间为一级映射关系时,通过所述第一设备中与所述被选中相机对应的第一虚拟相机将所述第一任务命令转发至所述第二设备的本地相机,以使所述第二设备的本地相机执行所述第一任务命令所指示的目标任务;When the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a first-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, pass The first virtual camera corresponding to the selected camera in the first device forwards the first task command to the local camera of the second device, so that the local camera of the second device executes the first task command. a target task indicated by the task command;
    在所述被选中相机包括第一虚拟相机所映射的第二设备的本地相机、且所述被选中相机与所述被选中相机所对应的第一虚拟相机之间为多级映射关系时,根据所述被选中相机与对应的第一虚拟相机之间的第一映射关系级别,确定出完成所述第一任务命令转发的至少一个中间设备,依次通过每个中间设备中对应于所述被选中相机的虚拟相机将所述第一任务命令转发至所述第二设备的本地相机,以使所述第二设备的本地相机执行所述第一任务命令所指示的目标任务。When the selected camera includes the local camera of the second device mapped by the first virtual camera, and there is a multi-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, according to The first mapping relationship level between the selected camera and the corresponding first virtual camera determines at least one intermediate device that completes the forwarding of the first task command, and sequentially passes through each intermediate device corresponding to the selected camera. The virtual camera of the camera forwards the first task command to the local camera of the second device, so that the local camera of the second device executes the target task indicated by the first task command.
  9. 根据权利要求1或8所述的方法,其特征在于,所述方法还包括:The method according to claim 1 or 8, wherein the method further comprises:
    在接收到所述被选中相机执行所述目标任务得到的目标任务数据时,根据所述目标任务数据进行图像和/或视频展示,When receiving the target task data obtained by the selected camera performing the target task, performing image and/or video display according to the target task data,
    其中,接收所述目标任务数据包括以下至少一种方式:Wherein, receiving the target task data includes at least one of the following ways:
    在所述被选中相机包括所述第一设备的本地相机时,直接接收来自所述第一设备的本地相机发出的目标任务数据;When the selected camera includes the local camera of the first device, directly receiving target task data sent from the local camera of the first device;
    在所述被选中相机包括第一虚拟相机所映射的第二设备的本地相机、且所述被选中相机与所述被选中相机所对应的第一虚拟相机之间为一级映射关系时,利用所述被选中相机所对应的第一虚拟相机直接接收所述第二设备的本地相机发出的目标任务数据;When the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a first-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, use The first virtual camera corresponding to the selected camera directly receives the target task data sent by the local camera of the second device;
    在所述被选中相机包括第一虚拟相机所映射的第二设备的本地相机、且所述被选中相机与所述被选中相机所对应的第一虚拟相机之间为多级映射关系时,利用所述被选中相机所对应的第一虚拟相机接收依次经过第二设备的本地相机发出、至少一个中间设备转发的目标任务数据。When the selected camera includes a local camera of the second device mapped by the first virtual camera, and there is a multi-level mapping relationship between the selected camera and the first virtual camera corresponding to the selected camera, use The first virtual camera corresponding to the selected camera receives the target task data sequentially sent by the local camera of the second device and forwarded by at least one intermediate device.
  10. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    在接收到来自第五设备的第二授权控制请求时,根据所述第二授权控制请求中的第二请求相机展示授权提示;When receiving a second authorization control request from the fifth device, the camera displays an authorization prompt according to the second request in the second authorization control request;
    根据检测到的针对所述第二请求相机的授权操作,确定出授权的第二授权相机;determining an authorized second authorized camera according to the detected authorization operation for the second requested camera;
    根据所述第二授权相机在所述第一设备中的第一相机标识生成第二授权指示,并将所述第二授权指示发送至所述第五设备,以使所述第五设备根据所述第二授权指示创建用于控制所述第二授权相机的虚拟相机。A second authorization instruction is generated according to the first camera identification of the second authorized camera in the first device, and the second authorization instruction is sent to the fifth device, so that the fifth device The second authorization instruction creates a virtual camera for controlling the second authorized camera.
  11. 一种终端设备,其特征在于,包括:A terminal device, characterized in that it includes:
    本地相机;local camera;
    第一虚拟相机;a first virtual camera;
    处理器;processor;
    用于存储处理器可执行指令的存储器;memory for storing processor-executable instructions;
    其中,所述处理器被配置为执行所述指令时实现权利要求1-10任意一项所述的方法。Wherein, the processor is configured to implement the method of any one of claims 1-10 when executing the instructions.
  12. 一种非易失性计算机可读存储介质,其上存储有计算机程序指令,其特征在于,所述计算机程序指令被处理器执行时实现权利要求1-10中任意一项所述的方法。A non-volatile computer-readable storage medium on which computer program instructions are stored, characterized in that, when the computer program instructions are executed by a processor, the method described in any one of claims 1-10 is implemented.
PCT/CN2021/130672 2020-11-20 2021-11-15 Camera control method based on distributed control, and terminal device WO2022105716A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011308989.4A CN114520867B (en) 2020-11-20 2020-11-20 Camera control method based on distributed control and terminal equipment
CN202011308989.4 2020-11-20

Publications (1)

Publication Number Publication Date
WO2022105716A1 true WO2022105716A1 (en) 2022-05-27

Family

ID=81594926

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/130672 WO2022105716A1 (en) 2020-11-20 2021-11-15 Camera control method based on distributed control, and terminal device

Country Status (2)

Country Link
CN (2) CN114520867B (en)
WO (1) WO2022105716A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116366957A (en) * 2022-07-21 2023-06-30 荣耀终端有限公司 Virtualized camera enabling method, electronic equipment and cooperative work system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001037497A1 (en) * 1999-11-18 2001-05-25 Prescient Networks Pty Ltd A gateway system for interconnecting wireless ad-hoc networks
US20090276771A1 (en) * 2005-09-15 2009-11-05 3Tera, Inc. Globally Distributed Utility Computing Cloud
CN104639418A (en) * 2015-03-06 2015-05-20 北京深思数盾科技有限公司 Method and system for information transmission by constructing local area network
CN107154868A (en) * 2017-04-24 2017-09-12 北京小米移动软件有限公司 Smart machine control method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5429882B2 (en) * 2010-12-08 2014-02-26 Necアクセステクニカ株式会社 Camera synchronization system, control device, and camera synchronization method used therefor
WO2014032259A1 (en) * 2012-08-30 2014-03-06 Motorola Mobility Llc A system for controlling a plurality of cameras in a device
AU2016228525B2 (en) * 2015-03-12 2021-01-21 Alarm.Com Incorporated Virtual enhancement of security monitoring
US20170332009A1 (en) * 2016-05-11 2017-11-16 Canon Canada Inc. Devices, systems, and methods for a virtual reality camera simulator
CN109600549A (en) * 2018-12-14 2019-04-09 北京小米移动软件有限公司 Photographic method, device, equipment and storage medium
CN118042262A (en) * 2019-12-18 2024-05-14 荣耀终端有限公司 Control method, electronic equipment, computer readable storage medium and chip
CN115136570B (en) * 2020-02-20 2024-07-30 华为技术有限公司 Function integration method, system and computer readable medium of external equipment of Internet of things

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001037497A1 (en) * 1999-11-18 2001-05-25 Prescient Networks Pty Ltd A gateway system for interconnecting wireless ad-hoc networks
US20090276771A1 (en) * 2005-09-15 2009-11-05 3Tera, Inc. Globally Distributed Utility Computing Cloud
CN104639418A (en) * 2015-03-06 2015-05-20 北京深思数盾科技有限公司 Method and system for information transmission by constructing local area network
CN107154868A (en) * 2017-04-24 2017-09-12 北京小米移动软件有限公司 Smart machine control method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116366957A (en) * 2022-07-21 2023-06-30 荣耀终端有限公司 Virtualized camera enabling method, electronic equipment and cooperative work system
CN116366957B (en) * 2022-07-21 2023-11-14 荣耀终端有限公司 Virtualized camera enabling method, electronic equipment and cooperative work system

Also Published As

Publication number Publication date
CN115484404B (en) 2023-06-02
CN114520867A (en) 2022-05-20
CN114520867B (en) 2023-02-03
CN115484404A (en) 2022-12-16

Similar Documents

Publication Publication Date Title
US11797249B2 (en) Method and apparatus for providing lock-screen
WO2022100237A1 (en) Screen projection display method and related product
WO2022105759A1 (en) Video processing method and apparatus, and storage medium
JP2023514631A (en) Interface layout method, apparatus and system
CN111666055B (en) Data transmission method and device
WO2022028494A1 (en) Multi-device data collaboration method and electronic device
US20140095659A1 (en) Method and system for transmitting data, and method and electronic device therefor
WO2022078095A1 (en) Fault detection method and electronic terminal
WO2022156443A1 (en) In-vehicle infotainment product connection method and apparatus
WO2022105758A1 (en) Path identification method and apparatus
EP4407421A1 (en) Device collaboration method and related apparatus
WO2022105793A1 (en) Image processing method and device
WO2022134691A1 (en) Method and device for screech processing in terminal device, and terminal
WO2022105716A1 (en) Camera control method based on distributed control, and terminal device
WO2023202407A1 (en) Application display method and apparatus, and storage medium
WO2022194005A1 (en) Control method and system for synchronous display across devices
WO2022179471A1 (en) Card text recognition method and apparatus, and storage medium
WO2022166614A1 (en) Method and apparatus for executing control operation, storage medium, and control
CN115114607A (en) Sharing authorization method, device and storage medium
WO2022121751A1 (en) Camera control method and apparatus, and storage medium
WO2022105755A1 (en) Font library synchronization method and apparatus, and storage medium
WO2024078337A1 (en) Display-screen selection method, and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21893863

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21893863

Country of ref document: EP

Kind code of ref document: A1