CN114500620B - Data processing method, device and storage medium - Google Patents
Data processing method, device and storage medium Download PDFInfo
- Publication number
- CN114500620B CN114500620B CN202210080619.2A CN202210080619A CN114500620B CN 114500620 B CN114500620 B CN 114500620B CN 202210080619 A CN202210080619 A CN 202210080619A CN 114500620 B CN114500620 B CN 114500620B
- Authority
- CN
- China
- Prior art keywords
- type
- data frame
- data
- control
- controlled device
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
- H04L67/125—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0001—Systems modifying transmission characteristics according to link quality, e.g. power backoff
- H04L1/0023—Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the signalling
- H04L1/0028—Formatting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
- H04L1/0056—Systems characterized by the type of code used
- H04L1/0061—Error detection codes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0078—Avoidance of errors by organising the transmitted data in a format specifically designed to deal with errors, e.g. location
- H04L1/0079—Formats for control data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0078—Avoidance of errors by organising the transmitted data in a format specifically designed to deal with errors, e.g. location
- H04L1/0083—Formatting with frames or packets; Protocol or part of protocol for error control
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/02—Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Quality & Reliability (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Selective Calling Equipment (AREA)
Abstract
本公开是关于一种数据处理方法、装置及存储介质。该方法包括:获取控制设备的设备信息和所述控制设备生成的控制信息;根据所述设备信息和所述控制信息,生成第一类数据帧;其中,所述第一类数据帧包括地址域和负载部分,所述设备信息中的第一部分构成所述第一类数据帧的地址域,所述设备信息中的第二部分和所述控制信息共同构成所述第一类数据帧的负载部分。本公开可以能够提高数据帧的传输效率、准确性,同时能够减少数据帧的传输功耗,增加待机时长等。
The present disclosure is about a data processing method, device and storage medium. The method includes: obtaining device information of a control device and control information generated by the control device; generating a first type of data frame according to the device information and the control information; wherein the first type of data frame includes an address field and a load part, the first part of the device information constitutes the address field of the first type of data frame, and the second part of the device information and the control information together constitute the load part of the first type of data frame. The present disclosure can improve the transmission efficiency and accuracy of data frames, and at the same time can reduce the transmission power consumption of data frames, increase the standby time, etc.
Description
本申请是针对申请日为2021年11月17日,申请号为202111359491.5,发明名称为数据处理方法、装置及存储介质的专利的分案申请。This application is a divisional application for a patent with an application date of November 17, 2021, application number 202111359491.5, and invention name "Data processing method, device and storage medium".
技术领域Technical Field
本公开涉及通信技术领域,尤其涉及一种数据处理方法、装置及存储介质。The present disclosure relates to the field of communication technology, and in particular to a data processing method, device and storage medium.
背景技术Background technique
随着物联网的快速发展,联接的物联网设备数、传感器数和执行器数量将不断增长。在物联网网络边缘,有大量的终端节点,虽然这些单个节点可能都仅需极低的功率需求,且无需持续运行(仅在需要时才启动),但激增的节点数会产生极高的总功耗。能量采集技术是指通过把如热电、振动、运动、太阳能等产生的但尚未利用的能量回收并转化为电能,代替电池为应用供电,在物联网的部署中将越来越重要。With the rapid development of the Internet of Things, the number of connected IoT devices, sensors, and actuators will continue to grow. At the edge of the IoT network, there are a large number of terminal nodes. Although these individual nodes may only require very low power and do not need to run continuously (start only when needed), the surge in the number of nodes will generate extremely high total power consumption. Energy harvesting technology refers to the recovery and conversion of unused energy such as thermoelectricity, vibration, motion, solar energy, etc. into electrical energy to power applications instead of batteries. It will become increasingly important in the deployment of the Internet of Things.
而通过能量采集实现电子设备的免电池供电功能的关键是电子设备需要支持超低功耗无线协议的低功耗技术,物联网无线数据传输有无线保真(Wireless Fidelity,Wi-Fi)、低速短距离传输的无线网上协议(Zigbee)、蓝牙等标准的协议。但因Wi-Fi、蓝牙等均为大量数据传输而设计,因此将免电池供电的电子设备应用在物联网领域最大的问题是消耗的功耗过高,并且无法满足物联网个性化的物物相连的特殊性需求。The key to realizing the battery-free power supply function of electronic devices through energy harvesting is that the electronic devices need to support low-power technology of ultra-low-power wireless protocols. The wireless data transmission of the Internet of Things includes standard protocols such as Wireless Fidelity (Wi-Fi), low-speed and short-distance transmission of the wireless Internet protocol (Zigbee), and Bluetooth. However, since Wi-Fi and Bluetooth are designed for large-scale data transmission, the biggest problem in applying battery-free electronic devices in the field of the Internet of Things is that the power consumption is too high and cannot meet the special needs of the personalized connection of things in the Internet of Things.
发明内容Summary of the invention
为克服相关技术中存在的问题,本公开提供一种数据处理方法、装置及存储介质。In order to overcome the problems existing in the related art, the present disclosure provides a data processing method, device and storage medium.
根据本公开实施例的第一方面,提供一种数据处理方法,包括:According to a first aspect of an embodiment of the present disclosure, there is provided a data processing method, including:
获取控制设备的设备信息和所述控制设备生成的控制信息;Acquire device information of a control device and control information generated by the control device;
根据所述设备信息和所述控制信息,生成第一类数据帧;Generate a first type of data frame according to the device information and the control information;
其中,所述第一类数据帧包括地址域和负载部分,所述设备信息中的第一部分构成所述第一类数据帧的地址域,所述设备信息中的第二部分和所述控制信息共同构成所述第一类数据帧的负载部分。The first type of data frame includes an address field and a load part, the first part of the device information constitutes the address field of the first type of data frame, and the second part of the device information and the control information together constitute the load part of the first type of data frame.
在一些实施例中,所述设备信息包括:所述控制设备的源标识、所述控制设备的设备类型,所述控制信息包括:控制参数;In some embodiments, the device information includes: a source identifier of the control device, a device type of the control device, and the control information includes: a control parameter;
所述根据所述设备信息和所述控制信息,生成第一类数据帧,包括:The step of generating a first type of data frame according to the device information and the control information includes:
根据所述控制设备的源标识、所述控制设备的设备类型和控制参数,生成第一类数据帧;其中,所述源标识用于确定所述第一类数据帧的地址域;所述方法还包括:Generate a first type of data frame according to the source identifier of the control device, the device type of the control device and the control parameter; wherein the source identifier is used to determine the address field of the first type of data frame; the method further includes:
确定受控设备的设备类型;Determine the device type of the controlled device;
根据所述受控设备的设备类型和所述控制参数,确定用于控制所述受控设备的命令的类型;Determining, according to the device type of the controlled device and the control parameter, a type of command for controlling the controlled device;
根据所述受控设备的设备类型和所述命令的类型,生成第二类数据帧;generating a second type of data frame according to the device type of the controlled device and the type of the command;
其中,所述第一类数据帧和所述第二类数据帧的帧控制域中预设位所携带数据的数据类型不同;所述受控设备的目标标识用于确定所述第二类数据帧的地址域。The data types of the data carried by the preset bits in the frame control fields of the first type of data frame and the second type of data frame are different; and the target identifier of the controlled device is used to determine the address field of the second type of data frame.
在一些实施例中,所述第二类数据帧由所述第二类数据帧的地址域和所述第二类数据帧的负载部分共同构成。In some embodiments, the second type of data frame is composed of an address field of the second type of data frame and a payload portion of the second type of data frame.
在一些实施例中,所述第二类数据帧的负载部分对应的字节长度由所述命令的类型确定。In some embodiments, the byte length corresponding to the payload portion of the second type of data frame is determined by the type of the command.
在一些实施例中,在所述命令为第一类型时,所述第二类数据帧的负载部分由所述受控设备的设备类型、所述第一类型和第一命令内容确定;In some embodiments, when the command is of the first type, the payload portion of the second type of data frame is determined by the device type of the controlled device, the first type and the first command content;
所述第一命令内容由所述命令的类型确定。The first command content is determined by the type of the command.
在一些实施例中,在所述命令为第一类型,且所述控制设备的控制参数为空时,所述第二类数据帧的负载部分由所述受控设备的设备类型和所述第一类型确定。In some embodiments, when the command is of the first type and the control parameter of the control device is empty, the payload portion of the second type of data frame is determined by the device type of the controlled device and the first type.
在一些实施例中,在所述命令为第二类型,且所述第二类型的命令具有第一属性时,所述第二类数据帧的负载部分由所述受控设备的设备类型、所述第二类型和第二命令内容确定;In some embodiments, when the command is of the second type and the command of the second type has the first attribute, the payload portion of the second type of data frame is determined by the device type of the controlled device, the second type, and the second command content;
所述第二命令内容由所述命令的类型确定。The second command content is determined by the type of the command.
在一些实施例中,在所述命令为第二类型,且所述第二类型的命令具有第二属性时,所述第二类数据帧的负载部分由所述受控设备的设备类型、所述第二类型和第三命令内容确定;In some embodiments, when the command is of the second type and the command of the second type has a second attribute, the payload portion of the second type of data frame is determined by the device type of the controlled device, the second type and the third command content;
所述第三命令内容由所述受控设备的设备类型和所述命令的类型共同确定。The third command content is determined by the device type of the controlled device and the type of the command.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
根据所述第二类数据帧确定第三类数据帧;其中,所述第三类数据帧和所述第一类数据帧以及所述第二类数据帧的帧控制域中预设位所携带数据的数据类型不同;所述第三类数据帧包括:地址域和负载部分,所述第三类数据帧的地址域由所述源标识确定;所述第三类数据帧的负载部分由所述受控设备的设备类型、所述命令的类型和第四命令内容确定;Determine a third type of data frame according to the second type of data frame; wherein the data types of the data carried by the preset bits in the frame control fields of the third type of data frame, the first type of data frame and the second type of data frame are different; the third type of data frame comprises: an address field and a load part, the address field of the third type of data frame is determined by the source identifier; the load part of the third type of data frame is determined by the device type of the controlled device, the type of the command and the fourth command content;
所述第四命令内容由所述受控设备的设备类型确定,或者由所述命令的类型确定,或者由所述命令的类型和所述受控设备的设备类型共同确定。The fourth command content is determined by the device type of the controlled device, or by the type of the command, or by both the type of the command and the device type of the controlled device.
在一些实施例中,所述第二类数据帧的帧控制域携带转发信息;In some embodiments, the frame control field of the second type of data frame carries forwarding information;
其中,所述转发信息用于触发所述受控设备向其他受控设备转发数据的功能。The forwarding information is used to trigger a function of the controlled device forwarding data to other controlled devices.
在一些实施例中,所述第二类数据帧的负载部分携带信道信息;In some embodiments, the payload portion of the second type of data frame carries channel information;
其中,所述信道信息用于确定不同数据帧对应的不同传输信道。The channel information is used to determine different transmission channels corresponding to different data frames.
在一些实施例中,所述第一类数据帧和/或所述第二类数据帧携带校验信息;In some embodiments, the first type of data frame and/or the second type of data frame carries verification information;
所述校验信息用于:将所述第一类数据帧和/或所述第二类数据帧从预设位置划分为第一部分和第二部分,对所述第一部分进行校验,得到对应于所述第一部分的第一校验结果;对所述第二部分进行校验,得到对应于所述第二部分的第二校验结果,或者对所述第一部分、所述第一校验结果以及所述第二部分进行校验,得到所述第二校验结果。The verification information is used to: divide the first type of data frame and/or the second type of data frame from a preset position into a first part and a second part, verify the first part to obtain a first verification result corresponding to the first part; verify the second part to obtain a second verification result corresponding to the second part, or verify the first part, the first verification result and the second part to obtain the second verification result.
在一些实施例中,所述第一类数据帧和/或所述第二类数据帧包括帧头部分,所述帧头部分由协议版本信息确定,所述协议版本信息用于确定数据处理的数据协议类型。In some embodiments, the first type of data frame and/or the second type of data frame includes a frame header portion, and the frame header portion is determined by protocol version information, and the protocol version information is used to determine a data protocol type for data processing.
根据本公开实施例的第二方面,提供一种数据处理方法,应用于受控设备,包括:According to a second aspect of an embodiment of the present disclosure, there is provided a data processing method, which is applied to a controlled device, and includes:
向智能控制中心发送所述受控设备的状态信息,以使得所述智能控制中心根据所述受控设备的状态信息和控制设备的状态信息,对所述控制设备和所述受控设备进行匹配;Sending the state information of the controlled device to the intelligent control center, so that the intelligent control center matches the control device with the controlled device according to the state information of the controlled device and the state information of the control device;
接收来自所述智能控制中心的匹配结果;其中,所述匹配结果用于建立所述控制设备与所述受控设备之间的通信连接。Receive a matching result from the intelligent control center; wherein the matching result is used to establish a communication connection between the control device and the controlled device.
在一些实施例中,所述向智能控制中心发送所述受控设备的状态信息,包括:In some embodiments, sending the state information of the controlled device to the intelligent control center includes:
在预设时间单位内,按照第一时间间隔向所述智能控制中心发送所述状态信息。The status information is sent to the intelligent control center at a first time interval within a preset time unit.
在一些实施例中,所述向智能控制中心发送所述受控设备的状态信息,包括:In some embodiments, sending the state information of the controlled device to the intelligent control center includes:
在以所述受控设备上电时刻为起始时刻的预设时长内,按照第二时间间隔向所述智能控制中心发送所述状态信息。The status information is sent to the intelligent control center at a second time interval within a preset time period starting from the power-on time of the controlled device.
在一些实施例中,所述向智能控制中心发送所述受控设备的状态信息,包括:In some embodiments, sending the state information of the controlled device to the intelligent control center includes:
在检测到所述受控设备满足预设触发条件时,按照第三时间间隔向所述智能控制中心发送所述状态信息。When it is detected that the controlled device meets a preset trigger condition, the status information is sent to the intelligent control center at a third time interval.
在一些实施例中,所述向智能控制中心发送所述受控设备的状态信息,包括:In some embodiments, sending the state information of the controlled device to the intelligent control center includes:
在所述控制设备与所述受控设备之间的通信连接处于断开状态时,接收所述控制设备发送的第一触发指令;所述控制设备为已经与受控设备建立连接的控制设备,或者为未与所述受控设备建立连接的控制设备,或者为具有预设地址的控制设备;When the communication connection between the control device and the controlled device is in a disconnected state, receiving a first trigger instruction sent by the control device; the control device is a control device that has established a connection with the controlled device, or is a control device that has not established a connection with the controlled device, or is a control device with a preset address;
响应于所述第一触发指令,按照第四时间间隔向所述智能控制中心发送所述受控设备的状态信息。In response to the first trigger instruction, the status information of the controlled device is sent to the intelligent control center at a fourth time interval.
在一些实施例中,所述向智能控制中心发送所述受控设备的状态信息,包括:In some embodiments, sending the state information of the controlled device to the intelligent control center includes:
接收来自所述智能控制中心的查询指令;Receiving a query instruction from the intelligent control center;
响应于所述查询指令,按照第五时间间隔向所述智能控制中心发送所述受控设备的状态信息。In response to the query instruction, the status information of the controlled device is sent to the intelligent control center at a fifth time interval.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
基于所述匹配结果,接收来自于所述受控设备对应的所述控制设备的控制信号;其中,所述控制信号包括第二类数据帧,所述第二类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的;Based on the matching result, receiving a control signal from the control device corresponding to the controlled device; wherein the control signal includes a second type of data frame, and the second type of data frame is generated according to the device type of the controlled device and the type of command for controlling the controlled device;
响应于所述控制信号,根据第三类数据帧生成响应信号;其中,所述第三类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的;In response to the control signal, generating a response signal according to a third type of data frame; wherein the third type of data frame is generated according to the device type of the controlled device and the type of command for controlling the controlled device;
向所述控制设备发送所述响应信号。The response signal is sent to the control device.
在一些实施例中,所述向所述控制设备发送所述响应信号,包括:In some embodiments, sending the response signal to the control device includes:
通过与所述控制设备之间的通信连接,向所述控制设备发送所述响应信号;或者sending the response signal to the control device through a communication connection with the control device; or
通过所述智能控制中心向所述控制设备发送所述响应信号。The response signal is sent to the control device through the intelligent control center.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
根据所述控制设备和所述智能控制中心的设备配置顺序,确定所述响应信号的发送方向;Determining a sending direction of the response signal according to a device configuration sequence of the control device and the intelligent control center;
所述发送方向包括:从所述控制设备至所述智能控制中心的方向,或者从所述智能控制中心至所述控制设备的方向。The sending direction includes: a direction from the control device to the intelligent control center, or a direction from the intelligent control center to the control device.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
对所述第三类数据帧进行字节序转换处理,得到预设模式的第三类数据帧;其中,所述预设模式包括:预设大端模式和预设小端模式;Performing byte order conversion processing on the third type of data frame to obtain the third type of data frame in a preset mode; wherein the preset mode includes: a preset big endian mode and a preset little endian mode;
根据预设模式的第三类数据帧,生成所述响应信号。The response signal is generated according to the third type of data frame in the preset mode.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
根据所控制信号中携带的转发信息,将所述控制信号转发给其他受控设备;forwarding the control signal to other controlled devices according to the forwarding information carried in the controlled signal;
其中,所述转发信息用于触发所述受控设备向其他受控设备转发数据的功能。The forwarding information is used to trigger a function of the controlled device forwarding data to other controlled devices.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
在确定所述控制设备的电量余量小于预设电量阈值时,停止发送所述响应信号。When it is determined that the remaining power of the control device is less than a preset power threshold, the sending of the response signal is stopped.
根据本公开实施例的第三方面,提供一种数据处理方法,应用于控制设备,包括:According to a third aspect of an embodiment of the present disclosure, there is provided a data processing method, which is applied to a control device, and includes:
向智能控制中心发送所述控制设备的状态信息,以使得所述智能控制中心根据所述控制设备的状态信息和受控设备的状态信息,对所述控制设备和所述受控设备进行匹配;Sending the status information of the control device to the intelligent control center, so that the intelligent control center matches the control device and the controlled device according to the status information of the control device and the status information of the controlled device;
接收来自所述智能控制中心的匹配结果;其中,所述匹配结果用于建立所述控制设备与所述受控设备之间的通信连接。Receive a matching result from the intelligent control center; wherein the matching result is used to establish a communication connection between the control device and the controlled device.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
在所述控制设备与所述受控设备之间的通信连接处于断开状态时,基于检测到的输入操作触发第一触发指令;When the communication connection between the control device and the controlled device is in a disconnected state, triggering a first trigger instruction based on a detected input operation;
向所述受控设备发送所述第一触发指令;其中,所述第一触发指令用于指示所述受控设备向所述智能控制中心发送所述受控设备的状态信息。The first trigger instruction is sent to the controlled device; wherein the first trigger instruction is used to instruct the controlled device to send the status information of the controlled device to the intelligent control center.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
在检测到预设触发操作时,根据所述第二类数据帧生成控制信号;其中,所述第二类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的;When a preset trigger operation is detected, a control signal is generated according to the second type of data frame; wherein the second type of data frame is generated according to the device type of the controlled device and the type of command used to control the controlled device;
基于所述匹配结果,将所述控制信号发送至所述受控设备。Based on the matching result, the control signal is sent to the controlled device.
在一些实施例中,所述将所述控制信号发送至所述受控设备,包括:In some embodiments, sending the control signal to the controlled device includes:
通过与所述受控设备之间的通信连接,将所述控制信号发送至所述受控设备;或者sending the control signal to the controlled device through a communication connection with the controlled device; or
通过所述智能控制中心将所述控制信号转发至所述受控设备。The control signal is forwarded to the controlled device through the intelligent control center.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
根据所述智能控制中心和所述受控设备的设备配置顺序,确定所述控制信号的发送方向;Determining a sending direction of the control signal according to a device configuration sequence of the intelligent control center and the controlled device;
所述发送方向包括:从所述智能控制中心至所述受控设备的方向,或者从所述受控设备至所述智能控制中心的方向。The sending direction includes: a direction from the intelligent control center to the controlled device, or a direction from the controlled device to the intelligent control center.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
对所述第二类数据帧进行字节序转换处理,得到预设模式的第二类数据帧;其中,所述预设模式包括:预设大端模式和预设小端模式;Performing byte order conversion processing on the second type of data frames to obtain the second type of data frames in a preset mode; wherein the preset mode includes: a preset big endian mode and a preset little endian mode;
根据预设模式的第二类数据帧,生成所述控制信号。The control signal is generated according to the second type of data frame in a preset mode.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
接收所述受控设备基于所控制信号返回的响应信号;Receiving a response signal returned by the controlled device based on the controlled signal;
其中,所述响应信号包括所述第三类数据帧;所述第三类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的。The response signal includes the third type of data frame; the third type of data frame is generated according to the device type of the controlled device and the type of command used to control the controlled device.
在一些实施例中,所述接收所述受控设备基于所控制信号返回的响应信号,包括:In some embodiments, the receiving a response signal returned by the controlled device based on the controlled signal includes:
通过与所述受控设备之间的通信连接,接收所述响应信号;或者Receiving the response signal through a communication connection with the controlled device; or
通过所述智能控制中心接收所述响应信号。The response signal is received by the intelligent control center.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
在所述控制设备的电量余量小于预设电量阈值时,停止接收所述响应信号。When the remaining power of the control device is less than a preset power threshold, stop receiving the response signal.
在一些实施例中,所述控制设备为自发电供电设备,所述方法还包括:In some embodiments, the control device is a self-generating power supply device, and the method further includes:
通过预设触发事件产生电能,并通过所产生的电能为所述控制设备进行信号的收发提供能量。Electric energy is generated by a preset trigger event, and the generated electric energy provides energy for the control device to send and receive signals.
根据本公开实施例的第四方面,提供一种数据处理装置,包括:According to a fourth aspect of an embodiment of the present disclosure, there is provided a data processing device, including:
获取模块,配置为获取控制设备的设备信息和所述控制设备生成的控制信息;An acquisition module, configured to acquire device information of a control device and control information generated by the control device;
生成模块,配置为根据所述设备信息和所述控制信息,生成第一类数据帧;A generating module, configured to generate a first type of data frame according to the device information and the control information;
其中,所述第一类数据帧包括地址域和负载部分,所述设备信息中的第一部分构成所述第一类数据帧的地址域,所述设备信息中的第二部分和所述控制信息共同构成所述第一类数据帧的负载部分。The first type of data frame includes an address field and a load part, the first part of the device information constitutes the address field of the first type of data frame, and the second part of the device information and the control information together constitute the load part of the first type of data frame.
在一些实施例中,所述设备信息包括:所述控制设备的源标识、所述控制设备的设备类型,所述控制信息包括:控制参数;In some embodiments, the device information includes: a source identifier of the control device, a device type of the control device, and the control information includes: a control parameter;
所述生成模块,配置为:The generation module is configured as follows:
根据所述控制设备的源标识、所述控制设备的设备类型和控制参数,生成第一类数据帧;其中,所述源标识用于确定所述第一类数据帧的地址域;所述装置还包括:Generate a first type of data frame according to the source identifier of the control device, the device type of the control device and the control parameter; wherein the source identifier is used to determine the address field of the first type of data frame; the device also includes:
第一确定模块,配置为确定受控设备的设备类型;A first determination module is configured to determine a device type of a controlled device;
第二确定模块,配置为根据所述受控设备的设备类型和所述控制参数,确定用于控制所述受控设备的命令的类型;A second determining module is configured to determine a type of command for controlling the controlled device according to a device type of the controlled device and the control parameter;
第三确定模块,配置为根据所述受控设备的设备类型和所述命令的类型,生成第二类数据帧;A third determining module is configured to generate a second type of data frame according to the device type of the controlled device and the type of the command;
其中,所述第一类数据帧和所述第二类数据帧的帧控制域中预设位所携带数据的数据类型不同;所述受控设备的目标标识用于确定所述第二类数据帧的地址域。The data types of the data carried by the preset bits in the frame control fields of the first type of data frame and the second type of data frame are different; and the target identifier of the controlled device is used to determine the address field of the second type of data frame.
在一些实施例中,所述第二类数据帧由所述第二类数据帧的地址域和所述第二类数据帧的负载部分共同构成。In some embodiments, the second type of data frame is composed of an address field of the second type of data frame and a payload portion of the second type of data frame.
在一些实施例中,所述第二类数据帧的负载部分对应的字节长度由所述命令的类型确定。In some embodiments, the byte length corresponding to the payload portion of the second type of data frame is determined by the type of the command.
在一些实施例中,在所述命令为第一类型时,所述第二类数据帧的负载部分由所述受控设备的设备类型、所述第一类型和第一命令内容确定;In some embodiments, when the command is of the first type, the payload portion of the second type of data frame is determined by the device type of the controlled device, the first type and the first command content;
所述第一命令内容由所述命令的类型确定。The first command content is determined by the type of the command.
在一些实施例中,在所述命令为第一类型,且所述控制设备的控制参数为空时,所述第二类数据帧的负载部分由所述受控设备的设备类型和所述第一类型确定。In some embodiments, when the command is of the first type and the control parameter of the control device is empty, the payload portion of the second type of data frame is determined by the device type of the controlled device and the first type.
在一些实施例中,在所述命令为第二类型,且所述第二类型的命令具有第一属性时,所述第二类数据帧的负载部分由所述受控设备的设备类型、所述第二类型和第二命令内容确定;In some embodiments, when the command is of the second type and the command of the second type has the first attribute, the payload portion of the second type of data frame is determined by the device type of the controlled device, the second type, and the second command content;
所述第二命令内容由所述命令的类型确定。The second command content is determined by the type of the command.
在一些实施例中,在所述命令为第二类型,且所述第二类型的命令具有第二属性时,所述第二类数据帧的负载部分由所述受控设备的设备类型、所述第二类型和第三命令内容确定;In some embodiments, when the command is of the second type and the command of the second type has a second attribute, the payload portion of the second type of data frame is determined by the device type of the controlled device, the second type and the third command content;
所述第三命令内容由所述受控设备的设备类型和所述命令的类型共同确定。The third command content is determined by the device type of the controlled device and the type of the command.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:
第四确定模块,配置为根据所述第二类数据帧确定第三类数据帧;其中,所述第三类数据帧和所述第一类数据帧以及所述第二类数据帧的帧控制域中预设位所携带数据的数据类型不同;所述第三类数据帧包括:地址域和负载部分,所述第三类数据帧的地址域由所述源标识确定;所述第三类数据帧的负载部分由所述受控设备的设备类型、所述命令的类型和第四命令内容确定;a fourth determination module, configured to determine a third type of data frame according to the second type of data frame; wherein the data types of the data carried by the preset bits in the frame control fields of the third type of data frame, the first type of data frame, and the second type of data frame are different; the third type of data frame comprises: an address field and a load part, the address field of the third type of data frame is determined by the source identifier; the load part of the third type of data frame is determined by the device type of the controlled device, the type of the command, and the fourth command content;
所述第四命令内容由所述受控设备的设备类型确定,或者由所述命令的类型确定,或者由所述命令的类型和所述受控设备的设备类型共同确定。The fourth command content is determined by the device type of the controlled device, or by the type of the command, or by both the type of the command and the device type of the controlled device.
在一些实施例中,所述第二类数据帧的帧控制域携带转发信息;In some embodiments, the frame control field of the second type of data frame carries forwarding information;
其中,所述转发信息用于触发所述受控设备向其他受控设备转发数据的功能。The forwarding information is used to trigger a function of the controlled device forwarding data to other controlled devices.
在一些实施例中,所述第二类数据帧的负载部分携带信道信息;In some embodiments, the payload portion of the second type of data frame carries channel information;
其中,所述信道信息用于确定不同数据帧对应的不同传输信道。The channel information is used to determine different transmission channels corresponding to different data frames.
在一些实施例中,所述数据帧携带校验信息;In some embodiments, the data frame carries check information;
所述校验信息用于:将所述数据帧从预设位置划分为第一部分和第二部分,对所述第一部分做进行校验,得到对应于所述第一部分的第一校验结果;对所述第二部分进行校验,得到对应于所述第二部分的第二校验结果,或者对所述第一部分、所述第一校验结果以及所述第二部分进行校验,得到所述第二校验结果。The verification information is used to: divide the data frame from a preset position into a first part and a second part, verify the first part to obtain a first verification result corresponding to the first part; verify the second part to obtain a second verification result corresponding to the second part, or verify the first part, the first verification result and the second part to obtain the second verification result.
在一些实施例中,所述数据帧包括帧头部分,所述帧头部分由协议版本信息确定,所述协议版本信息用于确定数据处理的数据协议类型。In some embodiments, the data frame includes a frame header portion, the frame header portion is determined by protocol version information, and the protocol version information is used to determine a data protocol type for data processing.
根据本公开实施例的第五方面,提供一种数据处理装置,应用于受控设备,包括:According to a fifth aspect of an embodiment of the present disclosure, there is provided a data processing apparatus, applied to a controlled device, comprising:
发送模块,配置为向智能控制中心发送所述受控设备的状态信息,以使得所述智能控制中心根据所述受控设备的状态信息和控制设备的状态信息,对所述控制设备和所述受控设备进行匹配;a sending module configured to send the state information of the controlled device to the intelligent control center, so that the intelligent control center matches the control device with the controlled device according to the state information of the controlled device and the state information of the control device;
接收模块,配置为接收来自所述智能控制中心的匹配结果;其中,所述匹配结果用于建立所述控制设备与所述受控设备之间的通信连接。A receiving module is configured to receive a matching result from the intelligent control center; wherein the matching result is used to establish a communication connection between the control device and the controlled device.
在一些实施例中,所述发送模块,配置为:In some embodiments, the sending module is configured as follows:
在预设时间单位内,按照第一时间间隔向所述智能控制中心发送所述状态信息。The status information is sent to the intelligent control center at a first time interval within a preset time unit.
在一些实施例中,所述发送模块,配置为:In some embodiments, the sending module is configured as follows:
在以所述受控设备上电时刻为起始时刻的预设时长内,按照第二时间间隔向所述智能控制中心发送所述状态信息。The status information is sent to the intelligent control center at a second time interval within a preset time period starting from the power-on time of the controlled device.
在一些实施例中,所述发送模块,配置为:In some embodiments, the sending module is configured as follows:
在检测到所述受控设备满足预设触发条件时,按照第三时间间隔向所述智能控制中心发送所述状态信息。When it is detected that the controlled device meets a preset trigger condition, the status information is sent to the intelligent control center at a third time interval.
在一些实施例中,所述发送模块,配置为:In some embodiments, the sending module is configured as follows:
在所述控制设备与所述受控设备之间的通信连接处于断开状态时,接收所述控制设备发送的第一触发指令;所述控制设备为已经与受控设备建立连接的控制设备,或者为未与所述受控设备建立连接的控制设备,或者为具有预设地址的控制设备;When the communication connection between the control device and the controlled device is in a disconnected state, receiving a first trigger instruction sent by the control device; the control device is a control device that has established a connection with the controlled device, or is a control device that has not established a connection with the controlled device, or is a control device with a preset address;
响应于所述第一触发指令,按照第四时间间隔向所述智能控制中心发送所述受控设备的状态信息。In response to the first trigger instruction, the status information of the controlled device is sent to the intelligent control center at a fourth time interval.
在一些实施例中,所述发送模块,配置为:In some embodiments, the sending module is configured as follows:
接收来自所述智能控制中心的查询指令;Receiving a query instruction from the intelligent control center;
响应于所述查询指令,按照第五时间间隔向所述智能控制中心发送所述受控设备的状态信息。In response to the query instruction, the status information of the controlled device is sent to the intelligent control center at a fifth time interval.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:
匹配模块,配置为基于所述匹配结果,接收来自于所述受控设备对应的所述控制设备的控制信号;其中,所述控制信号包括第二类数据帧,所述第二类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的;a matching module configured to receive a control signal from the control device corresponding to the controlled device based on the matching result; wherein the control signal includes a second type of data frame, and the second type of data frame is generated according to the device type of the controlled device and the type of command for controlling the controlled device;
响应模块,配置为响应于所述控制信号,根据第三类数据帧生成响应信号;其中,所述第三类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的;a response module, configured to generate a response signal according to a third type of data frame in response to the control signal; wherein the third type of data frame is generated according to a device type of the controlled device and a type of a command for controlling the controlled device;
第一传输模块,配置为向所述控制设备发送所述响应信号。The first transmission module is configured to send the response signal to the control device.
在一些实施例中,所述第一传输模块,配置为:In some embodiments, the first transmission module is configured as follows:
通过与所述控制设备之间的通信连接,向所述控制设备发送所述响应信号;或者sending the response signal to the control device through a communication connection with the control device; or
通过所述智能控制中心向所述控制设备发送所述响应信号。The response signal is sent to the control device through the intelligent control center.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:
第五确定模块,配置为根据所述控制设备和所述智能控制中心的设备配置顺序,确定所述响应信号的发送方向;a fifth determination module, configured to determine a sending direction of the response signal according to a device configuration sequence of the control device and the intelligent control center;
所述发送方向包括:从所述控制设备至所述智能控制中心的方向,或者从所述智能控制中心至所述控制设备的方向。The sending direction includes: a direction from the control device to the intelligent control center, or a direction from the intelligent control center to the control device.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:
转换模块,配置为对所述第三类数据帧进行字节序转换处理,得到预设模式的第三类数据帧;其中,所述预设模式包括:预设大端模式和预设小端模式;A conversion module is configured to perform byte order conversion processing on the third type of data frame to obtain a third type of data frame in a preset mode; wherein the preset mode includes: a preset big endian mode and a preset little endian mode;
第六确定模块,配置为根据预设模式的第三类数据帧,生成所述响应信号。The sixth determination module is configured to generate the response signal according to the third type of data frame in a preset mode.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:
转发模块,配置为根据所控制信号中携带的转发信息,将所述控制信号转发给其他受控设备;a forwarding module, configured to forward the control signal to other controlled devices according to the forwarding information carried in the controlled signal;
其中,所述转发信息用于触发所述受控设备向其他受控设备转发数据的功能。The forwarding information is used to trigger a function of the controlled device forwarding data to other controlled devices.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:
第一停止模块,配置为在确定所述控制设备的电量余量小于预设电量阈值时,停止发送所述响应信号。The first stopping module is configured to stop sending the response signal when it is determined that the remaining power of the control device is less than a preset power threshold.
根据本公开实施例的第六方面,提供一种数据处理装置,应用于控制设备,包括:According to a sixth aspect of an embodiment of the present disclosure, there is provided a data processing apparatus, applied to a control device, comprising:
发送模块,配置为向智能控制中心发送所述控制设备的状态信息,以使得所述智能控制中心根据所述控制设备的状态信息和受控设备的状态信息,对所述控制设备和所述受控设备进行匹配;A sending module, configured to send the status information of the control device to the intelligent control center, so that the intelligent control center matches the control device and the controlled device according to the status information of the control device and the status information of the controlled device;
接收模块,配置为接收来自所述智能控制中心的匹配结果;其中,所述匹配结果用于建立所述控制设备与所述受控设备之间的通信连接。A receiving module is configured to receive a matching result from the intelligent control center; wherein the matching result is used to establish a communication connection between the control device and the controlled device.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:
检测模块,配置为在所述控制设备与所述受控设备之间的通信连接处于断开状态时,基于检测到的输入操作触发第一触发指令;a detection module, configured to trigger a first trigger instruction based on a detected input operation when the communication connection between the control device and the controlled device is in a disconnected state;
第二传输模块,配置为向所述受控设备发送所述第一触发指令;其中,所述第一触发指令用于指示所述受控设备向所述智能控制中心发送所述受控设备的状态信息。The second transmission module is configured to send the first trigger instruction to the controlled device; wherein the first trigger instruction is used to instruct the controlled device to send the state information of the controlled device to the intelligent control center.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:
第七确定模块,配置为在检测到预设触发操作时,根据所述第二类数据帧生成控制信号;其中,所述第二类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的;a seventh determination module, configured to generate a control signal according to the second type of data frame when a preset trigger operation is detected; wherein the second type of data frame is generated according to the device type of the controlled device and the type of command used to control the controlled device;
第三传输模块,配置为基于所述匹配结果,将所述控制信号发送至所述受控设备。The third transmission module is configured to send the control signal to the controlled device based on the matching result.
在一些实施例中,所述第三传输模块,配置为:In some embodiments, the third transmission module is configured as follows:
通过与所述受控设备之间的通信连接,将所述控制信号发送至所述受控设备;或者sending the control signal to the controlled device through a communication connection with the controlled device; or
通过所述智能控制中心将所述控制信号转发至所述受控设备。The control signal is forwarded to the controlled device through the intelligent control center.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:
第八确定模块,配置为根据所述智能控制中心和所述受控设备的设备配置顺序,确定所述控制信号的发送方向;an eighth determination module, configured to determine a sending direction of the control signal according to a device configuration sequence of the intelligent control center and the controlled device;
所述发送方向包括:从所述智能控制中心至所述受控设备的方向,或者从所述受控设备至所述智能控制中心的方向。The sending direction includes: a direction from the intelligent control center to the controlled device, or a direction from the controlled device to the intelligent control center.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:
第九确定模块,配置为对所述第二类数据帧进行字节序转换处理,得到预设模式的第二类数据帧;其中,所述预设模式包括:预设大端模式和预设小端模式;A ninth determination module is configured to perform byte order conversion processing on the second type of data frame to obtain a second type of data frame in a preset mode; wherein the preset mode includes: a preset big endian mode and a preset little endian mode;
第四传输模块,配置为根据预设模式的第二类数据帧,生成所述控制信号。The fourth transmission module is configured to generate the control signal according to the second type of data frame in a preset mode.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:
第五传输模块,配置为接收所述受控设备基于所控制信号返回的响应信号;a fifth transmission module, configured to receive a response signal returned by the controlled device based on the controlled signal;
其中,所述响应信号包括所述第三类数据帧;所述第三类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的。The response signal includes the third type of data frame; the third type of data frame is generated according to the device type of the controlled device and the type of command used to control the controlled device.
在一些实施例中,所述第五传输模块,配置为:In some embodiments, the fifth transmission module is configured as follows:
通过与所述受控设备之间的通信连接,接收所述响应信号;或者Receiving the response signal through a communication connection with the controlled device; or
通过所述智能控制中心接收所述响应信号。The response signal is received by the intelligent control center.
在一些实施例中,所述装置还包括:In some embodiments, the apparatus further comprises:
第二停止模块,配置为在所述控制设备的电量余量小于预设电量阈值时,停止接收所述响应信号。The second stopping module is configured to stop receiving the response signal when the remaining power of the control device is less than a preset power threshold.
在一些实施例中,所述控制设备为自发电供电设备,所述装置还包括:In some embodiments, the control device is a self-generating power supply device, and the apparatus further comprises:
第六传输模块,配置为通过预设触发事件产生电能,并通过所产生的电能为所述控制设备进行信号的收发提供能量。The sixth transmission module is configured to generate electric energy through a preset trigger event, and use the generated electric energy to provide energy for the control device to send and receive signals.
根据本公开实施例的第七方面,提供一种数据处理装置,包括:According to a seventh aspect of an embodiment of the present disclosure, there is provided a data processing device, including:
处理器;processor;
配置为存储处理器可执行指令的存储器;a memory configured to store processor-executable instructions;
其中,所述处理器配置为:执行时实现上述第一方面、第二方面或者第三方面中任一种数据处理方法中的步骤。Wherein, the processor is configured to: implement the steps in any one of the data processing methods in the first aspect, the second aspect or the third aspect when executed.
根据本公开实施例的第八方面,提供一种非临时性计算机可读存储介质,当所述存储介质中的指令由数据处理装置的处理器执行时,使得所述装置能够执行上述上述第一方面、第二方面或者第三方面中任一种数据处理方法中的步骤。According to the eighth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When the instructions in the storage medium are executed by a processor of a data processing device, the device is enabled to perform the steps of any one of the data processing methods in the first aspect, the second aspect or the third aspect mentioned above.
本公开的实施例提供的技术方案可以包括以下有益效果:The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
本公开实施例中,能够获取控制设备的设备信息和所述控制设备生成的控制信息;根据所述设备信息和所述控制信息,生成第一类数据帧;其中,所述第一类数据帧包括地址域和负载部分,所述设备信息中的第一部分构成所述第一类数据帧的地址域,所述设备信息中的第二部分和所述控制信息共同构成所述第一类数据帧的负载部分。In the embodiment of the present disclosure, it is possible to obtain device information of a control device and control information generated by the control device; generate a first type of data frame based on the device information and the control information; wherein the first type of data frame includes an address field and a load part, the first part in the device information constitutes the address field of the first type of data frame, and the second part in the device information and the control information together constitute the load part of the first type of data frame.
本公开通过设置控制设备与受控设置之间无线传输过程中数据帧的数据格式,以及控制设备与受控设置之间无线传输的方式,将设备信息、控制信息插入数据帧,能够在传输数据帧的过程中直接将控制设备的设备信息和控制信息携带至受控设备,相较于再通过建立额外的数据通道进行数据传输,能够提高数据帧的传输效率、准确性,同时能够减少数据帧的传输功耗,增加待机时长等。The present invention inserts device information and control information into data frames by setting the data format of data frames during wireless transmission between a control device and a controlled device, as well as a method of wireless transmission between the control device and the controlled device. In the process of transmitting data frames, the device information and control information of the control device can be directly carried to the controlled device. Compared with data transmission by establishing an additional data channel, the transmission efficiency and accuracy of the data frames can be improved, and the transmission power consumption of the data frames can be reduced, and the standby time can be increased.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
图1是根据本公开一示例性实施例示出的一种数据处理方法的流程图一。FIG. 1 is a flowchart 1 of a data processing method according to an exemplary embodiment of the present disclosure.
图2是根据本公开一示例性实施例示出的一种数据处理方法的流程图二。FIG. 2 is a second flowchart of a data processing method according to an exemplary embodiment of the present disclosure.
图3是根据本公开一示例性实施例示出的一种数据处理方法的流程图三。FIG. 3 is a third flowchart of a data processing method according to an exemplary embodiment of the present disclosure.
图4A是根据本公开一示例性实施例示出的一种无线数据传输的传输示意图。Fig. 4A is a transmission schematic diagram showing a wireless data transmission according to an exemplary embodiment of the present disclosure.
图4B是根据本公开一示例性实施例示出的一种报文数据结构示意图。FIG. 4B is a schematic diagram of a message data structure according to an exemplary embodiment of the present disclosure.
图5是根据本公开一示例性实施例示出的一种数据处理装置框图一。FIG. 5 is a block diagram 1 of a data processing device according to an exemplary embodiment of the present disclosure.
图6是根据本公开一示例性实施例示出的一种数据处理装置框图二。FIG. 6 is a second block diagram of a data processing device according to an exemplary embodiment of the present disclosure.
图7是根据本公开一示例性实施例示出的一种数据处理装置框图三。FIG. 7 is a third block diagram of a data processing device according to an exemplary embodiment of the present disclosure.
图8是根据本公开一示例性实施例示出的一种数据处理装置的硬件结构框图。FIG. 8 is a hardware structure block diagram of a data processing device according to an exemplary embodiment of the present disclosure.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
图1是根据一示例性实施例示出的数据处理方法的流程图一,如图1所示,主要包括以下步骤:FIG. 1 is a flowchart 1 of a data processing method according to an exemplary embodiment. As shown in FIG. 1 , the method mainly includes the following steps:
在步骤101中,获取控制设备的设备信息和所述控制设备生成的控制信息;In step 101, device information of a control device and control information generated by the control device are obtained;
在步骤102中,根据所述设备信息和所述控制信息,生成第一类数据帧;In step 102, a first type of data frame is generated according to the device information and the control information;
其中,所述第一类数据帧包括地址域和负载部分,所述设备信息中的第一部分构成所述第一类数据帧的地址域,所述设备信息中的第二部分和所述控制信息共同构成所述第一类数据帧的负载部分。The first type of data frame includes an address field and a load part, the first part of the device information constitutes the address field of the first type of data frame, and the second part of the device information and the control information together constitute the load part of the first type of data frame.
这里,控制设备(也可以称为发射器)可以是能够产生并发送命令,且具有无线传输功能的设备。例如,可以指用来产生并发送控制、管理等命令的,具有射频无线收发、红外收发、蓝牙收发、WiFi收发等无线传输功能的设备。控制设备可以包括:自发电开关、电池开关、传感器等设备。受控设备(也可以称为接收器)可以是能够接收并执行命令,且具有无线传输功能的设备,例如,可以指用来接收并执行控制、管理等命令的,具有射频无线收发、红外收发、蓝牙收发、WiFi收发等无线传输功能的设备。Here, the control device (also referred to as a transmitter) may be a device that can generate and send commands and has a wireless transmission function. For example, it may refer to a device that is used to generate and send control, management and other commands, and has a wireless transmission function such as radio frequency wireless transceiver, infrared transceiver, Bluetooth transceiver, WiFi transceiver, etc. The control device may include: self-generating switches, battery switches, sensors and other devices. The controlled device (also referred to as a receiver) may be a device that can receive and execute commands and has a wireless transmission function. For example, it may refer to a device that is used to receive and execute control, management and other commands, and has a wireless transmission function such as radio frequency wireless transceiver, infrared transceiver, Bluetooth transceiver, WiFi transceiver, etc.
在一些实施例中,受控设备可以包括:墙壁开关、单路执行器、多路执行器、电动窗帘、灯具、电视机、空调等设备。控制设备可以通过发送相应的命令来指示受控设备进行工作状态的转换等,例如:无线控制灯具接收到无线控制开关的关闭指令后,将灯由点亮状态切换至熄灭状态。控制设备与受控设备存在对应关系,例如:一个控制设备可以对应一个受控设备,一个控制设备还可以对应多个受控设备,多个控制设备还可以对应一个受控设备等。In some embodiments, the controlled devices may include: wall switches, single-way actuators, multi-way actuators, electric curtains, lamps, televisions, air conditioners and other devices. The control device may instruct the controlled device to switch its working state by sending corresponding commands, for example: after the wireless control lamp receives the shutdown command of the wireless control switch, it switches the light from the on state to the off state. There is a corresponding relationship between the control device and the controlled device, for example: one control device may correspond to one controlled device, one control device may correspond to multiple controlled devices, and multiple control devices may correspond to one controlled device, etc.
本公开实施例可以预先设置控制设备和受控设备的类型,例如:可以通过控制设备的形状或者单独开关数量等因素,来确定控制设备的类型。控制设备可以包括:单开自电开关、双开自电开关、三开自电开关、四开自电开关、圆形单键开关、圆形双键开关、圆形三键开关、无源发射器等多种类型的控制设备。例如:可以通过受控设备的信道数量或者工作目的等因素,来确定受控设备的类型。受控设备可以包括:1个通道的接收器、2个通道的接收器、...、8个通道的接收器等;1个通道的墙壁开关(具有手势感应功能)、2个通道的墙壁开关(具有手势感应功能)等;1个通道的墙壁开关(不具有手势感应功能)、2个通道的墙壁开关(不具有手势感应功能)等;1个通道的单火线墙壁开关(不具有手势感应功能)、门铃、可调光设备、窗帘电机、双路输出的窗帘电机控制器、调光控制板等多种类型的受控设备。The disclosed embodiment can pre-set the types of control devices and controlled devices. For example, the type of control device can be determined by factors such as the shape of the control device or the number of individual switches. The control device may include: single-open self-power switch, double-open self-power switch, three-open self-power switch, four-open self-power switch, round single-key switch, round double-key switch, round three-key switch, passive transmitter and other types of control devices. For example, the type of controlled device can be determined by factors such as the number of channels or the purpose of work of the controlled device. The controlled device may include: a receiver of 1 channel, a receiver of 2 channels, ..., a receiver of 8 channels, etc.; a wall switch of 1 channel (with gesture sensing function), a wall switch of 2 channels (with gesture sensing function), etc.; a wall switch of 1 channel (without gesture sensing function), a wall switch of 2 channels (without gesture sensing function), etc.; a single-live wire wall switch of 1 channel (without gesture sensing function), a doorbell, a dimmable device, a curtain motor, a curtain motor controller with dual output, a dimming control board and other types of controlled devices.
控制设备的设备信息可以包括以下至少之一:控制设备的设备类型、电量、设备唯一标识、设备网络地址或者安装位置。控制设备生成的控制信息可以包括以下至少之一:控制设备检测到的用户的操作信息、受控设备的设备类型以及受控设备的工作状态等信息等,例如:若控制设备包括压力传感器,用户对控制设备进行按压操作时,那么控制信息可以是指压力传感器检测到的按压力度大小等。The device information of the control device may include at least one of the following: the device type, power level, device unique identifier, device network address or installation location of the control device. The control information generated by the control device may include at least one of the following: the user's operation information detected by the control device, the device type of the controlled device, and the working status of the controlled device, etc. For example, if the control device includes a pressure sensor, when the user presses the control device, the control information may refer to the pressing force detected by the pressure sensor, etc.
数据帧可以是指数据链路层的协议数据单元,至少可以包括三部分:帧头,数据部分,帧尾等。所述第一类数据帧至少包括地址域和负载部分,所述设备信息中的第一部分构成所述第一类数据帧的地址域,所述设备信息中的第二部分和所述控制信息共同构成所述第一类数据帧的负载部分。第一部分和第二部分的内容可以重合,也可以不重合,本公开不作具体限定。例如:所述第一类数据帧的地址域可以携带控制设备网络地址,例如,网络地址可以为192.168.101.1.1,或者协议约定的18位或者32位等地址位,属于的设备信息中(也即第一部分),所述第一类数据帧的负载部分可以携带受控设备的设备信息控制信息,例如,设备信息可以为三开自发电开关,控制信息可以为某一位开关的开或者关等。A data frame may refer to a protocol data unit of a data link layer, and may include at least three parts: a frame header, a data part, a frame tail, etc. The first type of data frame includes at least an address field and a load part, the first part of the device information constitutes the address field of the first type of data frame, and the second part of the device information and the control information together constitute the load part of the first type of data frame. The contents of the first part and the second part may overlap or may not overlap, and the present disclosure does not make specific limitations. For example: the address field of the first type of data frame may carry the network address of the control device, for example, the network address may be 192.168.101.1.1, or an 18-bit or 32-bit address bit agreed upon by the protocol, and in the device information (i.e., the first part), the load part of the first type of data frame may carry the device information control information of the controlled device, for example, the device information may be a three-open self-generating switch, and the control information may be the on or off of a certain switch, etc.
本公开实施例中,能够获取控制设备的设备信息和所述控制设备生成的控制信息;根据所述设备信息和所述控制信息,生成第一类数据帧;其中,所述第一类数据帧包括地址域和负载部分,所述设备信息中的第一部分构成所述第一类数据帧的地址域,所述设备信息中的第二部分和所述控制信息共同构成所述第一类数据帧的负载部分。本公开通过设置控制设备与受控设置之间无线传输过程中数据帧的数据格式,以及控制设备与受控设置之间无线传输的方式,将设备信息、控制信息插入数据帧,能够在传输数据帧的过程中直接将控制设备的设备信息和控制信息携带至受控设备,相较于再通过建立额外的数据通道进行数据传输,能够提高数据帧的传输效率、准确性,同时能够减少数据帧的传输功耗,增加待机时长等。In an embodiment of the present disclosure, it is possible to obtain device information of a control device and control information generated by the control device; a first type of data frame is generated according to the device information and the control information; wherein the first type of data frame includes an address field and a load part, the first part of the device information constitutes the address field of the first type of data frame, and the second part of the device information and the control information together constitute the load part of the first type of data frame. The present disclosure inserts device information and control information into data frames by setting the data format of data frames during wireless transmission between the control device and the controlled device, as well as the wireless transmission method between the control device and the controlled device. In the process of transmitting data frames, the device information and control information of the control device can be directly carried to the controlled device. Compared with data transmission through establishing an additional data channel, the transmission efficiency and accuracy of the data frames can be improved, and the transmission power consumption of the data frames can be reduced, and the standby time can be increased.
在一些实施例中,所述设备信息包括:所述控制设备的源标识、所述控制设备的设备类型,所述控制信息包括:控制参数;In some embodiments, the device information includes: a source identifier of the control device, a device type of the control device, and the control information includes: a control parameter;
所述根据所述设备信息和所述控制信息,生成第一类数据帧,包括:The step of generating a first type of data frame according to the device information and the control information includes:
根据所述控制设备的源标识、所述控制设备的设备类型和控制参数,生成第一类数据帧;其中,所述源标识用于确定所述第一类数据帧的地址域;所述方法还包括:Generate a first type of data frame according to the source identifier of the control device, the device type of the control device and the control parameter; wherein the source identifier is used to determine the address field of the first type of data frame; the method further includes:
确定受控设备的设备类型;Determine the device type of the controlled device;
根据所述受控设备的设备类型和所述控制参数,确定用于控制所述受控设备的命令的类型;Determining, according to the device type of the controlled device and the control parameter, a type of command for controlling the controlled device;
根据所述受控设备的设备类型和所述命令的类型,生成第二类数据帧;generating a second type of data frame according to the device type of the controlled device and the type of the command;
其中,所述第一类数据帧和所述第二类数据帧的帧控制域中预设位所携带数据的数据类型不同;所述受控设备的目标标识用于确定所述第二类数据帧的地址域。The data types of the data carried by the preset bits in the frame control fields of the first type of data frame and the second type of data frame are different; and the target identifier of the controlled device is used to determine the address field of the second type of data frame.
本公开实施例中,所述设备信息至少可以包括所述控制设备的源标识、所述控制设备的设备类型,所述控制信息至少可以包括控制参数。源标识(Source ID)可以是指控制设备对应的标识(例如但不限于互联网协议地址、设备唯一编号等),源标识可以具有唯一性。本公开可以根据源标识确定对应的控制设备,也可以通过预先自定义设置受控设备的设备类型等,确定受控设备的设备类型的方式不作具体限定。设备类型可以是指单开自电开关、双开自电开关、1个通道的接收器、2个通道的接收器等类型,控制设备可以通过接收来自用户上传的设备类型,然后在预设存储单元进行存储,在生成第一类数据帧时,从预设存储单元读取设备类型。In the embodiment of the present disclosure, the device information may include at least the source identification of the control device and the device type of the control device, and the control information may include at least the control parameters. The source identification (Source ID) may refer to the identification corresponding to the control device (for example, but not limited to the Internet Protocol address, the device unique number, etc.), and the source identification may be unique. The present disclosure may determine the corresponding control device according to the source identification, or may determine the device type of the controlled device by pre-customizing the device type of the controlled device, etc. The method of determining the device type of the controlled device is not specifically limited. The device type may refer to a single-open self-power switch, a double-open self-power switch, a receiver of 1 channel, a receiver of 2 channels, etc. The control device may receive the device type uploaded by the user, and then store it in the preset storage unit. When generating the first type of data frame, the device type is read from the preset storage unit.
控制参数可以根据控制设备检测到的用户的操作来确定,例如:若控制设备为单开开关,用户将单开开关有断开状态转换为闭合状态时,那么控制参数可以由0变为1等;若控制设备为压力传感器,用户对压力传感器进行按压操作时,那么控制参数可以根据压力传感器检测到的按压力度大小来生成。The control parameters can be determined based on the user's operation detected by the control device. For example, if the control device is a single-pole switch, when the user changes the single-pole switch from an open state to a closed state, the control parameter can change from 0 to 1, etc.; if the control device is a pressure sensor, when the user presses the pressure sensor, the control parameter can be generated based on the pressing force detected by the pressure sensor.
本公开实施例可以根据所述控制设备的源标识、所述控制设备的设备类型和控制参数,生成第一类数据帧。例如:所述源标识用于确定所述第一类数据帧的地址域,所述控制设备的设备类型和控制参数可以共同确定所述第一类数据帧的负载部分等。用于控制所述受控设备的命令的类型可以包括:用于数据处理的命令,或用于控制的命令(也称设备控制命令),或者用于管理的命令(也称设备管理命令)等类型。例如:状态查询、开关控制、亮度控制、响铃控制、行程控制等设备控制命令;配置墙壁开关的手势感应功能和指示灯、读取墙壁开关的手势感应功能和指示灯配置等设备管理命令。The disclosed embodiment can generate a first type of data frame according to the source identifier of the control device, the device type of the control device and the control parameters. For example: the source identifier is used to determine the address field of the first type of data frame, the device type and control parameters of the control device can jointly determine the load part of the first type of data frame, etc. The types of commands used to control the controlled device may include: commands for data processing, or commands for control (also called device control commands), or commands for management (also called device management commands), etc. For example: device control commands such as status query, switch control, brightness control, ring control, and travel control; device management commands such as configuring the gesture sensing function and indicator light of the wall switch, reading the gesture sensing function and indicator light configuration of the wall switch.
本公开可以根据所述受控设备的设备类型和所述控制参数,确定用于控制所述受控设备的命令的类型,然后电子设备可以通过确定受控设备的设备类型,再根据所述受控设备的设备类型和所述命令的类型,生成第二类数据帧。例如:所述受控设备的设备类型和所述命令的类型可以共同确定所述第二类数据帧的负载部分等。The present disclosure can determine the type of command used to control the controlled device according to the device type of the controlled device and the control parameter, and then the electronic device can determine the device type of the controlled device and generate the second type of data frame according to the device type of the controlled device and the type of the command. For example, the device type of the controlled device and the type of the command can jointly determine the load part of the second type of data frame, etc.
所述第一类数据帧和所述第二类数据帧的帧控制域中预设位所携带数据的数据类型不同,预设位所携带数据可以是指数据帧中任意长度或者任意位置的数据,数据帧的类型并不限定,可以根据实际使用需求自定义设置。例如:对于第一类数据帧可以是指帧控制域中的低5位(b0、b1、...b4位)的数值为00001的数据帧,对于第二类数据帧可以是指帧控制域中的低5位的数值为00002的数据帧。在一种可能的实施例中,第一类数据帧可以是指从控制设备的节点(Node)端发送给网关(Gateway)端的数据帧,第二类数据帧可以是指从网关端发送给节点端的数据帧等,其中,网关端可以是指智能控制中心。The data types of the data carried by the preset bits in the frame control fields of the first type of data frame and the second type of data frame are different. The data carried by the preset bits may refer to data of any length or any position in the data frame. The type of data frame is not limited and can be customized according to actual usage requirements. For example: for the first type of data frame, it may refer to a data frame whose value of the lower 5 bits (b0, b1, ...b4 bits) in the frame control field is 00001, and for the second type of data frame, it may refer to a data frame whose value of the lower 5 bits in the frame control field is 00002. In a possible embodiment, the first type of data frame may refer to a data frame sent from the node end of the control device to the gateway end, and the second type of data frame may refer to a data frame sent from the gateway end to the node end, etc., wherein the gateway end may refer to an intelligent control center.
本公开实施例中,可以根据所述受控设备的设备类型和所述命令的类型,生成第二类数据帧,能够准确地确定不同类型的数据帧的数据结构,细化数据帧类型,减少开发人员工作量等。In the disclosed embodiment, a second type of data frame can be generated according to the device type of the controlled device and the type of the command, which can accurately determine the data structure of different types of data frames, refine the data frame type, reduce the workload of developers, etc.
本公开实施例中,数据帧可以是由帧头(Header)、负载(Payload)(也可以称为数据部分等)、帧尾(Footer)等部分组成。帧头可以是由帧控制域(Frame Control)、帧序列号(Sequence Number)和地址域(Addressing Fields)等部分组成。帧控制域包含了基本的帧信息,长度为16bite(bit),帧序列号用于区分相继发送的数据帧,地址域用于确定数据帧传输方向等;负载部分长度可变,具体内容由帧类型来决定;帧尾可以是帧头和负载数据的16位循环冗余校验(Cyclic Redundancy Check,CRC)值等。In the disclosed embodiment, the data frame may be composed of a frame header, a payload (payload) (also referred to as a data portion, etc.), a footer, etc. The frame header may be composed of a frame control field (Frame Control), a frame sequence number (Sequence Number), and an address field (Addressing Fields). The frame control field contains basic frame information and is 16 bits in length. The frame sequence number is used to distinguish successively sent data frames, and the address field is used to determine the transmission direction of the data frame, etc. The payload part has a variable length, and the specific content is determined by the frame type; the footer may be a 16-bit cyclic redundancy check (CRC) value of the frame header and payload data, etc.
本公开实施例中,第一类数据帧的地址域可以由源标识确定,第二类数据帧的地址域可以由目标标识确定。例如:电子设备确定数据帧为第一类,那么可以确定数据帧中的地址域写入的是源标识192.168.102.7或者特定比特位数的数字,确定数据帧为第二类,那么可以确定数据帧中的地址域是写入的是目标标识192.168.202.7或者特定比特位数的数字等。电子设备通过地址域可以简单快速地确定出数据帧的类型或者传输方向等,有助于提高传输效率。第一类数据帧的负载部分可以由控制设备的设备类型和控制参数共同构成,例如:控制设备确定自身的设备类型为圆形双键开关(可以标记对应的编号为D2等)、控制参数为01(也即a键为断开、b键为闭合等),那么控制设备可以将设备类型D2和控制参数01写入数据帧中的负载部分等。In the disclosed embodiment, the address field of the first type of data frame can be determined by the source identifier, and the address field of the second type of data frame can be determined by the target identifier. For example: if the electronic device determines that the data frame is of the first type, then it can be determined that the address field in the data frame is written with the source identifier 192.168.102.7 or a number of a specific number of bits, and if the data frame is of the second type, then it can be determined that the address field in the data frame is written with the target identifier 192.168.202.7 or a number of a specific number of bits, etc. The electronic device can simply and quickly determine the type or transmission direction of the data frame through the address field, which helps to improve the transmission efficiency. The load part of the first type of data frame can be composed of the device type and control parameters of the control device, for example: the control device determines that its own device type is a circular double-key switch (the corresponding number can be marked as D2, etc.), and the control parameter is 01 (that is, key a is disconnected, key b is closed, etc.), then the control device can write the device type D2 and the control parameter 01 into the load part of the data frame, etc.
本公开实施例中,源标识可以用于确定第一类数据帧的地址域,目标标识可以用于确定第二类数据帧的地址域,控制设备的设备类型和控制参数共同构成第一类数据帧的负载部分,能够准确设置不同类型的数据帧的数据结构,细化数据帧类型,减少开发人员工作量等。In the disclosed embodiment, the source identifier can be used to determine the address field of the first type of data frame, the target identifier can be used to determine the address field of the second type of data frame, the device type and control parameters of the control device together constitute the load part of the first type of data frame, and can accurately set the data structure of different types of data frames, refine the data frame type, reduce the workload of developers, etc.
在一些实施例中,所述第二类数据帧由所述第二类数据帧的地址域和所述第二类数据帧的负载部分共同构成。In some embodiments, the second type of data frame is composed of an address field of the second type of data frame and a payload portion of the second type of data frame.
本公开实施例中,所述第二类数据帧至少由所述第二类数据帧的地址域和所述第二类数据帧的负载部分共同构成,例如:例如:受控设备的设备类型为单路接收器、第一类型为基本状态查询、第一命令内容为空等,依次写入负载部分。电子设备确定第二类数据帧的地址域和负载部分后,再根据预设规则插入帧头或帧尾等其他部分,来生成完整的第二类数据帧。本公开通过采用上述方式,能够准确设置不同类型的数据帧的数据结构,明确传输方向、命令的类型等各种信息,提高传输效率,节省运行功耗等。In the embodiment of the present disclosure, the second type of data frame is at least composed of the address field of the second type of data frame and the load part of the second type of data frame, for example: the device type of the controlled device is a single-channel receiver, the first type is a basic status query, the first command content is empty, etc., which are written into the load part in sequence. After the electronic device determines the address field and the load part of the second type of data frame, it inserts other parts such as the frame header or the frame tail according to the preset rules to generate a complete second type of data frame. By adopting the above method, the present disclosure can accurately set the data structure of different types of data frames, clarify various information such as the transmission direction and the type of command, improve transmission efficiency, save operating power consumption, etc.
在一些实施例中,所述第二类数据帧的负载部分对应的字节长度由所述命令的类型确定。In some embodiments, the byte length corresponding to the payload portion of the second type of data frame is determined by the type of the command.
本公开实施例中,第二类数据帧的负载部分对应的字节长度可以是变化的,字节长度可以由所述命令的类型确定。例如:命令为用于数据处理的命令,那么第二类数据帧的负载部分对应的字节长度可以为5字节,设备控制命令对应的字节长度可以为7字节,设备管理命令对应的字节长度可以为9字节等。本公开通过不同字节长度的第二类数据帧的负载部分,能够节省传输资源,以及快速确定命令的类型等。In the embodiment of the present disclosure, the byte length corresponding to the payload part of the second type of data frame may be variable, and the byte length may be determined by the type of the command. For example, if the command is a command for data processing, the byte length corresponding to the payload part of the second type of data frame may be 5 bytes, the byte length corresponding to the device control command may be 7 bytes, the byte length corresponding to the device management command may be 9 bytes, etc. The present disclosure can save transmission resources and quickly determine the type of command, etc. by using the payload part of the second type of data frame with different byte lengths.
在一些实施例中,在所述命令为第一类型时,所述第二类数据帧的负载部分由所述受控设备的设备类型、所述第一类型和第一命令内容确定;In some embodiments, when the command is of the first type, the payload portion of the second type of data frame is determined by the device type of the controlled device, the first type and the first command content;
所述第一命令内容由所述命令的类型确定。The first command content is determined by the type of the command.
本公开实施例中,第一类型可以是指设备控制命令,获取到数据帧后,可以先确定数据帧的地址域为源标识还是目标标识,得到确定结果,然后根据确定结果来确定对应的数据帧类型。在通过数据帧的帧控制域中预设位所携带数据的数据类型,来确定数据帧中携带命令的为第一类型(也即设备控制命令)后,然后可以根据命令的类型(Cmd Type)来确定与所述第一类型的命令对应的第一命令内容(Cmd Date)。电子设备确定命令的类型为设备控制命令,那么可以确定对应的命令内容时仅仅取决于命令的类型,例如:基本状态查询对应命令内容为空,基本开关控制对应命令内容为第一字节表示通道信息、第二字节表示切换信息等(例如但不限于Byte 1:Channel,Byte 2:Switch)等。然后电子设备可以根据受控设备的设备类型(Device Type)、第一类型(Cmd Type,1Byte)和第一命令内容(CmdDate),确定所述第二类数据帧的负载部分(Frame Payload)。本公开通过设置所述第一命令内容由所述命令的类型确定,能够准确地确定出对应的命令内容等。In the disclosed embodiment, the first type may refer to a device control command. After obtaining the data frame, it is possible to first determine whether the address field of the data frame is a source identifier or a target identifier, obtain a determination result, and then determine the corresponding data frame type according to the determination result. After determining that the command carried in the data frame is of the first type (i.e., a device control command) by the data type of the data carried by the preset bit in the frame control field of the data frame, the first command content (Cmd Date) corresponding to the command of the first type can be determined according to the type of command (Cmd Type). When the electronic device determines that the type of command is a device control command, the corresponding command content can be determined only depending on the type of command, for example: the command content corresponding to the basic status query is empty, and the command content corresponding to the basic switch control is the first byte indicating the channel information, the second byte indicating the switching information, etc. (for example, but not limited to Byte 1: Channel, Byte 2: Switch), etc. Then the electronic device can determine the load part (Frame Payload) of the second type of data frame according to the device type (Device Type) of the controlled device, the first type (Cmd Type, 1Byte) and the first command content (CmdDate). The present disclosure sets the first command content to be determined by the type of the command, thereby being able to accurately determine the corresponding command content and the like.
在一些实施例中,在所述命令为第一类型,且所述控制设备的控制参数为空时,所述第二类数据帧的负载部分由所述受控设备的设备类型和所述第一类型确定。In some embodiments, when the command is of the first type and the control parameter of the control device is empty, the payload portion of the second type of data frame is determined by the device type of the controlled device and the first type.
本公开实施例中,在所述命令为第一类型,且所述控制设备的控制参数为空时,所述第二类数据帧的负载部分可以只需要由所述受控设备的设备类型和所述第一类型确定,例如:受控设备的设备类型为窗帘电机,所述第一类型为基本状态查询,则可以基于设备类型为窗帘电机和第一类型为基本状态查询来共同确定所述第二类数据帧的负载部分。本公开通过采用上述方式,能够节省传输资源,提高传输效率等。In the embodiment of the present disclosure, when the command is of the first type and the control parameter of the control device is empty, the load part of the second type of data frame can be determined only by the device type of the controlled device and the first type. For example, if the device type of the controlled device is a curtain motor and the first type is a basic status query, the load part of the second type of data frame can be jointly determined based on the device type being a curtain motor and the first type being a basic status query. The present disclosure can save transmission resources and improve transmission efficiency by adopting the above method.
在一些实施例中,在所述命令为第二类型,且所述第二类型的命令具有第一属性时,所述第二类数据帧的负载部分由所述受控设备的设备类型、所述第二类型和第二命令内容确定;In some embodiments, when the command is of the second type and the command of the second type has the first attribute, the payload portion of the second type of data frame is determined by the device type of the controlled device, the second type, and the second command content;
所述第二命令内容由所述命令的类型确定。The second command content is determined by the type of the command.
命令的属性可以是指命令所具有的不可缺少的性质,例如:加密属性和非加密属性,公有属性和私有属性,常见属性和非常见属性等。本公开实施例中,对于不同属性的命令,其数据帧的负载部分的确定方式可以不同。The attributes of a command may refer to the indispensable properties of the command, such as encryption attributes and non-encryption attributes, public attributes and private attributes, common attributes and uncommon attributes, etc. In the disclosed embodiment, for commands with different attributes, the method of determining the payload part of the data frame may be different.
本公开实施例中,第二类型可以是指设备管理命令,可以包括:配置墙壁开关的手势感应功能和指示灯,或者读取墙壁开关的手势感应功能和指示灯配置等。第一属性可以是指公有属性,公有属性可以理解为能够对受控设备的通用管理命令的有限枚举(例如但不限于开关状态等)。电子设备确定设备管理命令为公有属性时,第二命令内容(Cmd Date)可以仅仅由命令的类型(Cmd Type)确定,例如:命令类型为设备管理命令时,且具有公有属性时,第二命令内容都可以为指示灯开启或者关闭等。In the disclosed embodiment, the second type may refer to a device management command, which may include: configuring the gesture sensing function and indicator light of a wall switch, or reading the gesture sensing function and indicator light configuration of a wall switch, etc. The first attribute may refer to a public attribute, which may be understood as a limited enumeration of general management commands for controlled devices (such as but not limited to switch status, etc.). When the electronic device determines that the device management command is a public attribute, the second command content (Cmd Date) may be determined only by the type of the command (Cmd Type). For example, when the command type is a device management command and has a public attribute, the second command content may be turning the indicator light on or off, etc.
然后电子设备可以根据受控设备的设备类型(Device Type)、第二类型(Management Cmd Type)和第二命令内容(Cmd Data),确定第二类数据帧的负载部分(Frame Payload)等。例如:受控设备的设备类型为具有手势感应功能的3路墙壁开关、第二类型为配置墙壁开关的手势感应功能和指示灯、第二命令内容为指示灯开启等,依次写入负载部分。电子设备确定第二类数据帧的地址域和负载部分后,再根据预设规则插入帧头或帧尾等其他部分,来生成完整的第二类数据帧。Then the electronic device can determine the payload part (Frame Payload) of the second type of data frame according to the device type (Device Type), the second type (Management Cmd Type) and the second command content (Cmd Data) of the controlled device. For example, the device type of the controlled device is a 3-way wall switch with gesture sensing function, the second type is to configure the gesture sensing function and indicator light of the wall switch, and the second command content is to turn on the indicator light, etc., which are written into the payload part in sequence. After the electronic device determines the address field and payload part of the second type of data frame, it inserts other parts such as the frame header or frame tail according to the preset rules to generate a complete second type of data frame.
本公开实施例中,可以在所述命令为第二类型,且所述第二类型的命令具有第一属性时,确定与所述第二类型的命令对应的第二命令内容,根据所述受控设备的设备类型、所述第二类型和所述第二命令内容,确定所述第二类数据帧的负载部分,根据所述第二类数据帧的地址域和所述第二类数据帧的负载部分,生成所述第二类数据帧。本公开通过采用上述方式,能够准确设置不同类型的数据帧的数据结构,明确传输方向、命令的类型等各种信息,提高传输效率,节省运行功耗等。In an embodiment of the present disclosure, when the command is of the second type and the command of the second type has the first attribute, the second command content corresponding to the command of the second type can be determined, the payload portion of the second type of data frame can be determined according to the device type of the controlled device, the second type and the second command content, and the second type of data frame can be generated according to the address field of the second type of data frame and the payload portion of the second type of data frame. By adopting the above method, the present disclosure can accurately set the data structure of different types of data frames, clarify various information such as the transmission direction and the type of command, improve transmission efficiency, save operating power consumption, etc.
在一些实施例中,在所述命令为第二类型,且所述第二类型的命令具有第二属性时,所述第二类数据帧的负载部分由所述受控设备的设备类型、所述第二类型和第三命令内容确定;In some embodiments, when the command is of the second type and the command of the second type has a second attribute, the payload portion of the second type of data frame is determined by the device type of the controlled device, the second type and the third command content;
所述第三命令内容由所述受控设备的设备类型和所述命令的类型共同确定。The third command content is determined by the device type of the controlled device and the type of the command.
本公开实施例中,第二类型可以是指设备管理命令,可以包括:配置墙壁开关的手势感应功能和指示灯,或者读取墙壁开关的手势感应功能和指示灯配置等。第二属性可以是指私有属性,私有属性可以理解为针对某类受控设备特有的命令(例如但不限于检测人脸表情等)。电子设备确定设备管理命令为私有属性时,第三命令内容(Cmd Date)需要由受控设备的设备类型(Device Type)和命令的类型(Cmd Type)共同确定,例如:命令类型为设备管理命令时,且具有私有属性时,A设备类型对应的第二命令内容都可以为感应距离,B设备类型对应的第三命令内容都可以为手势感应控制等。In the disclosed embodiment, the second type may refer to a device management command, which may include: configuring the gesture sensing function and indicator light of a wall switch, or reading the gesture sensing function and indicator light configuration of a wall switch, etc. The second attribute may refer to a private attribute, which may be understood as a command specific to a certain type of controlled device (for example, but not limited to detecting facial expressions, etc.). When an electronic device determines that a device management command is a private attribute, the third command content (Cmd Date) needs to be determined by the device type (Device Type) and the type of command (Cmd Type) of the controlled device. For example, when the command type is a device management command and has a private attribute, the second command content corresponding to device type A can be sensing distance, and the third command content corresponding to device type B can be gesture sensing control, etc.
然后电子设备可以根据受控设备的设备类型(Device Type)、第二类型(Management Cmd Type)和第三命令内容(Cmd Data),确定第二类数据帧的负载部分(Frame Payload)等。例如:受控设备的设备类型为具有手势感应功能的可调光设备、第二类型为读取可调光设备检测到的手势感应功能、第三命令内容为指示灯开启等,可以将具有手势感应功能的可调光设备、读取可调光设备检测到的手势感应功能以及指示灯开启依次写入负载部分。电子设备确定第二类数据帧的地址域和负载部分后,再根据预设规则插入帧头或帧尾等其他部分,来生成完整的第二类数据帧。Then the electronic device can determine the payload part (Frame Payload) of the second type of data frame according to the device type (Device Type), the second type (Management Cmd Type) and the third command content (Cmd Data) of the controlled device. For example: if the device type of the controlled device is a dimmable device with gesture sensing function, the second type is to read the gesture sensing function detected by the dimmable device, and the third command content is to turn on the indicator light, the dimmable device with gesture sensing function, the gesture sensing function detected by the dimmable device, and the indicator light turn on can be written into the payload part in sequence. After the electronic device determines the address field and payload part of the second type of data frame, it inserts other parts such as the frame header or frame tail according to the preset rules to generate a complete second type of data frame.
本公开实施例中,可以在所述命令为第二类型,且所述第二类型的命令具有第二属性时,根据所述受控设备的设备类型,确定与所述第二类型的命令对应的第三命令内容,根据所述受控设备的设备类型、所述第二类型和所述第三命令内容,确定所述第二类数据帧的负载部分,根据所述第二类数据帧的地址域和所述第二类数据帧的负载部分,生成所述第二类数据帧。本公开通过采用上述方式,能够准确设置不同类型的数据帧的数据结构,明确传输方向、命令的类型等各种信息,提高传输效率,节省运行功耗等。In an embodiment of the present disclosure, when the command is of the second type and the command of the second type has a second attribute, the third command content corresponding to the command of the second type can be determined according to the device type of the controlled device, the payload part of the second type of data frame can be determined according to the device type of the controlled device, the second type and the third command content, and the second type of data frame can be generated according to the address field of the second type of data frame and the payload part of the second type of data frame. By adopting the above method, the present disclosure can accurately set the data structure of different types of data frames, clarify various information such as transmission direction and command type, improve transmission efficiency, save operating power consumption, etc.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
根据所述第二类数据帧确定第三类数据帧;其中,所述第三类数据帧和所述第一类数据帧以及所述第二类数据帧的帧控制域中预设位所携带数据的数据类型不同;所述第三类数据帧包括:地址域和负载部分,所述第三类数据帧的地址域由所述源标识确定;所述第三类数据帧的负载部分由所述受控设备的设备类型、所述命令的类型和第四命令内容确定;Determine a third type of data frame according to the second type of data frame; wherein the data types of the data carried by the preset bits in the frame control fields of the third type of data frame, the first type of data frame and the second type of data frame are different; the third type of data frame comprises: an address field and a load part, the address field of the third type of data frame is determined by the source identifier; the load part of the third type of data frame is determined by the device type of the controlled device, the type of the command and the fourth command content;
所述第四命令内容由所述受控设备的设备类型确定,或者由所述命令的类型确定,或者由所述命令的类型和所述受控设备的设备类型共同确定。The fourth command content is determined by the device type of the controlled device, or by the type of the command, or by both the type of the command and the device type of the controlled device.
本公开实施例中,电子设备可以根据所述第二类数据帧确定第三类数据帧,第三类数据帧可以携带受控设备检测到的外界环境,以及当前运行状态等信息,所述第三类数据帧至少可以包括:地址域和负载部分。所述第三类数据帧的地址域由所述源标识确定,可以用于确定对应的控制设备,所述第三类数据帧的负载部分由所述受控设备的设备类型、所述命令的类型和第四命令内容确定。不同生成方式的第二类数据帧对应的第三类数据帧也可以不同,例如:命令的类型为设备控制命令时,对应的可以是第一种的第三类数据帧;命令的类型为设备管理命令时,对应的可以是第二种的第三类数据帧;设备管理命令具有公有属性时,第二种的第三类数据帧也对应的具有公有属性,设备管理命令具有私有属性时,第二种的第三类数据帧也对应的具有私有属性等。In the disclosed embodiment, the electronic device can determine the third type of data frame based on the second type of data frame. The third type of data frame can carry the external environment detected by the controlled device, as well as the current operating status and other information. The third type of data frame can at least include: an address field and a load part. The address field of the third type of data frame is determined by the source identifier and can be used to determine the corresponding control device. The load part of the third type of data frame is determined by the device type of the controlled device, the type of the command and the fourth command content. The third type of data frames corresponding to the second type of data frames generated in different ways may also be different. For example: when the type of command is a device control command, the corresponding type of data frame may be the first type of the third type; when the type of command is a device management command, the corresponding type of data frame may be the second type of the third type; when the device management command has a public attribute, the second type of the third type of data frame also has a corresponding public attribute; when the device management command has a private attribute, the second type of the third type of data frame also has a corresponding private attribute, etc.
对于第一种的第三类数据帧,所述第四命令内容可以仅仅由所述受控设备的设备类型确定;对于具有公有属性的第二种的第三类数据帧时,所述第四命令内容可以仅仅由所述命令的类型确定;对于具有私有属性的第二种的第三类数据帧时,所述第四命令内容需要由所述命令的类型和所述受控设备的设备类型共同确定。For the first type of third-category data frame, the fourth command content can be determined only by the device type of the controlled device; for the second type of third-category data frame with public attributes, the fourth command content can be determined only by the type of the command; for the second type of third-category data frame with private attributes, the fourth command content needs to be determined jointly by the type of the command and the device type of the controlled device.
本公开通过采用上述方式,能够准确及时确定明确的控制设备和受控设备的数据传输状态,节省电子设备运行功耗等。By adopting the above-mentioned method, the present disclosure can accurately and timely determine the data transmission status of the control device and the controlled device, save the operating power consumption of the electronic device, etc.
在一些实施例中,所述第二类数据帧的帧控制域携带转发信息;In some embodiments, the frame control field of the second type of data frame carries forwarding information;
其中,所述转发信息用于触发所述受控设备向其他受控设备转发数据的功能。The forwarding information is used to trigger a function of the controlled device forwarding data to other controlled devices.
本公开实施例中,转发信息可以包括转发次数、转发时间间隔等信息。受控设备可以具有转发数据的功能,以使得增加数据帧的传输距离。例如:电子设备将第二类数据帧发送给第一位置的受控设备A,然后受控设备A可以将第二类数据帧发送给第二位置的受控设备B,然后受控设备B可以将第二类数据帧发送给第三位置的受控设备C等。在转发数据的过程中,A、B和C等受控设备可以既执行对应的命令内容,又进行转发,也可以仅仅只进行转发不执行对应的命令内容等。A、B和C等受控设备也可以对第二类数据帧进行滤波或者插入新的信息等处理,再进行转发等,本公开不作具体限定。In the embodiments of the present disclosure, the forwarding information may include information such as the number of forwarding times and the forwarding time interval. The controlled device may have the function of forwarding data so as to increase the transmission distance of the data frame. For example: the electronic device sends the second type of data frame to the controlled device A at the first position, and then the controlled device A can send the second type of data frame to the controlled device B at the second position, and then the controlled device B can send the second type of data frame to the controlled device C at the third position, etc. In the process of forwarding data, the controlled devices A, B and C can both execute the corresponding command content and forward it, or just forward it without executing the corresponding command content, etc. The controlled devices A, B and C can also filter the second type of data frame or insert new information, etc., and then forward it, etc., which is not specifically limited in the present disclosure.
在转发的过程中,如果无限次的转发,会造成转发无法停止或者占用频带过多,反而影响了无线传输系统的传输性能,因此可以设定确定的转发停止规则。电子设备可以设置将转发次数写入数据帧的帧头部分(FRAME Header)等方式,当达到一定的转发次数(例如,大于2次)后,就停止转发。例如:设置转发大于2次既停止,当受控设备收到转发的第二类数据帧,但读取转发次数为3时,停止向外其他受控设备转发,该受控设备既终止转发过程等。受控设备A可以将接收到来自智能控制中心的第二类数据帧中的当前转发次数(Repeater Counter,RC)由0更新为1,然后受控设备B将可以将接收到来自受控设备A的第二类数据帧中的当前转发次数由1更新为2等,直到达到预设的转发次数3次等。本公开通过采用上述方式,能够提高数据帧的传输距离等。In the process of forwarding, if the forwarding is unlimited, the forwarding cannot be stopped or the frequency band is occupied too much, which affects the transmission performance of the wireless transmission system. Therefore, a certain forwarding stop rule can be set. The electronic device can be set to write the forwarding number into the frame header (FRAME Header) of the data frame, and when a certain forwarding number (for example, greater than 2 times) is reached, the forwarding is stopped. For example: set the forwarding to stop when it is greater than 2 times. When the controlled device receives the forwarded second-class data frame, but reads the forwarding number as 3, it stops forwarding to other controlled devices, and the controlled device terminates the forwarding process. The controlled device A can update the current forwarding number (Repeater Counter, RC) in the second-class data frame received from the intelligent control center from 0 to 1, and then the controlled device B can update the current forwarding number in the second-class data frame received from the controlled device A from 1 to 2, etc., until the preset forwarding number of 3 times is reached. The present disclosure can improve the transmission distance of the data frame by adopting the above method.
在一些实施例中,所述第二类数据帧的负载部分携带信道信息;In some embodiments, the payload portion of the second type of data frame carries channel information;
其中,所述信道信息用于确定不同数据帧对应的不同传输信道。The channel information is used to determine different transmission channels corresponding to different data frames.
本公开实施例中,所述第二类数据帧的负载部分携带信道信息,所述信道信息用于确定不同数据帧对应的不同传输信道。电子设备将所述第二类数据帧发送给所述受控设备,包括:根据所述设备类型和预设的映射关系,确定与所述设备类型对应的目标传输信道;其中,所述映射关系用于表征设备与传输信道之间的关联关系;通过所述目标传输信道将所述第二类数据帧发送给所述受控设备。例如:控制设备的设备类型为方形单键开关,那么电子设备可以通过第一号通道(Channel)传输与该控制设备相关的数据帧;控制设备的设备类型为圆形三键开关,那么电子设备可以通过第二号通道传输与该控制设备相关的数据帧。本公开通过采用上述方式,有助于电子设备快速准确地传输数据帧,避免出现数据帧传输紊乱的情况,提高传输效率等。In an embodiment of the present disclosure, the payload portion of the second type of data frame carries channel information, and the channel information is used to determine different transmission channels corresponding to different data frames. The electronic device sends the second type of data frame to the controlled device, including: determining the target transmission channel corresponding to the device type according to the device type and a preset mapping relationship; wherein the mapping relationship is used to characterize the association relationship between the device and the transmission channel; and sending the second type of data frame to the controlled device through the target transmission channel. For example: if the device type of the control device is a square single-button switch, then the electronic device can transmit data frames related to the control device through the first channel (Channel); if the device type of the control device is a round three-button switch, then the electronic device can transmit data frames related to the control device through the second channel. The present disclosure, by adopting the above-mentioned method, helps electronic devices to quickly and accurately transmit data frames, avoid the situation of disordered data frame transmission, and improve transmission efficiency.
在一些实施例中,第一类数据帧、第二类数据帧以及第三类数据帧等数据帧中的至少一类,可以包含负载部分,负载部分或其他部分中都可以携带信道信息,本公开不作具体限定。In some embodiments, at least one of the first type of data frames, the second type of data frames, and the third type of data frames may include a payload portion, and the payload portion or other portions may carry channel information, which is not specifically limited in the present disclosure.
在一些实施例中,所述第一类数据帧和/或所述第二类数据帧携带校验信息;In some embodiments, the first type of data frame and/or the second type of data frame carries verification information;
所述校验信息用于:将所述第一类数据帧和/或所述第二类数据帧从预设位置划分为第一部分和第二部分,对所述第一部分进行校验,得到对应于所述第一部分的第一校验结果;对所述第二部分进行校验,得到对应于所述第二部分的第二校验结果,或者对所述第一部分、所述第一校验结果以及所述第二部分进行校验,得到所述第二校验结果。The verification information is used to: divide the first type of data frame and/or the second type of data frame from a preset position into a first part and a second part, verify the first part to obtain a first verification result corresponding to the first part; verify the second part to obtain a second verification result corresponding to the second part, or verify the first part, the first verification result and the second part to obtain the second verification result.
在一些实施例中,第一类数据帧、第二类数据帧以及第三类数据帧等数据帧中的至少一类,可以携带校验信息,本公开不作具体限定。In some embodiments, at least one of the first type of data frames, the second type of data frames, and the third type of data frames may carry verification information, which is not specifically limited in the present disclosure.
本公开实施例中,可以对一个数据帧进行两次校验,校验可以是指循环冗余校验码(Cyclic Redundancy Check,CRC),简称循环码,是一种具有检错、纠错能力的校验方式。校验信息可以包括校验码等信息,所述校验信息用于:将所述数据帧从预设位置划分为第一部分和第二部分,对所述第一部分做进行校验,得到对应于所述第一部分的第一校验结果;对所述第二部分进行校验,得到对应于所述第二部分的第二校验结果,或者对所述第一部分、所述第一校验结果以及所述第二部分进行校验,得到所述第二校验结果。例如:数据帧的长度为5字节,那么电子设备可以分别在第1号字节和第5号字节后面插入校验信息A(校验码A)和校验信息B(校验码B)。电子设备可以根据校验信息A对1号字节进行第一次校验,得到校验结果a。电子设备可以根据校验信息B对2-5号字节进行第二次校验,得到校验结果b,或者电子设备可以根据校验信息B对1号字节、2-5号字节以及校验结果a共同进行第二次校验,得到校验结果b等。本公开通过采用上述方式,有助于提高校验效率和准确率等。In the disclosed embodiment, a data frame may be checked twice, and the check may refer to a cyclic redundancy check code (CRC), which is a check method with error detection and correction capabilities. The check information may include information such as a check code, and the check information is used to: divide the data frame from a preset position into a first part and a second part, check the first part, and obtain a first check result corresponding to the first part; check the second part, and obtain a second check result corresponding to the second part, or check the first part, the first check result, and the second part to obtain the second check result. For example: if the length of the data frame is 5 bytes, then the electronic device can insert check information A (check code A) and check information B (check code B) after byte No. 1 and byte No. 5, respectively. The electronic device can perform a first check on byte No. 1 according to the check information A, and obtain a check result a. The electronic device can perform a second check on bytes No. 2-5 according to the check information B, and obtain a check result b, or the electronic device can perform a second check on bytes No. 1, bytes No. 2-5, and check result a together according to the check information B, and obtain a check result b, etc. The present disclosure helps to improve verification efficiency and accuracy by adopting the above-mentioned method.
在一些实施例中,所述第一类数据帧和/或所述第二类数据帧包括帧头部分,所述帧头部分由协议版本信息确定,所述协议版本信息用于确定数据处理的数据协议类型。In some embodiments, the first type of data frame and/or the second type of data frame includes a frame header portion, and the frame header portion is determined by protocol version information, and the protocol version information is used to determine a data protocol type for data processing.
本公开实施例中,所述第一类数据帧和/或所述第二类数据帧等不同类数据帧中的任意类数据帧可以包括帧头部分,所述帧头部分可以由协议版本信息确定,所述协议版本信息用于确定数据处理的数据协议类型,例如:433协议对应的帧头部分为0001,2.4G协议对应的帧头部分为0010等。不同协议的数据帧(如,第一类数据帧,或第二类数据帧,或第三类数据帧等)的负载部分等包含的信息可以互相交换。本公开通过采用上述方式,有助于提高不同协议间数据帧的生成效率等。In the embodiment of the present disclosure, any data frame of different types such as the first type of data frame and/or the second type of data frame may include a frame header portion, and the frame header portion may be determined by protocol version information, and the protocol version information is used to determine the data protocol type of data processing, for example: the frame header corresponding to the 433 protocol is divided into 0001, and the frame header corresponding to the 2.4G protocol is divided into 0010, etc. The information contained in the payload portion of data frames of different protocols (such as the first type of data frame, or the second type of data frame, or the third type of data frame, etc.) can be exchanged with each other. The present disclosure helps to improve the generation efficiency of data frames between different protocols by adopting the above method.
在一些实施例中,第一类数据帧、第二类数据帧以及第三类数据帧等数据帧中的至少一类,可以包含帧头部分,本公开不作具体限定。In some embodiments, at least one of the first type of data frames, the second type of data frames, and the third type of data frames may include a frame header portion, which is not specifically limited in the present disclosure.
本公开实施例中的数据处理方法,可以应用于控制设备,也可以应用于智能控制中心,也可以应用于受控设备等,对于所述数据处理方法的执行主体,本公开不作具体限定。The data processing method in the embodiments of the present disclosure may be applied to a control device, an intelligent control center, a controlled device, etc. The present disclosure does not specifically limit the execution subject of the data processing method.
本公开实施例中,能够获取控制设备的设备信息和所述控制设备生成的控制信息;根据所述设备信息和所述控制信息,生成第一类数据帧;其中,所述第一类数据帧包括地址域和负载部分,所述设备信息中的第一部分构成所述第一类数据帧的地址域,所述设备信息中的第二部分和所述控制信息共同构成所述第一类数据帧的负载部分。本公开通过设置控制设备与受控设置之间无线传输过程中数据帧的数据格式,以及控制设备与受控设置之间无线传输的方式,能够提高数据帧的传输效率、准确性,同时能够减少数据帧的传输功耗,增加待机时长等。In an embodiment of the present disclosure, it is possible to obtain device information of a control device and control information generated by the control device; a first type of data frame is generated according to the device information and the control information; wherein the first type of data frame includes an address field and a load part, the first part of the device information constitutes the address field of the first type of data frame, and the second part of the device information and the control information together constitute the load part of the first type of data frame. The present disclosure can improve the transmission efficiency and accuracy of data frames by setting the data format of data frames during wireless transmission between a control device and a controlled device, as well as the wireless transmission method between a control device and a controlled device, and can also reduce the transmission power consumption of data frames, increase the standby time, etc.
图2是根据一示例性实施例示出的数据处理方法的流程图二,如图2所示,该数据处理方法应用于受控设备,主要包括以下步骤:FIG. 2 is a second flowchart of a data processing method according to an exemplary embodiment. As shown in FIG. 2 , the data processing method is applied to a controlled device and mainly includes the following steps:
在步骤201中,向智能控制中心发送所述受控设备的状态信息,以使得所述智能控制中心根据所述受控设备的状态信息和控制设备的状态信息,对所述控制设备和所述受控设备进行匹配;In step 201, the state information of the controlled device is sent to the intelligent control center, so that the intelligent control center matches the control device and the controlled device according to the state information of the controlled device and the state information of the control device;
在步骤202中,接收来自所述智能控制中心的匹配结果;其中,所述匹配结果用于建立所述控制设备与所述受控设备之间的通信连接。In step 202, a matching result is received from the intelligent control center; wherein the matching result is used to establish a communication connection between the control device and the controlled device.
这里,受控设备(也可以称为接收器)可以是能够接收并执行命令,且具有无线传输功能的设备,例如,可以指用来接收并执行控制、管理等命令的,具有射频无线收发、红外收发、蓝牙收发、WiFi收发等无线传输功能的设备。在一些实施例中,受控设备可以包括:墙壁开关、单路执行器、多路执行器、电动窗帘、灯具、电视机、空调等设备。Here, the controlled device (also referred to as a receiver) may be a device that can receive and execute commands and has a wireless transmission function, for example, it may refer to a device that is used to receive and execute control, management, and other commands and has a wireless transmission function such as radio frequency wireless transceiver, infrared transceiver, Bluetooth transceiver, WiFi transceiver, etc. In some embodiments, the controlled device may include: wall switches, single-channel actuators, multi-channel actuators, electric curtains, lamps, televisions, air conditioners, and other devices.
本公开实施例中,智能控制中心可以包括:终端设备、网关设备或者云服务器等,例如,移动终端或固定终端。其中,移动终端可以包括:手机、平板电脑、笔记本电脑或者穿戴式设备等设备,还可以包括智能家居设备,例如,智能音箱等。固定终端可以包括:台式电脑或智能电视等。智能控制中心可以是指在控制设备和受控设备进行无线传输的过程中,用来对命令进行匹配、滤波或者剪切等处理的中转设备等。控制设备可以先将命令发送给智能控制中心,然后智能控制中心再将处理后的命令转发给与控制设备进行匹配的受控设备等。当然,受控设备与控制设备之间也可以之间进行数据帧的传输。In the disclosed embodiments, the intelligent control center may include: terminal devices, gateway devices or cloud servers, for example, mobile terminals or fixed terminals. Among them, mobile terminals may include: mobile phones, tablet computers, laptop computers or wearable devices, and may also include smart home devices, for example, smart speakers. Fixed terminals may include: desktop computers or smart TVs. The intelligent control center may refer to a transit device used to match, filter or cut commands during wireless transmission between the control device and the controlled device. The control device may first send a command to the intelligent control center, and then the intelligent control center forwards the processed command to the controlled device that matches the control device. Of course, data frames can also be transmitted between the controlled device and the control device.
在一种可能的实施例中,智能控制中心还可以是指具有智能控制功能的模块或者芯片等,可以嵌入其他设备中的零部件等,本公开对于智能控制中心的表示形式不作具体限定。例如:智能控制中心可以是指控制设备中的一个模块或者单元,或者智能控制中心可以是指受控设备中的一个模块或者单元,也即控制设备或者受控设备可以包括智能控制中心的功能等。In a possible embodiment, the intelligent control center may also refer to a module or chip with intelligent control functions, etc., which may be embedded in other devices, etc. The present disclosure does not specifically limit the representation of the intelligent control center. For example, the intelligent control center may refer to a module or unit in a control device, or the intelligent control center may refer to a module or unit in a controlled device, that is, the control device or the controlled device may include the functions of the intelligent control center, etc.
受控设备可以向智能控制中心发送所述受控设备的状态信息,以使得所述智能控制中心根据所述受控设备的状态信息和控制设备的状态信息,对所述控制设备和所述受控设备进行匹配。受控设备的状态信息可以包括受控设备的地址标识、自身的运动、亮度、响度等状态信息,控制设备的状态信息可以包括控制设备的地址标识、自身的开合程度、检测到的控制参数等状态信息。例如:智能控制中心根据认为的或者按一定规则的自动设置,将具备某个地址标识的控制设备和具备某个地址标识的受控设备匹配在一起,并且将控制设备的地址标识信息发送给受控设备,以便受控设备存储该控制设备的地址标识信息后,后续可以由控制设备直接控制受控设备,一旦通过地址标识建立匹配关系,控制设备的所有控制信息均可以应用于受控设备。例如如果一个控制开关位上按开、下按关,那么一旦该开关与受控设备建立匹配关系,则按该开关的上面开受控设备,按开关的下面关受控设备。智能控制中心确定受控设备A的状态信息为响度从大到小,受控设备B的状态信息为亮度由开到关等,控制设备a的状态信息为由闭合到断开,控制设备b的状态信息为按压等级逐渐增加等。智能控制中心可以根据预先设置的匹配策略,得到受控设备A匹配控制设备b,受控设备B匹配控制设备a等。The controlled device can send the state information of the controlled device to the intelligent control center, so that the intelligent control center matches the control device and the controlled device according to the state information of the controlled device and the state information of the control device. The state information of the controlled device can include the address identification of the controlled device, its own movement, brightness, loudness and other state information, and the state information of the control device can include the address identification of the control device, its own opening and closing degree, detected control parameters and other state information. For example: the intelligent control center matches the control device with a certain address identification and the controlled device with a certain address identification according to the automatic setting of the assumption or certain rules, and sends the address identification information of the control device to the controlled device, so that the controlled device can directly control the controlled device later after storing the address identification information of the control device. Once the matching relationship is established through the address identification, all control information of the control device can be applied to the controlled device. For example, if a control switch is on when it is on and off when it is off when it is on, once the switch is matched with the controlled device, the controlled device is turned on when the top of the switch is pressed, and the controlled device is turned off when the bottom of the switch is pressed. The intelligent control center determines that the state information of the controlled device A is the loudness from high to low, the state information of the controlled device B is the brightness from on to off, etc., the state information of the control device a is from closed to open, the state information of the control device b is the pressure level gradually increasing, etc. The intelligent control center can obtain the controlled device A matching the control device b, the controlled device B matching the control device a, etc. according to the pre-set matching strategy.
在进行匹配的过程中,可以根据受控设备的状态信息和控制设备的状态信息中包含的共同信息进行匹配。例如:受控设备C的状态信息中携带匹配标识1,控制设备D的状态信息中也携带匹配标识1,那么可以确定受控设备C与控制设备D匹配。本公开实施例中,还可以根据受控设备的状态信息中携带的设备类型,控制设备的状态信息中携带的设备类型,进行匹配。例如:E受控设备的状态信息中携带的设备类型为一个通道类型,F控制设备的状态信息中携带的设备类型为单开自电类型,通过预先设置的一个通道类型与单开自电类型匹配,来确定E受控设备与F控制设备匹配等。In the matching process, matching can be performed based on the common information contained in the status information of the controlled device and the status information of the controlling device. For example: the status information of the controlled device C carries the matching identifier 1, and the status information of the controlling device D also carries the matching identifier 1, then it can be determined that the controlled device C matches the controlling device D. In the disclosed embodiment, matching can also be performed based on the device type carried in the status information of the controlled device and the device type carried in the status information of the controlling device. For example: the device type carried in the status information of the controlled device E is a channel type, and the device type carried in the status information of the controlling device F is a single-open self-power type. By matching a pre-set channel type with the single-open self-power type, it is determined that the controlled device E matches the controlling device F, etc.
智能控制中心在得到匹配结果之后,可以将该匹配结果分别发送至控制设备和受控设备,以使得控制设备和受控设备可以不需要经过智能控制中心,直接基于所述匹配结果之间进行信号的传输。After obtaining the matching result, the intelligent control center can send the matching result to the control device and the controlled device respectively, so that the control device and the controlled device can directly transmit signals based on the matching result without passing through the intelligent control center.
受控设备可以接收来自所述智能控制中心的匹配结果;其中,所述匹配结果用于建立所述控制设备与所述受控设备之间的通信连接,例如:受控设备A与控制设备b之间的通信连接,受控设备B与控制设备a之间的通信连接等。The controlled device can receive the matching result from the intelligent control center; wherein the matching result is used to establish a communication connection between the control device and the controlled device, for example: a communication connection between controlled device A and control device B, a communication connection between controlled device B and control device A, etc.
本公开实施例中,能够向智能控制中心发送所述受控设备的状态信息,以使得所述智能控制中心根据所述受控设备的状态信息和控制设备的状态信息,对所述控制设备和所述受控设备进行匹配;接收来自所述智能控制中心的匹配结果;其中,所述匹配结果用于建立所述控制设备与所述受控设备之间的通信连接。本公开受控设备通过发送自身的状态信息,来与控制设备进行匹配,能够提高控制设备与受控设备之间的匹配效率和匹配准确率等。In the disclosed embodiment, the state information of the controlled device can be sent to the intelligent control center, so that the intelligent control center can match the control device and the controlled device according to the state information of the controlled device and the state information of the control device; and receive the matching result from the intelligent control center; wherein the matching result is used to establish a communication connection between the control device and the controlled device. The disclosed controlled device matches with the control device by sending its own state information, which can improve the matching efficiency and matching accuracy between the control device and the controlled device.
在一些实施例中,所述向智能控制中心发送所述受控设备的状态信息,包括:In some embodiments, sending the state information of the controlled device to the intelligent control center includes:
在预设时间单位内,按照第一时间间隔向所述智能控制中心发送所述状态信息。The status information is sent to the intelligent control center at a first time interval within a preset time unit.
本公开实施例中,受控设备可以在预设时间单位内,按照预设时间间隔给智能控制中心发送多个状态信息。所述预设时间单位可以包括上电时刻,或者触发预设按键的时刻等。在一种可能的实施例中,受控设备可以在预设时间单位发送状态信息给智能控制中心,为避免多个受控设备发送状态信息时出现空中冲突的情况,可以将第一时间间隔可以为随机数。例如:采用受控设备自身的目标标识作为随机数来源,由于每个受控设备的目标标识不同,因此可以产生不同的时间间隔。也可以采用受控设备烧录程序时烧入一个不同的标识作为随机数来源,也可以采用未接任何输入的模拟数字转换器读出的数据作为随机数等。In the disclosed embodiment, the controlled device can send multiple status information to the intelligent control center within a preset time unit and at a preset time interval. The preset time unit may include a power-on moment, or a moment when a preset button is triggered, etc. In a possible embodiment, the controlled device can send status information to the intelligent control center within a preset time unit. In order to avoid air conflicts when multiple controlled devices send status information, the first time interval can be a random number. For example: using the target identifier of the controlled device itself as the source of random numbers, since the target identifier of each controlled device is different, different time intervals can be generated. It is also possible to use a different identifier burned into the controlled device as the source of random numbers when burning the program, or to use data read out of an analog-to-digital converter that is not connected to any input as a random number, etc.
在另一实施例中,为了保证智能控制中心准确接收状态信息,受控设备可以发射多次重复的的状态信息,例如发送3-5次重复的状态信息等。受控设备每次发送重复的状态信息可以采用预设的时间间隔,也可以采用随机数,并且该随机数的产生与前述随机数的产生算法可以相同,也可以在受控设备的程序设计中采用不同的计算方式,来保证两次产生的随机数不同,这样可更好的避免数据帧的空中冲突等。本公开通过采用上述方式,能够提高受控设备发送自身状态信息的多样性,提高匹配效率等。In another embodiment, in order to ensure that the intelligent control center accurately receives the status information, the controlled device can transmit multiple repeated status information, such as 3-5 repeated status information. The controlled device can use a preset time interval or a random number to send repeated status information each time, and the generation of the random number can be the same as the aforementioned random number generation algorithm, or different calculation methods can be used in the program design of the controlled device to ensure that the random numbers generated twice are different, so as to better avoid air conflicts of data frames. By adopting the above method, the present disclosure can improve the diversity of the state information sent by the controlled device itself, improve matching efficiency, etc.
在一些实施例中,所述向智能控制中心发送所述受控设备的状态信息,包括:In some embodiments, sending the state information of the controlled device to the intelligent control center includes:
在以所述受控设备上电时刻为起始时刻的预设时长内,按照第二时间间隔向所述智能控制中心发送所述状态信息。The status information is sent to the intelligent control center at a second time interval within a preset time period starting from the power-on time of the controlled device.
本公开实施例中,在受控设备上电的预设时长内(如,a秒内),发送状态信息给智能控制中心,并且发送状态信息的第二时间间隔(如,c秒),在c秒内重复发送的状态信息个数为d个。In the disclosed embodiment, within a preset duration (e.g., a second) of powering on the controlled device, status information is sent to the intelligent control center, and a second time interval (e.g., c seconds) for sending status information is used, and the number of status information repeatedly sent within c seconds is d.
在另一实施例中,在受控设备上电后,可以进行延时,如随机延时预设延时时长(如,b秒),在达到b秒之后,在c秒内重复发送的状态信息个数为d个。其中,受控设备重复发送状态信息的第二时间间隔也可以为随机数,具体的随机方式不具体限定。例如:受控设备上电60秒内,随机延时一定时间,发送4秒的响应数据帧,4秒内重复发送5个重复的状态信息等。本公开通过采用上述方式,能够提高受控设备发送自身状态信息的多样性,提高匹配效率等。In another embodiment, after the controlled device is powered on, a delay may be performed, such as a random delay with a preset delay length (e.g., b seconds). After b seconds are reached, the number of status information repeatedly sent within c seconds is d. Among them, the second time interval for the controlled device to repeatedly send status information may also be a random number, and the specific random method is not specifically limited. For example: within 60 seconds after the controlled device is powered on, a random delay of a certain time is performed, a response data frame of 4 seconds is sent, and 5 repeated status information are repeatedly sent within 4 seconds. By adopting the above method, the present disclosure can improve the diversity of the controlled device sending its own status information, improve matching efficiency, etc.
在一些实施例中,所述向智能控制中心发送所述受控设备的状态信息,包括:In some embodiments, sending the state information of the controlled device to the intelligent control center includes:
在检测到所述受控设备满足预设触发条件时,按照第三时间间隔向所述智能控制中心发送所述状态信息。When it is detected that the controlled device meets a preset trigger condition, the status information is sent to the intelligent control center at a third time interval.
本公开实施例中,预设触发条件可以包括受控设备上的各种功能按键检测到选定等,在受控设备确定某个功能按键被选定时,就按照第三时间间隔发送状态信息给智能控制中心,如,发送状态信息的第三时间间隔为f秒,在f秒内重复发送的状态信息个数为g个。In the embodiment of the present disclosure, the preset trigger conditions may include detecting the selection of various function buttons on the controlled device, etc. When the controlled device determines that a certain function button is selected, it sends status information to the intelligent control center at a third time interval. For example, the third time interval for sending the status information is f seconds, and the number of status information repeatedly sent within f seconds is g.
在另一实施例中,在受控设备确定某个功能按键被选定之后,可以进行延时,如,随机延时e秒,并且发送状态信息的时间长度为f秒,在f秒内重复发送的状态信息个数为g个。受控设备重复发送状态信息的时间间隔也可以为随机数,具体的随机方式不具体限定。例如:受控设备上电30秒内,随机延时一定时间,发送5秒的响应数据帧,5秒内重复发送10个重复的状态信息等。本公开通过采用上述方式,能够提高受控设备发送自身状态信息的多样性,提高匹配效率等。In another embodiment, after the controlled device determines that a certain function button is selected, a delay may be performed, such as a random delay of e seconds, and the time length for sending the status information is f seconds, and the number of status information repeatedly sent within f seconds is g. The time interval for the controlled device to repeatedly send the status information may also be a random number, and the specific random method is not specifically limited. For example: within 30 seconds after the controlled device is powered on, a random delay of a certain time is performed, a response data frame of 5 seconds is sent, and 10 repeated status information are repeatedly sent within 5 seconds, etc. By adopting the above method, the present disclosure can improve the diversity of the controlled device sending its own status information, improve matching efficiency, etc.
在一些实施例中,所述向智能控制中心发送所述受控设备的状态信息,包括:In some embodiments, sending the state information of the controlled device to the intelligent control center includes:
在所述控制设备与所述受控设备之间的通信连接处于断开状态时,接收所述控制设备发送的第一触发指令;所述控制设备为已经与受控设备建立连接的控制设备,或者为未与所述受控设备建立连接的控制设备,或者为具有预设地址的控制设备;When the communication connection between the control device and the controlled device is in a disconnected state, receiving a first trigger instruction sent by the control device; the control device is a control device that has established a connection with the controlled device, or is a control device that has not established a connection with the controlled device, or is a control device with a preset address;
响应于所述第一触发指令,按照第四时间间隔向所述智能控制中心发送所述受控设备的状态信息。In response to the first trigger instruction, the status information of the controlled device is sent to the intelligent control center at a fourth time interval.
本公开实施例中,已经与受控设备配对的控制设备,每次接收到控制设备的数据帧信号,发送对应的数据帧给智能控制中心,每次重复发送m个,重复发送的时间间隔为随机数或预设的间隔时间。在所述控制设备与所述受控设备之间的通信连接处于断开状态时,也即未与受控设备配对的控制设备,也可以直接接收所述控制设备发送的第一触发指令,然后响应于所述第一触发指令,按照预设的时间间隔向所述智能控制中心发送所述受控设备的状态信息,用于与控制设备进行匹配。所述控制设备可以为已经与受控设备建立连接的控制设备,或者可以为未与所述受控设备建立连接的控制设备,或者可以为具有预设地址的控制设备(也即预先制定的一个特殊地址的控制设备)等。本公开通过采用上述方式,能够提高受控设备发送自身状态信息的多样性,提高匹配效率等。In the embodiment of the present disclosure, the control device that has been paired with the controlled device sends the corresponding data frame to the intelligent control center each time it receives the data frame signal of the control device, and repeats the sending of m frames each time, and the time interval of the repeated sending is a random number or a preset interval time. When the communication connection between the control device and the controlled device is in a disconnected state, that is, the control device that is not paired with the controlled device, can also directly receive the first trigger instruction sent by the control device, and then respond to the first trigger instruction and send the state information of the controlled device to the intelligent control center at a preset time interval for matching with the control device. The control device can be a control device that has established a connection with the controlled device, or a control device that has not established a connection with the controlled device, or a control device with a preset address (that is, a control device with a special address set in advance), etc. By adopting the above-mentioned method, the present disclosure can improve the diversity of the state information sent by the controlled device, improve the matching efficiency, etc.
在一些实施例中,所述向智能控制中心发送所述受控设备的状态信息,包括:In some embodiments, sending the state information of the controlled device to the intelligent control center includes:
接收来自所述智能控制中心的查询指令;Receiving a query instruction from the intelligent control center;
响应于所述查询指令,按照第五时间间隔向所述智能控制中心发送所述受控设备的状态信息。In response to the query instruction, the status information of the controlled device is sent to the intelligent control center at a fifth time interval.
本公开实施例中,受控设备可以通过接收来自所述智能控制中心的查询指令,响应于所述查询指令,按照预设时间间隔向所述智能控制中心发送所述受控设备的状态信息,用于与控制设备进行匹配等。查询指令可以是指针对受控设备,用于指示受控设备发送状态信息的指令。本公开通过采用上述方式,能够提高受控设备发送自身状态信息方式的多样性,提高匹配效率等。In the embodiment of the present disclosure, the controlled device can receive a query instruction from the intelligent control center, respond to the query instruction, and send the state information of the controlled device to the intelligent control center at a preset time interval for matching with the control device. The query instruction may refer to an instruction for the controlled device to instruct the controlled device to send state information. By adopting the above method, the present disclosure can increase the diversity of the ways in which the controlled device sends its own state information, improve matching efficiency, etc.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
基于所述匹配结果,接收来自于所述受控设备对应的所述控制设备的控制信号;其中,所述控制信号包括第二类数据帧,所述第二类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的;Based on the matching result, receiving a control signal from the control device corresponding to the controlled device; wherein the control signal includes a second type of data frame, and the second type of data frame is generated according to the device type of the controlled device and the type of command for controlling the controlled device;
响应于所述控制信号,根据第三类数据帧生成响应信号;其中,所述第三类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的;In response to the control signal, generating a response signal according to a third type of data frame; wherein the third type of data frame is generated according to the device type of the controlled device and the type of command for controlling the controlled device;
向所述控制设备发送所述响应信号。The response signal is sent to the control device.
本公开实施例中,受控设备与控制设备基于所述匹配结果建立通信连接之后,可以不需要经过智能控制中心,直接与控制设备进行通信。控制信号至少可以包括第二类数据帧(例如但不限于设备控制命令或设备管理命令)等,响应信号至少可以包括第三类数据帧(例如但不限于设备状态报告或设备管理命令应答)等。本公开通过采用上述方式,能够及时将自身工作状态等信息反馈给控制设备,提高系统的稳定性等。In the embodiment of the present disclosure, after the controlled device and the control device establish a communication connection based on the matching result, they can communicate directly with the control device without going through the intelligent control center. The control signal may include at least a second type of data frame (such as but not limited to a device control command or a device management command), etc., and the response signal may include at least a third type of data frame (such as but not limited to a device status report or a device management command response), etc. By adopting the above method, the present disclosure can timely feed back information such as its own working status to the control device, thereby improving the stability of the system, etc.
在一些实施例中,所述向所述控制设备发送所述响应信号,包括:In some embodiments, sending the response signal to the control device includes:
通过与所述控制设备之间的通信连接,向所述控制设备发送所述响应信号;或者sending the response signal to the control device through a communication connection with the control device; or
通过所述智能控制中心向所述控制设备发送所述响应信号。The response signal is sent to the control device through the intelligent control center.
本公开实施例中,受控设备可以通过与所述控制设备之间的通信连接,直接向所述控制设备发送所述响应信号,或者通过所述智能控制中心向所述控制设备发送所述响应信号,或者同时向控制设备和智能控制中心发送所述响应信号等。本公开通过采用上述方式,能够提高信号传输的稳定性和灵活性等。In the embodiment of the present disclosure, the controlled device can directly send the response signal to the control device through the communication connection between the controlled device and the control device, or send the response signal to the control device through the intelligent control center, or send the response signal to the control device and the intelligent control center at the same time. By adopting the above manner, the present disclosure can improve the stability and flexibility of signal transmission.
且本公开实施例中,通过智能控制中心预先实现控制设备和受控设备之间的设备匹配,即使在没有智能控制中心的情况下,控制设备和受控设备也能够直接交互,能够为设备交互提供便利性。In the embodiment of the present disclosure, device matching between the control device and the controlled device is pre-implemented through the intelligent control center. Even in the absence of the intelligent control center, the control device and the controlled device can interact directly, which can provide convenience for device interaction.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
根据所述控制设备和所述智能控制中心的设备配置顺序,确定所述响应信号的发送方向;Determining a sending direction of the response signal according to a device configuration sequence of the control device and the intelligent control center;
所述发送方向包括:从所述控制设备至所述智能控制中心的方向,或者从所述智能控制中心至所述控制设备的方向。The sending direction includes: a direction from the control device to the intelligent control center, or a direction from the intelligent control center to the control device.
本公开实施例中,由于受控设备、控制设备以及智能控制中心之间,都能进行通信,在实现的过程中,可以根据各个设备的配置顺序,确定所述响应信号的发送方向。例如:受控设备可以根据所述控制设备和所述智能控制中心的设备配置顺序,确定所述响应信号的发送方向;所述发送方向包括:从所述控制设备至所述智能控制中心的方向,或者从所述智能控制中心至所述控制设备的方向。例如:受控设备先与智能控制中心进行配置,建立通信连接,然后再与控制设备进行匹配,建立通信连接,那么所述发送方向为从受控设备至所述智能控制中心,再由智能控制中心至所述控制设备的方向。再例如,受控设备先与控制设备进行匹配,建立通信连接,然后再与智能控制中心进行配置,建立通信连接,那么所述发送方向为从受控设备至所述控制设备,再由控制设备至所述智能控制中心的方向。In the disclosed embodiment, since the controlled device, the control device and the intelligent control center can communicate with each other, in the implementation process, the sending direction of the response signal can be determined according to the configuration order of each device. For example: the controlled device can determine the sending direction of the response signal according to the device configuration order of the control device and the intelligent control center; the sending direction includes: the direction from the control device to the intelligent control center, or the direction from the intelligent control center to the control device. For example: the controlled device is first configured with the intelligent control center to establish a communication connection, and then matched with the control device to establish a communication connection, then the sending direction is from the controlled device to the intelligent control center, and then from the intelligent control center to the control device. For another example, the controlled device is first matched with the control device to establish a communication connection, and then configured with the intelligent control center to establish a communication connection, then the sending direction is from the controlled device to the control device, and then from the control device to the intelligent control center.
本公开通过采用上述方式,能够准确有效地确定出发送方向等,避免出现逻辑紊乱的情况。The present disclosure adopts the above-mentioned method to accurately and effectively determine the sending direction and avoid logical disorder.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
对所述第三类数据帧进行字节序转换处理,得到预设模式的第三类数据帧;其中,所述预设模式包括:预设大端模式和预设小端模式;Performing byte order conversion processing on the third type of data frame to obtain the third type of data frame in a preset mode; wherein the preset mode includes: a preset big endian mode and a preset little endian mode;
根据预设模式的第三类数据帧,生成所述响应信号。The response signal is generated according to the third type of data frame in the preset mode.
本公开实施例中,大端模式可以是指数据的高字节保存在内存的低地址中,而数据的低字节保存在内存的高地址中。小端模式可以是指数据的高字节保存在内存的高地址中,而数据的低字节保存在内存的低地址中。受控设备在生成响应信号的过程中,可以进行字节序转换处理处理。例如:受控设备通过将无序的第三类数据帧设置为大端模式后,再根据大端模式的第三类数据帧,来生成所述响应信号。本公开通过采用上述方式,能够提高信号传输的效率,减少受控设备解析数据帧的时间等。In the embodiments of the present disclosure, the big-endian mode may refer to that the high byte of the data is stored in the low address of the memory, while the low byte of the data is stored in the high address of the memory. The little-endian mode may refer to that the high byte of the data is stored in the high address of the memory, while the low byte of the data is stored in the low address of the memory. The controlled device may perform byte order conversion processing in the process of generating a response signal. For example: the controlled device generates the response signal according to the third-category data frame in the big-endian mode after setting the unordered third-category data frame to the big-endian mode. The present disclosure can improve the efficiency of signal transmission and reduce the time for the controlled device to parse data frames by adopting the above-mentioned method.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
根据所控制信号中携带的转发信息,将所述控制信号转发给其他受控设备;forwarding the control signal to other controlled devices according to the forwarding information carried in the controlled signal;
其中,所述转发信息用于触发所述受控设备向其他受控设备转发数据的功能。The forwarding information is used to trigger a function of the controlled device forwarding data to other controlled devices.
本公开实施例中,转发信息可以包括转发次数、转发时间间隔等信息。受控设备可以具有转发数据的功能,以使得增加数据帧的传输距离。例如:电子设备将第二类数据帧发送给第一位置的受控设备A,然后受控设备A可以将第二类数据帧发送给第二位置的受控设备B,然后受控设备B可以将第二类数据帧发送给第三位置的受控设备C等。在转发数据的过程中,A、B和C等受控设备可以既执行对应的命令内容,又进行转发,也可以仅仅只进行转发不执行对应的命令内容等。A、B和C等受控设备也可以对第二类数据帧进行滤波或者插入新的信息等处理,再进行转发等,本公开不作具体限定。In the embodiments of the present disclosure, the forwarding information may include information such as the number of forwarding times and the forwarding time interval. The controlled device may have the function of forwarding data so as to increase the transmission distance of the data frame. For example: the electronic device sends the second type of data frame to the controlled device A at the first position, and then the controlled device A can send the second type of data frame to the controlled device B at the second position, and then the controlled device B can send the second type of data frame to the controlled device C at the third position, etc. In the process of forwarding data, the controlled devices A, B and C can both execute the corresponding command content and forward it, or just forward it without executing the corresponding command content, etc. The controlled devices A, B and C can also filter the second type of data frame or insert new information, etc., and then forward it, etc., which is not specifically limited in the present disclosure.
在转发的过程中,如果无限次的转发,会造成转发无法停止或者占用频带过多,反而影响了无线传输系统的传输性能,因此可以设定确定的转发停止规则。电子设备可以设置将转发次数写入数据帧的帧头部分(FRAME Header)等方式,当达到一定的转发次数后,就停止转发。例如:设置转发2次既停止,当受控设备收到转发的第二类数据帧,但读取转发次数为3时,停止向外其他受控设备转发,该受控设备既终止转发过程等。受控设备A可以将接收到来自智能控制中心的第二类数据帧中的当前转发次数(Repeater Counter,RC)由0更新为1,然后受控设备B将可以将接收到来自受控设备A的第二类数据帧中的当前转发次数由1更新为2等,直到达到预设的转发次数3次等。本公开通过采用上述方式,能够提高数据帧的传输距离等。In the process of forwarding, if the forwarding is unlimited, the forwarding cannot be stopped or the frequency band is occupied too much, which affects the transmission performance of the wireless transmission system. Therefore, a certain forwarding stop rule can be set. The electronic device can be set to write the forwarding number into the frame header (FRAME Header) of the data frame, and stop forwarding when a certain forwarding number is reached. For example: set the forwarding to stop after 2 times. When the controlled device receives the forwarded second-class data frame, but reads the forwarding number as 3, it stops forwarding to other controlled devices, and the controlled device terminates the forwarding process. The controlled device A can update the current forwarding number (Repeater Counter, RC) in the second-class data frame received from the intelligent control center from 0 to 1, and then the controlled device B can update the current forwarding number in the second-class data frame received from the controlled device A from 1 to 2, etc., until the preset forwarding number of 3 times is reached. The present disclosure can improve the transmission distance of the data frame by adopting the above method.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
在确定所述控制设备的电量余量小于预设电量阈值时,停止发送所述响应信号。When it is determined that the remaining power of the control device is less than a preset power threshold, the sending of the response signal is stopped.
本公开实施例中,受控设备可以通过向控制设备发送电流查询消息,来确定控制设备的电量余量,然后在确定所述控制设备的电量余量小于预设电量阈值时,停止发送所述响应信号。例如:受控设备确定控制设备的电量余量为10%,小于预设电量阈值(例如但不限于30%),那么受控设备即使在接收到来自控制设备的控制信号的情况下,只需要执行控制信号中的控制命令等,可以停止生成并发送所述响应信号等。本公开通过采用上述方式,能够节约功耗,提高控制受控设备和受控设备的待机时长等。In an embodiment of the present disclosure, the controlled device can determine the remaining power of the control device by sending a current query message to the control device, and then stop sending the response signal when it is determined that the remaining power of the control device is less than a preset power threshold. For example: the controlled device determines that the remaining power of the control device is 10%, which is less than a preset power threshold (for example but not limited to 30%), then even if the controlled device receives a control signal from the control device, it only needs to execute the control command in the control signal, etc., and can stop generating and sending the response signal, etc. The present disclosure can save power consumption and improve the standby time of the controlled device and the controlled device by adopting the above-mentioned method.
在一种可能的实施例中,受控设备具有学习功能,所述学习功能可以是指通过接收控制设备的历史控制信号,在处于历史控制信号同样的场景时,通过预设的学习模型自动改变受控设备自身的工作状态等。例如:受控设备接收控制设备的控制信号A,然后加入学习模式,也即通过将控制信号、采集的外界环境信息、以及吱声工作状态等信息输入学习模型,训练学习模型的参数,受控设备可以再接收控制设备的控制信号B,退出学习模式。例如:受控设备通过学习模式确定每天8点可以自动打开窗帘等。本公开通过采用上述方式,能够提高受控设备的智能性,提高用户体验等。In a possible embodiment, the controlled device has a learning function, and the learning function may refer to automatically changing the working state of the controlled device itself through a preset learning model by receiving the historical control signal of the control device when in the same scenario as the historical control signal. For example: the controlled device receives the control signal A of the control device, and then joins the learning mode, that is, by inputting the control signal, the collected external environment information, and the squeak working state and other information into the learning model, and training the parameters of the learning model, the controlled device can then receive the control signal B of the control device and exit the learning mode. For example: the controlled device determines through the learning mode that the curtains can be automatically opened at 8 o'clock every day. By adopting the above method, the present disclosure can improve the intelligence of the controlled device and improve the user experience.
本公开实施例中,能够向智能控制中心发送所述受控设备的状态信息,以使得所述智能控制中心根据所述受控设备的状态信息和控制设备的状态信息,对所述控制设备和所述受控设备进行匹配;接收来自所述智能控制中心的匹配结果;其中,所述匹配结果用于建立所述控制设备与所述受控设备之间的通信连接。本公开通过设置控制设备与受控设置之间无线传输过程中数据帧的数据格式,以及控制设备与受控设置之间无线传输的方式,能够提高数据帧的传输效率、准确性,同时能够减少数据帧的传输功耗,增加待机时长等。In the embodiment of the present disclosure, the state information of the controlled device can be sent to the intelligent control center, so that the intelligent control center can match the control device and the controlled device according to the state information of the controlled device and the state information of the control device; and receive the matching result from the intelligent control center; wherein the matching result is used to establish a communication connection between the control device and the controlled device. The present disclosure can improve the transmission efficiency and accuracy of the data frame by setting the data format of the data frame during the wireless transmission between the control device and the controlled device, as well as the wireless transmission method between the control device and the controlled device, and can also reduce the transmission power consumption of the data frame, increase the standby time, etc.
图3是根据一示例性实施例示出的数据处理方法的流程图三,如图3所示,主要包括以下步骤:FIG3 is a flowchart of a data processing method according to an exemplary embodiment. As shown in FIG3 , the method mainly includes the following steps:
在步骤301中,向智能控制中心发送所述控制设备的状态信息,以使得所述智能控制中心根据所述控制设备的状态信息和受控设备的状态信息,对所述控制设备和所述受控设备进行匹配;In step 301, the state information of the control device is sent to the intelligent control center, so that the intelligent control center matches the control device and the controlled device according to the state information of the control device and the state information of the controlled device;
在步骤302中,接收来自所述智能控制中心的匹配结果;其中,所述匹配结果用于建立所述控制设备与所述受控设备之间的通信连接。In step 302, a matching result is received from the intelligent control center; wherein the matching result is used to establish a communication connection between the control device and the controlled device.
这里,控制设备(也可以称为发射器)可以是能够产生并发送命令,且具有无线传输功能的设备。例如,可以指用来产生并发送控制、管理等命令的,具有射频无线收发、射频无线收发、红外收发、蓝牙收发、WiFi收发等无线传输功能的设备。控制设备可以包括:自发电开关、电池开关、传感器等设备。Here, the control device (also referred to as a transmitter) may be a device that can generate and send commands and has a wireless transmission function. For example, it may refer to a device that is used to generate and send control, management, and other commands and has a wireless transmission function such as radio frequency wireless transceiver, radio frequency wireless transceiver, infrared transceiver, Bluetooth transceiver, WiFi transceiver, etc. The control device may include: self-generating switches, battery switches, sensors, and other devices.
本公开实施例中,智能控制中心可以包括:终端设备、网关设备或者云服务器等,例如,移动终端或固定终端。其中,移动终端可以包括:手机、平板电脑、笔记本电脑或者穿戴式设备等设备,还可以包括智能家居设备,例如,智能音箱等。固定终端可以包括:台式电脑或智能电视等。智能控制中心可以是指在控制设备和受控设备进行无线传输的过程中,用来对命令进行匹配、滤波或者剪切等处理的中转设备等。控制设备可以先将命令发送给智能控制中心,然后智能控制中心再将处理后的命令转发给与控制设备进行匹配的受控设备等。当然,受控设备与控制设备之间也可以之间进行数据帧的传输。In the disclosed embodiments, the intelligent control center may include: terminal devices, gateway devices or cloud servers, for example, mobile terminals or fixed terminals. Among them, mobile terminals may include: mobile phones, tablet computers, laptop computers or wearable devices, and may also include smart home devices, for example, smart speakers. Fixed terminals may include: desktop computers or smart TVs. The intelligent control center may refer to a transit device used to match, filter or cut commands during wireless transmission between the control device and the controlled device. The control device may first send a command to the intelligent control center, and then the intelligent control center forwards the processed command to the controlled device that matches the control device. Of course, data frames can also be transmitted between the controlled device and the control device.
在一种可能的实施例中,智能控制中心还可以是指具有智能控制功能的模块或者芯片等,可以嵌入其他设备中的零部件等,本公开对于智能控制中心的表示形式不作具体限定。例如:智能控制中心可以是指控制设备中的一个模块或者单元,或者智能控制中心可以是指受控设备中的一个模块或者单元,也即控制设备或者受控设备可以包括智能控制中心的功能等。In a possible embodiment, the intelligent control center may also refer to a module or chip with intelligent control functions, etc., which may be embedded in other devices, etc. The present disclosure does not specifically limit the representation of the intelligent control center. For example, the intelligent control center may refer to a module or unit in a control device, or the intelligent control center may refer to a module or unit in a controlled device, that is, the control device or the controlled device may include the functions of the intelligent control center, etc.
控制设备可以向智能控制中心发送所述控制设备的状态信息,以使得所述智能控制中心根据所述控制设备的状态信息和受控设备的状态信息,对所述控制设备和所述受控设备进行匹配。控制设备的状态信息可以包括自身的开合程度、检测到的控制参数等状态信息,受控设备的状态信息可以包括自身的运动、亮度、响度等状态信息。例如:智能控制中心确定控制设备a的状态信息为由闭合到断开,控制设备b的状态信息为按压等级逐渐增加等,受控设备A的状态信息为响度从大到小,受控设备B的状态信息为亮度由开到关等。智能控制中心可以根据预先设置的匹配策略,得到控制设备b匹配受控设备A,控制设备a匹配受控设备B等。The control device can send the status information of the control device to the intelligent control center, so that the intelligent control center can match the control device and the controlled device according to the status information of the control device and the status information of the controlled device. The status information of the control device may include its own opening and closing degree, detected control parameters and other status information, and the status information of the controlled device may include its own movement, brightness, loudness and other status information. For example: the intelligent control center determines that the status information of the control device a is from closed to open, the status information of the control device b is that the pressure level gradually increases, the status information of the controlled device A is from loud to small, and the status information of the controlled device B is that the brightness is from on to off, etc. The intelligent control center can obtain the matching of the control device b with the controlled device A, the matching of the control device a with the controlled device B, etc. according to the pre-set matching strategy.
在进行匹配的过程中,可以根据受控设备的状态信息和控制设备的状态信息中包含的共同信息进行匹配。例如:受控设备C的状态信息中携带匹配标识1,控制设备D的状态信息中也携带匹配标识1,那么可以确定受控设备C与控制设备D匹配。本公开实施例中,还可以根据受控设备的状态信息中携带的设备类型,控制设备的状态信息中携带的设备类型,进行匹配。例如:E受控设备的状态信息中携带的设备类型为一个通道类型,F控制设备的状态信息中携带的设备类型为单开自电类型,通过预先设置的一个通道类型与单开自电类型匹配,来确定E受控设备与F控制设备匹配等。In the matching process, matching can be performed based on the common information contained in the status information of the controlled device and the status information of the controlling device. For example: the status information of the controlled device C carries the matching identifier 1, and the status information of the controlling device D also carries the matching identifier 1, then it can be determined that the controlled device C matches the controlling device D. In the disclosed embodiment, matching can also be performed based on the device type carried in the status information of the controlled device and the device type carried in the status information of the controlling device. For example: the device type carried in the status information of the controlled device E is a channel type, and the device type carried in the status information of the controlling device F is a single-open self-power type. By matching a pre-set channel type with the single-open self-power type, it is determined that the controlled device E matches the controlling device F, etc.
控制设备可以接收来自所述智能控制中心的匹配结果;其中,所述匹配结果用于建立所述控制设备与所述受控设备之间的通信连接,例如:控制设备b与受控设备A之间的通信连接,控制设备a与受控设备B之间的通信连接等。The control device can receive the matching result from the intelligent control center; wherein the matching result is used to establish a communication connection between the control device and the controlled device, for example: the communication connection between the control device b and the controlled device A, the communication connection between the control device a and the controlled device B, etc.
本公开实施例中,能够向智能控制中心发送所述控制设备的状态信息,以使得所述智能控制中心根据所述控制设备的状态信息和受控设备的状态信息,对所述控制设备和所述受控设备进行匹配;接收来自所述智能控制中心的匹配结果;其中,所述匹配结果用于建立所述控制设备与所述受控设备之间的通信连接。本公开受控设备通过发送自身的状态信息,来与控制设备进行匹配,能够提高控制设备与受控设备之间的匹配效率和匹配准确率等。In the disclosed embodiment, the state information of the control device can be sent to the intelligent control center, so that the intelligent control center can match the control device and the controlled device according to the state information of the control device and the state information of the controlled device; and receive the matching result from the intelligent control center; wherein the matching result is used to establish a communication connection between the control device and the controlled device. The disclosed controlled device matches with the control device by sending its own state information, which can improve the matching efficiency and matching accuracy between the control device and the controlled device.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
在所述控制设备与所述受控设备之间的通信连接处于断开状态时,基于检测到的输入操作触发第一触发指令;When the communication connection between the control device and the controlled device is in a disconnected state, triggering a first trigger instruction based on a detected input operation;
向所述受控设备发送所述第一触发指令;其中,所述第一触发指令用于指示所述受控设备向所述智能控制中心发送所述受控设备的状态信息。The first trigger instruction is sent to the controlled device; wherein the first trigger instruction is used to instruct the controlled device to send the status information of the controlled device to the intelligent control center.
本公开实施例中,在所述控制设备与所述受控设备之间的通信连接处于断开状态时,也即未与受控设备配对的控制设备,可以向所述受控设备发送所述第一触发指令;其中,所述第一触发指令用于指示所述受控设备向所述智能控制中心发送所述受控设备的状态信息,进而实现控制设备与受控设备之间的匹配。控制设备可以基于检测到的输入操作触发第一触发指令,例如:控制设备上存在对应的功能按钮,当控制设备检测到用户触发对应的功能按钮时,生成第一触发指令;或当控制设备上电后,生成第一触发指令等。本公开通过采用上述方式,能够提高控制设备与受控设备之间的匹配效率等。In an embodiment of the present disclosure, when the communication connection between the control device and the controlled device is disconnected, that is, the control device that is not paired with the controlled device can send the first trigger instruction to the controlled device; wherein the first trigger instruction is used to instruct the controlled device to send the state information of the controlled device to the intelligent control center, thereby achieving matching between the control device and the controlled device. The control device can trigger the first trigger instruction based on the detected input operation, for example: there is a corresponding function button on the control device, and when the control device detects that the user triggers the corresponding function button, the first trigger instruction is generated; or when the control device is powered on, the first trigger instruction is generated, etc. By adopting the above method, the present disclosure can improve the matching efficiency between the control device and the controlled device.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
在检测到预设触发操作时,根据所述第二类数据帧生成控制信号;其中,所述第二类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的;When a preset trigger operation is detected, a control signal is generated according to the second type of data frame; wherein the second type of data frame is generated according to the device type of the controlled device and the type of command used to control the controlled device;
基于所述匹配结果,将所述控制信号发送至所述受控设备。Based on the matching result, the control signal is sent to the controlled device.
本公开实施例中,预设触发操作可以是指针对控制设备的控制操作,例如:调节控制设备的旋转按钮的旋转角度,开关按钮的闭合状态等。控制设备在检测到预设触发操作时,根据所述第二类数据帧生成控制信号;其中,所述第二类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的。然后控制设备可以基于所述匹配结果,将所述控制信号发送至与所述控制设备匹配的受控设备。与所述控制设备匹配的受控设备可以是一个,也可以是多个,本公开不作具体限定。本公开通过采用上述方式,能够提高信号传输的稳定性和灵活性等。In an embodiment of the present disclosure, a preset trigger operation may refer to a control operation for a control device, such as adjusting the rotation angle of a rotary button of a control device, the closed state of a switch button, etc. When the control device detects a preset trigger operation, it generates a control signal according to the second type of data frame; wherein the second type of data frame is generated according to the device type of the controlled device and the type of command used to control the controlled device. The control device may then send the control signal to a controlled device that matches the control device based on the matching result. The controlled device that matches the control device may be one or more, which is not specifically limited in the present disclosure. By adopting the above-mentioned method, the present disclosure can improve the stability and flexibility of signal transmission, etc.
在一些实施例中,所述将所述控制信号发送至所述受控设备,包括:In some embodiments, sending the control signal to the controlled device includes:
通过与所述受控设备之间的通信连接,将所述控制信号发送至所述受控设备;或者sending the control signal to the controlled device through a communication connection with the controlled device; or
通过所述智能控制中心将所述控制信号转发至所述受控设备。The control signal is forwarded to the controlled device through the intelligent control center.
本公开实施例中,控制设备将所述控制信号发送至与所述控制设备匹配的受控设备的方是多种多样,例如:控制设备可以通过与所述受控设备之间的通信连接,直接将所述控制信号发送至所述受控设备,或者控制设备可以通过所述智能控制中心将所述控制信号转发至所述受控设备,所述智能控制中心在信号传输的过程中可以起到转发、滤波或记录等作用。本公开通过采用上述方式,能够增加信号传输的多样性,提高控制信号发送的稳定性等。In the embodiments of the present disclosure, the control device can send the control signal to the controlled device matched with the control device in various ways, for example: the control device can directly send the control signal to the controlled device through the communication connection between the control device and the controlled device, or the control device can forward the control signal to the controlled device through the intelligent control center, and the intelligent control center can play the role of forwarding, filtering or recording in the process of signal transmission. By adopting the above-mentioned methods, the present disclosure can increase the diversity of signal transmission and improve the stability of control signal transmission.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
根据所述智能控制中心和所述受控设备的设备配置顺序,确定所述控制信号的发送方向;Determining a sending direction of the control signal according to a device configuration sequence of the intelligent control center and the controlled device;
所述发送方向包括:从所述智能控制中心至所述受控设备的方向,或者从所述受控设备至所述智能控制中心的方向。The sending direction includes: a direction from the intelligent control center to the controlled device, or a direction from the controlled device to the intelligent control center.
本公开实施例中,由于受控设备、控制设备以及智能控制中心之间,都能进行通信,那么可以预先确定所述控制信号的发送方向。例如:控制设备可以根据所述受控设备和所述智能控制中心的设备配置顺序,确定所述控制信号的发送方向;所述发送方向包括:从所述智能控制中心至所述受控设备的方向,或者从所述受控设备至所述智能控制中心的方向。例如:控制设备先与智能控制中心进行配置,建立通信连接,然后再与受控设备进行匹配,建立通信连接,那么所述发送方向为从所述智能控制中心至所述受控设备的方向。本公开通过采用上述方式,能够准确有效地确定出发送方向等,避免出现逻辑紊乱的情况。In the embodiments of the present disclosure, since the controlled device, the control device and the intelligent control center can all communicate with each other, the sending direction of the control signal can be determined in advance. For example: the control device can determine the sending direction of the control signal according to the device configuration order of the controlled device and the intelligent control center; the sending direction includes: the direction from the intelligent control center to the controlled device, or the direction from the controlled device to the intelligent control center. For example: the control device is first configured with the intelligent control center to establish a communication connection, and then matched with the controlled device to establish a communication connection, then the sending direction is the direction from the intelligent control center to the controlled device. By adopting the above method, the present disclosure can accurately and effectively determine the sending direction, etc., to avoid logical disorder.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
对所述第二类数据帧进行字节序转换处理,得到预设模式的第二类数据帧;其中,所述预设模式包括:预设大端模式和预设小端模式;Performing byte order conversion processing on the second type of data frames to obtain the second type of data frames in a preset mode; wherein the preset mode includes: a preset big endian mode and a preset little endian mode;
根据预设模式的第二类数据帧,生成所述控制信号。The control signal is generated according to the second type of data frame in a preset mode.
本公开实施例中,大端模式可以是指数据的高字节保存在内存的低地址中,而数据的低字节保存在内存的高地址中。小端模式可以是指数据的高字节保存在内存的高地址中,而数据的低字节保存在内存的低地址中。控制设备在生成控制信号的过程中,可以进行字节序转换处理处理。例如:控制设备通过将无序的第二类数据帧设置为大端模式后,再根据大端模式的第二类数据帧,来生成所述控制信号等。本公开通过采用上述方式,能够提高信号传输的效率,减少受控设备解析数据帧的时间等。In the embodiments of the present disclosure, the big-endian mode may refer to that the high byte of the data is stored in the low address of the memory, while the low byte of the data is stored in the high address of the memory. The little-endian mode may refer to that the high byte of the data is stored in the high address of the memory, while the low byte of the data is stored in the low address of the memory. The control device may perform byte order conversion processing in the process of generating the control signal. For example: the control device generates the control signal according to the second type of data frame in the big-endian mode after setting the disordered second type data frame to the big-endian mode. By adopting the above-mentioned method, the present disclosure can improve the efficiency of signal transmission and reduce the time for the controlled device to parse the data frame.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
接收所述受控设备基于所控制信号返回的响应信号;Receiving a response signal returned by the controlled device based on the controlled signal;
其中,所述响应信号包括所述第三类数据帧;所述第三类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的。The response signal includes the third type of data frame; the third type of data frame is generated according to the device type of the controlled device and the type of command used to control the controlled device.
本公开实施例中,控制设备向受控设备发送控制信号之后,可以接收所述受控设备基于所控制信号返回的响应信号,其中,所述响应信号包括所述第三类数据帧;所述第三类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的,用于反馈受控设备的工作状态等。本公开通过采用上述方式,能够及时确定受控设备自身的工作状态等信息,提高系统的稳定性等。In the embodiment of the present disclosure, after the control device sends a control signal to the controlled device, it can receive a response signal returned by the controlled device based on the controlled signal, wherein the response signal includes the third type of data frame; the third type of data frame is generated according to the device type of the controlled device and the type of the command used to control the controlled device, and is used to feedback the working status of the controlled device, etc. The present disclosure adopts the above method to timely determine the working status of the controlled device itself and improve the stability of the system, etc.
在一些实施例中,所述接收所述受控设备基于所控制信号返回的响应信号,包括:In some embodiments, the receiving a response signal returned by the controlled device based on the controlled signal includes:
通过与所述受控设备之间的通信连接,接收所述响应信号;或者Receiving the response signal through a communication connection with the controlled device; or
通过所述智能控制中心接收所述响应信号。The response signal is received by the intelligent control center.
本公开实施例中,控制设备接收受控设备返回的响应信号的方式多种多样,例如:控制设备可以通过与所述受控设备之间的通信连接,直接接收所述响应信号,或者可以通过所述智能控制中心接收所述响应信号,所述智能控制中心在信号传输的过程中可以起到转发、滤波或记录等作用。本公开通过采用上述方式,能够增加接收响应信号方式的多样性,提高系统的稳定性等。In the embodiments of the present disclosure, the control device may receive the response signal returned by the controlled device in various ways, for example, the control device may directly receive the response signal through the communication connection with the controlled device, or may receive the response signal through the intelligent control center, and the intelligent control center may forward, filter or record the signal during the signal transmission process. By adopting the above-mentioned methods, the present disclosure can increase the diversity of the response signal receiving methods and improve the stability of the system.
在一些实施例中,所述方法还包括:In some embodiments, the method further comprises:
在所述控制设备的电量余量小于预设电量阈值时,停止接收所述响应信号。When the remaining power of the control device is less than a preset power threshold, stop receiving the response signal.
本公开实施例中,控制设备可以通过检测电路等方式来检测自身存储的当前电量余量,然后在确定自身的电量余量小于预设电量阈值时,停止接收所述响应信号。例如:控制设备确定自身的电量余量为10%,小于预设电量阈值(例如但不限于30%),那么控制设备可以停止接收、解析所述响应信号等。本公开通过采用上述方式,能够节约功耗,提高控制受控设备和受控设备的待机时长等。In the embodiment of the present disclosure, the control device can detect the current remaining power stored in itself by means of a detection circuit, etc., and then stop receiving the response signal when it is determined that the remaining power of itself is less than a preset power threshold. For example: the control device determines that the remaining power of itself is 10%, which is less than a preset power threshold (for example but not limited to 30%), then the control device can stop receiving and parsing the response signal, etc. By adopting the above method, the present disclosure can save power consumption, improve the standby time of the controlled device and the controlled device, etc.
在一些实施例中,所述控制设备为自发电供电设备,所述方法还包括:In some embodiments, the control device is a self-generating power supply device, and the method further includes:
通过预设触发事件产生电能,并通过所产生的电能为所述控制设备进行信号的收发提供能量。Electric energy is generated by a preset trigger event, and the generated electric energy provides energy for the control device to send and receive signals.
本公开实施例中,所述控制设备为自发电供电设备,例如:通过动能、光能、温差能、震动能或者风能等方式来自发电供电的控制设备。预设触发事件可以包括用户按动控制设备、环境光照强度大于预设亮度阈值等事件,控制设备可以通过预设触发事件产生电能,并通过所产生的电能为所述控制设备进行信号的收发提供能量等。本公开通过采用上述方式,能够节约能量等。In the embodiment of the present disclosure, the control device is a self-generated power supply device, for example: a control device that generates power by kinetic energy, light energy, temperature difference energy, vibration energy or wind energy. The preset trigger event may include an event such as a user pressing the control device, the ambient light intensity being greater than a preset brightness threshold, etc. The control device may generate electrical energy through the preset trigger event, and the generated electrical energy may provide energy for the control device to send and receive signals, etc. The present disclosure can save energy, etc. by adopting the above method.
本公开实施例中,能够向智能控制中心发送所述控制设备的状态信息,以使得所述智能控制中心根据所述控制设备的状态信息和受控设备的状态信息,对所述控制设备和所述受控设备进行匹配;接收来自所述智能控制中心的匹配结果;其中,所述匹配结果用于建立所述控制设备与所述受控设备之间的通信连接。本公开受控设备通过发送自身的状态信息,来与控制设备进行匹配,能够提高控制设备与受控设备之间的匹配效率和匹配准确率等。In the disclosed embodiment, the state information of the control device can be sent to the intelligent control center, so that the intelligent control center can match the control device and the controlled device according to the state information of the control device and the state information of the controlled device; and receive the matching result from the intelligent control center; wherein the matching result is used to establish a communication connection between the control device and the controlled device. The disclosed controlled device matches with the control device by sending its own state information, which can improve the matching efficiency and matching accuracy between the control device and the controlled device.
本公开实施例中,首先用户可以根据自身需求对控制设备进行预设方式(例如但不限于开关闭合操作、旋转开关旋转操作等)的操作,然后控制设备可以生成第一类数据帧,所述第一类数据帧可以携带所述控制设备的源标识为互联网协议地址192.168.101.1、所述控制设备的设备类型为单开自电开关、控制参数为闭合状态等。然后控制设备将所述第一类数据帧通过无线传输方式(例如但不限于射频433协议方式)发送给智能控制中心,然后智能控制中心可以根据所述源标识,确定与所述控制设备对应的受控设备。例如:智能控制中心可以广播携带源标识的连接请求,然后接收所有受控设备响应于连接请求的答复消息,所述答复消息中可以包括同意连接或者拒绝连接的信息,则可以确定携带同意连接信息的设备为对应的受控设备等。In the disclosed embodiment, first, the user can operate the control device in a preset manner (such as but not limited to switch closing operation, rotary switch rotation operation, etc.) according to their own needs, and then the control device can generate a first type of data frame, which can carry the source identifier of the control device as the Internet Protocol address 192.168.101.1, the device type of the control device as a single-opening self-power switch, and the control parameter as a closed state. Then the control device sends the first type of data frame to the intelligent control center through a wireless transmission method (such as but not limited to a radio frequency 433 protocol method), and then the intelligent control center can determine the controlled device corresponding to the control device according to the source identifier. For example: the intelligent control center can broadcast a connection request carrying a source identifier, and then receive a reply message from all controlled devices in response to the connection request, and the reply message may include information on agreeing to connect or rejecting the connection, so the device carrying the information on agreeing to connect can be determined as the corresponding controlled device, etc.
智能控制中心可以通过解析来自受控设备的答复消息,得到受控设备对应的标识、设备类型、运行状态等信息,例如:确定有一个受控设备,受控设备的设备类型为2个通道的墙壁开关等。智能控制中心可以根据所述受控设备的设备类型和所述控制参数,确定用于控制所述受控设备的命令的类型。智能控制中心可以预先设置控制设备的设备类型和控制参数与受控设备的命令的类型之间的对应关系,例如:设备类型为墙壁开关以及控制参数为预设时长内单次点击,对应设备控制命令;设备类型为可调光设备以及控制参数为预设时长内多次点击,对应设备管理命令等,本公开对于确定用于控制所述受控设备的命令的类型的方式不作具体限定。The intelligent control center can obtain the identification, device type, operating status and other information corresponding to the controlled device by parsing the reply message from the controlled device, for example: it is determined that there is a controlled device, and the device type of the controlled device is a 2-channel wall switch, etc. The intelligent control center can determine the type of command used to control the controlled device based on the device type of the controlled device and the control parameter. The intelligent control center can pre-set the correspondence between the device type and control parameter of the control device and the type of command of the controlled device, for example: the device type is a wall switch and the control parameter is a single click within a preset time length, corresponding to the device control command; the device type is a dimmable device and the control parameter is multiple clicks within a preset time length, corresponding to the device management command, etc. The present disclosure does not specifically limit the method for determining the type of command used to control the controlled device.
智能控制中心可以根据所述受控设备的设备类型和所述命令的类型,生成第二类数据帧,再将所述第二类数据帧发送给所述受控设备。例如:智能管理设备确定所述受控设备的设备类型为2个通道的墙壁开关,所述命令的类型为设备控制命令等,然后生成携带2个通道的墙壁开关(例如但不限于在第二类数据帧中第10位使用对应标签b代替等)和设备控制命令(例如但不限于在第二类数据帧中第11位使用对应标签A代替等)等信息的第二类数据帧,然后通过无线传输方式(例如但不限于射频433协议方式)发送给受控设备,以使得受控设备执行对应命令。The intelligent control center can generate a second type of data frame according to the device type of the controlled device and the type of the command, and then send the second type of data frame to the controlled device. For example: the intelligent management device determines that the device type of the controlled device is a 2-channel wall switch, and the type of the command is a device control command, etc., and then generates a second type of data frame carrying information such as a 2-channel wall switch (for example, but not limited to, the 10th bit in the second type of data frame is replaced by the corresponding label b, etc.) and a device control command (for example, but not limited to, the 11th bit in the second type of data frame is replaced by the corresponding label A, etc.), and then sends it to the controlled device via a wireless transmission method (for example, but not limited to the radio frequency 433 protocol method), so that the controlled device executes the corresponding command.
在一种可能的实施例中,本公开可以应用于无线数据传输场景,例如:物联网设备控制系统等。无线数据传输场景中可以包括发射装置(控制设备)和接收装置(受控设备)等,发射装置传输的发射信号可以包括前导码、同步字、数据报文(数据帧)、CRC校验信息等,其中数据帧可以包含发射装置的地址信息(源标识)、发射装置中的传感器获取的信息(控制参数)等。接收设备可以接收数据报文,并解析数据报文,执行相应的功能等。其中发射装置具备节约能量的特性,距离能量比值在300MHz-990MHz无线传输频率下大于0.2米/uJ,距离能量比值在2GHz-6GHz时的无线传输频率下大于0.1米/uJ等。其中发射能量指完整发射至少一个数据帧所用的供电系统的能量,可以是电池也可以是储能电容,距离可以是指空旷场地,发射装置和接收装置均离地1米高,测试10次无线发射,丢包小于等于1次的最远距离。In a possible embodiment, the present disclosure can be applied to wireless data transmission scenarios, such as: IoT device control systems, etc. The wireless data transmission scenario may include a transmitter (control device) and a receiving device (controlled device), etc. The transmission signal transmitted by the transmitter may include a preamble, a synchronization word, a data message (data frame), CRC check information, etc., wherein the data frame may contain the address information (source identifier) of the transmitter, the information (control parameters) obtained by the sensor in the transmitter, etc. The receiving device may receive the data message, parse the data message, perform corresponding functions, etc. The transmitter has the characteristic of saving energy, the distance energy ratio is greater than 0.2 meters/uJ at a wireless transmission frequency of 300MHz-990MHz, and the distance energy ratio is greater than 0.1 meters/uJ at a wireless transmission frequency of 2GHz-6GHz. The transmission energy refers to the energy of the power supply system used to completely transmit at least one data frame, which can be a battery or a storage capacitor, and the distance can refer to an open field, the transmitter and the receiving device are both 1 meter above the ground, and the wireless transmission is tested 10 times, and the longest distance with a packet loss of less than or equal to 1 time.
在一种可能的实施例中,所述无线数据传输场景中还可以包含智能控制中心,所述智能控制中心与接收装置双向通信,接收装置可以定时或者上电给接收装置或者智能控制中心发送数据的功能等,然后发射装置在发射完数据后,可以接收接收装置发送的数据,用于确认发射成功。发射装置还可以具备自发电供电,无电池或者常供电能源等特征,发射装置中每次按压发电的能量既可以用来发射信号,也可以用于接收返回确认成功的无线信号等。In a possible embodiment, the wireless data transmission scenario may also include an intelligent control center, which communicates bidirectionally with the receiving device, and the receiving device may send data to the receiving device or the intelligent control center at a scheduled time or when powered on, and then the transmitting device may receive the data sent by the receiving device after transmitting the data to confirm the success of the transmission. The transmitting device may also have the characteristics of self-powered power supply, no battery or constant power supply energy, and the energy generated by each press of the transmitting device can be used to transmit signals and to receive wireless signals returned to confirm the success.
如图4A所示,可以表示无线数据传输的传输示意图。发射装置为了省电,可以仅发射信号,不进行额外的接收工作,确保发射装置401处于极其省电的状态下。发射装置401可以是指自发电开关、电池开关、传感器等装置,接收装置402可以是指墙壁开关、单路执行器、多路执行器、电动窗帘、灯具等装置。接收装置402有多种类型,并且接收装置402与智能控制中心403之间可以双向通信,互相获取数据以及发送控制命令等。发射装置401、接收装置402、智能控制中心403之间均可以相互通信,整个系统的信息流有多种选择。例如:可以选择发射装置401到接收装置402,接收装置402到智能控制中心403,也可以选择发射装置401到智能控制中心403,智能控制中心403到接收装置402等。具体的信息流走向,可以由预设的协议设定,也可以由用户配置,模拟用户的配置顺序来执行信息流的顺序。例如:用户如果先配置智能控制中心403,再配置接收装置402,则信息流的方向为由发射装置401先到智能控制中心403,再到接收装置402等,反之亦然。As shown in FIG4A , a transmission schematic diagram of wireless data transmission can be represented. In order to save power, the transmitting device can only transmit signals without performing additional receiving work, ensuring that the transmitting device 401 is in an extremely power-saving state. The transmitting device 401 can refer to a self-generating switch, a battery switch, a sensor and other devices, and the receiving device 402 can refer to a wall switch, a single-channel actuator, a multi-channel actuator, an electric curtain, a lamp and other devices. There are many types of receiving devices 402, and the receiving device 402 and the intelligent control center 403 can communicate bidirectionally, obtain data from each other, and send control commands, etc. The transmitting device 401, the receiving device 402, and the intelligent control center 403 can all communicate with each other, and there are many options for the information flow of the entire system. For example: you can choose to transmit the transmitting device 401 to the receiving device 402, the receiving device 402 to the intelligent control center 403, or you can choose to transmit the transmitting device 401 to the intelligent control center 403, the intelligent control center 403 to the receiving device 402, etc. The specific direction of the information flow can be set by a preset protocol, or it can be configured by the user, and the order of the information flow is executed by simulating the configuration order of the user. For example, if the user configures the intelligent control center 403 first and then configures the receiving device 402, the direction of the information flow is from the transmitting device 401 to the intelligent control center 403 first, then to the receiving device 402, and vice versa.
在一种可能的实施例中,所述无线数据传输方式中,对应协议物理层参数可以自定义设置。例如:中心频率可以为300MHz—990MHz、2GHz—6GHz,发送功率可以为-10dBm—50dBm,接收灵敏度可以为任意,调制方式可以为高斯频移键控(Gauss Frequency ShiftKeying,GFSK)、移幅键控(Amplitude Shift Keying,ASK)、频移键控(Frequency Shiftkeying,FSK)等,数据传输率(空中速率)可以为1kbps—2Mbps。In a possible embodiment, in the wireless data transmission mode, the corresponding protocol physical layer parameters can be customized. For example, the center frequency can be 300MHz-990MHz, 2GHz-6GHz, the transmission power can be -10dBm-50dBm, the receiving sensitivity can be arbitrary, the modulation mode can be Gaussian Frequency ShiftKeying (GFSK), Amplitude Shift Keying (ASK), Frequency ShiftKeying (FSK), etc., and the data transmission rate (air rate) can be 1kbps-2Mbps.
如图4B所示,可以表示报文数据结构示意图。物理层可以由前导码(例如但不限于为4字节长度)、同步字(例如但不限于为4字节长度)和数据链路层帧(例如但不限于为自定义X字节长度)等部分组成。对于链路层,数据链路层帧可以包括数据长度(例如但不限于为1字节长度)、报文(例如但不限于为自定义Y字节长度)和循环冗余校验(CRC校验)(例如但不限于为2字节长度)等信息。对于网络层,报文可以包括帧控制域(FRAME CTRL)(例如但不限于为1字节长度)、源标识(SOURCE ID)(例如但不限于为4字节长度)、命令的类型(TYPE)(例如但不限于为1字节长度)、命令内容(DATA)(例如但不限于为自定义Z字节长度)等。As shown in FIG. 4B , a schematic diagram of a message data structure can be represented. The physical layer can be composed of a preamble (for example, but not limited to, a length of 4 bytes), a synchronization word (for example, but not limited to, a length of 4 bytes) and a data link layer frame (for example, but not limited to, a custom X-byte length). For the link layer, the data link layer frame may include information such as data length (for example, but not limited to, a length of 1 byte), a message (for example, but not limited to, a custom Y-byte length) and a cyclic redundancy check (CRC check) (for example, but not limited to, a length of 2 bytes). For the network layer, the message may include a frame control field (FRAME CTRL) (for example, but not limited to, a length of 1 byte), a source identifier (SOURCE ID) (for example, but not limited to, a length of 4 bytes), a command type (TYPE) (for example, but not limited to, a length of 1 byte), a command content (DATA) (for example, but not limited to, a custom Z-byte length), and the like.
发射装置或智能控制中心或接收装置发射报文的命令内容的数据长度可以变化,根据不同的报文命令类型会有不同的数据长度。例如:对于发射装置,DATA的长度可以为1Byte。发射装置发射数据是需要一定触发条件的,触发条件可以为发射装置上电,也可以定时发射,或者发射装置中传感器数据发生变化。发射装置可以根据传感器采集的信号,装载DATA数据的内容,如果传感器数据为空,则不装载传感器数据。然后再装载TYPE数据,TYPE数据定义了发射装置的类型,例如:可以定义发射装置为开关,还可以定义发射装置为开关的类型。例如:定义了发射装置的开关为翻转型,每次按下开关,接收装置收到翻转型的报文后,均执行一次翻转操作。也可以定义发射装置开关的类型为固定型,则接收装置每次收到报文后,均会执行固定的开或者关的操作。The data length of the command content of the message transmitted by the transmitter, intelligent control center or receiving device can be changed, and there will be different data lengths according to different message command types. For example, for the transmitter, the length of DATA can be 1Byte. The transmitter needs certain trigger conditions to transmit data. The trigger condition can be that the transmitter is powered on, it can also be timed transmission, or the sensor data in the transmitter changes. The transmitter can load the content of DATA data according to the signal collected by the sensor. If the sensor data is empty, the sensor data is not loaded. Then load the TYPE data. The TYPE data defines the type of the transmitter. For example, the transmitter can be defined as a switch, and the transmitter can also be defined as the type of switch. For example, the switch of the transmitter is defined as a flip type. Every time the switch is pressed, the receiving device performs a flip operation after receiving a flip type message. The type of the transmitter switch can also be defined as a fixed type. Then the receiving device will perform a fixed on or off operation every time it receives a message.
还可以定义发射装置其他的类型,或者某个开关的种类型号等,接收装置根据定义的类型,可以执行相对应的动作。FRAME CTRL定义了发射信号的类型,例如:为发射装置发出的信号,或者设备控制命令,或者设备状态报告命令,或者设备管理命令,或者设备管理命令应答等。SOURCE ID定义了发射信号的匹配信息,只有发射装置的源标识和接收装置的目标标识相匹配,接收装置才会执行相应的功能。该信息也是设备之间配置建立关系所要设置的信息。数据长度可以为1Byte,定义了发送报文的整体长度,为后续程序解析报文提供数据长度信息,CRC校验为2Bytes,也可以为1Bytes或者其他位数,当CRC校验正确时,认为该报文为有效报文,如果校验不正确,则为无效报文等。You can also define other types of transmitters, or the type and model of a switch, etc. The receiving device can perform corresponding actions according to the defined type. FRAME CTRL defines the type of transmitted signal, such as: a signal sent by the transmitter, or a device control command, or a device status report command, or a device management command, or a device management command response, etc. SOURCE ID defines the matching information of the transmitted signal. Only when the source identifier of the transmitter matches the target identifier of the receiving device, the receiving device will perform the corresponding function. This information is also the information to be set for the configuration establishment relationship between devices. The data length can be 1 Byte, which defines the overall length of the sent message and provides data length information for subsequent program parsing of the message. The CRC check is 2 Bytes, or it can be 1 Byte or other digits. When the CRC check is correct, the message is considered to be a valid message. If the check is incorrect, it is an invalid message, etc.
在一种可能的实施例中,数据帧的帧控制域中预设位可以是指低5位b0-b4,第一类数据帧可以包括无源无线传感器(开关)命令,第二类数据帧可以包括设备控制命令和设备管理命令,响应数据帧可以包括设备状态报告和设备管理命令应答等。不同类型的命令对应的预设位所携带数据的数据类型可以分别为0、0x1F(0b111111)、0x1E(0b111110)、0x1D(0b111101)和0x1C(0b111100)。帧控制域中b5和b6位可以表示对应的转发次数(RC),b7位可以都设置为0。无源无线传感器(开关)命令对应的负载部分中控制设备的表示形式与对应的设备类型可以为,0x01:翻滚型开关(目前的单开、双开)、0x02:翻转型开关(目前的四开,圆形开关)、0x03:K7-HT亨特定制类型、0x04:K4R-HT亨特定制类型、0x05:K4R-W1、0x06:K4R-W2、0x07:K4R-W3、0x03-0x80:预留后续类型等。其中KR、W、HT等表示不同类型型号,不作具体限定,可以自定义设置。In a possible embodiment, the preset bit in the frame control field of the data frame may refer to the lower 5 bits b0-b4, the first type of data frame may include a passive wireless sensor (switch) command, the second type of data frame may include a device control command and a device management command, and the response data frame may include a device status report and a device management command response, etc. The data types of the data carried by the preset bits corresponding to different types of commands may be 0, 0x1F (0b111111), 0x1E (0b111110), 0x1D (0b111101) and 0x1C (0b111100), respectively. The b5 and b6 bits in the frame control field may represent the corresponding forwarding times (RC), and the b7 bit may be set to 0. The representation form of the control device in the load part corresponding to the passive wireless sensor (switch) command and the corresponding device type can be, 0x01: tumble switch (currently single-open, double-open), 0x02: flip switch (currently four-open, round switch), 0x03: K7-HT Hunter customized type, 0x04: K4R-HT Hunter customized type, 0x05: K4R-W1, 0x06: K4R-W2, 0x07: K4R-W3, 0x03-0x80: reserved for subsequent types, etc. KR, W, HT, etc. represent different types and models, without specific restrictions, and can be customized.
设备控制命令对应的负载部分中受控设备的设备类型、命令的类型和命令内容可以表示为,0x81(单路接收器)、0x01(基本状态查询)、空,0x81(单路接收器)、0x02(基本开关控制)、转换(switch),0x91/92/93(具有手势感应功能的1/2/3路墙壁开关)、0x01(基本状态查询)、空,0x91/92/93(具有手势感应功能的1/2/3路墙壁开关)、0x02(基本开关控制)、switch,0x9D/9E/9F(不具有手势感应功能的单火线1/2/3路墙壁开关)、0x01(基本状态查询)、空,0x9D/9E/9F(不具有手势感应功能的单火线1/2/3路墙壁开关)、0x02(基本开关控制)、switch,0xA1(可调光设备)、0x03(亮度控制)、level,0xA1(可调光设备)、0x01(基本状态查询)、空,0xA0(G4门铃设备)、0x04(响铃控制)、(Byte 1:voice number,Byte 2:voice volum),0xA2(窗帘电机)、0x01(基本状态查询)、空,0xA2(窗帘电机)、0x02(基本控制)、(第一字节可以表示传输的通道编号,最多可以有8个通道、2-3字节可以表示开关停等操作,(00:关,01:开,02:停),第3字节的最低2位可以表示为通道1等),0xA2(窗帘电机)、0x03(行程控制)、Byte 1:channel(最多8通道),Byte 2-Byte 9:(行程值0-100,255无行程),Byte 9为通道1等。The device type of the controlled device in the load part corresponding to the device control command, the type of command and the command content can be expressed as, 0x81 (single-way receiver), 0x01 (basic status query), empty, 0x81 (single-way receiver), 0x02 (basic switch control), switch, 0x91/92/93 (1/2/3-way wall switch with gesture sensing function), 0x01 (basic status query), empty, 0x91/92/93 (1/2/3-way wall switch with gesture sensing function), 0x02 (basic switch control), sw itch, 0x9D/9E/9F (single live wire 1/2/3-way wall switch without gesture sensing function), 0x01 (basic status query), empty, 0x9D/9E/9F (single live wire 1/2/3-way wall switch without gesture sensing function), 0x02 (basic switch control), switch, 0xA1 (dimmable device), 0x03 (brightness control), level, 0xA1 (dimmable device), 0x01 (basic status query), empty, 0xA0 (G4 doorbell device), 0x04 (ring control), (Byte 1: voice number, Byte 2: voice volume), 0xA2 (curtain motor), 0x01 (basic status query), empty, 0xA2 (curtain motor), 0x02 (basic control), (the first byte can represent the channel number of the transmission, there can be up to 8 channels, 2-3 bytes can represent switch stop and other operations, (00: off, 01: on, 02: stop), the lowest 2 bits of the 3rd byte can be represented as channel 1, etc.), 0xA2 (curtain motor), 0x03 (stroke control), Byte 1: channel (up to 8 channels), Byte 2-Byte 9: (stroke value 0-100, 255 no stroke), Byte 9 is channel 1, etc.
设备状态报告对应的负载部分中受控设备的设备类型、(答复)命令的类型(Report Type)和命令内容(Report Data)可以表示为,0x81-0x88:普通接收器、0x01/0x02/0x81/0x82/0x83、(Byte 1:channel,Byte 2:switch),0x91-0x93:墙壁开关(具有手势感应功能)、0x01/0x02/0x81/0x82/0x83/0x86、Byte 1:channel,Byte 2:switch,Byte 3~4:光感值,0x9A-0x9C:墙壁开关(不带感应)、0x01/0x02/0x81/0x82/0x83、Byte 1:channel,Byte 3:switch,0x9D-0x9F:单火线墙壁开关(不具有手势感应功能)、0x01/0x02/0x81/0x82/0x83、Byte 1:channel,Byte 3:switch,0xA1:可调光设备、0x01/0x02/0x81/0x82/0x83/0x85、Byte 1:channel=0x01,Byte 2:level,0xA0:G4门铃设备、0x04/0x83、Byte 1:voice number,Byte 2:voice volum,0xA2(窗帘电机)、0x01/0x02/0x81/0x85/0x86、Byte 1:channel(最多8通道),Byte 2-Byte9:(行程值0-100,255无行程)Byte 9为通道1。本公开实施例中,0x01-7f可以表示返回收到的命令类型(Cmd type),0x81-8f可以表示主动上传的事件类型(event type)等。The device type, (reply) command type (Report Type) and command content (Report Data) of the controlled device in the load part corresponding to the device status report can be expressed as follows: 0x81-0x88: ordinary receiver, 0x01/0x02/0x81/0x82/0x83, (Byte 1: channel, Byte 2: switch), 0x91-0x93: wall switch (with gesture sensing function), 0x01/0x02/0x81/0x82/0x83/0x86, Byte 1: channel, Byte 2: switch, Byte 3~4: light sensitivity value, 0x9A-0x9C: wall switch (without sensing), 0x01/0x02/0x81/0x82/0x83, Byte 1: channel, Byte 3: switch, 0x9D-0x9F: single live wire wall switch (without gesture sensing function), 0x01/0x02/0x81/0x82/0x83, Byte 1: channel, Byte 3: switch, 0xA1: dimmable device, 0x01/0x02/0x81/0x82/0x83/0x85, Byte 1: channel = 0x01, Byte 2: level, 0xA0: G4 doorbell device, 0x04/0x83, Byte 1: voice number, Byte 2: voice volume, 0xA2 (curtain motor), 0x01/0x02/0x81/0x85/0x86, Byte 1: channel (up to 8 channels), Byte 2-Byte9: (travel value 0-100, 255 no travel) Byte 9 is channel 1. In the disclosed embodiment, 0x01-7f may indicate the command type (Cmd type) received by return, 0x81-8f may indicate the event type (event type) actively uploaded, and the like.
设备管理命令对应的负载部分中受控设备的设备类型、(管理)命令的类型(Management Cmd Type)和命令内容(Cmd Data)可以表示为,0x91-93、0x81:配置墙壁开关的手势感应功能和指示灯、Byte 1手势感应控制:bit<6>手势感应全关,bit<5~3>开关通道,bit<2~0>通道手势感应开灯使能Byte 2感应距离:0~64Byte 3指示灯开启:0(不开启)1(开启),0x91-93、0x82:读取墙壁开关的手势感应功能和指示灯配置、空,公有命令,设备的通用管理命令的有限枚举。私有命令可以表示针对某类设备特有的。本公开实施例中,对于公有命令,仅取决于命令类型;对于私有命令可以取决于受控设备的设备类型和命令类型等。The device type of the controlled device in the load part corresponding to the device management command, the type of (management) command (Management Cmd Type) and the command content (Cmd Data) can be expressed as, 0x91-93, 0x81: Configure the gesture sensing function and indicator light of the wall switch, Byte 1 gesture sensing control: bit<6> gesture sensing all off, bit<5~3> switch channel, bit<2~0> channel gesture sensing light enable Byte 2 sensing distance: 0~64Byte 3 indicator light on: 0 (not on) 1 (on), 0x91-93, 0x82: read the gesture sensing function and indicator light configuration of the wall switch, empty, public command, limited enumeration of general management commands for devices. Private commands can represent commands specific to a certain type of device. In the disclosed embodiment, for public commands, it only depends on the command type; for private commands, it can depend on the device type and command type of the controlled device, etc.
设备管理命令应答对应的负载部分中受控设备的设备类型、命令的类型(CmdType)和命令内容(CmdData)可以表示为,0x91-93、0x81:配置墙壁开关的手势感应功能和指示灯、0:OK,1-255:ERR CODE,0x91-93、0x82:读取墙壁开关的手势感应功能和指示灯配置、Byte 1手势感应控制:bit<6>手势感应全关,bit<5~3>开关通道,bit<2~0>通道手势感应开灯使Byte 2感应距离:0~64Byte 3指示灯开启:0(不开启)/1(开启)等。The device type of the controlled device in the load part corresponding to the device management command response, the type of command (CmdType) and the command content (CmdData) can be expressed as follows: 0x91-93, 0x81: configure the gesture sensing function and indicator light of the wall switch, 0: OK, 1-255: ERR CODE, 0x91-93, 0x82: read the gesture sensing function and indicator light configuration of the wall switch, Byte 1 gesture sensing control: bit<6> gesture sensing all off, bit<5~3> switch channel, bit<2~0> channel gesture sensing light on Byte 2 sensing distance: 0~64 Byte 3 indicator light on: 0 (not on)/1 (on), etc.
在一种可能的实施例中,控制设备可以包括K2四开自电开关、K3圆形三键开关、G2无源发射器、K4R方形三键开关等类型。受控设备可以包括1个通道的接收器、8个通道的接收器、1个通道的墙壁开关(具有手势感应功能)、3个通道的墙壁开关(具有手势感应功能)、3个通道的墙壁开关(不具有手势感应功能)等。In a possible embodiment, the control device may include a K2 four-way self-power switch, a K3 round three-button switch, a G2 passive transmitter, a K4R square three-button switch, etc. The controlled device may include a 1-channel receiver, an 8-channel receiver, a 1-channel wall switch (with gesture sensing function), a 3-channel wall switch (with gesture sensing function), a 3-channel wall switch (without gesture sensing function), etc.
在一种可能的实施例中,链路层数据格式还可以改变CRC校验码的校验方式,把CRC校验码插入链路层数据中,例如将CRC校验码插入到数据报文当中,使得数据报文前几个字节计算一次CRC,然后再将数据结尾再计算一次CRC。网络层数据也可以拆散,并且SOURCE ID的位数也可以增加或者减少,例如减少到22位。整合后的链路层+网络层的数据格式可以为:报文1(M字节)、CRC校验(2字节)、报文2(N字节)、CRC校验(1字节)等。In a possible embodiment, the link layer data format can also change the verification method of the CRC check code, insert the CRC check code into the link layer data, for example, insert the CRC check code into the data message, so that the CRC is calculated once for the first few bytes of the data message, and then the CRC is calculated again at the end of the data. The network layer data can also be disassembled, and the number of bits of the SOURCE ID can also be increased or decreased, for example, reduced to 22 bits. The data format of the integrated link layer + network layer can be: message 1 (M bytes), CRC check (2 bytes), message 2 (N bytes), CRC check (1 byte), etc.
在一种可能的实施例中,可以设置FRAME CTRL为0x00,TYPE为0x55,代表了命令类型为发射器,发射器的类型为开关,该开关可以包含六个按键,分别对应的数据为DATA的第0位到第5位,当按键触发时,DATA对应的位为1,未触发时,DATA对应的位为0。当按键全部被触发时,DATA数据为0x3F。接收器接收到信号后,首先匹配是否为受控开关,然后根据按键的触发状态来控制接收执行器的状态。In a possible embodiment, FRAME CTRL can be set to 0x00 and TYPE to 0x55, which means that the command type is a transmitter, and the transmitter type is a switch. The switch can include six buttons, and the corresponding data is the 0th to 5th bit of DATA. When the button is triggered, the corresponding bit of DATA is 1, and when it is not triggered, the corresponding bit of DATA is 0. When all the buttons are triggered, the DATA data is 0x3F. After receiving the signal, the receiver first matches whether it is a controlled switch, and then controls the state of the receiving actuator according to the trigger state of the button.
在一种可能的实施例中,可以设置FRAME CTRL为0xAA,TYPE为0xA1,为单路接收装置的控制命令,DATA数据的首个字节为控制命令,0x01代表查询状态,0x02代表需要控制开关,DATA的第二个字节代表需要控制的状态,0x01代表开,0x02代表关。In a possible embodiment, FRAME CTRL can be set to 0xAA and TYPE to 0xA1, which is a control command for a single-channel receiving device. The first byte of the DATA data is the control command, 0x01 represents the query status, 0x02 represents the need to control the switch, and the second byte of DATA represents the state to be controlled, 0x01 represents on, and 0x02 represents off.
在一种可能的实施例中,可以设置FRAME CTRL为0xA5,TYPE为0xA2,为单路接收装置的设备状态报告命令,DATA的第一个字节代表具体的设备类型,DATA的第二个字节代表具体受控设备的状态,也可以有多个字节代表具体受控设备的状态,这取决于受控设备类型。In a possible embodiment, FRAME CTRL can be set to 0xA5 and TYPE to 0xA2, which is a device status report command for a single-channel receiving device. The first byte of DATA represents the specific device type, and the second byte of DATA represents the status of the specific controlled device. There may also be multiple bytes representing the status of the specific controlled device, depending on the type of the controlled device.
在一种可能的实施例中,可以设置FRAME CTRL为0xA6,TYPE为0xA3,为单路接收器管理命令,DATA的第一个字节为具体的单路接收器和功能类型,DATA的第二个字节为具体的配置功能,也可以有多个字节。In a possible embodiment, FRAME CTRL can be set to 0xA6 and TYPE to 0xA3, which is a single-channel receiver management command. The first byte of DATA is a specific single-channel receiver and function type, and the second byte of DATA is a specific configuration function, which may also have multiple bytes.
在一种可能的实施例中,可以设置FRAMECTRL为0xA7,TYPE为0xA4,为单路接收器管理应答命令,DATA的第一个字节为具体的单路接收器和功能类型,DATA的第二个字节为具体的应答数据,也可以是多个字节。In a possible embodiment, FRAMECTRL can be set to 0xA7 and TYPE to 0xA4, which is a single-channel receiver management response command. The first byte of DATA is the specific single-channel receiver and function type, and the second byte of DATA is the specific response data, which can also be multiple bytes.
在一种可能的实施例中,还可以在FRAME CTRL的数据前加入FRAME Header,用来标识协议版本号等信息,当然,FRAME CTRL和FRAME Header包含的信息可以互相交换,只要预先定义清楚就可以。其中还可以包含转发次数的信息,在部分应用中,是允许接收执行器启动转发功能,来增加传输距离的,但如果无限次的转发,会造成转发无法停止或者占用频带过多,反而影响了无线系统的传输性能,因此设定一定的转发停止规则就比较重要。在协议中,我们可以设计当达到一定的转发次数后,就停止转发。例如设置转发2次既停止,当接收执行器收到转发的报文,但读取转发次数为3时,停止向外转发,该接收执行器既终止了转发过程。In a possible embodiment, a FRAME Header can be added before the data of FRAME CTRL to identify information such as the protocol version number. Of course, the information contained in FRAME CTRL and FRAME Header can be exchanged with each other as long as it is clearly defined in advance. It can also include information on the number of forwarding times. In some applications, the receiving executor is allowed to start the forwarding function to increase the transmission distance. However, if the forwarding is unlimited, the forwarding cannot be stopped or too much frequency band is occupied, which affects the transmission performance of the wireless system. Therefore, it is more important to set certain forwarding stop rules. In the protocol, we can design that forwarding stops when a certain number of forwarding times is reached. For example, it is set to stop after forwarding 2 times. When the receiving executor receives the forwarded message, but reads the forwarding number as 3, it stops forwarding outward, and the receiving executor terminates the forwarding process.
在一种可能的实施例中,对于发射器,电磁换能器的发电量大概为100uJ到1000uJ之间,光能的发电效率约为100W/m2,远距离无线传输发电的收集利用率更低,因此需要通过无线传输协议(数据帧的数据结构等)的优化,来利用这些能量,传统的提高发射功率来实现远距离传输无法满足微能量发电的需求,通过无线传输方式的优化,提高能量的利用率,节约能量,但不能因节约能量而降低传输距离,因此还需要保证传输距离足够远,距离与能量的比值越大越好,本公开实施例中可以保证距离能量比值在300MHz—990MHz无线传输频率下大于0.2米/uJ,在2GHz—6GHz的无线传输频率下大于0.1米/uJ。本公开实施例可以应用于智能家居的控制系统,可以用来做智能开关、电动窗帘、传感器、智能家电、垃圾处理器、智能马桶、电动晾衣架等产品。In a possible embodiment, for the transmitter, the power generation of the electromagnetic transducer is about 100uJ to 1000uJ, the power generation efficiency of light energy is about 100W/m2, and the collection utilization rate of long-distance wireless transmission power generation is lower, so it is necessary to optimize the wireless transmission protocol (data structure of data frame, etc.) to utilize these energies. The traditional method of increasing the transmission power to achieve long-distance transmission cannot meet the needs of micro-energy power generation. By optimizing the wireless transmission method, the energy utilization rate is improved and energy is saved, but the transmission distance cannot be reduced due to energy saving. Therefore, it is also necessary to ensure that the transmission distance is far enough, and the greater the ratio of distance to energy, the better. In the embodiment of the present disclosure, the distance-to-energy ratio can be guaranteed to be greater than 0.2 meters/uJ at a wireless transmission frequency of 300MHz-990MHz, and greater than 0.1 meters/uJ at a wireless transmission frequency of 2GHz-6GHz. The embodiment of the present disclosure can be applied to the control system of smart homes, and can be used to make smart switches, electric curtains, sensors, smart home appliances, garbage disposers, smart toilets, electric clothes drying racks and other products.
图5是根是根据一示例性实施例示出的一种数据处理装置框图一。如图5所示,该数据处理装置500主要包括:FIG5 is a block diagram of a data processing device according to an exemplary embodiment. As shown in FIG5 , the data processing device 500 mainly includes:
获取模块501,配置为获取控制设备的设备信息和所述控制设备生成的控制信息;An acquisition module 501 is configured to acquire device information of a control device and control information generated by the control device;
生成模块502,配置为根据所述设备信息和所述控制信息,生成第一类数据帧;A generating module 502, configured to generate a first type of data frame according to the device information and the control information;
其中,所述第一类数据帧包括地址域和负载部分,所述设备信息中的第一部分构成所述第一类数据帧的地址域,所述设备信息中的第二部分和所述控制信息共同构成所述第一类数据帧的负载部分。The first type of data frame includes an address field and a load part, the first part of the device information constitutes the address field of the first type of data frame, and the second part of the device information and the control information together constitute the load part of the first type of data frame.
在一些实施例中,所述设备信息包括:所述控制设备的源标识、所述控制设备的设备类型,所述控制信息包括:控制参数;In some embodiments, the device information includes: a source identifier of the control device, a device type of the control device, and the control information includes: a control parameter;
所述生成模块502,配置为:The generating module 502 is configured as follows:
根据所述控制设备的源标识、所述控制设备的设备类型和控制参数,生成第一类数据帧;其中,所述源标识用于确定所述第一类数据帧的地址域;所述装置还包括:Generate a first type of data frame according to the source identifier of the control device, the device type of the control device and the control parameter; wherein the source identifier is used to determine the address field of the first type of data frame; the device also includes:
第一确定模块,配置为确定受控设备的设备类型;A first determination module is configured to determine a device type of a controlled device;
第二确定模块,配置为根据所述受控设备的设备类型和所述控制参数,确定用于控制所述受控设备的命令的类型;A second determining module is configured to determine a type of command for controlling the controlled device according to a device type of the controlled device and the control parameter;
第三确定模块,配置为根据所述受控设备的设备类型和所述命令的类型,生成第二类数据帧;A third determining module is configured to generate a second type of data frame according to the device type of the controlled device and the type of the command;
其中,所述第一类数据帧和所述第二类数据帧的帧控制域中预设位所携带数据的数据类型不同;所述受控设备的目标标识用于确定所述第二类数据帧的地址域。The data types of the data carried by the preset bits in the frame control fields of the first type of data frame and the second type of data frame are different; and the target identifier of the controlled device is used to determine the address field of the second type of data frame.
在一些实施例中,所述第二类数据帧由所述第二类数据帧的地址域和所述第二类数据帧的负载部分共同构成。In some embodiments, the second type of data frame is composed of an address field of the second type of data frame and a payload portion of the second type of data frame.
在一些实施例中,所述第二类数据帧的负载部分对应的字节长度由所述命令的类型确定。In some embodiments, the byte length corresponding to the payload portion of the second type of data frame is determined by the type of the command.
在一些实施例中,在所述命令为第一类型时,所述第二类数据帧的负载部分由所述受控设备的设备类型、所述第一类型和第一命令内容确定;In some embodiments, when the command is of the first type, the payload portion of the second type of data frame is determined by the device type of the controlled device, the first type and the first command content;
所述第一命令内容由所述命令的类型确定。The first command content is determined by the type of the command.
在一些实施例中,在所述命令为第一类型,且所述控制设备的控制参数为空时,所述第二类数据帧的负载部分由所述受控设备的设备类型和所述第一类型确定。In some embodiments, when the command is of the first type and the control parameter of the control device is empty, the payload portion of the second type of data frame is determined by the device type of the controlled device and the first type.
在一些实施例中,在所述命令为第二类型,且所述第二类型的命令具有第一属性时,所述第二类数据帧的负载部分由所述受控设备的设备类型、所述第二类型和第二命令内容确定;In some embodiments, when the command is of the second type and the command of the second type has the first attribute, the payload portion of the second type of data frame is determined by the device type of the controlled device, the second type, and the second command content;
所述第二命令内容由所述命令的类型确定。The second command content is determined by the type of the command.
在一些实施例中,在所述命令为第二类型,且所述第二类型的命令具有第二属性时,所述第二类数据帧的负载部分由所述受控设备的设备类型、所述第二类型和第三命令内容确定;In some embodiments, when the command is of the second type and the command of the second type has a second attribute, the payload portion of the second type of data frame is determined by the device type of the controlled device, the second type and the third command content;
所述第三命令内容由所述受控设备的设备类型和所述命令的类型共同确定。The third command content is determined by the device type of the controlled device and the type of the command.
在一些实施例中,所述装置500还包括:In some embodiments, the apparatus 500 further includes:
第四确定模块,配置为根据所述第二类数据帧确定第三类数据帧;其中,所述第三类数据帧和所述第一类数据帧以及所述第二类数据帧的帧控制域中预设位所携带数据的数据类型不同;所述第三类数据帧包括:地址域和负载部分,所述第三类数据帧的地址域由所述源标识确定;所述第三类数据帧的负载部分由所述受控设备的设备类型、所述命令的类型和第四命令内容确定;a fourth determination module, configured to determine a third type of data frame according to the second type of data frame; wherein the data types of the data carried by the preset bits in the frame control fields of the third type of data frame, the first type of data frame, and the second type of data frame are different; the third type of data frame comprises: an address field and a load part, the address field of the third type of data frame is determined by the source identifier; the load part of the third type of data frame is determined by the device type of the controlled device, the type of the command, and the fourth command content;
所述第四命令内容由所述受控设备的设备类型确定,或者由所述命令的类型确定,或者由所述命令的类型和所述受控设备的设备类型共同确定。The fourth command content is determined by the device type of the controlled device, or by the type of the command, or by both the type of the command and the device type of the controlled device.
在一些实施例中,所述第二类数据帧的帧控制域携带转发信息;In some embodiments, the frame control field of the second type of data frame carries forwarding information;
其中,所述转发信息用于触发所述受控设备向其他受控设备转发数据的功能。The forwarding information is used to trigger a function of the controlled device forwarding data to other controlled devices.
在一些实施例中,所述第一类数据帧和/或所述第二类第二类数据帧的负载部分携带信道信息;In some embodiments, the payload portion of the first type of data frame and/or the second type of data frame carries channel information;
其中,所述信道信息用于确定不同数据帧对应的不同传输信道。The channel information is used to determine different transmission channels corresponding to different data frames.
在一些实施例中,所述第一类数据帧和/或所述第二类数据帧携带校验信息;In some embodiments, the first type of data frame and/or the second type of data frame carries verification information;
所述校验信息用于:将所述第一类数据帧和/或所述第二类数据帧从预设位置划分为第一部分和第二部分,对所述第一部分进行校验,得到对应于所述第一部分的第一校验结果;对所述第二部分进行校验,得到对应于所述第二部分的第二校验结果,或者对所述第一部分、所述第一校验结果以及所述第二部分进行校验,得到所述第二校验结果。The verification information is used to: divide the first type of data frame and/or the second type of data frame from a preset position into a first part and a second part, verify the first part to obtain a first verification result corresponding to the first part; verify the second part to obtain a second verification result corresponding to the second part, or verify the first part, the first verification result and the second part to obtain the second verification result.
在一些实施例中,所述第一类数据帧和/或所述第二类数据帧包括帧头部分,所述帧头部分由协议版本信息确定,所述协议版本信息用于确定数据处理的数据协议类型。In some embodiments, the first type of data frame and/or the second type of data frame includes a frame header portion, and the frame header portion is determined by protocol version information, and the protocol version information is used to determine a data protocol type for data processing.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
图6是根是根据一示例性实施例示出的一种数据处理装置框图二。如图6所示,应用于受控设备,该数据处理装置600主要包括:FIG6 is a block diagram of a data processing device according to an exemplary embodiment. As shown in FIG6, the data processing device 600 is applied to a controlled device and mainly includes:
发送模块601,配置为向智能控制中心发送所述受控设备的状态信息,以使得所述智能控制中心根据所述受控设备的状态信息和控制设备的状态信息,对所述控制设备和所述受控设备进行匹配;The sending module 601 is configured to send the state information of the controlled device to the intelligent control center, so that the intelligent control center matches the control device with the controlled device according to the state information of the controlled device and the state information of the control device;
接收模块602,配置为接收来自所述智能控制中心的匹配结果;其中,所述匹配结果用于建立所述控制设备与所述受控设备之间的通信连接。The receiving module 602 is configured to receive a matching result from the intelligent control center; wherein the matching result is used to establish a communication connection between the control device and the controlled device.
在一些实施例中,所述发送模块601,配置为:In some embodiments, the sending module 601 is configured to:
在预设时间单位内,按照第一时间间隔向所述智能控制中心发送所述状态信息。The status information is sent to the intelligent control center at a first time interval within a preset time unit.
在一些实施例中,所述发送模块601,配置为:In some embodiments, the sending module 601 is configured to:
在以所述受控设备上电时刻为起始时刻的预设时长内,按照第二时间间隔向所述智能控制中心发送所述状态信息。The status information is sent to the intelligent control center at a second time interval within a preset time period starting from the power-on time of the controlled device.
在一些实施例中,所述发送模块601,配置为:In some embodiments, the sending module 601 is configured to:
在检测到所述受控设备满足预设触发条件时,按照第三时间间隔向所述智能控制中心发送所述状态信息。When it is detected that the controlled device meets a preset trigger condition, the status information is sent to the intelligent control center at a third time interval.
在一些实施例中,所述发送模块601,配置为:In some embodiments, the sending module 601 is configured to:
在所述控制设备与所述受控设备之间的通信连接处于断开状态时,接收所述控制设备发送的第一触发指令;所述控制设备为已经与受控设备建立连接的控制设备,或者为未与所述受控设备建立连接的控制设备,或者为具有预设地址的控制设备;When the communication connection between the control device and the controlled device is in a disconnected state, receiving a first trigger instruction sent by the control device; the control device is a control device that has established a connection with the controlled device, or is a control device that has not established a connection with the controlled device, or is a control device with a preset address;
响应于所述第一触发指令,按照第四时间间隔向所述智能控制中心发送所述受控设备的状态信息。In response to the first trigger instruction, the status information of the controlled device is sent to the intelligent control center at a fourth time interval.
在一些实施例中,所述发送模块601,配置为:In some embodiments, the sending module 601 is configured to:
接收来自所述智能控制中心的查询指令;Receiving a query instruction from the intelligent control center;
响应于所述查询指令,按照第五时间间隔向所述智能控制中心发送所述受控设备的状态信息。In response to the query instruction, the status information of the controlled device is sent to the intelligent control center at a fifth time interval.
在一些实施例中,所述装置600还包括:In some embodiments, the apparatus 600 further includes:
匹配模块,配置为基于所述匹配结果,接收来自于所述受控设备对应的所述控制设备的控制信号;其中,所述控制信号包括第二类数据帧,所述第二类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的;a matching module configured to receive a control signal from the control device corresponding to the controlled device based on the matching result; wherein the control signal includes a second type of data frame, and the second type of data frame is generated according to the device type of the controlled device and the type of command for controlling the controlled device;
响应模块,配置为响应于所述控制信号,根据第三类数据帧生成响应信号;其中,所述第三类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的;a response module, configured to generate a response signal according to a third type of data frame in response to the control signal; wherein the third type of data frame is generated according to the device type of the controlled device and the type of command for controlling the controlled device;
第一传输模块,配置为向所述控制设备发送所述响应信号。The first transmission module is configured to send the response signal to the control device.
在一些实施例中,所述第一传输模块,配置为:In some embodiments, the first transmission module is configured as follows:
通过与所述控制设备之间的通信连接,向所述控制设备发送所述响应信号;或者sending the response signal to the control device through a communication connection with the control device; or
通过所述智能控制中心向所述控制设备发送所述响应信号。The response signal is sent to the control device through the intelligent control center.
在一些实施例中,所述装置600还包括:In some embodiments, the apparatus 600 further includes:
第五确定模块,配置为根据所述控制设备和所述智能控制中心的设备配置顺序,确定所述响应信号的发送方向;a fifth determination module, configured to determine a sending direction of the response signal according to a device configuration sequence of the control device and the intelligent control center;
所述发送方向包括:从所述控制设备至所述智能控制中心的方向,或者从所述智能控制中心至所述控制设备的方向。The sending direction includes: a direction from the control device to the intelligent control center, or a direction from the intelligent control center to the control device.
在一些实施例中,所述装置600还包括:In some embodiments, the apparatus 600 further includes:
转换模块,配置为对所述第三类数据帧进行字节序转换处理,得到预设模式的第三类数据帧;其中,所述预设模式包括:预设大端模式和预设小端模式;A conversion module is configured to perform byte order conversion processing on the third type of data frame to obtain a third type of data frame in a preset mode; wherein the preset mode includes: a preset big endian mode and a preset little endian mode;
第六确定模块,配置为根据预设模式的第三类数据帧,生成所述响应信号。The sixth determination module is configured to generate the response signal according to the third type of data frame in a preset mode.
在一些实施例中,所述装置600还包括:In some embodiments, the apparatus 600 further includes:
转发模块,配置为根据所控制信号中携带的转发信息,将所述控制信号转发给其他受控设备;a forwarding module, configured to forward the control signal to other controlled devices according to the forwarding information carried in the controlled signal;
其中,所述转发信息用于触发所述受控设备向其他受控设备转发数据的功能。The forwarding information is used to trigger a function of the controlled device forwarding data to other controlled devices.
在一些实施例中,所述装置600还包括:In some embodiments, the apparatus 600 further includes:
第一停止模块,配置为在确定所述控制设备的电量余量小于预设电量阈值时,停止发送所述响应信号。The first stopping module is configured to stop sending the response signal when it is determined that the remaining power of the control device is less than a preset power threshold.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
图7是根是根据一示例性实施例示出的一种数据处理装置框图三。如图7所示,应用于控制设备,该数据处理装置700主要包括:FIG7 is a block diagram of a data processing device according to an exemplary embodiment. As shown in FIG7, the data processing device 700 is applied to a control device and mainly includes:
发送模块701,配置为向智能控制中心发送所述控制设备的状态信息,以使得所述智能控制中心根据所述控制设备的状态信息和受控设备的状态信息,对所述控制设备和所述受控设备进行匹配;The sending module 701 is configured to send the status information of the control device to the intelligent control center, so that the intelligent control center matches the control device and the controlled device according to the status information of the control device and the status information of the controlled device;
接收模块702,配置为接收来自所述智能控制中心的匹配结果;其中,所述匹配结果用于建立所述控制设备与所述受控设备之间的通信连接。The receiving module 702 is configured to receive a matching result from the intelligent control center; wherein the matching result is used to establish a communication connection between the control device and the controlled device.
在一些实施例中,所述装置700还包括:In some embodiments, the apparatus 700 further includes:
检测模块,配置为在所述控制设备与所述受控设备之间的通信连接处于断开状态时,基于检测到的输入操作触发第一触发指令;a detection module, configured to trigger a first trigger instruction based on a detected input operation when the communication connection between the control device and the controlled device is in a disconnected state;
第二传输模块,配置为向所述受控设备发送所述第一触发指令;其中,所述第一触发指令用于指示所述受控设备向所述智能控制中心发送所述受控设备的状态信息。The second transmission module is configured to send the first trigger instruction to the controlled device; wherein the first trigger instruction is used to instruct the controlled device to send the state information of the controlled device to the intelligent control center.
在一些实施例中,所述装置700还包括:In some embodiments, the apparatus 700 further includes:
第七确定模块,配置为在检测到预设触发操作时,根据所述第二类数据帧生成控制信号;其中,所述第二类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的;a seventh determination module, configured to generate a control signal according to the second type of data frame when a preset trigger operation is detected; wherein the second type of data frame is generated according to the device type of the controlled device and the type of command used to control the controlled device;
第三传输模块,配置为基于所述匹配结果,将所述控制信号发送至所述受控设备。The third transmission module is configured to send the control signal to the controlled device based on the matching result.
在一些实施例中,所述第三传输模块,配置为:In some embodiments, the third transmission module is configured as follows:
通过与所述受控设备之间的通信连接,将所述控制信号发送至所述受控设备;或者sending the control signal to the controlled device through a communication connection with the controlled device; or
通过所述智能控制中心将所述控制信号转发至所述受控设备。The control signal is forwarded to the controlled device through the intelligent control center.
在一些实施例中,所述装置700还包括:In some embodiments, the apparatus 700 further includes:
第八确定模块,配置为根据所述智能控制中心和所述受控设备的设备配置顺序,确定所述控制信号的发送方向;an eighth determination module, configured to determine a sending direction of the control signal according to a device configuration sequence of the intelligent control center and the controlled device;
所述发送方向包括:从所述智能控制中心至所述受控设备的方向,或者从所述受控设备至所述智能控制中心的方向。The sending direction includes: a direction from the intelligent control center to the controlled device, or a direction from the controlled device to the intelligent control center.
在一些实施例中,所述装置700还包括:In some embodiments, the apparatus 700 further includes:
第九确定模块,配置为对所述第二类数据帧进行字节序转换处理,得到预设模式的第二类数据帧;其中,所述预设模式包括:预设大端模式和预设小端模式;A ninth determination module is configured to perform byte order conversion processing on the second type of data frame to obtain a second type of data frame in a preset mode; wherein the preset mode includes: a preset big endian mode and a preset little endian mode;
第四传输模块,配置为根据预设模式的第二类数据帧,生成所述控制信号。The fourth transmission module is configured to generate the control signal according to the second type of data frame in a preset mode.
在一些实施例中,所述装置700还包括:In some embodiments, the apparatus 700 further includes:
第五传输模块,配置为接收所述受控设备基于所控制信号返回的响应信号;a fifth transmission module, configured to receive a response signal returned by the controlled device based on the controlled signal;
其中,所述响应信号包括所述第三类数据帧;所述第三类数据帧是根据所述受控设备的设备类型和用于控制所述受控设备的命令的类型生成的。The response signal includes the third type of data frame; the third type of data frame is generated according to the device type of the controlled device and the type of command used to control the controlled device.
在一些实施例中,所述第五传输模块,配置为:In some embodiments, the fifth transmission module is configured as follows:
通过与所述受控设备之间的通信连接,接收所述响应信号;或者Receiving the response signal through a communication connection with the controlled device; or
通过所述智能控制中心接收所述响应信号。The response signal is received by the intelligent control center.
在一些实施例中,所述装置700还包括:In some embodiments, the apparatus 700 further includes:
第二停止模块,配置为在所述控制设备的电量余量小于预设电量阈值时,停止接收所述响应信号。The second stopping module is configured to stop receiving the response signal when the remaining power of the control device is less than a preset power threshold.
在一些实施例中,所述控制设备为自发电供电设备,所述装置700还包括:In some embodiments, the control device is a self-generating power supply device, and the apparatus 700 further includes:
第六传输模块,配置为通过所述预设触发事件产生电能,并通过所产生的电能为所述控制设备进行信号的收发提供能量。The sixth transmission module is configured to generate electric energy through the preset trigger event, and provide energy for the control device to send and receive signals through the generated electric energy.
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
图8是根据一示例性实施例示出的一种数据处理装置的硬件结构框图。例如,装置800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。Fig. 8 is a hardware structure block diagram of a data processing device according to an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
参照图8,装置800可以包括以下一个或多个组件:处理组件802,存储器804,电力组件806,多媒体组件808,音频组件810,输入/输出(I/O)的接口812,传感器组件814,以及通信组件816。8 , device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input/output (I/O) interface 812 , a sensor component 814 , and a communication component 816 .
处理组件802通常控制装置800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
存储器804被配置为存储各种类型的数据以支持在装置800的操作。这些数据的示例包括用于在装置800上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
电力组件806为装置800的各种组件提供电力。电力组件806可以包括电源管理系统,一个或多个电源,及其他与为装置800生成、管理和分配电力相关联的组件。The power component 806 provides power to the various components of the device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
多媒体组件808包括在所述装置800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当装置800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and/or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and/or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(MIC),当装置800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
I/O接口812为处理组件802和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。I/O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
传感器组件814包括一个或多个传感器,用于为装置800提供各个方面的状态评估。例如,传感器组件814可以检测到装置800的打开/关闭状态,组件的相对定位,例如所述组件为装置800的显示器和小键盘,传感器组件814还可以检测装置800或装置800一个组件的位置改变,用户与装置800接触的存在或不存在,装置800方位或加速/减速和装置800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open/closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
通信组件816被配置为便于装置800和其他设备之间有线或无线方式的通信。装置800可以接入基于通信标准的无线网络,如WI-FI,4G或5G,或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WI-FI, 4G or 5G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
在示例性实施例中,装置800可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment, the apparatus 800 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器804,上述指令可由装置800的处理器820执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
一种非临时性计算机可读存储介质,当所述存储介质中的指令由数据处理装置的处理器执行时,使得数据处理装置能够执行一种数据处理方法,包括:A non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by a processor of a data processing device, enables the data processing device to perform a data processing method, comprising:
获取控制设备的设备信息和所述控制设备生成的控制信息;Acquire device information of a control device and control information generated by the control device;
根据所述设备信息和所述控制信息,生成第一类数据帧;Generate a first type of data frame according to the device information and the control information;
其中,所述第一类数据帧包括地址域和负载部分,所述设备信息中的第一部分构成所述第一类数据帧的地址域,所述设备信息中的第二部分和所述控制信息共同构成所述第一类数据帧的负载部分。The first type of data frame includes an address field and a load part, the first part of the device information constitutes the address field of the first type of data frame, and the second part of the device information and the control information together constitute the load part of the first type of data frame.
或者包括:Or include:
向智能控制中心发送所述受控设备的状态信息,以使得所述智能控制中心根据所述受控设备的状态信息和控制设备的状态信息,对所述控制设备和所述受控设备进行匹配;Sending the state information of the controlled device to the intelligent control center, so that the intelligent control center matches the control device with the controlled device according to the state information of the controlled device and the state information of the control device;
接收来自所述智能控制中心的匹配结果;其中,所述匹配结果用于建立所述控制设备与所述受控设备之间的通信连接。Receive a matching result from the intelligent control center; wherein the matching result is used to establish a communication connection between the control device and the controlled device.
或者包括:Or include:
向智能控制中心发送所述控制设备的状态信息,以使得所述智能控制中心根据所述控制设备的状态信息和受控设备的状态信息,对所述控制设备和所述受控设备进行匹配;Sending the status information of the control device to the intelligent control center, so that the intelligent control center matches the control device and the controlled device according to the status information of the control device and the status information of the controlled device;
接收来自所述智能控制中心的匹配结果;其中,所述匹配结果用于建立所述控制设备与所述受控设备之间的通信连接。Receive a matching result from the intelligent control center; wherein the matching result is used to establish a communication connection between the control device and the controlled device.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本公开旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims (21)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210080619.2A CN114500620B (en) | 2021-11-17 | 2021-11-17 | Data processing method, device and storage medium |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210080619.2A CN114500620B (en) | 2021-11-17 | 2021-11-17 | Data processing method, device and storage medium |
CN202111359491.5A CN113794783B (en) | 2021-11-17 | 2021-11-17 | Data processing method, device and storage medium |
Related Parent Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111359491.5A Division CN113794783B (en) | 2021-11-17 | 2021-11-17 | Data processing method, device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114500620A CN114500620A (en) | 2022-05-13 |
CN114500620B true CN114500620B (en) | 2024-06-18 |
Family
ID=78877293
Family Applications (5)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210080459.1A Active CN114520821B (en) | 2021-11-17 | 2021-11-17 | Data processing method, device and storage medium |
CN202111359491.5A Active CN113794783B (en) | 2021-11-17 | 2021-11-17 | Data processing method, device and storage medium |
CN202210080619.2A Active CN114500620B (en) | 2021-11-17 | 2021-11-17 | Data processing method, device and storage medium |
CN202210080447.9A Active CN114553919B (en) | 2021-11-17 | 2021-11-17 | Data processing method, device and storage medium |
CN202210082447.2A Active CN114553920B (en) | 2021-11-17 | 2021-11-17 | Data processing method, device and storage medium |
Family Applications Before (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210080459.1A Active CN114520821B (en) | 2021-11-17 | 2021-11-17 | Data processing method, device and storage medium |
CN202111359491.5A Active CN113794783B (en) | 2021-11-17 | 2021-11-17 | Data processing method, device and storage medium |
Family Applications After (2)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210080447.9A Active CN114553919B (en) | 2021-11-17 | 2021-11-17 | Data processing method, device and storage medium |
CN202210082447.2A Active CN114553920B (en) | 2021-11-17 | 2021-11-17 | Data processing method, device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (5) | CN114520821B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107493211A (en) * | 2017-08-29 | 2017-12-19 | 海信集团有限公司 | The control method and device of intelligent home device |
CN113517951A (en) * | 2021-05-16 | 2021-10-19 | 武汉领普科技有限公司 | Self-generating switch and processing method thereof, receiver and processing method thereof |
Family Cites Families (41)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2007131122A2 (en) * | 2006-05-03 | 2007-11-15 | Cloud Systems, Inc. | System and method for managing, routing, and controlling devices and inter-device connections |
CN100394740C (en) * | 2006-05-08 | 2008-06-11 | 杭州华三通信技术有限公司 | A method for transmitting control messages and a station device |
CN100591053C (en) * | 2007-10-25 | 2010-02-17 | 华为技术有限公司 | A message transmission method and network node device |
WO2012161552A2 (en) * | 2011-05-25 | 2012-11-29 | 엘지전자 주식회사 | Transmitting/receiving system and method for processing a broadcast signal |
TW201305912A (en) * | 2011-07-18 | 2013-02-01 | Hon Hai Prec Ind Co Ltd | System and method for managing virtual machines |
CN102314764B (en) * | 2011-09-13 | 2017-11-14 | 中兴通讯股份有限公司 | Remote terminal, method for realizing remote control and system |
CN103064374A (en) * | 2012-12-18 | 2013-04-24 | 重庆邮电大学 | Household energy consumption monitoring system based on internet of things technology |
CN103944679B (en) * | 2014-04-21 | 2017-09-22 | 华北水利水电大学 | Apparatus and method occur for a kind of data frame voice and packet data concurrent service based on VL |
KR102251964B1 (en) * | 2014-11-04 | 2021-05-14 | 삼성전자 주식회사 | Method for performing function through using of sensor data and electronic device for supporting the same |
CN104331053B (en) * | 2014-11-10 | 2016-10-26 | 重庆邮电大学 | The implementation method of 6LoWPAN Smart Home |
US10305959B2 (en) * | 2014-12-11 | 2019-05-28 | At&T Intellectual Property I, L.P. | Self-organizing network communication |
CN104539712A (en) * | 2014-12-31 | 2015-04-22 | 广东德豪润达电气股份有限公司 | Intelligent household appliance data transmission method |
CN104750068B (en) * | 2015-02-13 | 2018-08-21 | 湖北锐世数字医学影像科技有限公司 | A kind of data transmission and control device of multinode sensor network |
KR20160137224A (en) * | 2015-05-22 | 2016-11-30 | 삼성전자주식회사 | Apparatus and method for controlling external device |
CN105897309A (en) * | 2015-08-17 | 2016-08-24 | 乐视致新电子科技(天津)有限公司 | Intelligent device matching device and intelligent device |
CN106487988A (en) * | 2015-08-25 | 2017-03-08 | 中兴通讯股份有限公司 | A kind of method and system realizing terminal control |
JP6882314B2 (en) * | 2015-11-24 | 2021-06-02 | サムスン エレクトロニクス カンパニー リミテッド | Smart home service server and its control method |
CN105635950A (en) * | 2016-01-07 | 2016-06-01 | 烽火通信科技股份有限公司 | Smart home gateway control system and method based on Zigbee |
CN106131924A (en) * | 2016-06-06 | 2016-11-16 | 欧普照明股份有限公司 | A kind of control equipment, wireless communications method and system |
WO2018000379A1 (en) * | 2016-06-30 | 2018-01-04 | 华为技术有限公司 | Data transmission control method, communication device and core network device |
CN106850362A (en) * | 2017-01-16 | 2017-06-13 | 黄修文 | Wireless transmitting system and method based on technology of Internet of things |
CN106712907B (en) * | 2017-02-16 | 2019-08-20 | 北京中航通用科技有限公司 | Data transmission method and equipment |
CN107123253A (en) * | 2017-04-28 | 2017-09-01 | 环球智达科技(北京)有限公司 | Many equipment infrared remote control methods based on user terminal |
CN107147657B (en) * | 2017-05-31 | 2020-06-02 | 一飞智控(天津)科技有限公司 | Coding and decoding method and communication equipment suitable for multi-machine reliable communication |
CN107608225A (en) * | 2017-09-29 | 2018-01-19 | 深圳市艾特智能科技有限公司 | Control method, system, storage medium and the computer equipment of intelligent home device |
CN108696926B (en) * | 2018-05-09 | 2021-04-06 | 河海大学常州校区 | Cross-layer reliable data transmission method for underwater wireless sensor network |
CN109165116B (en) * | 2018-08-15 | 2021-09-14 | 西安微电子技术研究所 | Application processing interface circuit and method |
US10986185B1 (en) * | 2018-09-10 | 2021-04-20 | Saltstack, Inc. | Managing functionality of multiple devices via a delta proxy |
CN110290061A (en) * | 2019-05-31 | 2019-09-27 | 北京未来购电子商务有限公司 | A kind of Internet of Things communication means and gateway based on gateway |
CN112350798A (en) * | 2019-08-08 | 2021-02-09 | 华为技术有限公司 | Packet transmission method and device |
CN112910744A (en) * | 2019-12-03 | 2021-06-04 | 北京沃东天骏信息技术有限公司 | Intelligent device control method and device, storage medium and electronic device |
CN113038251B (en) * | 2019-12-25 | 2022-10-14 | 北京奇艺世纪科技有限公司 | Control method and control device |
CN111221273B (en) * | 2020-01-18 | 2021-06-04 | 武汉领普科技有限公司 | Control method, system, gateway, wall switch and cloud based on wireless switch |
CN111273579B (en) * | 2020-01-18 | 2021-03-05 | 武汉领普科技有限公司 | Receiver and its processing method, system and self-generating switch-based control assembly |
CN112087441B (en) * | 2020-09-03 | 2022-08-16 | 郑州信大先进技术研究院 | Multi-protocol communication method, intelligent home gateway and multi-protocol communication system |
CN112104635B (en) * | 2020-09-09 | 2022-10-14 | 中移(杭州)信息技术有限公司 | Communication method, system and network device |
CN112419693B (en) * | 2020-11-03 | 2023-05-12 | 深圳Tcl新技术有限公司 | Device control method, device, display device and computer readable storage medium |
CN112882394B (en) * | 2021-01-12 | 2024-08-13 | 北京小米松果电子有限公司 | Equipment control method, control device and readable storage medium |
CN115410846A (en) * | 2021-05-16 | 2022-11-29 | 武汉领普科技有限公司 | Switch control method, self-generating switch and receiving end |
CN113473462B (en) * | 2021-06-30 | 2024-07-02 | 苏州极目机器人科技有限公司 | Method for matching terminal equipment |
CN113660725B (en) * | 2021-10-20 | 2022-01-04 | 北京卓建智菡科技有限公司 | Positioning anti-cheating method, device and system, computer equipment and storage medium |
-
2021
- 2021-11-17 CN CN202210080459.1A patent/CN114520821B/en active Active
- 2021-11-17 CN CN202111359491.5A patent/CN113794783B/en active Active
- 2021-11-17 CN CN202210080619.2A patent/CN114500620B/en active Active
- 2021-11-17 CN CN202210080447.9A patent/CN114553919B/en active Active
- 2021-11-17 CN CN202210082447.2A patent/CN114553920B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107493211A (en) * | 2017-08-29 | 2017-12-19 | 海信集团有限公司 | The control method and device of intelligent home device |
CN113517951A (en) * | 2021-05-16 | 2021-10-19 | 武汉领普科技有限公司 | Self-generating switch and processing method thereof, receiver and processing method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN114553919A (en) | 2022-05-27 |
CN114520821B (en) | 2024-05-03 |
CN114520821A (en) | 2022-05-20 |
CN114553920A (en) | 2022-05-27 |
CN113794783B (en) | 2022-02-25 |
CN114553920B (en) | 2024-04-09 |
CN113794783A (en) | 2021-12-14 |
CN114553919B (en) | 2024-04-26 |
CN114500620A (en) | 2022-05-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN203178784U (en) | Intelligent household control system based on Internet of Things | |
CN103744411A (en) | Control method related to ZigBee technology for realizing smart home | |
CN108303918A (en) | Control system, method and device based on wireless switching | |
WO2017166066A1 (en) | Infrared remote control method, terminal and apparatus | |
CN103279094A (en) | Remote household appliance intelligent control system based on Android mobile phone | |
CN101478461A (en) | Portable remote controller and method for controlled object arbitrary selection | |
CN108572554A (en) | A smart home control system, method and related equipment | |
CN114114933A (en) | Control method, device, device and storage medium for IoT device | |
CN103986501B (en) | A kind of Bluetooth control device, system and method | |
Zhang et al. | Remote control system of smart appliances based on wireless sensor network | |
CN114500620B (en) | Data processing method, device and storage medium | |
CN205563123U (en) | Control panel and control system | |
CN204576787U (en) | Wireless remote control terminal and wireless remote-control system | |
CN204462684U (en) | Based on the intelligent domestic system of FPGA and cloud platform | |
CN206849257U (en) | Intelligent household equipment intercommunication system | |
WO2024198667A9 (en) | Configuration method and electronic device | |
CN107132824A (en) | A kind of Intelligent household network control system and method based on infrared and Bluetooth signal | |
WO2020038157A1 (en) | Nan-based intelligent management method and related product | |
CN111262099A (en) | A programmable remote control smart socket and its realization method | |
CN114095914B (en) | Doorbell control method, receiver, transmitter and storage medium | |
CN109712380A (en) | Find method and device, the storage medium, terminal device, remote control equipment of remote control equipment | |
CN104410755A (en) | Intelligent mobile phone with detecting, identifying and learning functions | |
CN205049873U (en) | Smart home systems based on wireless sensor network | |
CN115562054A (en) | Equipment control method, device, readable storage medium and chip | |
CN117170297A (en) | A method and electronic device for controlling PLC equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |