Smart home data processing system, method, device, equipment and medium

Through the smart home data processing system, smart devices acquire environmental data and determine their type and priority, select appropriate compression algorithms and service quality levels, compress and transmit data, solve the problems of low efficiency and large latency of traditional data transmission, and achieve efficient and reliable data transmission.

CN119892742APending Publication Date: 2025-04-25GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411862005.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

Traditional smart home data transmission technology has problems such as low data transmission efficiency, high bandwidth usage and critical data transmission delay, resulting in insufficient reliability of data transmission.

Method used

A smart home data processing system is designed to obtain environmental data through smart devices and determine its type and priority, select appropriate compression algorithms and preset protocol quality level to compress and transmit data.

Benefits of technology

Reduce transmission amount through data compression and improve transmission efficiency; reduce transmission delay of important data through priority mechanism; dynamic allocation of network bandwidth, priority is given to the transmission of important data, and the transmission success rate of important data and the overall reliability of the system are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119892742A_ABST
    Figure CN119892742A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a smart home data processing system, method, apparatus and device, and a medium. The system comprises a smart device and a target device. The intelligent device is used for determining a compression algorithm corresponding to the environment data according to the data type corresponding to the environment data so as to reduce the data transmission amount and improve the transmission efficiency; according to the priority corresponding to the data type of the environment data, determining the service quality level of a preset protocol corresponding to the environment data so as to reduce the transmission delay of the important data; compressing the environment data through a compression algorithm corresponding to the environment data to obtain a compressed data packet corresponding to the environment data, and generating a message body corresponding to the environment data according to the compressed data packet; and the message body is transmitted to the target equipment according to the service quality level of the preset protocol corresponding to the environment data, so that the network bandwidth can be dynamically allocated, the transmission of important data is preferentially guaranteed, the transmission success rate of the important data is improved, and the overall reliability of the system is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a smart home data processing system, method, device, equipment and medium. Background Art

[0002] With the rapid development of Internet of Things technology, in the field of smart home environment monitoring and data processing, traditional data transmission technology has low data transmission efficiency and high bandwidth occupancy, and may also cause key data transmission delays and other problems, and the reliability of data transmission is insufficient. How to improve the quality of data transmission is a problem to be solved. Summary of the invention

[0003] In order to solve the above problems, the embodiments of the present invention disclose a smart home data processing system, method, device, equipment and medium.

[0004] In a first aspect, an embodiment of the present invention provides a smart home data processing system, the system comprising: a smart device and a target device;

[0005] The smart device is used to obtain environmental data, and determine the data type corresponding to the environmental data, and the priority corresponding to the data type of the environmental data; determine the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data; determine the service quality level of the preset protocol corresponding to the environmental data according to the priority corresponding to the data type of the environmental data; compress the environmental data by using the compression algorithm corresponding to the environmental data to obtain a compressed data packet corresponding to the environmental data, and generate a message body corresponding to the environmental data according to the compressed data packet corresponding to the environmental data; transmit the message body corresponding to the environmental data to the target device according to the service quality level of the preset protocol corresponding to the environmental data, so that the target device processes the compressed data packet;

[0006] The target device is used to receive the message body corresponding to the environmental data sent by the smart device according to the service quality level of the preset protocol corresponding to the environmental data, and process the compressed data packet.

[0007] Optionally, the message body corresponding to the environmental data includes: a compressed data packet corresponding to the environmental data, a priority corresponding to a data type of the environmental data, and a compression algorithm corresponding to the environmental data;

[0008] The smart device is used to transmit the message body corresponding to the environmental data to the target device according to the service quality level of the preset protocol corresponding to the environmental data, so that the target device decompresses the compressed data packet according to the priority corresponding to the data type of the environmental data and by using the compression algorithm corresponding to the environmental data;

[0009] The target device is used to receive the message body corresponding to the environmental data sent by the smart device according to the service quality level of the preset protocol corresponding to the environmental data; and decompress the compressed data packet according to the priority corresponding to the data type of the environmental data and through the compression algorithm corresponding to the environmental data.

[0010] Optionally, the environmental data includes gas concentration data, a data type corresponding to the gas concentration data is a first data type, and a priority corresponding to the first data type is a high priority;

[0011] The smart device is used to determine that the compression algorithm corresponding to the environmental data is the first compression algorithm when the data type corresponding to the environmental data is the first data type; and to determine that the service quality level of the preset protocol corresponding to the environmental data is the first service quality when the priority corresponding to the data type of the environmental data is a high priority.

[0012] Optionally, the environmental data includes environmental comfort data, the data type corresponding to the environmental comfort data is the second data type, and the priority corresponding to the second data type is a medium priority;

[0013] The smart device is used to determine that the compression algorithm corresponding to the environmental data is the second compression algorithm when the data type corresponding to the environmental data is the second data type; and to determine that the service quality level of the preset protocol corresponding to the environmental data is the second service quality when the priority corresponding to the data type of the environmental data is a medium priority; the second service quality is lower than the first service quality.

[0014] Optionally, the environment data includes device status data, the data type corresponding to the device status data is a third data type, and the priority corresponding to the third data type is a low priority;

[0015] The smart device is used to determine that the compression algorithm corresponding to the environmental data is a third compression algorithm when the data type corresponding to the environmental data is a third data type; and to determine that the service quality level of the preset protocol corresponding to the environmental data is a third service quality when the priority corresponding to the data type of the environmental data is a low priority; the third service quality is lower than the second service quality.

[0016] In a second aspect, an embodiment of the present invention provides a smart home data processing method, which is applied to a smart device, and the method includes:

[0017] Acquire environmental data, and determine a data type corresponding to the environmental data, and a priority corresponding to the data type of the environmental data;

[0018] Determine the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data; determine the service quality level of the preset protocol corresponding to the environmental data according to the priority corresponding to the data type of the environmental data;

[0019] Compressing the environment data using a compression algorithm corresponding to the environment data to obtain a compressed data packet corresponding to the environment data, and generating a message body corresponding to the environment data according to the compressed data packet corresponding to the environment data;

[0020] According to the service quality level of the preset protocol corresponding to the environmental data, the message body corresponding to the environmental data is transmitted to the target device, so that the target device processes the compressed data packet.

[0021] Optionally, the message body corresponding to the environmental data includes: a compressed data packet corresponding to the environmental data, a priority corresponding to the data type of the environmental data, and a compression algorithm corresponding to the environmental data; and transmitting the message body corresponding to the environmental data to a target device according to the quality of service level of a preset protocol corresponding to the environmental data so that the target device processes the compressed data packet, including:

[0022] According to the service quality level of the preset protocol corresponding to the environmental data, the message body corresponding to the environmental data is transmitted to the target device, so that the target device decompresses the compressed data packet according to the priority corresponding to the data type of the environmental data and through the compression algorithm corresponding to the environmental data.

[0023] Optionally, the environmental data includes gas concentration data, a data type corresponding to the gas concentration data is a first data type, and a priority corresponding to the first data type is a high priority;

[0024] The step of determining the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data includes:

[0025] When the data type corresponding to the environment data is the first data type, determining that the compression algorithm corresponding to the environment data is the first compression algorithm;

[0026] The determining, according to the priority corresponding to the data type of the environmental data, the service quality level of the preset protocol corresponding to the environmental data includes:

[0027] In a case where the priority corresponding to the data type of the environmental data is a high priority, the quality of service level of the preset protocol corresponding to the environmental data is determined to be a first quality of service.

[0028] Optionally, the environmental data includes environmental comfort data, the data type corresponding to the environmental comfort data is the second data type, and the priority corresponding to the second data type is a medium priority;

[0029] The step of determining the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data includes:

[0030] When the data type corresponding to the environment data is the second data type, determining that the compression algorithm corresponding to the environment data is the second compression algorithm;

[0031] The determining, according to the priority corresponding to the data type of the environmental data, the service quality level of the preset protocol corresponding to the environmental data includes:

[0032] When the priority corresponding to the data type of the environmental data is a medium priority, the service quality level of the preset protocol corresponding to the environmental data is determined to be a second service quality; the second service quality is lower than the first service quality.

[0033] Optionally, the environment data includes device status data, the data type corresponding to the device status data is a third data type, and the priority corresponding to the third data type is a low priority;

[0034] The step of determining the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data includes:

[0035] When the data type corresponding to the environment data is the third data type, determining that the compression algorithm corresponding to the environment data is the third compression algorithm;

[0036] The determining, according to the priority corresponding to the data type of the environmental data, the service quality level of the preset protocol corresponding to the environmental data includes:

[0037] When the priority corresponding to the data type of the environmental data is a low priority, the quality of service level of the preset protocol corresponding to the environmental data is determined to be a third quality of service; the third quality of service is lower than the second quality of service.

[0038] In a third aspect, an embodiment of the present invention provides a smart home data processing device, which is applied to a smart device, and the device includes:

[0039] An environmental data acquisition module is used to acquire environmental data and determine the data type corresponding to the environmental data and the priority corresponding to the data type of the environmental data;

[0040] An environmental data identification module, used to determine a compression algorithm corresponding to the environmental data according to a data type corresponding to the environmental data; and to determine a quality of service level of a preset protocol corresponding to the environmental data according to a priority corresponding to the data type of the environmental data;

[0041] An environment data compression module is used to compress the environment data by using a compression algorithm corresponding to the environment data to obtain a compressed data packet corresponding to the environment data, and generate a message body corresponding to the environment data according to the compressed data packet corresponding to the environment data;

[0042] The environment data transmission module is used to transmit the message body corresponding to the environment data to the target device according to the service quality level of the preset protocol corresponding to the environment data, so that the target device processes the compressed data packet.

[0043] Optionally, the message body corresponding to the environmental data includes: a compressed data packet corresponding to the environmental data, a priority corresponding to the data type of the environmental data, and a compression algorithm corresponding to the environmental data; the environmental data transmission module includes:

[0044] The environmental data transmission submodule is used to transmit the message body corresponding to the environmental data to the target device according to the service quality level of the preset protocol corresponding to the environmental data, so that the target device decompresses the compressed data packet according to the priority corresponding to the data type of the environmental data and through the compression algorithm corresponding to the environmental data.

[0045] Optionally, the environmental data includes gas concentration data, a data type corresponding to the gas concentration data is a first data type, and a priority corresponding to the first data type is a high priority;

[0046] The environmental data identification module comprises:

[0047] A first environment data identification submodule, configured to determine that a compression algorithm corresponding to the environment data is a first compression algorithm when the data type corresponding to the environment data is a first data type;

[0048] The second environment data identification submodule is used to determine that the service quality level of the preset protocol corresponding to the environment data is the first service quality when the priority corresponding to the data type of the environment data is a high priority.

[0049] Optionally, the environmental data includes environmental comfort data, the data type corresponding to the environmental comfort data is the second data type, and the priority corresponding to the second data type is a medium priority;

[0050] The environmental data identification module comprises:

[0051] A third environment data identification submodule, configured to determine that the compression algorithm corresponding to the environment data is a second compression algorithm when the data type corresponding to the environment data is a second data type;

[0052] The fourth environmental data identification submodule is used to determine that the service quality level of the preset protocol corresponding to the environmental data is a second service quality when the priority corresponding to the data type of the environmental data is a medium priority; the second service quality is lower than the first service quality.

[0053] Optionally, the environment data includes device status data, the data type corresponding to the device status data is a third data type, and the priority corresponding to the third data type is a low priority;

[0054] The environmental data identification module comprises:

[0055] a fifth environment data identification submodule, configured to determine, when the data type corresponding to the environment data is the third data type, that the compression algorithm corresponding to the environment data is the third compression algorithm;

[0056] The sixth environmental data identification submodule is used to determine that the service quality level of the preset protocol corresponding to the environmental data is a third service quality when the priority corresponding to the data type of the environmental data is a low priority; the third service quality is lower than the second service quality.

[0057] In a fourth aspect, the present invention shows an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned smart home data processing method when executing the computer program.

[0058] In a fifth aspect, the present invention shows a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned smart home data processing method are implemented.

[0059] The embodiments of the present invention include the following advantages:

[0060] The smart home data processing system of the embodiment of the present invention includes: a smart device and a target device; the smart device is used to obtain environmental data and determine the data type corresponding to the environmental data and the priority corresponding to the data type of the environmental data; according to the data type corresponding to the environmental data, determine the compression algorithm corresponding to the environmental data, so that the data transmission amount can be reduced through data compression, the transmission efficiency can be improved, and the bandwidth resource consumption can be reduced; according to the priority corresponding to the data type of the environmental data, determine the service quality level of the preset protocol corresponding to the environmental data, so that the important data to be transmitted first can be determined through the priority mechanism, and the transmission delay of the important data can be reduced; according to the compression algorithm corresponding to the environmental data, compress the environmental data to obtain a compressed data packet corresponding to the environmental data, and generate a message body corresponding to the environmental data according to the compressed data packet corresponding to the environmental data; according to the service quality level of the preset protocol corresponding to the environmental data, transmit the message body corresponding to the environmental data to the target device, so that the network bandwidth can be dynamically allocated through the service quality level of the environmental data, the transmission of important data can be prioritized, and the waste of resources caused by excessive occupation of bandwidth by unimportant data can be avoided, the transmission success rate of important data is improved, and the overall reliability of the system is enhanced. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0062] Figure 1 is a structural block diagram of a smart home data processing system according to an embodiment of the present invention;

[0063] Figure 2 is a flowchart of a smart home data processing method according to an embodiment of the present invention;

[0064] Figure 3 is a logic diagram of a smart home data processing method according to an embodiment of the present invention;

[0065] Figure 4 It is a structural block diagram of a smart home data processing device according to an embodiment of the present invention.

[0066] Description of reference numerals:

[0067] Smart device 11, target device 12. DETAILED DESCRIPTION

[0068] The present invention proposes a smart home data processing system, method, device, equipment and medium, the purpose of which is to improve the quality of data transmission. In order to achieve this goal, the embodiments of the present invention reduce the amount of data transmission and improve the transmission efficiency through data compression; determine the important data to be transmitted first through the priority mechanism to reduce the transmission delay of the important data; and set the service quality level and dynamically allocate the network bandwidth to give priority to the transmission of important data, so as to avoid the waste of resources caused by excessive bandwidth occupation by unimportant data, thereby improving the transmission success rate of important data and enhancing the overall reliability of the system.

[0069] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0070] Reference Figure 1 , shows a structural block diagram of a smart home data processing system according to an embodiment of the present invention, the system comprising: a smart device 11 and a target device 12;

[0071] The smart device 11 is used to obtain environmental data, and determine the data type corresponding to the environmental data, and the priority corresponding to the data type of the environmental data; determine the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data; determine the service quality level of the preset protocol corresponding to the environmental data according to the priority corresponding to the data type of the environmental data; compress the environmental data by the compression algorithm corresponding to the environmental data to obtain a compressed data packet corresponding to the environmental data, and generate a message body corresponding to the environmental data according to the compressed data packet corresponding to the environmental data; transmit the message body corresponding to the environmental data to the target device 12 according to the service quality level of the preset protocol corresponding to the environmental data, so that the target device 12 processes the compressed data packet;

[0072] The target device 12 is used to receive the message body corresponding to the environmental data sent by the smart device 11 according to the service quality level of the preset protocol corresponding to the environmental data, and process the compressed data packet.

[0073] In an embodiment of the present invention, the smart home data processing system includes a smart device and a target device. Among them, the smart device can be an air purifier, a fresh air system, a smart water purifier, a smart camera, etc. The smart device can be configured with a sensor and a smart chip for collecting and processing data. The target device can be a gateway or a server. After receiving the compressed data packet, the target device can process the compressed data packet and apply the processed data to the corresponding service or storage system, such as real-time monitoring, data analysis, historical records, etc.

[0074] The preset protocol may be MQTT-SN (Message Queuing Telemetry Transport for Sensor Networks). The MQTT protocol is a lightweight message transmission protocol designed to adapt to resource-constrained devices and network environments, such as wireless sensor networks. The MQTT-SN protocol adds some features to better support low-power, low-bandwidth, and unreliable network environments, for example, using predefined topic names and short topic names to reduce the amount of data transmission, and supporting the sleep mode of the device to save energy.

[0075] QoS (Quality of Service) is used in MQTT and MQTT-SN protocols to define the reliability and guarantee level of data transmission. The QoS level determines the degree of guarantee of data during transmission. For example, QoS0 means that data is sent once and delivery is not guaranteed; QoS1 means that data is sent at least once and delivery is guaranteed, but it may be repeated; QoS2 means that data is guaranteed to be delivered only once, and will not be lost or repeated.

[0076] The intelligent device of the embodiment of the present invention can obtain environmental data, clean the environmental data, remove abnormal values ​​and irrelevant information to ensure the accuracy and relevance of the data; at the same time, determine the data type corresponding to the environmental data, and the priority corresponding to the data type of the environmental data. The intelligent device can determine the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data; determine the service quality level of the preset protocol corresponding to the environmental data according to the priority corresponding to the data type of the environmental data, determine the important data to be transmitted first through the priority mechanism, and reduce the transmission delay of the important data; compress the environmental data through the compression algorithm corresponding to the environmental data to obtain the compressed data packet corresponding to the environmental data, reduce the data transmission volume through data compression, and improve the transmission efficiency; generate the message body corresponding to the environmental data according to the compressed data packet corresponding to the environmental data; according to the service quality level of the preset protocol corresponding to the environmental data, transmit the message body corresponding to the environmental data to the target device, dynamically allocate the network bandwidth through the service quality level, give priority to the transmission of important data, avoid excessive bandwidth occupation by unimportant data to cause resource waste, improve the transmission success rate of important data, and enhance the overall reliability of the system. The target device can process the compressed data packet.

[0077] In one embodiment, the message body corresponding to the environmental data includes: a compressed data packet corresponding to the environmental data, a priority corresponding to the data type of the environmental data, and a compression algorithm corresponding to the environmental data;

[0078] The smart device 11 is used to transmit the message body corresponding to the environmental data to the target device 12 according to the service quality level of the preset protocol corresponding to the environmental data, so that the target device 12 decompresses the compressed data packet according to the priority corresponding to the data type of the environmental data and by using the compression algorithm corresponding to the environmental data;

[0079] The target device 12 is used to receive the message body corresponding to the environmental data sent by the smart device 11 according to the service quality level of the preset protocol corresponding to the environmental data; and decompress the compressed data packet according to the priority corresponding to the data type of the environmental data by using the compression algorithm corresponding to the environmental data.

[0080] In an embodiment of the present invention, the message body corresponding to the environmental data may include: a compressed data packet corresponding to the environmental data, a priority corresponding to the data type of the environmental data, and a compression algorithm corresponding to the environmental data. Specifically, the message body may be in the form of a compressed data packet and a header, and the header includes metadata such as the priority, compression algorithm, and data type. The target device may receive the message body corresponding to the environmental data sent by the smart device according to the service quality level of the preset protocol corresponding to the environmental data, and then process the environmental data in sequence according to the priority corresponding to the data type of the environmental data, that is, according to the data type and compression algorithm of the message body header, use a suitable decompression algorithm to decompress the compressed data packet to obtain the environmental data.

