Intelligent device control method and system

Through Bluetooth memory access technology, the perceived data of smart devices is transmitted to the gateway for processing, solving the problem of increasing costs and complex maintenance of smart home devices due to the separate installation of processors, and achieving the effect of reducing costs and improving upgrade convenience.

CN117111483BActive Publication Date: 2024-11-22HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310183380.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-20
Publication Date
2024-11-22
Estimated Expiration
2043-02-20

AI Technical Summary

Technical Problem

The existing smart home devices need to be equipped with a separate processor to process sensor data, resulting in increased costs and complicated upgrades and maintenance, reducing the convenience and efficiency of the equipment.

Method used

Through Bluetooth memory access technology, the perceived data of the smart device is transmitted to the gateway for processing, avoiding the device being equipped with a processor alone, and only the gateway is upgraded to achieve functional upgrades.

Benefits of technology

It reduces the cost of a single smart device, improves the convenience of upgrading and maintenance of smart devices, simplifies user operations, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117111483B_ABST
    Figure CN117111483B_ABST
Patent Text Reader

Abstract

The present application provides a method and system for controlling a smart device, which relates to the field of smart devices. The method includes: the smart device obtains perception data through a sensor and sends the perception data to a gateway; after the gateway receives the perception data sent by the smart device, it processes the perception data and obtains corresponding processing; the gateway sends a current control command to the smart device according to the corresponding processing result; after the smart device receives the current control command, it executes the current control command. Through Bluetooth memory access technology, the perception data obtained by the smart device is sent to the gateway, and the gateway processes the perception data. Since the perception data is processed by the gateway, the smart device does not need to be equipped with a separate processor to process the perception data, so the cost of a single smart device is reduced, and when the smart device needs to be upgraded, it only needs to be upgraded on the gateway side, which greatly improves the convenience of upgrading and maintaining the smart device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent gateways, and in particular to an intelligent device control method and system. Background Art

[0002] With the development of science and technology, smart devices (such as smart home devices) have been gradually applied to users' daily lives. The vigorous development of smart devices has changed the daily lifestyles of users. The current smart home control systems mainly include gateway devices and smart devices, and the linkage of multiple smart devices is mainly achieved through gateway devices.

[0003] Taking smart home devices as an example, with the development of science and technology, smart home devices equipped with complex sensors have emerged. The requirements for computing performance of smart home devices are getting higher and higher, so more complex smart home devices are usually equipped with independent processors to process sensor data separately to achieve corresponding functions. For example: face recognition door locks are equipped with NPU chips, which process sensor data through the NPU chip to achieve the function of offline face identity verification.

[0004] It can be seen from this that currently existing smart devices need to be equipped with independent processors to realize corresponding functions, which increases the cost of a single smart device and makes it difficult to upgrade and maintain the smart device. Summary of the invention

[0005] The present application provides a smart device control method and system, which reduces the cost of a single smart device and improves the convenience of upgrading and maintaining the smart device.

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

[0007] In the first aspect, the present application provides a method for controlling a smart device, which is applied to a gateway, and the method includes: receiving perception data sent by a smart device, the perception data is data obtained by the smart device through a sensor, and after receiving the perception data, processing the perception data to obtain a processing result, and according to the processing result, sending a current control command to the smart device again, thereby controlling the smart device through the control command. Through Bluetooth memory access technology, the perception data obtained by the smart device through the sensor is transmitted to the gateway, and the gateway processes it, so that the smart device does not need to be equipped with a separate processor to process the perception data, reducing the cost of a single smart device. Furthermore, when the smart device needs to be upgraded, it only needs to upgrade the computing power in the gateway (for example: adding a new computing module, adding a new chip, etc.), which greatly improves the convenience of upgrading and maintaining the smart device.

[0008] In a possible implementation, a previous control command is first sent to the smart device, and when the smart device determines that the type of the previous control command is a first type, the perception data is sent to the gateway. The first type may be a type of a memory access command, etc., so the gateway needs to access the perception data of the smart device to process the perception data.

[0009] In a possible implementation, the last control command is obtained according to the operation request. After the processing result is obtained, the task status corresponding to the operation request is updated according to the corresponding processing result. According to the updated task status, it is determined whether the task corresponding to the operation request has been completed. If it is determined that the task corresponding to the operation request has not been completed, the current control command for the smart device is generated and sent to the smart device to control the smart device. In this way, the task corresponding to the operation request can be directly completed through the gateway without manual operation, which simplifies the user operation and improves the user experience.

[0010] In one possible implementation, a current device state is received from a smart device, where the current device state is obtained when the smart device determines that the type of the previous control command is the second type, and executes a corresponding physical operation according to the previous control command. When the physical operation is completed, the current control command is sent to the smart device according to the current device state to control the smart device.

[0011] In one possible implementation, the last control command is obtained based on the operation request. After receiving the current device status sent by the smart device, the task status corresponding to the control request is updated according to the current device status. It is determined whether the corresponding task has been completed according to the updated task status. If it is determined that the task corresponding to the operation request is not completed, the current control command for the smart device is generated and sent to the smart device to control the smart device. In this way, the task corresponding to the operation request can be completed directly through the gateway without manual operation, which simplifies user operation and improves user experience.

[0012] In a possible implementation, the gateway feeds back the updated task status to the user end, so that the user can pay attention to the task completion status in real time and can grasp the task progress in real time.

[0013] In the second aspect, the present application provides a method for controlling an intelligent device, which is applied to an intelligent device, and the intelligent device includes at least one sensor. The method includes: obtaining perception data through at least one sensor, sending the perception data to a gateway so that the gateway processes the perception data to obtain a processing result, and then sending a current control command to the gateway according to the processing result, receiving the current control command returned by the gateway according to the processing result, and executing the current control command. The intelligent device obtains the perception data through the sensor, and then sends the perception data to the gateway for processing through remote Bluetooth memory access technology, and executes the current control command. The perception data is processed by the gateway, so the intelligent device does not need to carry an additional processor to process the perception data separately, which reduces the cost of a single intelligent device. When the intelligent device needs to be upgraded, the corresponding computing power needs to be improved accordingly. The present application only needs to upgrade the processor in the intelligent gateway or add a computing module to complete the upgrade, so the convenience of upgrading and maintaining the intelligent device is improved.

[0014] In one possible implementation, a last control command sent by a gateway is received, and the type of the last control command is determined. When it is determined that the type of the last control command is the first type, perception data is sent to the gateway so that the gateway processes the perception data and obtains a processing result.

[0015] In one possible implementation, after receiving the last control command sent by the gateway, the type of the last control command is determined. When it is determined that the type of the last control command is the second type, the corresponding physical operation is performed according to the last control command; when the corresponding physical operation is completed, the current device state is obtained, and the current device state is sent to the gateway, so that the gateway returns the current control command according to the current device state; the current control command is received and executed.

