A photographing method, an internet of things device and a collaborative working system
Patent Information
- Application Number
- CN202210869233.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-21
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2042-07-21
AI Technical Summary
[0004]但是,目前的方案中一台IoT设备仅能响应一台中心侧设备的拍照请求
[0005] To address the aforementioned issues, this application provides a photo-taking method, an IoT device, and a collaborative working system that enables a single IoT device to simultaneously receive photo-taking requests from multiple electronic devices (i.e., multiple central devices) and correctly transmit the photos back to these devices, thereby improving the user experience.
Smart Images

Figure CN117499781B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to a photography method, an Internet of Things (IoT) device, and a collaborative work system. Background Technology
[0002] Currently, by installing components such as the Device Virtualization Software Development Kit (DVSDK) and the Distributed Mobile Sensing Development Platform (DMSDP) on central-side devices such as mobile phones and tablets, and by setting up corresponding DMSDP on Internet of Things (IoT) devices such as desk lamps that can use cameras for adaptation, it is possible to connect central-side devices with IoT devices and enable central-side devices to use the virtualized camera function of IoT devices.
[0003] A typical application scenario for the above technologies is in education. Educational applications installed on the central device can send a photo request. IoT devices such as desk lamps use their cameras to take photos and then send the photos back to the central device to enable functions such as answering questions and submitting assignments.
[0004] However, in the current solution, one IoT device can only respond to one photo request from a central device. When an IoT device receives photo requests from multiple central devices simultaneously, photo transmission errors may occur, causing the virtual camera photo service to be interrupted and affecting the user experience. Summary of the Invention
[0005] To address the aforementioned issues, this application provides a photo-taking method, an IoT device, and a collaborative working system that enables a single IoT device to simultaneously receive photo-taking requests from multiple electronic devices (i.e., multiple central devices) and correctly transmit the photos back to these devices, thereby improving the user experience.
[0006] In a first aspect, this application provides a photo-taking method applied to an Internet of Things (IoT) device, the IoT device being used to connect to at least one electronic device. The photo-taking method includes: receiving at least one photo-taking request sent by the at least one electronic device, wherein each electronic device sends one photo-taking request; creating a corresponding photo-taking task for each of the at least one photo-taking requests, and inserting each photo-taking task into a photo-taking task queue according to the order in which each photo-taking request is received, wherein the first photo-taking task in the photo-taking task queue is the photo-taking task corresponding to the first received photo-taking request; executing the first photo-taking task to obtain photo data; and sending the photo data to the at least one electronic device.
[0007] The solution provided in this application utilizes a photo-taking task queue to arrange the photo-taking tasks corresponding to each photo-taking request, with the queue arranged in chronological order. Only the photo-taking request command corresponding to the photo-taking task at the head of the queue is issued, avoiding multiple duplicate issuance of photo-taking tasks that could cause camera driver crashes or malfunctions. After acquiring the photo data, the photo data is sent to each electronic device separately, thus completing multiple photo-taking tasks with a single capture. Using this solution, a single IoT device can receive photo-taking requests from multiple central devices simultaneously and correctly transmit the photos back to all central devices, preventing interruptions to the virtual camera photo-taking service due to abnormal photo transmission, thereby improving the user experience.
[0008] In one possible implementation, before inserting each of the photo-taking requests into the photo-taking task queue in the order they were received, the method further includes:
[0009] Generate the photo-taking task queue.
[0010] In one possible implementation, generating the photo-taking task queue specifically includes:
[0011] The maximum number of transmission channels that the IoT device is allowed to establish is used as the upper limit for the number of photo tasks that can be inserted into the photo task queue. The transmission channels are used to transmit the photo request and the photo data. Each electronic device establishes at most one transmission channel with the IoT device.
[0012] In one possible implementation, generating the photo-taking task queue specifically includes:
[0013] The number of transmission channels currently established by the IoT device is used as the upper limit for the number of photo tasks that can be inserted into the photo task queue, and the photo task queue is created; the transmission channels are used to transmit the photo request and the photo data, and each electronic device establishes at most one transmission channel with the IoT device.
[0014] Because the collaborative system in this application supports idle release channels, when a channel established between the central device and the IoT device has not transmitted data for an extended period, the channel will be destroyed to free up space and reduce resource consumption. Therefore, the photo-taking task queue does not need to be too long; it only needs to be the same as the number of transmission channels and can be dynamically changed to reduce resource consumption.
[0015] In one possible implementation, the method further includes:
[0016] When all the transmission channels established by the IoT device are destroyed, the photo-taking task queue is deleted.
[0017] When the channel established between the central device and the IoT device is destroyed due to a long period of no data transmission, the photo-taking task queue can also be deleted to free up storage space and reduce resource consumption.
[0018] In one possible implementation, performing the first-take photo task to obtain photo data specifically includes:
[0019] Send the photo request command corresponding to the first photo capture task to the camera driver of the IoT device;
[0020] The camera driver drives the camera of the IoT device to capture images to obtain the photo data.
[0021] In one possible implementation, the IoT device is used to connect to at least two electronic devices and receive at least two photo requests. The step of creating a corresponding photo task for each of the at least one photo request and inserting each photo task into a photo task queue according to the order in which each photo request is received specifically includes:
[0022] Create a corresponding photo-taking task for each of the at least two photo-taking requests;
[0023] Store the correspondence between each photo-taking request and the corresponding photo-taking task;
[0024] Each of the at least two photo-taking requests is inserted into the photo-taking task queue in the order in which they are received.
[0025] In one possible implementation, sending the photo data to the at least one electronic device specifically includes:
[0026] Copy the photo data and populate the photo data into each photo task in the photo task queue;
[0027] Based on the stored correspondence between each photo request and its corresponding photo task, the photo data filled in the photo task corresponding to each photo request is sent back to the electronic device that sent the photo request.
[0028] Secondly, this application also provides an Internet of Things (IoT) device, which includes a camera, a memory, and a processor. The memory is coupled to the processor, and the camera is coupled to the processor. The IoT device may include one or more cameras. The memory stores program instructions, which, when executed by the processor, cause the IoT device to perform the image-taking method provided in the first aspect or its corresponding implementations.
[0029] The IoT device provides hardware virtualization services, specifically including a photo management module. This photo management module includes a queue management module and a photo sharing module. The queue management module generates multiple photo tasks based on multiple photo requests sent by the device interconnection service, fills them into the photo task queue in chronological order, and sends the photo request command corresponding to the photo task at the head of the queue to the camera driver. Each photo task in the photo task queue corresponds to one photo request; therefore, the order of the photo tasks corresponds to the order of the photo requests.
[0030] The photo sharing module populates photo data into each photo-taking task in the photo-taking task queue. The photo sharing module is used to enable the sharing of photo data.
[0031] In some embodiments, the photo sharing module is specifically used to copy photo data and populate it into each photo-taking task.
[0032] Thirdly, this application also provides a collaborative work system, which includes one or more electronic devices and one or more Internet of Things (IoT) devices provided in the second aspect.
[0033] In one possible implementation, the collaborative working system includes at least two electronic devices, each of which establishes a transmission channel with the Internet of Things (IoT) device. Attached Figure Description
[0034] Figure 1 For scene illustration Figure 1 ;
[0035] Figure 2a A schematic diagram of a center-side device provided in this application;
[0036] Figure 2b A schematic diagram of the software structure of the central-side device provided in this application;
[0037] Figure 3aA schematic diagram of an IoT device provided in this application;
[0038] Figure 3b A schematic diagram of the software architecture of the IoT device provided in this application;
[0039] Figure 4 The flowchart of the photographing method provided in the embodiments of this application Figure 1 ;
[0040] Figure 5 A flowchart illustrating another photographing method provided in this application embodiment;
[0041] Figure 6 An architecture diagram for implementing a photo-taking method provided in this application embodiment;
[0042] Figure 7 This is a schematic diagram of a collaborative work system provided in an embodiment of this application. Detailed Implementation
[0043] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0044] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0045] The terms "first" and "second," etc., used in the specification and claims of this application are used to distinguish different objects, rather than to describe a specific order of objects.
[0046] To enable those skilled in the art to better understand the solution of this application, the application scenario of the technical solution of this application will be described first below.
[0047] Currently, online education is gaining popularity, and students' demand for it is increasing. In some applications, students can look up unfamiliar words online for explanations; in others, online reading aloud of textbook content facilitates learning and pronunciation; and still others require students to submit assignments online. Therefore, how to meet users' online education needs using smart devices is a problem that needs to be solved.
[0048] See Figure 1 This image is for illustrative purposes only. Figure 1.
[0049] The central device 10 has educational applications installed on it. After the IoT device 20, such as a desk lamp, takes a picture using its camera, it sends the picture back to the central device to enable functions such as answering questions and submitting homework. Alternatively, the central device 10 can use the camera on the IoT device 20 to preview the picture and provide users with various online educational functions based on the image collected by the IoT device 20, such as online word lookup and online reading aloud.
[0050] The central device 10 can be a mobile phone, tablet computer, laptop computer, or desktop computer, etc., and this application embodiment does not make specific limitations.
[0051] The central device 10 and the IoT device 20 can perform near-field communication and / or far-field communication. Near-field communication can be achieved through devices such as routers, while far-field communication can be achieved through cloud servers.
[0052] The hardware architecture of the central device 10 will be described below.
[0053] See Figure 2a The figure is a schematic diagram of a center-side device provided in this application.
[0054] Figure 2a The center-side device 10 shown is merely an example, and the center-side device 10 may have more or fewer components than shown in the figure, may combine two or more components, or may have different component configurations. Figure 2a The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0055] The central device 10 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include pressure sensors, gyroscope sensors, accelerometers, temperature sensors, motion sensors, barometric pressure sensors, magnetic sensors, distance sensors, proximity sensors, fingerprint sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.
[0056] The processor 110 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU).
[0057] Different processing units can be independent devices or integrated into one or more processors.
[0058] The controller can serve as the central nervous system and command center of the central device 10. The controller can generate operation control signals based on instruction opcodes and timing signals to control the fetching and execution of instructions.
[0059] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory.
[0060] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge the central device 10, and can also be used for data transfer between the central device 10 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.
[0061] The charging management module 140 is used to receive charging input from the charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130.
[0062] In some wireless charging embodiments, the charging management module 140 can receive wireless charging input through the wireless charging coil of the central device 10. While charging the battery 142, the charging management module 140 can also supply power to the electronic device through the power management module 141.
[0063] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, internal memory 121, external memory, display 194, camera 193, and wireless communication module 160, etc.
[0064] The wireless communication function of the central device 10 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.
[0065] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the central side device 10 can be used to cover one or more communication frequency bands. Different antennas can also be reused to improve antenna utilization.
[0066] For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antenna can be used in conjunction with a tuning switch.
[0067] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the central-side device 10. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc.
[0068] The wireless communication module 160 can provide solutions for wireless communication applications on the central device 10, including wireless local area networks (WLAN) (such as Wi-Fi networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.
[0069] In some embodiments, the antenna 1 of the central device 10 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the central device 10 can communicate with the network and other devices through wireless communication technology.
[0070] The central device 10 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0071] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. In some embodiments, the center-side device 10 may include one or N displays screens 194, where N is a positive integer greater than 1.
[0072] In this embodiment, the display screen 194 can display a shooting preview interface and a captured image interface, etc. It should be noted that, in this embodiment, the shooting preview interface refers to the interface through which the user can view images captured in real-time by the camera of the IoT device on the display screen 194.
[0073] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the central device 10. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage functions.
[0074] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of the central device 10 by running the instructions stored in internal memory 121, such as enabling the central device 10 to implement the collaborative working method in the embodiments of this application. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.
[0075] The storage data area can store data created during the use of the central device 10 (such as audio data, phonebook, etc.). In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0076] The central device 10 can implement audio functions, such as music playback and recording, through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, and an application processor.
[0077] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0078] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The central-side device 10 can listen to music or make hands-free calls through the speaker 170A. In some embodiments, the central-side device 10 may be equipped with multiple speakers 170A.
[0079] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the central device 10 receives a telephone call or voice message, it can listen to the voice by bringing the receiver 170B close to the listener's ear.
[0080] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. The central device 10 can be equipped with at least one microphone 170C. In some embodiments, the central device 10 can be equipped with two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, the central device 10 can also be equipped with three, four, or more microphones 170C, enabling sound signal collection, noise reduction, sound source identification, and directional recording, among other functions.
[0081] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0082] The software structure of the central side device 10 is described below.
[0083] See Figure 2b This figure is a schematic diagram of the software structure of the central side device provided in this application.
[0084] The software system of the central device 10 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses a layered Android system as an example to exemplify the software structure of the central device 10.
[0085] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, from top to bottom, these layers are the application layer, application framework layer, system library, extension layer, and kernel layer.
[0086] The application layer can include a series of application packages. For example, application packages can include applications such as gallery, maps, Wi-Fi, Bluetooth, SMS, music, calling, navigation, video, camera, device management applications, and educational applications.
[0087] Among them, the device management application can sense, discover and register IoT devices in the area.
[0088] Educational applications can be developed by third-party vendors to provide users with online educational functions, and may include, but are not limited to, functions such as views, broadcasts, annotations, and queries.
[0089] In some embodiments, the device management application can be paired with IoT devices such as a desk lamp; the educational application can also be paired with IoT devices such as a desk lamp.
[0090] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0091] like Figure 2b As shown, the application framework layer may include DVSDK, DMSDK, AUTH, intelligent interconnection services, and interconnection services, etc.
[0092] Among them, authentication (AUTH), also known as "authentication" or "authorization", refers to providing secure access control capabilities and confirming the user's identity through certain means and interface calls, that is, providing authentication services.
[0093] DVSDK provides device virtualization services, also known as hardware virtualization services; this distinction will not be made further in the following description. It provides an entry point for third-party applications to interconnect, while also managing interface access security permissions. Specifically, it can be used to establish logical channels between the central device and IoT devices, providing virtualized camera capabilities.
[0094] DMSDK is used to provide device management services, providing third-party manufacturers with information on far-field (i.e., cloud-based) IoT devices and near-field (i.e., nearby connectable) IoT devices.
[0095] The Intelligent Connectivity Service provides a physical transmission channel, enables data transmission, and manages the startup of interconnectivity services.
[0096] Interconnection services establish logical channels between central devices and IoT devices, providing virtualized camera capabilities. Specifically, they are used to implement data processing, transmission channels, flow control, and capability acquisition functions.
[0097] In addition, it can include window managers, content providers, view systems, phone managers, resource managers, notification managers, etc.
[0098] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0099] Content providers store and retrieve data, making that data accessible to applications. This data may include video, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc. View systems include visual controls, such as controls for displaying text, controls for displaying images, etc. View systems can be used to build applications. A display interface can consist of one or more views.
[0100] For example, the display interface, including the SMS notification icon, can include both text and image views. The phone manager provides communication functionality for the electronic device 100, such as managing call status (including connection and disconnection). The resource manager provides various resources for the application, such as localized strings, icons, images, layout files, video files, etc. The notification manager allows the application to display notification information in the status bar; it can be used to convey informational messages and can disappear automatically after a short pause without user interaction.
[0101] The system layer includes system libraries and the Android Runtime.
[0102] The Android Runtime consists of core libraries and a virtual machine. The Android Runtime is responsible for the scheduling and management of the Android system.
[0103] The core library consists of two parts: one part contains the functionalities that the Java language needs to call, and the other part is the Android core library. The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0104] In this embodiment, the Android Runtime also includes a virtual camera adaptation layer, providing the ability to register a virtual camera.
[0105] The system library can include multiple functional modules. For example, it may include a multimedia platform, an audio framework, a graphics and image processing library, a decoding module, and a virtual camera adaptation layer.
[0106] The multimedia platform can be used for multimedia management, supporting playback and recording of various common audio and video formats, as well as still image files. The multimedia platform supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0107] Graphics and image processing libraries can be used to implement graphics drawing, image rendering, compositing, and layer processing, etc.
[0108] Codecs can be used to perform encoding and decoding operations on audio and video data.
[0109] The extension layer includes the Hardware Abstraction Layer (HAL), which is a routine package of the software layer. It is an interface layer located between the operating system kernel and the hardware circuitry, used to simulate the details of a specific system platform so that programs can directly access hardware resources.
[0110] HAL layers include, but are not limited to: Audio HAL, Sensor HAL, Modem HAL, Camera HAL, and Virtual Camera HAL.
[0111] The audio HAL is used to process audio streams, such as performing noise reduction and directional enhancement. The camera HAL is used to process the image stream corresponding to the camera on the electronic device side, and the virtual camera HAL is used to process the image stream corresponding to the virtual camera registered on the electronic device side, that is, to process the image stream captured by the camera on the IoT device side.
[0112] The kernel layer is the layer between hardware and software. The kernel layer can contain drivers such as display drivers, camera drivers, USB drivers, CPU drivers, audio drivers, network drivers (such as Wi-Fi drivers), storage drivers, and printer drivers.
[0113] The hardware structure of IoT device 20 is described below.
[0114] See Figure 3a The figure is a schematic diagram of an IoT device provided in this application.
[0115] In some embodiments, the IoT device is a desk lamp with a camera. It should be understood that... Figure 3a The IoT device 20 shown is just an example and may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. Figure 3a The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0116] IoT devices may include: processor 210, camera 201, wireless communication module 202, memory 203, audio module 204, USB interface 205, charging management module 206, power management module 207, battery 208, lighting device 209, button 211, etc.
[0117] Processor 210 may include one or more processing units, such as a GPU, ISP, controller, memory, video codec, etc. These different processing units may be independent devices or integrated into one or more processors.
[0118] The controller can serve as the nerve center and command center of the IoT device 20. The controller can generate operation control signals based on instruction opcodes and timing signals to control the fetching and execution of instructions.
[0119] Camera 201 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
[0120] The photosensitive element converts light signals into electrical signals, which are then transmitted to the ISP (Image Signal Processor) for conversion into digital image signals. The ISP outputs the digital image signals to the DSP (Digital Signal Processor) for further processing. Taking a desk lamp as an example, the camera 201 can be mounted on the lamp stand to capture images downwards.
[0121] IoT device 20 can achieve shooting function through ISP, camera 201, video codec, GPU, etc.
[0122] The ISP (Image Signal Processor) is used to process data fed back from the camera 201. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 201.
[0123] The wireless communication module 202 can provide wireless communication solutions, including WLAN (such as Wi-Fi networks) and Bluetooth (BT), for use on the IoT device 20. In some embodiments, the antenna of the IoT device 20 is coupled to the wireless communication module 202, enabling the IoT device 20 to communicate with networks and other devices via wireless communication technology.
[0124] The memory 203 can be used to store computer executable program code, which includes instructions. The processor 210 executes various functional applications and data processing of the IoT device 20 by running the instructions stored in the memory 203, such as enabling the IoT device 20 to implement the collaborative working method in the embodiments of this application.
[0125] IoT device 20 can realize audio functions, such as music playback, through audio module 204, speaker 212, etc.
[0126] USB port 205 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 205 can be used to connect a charger to charge IoT device 20, and can also be used for data transfer between IoT device 20 and peripheral devices.
[0127] The charging management module 206 receives charging input from the charger. While charging the battery 208, the charging management module 206 can also supply power to the IoT device 20 via the power management module 207.
[0128] The power management module 207 is used to connect the battery 208, the charging management module 206, and the processor 210. The power management module 207 receives input from the battery 208 and / or the charging management module 206 to power the processor 210, memory 203, camera 201, wireless communication module 202, and lighting device 209, etc.
[0129] Button 211 includes the power button (or power button), etc.
[0130] The software structure of IoT device 20 is described below.
[0131] See Figure 3b This figure is a schematic diagram of the software structure of the IoT device provided in this application.
[0132] The layers of an IoT device communicate with each other through software interfaces. In some embodiments, from top to bottom, they are the application layer, the application framework layer, the system library, and the kernel layer.
[0133] The application layer can include device application services, which can be understood as system-level applications. The device application services start after the IoT device system starts.
[0134] The application framework layer includes some predefined functions. For example... Figure 3b As shown, the application framework layer may include intelligent interconnection services, resource manager and interconnection services, etc.
[0135] File Explorer is used to provide various resources, such as localized strings, icons, images, layout files, audio files, video files, and so on.
[0136] The intelligent interconnect service provides a physical transmission channel for providing data transmission capabilities and managing the activation / deactivation of the interconnect service.
[0137] Interconnection services: Establish a logical channel between central devices and IoT, provide virtualized camera capabilities, and provide open interfaces for device cameras, which may include data processing, capability acquisition, virtual audio modules, and virtual camera modules.
[0138] The system layer can include multiple functional modules. For example, it may include a multimedia platform, an audio framework, a graphics and image processing library, a decoding module, and camera modules adapted for IoT manufacturers.
[0139] The multimedia platform can be used for multimedia management, supporting playback and recording of various common audio and video formats, as well as still image files. The multimedia platform supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0140] Graphics and image processing libraries can be used to implement graphics drawing, image rendering, compositing, and layer processing, etc.
[0141] Codecs can be used to perform encoding and decoding operations on audio and video data.
[0142] IoT manufacturers can adapt camera modules to implement the interface of interconnected modules, providing functions such as opening the camera, taking pictures, and previewing.
[0143] The kernel layer is the layer between hardware and software. The kernel layer can contain drivers such as camera drivers, USB drivers, CPU drivers, audio drivers, network drivers, and storage drivers.
[0144] Currently, by installing components such as DVSDK and DMSDP on central devices such as mobile phones and tablets, and setting up corresponding DMSDP on IoT devices such as desk lamps for adaptation, central devices can connect with IoT devices and enable the central devices to use the virtualized camera function of IoT devices.
[0145] Currently, a typical application scenario for the above technologies is in education. The central device 10 has an educational application installed, and the IoT device 20, such as a desk lamp, includes a camera. Once the central device 10 and the IoT device 20 are connected, the virtual camera function of the IoT device 20 can be used on the central device 10. For example, the camera of the IoT device 20 can capture text on a book on a desktop. When a mobile phone is pointed at the text, the educational application on the central device 10 automatically recognizes the text, displays annotations, and provides voice reading. The educational application can also send a photo request. After the IoT device, such as the desk lamp, takes a photo, it sends the photo back to the central device to enable functions such as Q&A and homework submission.
[0146] However, in the current solution, one IoT device 20 can only respond to a photo-taking request from one central device 10. When multiple different central devices 10 receive photo-taking requests simultaneously, photo transmission errors or anomalies may occur, affecting the user experience.
[0147] To address the aforementioned technical issues, this application provides a photo-taking method, an electronic device, an IoT device, and a collaborative working system, which enables an IoT device to receive photo-taking requests from multiple central devices simultaneously and correctly transmit the photos back to the multiple central devices, thereby improving the user experience.
[0148] The following section will explain the specific implementation method.
[0149] To enable those skilled in the art to more clearly understand the technical solution of this application, the process of establishing a connection between a central device and an IoT device and collaboratively taking photos in this application solution will be described below. In the following description, a tablet computer will be used as the central device and a desk lamp as the IoT device.
[0150] See Figure 4 This figure illustrates the flowchart of the photographing method provided in an embodiment of this application. Figure 1 .
[0151] 0. Device service initialization phase, specifically including the following steps:
[0152] S0.1: In response to user operation, the desk lamp's device application service starts and loads the interconnection service.
[0153] For example, a user action could be turning on the power to the desk lamp. In response to the user action, the desk lamp system starts, the device application service starts, and the interconnection service is loaded. This interconnection service can be used to establish a physical transmission channel between the tablet and the desk lamp, providing data transmission capabilities.
[0154] S0.2, The table lamp's interconnection service loads the hardware abstraction service.
[0155] The interconnect service can also control the activation of the hardware abstraction service. For example, after the interconnect service is started, it can load the hardware abstraction service as a plugin. The hardware abstraction service can be used to establish a logical channel between the tablet and the lamp, provide virtualized camera capabilities, and also provide an open interface for the lamp's camera.
[0156] The hardware abstraction service can include at least basic components and camera components. During the device service initialization phase, the interconnect service first loads and initializes the basic components. After the basic components are initialized, it can interact with the lamp's device adaptation module to obtain device information and virtualization capability information. For example, device information includes, but is not limited to, device name, device identifier, and device type. For example, virtualization capability information includes, but is not limited to, whether virtualized camera and virtualized microphone are supported, and may further include supported virtualized camera functions, such as supporting only video preview, only taking photos, or simultaneously supporting both photo and video preview.
[0157] Among them, the desk lamp has the ability to support virtual cameras, which can be understood as the desk lamp's camera being accessible to other electronic devices (such as tablets), or in other words, the desk lamp's camera being used as a virtual camera for other electronic devices.
[0158] After the basic components obtain the device and capability information of the desk lamp, if the desk lamp supports virtualized cameras, the basic components load the camera component to provide virtualized camera capabilities. At this point, the basic components can prepare for establishing a negotiation channel to negotiate network connection information (including but not limited to IP address and port) with the tablet. Specifically, during the basic components' preparation for establishing the negotiation channel, a session service is created, and the session name of the session service is sent to the interconnection service, pending the establishment of a negotiation channel between the tablet's transmission management service and the desk lamp's interconnection service.
[0159] 1. The device discovery phase includes the following steps:
[0160] S1.1: In response to user actions, the tablet's educational app sends a device discovery command to the device management service.
[0161] User actions can be actions performed by a user within an educational app that require access to the virtual camera. For example, user actions could include clicking on functions such as the point-and-read function, word lookup function, homework assignment function, or photo-taking function within the educational app.
[0162] The tablet's educational app receives a user action and, in response, sends a device discovery command to the tablet's device management service. This device discovery command instructs the search for IoT devices capable of connecting to the tablet. For example, the device discovery command may include, but is not limited to, the command type and the type of device to be discovered. In this embodiment, the device discovery command is specifically used to find a desk lamp capable of connecting to the tablet.
[0163] S1.2: The device management service in the tablet calls the authentication service to authenticate the education app and obtains the authentication result of the education app.
[0164] After receiving the device discovery instruction, the device management service authenticates the educational app based on its name.
[0165] Once the authentication service receives the authentication result (successful or failed) from the educational app, it sends the authentication result to the device management service.
[0166] S1.3: When the educational app successfully authenticates the device, the device management service in the tablet sends a device search command to the transmission management service.
[0167] The device search command may include, but is not limited to, command type, device type to be searched, and search method. For example, search methods include, but are not limited to, near-field device scanning and obtaining device information from a cloud server. In this implementation, the device type to be searched is a table lamp.
[0168] S1.4: The transmission management service in the tablet obtains the list of near and far-field devices according to the device search command, and sends the list of near and far-field devices to the device management service.
[0169] The far-field and near-field device lists include a far-field device list and a near-field device list. The far-field device list includes registered devices obtained from the cloud server, while the near-field device list includes devices scanned via near-field communication. Device information in both lists includes, but is not limited to, device name, device identifier, and device type.
[0170] When the transmission management service receives a device search instruction, it performs relevant device search operations based on the type of device to be searched and the search method carried in the device search instruction. These operations include performing near-field device scanning and retrieving relevant device information from the cloud server. The service then obtains a far-field device list and a near-field device list and sends these lists to the device management service.
[0171] S1.5: The device management service in the tablet filters devices based on the near and far field device list and reports the filtered device information to the education app.
[0172] Device filtering is performed to identify desk lamps that can be linked with the tablet, and this information is then sent to the educational app.
[0173] The device management service can perform an intersection operation on the far-field device list and the near-field device list, filtering out desk lamps that exist only in the far-field device list or only in the near-field device list. Desk lamps that exist in both lists are considered eligible for interaction with the tablet. In this way, the device management service can filter out desk lamps not registered in the cloud server, as well as those unable to communicate with the tablet via near-field communication.
[0174] In another optional implementation, regardless of whether the tablet and the desk lamp are on the same local area network, the tablet's transmission management service can obtain a list of communication devices and a list of registered devices based on device search commands. The devices included in the communication device list are those scanned via near-field communication or far-field communication, while the devices included in the registered device list are those already registered and obtained from the cloud server. The near-field devices included in the near-field device list are those scanned via near-field communication. Device information in the communication device list and the registered device list includes, but is not limited to, device name, device identifier, and device type.
[0175] The tablet's transmission management service sends the communication device list and registered device list to the device management service. The device management service filters devices based on these lists and reports the filtered device information to the educational app. Specifically, the device management service can perform an intersection operation on the communication device list and registered device list, filtering out desk lamps that exist only in either the communication device list or the registered device list. Desk lamps that exist in both lists are considered eligible for tablet interaction. This allows the device management service to filter out desk lamps not registered with the cloud server and those unable to establish near-field communication with the tablet.
[0176] 2. The virtual camera enabling phase includes the following steps:
[0177] S2.1: The tablet's educational app identifies the desk lamp to be linked.
[0178] S2.2: The tablet's educational app verifies and connects the desk lamp, and confirms that the desk lamp has the capability to support a virtual camera.
[0179] S2.3: The tablet's educational app sends a virtual camera enable request to the hardware virtualization service.
[0180] The Virtual Camera Enable Request is used to instruct the registration of a virtual camera in the Virtual Camera HAL. The Virtual Camera Enable Request may include, but is not limited to, the request type, device name, device identifier, device type, and the identifier of the virtual camera.
[0181] S2.4: The tablet's hardware virtualization service registers the virtual camera with the virtual camera HAL.
[0182] After receiving the virtual camera enable request, the hardware virtualization service registers the corresponding virtual camera with the virtual camera HAL according to the virtual camera enable request.
[0183] S2.5: After the virtual camera registration is completed, the tablet's virtual camera HAL sends a virtual camera enable success instruction to the educational app.
[0184] 3. Virtual camera preview access stage:
[0185] S3.1: The hardware virtualization API in the tablet sends a virtual camera access command to the camera service.
[0186] Virtual camera access commands refer to commands used to invoke a virtual camera. These commands may include, but are not limited to, command type, virtual camera ID, and camera configuration parameters.
[0187] S3.2: The camera service in the tablet sends an image preview request to the virtual camera HAL according to the virtual camera access command.
[0188] After receiving the virtual camera access command, the camera service generates a corresponding image preview request based on the virtual camera ID and sends it to the virtual camera HAL.
[0189] The image preview request is used to request a preview of the image data stream. For example, the image preview request may include, but is not limited to, a request identifier, a virtual camera ID, and camera configuration parameters.
[0190] S3.3: The virtual camera HAL in the tablet sends an image preview request to the hardware virtualization service.
[0191] After receiving an image preview request, the virtual camera HAL determines the matching virtualization hardware identifier based on the virtual camera ID carried in the image request.
[0192] In this embodiment, the virtual camera HAL determines the linked desk lamp camera based on the virtual camera ID and the mapping relationship between the virtual camera ID and the desk lamp camera, and generates a corresponding image request based on the determined virtualization hardware identifier and sends it to the hardware virtualization service.
[0193] For example, the image preview request may include, but is not limited to, a request identifier, device information (i.e., lamp information), virtualization hardware identifier (i.e., lamp camera identifier), and camera configuration parameters.
[0194] S3.4: The hardware virtualization service in the tablet sends an image preview request to the transmission management service.
[0195] The hardware virtualization service sends the image preview request to the transmission management service. The image preview request may include, but is not limited to, a request identifier, device information (i.e., lamp information), virtualization hardware identifier (i.e., lamp camera identifier), and camera configuration parameters.
[0196] When the hardware virtualization service in the tablet sends an image preview request to the transmission management service, if it finds that no data channel has been established with the desk lamp, it generates a data channel establishment request and sends it to the transmission management service. The data channel establishment request is used to indicate the transmission of data with the desk lamp. The data channel establishment request may include, but is not limited to, session identifiers, connection information, and data encoding / decoding modes.
[0197] Upon receiving a data channel establishment request, the tablet's transmission management service establishes a data channel connection with the desk lamp based on the information carried in the request, thus establishing a data channel between the tablet and the desk lamp. Subsequently, the tablet's transmission management service and the desk lamp's interconnection service can transmit various types of data, including but not limited to image data, through this data channel.
[0198] After the data channel is successfully established, the tablet's transmission management service sends a data channel success connection indication to the tablet's hardware virtualization service, and the desk lamp's interconnection service sends a data channel success connection indication to the camera component in the hardware abstraction service. The data channel success connection indication may include, but is not limited to, a connection success identifier and data channel-related information.
[0199] S3.5: The tablet's transmission management service transmits an image preview request to the desk lamp's interconnection service.
[0200] The tablet's transmission management service determines the appropriate control channel based on the device information carried in the image preview request, and transmits the image preview request to the lamp's interconnection service through that control channel.
[0201] S3.6: The interconnect service in the desk lamp sends an image preview request to the camera driver.
[0202] After receiving the image preview request, the Interconnect Service in the desk lamp determines the corresponding hardware driver (in this embodiment, the camera driver) based on the virtualized hardware identifier, and sends the corresponding image preview request to the camera driver.
[0203] S3.7: The camera driver in the desk lamp drives the camera to capture images and transmits the preview image data to the tablet's hardware virtualization service through the data channel.
[0204] The camera driver activates the camera and drives it to capture images using the camera configuration parameters carried in the image preview request, obtaining a preview image data stream. This preview image data stream is then sent to the interconnect service via the hardware abstraction service, enabling the interconnect service to continuously transmit the preview image data stream to the tablet's hardware virtualization service in the data channel. The packetization, assembly, and encoding / decoding processes for the preview image data stream are not detailed here.
[0205] S3.8: The hardware virtualization service in the tablet sends preview image data to the virtual camera HAL.
[0206] The hardware virtualization service continuously receives preview image data streams and sends them to the virtual camera HAL.
[0207] S3.9: The virtual camera HAL in the tablet sends preview image data to the camera service.
[0208] At this time, the virtual camera HAL continuously acquires the preview image data captured by the lamp camera and continuously sends the preview image data to the camera service.
[0209] S3.10: The tablet's camera service sends preview image data to the educational app.
[0210] S3.11: Educational apps on the tablet display preview images.
[0211] 4. Virtual camera photo taking stage
[0212] S4.1: In response to the received user operation, the educational app on the tablet sends a photo-taking request to the hardware virtualization service.
[0213] User interaction could be, for example, clicking the camera option. In response to the received user interaction, the educational app on the tablet sends a camera request to the hardware virtualization service.
[0214] The photo request may include, but is not limited to, the image sequence number, device information (i.e., lamp information), virtualized hardware identifier (i.e., lamp camera identifier), and camera configuration parameters. Camera configuration parameters include, but are not limited to, image resolution.
[0215] In addition, the photo request can also carry a task identifier to ensure the orderly management of multiple photo tasks.
[0216] S4.2: The hardware virtualization service in the tablet sends a photo-taking request to the transmission management service.
[0217] S4.3: The tablet's transmission management service will transmit the photo-taking request to the lamp's interconnection service.
[0218] The tablet's transmission management service determines the appropriate control channel based on the device information carried in the image preview request, and transmits the image preview request to the lamp's interconnection service through that control channel.
[0219] S4.4: The interconnected service in the desk lamp sends a photo-taking request to the camera driver.
[0220] After receiving the image preview request, the interconnect service in the desk lamp determines the corresponding hardware driver (in this embodiment, the camera driver) based on the virtualized hardware identifier, and sends the corresponding photo-taking request to the camera driver.
[0221] S4.5: The camera driver in the desk lamp drives the camera to capture images and transmits the captured image data to the tablet's hardware virtualization service through the data channel.
[0222] The camera driver uses the camera configuration parameters carried in the photo capture request to acquire images, obtain captured image data, and send the captured image data to the interconnect service through the hardware abstraction service. This enables the interconnect service to continuously transmit the captured image data to the tablet's hardware virtualization service in the data channel. The packetization, assembly, and encoding / decoding process of the captured image data will not be elaborated here.
[0223] S4.6: The hardware virtualization service in the tablet sends captured image data to the educational app.
[0224] S4.7: Educational apps on the tablet display captured images.
[0225] In the above process, the hardware abstraction service on the IoT device side is also known as the hardware virtualization service in this application.
[0226] This technical solution allows the central device to be directly equipped with electronic devices such as mobile phones and tablets. IoT devices can be set up separately from the central device, eliminating the need for a bulky base with a liftable camera. IoT devices, such as desk lamps, can be placed more flexibly, with screen angles adjusted as needed. Furthermore, the educational applications installed on the central device have high compatibility and scalability, making them easy to promote and providing significant convenience for education.
[0227] The above scheme illustrates the process of a central device taking a picture using a virtual camera service with an IoT device. The following explanation uses the example of an IoT device simultaneously receiving picture requests from two central devices. The principle is similar when the IoT device receives picture requests from three or more central devices, and will not be elaborated upon here.
[0228] See also Figure 5 and Figure 6 .in, Figure 5 A flowchart illustrating another photographing method provided in this application embodiment; Figure 6 This is an architecture diagram of an implementation method for taking pictures, provided in an embodiment of this application.
[0229] The specific implementation method for establishing a connection and transmission channel between the IoT device and two central devices can be found in the description of the above embodiments, and will not be repeated here in the embodiments of this application.
[0230] S51: The device interconnection service received two photo requests.
[0231] The two photo requests were sent by two separate central devices.
[0232] In practical applications, the photo-taking requests sent by the two central devices always have a specific order, and the device interconnection service will receive the two photo-taking requests in sequence.
[0233] Furthermore, when two central devices simultaneously establish connections with an IoT device, they use different transmission channels. These two channels do not interfere with each other. In other words, the IoT device receives the photo request from two different transmission channels.
[0234] In the following explanation, we will take the example of the photo request 1 issued by the central device 10a arriving first, and the photo request 2 issued by the central device 10b arriving later.
[0235] The IoT device receives the two photo requests at different times: photo request 1 is received at time t1, and photo request 2 is received at time t2. t1 is earlier than t2.
[0236] S52: The device interconnection service transmits two photo capture requests to the queue management module.
[0237] This application embodiment adds a photo management module to the hardware virtualization service (also known as device virtualization service) on the IoT device side.
[0238] The photo management module includes a queue management module and a photo sharing module.
[0239] The queue management module is used to generate multiple corresponding photo-taking tasks based on multiple photo-taking requests sent by the device interconnection service, fill them into the photo-taking task queue in chronological order, and send the photo-taking request command corresponding to the photo-taking task at the head of the queue to the camera driver.
[0240] Each photo-taking task in the photo-taking task queue corresponds to a photo-taking request, therefore the order of the photo-taking tasks corresponds to the order of the photo-taking requests.
[0241] In one possible implementation, when the device interconnection service transmits a photo-taking request to the queue management module, it transmits the requests one by one. The photo-taking task corresponding to the first photo-taking request received by the queue management module is inserted at the beginning of the photo-taking task queue. The photo-taking tasks generated by subsequent received photo-taking requests are then inserted into the photo-taking task queue sequentially.
[0242] In other embodiments, when the device interconnection service transmits a photo-taking request to the queue management module, it can transmit the photo-taking request and the time of receiving the photo-taking request. In this case, the queue management module can directly sort and insert the photo-taking tasks based on the time of receiving the request.
[0243] S53: The queue management module creates photo-taking tasks according to the photo-taking requests and fills the photo-taking tasks into the task queue in the order of the photo-taking requests.
[0244] Each photo request corresponds to a photo task. That is, the photo task created for photo request 1 is called photo task 1; the photo task created for photo task 2 is called photo task 2. Then, the correspondence between photo tasks and photo requests is saved.
[0245] At this point, since photo request 1 is the first photo request received, photo task 1 is the head of the photo task queue.
[0246] S54: The queue management module sends the photo request command corresponding to the first photo capture task in the queue to the camera driver.
[0247] The queue management module only issues the photo request command corresponding to the photo task at the head of the queue, that is, it issues the photo request command corresponding to photo task 1.
[0248] To avoid repeatedly issuing photo-taking tasks, which could cause the camera driver to crash or malfunction.
[0249] S55: Drives the camera to capture images.
[0250] After receiving a photo capture request command, the camera driver drives the camera to take a picture.
[0251] S56: Send the image data to the photo sharing module.
[0252] S57: The photo sharing module fills the photo data into the two photo-taking tasks in the queue.
[0253] The photo sharing module fills in identical photo data for both photo-taking tasks. The photo sharing module is used to enable the sharing of photo data.
[0254] In one possible implementation, the photo sharing module can simultaneously populate photo data for two separate photo-taking tasks.
[0255] In another possible implementation, the photo sharing module can first fill the photo data into photo task 1, and then fill the photo data into photo task 2. The filling order is the queue order, that is, the order in which the photo requests are received.
[0256] In some embodiments, the photo sharing module is specifically used to copy the photo data twice and fill it into two photo-taking tasks respectively.
[0257] S58: The queue management module sends the photo data corresponding to the two photo requests to the device interconnection service respectively.
[0258] In other words, at this time, the photo management module sends the corresponding photo data to the two central devices through the device interconnection service.
[0259] S59: The device interconnection service sends the corresponding photo data to the two central devices respectively.
[0260] Specifically, when two central devices simultaneously establish connections with an IoT device, they use different transmission channels that do not interfere with each other. Each channel corresponds to one central device, thus establishing a first correspondence between the photo request, the transmission channel, and the central device. A second correspondence exists between the photo request / task and the photo data. Based on these first and second correspondences, the photo data can be transmitted back to the correct central device via the correct transmission channel.
[0261] The following explanation uses the central side device 10a as an example. The principle is similar for the central side device 10b, and will not be repeated here.
[0262] Once the central device 10a establishes a connection channel with the IoT device, the photo request 1 sent by the central device 10a will carry a channel identifier indicating the corresponding transmission channel.
[0263] The photo request may also include, but is not limited to, the image sequence number, IoT device information (i.e., lamp information), virtualized hardware identifier (i.e., lamp camera identifier), and camera configuration parameters. Camera configuration parameters include, but are not limited to, image resolution. Furthermore, the photo request may also carry a task identifier to ensure the orderly management of multiple photo-taking tasks.
[0264] A photo task 1 is created based on photo request 1. After photo task 1 is completed, photo data 1 corresponding to photo request 1 is obtained. At this time, based on the channel identifier carried in photo request 1, photo data 1 can be transmitted through the correct channel.
[0265] Understandably, although the final photo data filled in for photo task 1 and photo task 2 is the same, the photo task still needs to correspond to a unique photo request and return the photo data through a unique transmission channel. Only when the central device receives the photo data will it consider the photo request to be completed.
[0266] Furthermore, the maximum number of photo-taking tasks allowed in the photo-taking queue corresponds to the number of established transmission channels. When one transmission channel is established, i.e., when the IoT device establishes a transmission channel with one central device, the photo-taking queue space allows a maximum of one photo-taking task to be queued; when two transmission channels are established, i.e., when the IoT device establishes transmission channels with two central devices, the photo-taking queue space allows a maximum of two photo-taking tasks to be queued.
[0267] Because the collaborative system in this application supports idle release channels, when a channel established between the central device and the IoT device has not transmitted data for an extended period, the channel will be destroyed to free up space and reduce resource consumption. Therefore, the photo-taking task queue does not need to be too long; it only needs to be the same as the number of transmission channels and can be dynamically changed to reduce resource consumption. When a channel established between the central device and the IoT device is destroyed due to a long period of inactivity, the photo-taking task queue can also be deleted to free up storage space and reduce resource consumption.
[0268] Furthermore, in some embodiments, the upper limit of the number of photo-taking tasks allowed to be inserted into the photo-taking queue may also be greater than the number of established transmission channels. For example, this upper limit may be the maximum number of central-side devices that an IoT device is allowed to connect to. This application does not limit the maximum number of central-side devices that can be connected.
[0269] The above explanation uses the example of an IoT device connecting two central devices. The principle is similar when an IoT device connects to one central device, and will not be repeated here.
[0270] In summary, the photo-taking method provided in this application arranges the photo-taking tasks corresponding to each photo-taking request through a photo-taking task queue, with the queue arranged in chronological order. Only the photo-taking request command corresponding to the photo-taking task at the head of the queue is issued, avoiding repeated issuance of photo-taking tasks that could cause camera driver crashes or malfunctions. After acquiring the photo data, the photo data is sent to each electronic device, thus completing multiple photo-taking tasks in a single photo capture. Using this solution, an IoT device can simultaneously receive photo-taking requests from multiple central devices and correctly transmit the photos back to these central devices, avoiding interruptions to the virtual camera photo-taking service due to abnormal photo transmission, thereby improving the user experience.
[0271] Based on the photography method provided in the above embodiments, this application also provides an Internet of Things (IoT) device.
[0272] See also Figure 3a The diagram shows an IoT device.
[0273] The Internet of Things (IoT) provided in this application includes: a camera 201, a memory 203, and a processor 210.
[0274] The memory 203 is coupled to the processor 210, and the camera 201 is coupled to the processor 210. In some embodiments, the number of cameras 201 can be multiple.
[0275] The IoT device provided in this application embodiment utilizes a photo-taking task queue to arrange photo-taking tasks corresponding to each photo-taking request, with the queue arranged in chronological order. Only the photo-taking request command corresponding to the photo-taking task at the head of the queue is issued, avoiding repeated issuance of photo-taking tasks that could cause camera driver crashes or malfunctions. After acquiring photo data, the photo data is sent to each electronic device separately, thus completing multiple photo-taking tasks with a single photo capture. Therefore, this IoT device can correctly transmit photos back to multiple central devices after simultaneously receiving photo-taking requests from multiple central devices, avoiding interruptions to the virtual camera photo-taking service due to abnormal photo transmission, thereby improving the user experience.
[0276] Furthermore, embodiments of this application also provide a collaborative work system.
[0277] See Figure 7 This figure is a schematic diagram of a collaborative work system provided in an embodiment of this application.
[0278] The collaborative work system 30 includes: electronic device 10a, electronic device 10b, and IoT device 20.
[0279] Electronic devices 10a and 10b are also known as central-side devices. For details regarding the specific implementations of electronic devices 10a and 10b and the IoT device 20, please refer to the relevant descriptions in the above embodiments; these will not be repeated here.
[0280] In this embodiment, the example of electronic devices 10a and 10b simultaneously establishing a transmission channel with IoT device 20 is used for illustration. In actual applications, the collaborative work system 30 may include only one electronic device or three or more electronic devices, which will not be elaborated further in this embodiment.
[0281] The electronic device can specifically be a tablet computer, mobile phone, laptop computer, or desktop computer; this application embodiment does not impose specific limitations. An IoT device can be a desk lamp.
[0282] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are run on an IoT device, the IoT device executes the above-described related method steps to achieve the taking of a picture in the above embodiment.
[0283] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement the photographing method described in the above embodiment.
[0284] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory. The memory is used to store computer execution instructions. When the apparatus is running, the processor can execute the computer execution instructions stored in the memory to cause the chip to execute the photographing methods in the above-described method embodiments.
[0285] In this embodiment, the IoT device, computer storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.
[0286] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another apparatus, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0287] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for taking photos, characterized in that, Applied to Internet of Things (IoT) devices, which are used to connect at least two electronic devices, the image-taking method includes: Receive at least two photo-taking requests from the at least two electronic devices, wherein each of the at least two electronic devices sends one photo-taking request; For each of the at least two photo requests, a corresponding photo task is created, and each photo task is inserted into the photo task queue in the order in which each photo request is received. The first photo task in the photo task queue is the photo task corresponding to the first photo request received. Perform the first photo-taking task to obtain photo data; Send the photo data to the at least two electronic devices; The step of creating a corresponding photo-taking task for each of the at least two photo-taking requests, and inserting each photo-taking task into the photo-taking task queue in the order in which each photo-taking request is received, specifically includes: Create a corresponding photo-taking task for each of the at least two photo-taking requests; Store the correspondence between each photo-taking request and the corresponding photo-taking task; Each of the at least two photo-taking requests is inserted into the photo-taking task queue in the order in which they are received.
2. The photographing method according to claim 1, characterized in that, Before inserting each of the photo-taking requests into the photo-taking task queue according to the order in which they are received, the method further includes: Generate the photo-taking task queue.
3. The photographing method according to claim 2, characterized in that, The generation of the photo-taking task queue specifically includes: The maximum number of transmission channels that the IoT device is allowed to establish is used as the upper limit for the number of photo tasks that can be inserted into the photo task queue. The transmission channels are used to transmit the photo request and the photo data. Each electronic device establishes at most one transmission channel with the IoT device.
4. The photographing method according to claim 2, characterized in that, The generation of the photo-taking task queue specifically includes: The number of transmission channels currently established by the IoT device is used as the upper limit for the number of photo tasks that can be inserted into the photo task queue, and the photo task queue is created; the transmission channels are used to transmit the photo request and the photo data, and each electronic device establishes at most one transmission channel with the IoT device.
5. The photographing method according to any one of claims 3 or 4, characterized in that, The method further includes: When all the transmission channels established by the IoT device are destroyed, the photo-taking task queue is deleted.
6. The photographing method according to claim 1, characterized in that, The execution of the first photo-taking task to obtain photo data specifically includes: Send the photo request command corresponding to the first photo capture task to the camera driver of the IoT device; The camera driver drives the camera of the IoT device to capture images to obtain the photo data.
7. The photographing method according to claim 1, characterized in that, Sending the photo data to the at least two electronic devices specifically includes: Copy the photo data and populate the photo data into each photo task in the photo task queue; Based on the stored correspondence between each photo request and its corresponding photo task, the photo data filled in the photo task corresponding to each photo request is sent back to the electronic device that sent the photo request.
8. An Internet of Things (IoT) device, characterized in that, The IoT devices include: A camera, a memory, and a processor, wherein the memory is coupled to the processor, and the camera is coupled to the processor; The memory stores program instructions that, when executed by the processor, cause the IoT device to perform the photographing method according to any one of claims 1-7.
9. A collaborative work system, characterized in that, The system includes at least one electronic device, and further includes the Internet of Things device as described in claim 8.
10. The collaborative work system according to claim 9, characterized in that, The collaborative working system includes at least two electronic devices, each of which establishes a transmission channel with the Internet of Things device.
Citation Information
Patent Citations
Internet of Things experimental device
CN108391098A