[0081] In one embodiment, the environmental data includes gas concentration data, the data type corresponding to the gas concentration data is a first data type, and the priority corresponding to the first data type is a high priority;

[0082] The smart device 11 is used to determine that the compression algorithm corresponding to the environmental data is the first compression algorithm when the data type corresponding to the environmental data is the first data type; and to determine that the service quality level of the preset protocol corresponding to the environmental data is the first service quality when the priority corresponding to the data type of the environmental data is a high priority.

[0083] In an embodiment of the present invention, the environmental data may include gas concentration data, the data type corresponding to the gas concentration data is a first data type, and the priority corresponding to the first data type is a high priority. The smart device may determine that the compression algorithm corresponding to the environmental data is a first compression algorithm when the data type corresponding to the environmental data is the first data type, and determine that the service quality level of the preset protocol corresponding to the environmental data is the first service quality when the priority corresponding to the data type of the environmental data is a high priority.

[0084] Among them, gas concentration data such as carbon dioxide, methane and other safety-related data. The first compression algorithm can be a combination of differential coding and dynamic binary tree algorithm to ensure compression accuracy. Since gas concentration affects the safety of the home environment, the priority of gas concentration data is set to high priority for priority transmission to reduce transmission delay. The service quality level of high-priority data is the first service quality, i.e. QoS2. The data is guaranteed to be delivered only once, will not be lost or repeated, and ensure reliable data transmission.

[0085] In one embodiment, the environmental data includes environmental comfort data, the data type corresponding to the environmental comfort data is the second data type, and the priority corresponding to the second data type is a medium priority;

[0086] The smart device 11 is used to determine that the compression algorithm corresponding to the environmental data is the second compression algorithm when the data type corresponding to the environmental data is the second data type; and to determine that the service quality level of the preset protocol corresponding to the environmental data is the second service quality when the priority corresponding to the data type of the environmental data is a medium priority; the second service quality is lower than the first service quality.

[0087] In an embodiment of the present invention, the environmental data may include environmental comfort data, the data type corresponding to the environmental comfort data is the second data type, and the priority corresponding to the second data type is the medium priority. The smart device may determine that the compression algorithm corresponding to the environmental data is the second compression algorithm when the data type corresponding to the environmental data is the second data type, and determine that the service quality level of the preset protocol corresponding to the environmental data is the second service quality when the priority corresponding to the data type of the environmental data is the medium priority.

[0088] Among them, the environmental comfort data, such as humidity, wind speed, etc., the second data type can be numerical data. The second compression algorithm can be differential coding or quantization technology compression. The priority of environmental comfort data is set to medium priority, and the service quality level is the second service quality, that is, QoS1. The data is sent at least once to ensure delivery, but it may be repeated. The second service quality is lower than the first service quality, that is, when data is transmitted, the bandwidth is preferentially allocated to the data compression package corresponding to the gas concentration data to ensure that important data is delivered first.

[0089] In one embodiment, the environmental data includes device status data, the data type corresponding to the device status data is a third data type, and the priority corresponding to the third data type is a low priority;

[0090] The smart device 11 is used to determine that the compression algorithm corresponding to the environmental data is the third compression algorithm when the data type corresponding to the environmental data is the third data type; and to determine that the service quality level of the preset protocol corresponding to the environmental data is the third service quality when the priority corresponding to the data type of the environmental data is a low priority; the third service quality is lower than the second service quality.

[0091] In an embodiment of the present invention, the environment data may include device status data, the data type corresponding to the device status data is a third data type, and the priority corresponding to the third data type is a low priority. The smart device may determine that the compression algorithm corresponding to the environment data is the third compression algorithm when the data type corresponding to the environment data is the third data type, and determine that the service quality level of the preset protocol corresponding to the environment data is the third service quality when the priority corresponding to the data type of the environment data is a low priority.

[0092] Among them, the third data type corresponding to the device status data may be text data. The third compression algorithm may be a binary tree algorithm. The priority of the device status data is set to low priority, and the service quality level is the third service quality, i.e., QoS0. The message is sent once, and delivery is not guaranteed. Loss or delay is allowed. The third service quality is lower than the second service quality, that is, when data transmission is performed, bandwidth is preferentially allocated to the data compression packets corresponding to the gas concentration data and the environmental comfort data to ensure that important data is delivered first.

[0093] The smart device of the smart home data processing system of the embodiment of the present invention can obtain environmental data, and determine the data type corresponding to the environmental data, and the priority corresponding to the data type of the environmental data; determine the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data, thereby reducing the data transmission amount through data compression, improving transmission efficiency and reducing bandwidth resource consumption; determine the service quality level of the preset protocol corresponding to the environmental data according to the priority corresponding to the data type of the environmental data, thereby determining the important data to be transmitted first through the priority mechanism, thereby reducing the transmission delay of the important data; compress the environmental data through the compression algorithm corresponding to the environmental data to obtain a compressed data packet corresponding to the environmental data, and generate a message body corresponding to the environmental data according to the compressed data packet corresponding to the environmental data; according to the service quality level of the preset protocol corresponding to the environmental data, transmit the message body corresponding to the environmental data to the target device, thereby dynamically allocating network bandwidth through the service quality level of the environmental data, giving priority to ensuring the transmission of important data, avoiding excessive bandwidth occupation by unimportant data and causing resource waste, improving the transmission success rate of important data, and enhancing the overall reliability of the system.

[0094] Reference Figure 2, shows a flowchart of a smart home data processing method according to an embodiment of the present invention, which is applied to smart devices. The method may specifically include the following steps:

[0095] Step 201, acquiring environmental data, and determining a data type corresponding to the environmental data, and a priority corresponding to the data type of the environmental data;

[0096] In an embodiment of the present invention, the smart home data processing system includes smart devices and target devices. Among them, the smart devices can be air purifiers, fresh air systems, smart water purifiers, smart cameras, etc. The smart devices can be configured with sensors and smart chips for collecting and processing data. The smart devices can obtain environmental data, clean the environmental data, remove abnormal values ​​and irrelevant information to ensure the accuracy and relevance of the data; at the same time, determine the data type corresponding to the environmental data, and the priority corresponding to the data type of the environmental data.

[0097] Step 202, determining a compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data; determining a quality of service level of a preset protocol corresponding to the environmental data according to the priority corresponding to the data type of the environmental data;