[0016] On the third aspect, the present application provides a control system, which includes: a gateway and at least one smart device. The smart device includes at least one sensor, and the smart device obtains perception data through the at least one sensor and sends it to the gateway. The gateway receives the perception data, processes the perception data, obtains the corresponding processing results, and sends the current control command to the smart device according to the processing results, and the smart device executes the current control command. Through Bluetooth memory access technology, the smart device sends the perception data to the gateway for processing, so that the smart device does not need to be equipped with a separate processor to process the perception data, reducing the cost of a single smart device. Furthermore, when the smart device needs to be upgraded, it only needs to upgrade the computing power of the gateway (for example: adding a new computing module, adding a new chip, etc.), which greatly improves the convenience of upgrading and maintaining the smart device.

[0017] In a fourth aspect, the present application provides a gateway, which is an electronic device including a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor executes the method of the first aspect above.

[0018] In a fifth aspect, the present application provides an intelligent device, which includes a processor and a memory; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory, so that the processor executes the method of the above-mentioned second aspect.

[0019] In a sixth aspect, the present application provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed, the methods of the first and second aspects mentioned above are implemented.

[0020] In a seventh aspect, the present application provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the methods of the first and second aspects above. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1A A schematic diagram of a scenario of a currently existing smart home system provided in an embodiment of the present application;

[0022] Figure 1B A schematic diagram of the composition of a sensor of a smart device provided in an embodiment of the present application;

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

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

[0025] Figure 3 A schematic diagram of a scenario of a smart home control system provided in an embodiment of the present application;

[0026] Figure 4 A flowchart of a smart device control method provided in an embodiment of the present application;

[0027] Figure 5 A schematic diagram of the architecture of an intelligent device system provided in an embodiment of the present application;

[0028] Fig. 6A A schematic diagram of a desktop interface of an electronic device provided in an embodiment of the present application;

[0029] Figure 6B A schematic diagram of an interface of a smart home application provided in an embodiment of the present application;

[0030] Figure 6C A schematic diagram of a control interface of a sweeping robot 2002 in a smart home provided in an embodiment of the present application;

[0031] Figure 7 A schematic diagram of the structure of a smart device system provided in an embodiment of the present application;

[0032] Figure 8 A schematic diagram of the structure of a Bluetooth memory access controller provided in an embodiment of the present application;

[0033] Fig. 9 A schematic diagram of the structure of a Bluetooth controller provided in an embodiment of the present application;

[0034] Fig.10 A scenario diagram of an electronic device expansion system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0035] The terms "first", "second", "third", etc. in the specification, claims and drawings of this application are used to distinguish different objects rather than to limit a specific order.

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

[0037] In order to make the description of the following embodiments clear and concise, a brief introduction to the related technology is first given:

[0038] A sensor (transducer / sensor) is a detection device that can sense the information being measured and convert the sensed information into electrical signals or other required forms of information output according to certain rules to meet the requirements of information transmission, processing, storage, display, recording and control.

[0039] Sensor data is data sensed, measured and transmitted by a sensing device or sensor equipment. A sensing device or sensor equipment may include one or more sensors. There are many types of sensor data, such as sensor data of the human body, sensor data of network signals and sensor data of weather. Sensor data can be used for data analysis. For example, a sweeping robot builds a map of the room and locates its location based on sensor data.

[0040] The advantages of a smart device control method provided by the present application are compared and explained below in combination with the currently available smart device control system. The smart device control system is explained by taking a smart home control system as an example.

[0041] For ease of understanding, the following Figure 1A , Figure 1B The currently available smart home control system is introduced in detail. The currently available smart home control system includes a gateway 10 and multiple smart home devices, wherein the multiple smart home devices are described by taking a face recognition door lock 21, a sweeping robot 22, and a smart voice speaker 23 as examples. It should be noted that the multiple smart home devices are described by taking three smart home devices as an example, and may also be two smart home devices, four smart home devices, etc., which are not specifically limited in the embodiments of the present application.

[0042] In the current common smart home control system, the face recognition door lock 21, the sweeping robot 22 and the smart voice speaker 23 are linked through the gateway 10. Among them, the gateway 10 is mainly responsible for the unification of the gateway protocol and the transmission of data (such as control commands, device status, etc.). The gateway is also called the network connector and protocol converter. Its purpose is to provide communication and interconnection services between devices with different communication protocols.

[0043] In order to meet the needs of users for smart home devices, smart home devices equipped with complex sensors have emerged and are widely used. For example, the sensors carried by the face recognition door lock 21 include infrared cameras, centimeter wave radars, and ToF distance sensors, the sensors carried by the sweeping robot 22 include laser radars, binocular cameras, and ultrasonic sensors, and the sensors carried by the smart voice speaker 23 include microphone arrays, infrared light sensors, and infrared emission sensors. With the emergence of smart home devices equipped with load sensors, the requirements for computing performance of smart home devices are getting higher and higher. Therefore, for existing smart home devices containing complex sensors, independent processors are usually separately equipped to process sensor data to achieve corresponding functions. Among them, the face recognition door lock 21 is equipped with an NPU chip, the sweeping robot 22 is equipped with an ARM processor, and the smart voice speaker 23 is equipped with an ARM processor. The face recognition door lock 21 can realize offline verification of the director's identity through the NPU chip carried by itself, the sweeping robot 22 realizes map construction and location positioning through the ARM processor carried by itself, and the smart voice speaker 23 realizes offline use through the ARM processor carried by itself.

[0044] In the above-mentioned smart home control system, the gateway has a relatively simple responsibility, which is responsible for the unification of gateway protocols and data transmission. In order to meet user needs, smart home devices containing sensors need to be equipped with a separate processor to process the sensor data to achieve the corresponding functions. Since smart devices need to be equipped with independent processors to process sensor data, the manufacturing cost of a single smart device increases.

[0045] Furthermore, since each smart home device is equipped with an independent processor, when the smart home device needs to be upgraded or maintained, the corresponding smart home device needs to be upgraded or maintained separately. On the one hand, if a certain model of smart home device needs to be upgraded, all corresponding smart home devices need to be upgraded separately. The number of corresponding smart home devices affects the time consumed for the upgrade, and the upgrade of the corresponding smart home device separately consumes the upgrade resources repeatedly. On the other hand, the upgrade or maintenance of smart home devices is mainly aimed at upgrading or maintaining the processors carried. Due to the limitations of smart home devices, the upgrade or maintenance of the processor may require the replacement of the processor or the removal of the processor separately for corresponding processing, which increases the complexity of the upgrade and maintenance of smart home devices. The upgrade and maintenance of existing smart home devices not only takes a long time and repeatedly consumes upgrade and maintenance resources, but also has a high degree of difficulty in upgrade and maintenance. Therefore, in the current existing smart device control system, the upgrade and maintenance efficiency of smart devices is low.

[0046] The present application provides a method for controlling a smart device. Based on the Bluetooth remote memory access technology, an operation request for a smart device is obtained. Based on the operation request, a smart gateway generates a corresponding control command, and sends the control command to the corresponding smart device. The smart device determines the type of the control command. When the type of the control command is the first type, the smart device reads the perception data stored in the preset address of the memory corresponding to the control command and sends it to the smart device. The smart gateway processes the received perception data to obtain a corresponding processing result. The perception data is transmitted to the smart gateway through the Bluetooth memory access technology, and the processor of the smart gateway performs calculation processing. The smart device does not need to carry an additional processor to process the perception data, thereby reducing the cost of a single smart device.

