Method and apparatus for managing device, electronic device and storage medium
By identifying and converting device data formats through a smart home gateway, the problem of interoperability between devices of different brands is solved, enabling efficient and stable control of the smart home system.
Patent Information
- Application Number
- CN202411883778.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2044-12-19
AI Technical Summary
The difficulty in interconnecting smart home devices from different brands leads to poor system compatibility and instability in smart home systems.
The smart home gateway receives device data, identifies device attributes, and converts the data into an internal data format to enable data interaction and control between different communication protocols.
It enables efficient and stable interconnection between different smart home devices, improving the user's convenience in controlling the devices and enhancing the user experience.
Smart Images

Figure CN119892541B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of smart home, and in particular to a device management method, a device management apparatus, an electronic device, and a computer readable storage medium. BACKGROUND
[0002] With the development of science and technology, the smart home market is showing a trend of vigorous development. Among them, various smart home devices emerge in an endless stream, covering smart lamps and lanterns, smart home appliances, and smart security devices and many other fields. However, for users, when deploying a smart home scene, they may use smart home devices of different brands in the same smart home scene. Different brands of smart home devices often cannot be uniformly controlled, and smart home devices cannot interconnect, limiting the overall performance and user experience of the smart home system. SUMMARY
[0003] The embodiments of the present application provide a device management method, apparatus, electronic device and computer readable storage medium to solve or partially solve the problem that different brands of smart home devices cannot interconnect, resulting in poor system compatibility and insufficient stability of the smart home system.
[0004] The embodiments of the present application disclose a device management method applied to a smart home gateway, wherein the smart home gateway is deployed in a smart home system, and the smart home system further includes smart home devices, the smart home devices include smart home devices based on different communication protocols, and the method includes:
[0005] receiving device data sent by a first smart home device, the device data at least including a device identifier, the first smart home device being a smart home device based on a first communication protocol;
[0006] identifying a target device attribute corresponding to the first smart home device based on the device identifier;
[0007] converting the device data into target data in an internal data format according to the target device attribute, the internal data format being a standard format for data interaction between the smart home gateway and smart home devices in the smart home system;
[0008] sending the target data to a second smart home device to control the second smart home device to perform a device operation corresponding to the target data, the second smart home device being a smart home device based on a second communication protocol, the first communication protocol and the second communication protocol being different communication protocols.
[0009] In some possible implementation manners, the device identifier comprises at least one of a MAC address and a device model code, and identifying the target device attribute corresponding to the first smart home device based on the device identifier comprises:
[0010] identifying the first smart home device by using the MAC address and / or the device model code, and determining the target device attribute corresponding to the first smart home device.
[0011] In some possible implementation manners, the target device attribute comprises at least target brand information and a target device type, and converting the device data into target data in an internal data format according to the target device attribute comprises:
[0012] determining a target data packet structure corresponding to the target brand information and the target device type, the target data packet structure being adapted to the first communication protocol;
[0013] obtaining a target mapping relationship corresponding to the first smart home device, and comparing the target device type and the target brand information with the target mapping relationship respectively to determine target control configuration information corresponding to the first smart home device;
[0014] extracting key information corresponding to the device data from the target data packet structure according to the target control configuration information;
[0015] adding the key information to a preset data packet structure to obtain target data in an internal data format corresponding to the device data, the preset data packet structure being a data structure used by the smart home gateway and the smart home device for data interaction.
[0016] In some possible implementation manners, the method further comprises:
[0017] periodically sending a probe signal to a communication network in which the smart home gateway is located;
[0018] in response to receiving first broadcast information sent by a first target smart home device and directed to the probe signal, extracting first basic information corresponding to the target smart home device from the first broadcast information;
[0019] comparing the first basic information with a preset device feature library, and determining, based on a comparison result, a first device type and first control configuration information corresponding to the first target smart home device, the first control configuration information comprising at least information representing a control mode of a smart home device and a control parameter requirement;
[0020] add the first target smart home device to a device list of the smart home gateway, and establish a mapping relationship between the first device type, the first control configuration information and the target smart home device.
[0021] In some possible implementation manners, the first basic information at least includes one of first brand information, a first device type and first function information, and the determining, based on the comparison result, of the first device type and the first control configuration information corresponding to the first target smart home device comprises:
[0022] If at least one of the first brand information, the first device type and the first function information exists in the device feature library, identity authentication information is sent to the first target smart home device, and identity information sent by the first target smart home device is received, the identity information at least including a device serial number and an authentication key;
[0023] If the authentication key is authenticated, the device serial number is recorded, and the first device type and the first control configuration information corresponding to the first target smart home device are extracted from the device feature library.
[0024] In some possible implementation manners, the method further comprises:
[0025] In response to receiving second broadcast information broadcasted by a second target smart home device, second basic information corresponding to the target smart home device is extracted from the second broadcast information;
[0026] The second basic information is compared with a preset device feature library, and second device type and second control configuration information corresponding to the second target smart home device are determined based on a comparison result;
[0027] The second target smart home device is added to a device list of the smart home gateway, and a mapping relationship between the second device type, the second control configuration information and the target smart home device is established.
[0028] In some possible implementation manners, an encryption channel is established between the smart home gateway and the smart home device, and the sending of the target data to the second smart home device comprises:
[0029] The target data is encrypted to obtain corresponding encrypted data;
[0030] The encrypted data is sent to the second smart home device through the encryption channel.
[0031] In some possible implementation manners, the method further comprises:
[0032] receive a device processing instruction for the smart home device sent by the user equipment;
[0033] process the smart home device in the device list according to the device processing instruction;
[0034] The device processing instruction is at least one of a device adding instruction, a device deleting instruction, and a device modifying instruction.
[0035] In some possible implementation manners, the method further includes:
[0036] receive a scene control instruction and a trigger condition corresponding to the scene control instruction sent by the user equipment, the scene control instruction including a device control instruction for at least one smart home device;
[0037] in response to detecting that the trigger condition is met, send the device control instruction to the corresponding at least one smart home device, the device control instruction being used to instruct the smart home device to perform a device operation corresponding to the scene control instruction.
[0038] The embodiment of the application further discloses a device management apparatus applied to a smart home gateway, wherein the smart home gateway is deployed in a smart home system, and the smart home system further includes smart home devices, the smart home devices including smart home devices that communicate based on different communication protocols, and the apparatus includes:
[0039] a data receiving module, configured to receive device data sent by a first smart home device, the device data including at least a device identifier, and the first smart home device being a smart home device that communicates based on a first communication protocol;
[0040] a device identifying module, configured to identify a target device attribute corresponding to the first smart home device based on the device identifier;
[0041] a data converting module, configured to convert the device data into target data in an internal data format according to the target device attribute, the internal data format being a standard format for data interaction between the smart home gateway and the smart home devices in the smart home system;
[0042] a data sending module, configured to send the target data to a second smart home device, and control the second smart home device to perform a device operation corresponding to the target data, the second smart home device being a smart home device that communicates based on a second communication protocol, and the first communication protocol and the second communication protocol being different communication protocols.
[0043] In some possible implementation manners, the device identification at least includes one of a MAC address and a device model code, and the device identification module is specifically configured to:
[0044] The first smart home device is identified by using the MAC address and / or the device model code, and target device attributes corresponding to the first smart home device are determined.
[0045] In some possible implementation manners, the target device attributes at least include target brand information and a target device type, and the data conversion module is specifically configured to:
[0046] A target data packet structure corresponding to the target brand information and the target device type is determined, and the target data packet structure is adapted to the first communication protocol;
[0047] A target mapping relationship corresponding to the first smart home device is obtained, and the target device type and the target brand information are compared with the target mapping relationship respectively, to determine target control configuration information corresponding to the first smart home device;
[0048] Key information corresponding to the device data is extracted from the target data packet structure according to the target control configuration information;
[0049] The key information is added to a preset data packet structure to obtain target data in an internal data format corresponding to the device data, and the preset data packet structure is a data structure used by the smart home gateway and the smart home device for data interaction.
[0050] In some possible implementation manners, the method further includes:
[0051] A signal broadcast module configured to periodically send a probe signal to a communication network in which the smart home gateway is located;
[0052] A first information extraction module configured to, in response to receiving first broadcast information sent by a first target smart home device and directed to the probe signal, extract first basic information corresponding to the target smart home device from the first broadcast information;
[0053] A first information comparison module configured to compare the first basic information with a preset device feature library, and determine a first device type and first control configuration information corresponding to the first target smart home device based on a comparison result, wherein the first control configuration information at least includes information representing a control mode of a smart home device and a control parameter requirement;
[0054] The first adding module is configured to add the first target smart home device to a device list of the smart home gateway, and establish a mapping relationship among the first device type, the first control configuration information and the target smart home device.
[0055] In some possible implementation manners, the first basic information at least includes one of first brand information, a first device type and first function information, and the first information comparing module is specifically configured to:
[0056] If at least one of the first brand information, the first device type and the first function information exists in the device feature library, identity authentication information is sent to the first target smart home device, and identity information sent by the first target smart home device is received, wherein the identity information at least includes a device serial number and an authentication key;
[0057] If the authentication key is authenticated, the device serial number is recorded, and the first device type and the first control configuration information corresponding to the first target smart home device are extracted from the device feature library.
[0058] In some possible implementation manners, the method further includes:
[0059] The second information extracting module is configured to extract second basic information corresponding to the target smart home device from second broadcast information broadcasted by a second target smart home device in response to receiving the second broadcast information;
[0060] The second information comparing module is configured to compare the second basic information with a preset device feature library, and determine a second device type and second control configuration information corresponding to the second target smart home device based on a comparison result;
[0061] The second adding module is configured to add the second target smart home device to a device list of the smart home gateway, and establish a mapping relationship among the second device type, the second control configuration information and the target smart home device.
[0062] In some possible implementation manners, an encryption channel is established between the smart home gateway and the smart home device, and the data sending module is specifically configured to:
[0063] The target data is encrypted to obtain corresponding encrypted data;
[0064] The encrypted data is sent to the second smart home device through the encryption channel.
[0065] In some possible implementation manners, the method further includes:
[0066] The instruction receiving module is configured to receive a device processing instruction for the smart home device sent by the user equipment.
[0067] The instruction executing module is configured to process the smart home device in the device list according to the device processing instruction.
[0068] The device processing instruction is at least one of a device adding instruction, a device deleting instruction and a device modifying instruction.
[0069] In some possible implementation manners, the method further comprises:
[0070] The device control module is configured to receive a scene control instruction sent by the user equipment and a trigger condition corresponding to the scene control instruction, the scene control instruction comprising a device control instruction for at least one smart home device.
[0071] The instruction sending module is configured to send the device control instruction to the corresponding at least one smart home device in response to detecting that the trigger condition is met, the device control instruction being used to instruct the smart home device to perform a device operation corresponding to the scene control instruction.
[0072] The embodiment of the application further discloses an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus.
[0073] The memory is used to store a computer program.
[0074] The processor is used to execute the program stored on the memory, and the method as described in the embodiment of the application is realized.
[0075] The embodiment of the application further discloses a computer readable storage medium, which stores instructions, and when executed by one or more processors, causes the processor to execute the method as described in the embodiment of the application.
[0076] The embodiment of the application has the following advantages:
[0077] In the embodiment of the present application, it is applied to the smart home gateway, the smart home gateway can be deployed in the smart home system, and the smart home system can also include smart home devices, the smart home devices include smart home devices based on different communication protocols for communication, and in the process of managing and controlling the smart home devices, especially in the case of data interaction between different smart home devices, the gateway can receive device data sent by a first smart home device, the device data at least includes a device identifier, the first smart home device is a smart home device based on a first communication protocol for communication, and the target device attribute corresponding to the first smart home device is identified based on the device identifier, and then the device data is converted into target data in an internal data format according to the target device attribute, the internal data format is a standard format for data interaction between the smart home gateway and the smart home devices in the smart home system, and then the target data is sent to a second smart home device, the second smart home device is controlled to execute a device operation corresponding to the target data, the second smart home device is a smart home device based on a second communication protocol for communication, the first communication protocol and the second communication protocol are different communication protocols, so that when smart home devices based on different communication protocols need to interact, the gateway can convert the device data that needs to interact, and overcome the communication protocol difference between different smart home devices based on the converted data, realize unified control, and ensure efficient and stable interconnection and intercommunication between smart home devices, provide great convenience for user control of smart home devices, and ensure user experience. BRIEF DESCRIPTION OF DRAWINGS
[0078] Figure 1 is a step flow chart of a device management method provided in the embodiment of the present application;
[0079] Figure 2 is a flowchart of device control provided in the embodiment of the present application;
[0080] Figure 3 is a structural block diagram of a device management apparatus provided in the embodiment of the present application. DETAILED DESCRIPTION
[0081] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below in combination with the drawings and specific embodiments.
[0082] As an example, when deploying a smart home scene, a user can have different brands of smart home devices in the same smart home scene, and different brands of smart home devices are often difficult to achieve unified control, and the smart home devices cannot achieve interconnection and intercommunication, which limits the overall performance and user experience of the smart home system.
[0083] To this end, in the present application, in the process of managing and controlling smart home devices, especially in the case of data interaction between different smart home devices, the gateway can receive device data sent by a first smart home device, the device data at least including device identification, the first smart home device being a smart home device based on a first communication protocol for communication, and identifying the target device attribute corresponding to the first smart home device based on the device identification, and then converting the device data into target data in an internal data format according to the target device attribute, the internal data format being a standard format for data interaction between the smart home gateway and the smart home device in the smart home system, and then sending the target data to a second smart home device, controlling the second smart home device to perform a device operation corresponding to the target data, the second smart home device being a smart home device based on a second communication protocol for communication, the first communication protocol and the second communication protocol being different communication protocols, so that when smart home devices based on different communication protocols need to interact, the gateway can convert the device data that needs to interact, and overcome the communication protocol difference between different smart home devices based on the converted data, realize unified control, and ensure efficient, stable interconnection and intercommunication between smart home devices, greatly facilitate the user's control of smart home devices, and ensure the user's experience.
[0084] Referring to Figure 1 , a step flowchart of a device management method provided in an embodiment of the present application is shown, applied to a smart home gateway, the smart home gateway being deployed in a smart home system, the smart home system further including smart home devices, the smart home devices including smart home devices based on different communication protocols, specifically including the following steps:
[0085] Step 101, receiving device data sent by a first smart home device, the device data at least including device identification, the first smart home device being a smart home device based on a first communication protocol for communication;
[0086] In an embodiment of the present application, for a smart home system, it can include a corresponding smart home gateway and a plurality of different smart home devices, and a user can configure different brands, different models, and different types of smart home devices in the process of deploying the smart home system, so in the smart home system, it can include smart home devices based on different communication protocols for data communication.
[0087] For example, a smart home device based on a first communication protocol for data communication, a smart home device based on a second communication protocol for data communication, and a smart home device based on a third communication protocol for data communication, etc. Optionally, the communication protocol can include WiFi (Wireless Fidelity), Zigbee, Z-Wave, Bluetooth protocol, Thread protocol, NFC (Near Field Communication), and IR (Infrared Communication), etc., which is not limited by the present application.
[0088] Among them, for the smart home gateway, it can serve as the core hub of the smart home system, responsible for data communication between different smart home devices, user devices and smart home devices. Optionally, the smart home gateway can integrate multiple standard communication protocol interfaces, such as WiFi, Zignee, Z-Wave, Bluetooth protocol, Thread protocol, NFC and IR, etc., so that the smart home gateway can communicate with smart home devices of different communication protocols. At the same time, in order to improve the stability and reliability of the system, redundant power supply design can be used to ensure that the standby power supply of the smart home gateway can take over in time when the main power supply of the smart home gateway fails, and ensure the continuous operation of the smart home system.
[0089] Before managing and controlling the smart home devices of the smart home system, the communication connection between the smart home gateway and each smart home device can be established first, so as to realize data interaction based on the established data transmission channel. Among them, the smart home gateway can discover newly connected smart home devices through automatic scanning and device broadcasting, etc., which is not limited by the present application.
[0090] For the automatic scanning process, the smart home gateway can periodically send a probe signal to the communication network where the smart home gateway is located, then in response to receiving the first broadcast information sent by the first target smart home device to the probe signal, the first basic information corresponding to the target smart home device is extracted from the first broadcast information, then the first basic information is compared with the preset device feature library, based on the comparison result, the first device type and the first control configuration information corresponding to the first target smart home device are determined, the first control configuration information at least includes information representing the control mode and control parameter requirements of the smart home device, then the first target smart home device is added to the device list of the smart home gateway, and the mapping relationship between the first device type, the first control configuration information and the target smart home device is established.
[0091] The first basic information at least includes one of the first brand information, the first device type and the first function information, and the smart home gateway can search for corresponding information in the device characteristic library based on the first brand information, the first device type and the first function information, and determine whether the smart home device to be accessed to the communication network can be found. Specifically, if at least one of the first brand information, the first device type and the first function information exists in the device characteristic library, that is, the smart home gateway finds the corresponding smart home device in the device characteristic library, the smart home gateway can further send identity authentication information to the first target smart home device, and receive identity information sent by the first target smart home device. The identity information at least includes a device serial number and an authentication key. If the authentication key is authenticated, the device serial number is recorded, and the first device type and the first control configuration information corresponding to the first target smart home device are extracted from the device characteristic library. Before formally accessing the first target smart home device to the communication network, the smart home gateway also needs to perform identity authentication on the first target smart home device, so as to ensure the security of the overall data of the smart home system.
[0092] For example, when the smart home device accesses the smart home communication network, the corresponding device serial number and the pre-set authentication key can be sent to the smart home gateway. The smart home gateway allows the smart home device to access the smart home system only after verification. Correspondingly, for the user terminal, when logging in to the mobile application, the user needs to input authentication information such as username and password to ensure that only a legal user can control the device.
[0093] In addition, for the device broadcast process, the smart home gateway can respond to the reception of the second broadcast information broadcasted by the second target smart home device, extract the second basic information corresponding to the target smart home device from the second broadcast information, compare the second basic information with the preset device characteristic library, determine the second device type and the second control configuration information corresponding to the second target smart home device based on the comparison result, then add the second target smart home device to the device list of the smart home gateway, and establish a mapping relationship between the second device type, the second control configuration information and the target smart home device. Correspondingly, the smart home gateway can also perform identity authentication on the smart home device actively accessing the communication network, so that the smart home gateway also needs to perform identity authentication on the smart home device before formally accessing the smart home device to the communication network, so as to ensure the security of the overall data of the smart home system.
[0094] Through the above process, the smart home device is accessed to the smart home system, so that the smart home gateway can perform data interaction based on the established communication connection in the subsequent process of managing the smart home device.
[0095] In some examples, assume that the smart home gateway is in a communication network containing multiple smart home devices, including smart light bulbs, smart sockets, smart thermostats, etc. The gateway needs to automatically scan and identify these devices and connect them to the smart home system.
[0096] For the automatic scanning process, the corresponding processing procedure can include:
[0097] Step 1: Send a probe signal:
[0098] The smart home gateway periodically sends a probe signal (e.g., a Zigbee, Z-Wave, or WiFi broadcast signal) to the communication network it is in to detect whether there are new devices connected to the network.
[0099] Step 2: Receive first broadcast information:
[0100] Assume that the first target smart home device is a smart light bulb (brand "Brand 1", device type "smart light bulb", function "dimming, color adjustment"). After receiving the probe signal, the device sends the gateway first broadcast information, the content of which is as follows:
[0101] First brand information: Brand 1;
[0102] First device type: smart light bulb;
[0103] First function information: dimming, color adjustment.
[0104] Step 3: Extract first basic information:
[0105] The gateway extracts the following basic information from the first broadcast information:
[0106] First brand information: Brand 1;
[0107] First device type: smart light bulb;
[0108] First function information: dimming, color adjustment.
[0109] Step 4: Compare with device feature library:
[0110] The gateway compares the extracted basic information with the preset device feature library. Assume that the device feature library contains the following information:
[0111] Brand: Brand 1;
[0112] Device type: smart light bulb;
[0113] Function: dimming, color adjustment.
[0114] Control configuration information:
[0115] Control mode: Zigbee protocol;
[0116] Control parameter requirement: brightness range 0-100, color temperature range 2700K-6500K.
[0117] Step 5: Determine device type and control configuration information:
[0118] The comparison result shows that there is device information matching the first broadcast information in the device feature library. Therefore, the gateway determines:
[0119] First device type: smart bulb;
[0120] First control configuration information:
[0121] Control mode: Zigbee protocol;
[0122] Control parameter requirement: brightness range 0-100, color temperature range 2700K-6500K.
[0123] Step 6: Add to device list and establish mapping relationship:
[0124] The gateway adds the first target smart home device (brand ① smart bulb) to the device list and establishes the following mapping relationship:
[0125] Device type: smart bulb;
[0126] Control configuration information: control mode (Zigbee), control parameters (brightness 0-100, color temperature 2700K-6500K);
[0127] Target device: brand ① smart bulb.
[0128] After finding the corresponding smart home device in the device feature library, identity authentication can be performed on the smart home device, which can specifically include:
[0129] Step 1: Send identity verification information:
[0130] The gateway sends identity verification information to the first target smart home device, requiring the device to provide identity information.
[0131] Step 2: Receive identity information:
[0132] The first target smart home device (brand ① smart bulb) responds and sends the following identity information:
[0133] Device serial number: brand ①-LIGHT-001;
[0134] Authentication key: 1234567890ABCDEF.
[0135] Step 3: Verify the authentication key
[0136] The gateway compares the received authentication key with the pre-stored authentication key. Assuming the authentication keys match, the gateway records the device serial number:
[0137] Device serial number: Brand 1 - LIGHT - 001.
[0138] Step 4: Complete identity authentication
[0139] After identity authentication is passed, the gateway officially connects the first target smart home device (Brand 1 smart bulb) to the communication network and records its identity information.
[0140] For the process of device broadcasting, the corresponding processing process can include:
[0141] Step 1: Receive second broadcast information
[0142] Assuming that the second target smart home device is a smart socket (brand "Brand 2", device type "smart socket", and function "switch control"). The device actively broadcasts second broadcast information to the gateway, with the following content:
[0143] Second brand information: Brand 2;
[0144] Second device type: smart socket;
[0145] Second function information: switch control.
[0146] Step 2: Extract second basic information:
[0147] The gateway extracts the following basic information from the second broadcast information:
[0148] Second brand information: Brand 2;
[0149] Second device type: smart socket;
[0150] Second function information: switch control.
[0151] Step 3: Compare device feature library:
[0152] The gateway compares the extracted basic information with the device feature library. Assuming the device feature library contains the following information:
[0153] Brand: Brand 2;
[0154] Device type: smart socket;
[0155] Function: switch control.
[0156] Control configuration information:
[0157] Control mode: through WiFi protocol;
[0158] Control parameter requirement: switch state (on / off).
[0159] Step 4: Determine device type and control configuration information:
[0160] The comparison result shows that there is device information matching the second broadcast information in the device feature library. Therefore, the gateway determines:
[0161] Second device type: smart socket;
[0162] Second control configuration information:
[0163] Control mode: through WiFi protocol;
[0164] Control parameter requirement: switch state (on / off).
[0165] Step 5: Add to device list and establish mapping relationship:
[0166] The gateway adds the second target smart home device (brand 2 smart socket) to the device list and establishes the following mapping relationship:
[0167] Device type: smart socket;
[0168] Control configuration information: control mode (WiFi), control parameter (switch state);
[0169] Target device: brand 2 smart socket.
[0170] Step 6: Identity authentication
[0171] The gateway performs identity authentication on the second target smart home device, the process is similar to the first target device, ensuring that the device is legally connected.
[0172] In addition, for the identity verification of user devices, it is assumed that the user logs in to the smart home system through the mobile application and needs to input the following authentication information: username: user123; password: password123, so that the gateway verifies the username and password, allowing the user to control the smart home device through the mobile application
[0173] Through the above process, the smart home gateway can automatically scan and identify new devices, extract basic information from device broadcast information, and compare with the device feature library to determine the type and control configuration information of the device, establish mapping relationship, and perform identity authentication on the device to ensure that the device is legally connected, and authenticate the user terminal to ensure that only legal users can control the device.
[0174] In the process of managing the smart home device, the smart home gateway can receive device data sent by a first smart home device, the device data at least including a device identifier, the first smart home device being a smart home device communicating based on a first communication protocol. The device identifier can be used to identify a unique smart home device, and the smart home gateway can determine the communication protocol used by the smart home device based on the device identifier.
[0175] For example, assuming that the first smart home device is a temperature sensor, after accessing the communication network of the smart home, it can periodically or in real time transmit corresponding temperature data to the smart home gateway, and carry the corresponding device identifier in the temperature data, so that the smart home gateway determines the communication protocol used by the temperature sensor based on the device identifier, such as WiFi, Zignee, Z-Wave, Bluetooth protocol, Thread protocol, NFC and IR, and further processes the device data transmitted by the temperature sensor based on the determined communication protocol.
[0176] Step 102, identifying the target device attribute corresponding to the first smart home device based on the device identifier;
[0177] After receiving the corresponding device data, the smart home gateway can extract the corresponding device identifier from the device data, and identify the target device attribute corresponding to the first smart home device based on the device identifier. The target device attribute can uniquely identify the device type and brand of the smart home device.
[0178] The device identifier at least includes one of a MAC (Media Access Control Address, Media Access Control Address) address and a device model code, and the smart home gateway can identify the first smart home device by using the MAC address and / or the device model code to determine the target device attribute corresponding to the first smart home device.
[0179] It should be noted that for a smart home device, one of the MAC address and the device model code can be used to accurately identify the corresponding smart home device, so as to determine the target device attribute representing the type and brand of the smart home device. It can be understood that since different brands and different types of smart home devices can use different communication protocols for data communication, by determining the target device attribute of the smart home device, the brand and type information of the smart home device can be accurately identified, so as to further determine the communication protocol used by the smart home device.
[0180] In step 103, the device data is converted into target data in an internal data format according to the target device attribute, the internal data format being a standard format for data interaction between the smart home gateway and the smart home device in the smart home system.
[0181] After the target device attribute corresponding to the first smart home device is determined, the device data can be converted into target data in an internal data format according to the target device attribute, the internal data format being a standard format for data interaction between the smart home gateway and the smart home device in the smart home system. By converting the data into a standard format for data interaction between the smart home gateway and the smart home device, the defect that different smart home devices cannot interact with each other due to differences in communication protocols is effectively overcome, unified control is achieved, efficient and stable interconnection and intercommunication between smart home devices are ensured, great convenience is provided for user control of smart home devices, and user experience is ensured.
[0182] In the embodiment of the present application, the target device attribute at least includes target brand information and target device type, the smart home gateway can determine a target data packet structure corresponding to the target brand information and the target device type, the target data packet structure is adapted to the first communication protocol, then the target mapping relationship corresponding to the first smart home device is obtained, and the target device type and the target brand information are compared with the target mapping relationship respectively, the target control configuration information corresponding to the first smart home device is determined, then the key information corresponding to the device data is extracted from the target data packet structure according to the target control configuration information, and the key information is added to the preset data packet structure to obtain target data in an internal data format corresponding to the device data, the preset data packet structure being a data structure used for data interaction between the smart home gateway and the smart home device, so that by defining an internal data format for data interaction between the smart home gateway and the smart home device in the smart home system, the defect that different smart home devices cannot interact with each other due to differences in communication protocols is effectively overcome, unified control is achieved, efficient and stable interconnection and intercommunication between smart home devices are ensured, great convenience is provided for user control of smart home devices, and user experience is ensured.
[0183] In a specific implementation, the smart home gateway can first determine a target data packet structure suitable for the first communication protocol according to the target brand information and the target device type. For example, if the device uses the Zigbee protocol, the gateway can determine the data packet structure of the Zigbee protocol. Then, the smart home gateway can further obtain the target mapping relationship of the first smart home device, and compare the target device type and the target brand information with the mapping relationship to determine the target control configuration information. For example, if the device is an "XX smart bulb", the gateway can extract its control configuration information (such as control mode, control parameter) from the mapping relationship. Then, the smart home gateway can extract the key information of the device data from the target data packet structure according to the target control configuration information. For example, the brightness, color, etc. of the light are extracted from the Zigbee data packet. And the extracted key information is added to the preset data packet structure to obtain the internal data format corresponding to the device data. Wherein, the preset data packet structure is a unified data structure used by the smart home gateway to interact with the device. Through the above process, based on the definition of the unified internal data format, the problem that different devices cannot interact due to the difference in communication protocols is overcome, and efficient and stable interconnection and intercommunication are realized.
[0184] In some examples, it is assumed that the smart home gateway connects the following two devices:
[0185] Brand 1 smart bulb (uses Zigbee protocol).
[0186] Brand 2 temperature controller (uses WiFi protocol).
[0187] The gateway needs to standardize the data of these two devices into a unified internal data format in order to realize unified control. Among them, the data processing of the smart bulb
[0188] Target device attributes include: brand 1 + smart bulb;
[0189] Target data packet structure: data packet structure suitable for Zigbee protocol.
[0190] Target mapping relationship:
[0191] Control mode: through Zigbee protocol;
[0192] Control parameter: brightness range 0-100, color temperature range 2700K-6500K.
[0193] Based on the above data, the smart home gateway can extract the following data from the Zigbee data packet:
[0194] Brightness: 75;
[0195] Color: warm_white.
[0196] Next, the extracted data can be standardized into an internal data format:
[0197] Add key information to the preset data packet structure to generate the following internal data format:
[0198] {
[0199] "device_id": "light_001",
[0200] "type": "light",
[0201] "status": "on",
[0202] "brightness": 75,
[0203] "color": "warm_white",
[0204] "protocol": "Zigbee"
[0205] }
[0206] In addition, data processing for brand ② thermostat
[0207] Target device attributes: brand ② + thermostat
[0208] Target data packet structure: data packet structure adapted to WiFi protocol
[0209] Target mapping relationship:
[0210] Control method: through WiFi protocol
[0211] Control parameters: temperature range 18-30℃, mode (heating / cooling)
[0212] Based on the above data, the smart home gateway can extract from the WiFi data packet:
[0213] Temperature: 22.5℃
[0214] Mode: heating
[0215] Next, the extracted data can be standardized into an internal data format:
[0216] Add key information to the preset data packet structure to generate the following internal data format:
[0217] {
[0218] "device_id": "thermostat_001",
[0219] "type": "thermostat",
[0220] "status": "auto",
[0221] "temperature": 22.5,
[0222] "mode": "heating",
[0223] "protocol": "WiFi"
[0224] }
[0225] Through the above process, the smart home gateway can interact seamlessly between devices of different communication protocols (such as Zigbee, WiFi, etc.) through a standardized internal data format, and the gateway only needs to process a unified internal data format and does not need to write control logic for each communication protocol, and the user can control all devices through a unified interface (such as a mobile application, etc.) without needing to care about the specific communication protocol of the device. In addition, the unified data format reduces the complexity of data analysis and processing, and improves the stability of the system.
[0226] In step 104, the target data is sent to a second smart home device, and the second smart home device is controlled to perform a device operation corresponding to the target data. The second smart home device is a smart home device that communicates based on a second communication protocol. The first communication protocol and the second communication protocol are different communication protocols.
[0227] After obtaining the target data in the internal data format that can be used for data interaction between the smart home gateway and the smart home device through data conversion, the smart home gateway can send the target data to the corresponding second smart home device to control the second smart home device to perform the corresponding device operation. The second smart home device is a smart home device that communicates based on a second communication protocol. The first communication protocol and the second communication protocol are different communication protocols. Therefore, when smart home devices based on different communication protocols need to interact, the gateway can convert the device data that needs to interact, and overcome the communication protocol differences between different smart home devices based on the converted data, realize unified control, and ensure efficient and stable interconnection and intercommunication between smart home devices, providing great convenience for user control of smart home devices and ensuring user experience.
[0228] In addition, the smart home gateway and the smart home device establish an encrypted channel, and in the process of transmitting data, the smart home gateway can encrypt the target data to obtain corresponding encrypted data, and then send the encrypted data to the second smart home device through the encrypted channel, thereby preventing data from being eavesdropped and attacked, and ensuring the security of the data.
[0229] In addition, the user can also manage the smart home device through the user device, specifically, the smart home gateway can receive the device processing instruction for the smart home device sent by the user device, and then process the smart home device in the device list according to the device processing instruction. Wherein, the device processing instruction is at least one of device adding instruction, device deleting instruction and device modifying instruction.
[0230] In addition, the user can also manage the smart home device through the user device, specifically, the smart home gateway can receive the device processing instruction for the smart home device sent by the user device, and then process the smart home device in the device list according to the device processing instruction. Wherein, the device processing instruction is at least one of device adding instruction, device deleting instruction and device modifying instruction.
[0231] It should be noted that the embodiments of the present application include but are not limited to the above examples, and it can be understood that those skilled in the art can also set according to actual needs under the guidance of the idea of the embodiments of the present application, and the present application does not limit this.
[0232] In the embodiment of the present application, the smart home gateway is applied, the smart home gateway can be deployed in the smart home system, the smart home system can further include smart home devices, the smart home devices include smart home devices communicating based on different communication protocols, in the process of managing and controlling the smart home devices, especially in the case of data interaction between different smart home devices, the gateway can receive device data sent by a first smart home device, the device data at least includes a device identifier, the first smart home device is a smart home device communicating based on a first communication protocol, and the target device attribute corresponding to the first smart home device is identified based on the device identifier, then the device data is converted into target data in an internal data format according to the target device attribute, the internal data format is a standard format for data interaction between the smart home gateway and the smart home devices in the smart home system, and then the target data is sent to a second smart home device, the second smart home device is a smart home device communicating based on a second communication protocol, the first communication protocol and the second communication protocol are different communication protocols, so that when the smart home devices based on different communication protocols need to interact, the gateway can convert the device data needing to interact, and overcome the communication protocol difference between different smart home devices based on the converted data, realize unified control, ensure efficient and stable interconnection and intercommunication between smart home devices, provide great convenience for user control of smart home devices, and ensure user experience.
[0233] In order for those skilled in the art to better understand the technical solutions in the embodiments of the present application, the following will be exemplarily described by corresponding examples:
[0234] As an example, refer to Figure 2, shows the flowchart of device control provided in the embodiments of the present application. When different brands of smart devices access the smart home gateway, the protocol conversion mechanism begins to play a role. First, the gateway identifies the device through the device identification module. This module uses the device's specific identification information, such as the device's MAC address, device model code, etc., to determine the device's brand and type. Once the device is identified, the protocol analysis module will parse according to the device's communication protocol. For example, if it is a smart door lock using Z-Wave protocol, the protocol analysis module will understand the data packet structure of Z-Wave protocol and extract key information such as door lock status, unlock instruction, etc. Next, the protocol conversion module converts the parsed device data into a unified internal data format. This internal data format is the standard format for the gateway to interact with other devices and can be understood by devices of different brands. For example, after converting the door lock status data of the Z-Wave protocol into a unified format, other devices such as smart lamps or smart home appliances can also perform corresponding linkage operations according to this status.
[0235] Internal format (Here is an example showing how to standardize data from different devices into a unified internal data format. For example, taking light devices and temperature control devices as examples:
[0236] { "devices": [ { "device_id": "light_001", "type": "light", "status":"on", "brightness": 75, "color": "warm_white", "protocol": "Zigbee"}, { "device_id": "thermostat_001", "type": "thermostat", "status": "auto", "temperature": 22.5, "mode": "heating", "protocol": "WiFi"} ]}
[0237] In the above internal data format:
[0238] device_id: Unique identifier of the device.
[0239] type: Device type (such as light, temperature control).
[0240] status: Current status of the device (such as on, off, auto).
[0241] brightness: Brightness of the light device (only applicable to light devices).
[0242] color: color of the light (only applicable for light devices).
[0243] temperature: current temperature of the temperature control device (only applicable for temperature control devices).
[0244] mode: working mode of the temperature control device (such as heating, cooling).
[0245] protocol: communication protocol used by the device (such as Zigbee, WiFi).
[0246] To ensure the accuracy and efficiency of protocol conversion, a dynamic protocol library is established. This protocol library is constantly updated and expanded to accommodate emerging smart device protocols. When new devices are launched, their protocols are added to the protocol library through online updates, ensuring that the system can support new devices in a timely manner.
[0247] Among them, for the discovery and identification of smart devices, the smart home gateway discovers newly connected smart devices through automatic scanning and device broadcast response. The automatic scanning function periodically scans the communication network and sends specific probe signals. For example, in a WiFi network, the gateway can send specific broadcast packets to inquire whether there are new devices connected. When smart devices are connected to the network, they will actively send broadcast messages to the gateway, containing basic information such as brand, model, and function. After receiving these broadcast messages, the gateway adds the device information to the device list. In order to accurately identify the type and control method of the device, the gateway matches the scanned device information with the built-in device database. This database stores the characteristic information of various known devices, and through comparison, the specific type of the device can be determined. For example, if the broadcast message of the device contains specific brand codes and model information, the gateway can find the corresponding record in the database to determine that the device is a smart camera and understand its control method and parameter requirements.
[0248] For some devices that cannot be automatically identified, the gateway can obtain device information through online queries or user manual input. For example, users can input the brand and model of the device through the mobile application, and the gateway will query and configure according to these information.
[0249] In addition, to ensure the security and reliability of data transmission between cross-brand devices, a series of advanced security technologies are adopted. First of all, data encryption is crucial. High-strength encryption algorithms such as AES-256 (Advanced Encryption Standard, 256-bit key length) are used to encrypt the transmitted data. An encrypted channel is established between the device and the gateway to ensure that the data is not stolen or tampered with during transmission. Moreover, identity authentication mechanism is also indispensable. Strict identity authentication is conducted for smart devices and user terminals. When a device accesses the gateway, it needs to provide a unique identity and authentication key. For example, when a smart home appliance accesses, it will send its device serial number and pre-set authentication key to the gateway, and the gateway will only allow the device to access the system after verification. When a user terminal logs into the mobile application, it needs to input the username and password and other authentication information to ensure that only legitimate users can control the device. In addition, data integrity verification is also important. Specifically, hash algorithms (such as SHA-256) or message authentication codes can be used to verify the integrity of the transmitted data. The receiver will perform integrity verification after receiving the data to ensure that the data has not been damaged or tampered with during transmission. In addition, secure communication protocols such as TLS / SSL (Transport Layer Security / Secure Sockets Layer) are used to ensure the security and reliability of data transmission. These protocols establish an encrypted channel between the device and the gateway to prevent data from being eavesdropped and attacked.
[0250] For user terminal application development, the user terminal application is an important tool for users to interact with the smart home gateway. During development, focus on user experience and functional practicality. In terms of device management, users can add, delete, and modify smart devices through the application, view device status and parameters. Provide device grouping management function, facilitate user classification management of different types of devices. For example, users can divide all smart light fixtures into a group and divide smart home appliances into another group to facilitate more convenient control. In the scene setting function, users can set different scenes according to their own needs. For example, when the user comes home, the gateway can automatically open the smart door lock, turn on the lights in the living room, and adjust the air conditioner temperature to a comfortable range. In the scene setting, users can select multiple devices for linkage control to achieve the function of one-key control of multiple devices. In the timing task function, users can set timing tasks to automatically execute corresponding operations on smart devices at specified times. For example, users can set the automatic opening of the curtains at 7 am every day and the automatic closing of all lights at 10 pm. Provide repeated timing task setting function to facilitate user setting of periodic tasks. In the remote control function, users can remotely control smart devices through the application, wherever they are, and can control the devices at home at any time. The application provides real-time device status feedback to let users understand the running status of the device. For example, users can view the real-time picture of the smart camera through the mobile phone to understand the situation at home.
[0251] In addition, through the data analysis function, the use data of smart devices can be analyzed to provide energy-saving suggestions and device maintenance prompts for users. Analysis data includes device power consumption, running time, fault record, etc. For example, if the power consumption of a smart home appliance suddenly increases, the application can remind the user to check whether the device has a fault or provide energy-saving suggestions such as adjusting the use time of the device or setting a more reasonable temperature.
[0252] Further, in order to meet the growing demand of the smart home market, the smart home gateway has good scalability. Adding new device types is an important aspect. With the continuous emergence of new smart devices, the gateway should be able to easily add new device types. When a new device type appears, by updating the software and protocol library of the gateway, support for new devices is realized. For example, if a new type of smart sensor appears, the developer can analyze and develop the protocol of the sensor, add its protocol to the protocol library of the gateway, and then update the software of the gateway to enable the gateway to recognize and control this new device.
[0253] Expanding functional modules is also an important way to improve system performance. Based on user needs, the system's functional modules can be continuously expanded. For example, a voice control module can be added, allowing users to control smart devices via voice commands. Alternatively, a smart scene module can be added to automatically adjust device status based on different times, weather conditions, etc. An energy management module can also be added to monitor and optimize home energy usage. Functional modules can be added to the gateway through software upgrades, providing users with more intelligent services.
[0254] Integration with third-party platforms enables the integration of more devices and services. For example, integrating with smart speaker platforms allows for voice control of smart devices; integrating with smart security platforms enables integrated management of home security. During the integration process, it is crucial to ensure data security and compatibility, protecting user privacy and rights. Standardized interfaces and protocols, such as OAuth 2.0 authorization protocols, should be used to ensure secure and reliable integration. Simultaneously, rigorous testing and verification should be conducted to ensure stable system operation after integration.
[0255] Through the above process, when smart home devices based on different communication protocols need to interact with each other, the gateway can convert the data of the devices that need to interact with each other, and overcome the differences in communication protocols between different smart home devices based on the converted data, so as to achieve unified control, ensure efficient and stable interconnection between smart home devices, provide users with great convenience in controlling smart home devices, and ensure the user experience.
[0256] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0257] Reference Figure 3 This diagram illustrates a structural block diagram of a device management apparatus provided in an embodiment of the present invention. The apparatus is applied to a smart home gateway, which is deployed in a smart home system. The smart home system also includes smart home devices, which communicate based on different communication protocols. Specifically, the smart home devices may include the following modules:
[0258] The data receiving module 301 is used to receive device data sent by the first smart home device. The device data includes at least a device identifier. The first smart home device is a smart home device that communicates based on a first communication protocol.
[0259] The device identification module 302 is configured to identify a target device attribute corresponding to the first smart home device based on the device identifier.
[0260] The data conversion module 303 is configured to convert the device data into target data in an internal data format according to the target device attribute, the internal data format being a standard format for data interaction between the smart home gateway and smart home devices in the smart home system.
[0261] The data sending module 304 is configured to send the target data to a second smart home device, and control the second smart home device to perform a device operation corresponding to the target data, the second smart home device being a smart home device that communicates based on a second communication protocol, the first communication protocol and the second communication protocol being different communication protocols.
[0262] In some possible implementation manners, the device identifier at least includes one of a MAC address and a device model code, and the device identification module 302 is specifically configured to:
[0263] identify the first smart home device by using the MAC address and / or the device model code, and determine the target device attribute corresponding to the first smart home device.
[0264] In some possible implementation manners, the target device attribute at least includes target brand information and a target device type, and the data conversion module 303 is specifically configured to:
[0265] determine a target data packet structure corresponding to the target brand information and the target device type, the target data packet structure being adapted to the first communication protocol.
[0266] obtain a target mapping relationship corresponding to the first smart home device, and compare the target device type and the target brand information with the target mapping relationship respectively, to determine target control configuration information corresponding to the first smart home device.
[0267] extract key information corresponding to the device data from the target data packet structure according to the target control configuration information.
[0268] add the key information to a preset data packet structure to obtain target data in the internal data format corresponding to the device data, the preset data packet structure being a data structure used for data interaction between the smart home gateway and smart home devices.
[0269] In some possible implementation manners, the method further includes:
[0270] a signal broadcast module, configured to periodically send a probe signal to a communication network in which the smart home gateway is located;
[0271] a first information extraction module, configured to extract first basic information corresponding to a first target smart home device from first broadcast information sent by the first target smart home device in response to receiving the probe signal;
[0272] a first information comparison module, configured to compare the first basic information with a preset device feature library, and determine a first device type and first control configuration information corresponding to the first target smart home device based on a comparison result, the first control configuration information at least including information representing a control mode and control parameter requirement of a smart home device;
[0273] a first adding module, configured to add the first target smart home device to a device list of the smart home gateway, and establish a mapping relationship among the first device type, the first control configuration information and the target smart home device.
[0274] In some possible implementation manners, the first basic information at least includes one of first brand information, a first device type and first function information, and the first information comparison module is specifically configured to:
[0275] if at least one of the first brand information, the first device type and the first function information exists in the device feature library, identity authentication information is sent to the first target smart home device, and identity information sent by the first target smart home device is received, the identity information at least including a device serial number and an authentication key;
[0276] if the authentication key is authenticated, the device serial number is recorded, and the first device type and the first control configuration information corresponding to the first target smart home device are extracted from the device feature library.
[0277] In some possible implementation manners, the method further includes:
[0278] a second information extraction module, configured to extract second basic information corresponding to a second target smart home device from second broadcast information broadcasted by the second target smart home device in response to receiving the second broadcast information;
[0279] a second information comparison module, configured to compare the second basic information with a preset device feature library, and determine a second device type and second control configuration information corresponding to the second target smart home device based on a comparison result;
[0280] The second adding module is configured to add the second target smart home device to a device list of the smart home gateway, and establish a mapping relationship among the second device type, the second control configuration information and the target smart home device.
[0281] In some possible implementation manners, an encrypted channel is established between the smart home gateway and the smart home device, and the data sending module 304 is specifically configured to:
[0282] encrypt the target data to obtain corresponding encrypted data;
[0283] send the encrypted data to the second smart home device through the encrypted channel.
[0284] In some possible implementation manners, the method further includes:
[0285] The instruction receiving module is configured to receive a device processing instruction for the smart home device sent by a user device;
[0286] The instruction executing module is configured to process the smart home device in the device list according to the device processing instruction.
[0287] The device processing instruction is at least one of a device adding instruction, a device deleting instruction and a device modifying instruction.
[0288] In some possible implementation manners, the method further includes:
[0289] The device control module is configured to receive a scene control instruction and a trigger condition corresponding to the scene control instruction sent by a user device, the scene control instruction including a device control instruction for at least one smart home device.
[0290] The instruction sending module is configured to send the device control instruction to the corresponding at least one smart home device in response to detecting that the trigger condition is met, the device control instruction being used to instruct the smart home device to perform a device operation corresponding to the scene control instruction.
[0291] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and relevant parts refer to the part of the method embodiment.
[0292] In addition, the embodiment of the present application further provides an electronic device, which includes a processor, a memory, a computer program stored in the memory and executable on the processor, and the computer program is executed by the processor to implement each process of the device management method embodiment and achieve the same technical effects. To avoid repetition, it will not be repeated here.
[0293] The embodiment of the present application also provides a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program is executed by a processor to realize each process of the management method of the device and achieve the same technical effects. To avoid repetition, details are not described herein. The computer readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0294] Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts between each embodiment are referred to each other.
[0295] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, device or computer program product. Therefore, the embodiments of the present application can be in the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, EEPROM, Flash and eMMC, etc.) containing computer usable program codes.
[0296] The embodiments of the present application are described with reference to flowcharts and / or block diagrams of the method, terminal device (system) and computer program product according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing terminal device to produce a machine, so that the instructions executed by the computer or other programmable data processing terminal device produce a device for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The device for implementing the functions specified in one or more flows and / or blocks. Figure 1 The device for implementing the functions specified in one or more flows and / or blocks.
[0297] These computer program instructions can also be stored in a computer readable storage medium to guide the computer or other programmable data processing terminal device to work in a specific manner, so that the instructions stored in the computer readable storage medium produce a product including instruction devices, which implement the functions specified in the flowcharts and / or block diagrams. Figure 1 The device for implementing the functions specified in one or more flows and / or blocks. Figure 1 The device for implementing the functions specified in one or more flows and / or blocks.
[0298] These computer program instructions can also be loaded into a computer or other programmable data processing terminal device, so that a series of operational steps are performed on the computer or other programmable terminal device to generate a computer implemented process, so that the instructions executed on the computer or other programmable terminal device provide a process for implementing the functions specified in the flowchart Figure 1 one flow or multiple flows and / or the functions specified in the flowchart Figure 1 one block or multiple blocks.
[0299] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they know the basic inventive concept. Therefore, the appended claims are intended to cover all changes and modifications falling within the scope of the embodiments of the present application.
[0300] Finally, it should be noted that the relational terms herein, such as first and second, are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any such actual relationship or order between such entities or actions. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or terminal device. Without further limitation, an element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.
[0301] The above describes in detail the management method of the device and the management device of the device provided by the present application, and the principles and implementation manners of the present application are described by using specific examples. The above description of the embodiments is only used to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges can be changed, and the above description of the present application should not be understood as a limitation of the present application.
Claims
1. A method for managing equipment, characterized in that, The method is applied to a smart home gateway, which is deployed in a smart home system. The smart home system also includes smart home devices, which communicate based on different communication protocols. The system receives device data sent by a first smart home device, the device data including at least a device identifier, wherein the first smart home device is a smart home device that communicates based on a first communication protocol. Based on the device identifier, the target device attributes corresponding to the first smart home device are identified; Based on the target device attributes, the device data is converted into target data in an internal data format, which is the standard format for data interaction between the smart home gateway and smart home devices in the smart home system. The target data is sent to the second smart home device, and the second smart home device is controlled to perform the device operation corresponding to the target data. The second smart home device is a smart home device that communicates based on a second communication protocol. The first communication protocol and the second communication protocol are different communication protocols. The target device attributes include at least target brand information and target device type. The step of converting the device data into target data in an internal data format based on the target device attributes includes: Determine the target data packet structure corresponding to the target brand information and the target device type, wherein the target data packet structure is adapted to the first communication protocol; Obtain the target mapping relationship corresponding to the first smart home device, and compare the target device type and the target brand information with the target mapping relationship respectively to determine the target control configuration information corresponding to the first smart home device; Extract the key information corresponding to the device data from the target data packet structure according to the target control configuration information; The key information is added to a preset data packet structure to obtain target data in an internal data format corresponding to the device data. The preset data packet structure is the data structure used by the smart home gateway when interacting with smart home devices.
2. The method according to claim 1, characterized in that, The device identifier includes at least one of a MAC address and a device model code. The step of identifying the target device attributes corresponding to the first smart home device based on the device identifier includes: The first smart home device is identified using the MAC address and / or the device model code to determine the target device attributes corresponding to the first smart home device.
3. The method according to claim 1, characterized in that, Also includes: Periodically send detection signals to the communication network where the smart home gateway is located; In response to receiving a first broadcast message for the detection signal sent by a first target smart home device, first basic information corresponding to the target smart home device is extracted from the first broadcast message; The first basic information is compared with a preset device feature library. Based on the comparison result, the first device type and first control configuration information corresponding to the first target smart home device are determined. The first control configuration information includes at least information characterizing the control method and control parameter requirements of the smart home device. Add the first target smart home device to the device list of the smart home gateway, and establish a mapping relationship between the first device type, the first control configuration information, and the target smart home device.
4. The method according to claim 3, characterized in that, The first basic information includes at least one of the following: first brand information, first device type, and first functional information. The step of determining the first device type and first control configuration information corresponding to the first target smart home device based on the comparison result includes: If at least one of the first brand information, the first device type, and the first function information exists in the device feature library, then an authentication information is sent to the first target smart home device, and the identity information sent by the first target smart home device is received. The identity information includes at least the device serial number and the authentication key. If the authentication key is successfully authenticated, the device serial number is recorded, and the first device type and first control configuration information corresponding to the first target smart home device are extracted from the device feature library.
5. The method according to claim 3 or 4, characterized in that, Also includes: In response to receiving a second broadcast message actively broadcast by a second target smart home device, extract the second basic information corresponding to the target smart home device from the second broadcast message; The second basic information is compared with a preset device feature library, and the second device type and second control configuration information corresponding to the second target smart home device are determined based on the comparison results. Add the second target smart home device to the device list of the smart home gateway, and establish a mapping relationship between the second device type, the second control configuration information, and the target smart home device.
6. The method according to claim 3 or 4, characterized in that, An encrypted channel is established between the smart home gateway and the smart home device. Sending the target data to the second smart home device includes: The target data is encrypted to obtain the corresponding encrypted data; The encrypted data is sent to the second smart home device through the encrypted channel.
7. The method according to claim 3 or 4, characterized in that, Also includes: Receive device processing instructions sent by the user equipment for the smart home device; Process the smart home devices in the device list according to the device processing instructions; The device processing instruction is at least one of the following: a device add instruction, a device delete instruction, and a device modify instruction.
8. The method according to claim 3 or 4, characterized in that, Also includes: Receive scene control instructions sent by user equipment and the triggering conditions corresponding to the scene control instructions, wherein the scene control instructions include device control instructions for at least one smart home device; In response to detecting that the triggering condition is met, the device control command is sent to at least one corresponding smart home device, the device control command being used to instruct the smart home device to perform a device operation corresponding to the scene control command.
9. A device for managing equipment, characterized in that, An application for a smart home gateway, wherein the smart home gateway is deployed in a smart home system, the smart home system also includes smart home devices, the smart home devices including smart home devices that communicate based on different communication protocols, the device comprising: A data receiving module is used to receive device data sent by a first smart home device, wherein the device data includes at least a device identifier, and the first smart home device is a smart home device that communicates based on a first communication protocol; The device identification module is used to identify the target device attributes corresponding to the first smart home device based on the device identifier; The data conversion module is used to convert the device data into target data in an internal data format according to the target device attributes. The internal data format is the standard format for data interaction between the smart home gateway and smart home devices in the smart home system. A data transmission module is used to send the target data to a second smart home device and control the second smart home device to perform device operations corresponding to the target data. The second smart home device is a smart home device that communicates based on a second communication protocol. The first communication protocol and the second communication protocol are different communication protocols. The target device attributes include at least the target brand information and the target device type, and the data conversion module is specifically used for: Determine the target data packet structure corresponding to the target brand information and the target device type, wherein the target data packet structure is adapted to the first communication protocol; Obtain the target mapping relationship corresponding to the first smart home device, and compare the target device type and the target brand information with the target mapping relationship respectively to determine the target control configuration information corresponding to the first smart home device; Extract the key information corresponding to the device data from the target data packet structure according to the target control configuration information; The key information is added to a preset data packet structure to obtain target data in an internal data format corresponding to the device data. The preset data packet structure is the data structure used by the smart home gateway when interacting with smart home devices.
10. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes a program stored in the memory, it implements the method as described in any one of claims 1-8.
11. A computer-readable storage medium having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method as described in any one of claims 1-8.
Citation Information
Patent Citations
Gateway structure for multi-protocol conversion
CN112671638A