[0098] In one embodiment, the environmental data includes gas concentration data, the data type corresponding to the gas concentration data is a first data type, and the priority corresponding to the first data type is a high priority; the environmental data includes environmental comfort data, the data type corresponding to the environmental comfort data is a second data type, and the priority corresponding to the second data type is a medium priority; the environmental data includes device status data, the data type corresponding to the device status data is a third data type, and the priority corresponding to the third data type is a low priority;

[0099] The step of determining the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data may further include the following sub-steps:

[0100] Sub-step S11, when the data type corresponding to the environment data is the first data type, determining that the compression algorithm corresponding to the environment data is the first compression algorithm;

[0101] Sub-step S12, when the data type corresponding to the environment data is the second data type, determining that the compression algorithm corresponding to the environment data is the second compression algorithm;

[0102] Sub-step S13, when the data type corresponding to the environment data is the third data type, determining that the compression algorithm corresponding to the environment data is the third compression algorithm;

[0103] Determining the service quality level of the preset protocol corresponding to the environmental data according to the priority corresponding to the data type of the environmental data may also include the following sub-steps:

[0104] Sub-step S21, when the priority corresponding to the data type of the environmental data is a high priority, determining that the service quality level of the preset protocol corresponding to the environmental data is a first service quality;

[0105] Sub-step S22, when the priority corresponding to the data type of the environmental data is a medium priority, determining that the service quality level of the preset protocol corresponding to the environmental data is a second service quality; the second service quality is lower than the first service quality;

[0106] Sub-step S23, when the priority corresponding to the data type of the environmental data is a low priority, determining that the service quality level of the preset protocol corresponding to the environmental data is a third service quality; the third service quality is lower than the second service quality.

[0107] In an embodiment of the present invention, the preset protocol may be MQTT-SN (Message Queuing Telemetry Transport for Sensor Networks). The MQTT protocol is a lightweight message transmission protocol designed to adapt to resource-constrained devices and network environments, such as wireless sensor networks. The MQTT-SN protocol adds some features to better support low-power, low-bandwidth, and unreliable network environments, for example, using predefined topic names and short topic names to reduce data transmission volume, and supporting sleep mode of the device to save energy.

[0108] QoS (Quality of Service) is used in MQTT and MQTT-SN protocols to define the reliability and guarantee level of data transmission. The QoS level determines the degree of guarantee of data during transmission. For example, QoS0 (third quality of service) means that data is sent once and delivery is not guaranteed; QoS1 (second quality of service) means that data is sent at least once and delivery is guaranteed, but it may be repeated; QoS2 (first quality of service) means that data is guaranteed to be delivered only once, and will not be lost or repeated.

[0109] Smart devices can determine the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data; determine the service quality level of the preset protocol corresponding to the environmental data according to the priority corresponding to the data type of the environmental data, and determine the important data to be transmitted first through the priority mechanism to reduce the transmission delay of important data; reduce the data transmission volume and improve the transmission efficiency through data compression; dynamically allocate network bandwidth through service quality level, give priority to the transmission of important data, avoid excessive bandwidth occupation by unimportant data and cause waste of resources, and improve the transmission success rate of important data.

[0110] Specifically, environmental data may include gas concentration data, such as safety-related data such as carbon dioxide and methane. The data type corresponding to the gas concentration data is the first data type, and the compression algorithm corresponding to the first data type is the first compression algorithm, which may be a combination of differential coding and a dynamic binary tree algorithm. The priority corresponding to the first data type is high priority, and the service quality level of high-priority data is the first service quality, i.e., QoS2. The data is guaranteed to be delivered only once, and will not be lost or repeated, ensuring reliable data transmission.

[0111] Environmental data may also include environmental comfort data, such as humidity, wind speed, and the like. The data type corresponding to the environmental comfort data is the second data type, which may be numerical data. The compression algorithm corresponding to the second data type is the second compression algorithm, which may be differential coding or quantization technology compression. The priority corresponding to the second data type is medium priority, and the quality of service level of medium priority data is the second quality of service, i.e., QoS1. Data is sent at least once to ensure delivery, but may be repeated. The second quality of service is lower than the first quality of service, i.e., when data is transmitted, bandwidth is preferentially allocated to the data compression package corresponding to the gas concentration data to ensure that important data is delivered first.

[0112] Environmental data may also include device status data. The data type corresponding to the device status data is a third data type, which may be text data. The compression algorithm corresponding to the third data type is a third compression algorithm, which may be a binary tree algorithm. The priority corresponding to the third data type is a low priority, and the service quality level of the data with the lowest priority is the third service quality, i.e., QoS0. The message is sent once, and delivery is not guaranteed. Loss or delay is allowed. The third service quality is lower than the second service quality, i.e., when data is transmitted, bandwidth is preferentially allocated to the data compression packages corresponding to the gas concentration data and the environmental comfort data to ensure that important data is delivered first.

[0113] Step 203, compressing the environment data by using a compression algorithm corresponding to the environment data to obtain a compressed data packet corresponding to the environment data, and generating a message body corresponding to the environment data according to the compressed data packet corresponding to the environment data;

[0114] Step 204: transmitting the message body corresponding to the environmental data to the target device according to the service quality level of the preset protocol corresponding to the environmental data, so that the target device processes the compressed data packet.

[0115] In one embodiment, the message body corresponding to the environmental data includes: a compressed data packet corresponding to the environmental data, a priority corresponding to the data type of the environmental data, and a compression algorithm corresponding to the environmental data; the step of transmitting the message body corresponding to the environmental data to a target device according to the quality of service level of a preset protocol corresponding to the environmental data so that the target device processes the compressed data packet may also include the following sub-steps:

[0116] Sub-step S11, according to the service quality level of the preset protocol corresponding to the environmental data, transmits the message body corresponding to the environmental data to the target device, so that the target device decompresses the compressed data packet according to the priority corresponding to the data type of the environmental data and through the compression algorithm corresponding to the environmental data.

[0117] In an embodiment of the present invention, the message body corresponding to the environmental data may include: a compressed data packet corresponding to the environmental data, a priority corresponding to the data type of the environmental data, and a compression algorithm corresponding to the environmental data. Specifically, the message body may be in the form of a compressed data packet and a header, and the header includes metadata such as the priority, compression algorithm, and data type. The target device may receive the message body corresponding to the environmental data sent by the smart device according to the service quality level of the preset protocol corresponding to the environmental data, and then process the environmental data in sequence according to the priority corresponding to the data type of the environmental data, that is, according to the data type and compression algorithm of the message body header, use a suitable decompression algorithm to decompress the compressed data packet to obtain the environmental data.