[0047] Furthermore, when a smart device needs to be upgraded, the corresponding computing power needs to be improved accordingly. The upgrade can be completed by upgrading the processor in the smart gateway or adding a computing module. There is no need to upgrade the processors of all smart devices, thus improving the convenience of upgrading and maintaining smart devices.

[0048] In some embodiments, the electronic device may be a mobile phone, a tablet computer, a desktop, a laptop, a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, a personal digital assistant (PDA), a wearable electronic device, a smart watch, etc. The present application does not impose any special restrictions on the specific form of the above electronic devices. In this embodiment, the structure of the electronic device may be as follows: Figure 2A As shown, Figure 2A A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0049] like Figure 2A As shown, the electronic device may include a processor 110, an antenna 1, a wireless communication module 120, a display screen 130, a touch sensor 140, a button 150, and the like.

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

[0051] The processor 110 may include one or more processing units, for example, the processor 110 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), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural-network processing unit (neural-network processing unit, NPU), etc. Among them, different processing units can be independent devices or integrated in one or more processors. For example, in the present application, a corresponding operation request can be sent to the smart device through a preset application.

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

[0053] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0054] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0055] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 140, the charger, the flash, the camera, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 140 through the I2C interface, so that the processor 110 communicates with the touch sensor 140 through the I2C bus interface to realize the touch function of the electronic device.

[0056] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 120. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 120 through the UART interface to implement the Bluetooth function.

[0057] The MIPI interface can be used to connect the processor 110 with the display screen 130, the camera and other peripheral devices. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the display screen 130 communicate through the DSI interface to realize the display function of the electronic device.

[0058] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera display screen 130, the wireless communication module 120, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0059] It is understandable that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0060] The wireless communication function of the electronic device can be implemented through the antenna 1, the wireless communication module 120, the modem processor and the baseband processor.

[0061] Antenna 1 is used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antenna. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0062] 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-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device, or displays an image or video through the display screen 130. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module or other functional modules.

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

[0064] In some embodiments, the antenna of the electronic device is coupled to the mobile communication module, and the antenna 1 is coupled to the wireless communication module 120, so that the electronic device can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS) and / or satellite based augmentation system (SBAS).

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

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

[0067] A series of graphical user interfaces (GUIs) can be displayed on the display screen 130 of the electronic device, and these GUIs are the main screens of the electronic device. Generally speaking, the size of the display screen 130 of the electronic device is fixed, and only limited controls can be displayed on the display screen 130 of the electronic device. A control is a GUI element, which is a software component included in an application program, and controls all data processed by the application program and interactive operations on the data. Users can interact with the control through direct manipulation to read or edit relevant information of the application program. Generally speaking, a control can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc.

[0068] The touch sensor 140 is also called a "touch control device". The touch sensor 140 can be set on the display screen 130. The touch sensor 140 and the display screen 130 form a touch screen, also called a "touch control screen". The touch sensor 140 is used to detect touch operations acting 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 the touch operation can be provided through the display screen 130. In other embodiments, the touch sensor 140 can also be set on the surface of the electronic device, which is different from the position of the display screen 130.

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

[0070] In addition, an operating system is running on the above components, such as the iOS operating system developed by Apple, the Android open source operating system developed by Google, and the Windows operating system developed by Microsoft. Application programs can be installed and run on the operating system.

[0071] The operating system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device.

[0072] Figure 2B It is a software structure block diagram of the electronic device according to an embodiment of the present application.

[0073] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system library, and the kernel layer.

[0074] The application layer can include a series of application packages. Figure 2B As shown, the application package may include applications such as calendar, call, map, navigation, WLAN, Bluetooth, short message, home control, etc.

[0075] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 2B As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0076] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0077] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0078] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0079] The phone manager is used to provide communication functions for electronic devices, such as the management of call status (including answering, hanging up, etc.).

[0080] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0081] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0082] Android Runtime includes core libraries and virtual machines. Android runtime is responsible for scheduling and management of the Android system.

[0083] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.

[0084] The application layer and the application framework layer run in a virtual machine. 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 life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0085] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0086] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.

[0087] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0088] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0089] A 2D graphics engine is a drawing engine for 2D drawings.

[0090] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.

[0091] It should be noted that although the embodiments of the present application are described using the Android system as an example, its basic principles are also applicable to electronic devices based on operating systems such as iOS and Windows.

[0092] Embodiment 1:

[0093] Combine the following Figure 3-6C , a smart device control method provided in an embodiment of the present application is introduced in detail, the method is applied to a smart device system, the smart device system includes: a smart gateway 100 and a smart device 200, wherein the smart device 200 includes a sensor, a memory, a Bluetooth controller, and a Bluetooth memory access controller, wherein the sensor, the memory, and the Bluetooth controller are respectively connected to the Bluetooth memory access controller, and the smart device 200 supports the Bluetooth / Bluetooth Mesh protocol.

[0094] It should be noted that the intelligent gateway 100 is a type of gateway, or it can be said to be a gateway that carries a processor capable of processing corresponding perception data. In the embodiments of the present application, such gateways are collectively referred to as intelligent gateways. In addition, there may be other names in other cases, and this application does not make specific limitations.

[0095] like Figure 3A scene diagram of a smart home system is shown, in which the smart devices 200 are taken as examples of face recognition door lock 2001, sweeping robot 2002 and smart voice speaker 2003. The smart gateway 100 sends a control command to the face recognition door lock 2001, and the face recognition door lock 2001 returns the corresponding perception data or the current device state of the face recognition door lock. When the smart gateway 100 receives the perception data (sensor data) returned by the face recognition door lock 2001, the processor carried by the smart gateway 100 processes the received perception data returned by the face recognition door lock 2001. The interaction process between the sweeping robot 2002 and the smart voice speaker 2003 and the smart gateway 100 is similar to the interaction process between the face recognition door lock 2001 and the smart gateway 100, and no further detailed description is given.

[0096] Specific, combined Figure 4 A flow chart of a method for controlling an intelligent device is shown and Figure 5 The schematic diagram of the architecture of the smart device system shown in the figure provides a detailed introduction to the specific process of a smart device control method provided in an embodiment of the present application.

[0097] S401 : A user makes an operation request to the smart device 200 .

[0098] The operation request is a request for requesting the smart device 200 to implement / execute a corresponding operation. For example, a user requests a sweeping robot to clean the whole house through a specific software.

[0099] For ease of understanding, the following Figure 6A-6C The interface diagram of the electronic device 300 shown in the figure describes in detail the operation request made by the user to the smart device 100. The smart device 200 is a cleaning robot 2002 as an example, and the operation request is described by requesting the cleaning robot to clean the whole house as an example.

[0100] like Fig. 6AThe desktop interface schematic diagram of the electronic device 300 shown in the figure, after the user unlocks the electronic device 300, the electronic device 300 can present a desktop interface 600 to the user, and the desktop interface 600 includes icons of various applications, such as a phone icon, a contact icon, an Internet icon, a text message icon, a smart home icon 601, etc. The user can trigger an operation on the application icon, such as clicking, long pressing, sliding, etc. After the electronic device receives the operation triggered by the user, it starts the corresponding application. When the user clicks the smart home icon 601 on the desktop interface 600 of the electronic device 100, the smart home application interface 610 is entered. It should be noted that smart home is an application that can be used to control the sweeping robot 2002. In addition to smart home, the application for controlling the sweeping robot 2002 can also be other applications such as smart home, which is not specifically limited in this application.

[0101] like Figure 6B The schematic diagram of the application interface of the smart home is shown, and the application interface 610 of the smart home includes the name icons of multiple smart home devices, such as: an icon of a smart curtain, an icon of a central air conditioner, an icon of a smart desk lamp, an icon of a projector, an icon 611 of the sweeping robot 220, etc. When the user clicks the icon 611 of the sweeping robot 220, the control interface 620 of the sweeping robot 220 is entered.

[0102] like Figure 6C The control interface diagram of the sweeping robot 2002 is shown, and the control interface 620 of the sweeping robot 2002 includes: a power status display box of the sweeping robot 2002, a charging status display box of the sweeping robot 2002, a whole house cleaning icon 621, a stop cleaning icon 622, a return to charging compartment icon, etc. When the user clicks the whole house cleaning icon 621, it means that the user requests the sweeping robot 2002 to clean the whole house, that is, the user makes an operation request for the sweeping robot 2002 to clean the whole house.

[0103] In addition, the present application also supports actively sending operation requests for the smart device 200 to the smart gateway 100 through the smart device 200. For example, when a user stands in front of a face recognition door lock, and the face recognition door lock needs to recognize and verify the user's face, the face recognition door lock sends an operation request to the smart gateway to request recognition of the user's face, so as to control the face recognition door lock to recognize and verify the user's face.

[0104] S402: After receiving the operation request, the intelligent gateway 100 parses the operation request and generates a control command.

[0105] Specifically, the application layer 101 of the smart gateway 100 receives an operation request from a user for the smart device 200, and parses the operation request to obtain a control command corresponding to the operation request.

[0106] S403: The intelligent gateway 100 sends the control command to the intelligent device 200.

[0107] Specifically, the smart gateway 100 sends a data message (also referred to as a data packet) containing a control command to the smart device 200 .

[0108] Among them, the purpose of the data message is to send relevant information of the control command to the smart device 200, including: the unique identification of the target smart device, encryption, data length, the protocol used, etc., for example: the identification of the target smart device, that is, the unique identification of the smart device 200, to ensure that the control command can be accurately sent to the target smart device.

[0109] Specifically, after the application layer 101 of the smart gateway 100 parses and obtains the control command, the control command is handed over to the communication layer 104 of the smart gateway 100 , and the data message containing the control command is sent to the smart device 200 through the communication layer 104 of the smart gateway 100 .

[0110] S404: After receiving the control command, the smart device 200 parses the control command.

[0111] Specifically, after receiving the data message containing the control command sent by the smart gateway 100, the communication layer 204 of the smart device 200 hands the data message containing the control command to the control layer 203 of the smart device 200, and the control layer 203 of the smart device 200 parses and processes the data message containing the control command, thereby obtaining relevant information carried by the data message containing the control command, such as: the type of the control command, the identifier of the control command, etc.

[0112] S405: The smart device 200 determines the type of the control command based on the analysis result.

[0113] The types of control commands include: a first type and a second type.

[0114] The control command type is a first type of control command used to access or read the sensing data stored in the smart device. For example, the storage access command type is a first type.

[0115] The control command type of the second type is used to control the smart device to perform a corresponding operation / action. For example, the control command type is the second type.

[0116] When the type of the control command is the first type, proceed to S406.

[0117] When the type of the control command is the second type, directly proceed to S410.

[0118] S406. The smart device 200 obtains corresponding perception data according to the control command.

[0119] Specifically, when the type of the control command is the first type, the storage layer 202 of the smart device 200 is accessed according to the control command, thereby obtaining the perception data (also referred to as sensor data) of the target address in the storage layer 202 of the smart device 200. The target address is the storage address corresponding to the control command.

[0120] The perception data of the target address is the perception data written by the perception layer 201 of the smart device 200 to the target address of the storage layer 202 of the smart device 200 .

[0121] It should be noted that, in general, the perception data is binary data, which is convenient for computers / processors to process the data. In addition, the perception data can also be octal data, decimal data, hexadecimal data, etc., and this application does not make specific limitations.

[0122] Specifically, when the type of the control command is the first type, the control command carries the address of the storage layer of the corresponding memory access smart device, so as to obtain the corresponding sensor data according to the address information of the memory access data carried by the control command.

[0123] S407 , the smart device 200 sends the corresponding perception data to the smart gateway 100 .

[0124] Specifically, after the smart device 200 obtains the corresponding perception data from its own storage layer 202 and encapsulates the corresponding perception data, the smart device 200 sends the encapsulated perception data to the communication layer 104 of the smart gateway 100 through its own communication layer 204 .

[0125] S408. After receiving the corresponding perception data, the intelligent gateway 100 processes the corresponding perception data to obtain a corresponding processing result.

[0126] Specifically, after the communication layer 104 of the intelligent gateway 100 receives the corresponding perception data, it stores the corresponding perception data in the storage layer 103 of the intelligent gateway 100, and delivers the corresponding perception data to the computing layer 102 of the intelligent gateway 100 through the storage layer 103 of the intelligent gateway 100. The computing layer 102 processes the corresponding perception data and delivers the processing results of the perception data to the application layer 101 of the intelligent gateway 100.

[0127] S409: The smart device 200 controls itself to perform corresponding physical operations according to the control command.

[0128] Specifically, when the control command type is the second type, the control layer 203 of the smart device 200 controls the smart device 200 to perform the corresponding physical operation. For example, when the control command is to turn on the power, the smart voice speaker automatically turns on the power of the smart voice speaker device when receiving the power on control command.

[0129] S410: After the corresponding physical operation is completed, the smart device 200 obtains its current device state.

[0130] Specifically, after the physical operation corresponding to the smart device 200 is completed, the control layer 202 of the smart device 200 obtains the current device state of the smart device 200 .

[0131] The device status includes: on, off, charging, charging completed, etc. For example, when the control command is to turn on the power, the smart voice speaker automatically turns on the power after receiving the control command, and the current device status of the smart voice speaker is: on.

[0132] Furthermore, the smart device 200 stores the acquired device status in the storage layer 202 of the smart device 200 .

[0133] S411, the smart device 200 sends the acquired device status to the smart gateway 100.

[0134] Specifically, the smart device 200 encapsulates the acquired device status and sends it to the communication layer 104 of the smart gateway 100 through the communication layer 204 of the smart device 200 .

[0135] S412: The intelligent gateway 100 updates the task status.

[0136] Specifically, when the type of the control command is the first type, the intelligent gateway 100 updates the task status according to the processing result of the perception data; when the type of the control command is the second type, the intelligent gateway 100 updates the task status according to the received device status.

[0137] Specifically, when the type of the control command is the first type, the application layer 101 of the intelligent gateway 100 automatically updates the status of the task corresponding to the operation request according to the corresponding processing result.

[0138] Specifically, when the type of the control command is the second type, after the communication layer 104 of the intelligent gateway 100 receives the current device status of the intelligent device 200, the intelligent gateway 100 sends the device status to the application layer 101 of the intelligent gateway 100 through the storage layer 103 and the computing layer 102 of the intelligent gateway 100. The application layer 101 of the intelligent gateway 100 automatically updates the status of the task corresponding to the operation request according to the device status.