[0118] The smart device of the smart home data processing system of the embodiment of the present invention can obtain environmental data, and determine the data type corresponding to the environmental data, and the priority corresponding to the data type of the environmental data; determine the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data, thereby reducing the data transmission amount through data compression, improving transmission efficiency and reducing bandwidth resource consumption; determine the service quality level of the preset protocol corresponding to the environmental data according to the priority corresponding to the data type of the environmental data, thereby determining the important data to be transmitted first through the priority mechanism, thereby reducing the transmission delay of the important data; compress the environmental data through the compression algorithm corresponding to the environmental data to obtain a compressed data packet corresponding to the environmental data, and generate a message body corresponding to the environmental data according to the compressed data packet corresponding to the environmental data; according to the service quality level of the preset protocol corresponding to the environmental data, transmit the message body corresponding to the environmental data to the target device, thereby dynamically allocating network bandwidth through the service quality level of the environmental data, giving priority to ensuring the transmission of important data, avoiding excessive bandwidth occupation by unimportant data and causing resource waste, improving the transmission success rate of important data, and enhancing the overall reliability of the system.

[0119] Reference Figure 3 , shows a logic diagram of a smart home data processing method provided by an embodiment of the present invention, in order to enable those skilled in the art to better understand the embodiment of the present invention, the following Figure 3 The embodiments of the present invention are described as follows:

[0120] Step 301, obtaining environmental data, including gas concentration data, environmental comfort data, and equipment status data; cleaning the environmental data, removing abnormal values ​​and irrelevant information to ensure the accuracy and relevance of the data;

[0121] Step 302, determining the data type corresponding to the environmental data and the priority corresponding to the data type of the environmental data; and determining the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data;

[0122] Assign priorities to each data type based on the importance and urgency of the data. For example, safety-related gas concentration data is set to high priority, environmental comfort-related temperature data is set to medium priority, numerical data (such as temperature and humidity) is set to medium priority, and text data (such as equipment status) is set to low priority. For temperature data, a quantization algorithm is selected and the priority is adjusted based on scenario requirements to ensure system communication efficiency and data reliability.

[0123] Select the appropriate compression algorithm based on the data type and characteristics. For example, for numerical data (such as temperature and humidity), you can choose to use differential encoding or quantization technology; for text data (such as sensor status description), you can choose Huffman encoding (converting characters in the data into binary encoding) or LZW compression (replacing repeated patterns in the input data with shorter codes).

[0124] Among them, the intelligent device can dynamically select the most suitable compression algorithm according to the characteristics of the monitoring data. Whether it is Huffman coding, LZW compression, or differential coding, it can automatically adapt to achieve the best compression effect. In order to reduce the amount of data before transmission, thereby directly improving the efficiency of data transmission, a real-time data compression mechanism is adopted to ensure that the data is compressed immediately after collection. At the same time, the compression efficiency is optimized to ensure the accuracy and integrity of the data after decompression, and to ensure the quality of data transmission.

[0125] Step 303, compressing the environmental data using a compression algorithm corresponding to the environmental data to obtain a compressed data packet corresponding to the environmental data;

[0126] Apply the selected compression algorithm to compress the preprocessed data to generate a compressed data packet, ensuring that sufficient information is retained during the compression process so that the data can be accurately restored at the receiving end.

[0127] Step 304, generating a message body corresponding to the environmental data; the message body includes: a compressed data packet, a data type of the environmental data, a priority corresponding to the data type of the environmental data, and a compression algorithm corresponding to the environmental data;

[0128] When constructing an MQTT-SN message, it includes information such as data type, priority, and compression mark. For example, a message body is created, which includes a compressed data packet and a header. The header includes metadata such as priority and compression algorithm type. The message body includes a data packet and a header. The data packet includes compressed environmental monitoring data and data type. The header includes priority and compression algorithm type (compression mark).

[0129] Step 305, determining the service quality level of the preset protocol corresponding to the environmental data according to the priority corresponding to the data type of the environmental data;

[0130] Step 306, transmitting the message body corresponding to the environmental data to the target device according to the service quality level of the preset protocol corresponding to the environmental data;

[0131] The compressed data packet is sent to the gateway or server through the MQTT-SN protocol. During the transmission process, the QoS mechanism of MQTTSN is used to set the appropriate QoS level according to the priority of the message. Numerical data (such as humidity and wind speed) are compressed using differential coding or quantization technology. Due to their importance to environmental comfort, the priority is medium. MQTT-SN's QoS1 is selected during transmission to ensure that the data is transmitted at least once; text data (such as device status description) has high redundancy, and Huffman coding is used to reduce the amount of data. The priority is low, and QoS 0 is used during transmission, allowing loss or delay; gas concentration data (such as CO2 and methane) is security-related data. Differential coding and dynamic Huffman algorithm are combined during compression to ensure accuracy. The priority is set to high, and QoS2 is used for transmission to ensure reliable message transmission; temperature data adjusts the priority according to the application scenario, and the priority is medium in conventional comfort monitoring. Ensure system communication efficiency and data reliability.

[0132] The main function of dynamic priority adjustment is to dynamically adjust the transmission priority of messages based on the results of real-time data analysis, so that the system will automatically increase the priority of more urgent or important data to ensure that these data can be transmitted first. The system can automatically assign the most appropriate quality of service (QoS) level based on the priority of each message and the current network conditions. Through the intelligent routing algorithm, the system can select the best transmission path for each message to optimize the message transmission path. The combination of priority mechanism and QoS control ensures that critical data can be transmitted to the destination quickly and accurately.

[0133] Step 307 : The target device decompresses the compressed data packet according to the priority corresponding to the data type of the environmental data and by using the compression algorithm corresponding to the environmental data.

[0134] After receiving the compressed data packet, the server or cloud platform processes it according to the priority tag in the message header. For high-priority messages, the gateway decompresses and forwards them first; for low-priority messages, the processing speed can be appropriately reduced to save resources. After selecting the appropriate decompression algorithm based on the header information to restore the data, the data is applied to the corresponding service or storage system, such as real-time monitoring, data analysis, historical records, etc.

[0135] The smart device of the smart home data processing system of the embodiment of the present invention can obtain environmental data, and determine the data type corresponding to the environmental data, and the priority corresponding to the data type of the environmental data; determine the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data, thereby reducing the data transmission amount through data compression, improving transmission efficiency and reducing bandwidth resource consumption; determine the service quality level of the preset protocol corresponding to the environmental data according to the priority corresponding to the data type of the environmental data, thereby determining the important data to be transmitted first through the priority mechanism, thereby reducing the transmission delay of the important data; compress the environmental data through the compression algorithm corresponding to the environmental data to obtain a compressed data packet corresponding to the environmental data, and generate a message body corresponding to the environmental data according to the compressed data packet corresponding to the environmental data; according to the service quality level of the preset protocol corresponding to the environmental data, transmit the message body corresponding to the environmental data to the target device, thereby dynamically allocating network bandwidth through the service quality level of the environmental data, giving priority to ensuring the transmission of important data, avoiding excessive bandwidth occupation by unimportant data and causing resource waste, improving the transmission success rate of important data, and enhancing the overall reliability of the system.

[0136] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0137] Reference Figure 4 , shows a structural block diagram of a smart home data processing device provided by an embodiment of the present invention, which is applied to smart devices and may specifically include the following modules:

[0138] The environment data acquisition module 401 is used to acquire environment data and determine the data type corresponding to the environment data and the priority corresponding to the data type of the environment data;

[0139] The environment data identification module 402 is used to determine the compression algorithm corresponding to the environment data according to the data type corresponding to the environment data; determine the service quality level of the preset protocol corresponding to the environment data according to the priority corresponding to the data type of the environment data;

[0140] The environment data compression module 403 is used to compress the environment data by using a compression algorithm corresponding to the environment data to obtain a compressed data packet corresponding to the environment data, and generate a message body corresponding to the environment data according to the compressed data packet corresponding to the environment data;

[0141] The environment data transmission module 404 is used to transmit the message body corresponding to the environment data to the target device according to the service quality level of the preset protocol corresponding to the environment data, so that the target device processes the compressed data packet.

[0142] In the embodiment of the present invention, the message body corresponding to the environmental data includes: a compressed data packet corresponding to the environmental data, a priority corresponding to the data type of the environmental data, and a compression algorithm corresponding to the environmental data; the environmental data transmission module 404 includes:

[0143] The environmental data transmission submodule is used to transmit the message body corresponding to the environmental data to the target device according to the service quality level of the preset protocol corresponding to the environmental data, so that the target device decompresses the compressed data packet according to the priority corresponding to the data type of the environmental data and through the compression algorithm corresponding to the environmental data.

[0144] In an embodiment of the present invention, the environmental data includes gas concentration data, the data type corresponding to the gas concentration data is a first data type, and the priority corresponding to the first data type is a high priority;

[0145] The environmental data identification module 402 includes:

[0146] A first environment data identification submodule, configured to determine that a compression algorithm corresponding to the environment data is a first compression algorithm when the data type corresponding to the environment data is a first data type;

[0147] The second environment data identification submodule is used to determine that the service quality level of the preset protocol corresponding to the environment data is the first service quality when the priority corresponding to the data type of the environment data is a high priority.

[0148] In an embodiment of the present invention, the environmental data includes environmental comfort data, the data type corresponding to the environmental comfort data is the second data type, and the priority corresponding to the second data type is a medium priority;

[0149] The environmental data identification module 402 includes:

[0150] A third environment data identification submodule, configured to determine that the compression algorithm corresponding to the environment data is a second compression algorithm when the data type corresponding to the environment data is a second data type;

[0151] The fourth environmental data identification submodule is used to determine that the service quality level of the preset protocol corresponding to the environmental data is a second service quality when the priority corresponding to the data type of the environmental data is a medium priority; the second service quality is lower than the first service quality.

[0152] In an embodiment of the present invention, the environment data includes device status data, the data type corresponding to the device status data is a third data type, and the priority corresponding to the third data type is a low priority;

[0153] The environmental data identification module 402 includes:

[0154] a fifth environment data identification submodule, configured to determine, when the data type corresponding to the environment data is the third data type, that the compression algorithm corresponding to the environment data is the third compression algorithm;

[0155] The sixth environmental data identification submodule is used to determine that the service quality level of the preset protocol corresponding to the environmental data is a third service quality when the priority corresponding to the data type of the environmental data is a low priority; the third service quality is lower than the second service quality.

[0156] The smart device of the smart home data processing system of the embodiment of the present invention can obtain environmental data, and determine the data type corresponding to the environmental data, and the priority corresponding to the data type of the environmental data; determine the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data, thereby reducing the data transmission amount through data compression, improving transmission efficiency and reducing bandwidth resource consumption; determine the service quality level of the preset protocol corresponding to the environmental data according to the priority corresponding to the data type of the environmental data, thereby determining the important data to be transmitted first through the priority mechanism, thereby reducing the transmission delay of the important data; compress the environmental data through the compression algorithm corresponding to the environmental data to obtain a compressed data packet corresponding to the environmental data, and generate a message body corresponding to the environmental data according to the compressed data packet corresponding to the environmental data; according to the service quality level of the preset protocol corresponding to the environmental data, transmit the message body corresponding to the environmental data to the target device, thereby dynamically allocating network bandwidth through the service quality level of the environmental data, giving priority to ensuring the transmission of important data, avoiding excessive bandwidth occupation by unimportant data and causing resource waste, improving the transmission success rate of important data, and enhancing the overall reliability of the system.

[0157] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0158] An embodiment of the present invention further provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned smart home data processing method when executing the computer program.

[0159] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned smart home data processing method are implemented.

[0160] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0161] Those skilled in the art will appreciate that the embodiments of the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more machine-readable media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0162] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0163] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0164] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0165] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0166] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0167] The above is a detailed introduction to a smart home data processing system, method, device, equipment and medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A smart home data processing system, characterized in that: Includes: smart devices and target devices; The smart device is used to obtain environmental data, and determine the data type corresponding to the environmental data and the priority corresponding to the data type of the environmental data; and determine the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data; Determine the service quality level of the preset protocol corresponding to the environmental data according to the priority level corresponding to the data type of the environmental data; compress the environmental data by using the compression algorithm corresponding to the environmental data to obtain a compressed data packet corresponding to the environmental data, and generate a message body corresponding to the environmental data according to the compressed data packet corresponding to the environmental data; transmit the message body corresponding to the environmental data to the target device according to the service quality level of the preset protocol corresponding to the environmental data, so that the target device processes the compressed data packet; The target device is used to receive the message body corresponding to the environmental data sent by the smart device according to the service quality level of the preset protocol corresponding to the environmental data, and process the compressed data packet.