[0139] Among them, the task status includes: task completed, task in progress, and the progress of task completion is reflected in percentage.

[0140] For ease of understanding, step 412 is described in detail below with an example.

[0141] Taking the operation request of requesting the sweeping robot to clean the whole house as an example, the control command of the first type obtained is: constructing a whole house map as an example.

[0142] When the user operates the sweeping robot to clean the whole house through the corresponding APP, the smart gateway parses the operation request and obtains the corresponding control command. According to daily usage, the sweeping robot needs to first establish / acquire a map of the whole house before it can control itself to clean the whole house. The smart gateway parses the operation request and obtains the corresponding control command. First, it establishes a map of the whole house. Therefore, when the smart gateway processes the corresponding perception data sent by the sweeping robot, the processing result is to obtain a map of the whole house. The smart gateway can update the task status to task in progress (or the task is 20% completed, ready, etc.) according to the processing result.

[0143] Taking the operation request of requesting to turn on the power of the smart voice speaker as an example, the obtained type is the second type of control command of turning on the power of the smart voice speaker as an example.

[0144] When the user turns on the power of the smart voice speaker through the corresponding APP operation, the smart gateway parses the operation request and obtains the control command (turn on the power of the smart voice speaker). The smart gateway sends the control command to the smart voice speaker. The smart voice speaker automatically turns on the power according to the control command, and obtains the current device status of the smart voice speaker: the on status, and sends the on status to the smart gateway. The smart gateway updates the task status according to the on status: task completed.

[0145] Furthermore, the intelligent gateway 100 can feed back the updated task status to the user through its own application layer 101 .

[0146] Specifically, the updated task status may be fed back to the user through a corresponding application, or through other methods, which are not specifically limited in this application.

[0147] S413: The intelligent gateway 100 determines whether the corresponding task is completed according to the updated task status.

[0148] Specifically, the application layer 101 of the intelligent gateway 100 determines whether the task corresponding to the operation request is completed according to the updated task status.

[0149] If so, the task ends.

[0150] If not, proceed to S414.

[0151] S414: When the corresponding task is not completed, the smart gateway 100 automatically generates the next control command for the smart device 200.

[0152] The next control command may also be referred to as the current control command.

[0153] It should be noted that the next control command can be called the current control command, and the corresponding control command in the above step can also be called the previous control command. The current control command and the previous control command both belong to the control command in the task corresponding to the operation request. Further, the intelligent gateway 100 can obtain the order of the control commands according to the preset order.

[0154] Specifically, the intelligent gateway 100 parses the operation request, predetermines at least one operation command required to complete the task corresponding to the operation request, arranges the execution order according to preset rules, and generates the next control command (current control command) according to the arrangement order.

[0155] Specifically, the application layer 101 of the intelligent gateway 100 automatically generates the next control command according to the processing result of the sensed data or the current device state of the intelligent device 200 until the task is completed.

[0156] An embodiment of the present application provides a method for controlling a smart device, wherein: a smart gateway obtains a control command corresponding to an operation request for a smart device in response to the operation request, the smart gateway sends the control command to the smart device, the smart device performs a corresponding operation according to the type of the control command, when the type of the control command is a first type, the smart device reads perception data according to a corresponding address, and sends the obtained perception data to the smart gateway, the smart gateway processes the obtained perception data, and obtains a processing result of the perception data; when the type of the control command is a second type, the smart device performs a corresponding physical operation according to the control command, obtains a device state of the current smart device after the physical operation is completed, and sends the device state to the smart gateway; the smart gateway updates a task state according to the processing result of the perception data / the device state of the current smart device; the smart gateway determines whether the task is completed according to the updated task state, if not, the smart gateway automatically generates a next control command until the task is completed. This method is based on the Bluetooth / Bluetooth Mesh protocol to enable the smart gateway to read and write the memory address of the smart device. That is, through the remote Bluetooth memory access technology, the perception data obtained by the smart device through the sensor is read into the smart gateway. The smart gateway processes the perception data of the smart device and can automatically generate the next control command based on the processing results to facilitate the smart device to realize the corresponding function.

[0157] The perception data is transmitted to the smart gateway through Bluetooth memory access technology, and the processor of the smart gateway performs calculations and processing. The smart device does not need to be equipped with an additional processor to process the perception data, which reduces the cost of a single smart device. And when the smart device needs to be upgraded, the corresponding computing power needs to be improved accordingly. This application only needs to upgrade the processor in the smart gateway or add a computing module to complete the upgrade, so it improves the convenience of upgrading and maintaining smart devices.

[0158] Furthermore, the intelligent gateway obtains the perception data and processes the perception data, thereby realizing the unification and reuse of computing resources. For example, the processing / computation method is the same for the perception data a obtained in the intelligent device A and the perception data b obtained in the intelligent device B. In the current existing method, the intelligent device A and the intelligent device B are required to be equipped with separate processors to process the perception data a and the perception data b respectively. In the present application, the intelligent gateway can process the perception data a and the perception data b in a unified processing / computation method, thereby avoiding the waste of computing resources.

[0159] Embodiment 2:

[0160] Combination Figure 7-Figure 9 , a control system provided in an embodiment of the present application is introduced in detail.

[0161] according to Figure 7 The structural diagram of a control system shown in FIG. 1 is a control system provided in an embodiment of the present application, which includes an intelligent gateway 100 and an intelligent device 200. The intelligent device 200 supports the Bluetooth / Bluetooth Mesh protocol.

[0162] The intelligent gateway 100 includes: a processor 110 , a memory space 120 and a Bluetooth controller 130 .

[0163] The processor 110 is responsible for issuing commands to the smart device 200 , performing remote calculations on the perception data (sensor data) sent by the smart device 200 , and supervising and updating the task status of the smart device 200 .

[0164] The memory space 120 may also be referred to as a storage space of a memory, and is mainly used to store programs and data.

[0165] Specifically, the memory space 120 includes: a user space 121 and a kernel space 122 .

[0166] Among them, the user space 121 is the running space of the user program, and the user program includes: application programs, drivers, etc. The kernel space 122 is the running space of the kernel program, and the kernel program includes: Bluetooth protocol stack, etc. The Bluetooth protocol stack is the implementation code of the Bluetooth protocol. The Bluetooth protocol is a type of communication protocol. For security reasons, the user space 121 and the kernel space 122 are isolated in the memory space 120 to ensure that when the user program crashes, the kernel operation is not affected.

[0167] The Bluetooth controller 130 is used to send or receive radio signals and can convert the signals into corresponding data packets. Specifically, in the embodiment of the present application, the Bluetooth controller 130 is mainly used to send command frames (command messages) to the smart device 200 and receive response frames (response messages) sent by the smart device 200 to the smart gateway 100.

[0168] The smart device 200 includes: a sensor 210, a memory 220, a communication bus 230, an execution device 240, a Bluetooth memory access controller 250, a Bluetooth controller 260, and the like.

[0169] The sensor 210 is used to sense the information being measured, and output the sensed information in the form of electrical signals or other forms of information according to certain rules. That is, the sensor 210 is used to obtain corresponding sensed data (sensor data).

[0170] The memory 220 is used to store the sensed data acquired by the sensor 210. Specifically, the sensor 210 acquires the sensed data and stores the sensed data in a corresponding preset address of the memory 220.

[0171] The communication bus 230 is a group of transmission channels, which are channels for transmitting data composed of various logic devices, and are generally composed of data lines, address lines, control lines, etc.

[0172] Specifically, the communication bus 230 is mainly used to connect the memory 220 and the Bluetooth memory access controller 250, so as to realize the transmission of the perception data between the memory 220 and the Bluetooth memory access controller 250.

[0173] The actuator 240 is a device for receiving control commands from the Bluetooth memory access controller 250 and controlling the smart device 200 according to the control commands. The actuator 240 can convert electrical energy or fluid energy into mechanical energy or other energy forms, and change the mechanical motion state or other states (such as temperature, pressure, etc.) of the smart device 200 according to the control requirements.

[0174] The Bluetooth memory access controller 250 is used to parse the control command sent by the intelligent gateway 100 and perform corresponding operations according to the type of the control command.

[0175] Specifically, after the Bluetooth memory access controller 250 parses the control command sent by the smart gateway 100, when the type of the control command is the first type, the Bluetooth memory access controller 250 obtains the perception data stored at the corresponding address from the memory 220 through the communication bus 230; when the type of the control command is the second type, the control command is sent to the execution device 240, and the execution device 240 completes the control of the smart device 200 according to the control command sent by the Bluetooth memory access controller 250.

[0176] For ease of understanding, the following Figure 8 The composition structure of a Bluetooth memory access controller provided in an embodiment of the present application is introduced in detail.

[0177] like Figure 8 A schematic diagram of the composition structure of a Bluetooth memory access controller 250 is shown, and the Bluetooth memory access controller 250 includes: a Bluetooth host module 251, a command processing module 252, a first type processing module 253, a DMA control module 254, a second type processing module 255, a control driver module 256 and a register 257, etc.

[0178] The Bluetooth host module 251 includes: a logical link control and adaptation protocol, and a Bluetooth upper layer driver.

[0179] Among them, the Logical Link Control and Adaptation Protocol (L2CAP) is located above the Bluetooth baseband. It is a data exchange medium based on the Bluetooth host control interface and the Bluetooth upper-layer driver. It is used to exchange the data packet format of the Bluetooth baseband and high-level applications, plays an adaptation role, and provides functions such as multiplexing, quality of service exchange and flow control.

[0180] Among them, the Bluetooth upper layer driver is mainly used to unpack remote commands sent by remote devices (for example: control commands sent by the smart gateway 100 based on user operation requests) and encapsulate data of local devices (for example: device status of the smart device 200, perception data of the corresponding address, etc.).

[0181] The command processing module 252 is used to determine the type of the control command sent by the intelligent gateway 100 after parsing.

[0182] Specifically, when the command processing module 252 determines that the type of the control command is the first type, the control command is sent to the first type processing module 253 so that the first type processing module 253 processes the control command; when the command processing module 252 determines that the type of the control command is the second type, the control command is sent to the second type processing module 255 so that the second type processing module 255 processes the control command.

[0183] At the same time, the command processing module 252 is used to obtain the returned perception data, command execution results, device status and other data, and encapsulate the obtained data according to a unified protocol, and pass the encapsulated data to the Bluetooth host module 251.

[0184] The first type processing module 253 is used to receive a first type of control command and process the first type of control command.

[0185] Specifically, when the first type processing module 253 receives a control command of the first type, the first type processing module 253 obtains a target address corresponding to the control command, and obtains the perception data (sensor data) of the target address through the DMA control module 254 .

[0186] Further, after acquiring the sensing data of the target address, the first type processing module 253 returns the sensing data and the command execution result to the command processing module 252. The command execution result is generated by the DMA control module 254 after accessing the sensing data of the target address.

[0187] The DMA (Direct Memory Access) control module 254 is used to bypass the CPU and directly perform byte-addressing reading and writing on continuous physical addresses. The steps of obtaining the sensing data of the target address through the DMA control module 254 are simple, and the required resources are relatively small. Only the source address, the target address, and the transmission amount need to be set to realize the data transmission.

[0188] Specifically, when the first type processing module 253 receives a control command of the first type (for example, a memory access instruction), it obtains the corresponding target address, and the DMA control module 254 corrects the memory access address according to the corresponding target address, and then reads the perception data of the target address through the communication bus 230 and sends it to the register 257 for buffering, and then transmits it to the DMA control module 254 through the register 255, so that the DMA control module 254 can obtain the perception data stored at the target address in the memory 220 through the register 255.

[0189] Furthermore, if an error occurs in the read and write operations on the communication bus 230 through the register 257, the register 255 directly returns an end flag or an error flag, that is, when the control command is executed, the command execution result generated is an execution error.

[0190] For ease of understanding, the advantages of using the DMA control module 254 to access data in the embodiment of the present application are described below in combination with the traditional CPU data access method.

[0191] Traditional CPUs go through at least three steps to access data. Taking data reading as an example, the CPU first reads the data at the target address in the memory, then puts the data at the target address read into the data buffer, and then writes the data at the target address placed in the data buffer back to a new place (where the data needs to be read), thus completing the data reading of the target address.

[0192] The DMA control module 254 can directly realize data transmission between the source address and the target address without the intervention of the CPU. The DMA control module can realize direct data transmission, that is, the data of the target address can be directly read to the source address (the address of the first type processing module 253).

[0193] It can be seen from this that data transmission is achieved through the DMA control module 254, and data transmission between the source address and the target address can be achieved without the assistance of the CPU, which solves the problem of excessive waste of CPU resources due to large-scale data transmission. The CPU can then focus more on functions such as calculation and control program transfer, thereby improving the utilization rate of CPU resources.

[0194] Among them, the register 257 is a high-speed storage component with limited storage capacity. In the embodiment of the present application, the register 257 is mainly used to store the perception data (sensor data) of the target address read.

[0195] The second type processing module 255 is used to receive a second type of control command and process the second type of control command.

[0196] Specifically, after the second type processing module 255 parses the second type control command, the corresponding actuator 240 is controlled by manipulating the driving control module 257 based on the parsed second type control command.

[0197] The operation drive control module 257 is used to control the execution device 240 corresponding to the smart device 200 to complete the corresponding command according to the parsed second type of control command.

[0198] Further, when the execution device 240 completes the corresponding command, the operation drive control module 257 obtains the current device status of the smart device 200, and the operation drive control module 257 returns the obtained current device status of the smart device 200 to the command processing module 252 through the second type processing module 255.

[0199] The Bluetooth controller 260 is used to send or receive radio signals and can convert the signals into corresponding data packets. Specifically, in the embodiment of the present application, the Bluetooth controller 260 is mainly used to send a response frame (response message) to the smart gateway 100 and receive a command frame (command message) sent by the smart device 200 to the smart gateway 100.

[0200] For ease of understanding, the following Figure 8 The composition structure of a Bluetooth controller provided in an embodiment of the present application is introduced in detail.