2. The system according to claim 1, characterized in that The message body corresponding to the environmental data includes: a compressed data packet corresponding to the environmental data, a priority corresponding to the data type of the environmental data, and a compression algorithm corresponding to the environmental data; The smart device is used to transmit the message body corresponding to the environmental data to the target device according to the service quality level of the preset protocol corresponding to the environmental data, so that the target device decompresses the compressed data packet according to the priority corresponding to the data type of the environmental data and by using the compression algorithm corresponding to the environmental data; The target device is used to receive the message body corresponding to the environmental data sent by the smart device according to the service quality level of the preset protocol corresponding to the environmental data; and decompress the compressed data packet according to the priority corresponding to the data type of the environmental data and through the compression algorithm corresponding to the environmental data.

3. The system according to claim 1, characterized in that The environmental data includes gas concentration data, the data type corresponding to the gas concentration data is a first data type, and the priority corresponding to the first data type is a high priority; The smart device is used to determine that the compression algorithm corresponding to the environmental data is a first compression algorithm when the data type corresponding to the environmental data is a first data type; In a case where the priority corresponding to the data type of the environmental data is a high priority, the quality of service level of the preset protocol corresponding to the environmental data is determined to be a first quality of service.

4. The system according to claim 3, characterized in that The environmental data includes environmental comfort data, the data type corresponding to the environmental comfort data is the second data type, and the priority corresponding to the second data type is a medium priority; The smart device is used to determine that the compression algorithm corresponding to the environmental data is the second compression algorithm when the data type corresponding to the environmental data is the second data type; When the priority corresponding to the data type of the environmental data is a medium priority, the service quality level of the preset protocol corresponding to the environmental data is determined to be a second service quality; the second service quality is lower than the first service quality.

5. The system according to claim 4, characterized in that The environmental data includes device status data, the data type corresponding to the device status data is a third data type, and the priority corresponding to the third data type is a low priority; The smart device is used to determine that the compression algorithm corresponding to the environmental data is a third compression algorithm when the data type corresponding to the environmental data is a third data type; and to determine that the service quality level of the preset protocol corresponding to the environmental data is a third service quality when the priority corresponding to the data type of the environmental data is a low priority; the third service quality is lower than the second service quality.

6. A smart home data processing method, characterized in that: Applied to a smart device, the method comprises: Acquire environmental data, and determine a data type corresponding to the environmental data, and a priority corresponding to the data type of the environmental data; Determine the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data; determine the service quality level of the preset protocol corresponding to the environmental data according to the priority corresponding to the data type of the environmental data; Compressing the environment data using a compression algorithm corresponding to the environment data to obtain a compressed data packet corresponding to the environment data, and generating a message body corresponding to the environment data according to the compressed data packet corresponding to the environment data; According to the service quality level of the preset protocol corresponding to the environmental data, the message body corresponding to the environmental data is transmitted to the target device, so that the target device processes the compressed data packet.

7. The method according to claim 6, characterized in that The message body corresponding to the environmental data includes: a compressed data packet corresponding to the environmental data, a priority corresponding to the data type of the environmental data, and a compression algorithm corresponding to the environmental data; and transmitting the message body corresponding to the environmental data to a target device according to the quality of service level of a preset protocol corresponding to the environmental data, so that the target device processes the compressed data packet, including: According to the service quality level of the preset protocol corresponding to the environmental data, the message body corresponding to the environmental data is transmitted to the target device, so that the target device decompresses the compressed data packet according to the priority corresponding to the data type of the environmental data and through the compression algorithm corresponding to the environmental data.

8. The method according to claim 6, characterized in that The environmental data includes gas concentration data, the data type corresponding to the gas concentration data is a first data type, and the priority corresponding to the first data type is a high priority; The step of determining the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data includes: When the data type corresponding to the environment data is the first data type, determining that the compression algorithm corresponding to the environment data is the first compression algorithm; The determining, according to the priority corresponding to the data type of the environmental data, the service quality level of the preset protocol corresponding to the environmental data includes: In a case where the priority corresponding to the data type of the environmental data is a high priority, the quality of service level of the preset protocol corresponding to the environmental data is determined to be a first quality of service.

9. The method according to claim 8, characterized in that The environmental data includes environmental comfort data, the data type corresponding to the environmental comfort data is the second data type, and the priority corresponding to the second data type is a medium priority; The step of determining the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data includes: When the data type corresponding to the environment data is the second data type, determining that the compression algorithm corresponding to the environment data is the second compression algorithm; The determining, according to the priority corresponding to the data type of the environmental data, the service quality level of the preset protocol corresponding to the environmental data includes: When the priority corresponding to the data type of the environmental data is a medium priority, the service quality level of the preset protocol corresponding to the environmental data is determined to be a second service quality; the second service quality is lower than the first service quality.

10. The method according to claim 9, characterized in that The environmental data includes device status data, the data type corresponding to the device status data is a third data type, and the priority corresponding to the third data type is a low priority; The step of determining the compression algorithm corresponding to the environmental data according to the data type corresponding to the environmental data includes: When the data type corresponding to the environment data is the third data type, determining that the compression algorithm corresponding to the environment data is the third compression algorithm; The determining, according to the priority corresponding to the data type of the environmental data, the service quality level of the preset protocol corresponding to the environmental data includes: When the priority corresponding to the data type of the environmental data is a low priority, the service quality level of the preset protocol corresponding to the environmental data is determined to be a third service quality; the third service quality is lower than the second service quality.

11. A smart home data processing device, characterized in that: Applied to a smart device, the device comprises: An environmental data acquisition module is used to acquire environmental data and determine the data type corresponding to the environmental data and the priority corresponding to the data type of the environmental data; An environmental data identification module, used to determine a compression algorithm corresponding to the environmental data according to a data type corresponding to the environmental data; and to determine a service quality level of a preset protocol corresponding to the environmental data according to a priority corresponding to the data type of the environmental data; An environment data compression module, used to compress the environment data by using a compression algorithm corresponding to the environment data to obtain a compressed data packet corresponding to the environment data, and generate a message body corresponding to the environment data according to the compressed data packet corresponding to the environment data; The environment data transmission module is used to transmit the message body corresponding to the environment data to the target device according to the service quality level of the preset protocol corresponding to the environment data, so that the target device processes the compressed data packet.

12. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the steps of a smart home data processing method as described in any one of claims 6 to 10 are implemented.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps of a smart home data processing method as described in any one of claims 6 to 10 are implemented.

Citation Information

Cited By

  • Intelligent compression transmission method and system of message body

    CN121665294A