[0201] like Fig. 9 The illustrated schematic diagram of the structure of a Bluetooth controller 260 provided in an embodiment of the present application includes: a Bluetooth host control interface 261, a Bluetooth link management layer 262, a Bluetooth baseband 263, and a Bluetooth device 264, etc.

[0202] Among them, the Bluetooth host control interface (Host Controller Interface, HCI) 261 is the interface between the Bluetooth host module 251 and the Bluetooth controller 260, which stipulates the future general standard communication mechanism for data transmission between the two, allowing the Bluetooth sentence module 251 to send data to the Bluetooth controller 260, and allowing the Bluetooth controller 260 to send data and commands to the Bluetooth host module 251.

[0203] The Bluetooth link manager layer 262 is a link management layer protocol of the Bluetooth protocol stack, and is responsible for translating data received by the Bluetooth host control interface 261 into data acceptable to the Bluetooth baseband 263 .

[0204] The Bluetooth baseband 263 is used to specify or implement media access and physical layer procedures in the Bluetooth system to support data information flow exchange between Bluetooth connected devices (intelligent gateway 100 and intelligent device 200).

[0205] Among them, the Bluetooth RF 264 specification stipulates parameters such as Bluetooth RF frequency band, modulation method, frequency modulation frequency, transmission power, and receiving sensitivity.

[0206] Furthermore, the data transmission between the smart gateway 100 and the smart device 200 mainly relies on the Bluetooth controller 130 of the smart gateway 100 and the Bluetooth controller 260 of the smart device 200 for data transmission.

[0207] Specifically, the Bluetooth controller 130 of the smart gateway 100 sends a command frame (command message) to the Bluetooth controller 260 of the smart device 200 via the Bluetooth protocol / Bluetooth Mesh protocol; the Bluetooth controller 260 of the smart device 200 returns a response frame (response message) to the Bluetooth controller 130 of the smart gateway 100 via the Bluetooth protocol / Bluetooth Mesh protocol based on the command frame.

[0208] Specifically, the Bluetooth 5.0 protocol is used to implement data transmission between the smart gateway 100 and the smart device 200.

[0209] Among them, the Bluetooth 5.0 protocol normal mode provides a maximum bandwidth of 2Mpbs, which can meet the transmission of small data such as all-weather control commands and device status, as well as the transmission of data such as images (720P images are about 2MB in size), voice (Bluetooth has a dedicated A2DP audio transmission model protocol), point cloud (common single-line laser radar sensor data bandwidth is within 256kbps) that have a certain tolerance to delay; the Bluetooth 5.0 protocol high-speed mode provides a maximum bandwidth of 48Mbps, which can be used for bursty large data transmission, so the Bluetooth 5.0 protocol can meet the transmission of most data. And the theoretical transmission distance of the Bluetooth 5.0 protocol is up to 300m, which can basically meet the communication coverage required by users for daily use. Through the Bluetooth 5.0 protocol, 7 different types of devices can be connected at the same time, and through Bluetooth Mesh, it can even be expanded to hundreds of devices at the same time to meet most usage scenarios.

[0210] It should be noted that in the embodiment of the present application, the Bluetooth protocol adopts the Bluetooth 5.0 protocol. In addition, the Bluetooth 5.1 protocol, Bluetooth 5.2 protocol, etc. can also be selected. The appropriate Bluetooth protocol version can be selected according to the actual situation. This application does not make any specific limitations.

[0211] Furthermore, in order to better meet the control and memory access requirements of the smart gateway 100 for the smart device 200 (that is, to further meet the data transmission requirements between the smart gateway 100 and the smart device 200), a layer of remote communication protocol for data transmission (interaction) between the smart gateway 100 and the smart device 200 is specially formulated on top of the Bluetooth protocol stack.

[0212] The following is a detailed description of a data format specified by a remote communication protocol provided in an embodiment of the present application in conjunction with Tables 1 to 5. In the remote communication protocol proposed in an embodiment of the present invention, the data message sent by the smart gateway 100 is called a command frame (command message), and the data message sent by the smart device 200 is called a response frame (response message).

[0213] As shown in Table 1, a schematic diagram of the composition of a command frame provided in an embodiment of the present application, the command frame includes a device code, a security code, a task code, the upper 16 bits of the remote address, a command word, and the lower 32 bits of the remote address.

[0214] Table 1

[0215]

[0216] Among them, the device code includes 2 bytes, which are used to indicate the type of the target smart device, so that the smart device can verify the received command frame. If the type of the smart device is the same as the type of the target smart device identified by the device code in the command frame, the verification succeeds; if the type of the smart device is different from the type of the target smart device identified by the device code in the command frame, the verification fails.

[0217] The security code includes 4 bytes and is used to transmit the security key to facilitate security verification.

[0218] The task code includes 2 bytes and is mainly used to indicate the relevant information of the task corresponding to the command frame.

[0219] Specifically, for ease of understanding, the composition of the task code is introduced in conjunction with the schematic diagram of the composition of the task code shown in Table 2.

[0220] Table 2

[0221]

[0222] The first 4 bits of the task code are used to indicate the type of the current task.

[0223] Among them, the middle 10 bits of the task code are used to identify the processing timestamp of this command frame. The timestamp is to authenticate the time when the data is generated through certain technical means, so as to verify whether this data has been tampered with after it is generated. In the embodiment of the present application, the processing timestamp is the timestamp generated by this command frame, so as to verify whether the command frame has been tampered with after it is generated, thereby ensuring that the command frame is safe.

[0224] The last 2 bits of the task code are used to identify the task execution status.

[0225] Specifically, when the last 2 bits of the task code are 00, it means that the task has been completed; when the last 2 bits of the task code are 01, it means that the task is in progress; when the last 2 bits of the task code are 10, it means that the task is terminated; when the last 2 bits of the task code are 11, it means that the task is paused.

[0226] The command word includes 2 bytes, which are mainly used to indicate the relevant information of the control command.

[0227] Specifically, for ease of understanding, the composition of the command word is introduced in conjunction with the schematic diagram of the composition of the command word shown in Table 3.

[0228] Table 3

[0229]

[0230] The command word consists of sequence number, type and length.

[0231] The sequence number includes 4 bits and is the unique identifier of this command frame.

[0232] The type includes 1 bit, which mainly indicates the type of the control command. If the type is 0, it indicates that the type of the control command is the first type; if the type is 1, it indicates that the type of the control command is the second type.

[0233] The length includes 8 bits, which are used to identify the length of the memory to be read.

[0234] The remote address word includes 6 bytes, including the high 16 bits (2 bytes) of the remote address and the low 32 bits (4 bytes) of the remote address, which are used to indicate the starting address of the first type of memory target address that needs to be read.

[0235] As shown in Table 4, a schematic diagram of the composition of a response frame provided in an embodiment of the present application, the response frame includes a device code, a security code, a status word and data.

[0236] Table 4

[0237] Device Code security code Status word data 2B 4B 2B (0~256)×4B

[0238] The device code includes 2 bytes, which are used to indicate the type of the smart device that sends the response frame, so that the smart gateway can perform corresponding processing according to the type of the smart device.

[0239] The security code includes 4 bytes and is used to transmit the security key to facilitate security verification.

[0240] The status word includes 2 bytes, including the sequence number, execution result, timeout flag and error code.

[0241] Specifically, for ease of understanding, the composition of the status word is introduced in conjunction with the schematic diagram of the composition of the status word shown in Table 5.

[0242] Table 5

[0243]

[0244] The sequence number includes 4 bits, and the sequence number is used to indicate the command frame corresponding to the response frame, that is, the sequence number is the same as the sequence number of the corresponding command frame.

[0245] The execution result includes 1 bit, which is used to indicate the execution result. Specifically, if the execution result is 0, it indicates that the execution is successful; if the execution result is 1, it indicates that the execution fails.

[0246] The timeout flag includes 1 bit, which is used to determine whether the execution task (memory access task) has timed out. Specifically, if the timeout flag is 0, it means that it has not timed out; if the timeout flag is 1, it means that it has timed out.

[0247] The error code includes 8 bits and is used to return the reason for the failure.

[0248] Among them, the data part is used to transmit byte-addressable memory data, device status, perception data, etc.

[0249] An intelligent device control system provided by an embodiment of the present application includes an intelligent gateway 100 and an intelligent device 200. The intelligent device 100 is equipped with a Bluetooth memory access controller. Through the Bluetooth memory access controller, the intelligent device 200 can parse the control command sent by the intelligent gateway 100, and execute the corresponding tasks according to the type of the control command, and can feedback the current device status to the intelligent gateway; based on the Bluetooth memory access controller of the intelligent device 200, the intelligent gateway 100 can directly read and write the memory address of the intelligent device 200 through the remote Bluetooth memory access technology, and transmit the perception data of the target address of the intelligent device 200 to the processor of the intelligent gateway 100 for calculation and processing. The intelligent gateway 100 is equipped with a processor with certain performance, which is used to remotely calculate the perception data and monitor the task status of the intelligent device 200. There is no need for the intelligent device 200 to be equipped with a processor to process the perception data separately, which greatly reduces the cost of the intelligent device and improves the convenience of upgrading and maintaining the intelligent device.

[0250] Embodiment 3

[0251] The intelligent device control method provided in the embodiment of the present application can be applied to Figure 3 The scenario shown can also be applied to other scenarios.

[0252] Combine the following Fig.10 The schematic diagram of a scenario of an electronic device expansion system shown introduces another application scenario.

[0253] The electronic device expansion system includes: an electronic device 400, a camera 500 and a 2D laser radar 600. The electronic device 400 can be a mobile phone, a laptop computer, etc. The camera 500 and the 2D laser radar 600 are expansion devices that carry relatively complex sensors.

[0254] The electronic device 400 has a multi-camera shooting capability by expanding the camera 500.

[0255] Specifically, the electronic device 400 sends a control command to the camera 500, such as a shooting command. After receiving the control command, the camera 500 returns the perception data obtained by the camera 500 through the sensor to the electronic device 400. The electronic device 400 processes the received perception data to obtain a target image.

[0256] The electronic device 400 has SLAM capability by expanding the 2D laser radar 600.

[0257] Among them, the simultaneous localization and mapping (SLAM) can realize the SLAM capability through the perception data obtained by the 2D laser radar. Specifically, the electronic device 400 sends a control command to the 2D laser radar 600, such as a map acquisition command; after receiving the control command, the 2D laser radar 600 returns the perception data obtained by the 2D laser radar 600 through the sensor to the electronic device 400, and the electronic device 400 processes the received perception data to realize timely positioning and map construction.

[0258] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program or instruction is stored. When the computer program or instruction is executed, the electronic device implements the above-mentioned functions or steps.

[0259] An embodiment of the present application also provides a computer program product, including a computer program or instructions, which, when executed by a processor, enables an electronic device to implement the above-mentioned functions or steps.

[0260] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for controlling an intelligent device, It is characterized in that Applied to a gateway, the method comprises: Receiving the perception data sent by the smart device through the Bluetooth memory access technology; the perception data is the data obtained by the smart device through the sensor; Processing the perception data to obtain corresponding processing results; According to the corresponding processing result, a current control command is sent to the smart device to control the smart device; Before receiving the sensing data sent by the smart device, the method further includes: Sending the last control command to the smart device; The receiving the perception data sent by the smart device includes: receiving the perception data sent by the smart device when determining that the type of the last control command is the first type; After sending the last control command to the smart device, the method further includes: receiving the current device state of the smart device sent by the smart device; the current device state is obtained when the smart device determines that the type of the previous control command is the second type and performs a corresponding physical operation according to the previous control command, and when the corresponding physical operation is completed; According to the current device state, a current control command is sent to the smart device to control the smart device.

2. The method according to claim 1, It is characterized in that The previous control command is obtained based on the operation request, and the sending the current control command to the smart device according to the corresponding processing result includes: According to the corresponding processing result, updating the task status corresponding to the operation request; If the updated task status indicates that the task corresponding to the operation request is not completed, generating a current control command for the smart device; The current control command is sent to the smart device.

3. The method according to claim 1, It is characterized in that The previous control command is obtained based on the operation request, and the sending of the current control command to the smart device according to the current device state includes: According to the current device state, updating the task state corresponding to the operation request; If the updated task status indicates that the task corresponding to the operation request is not completed, generating a current control command for the smart device; The current control command is sent to the smart device.

4. The method according to claim 2 or 3, It is characterized in that The method further comprises: The updated task status is fed back to the user end.

5. A method for controlling an intelligent device, It is characterized in that Applied to a smart device, the smart device includes at least one sensor, and the method includes: obtaining sensory data through the at least one sensor; Sending the sensing data to the gateway through Bluetooth memory access technology; receiving a current control command returned by the gateway according to a processing result obtained by the gateway processing the sensing data; Execute the current control command; Before sending the sensing data to the gateway, the method further includes: receiving a previous control command sent by the gateway; The sending the sensing data to the gateway includes: When it is determined that the type of the previous control command is the first type, sending the perception data to the gateway; After receiving the last control command sent by the gateway, the method further includes: When it is determined that the type of the previous control command is the second type, performing a corresponding physical operation according to the previous control command; When the corresponding physical operation is completed, the current device state is obtained; Sending the current device state to the gateway, so that the gateway returns a current control command according to the current device state; Execute the current control command.

6. An intelligent device control system, It is characterized in that The system comprises: a gateway and a smart device; the smart device comprises at least one sensor; The gateway sends a previous control command to the smart device; The smart device, when determining that the type of the last control command is the first type, obtains the perception data through at least one sensor, and sends the perception data to the gateway through the Bluetooth memory access technology; The gateway receives the sensing data through Bluetooth memory access technology; processes the sensing data to obtain corresponding processing results; and sends a current control command to the smart device according to the processing results; The smart device, when determining that the type of the previous control command is the second type, performs a corresponding physical operation according to the previous control command; after the corresponding physical operation is completed, obtains a current device state, and sends the current device state to the gateway; The gateway sends a current control command to the smart device according to the current device state; The smart device executes the current control command.

7. A gateway, It is characterized in that including a processor and a memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 4.

8. A smart device, It is characterized in that including a processor and a memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to claim 5 .

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program or instruction, and when the computer program or instruction is executed, the method according to any one of claims 1 to 5 is implemented.