Data unvarnished transmission method and device of air conditioning system, electronic equipment and storage medium
By constructing multiple logical channels in the air conditioning system and dynamically adjusting the transmission strategy, the problems of data transmission delay and mixing in commercial air conditioning systems were solved, enabling real-time uploading of critical information and improving system stability.
Patent Information
- Application Number
- CN202511585703.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-31
- Publication Date
- 2026-03-10
AI Technical Summary
Commercial air conditioning systems lack separate processing logic and load sharing capabilities during data transmission, resulting in transmission delays and data mixing, which affects remote control effectiveness, reduces user experience, and slows down maintenance response.
Multiple logical channels are built between the gateway and the cloud server to route device data according to business type and priority, and to achieve isolated transmission of business data by dynamically adjusting the transmission strategy.
It improves the timeliness and stability of air conditioning system data, ensures that critical information is uploaded in a timely manner, reduces data latency and bandwidth conflicts, and improves the reliability of remote control.
Smart Images

Figure CN121644674A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet of Things (IoT) communication technology, and in particular to a data pass-through method for an air conditioning system, a data pass-through device for an air conditioning system, an electronic device, and a readable storage medium. Background Technology
[0002] In practical engineering applications, commercial air conditioning systems connect to a wide variety of terminal devices in large numbers. Gateways need to simultaneously process various types of data, including operational status reports, fault alarms, and remote control commands. However, during the concurrent transmission of this data, transmission delays can easily occur, critical information may not be uploaded in a timely manner, and data mixing can prevent QoS levels from taking effect as expected. This affects the effectiveness of remote control, potentially leading to a decline in user experience and delayed maintenance response. Summary of the Invention
[0003] The present invention provides a data pass-through method, apparatus, electronic device, and readable storage medium for an air conditioning system, in order to solve or partially solve the problems of lack of separate processing logic and burden sharing capability, as well as the inability to achieve channel isolation and transmission strategy optimization in the data pass-through process of the air conditioning system.
[0004] This invention discloses a data pass-through method for an air conditioning system, applied to a gateway in the air conditioning system. The air conditioning system also includes several air conditioning devices and a cloud server communicatively connected to the gateway. A data transmission connection is established between the gateway and the cloud server, and the data transmission connection includes several logical channels. The method includes: In response to receiving device data sent by the air conditioning device, the service type corresponding to the device data is obtained, and the device data is routed to the logical channel corresponding to the service type; Obtain the queue information and channel priority corresponding to the logical channel; The device data is transmitted to the cloud server according to the channel priority and the queue information.
[0005] Among some feasible implementation methods are: Obtain the network status parameters and performance parameters of the gateway; If the network status parameters meet the first preset adjustment conditions, the transmission rate corresponding to the logical channel is adjusted; and / or, if the performance parameters meet the second preset adjustment conditions, the transmission mode corresponding to the logical channel is adjusted.
[0006] In some feasible implementations, transmitting the device data to the cloud server according to the channel priority and the queue information includes: Target device data is selected from the device data according to the priority order corresponding to the channel priority and the queue information, wherein the target device data is the information with the highest priority; The target device data is transmitted to the cloud server.
[0007] In some feasible implementations, the logical channel includes at least one of an alarm channel, a control channel, and a status channel, wherein the alarm channel corresponds to a first channel priority, the control channel corresponds to a second channel priority, and the status channel corresponds to a third channel priority; wherein the priority order of the first channel priority, the second channel priority, and the third channel priority decreases sequentially; the queue information includes at least a waiting time, and the step of filtering target device data from the device data according to the priority order corresponding to the channel priorities and the queue information includes: If the alarm channel contains first device data, then the first device data is used as the target device data; If there is no device data in the alarm channel, but there is second device data in the control channel, then the second device data will be used as the target device data. If there is no device data in the alarm channel and no device data in the control channel, then the third device data in the status channel shall be used as the target device data. If there is no device data in the alarm channel, and there is a fourth device data in the control channel or the status channel with a waiting time reaching a preset threshold, then the fourth device data will be used as the target device data.
[0008] In some feasible implementations, after routing the device data to the logical channel corresponding to the service type, the method further includes: Configure QoS 2 for the device data in the alarm channel; Configure QoS 1 for the device data in the control channel; Configure QoS 0 for the device data in the status channel.
[0009] In some feasible implementations, the first device data includes at least alarm notification information and general reminder information, and the step of using the first device data as target device data includes: The alarm message is used as target device data.
[0010] In some feasible implementations, the second device data includes at least switching instruction information and function control instruction information, and the step of using the second device data as target device data includes: The switch command information is used as target device data.
[0011] In some feasible implementations, the network status parameters include at least one of network round-trip delay, packet loss rate, and retransmission count. The step of adjusting the transmission rate corresponding to the logical channel if the network status parameters meet a first preset adjustment condition includes: If at least one of the network round-trip delay, the packet loss rate, and the number of retransmissions indicates an anomaly in the current network, the transmission rate corresponding to the logical channel with the lowest channel priority is adjusted.
[0012] In some feasible implementations, the performance parameters include at least one of CPU utilization and memory utilization, the logical channel includes at least a status channel, and adjusting the transmission mode corresponding to the logical channel if the performance parameters meet a second preset adjustment condition includes: If the CPU utilization rate reaches a first preset threshold, and / or the memory utilization rate reaches a second preset threshold, then the device data in the status channel is compressed to obtain corresponding compression information.
[0013] Among some feasible implementation methods are: In response to receiving a configuration file from the cloud server, the system sets at least one of the QoS level, message threshold, and transmission interval of the logical channel according to the configuration file.
[0014] Among some feasible implementation methods are: Obtain the channel operation data corresponding to each of the logical channels; Upload the channel operation data to the cloud server; The channel operation data includes at least one of the following: cumulative number of messages sent, number of packet losses, number of retries, average network round-trip latency, maximum queue length, bandwidth usage, and the sending status of each message sent to the cloud server.
[0015] This invention also discloses a data pass-through device for an air conditioning system, applied to a gateway in the air conditioning system. The air conditioning system further includes several air conditioning devices and a cloud server communicatively connected to the gateway. A data transmission connection is established between the gateway and the cloud server, and the data transmission connection includes several logical channels. The device includes: The data routing module is used to respond to receiving device data sent by the air conditioning device, obtain the service type corresponding to the device data, and route the device data to the logical channel corresponding to the service type; The information acquisition module is used to acquire the queue information and channel priority corresponding to the logical channel; The transmission module is used to transmit the device data to the cloud server according to the channel priority and the queue information.
[0016] Among some feasible implementation methods are: The parameter acquisition module is used to acquire the network status parameters and performance parameters of the gateway. An adjustment module is used to adjust the transmission rate corresponding to the logical channel if the network status parameters meet a first preset adjustment condition; and / or, to adjust the transmission mode corresponding to the logical channel if the performance parameters meet a second preset adjustment condition.
[0017] In some feasible implementations, the transmission module is specifically used for: Target device data is selected from the device data according to the priority order corresponding to the channel priority and the queue information, wherein the target device data is the information with the highest priority; The target device data is transmitted to the cloud server.
[0018] In some feasible implementations, the logical channel includes at least one of an alarm channel, a control channel, and a status channel, wherein the alarm channel corresponds to a first channel priority, the control channel corresponds to a second channel priority, and the status channel corresponds to a third channel priority; wherein the priority order of the first channel priority, the second channel priority, and the third channel priority decreases sequentially; the queue information includes at least a waiting time, and the transmission module is specifically used for: If the alarm channel contains first device data, then the first device data is used as the target device data; If there is no device data in the alarm channel, but there is second device data in the control channel, then the second device data will be used as the target device data. If there is no device data in the alarm channel and no device data in the control channel, then the third device data in the status channel shall be used as the target device data. If there is no device data in the alarm channel, and there is a fourth device data in the control channel or the status channel with a waiting time reaching a preset threshold, then the fourth device data will be used as the target device data.
[0019] In some feasible implementations, the apparatus further includes: Configuration module, used for: Configure QoS 2 for the device data in the alarm channel; Configure QoS 1 for the device data in the control channel; Configure QoS 0 for the device data in the status channel.
[0020] In some feasible implementations, the first device data includes at least alarm notification information and general reminder information, and the transmission module is specifically used for: The alarm message is used as target device data.
[0021] In some feasible implementations, the second device data includes at least switching instruction information and function control instruction information, and the transmission module is specifically used for: The switch command information is used as target device data.
[0022] In some feasible implementations, the network state parameters include at least one of network round-trip delay, packet loss rate, and retransmission count, and the adjustment module is specifically used for: If at least one of the network round-trip delay, the packet loss rate, and the number of retransmissions indicates an anomaly in the current network, the transmission rate corresponding to the logical channel with the lowest channel priority is adjusted.
[0023] In some feasible implementations, the performance parameters include at least one of CPU utilization and memory utilization, the logical channel includes at least a status channel, and the adjustment module is specifically used for: If the CPU utilization rate reaches a first preset threshold, and / or the memory utilization rate reaches a second preset threshold, then the device data in the status channel is compressed to obtain corresponding compression information.
[0024] Among some feasible implementation methods are: The configuration module is used to respond to receiving a configuration file sent by the cloud server and set at least one of the QoS level, message threshold, and sending interval of the logical channel according to the configuration file.
[0025] Among some feasible implementation methods are: The data acquisition module is used to acquire the channel operation data corresponding to each of the logical channels; The data upload module is used to upload the channel operation data to the cloud server; The channel operation data includes at least one of the following: cumulative number of messages sent, number of packet losses, number of retries, average network round-trip latency, maximum queue length, bandwidth usage, and the sending status of each message sent to the cloud server.
[0026] This invention also discloses an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; The memory is used to store computer programs; When the processor executes a program stored in the memory, it implements the method described in the embodiments of the present invention.
[0027] This invention also discloses a readable storage medium storing instructions that, when executed by one or more processors, cause the processors to perform the method described in this invention.
[0028] The embodiments of the present invention have the following advantages: In this embodiment of the invention, a gateway is applied to an air conditioning system. The air conditioning system also includes several air conditioning devices and a cloud server that are communicatively connected to the gateway. A data transmission connection is established between the gateway and the cloud server. This data transmission connection includes several logical channels. When an air conditioning device sends corresponding device data to the gateway, the gateway can respond by receiving the device data, obtaining the service type corresponding to the device data, routing the device data to the logical channel corresponding to the service type, obtaining the queue information and channel priority corresponding to the logical channel, and then transmitting the device data to the cloud server according to the channel priority and queue information. This achieves isolated transmission of business data by establishing multiple logical channels in the data transmission connection of the air conditioning system, breaking the limitations of a single-channel architecture. Furthermore, during data transmission, the gateway can dynamically adjust the data upload strategy based on queue information and channel priority, thereby improving the data timeliness and stability of the entire system. Attached Figure Description
[0029] Figure 1 This is a flowchart illustrating the steps of a data pass-through method for an air conditioning system provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the data pass-through process provided in an embodiment of the present invention; Figure 3 This is a structural block diagram of a data transmission device for an air conditioning system provided in an embodiment of the present invention. Detailed Implementation
[0030] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0031] As an example, in practical engineering applications, air conditioning systems typically involve a wide variety and large number of terminal devices. The gateway needs to simultaneously process multiple types of data, including operational status reports, fault alarms, and remote control commands. When these messages are transmitted concurrently on the same data transmission channel, the following problems often arise: First, transmission latency increases, leading to untimely uploading of critical alarm information; second, control commands are mixed with ordinary operational status data, potentially causing QoS levels to fail to take effect as expected, affecting remote control performance, and consequently, easily leading to a decline in user experience and delayed maintenance response.
[0032] In this invention, a data transmission connection is established between the gateway and the cloud server, and several logical channels are built within this connection. When the air conditioning device sends corresponding device data to the gateway, the gateway can respond by receiving the data, obtaining the service type corresponding to the data, routing the data to the logical channel corresponding to the service type, obtaining the queue information and channel priority of the logical channel, and then transmitting the data to the cloud server based on the channel priority and queue information. This achieves isolated transmission of business data by building multiple logical channels in the data transmission connection of the air conditioning system, breaking the limitations of a single-channel architecture. Furthermore, during data transmission, the gateway can dynamically adjust the data upload strategy based on queue information and channel priority, thereby improving the timeliness and stability of the entire system.
[0033] Reference Figure 1 This diagram illustrates a flowchart of a data pass-through method for an air conditioning system provided in an embodiment of the present invention. The method is applied to a gateway in an air conditioning system, which also includes several air conditioning devices and a cloud server communicatively connected to the gateway. The gateway and the cloud server establish a data transmission connection, which includes several logical channels and may specifically include the following steps: Step 101: In response to receiving device data sent by the air conditioning device, obtain the service type corresponding to the device data, and route the device data to the logical channel corresponding to the service type; The air conditioning system may include several air conditioning units, a gateway communicating with each air conditioning unit, and a cloud server communicating with the gateway. A data transmission connection, such as an MQTT connection, can be established between the gateway and the cloud server. Furthermore, this data transmission connection can also include several logical channels for transmitting different types of data, such as an alarm channel for transmitting alarm data, a control channel for transmitting control commands, a status channel for transmitting status data, an energy consumption channel for transmitting energy consumption data, and a user channel for transmitting user preference data. This invention does not impose any limitations on these aspects.
[0034] In some feasible implementations, after startup, the gateway can establish an MQTT physical connection and build several different logical channels on this connection. These logical channels can correspond to services such as operating status, control commands, and fault alarms. Each logical channel can be configured with an independent buffer and bound to preset topic rules (e.g., / deviceID / status, / deviceID / alarm, / deviceID / command). When the air conditioning device transmits corresponding device data to the gateway, it can attach corresponding channel identifiers and priority information based on the service type. This allows the gateway to route the device data to the buffer of the logical channel corresponding to the service type, achieving isolated transmission of service data. This breaks the limitations of a single-channel architecture, enabling the gateway to dynamically adjust the data upload strategy based on queue information and channel priorities during subsequent data uploads, thereby improving the timeliness and stability of the entire system.
[0035] For example, assuming that device data includes status data, alarm data, and control data, and logical channels include status channels, alarm channels, and control channels, when the air conditioning device transmits the corresponding device data to the gateway, the gateway can route the device data to the corresponding logical channel according to the service type of the device data. This includes routing status data to the status channel, alarm data to the alarm channel, and control data to the control channel, thereby achieving isolated transmission of service data and breaking the limitations of a single-channel architecture.
[0036] Furthermore, after the gateway routes device data to the logical channel corresponding to the service type, it can also add corresponding QoS level identifiers to the device data according to the service type. For example, QoS2 can be configured for device data in the alarm channel to ensure reliable delivery; QoS1 can be configured for device data in the control channel to balance response speed and reliability; and QoS0 can be configured for device data in the status channel to save bandwidth. In this way, the corresponding QoS level can be configured for different service data according to the service scenario, so as to realize the isolated transmission of service data and break the limitations of the single channel architecture.
[0037] Step 102: Obtain the queue information and channel priority corresponding to the logical channel; Since each logical channel has an independent buffer area that stores device data received from the air conditioning equipment, the gateway can upload the device data in the buffer area to the cloud server according to the corresponding transmission strategy so that the cloud server can further process the received device data.
[0038] For device data in the cache corresponding to a logical channel, the gateway can obtain the queue information corresponding to the cache. This queue information can be used to characterize the real-time status data and statistical indicators of the cache, and it can at least include the queue capacity and the waiting time for each piece of device data. The queue capacity represents the upper limit of device data that can be cached in the cache, while the waiting time represents the duration for which device data is stored in the cache. Based on the queue capacity and the waiting time, the gateway can determine the corresponding upload strategy and then upload the device data in the logical channel to the cloud server based on the upload strategy. For example, when the queue capacity is full, the gateway can upload the device data cached in the logical channel to the cloud server; or, when the waiting time of device data in the cache reaches a threshold, the gateway can upload the device data that has reached the threshold to the cloud server, etc. This invention does not impose any limitations on this.
[0039] In addition to upload policies for individual logical channels, the gateway can set different channel priorities for different logical channels. This allows for differentiated processing strategies for business data based on different channel priorities, improving the reachability of priority data in complex environments, reducing bandwidth conflicts between different types of business data, and improving data timeliness.
[0040] For example, the alarm channel, which receives all fault and anomaly information and requires timely processing, can be set as the first priority channel. The control channel, used for responding to and confirming control commands, can transmit control data in a manner that balances response speed and reliability, thus it can be set as the second priority channel. The status channel, used for receiving periodic status heartbeats and routine telemetry data, represents the status of the air conditioning equipment and can be processed at a lower priority, thus it can be set as the third priority channel. The priority order of the first, second, and third channels decreases sequentially. That is, when the alarm, control, and status channels all cache corresponding device data, the gateway can upload the corresponding device data to the cloud server in the order of alarm, control, and status channels.
[0041] Step 103: Transmit the device data to the cloud server according to the channel priority and the queue information.
[0042] After obtaining the corresponding channel priority and queue information, the gateway can determine the upload order of the device data cached in each logical channel based on the channel priority and queue information. Then, it transmits the device data to the cloud server according to the corresponding upload order, so that the cloud server can further perform corresponding data processing on the received device data. By building multiple logical channels in the data transmission connection of the air conditioning system, isolated transmission of business data is achieved, breaking the limitations of the single-channel architecture. At the same time, during the data transmission process, the gateway can dynamically adjust the data upload strategy according to the queue information and channel priority, thereby improving the data timeliness and stability of the entire system.
[0043] In some feasible implementations, the gateway can filter target device data from the device data according to the priority order corresponding to the channel priority and the queue information. The target device data is the information with the highest priority. Then, the target device data is transmitted to the cloud server. By filtering out the device data with the highest current priority for uploading, the reachability of high-priority data in complex environments is effectively improved, the delay and failure caused by bandwidth congestion between different types of data is reduced, and the timeliness and stability of the data are improved.
[0044] In this embodiment of the invention, the logical channel includes at least one of an alarm channel, a control channel, and a status channel. The alarm channel corresponds to a first channel priority, the control channel corresponds to a second channel priority, and the status channel corresponds to a third channel priority. The priority order of the first channel priority, the second channel priority, and the third channel priority decreases sequentially. The queue information includes at least the waiting time. Assuming a normal network connection, when the gateway filters out the highest priority device data, it can determine the highest priority device data based on the channel priority. Specifically, if the alarm channel contains first device data, it is used as the target device data; if the alarm channel does not contain any device data, but the control channel contains second device data, it is used as the target device data; if neither the alarm channel nor the control channel contains any device data, the third device data in the status channel is used as the target device data, and so on. By filtering out the highest priority device data for uploading, the reachability of high-priority data in complex environments is effectively improved, delays and failures due to bandwidth congestion between different service types of data are reduced, and the timeliness and stability of the data are improved.
[0045] In addition, if there is no device data in the alarm channel, but there is a fourth device data in the control channel or status channel with a waiting time that reaches a preset threshold, the fourth device data will be used as the target device data. By detecting the waiting time of the device data, the corresponding device data can be temporarily used as the highest priority device data and uploaded first to avoid the data from becoming "aged" and invalid, thereby improving the timeliness of the data.
[0046] It should be noted that the queue information may also include the current queue length, which represents the amount of device data currently stored in the buffer. In some feasible implementations, the current queue length can be used to trigger the switching of adjustment strategies. When the current queue length of the buffer corresponding to the logical channel reaches a preset threshold, or reaches the preset threshold and continues for the target duration, it indicates that the data in the buffer has not been uploaded in time. The reason may be that the network bandwidth cannot meet the instant transmission of all data. In this case, the gateway is triggered to adjust the detection threshold corresponding to the waiting time in the buffer. For example, the original waiting time of 30 seconds to trigger the upload is changed to waiting time of 40 seconds to increase the waiting time of device data in the buffer, thereby reducing the upload rate of device data in the buffer. This ensures that other higher priority data can be uploaded first, further improving the adaptability of the sending strategy. While ensuring real-time performance, it also takes into account the overall throughput and fairness of the system.
[0047] In addition to prioritizing different logical channels, the system can further filter the device data cached within the same logical channel to identify those that require priority upload. For example, the first device data includes at least alarm notifications and general reminders. Alarm notifications indicate device operating status, while general reminders indicate cleaning-related information. The former has higher priority than the latter. Therefore, when both alarm notifications and general reminders are cached in the alarm channel, the alarm notifications can be used as the target device data. Similarly, the second device data includes at least switch command information and function control command information. Switch command information indicates the on / off command of the air conditioner, while function control command information indicates the command to turn on, off, or adjust a target function of the air conditioner. The former has higher priority than the latter. Therefore, when both switch command information and function control command information exist in the control channel, the gateway can use the switch command information as the target device data. This ensures that critical information within the same logical channel is prioritized for processing and is not overwhelmed by lower-priority device data, effectively guaranteeing data timeliness.
[0048] For example, when the alarm channel simultaneously caches "compressor overload alarm" and "filter cleaning reminder", the "compressor overload alarm" can be used as the highest priority device data; when the control channel simultaneously caches "emergency stop command" and "fan speed adjustment command", the "emergency stop command" can be used as the highest priority device data, etc. This invention does not limit this.
[0049] Furthermore, during the process of the gateway transmitting device data to the cloud server, the built-in link detection module of the gateway can obtain the network status parameters and performance parameters of the gateway in real time. Based on the network status parameters and / or performance parameters, the transmission rate and / or transmission method of the device data can be dynamically adjusted. This allows the gateway to dynamically adjust the sending rhythm of device data according to the actual network conditions and performance, thereby improving the reachability of device data in complex environments and reducing bandwidth congestion between different data.
[0050] In some feasible implementations, if the network status parameters meet a first preset adjustment condition, the transmission rate corresponding to the logical channel is adjusted; and / or, if the performance parameters meet a second preset adjustment condition, the transmission mode corresponding to the logical channel is adjusted. The network status parameters include at least one of network round-trip delay, packet loss rate, and retransmission count. If at least one of these parameters indicates an anomaly in the current network, the transmission rate corresponding to the logical channel with the lowest channel priority is adjusted. Furthermore, the performance parameters include at least one of CPU utilization and memory utilization. The logical channel includes at least a status channel. If the CPU utilization reaches a first preset threshold, and / or the memory utilization reaches a second preset threshold, the device data in the status channel is compressed to obtain corresponding compression information.
[0051] It should be noted that for logical channels, device data in alarm channels is not merged; it is transmitted as a single message to ensure timeliness. Device data in control channels can only be merged for transmission when the gateway is in a high-latency network. For example, when device data enters the logical channel cache, if the gateway detects high performance load, it can trigger a compression / merging strategy. This involves batch packaging compressible data to obtain corresponding JSON data, which is then uploaded to the cloud server, thereby improving the throughput of the link.
[0052] In some examples, for network round-trip latency, when the network round-trip latency continues to exceed 2-3 times the target duration of the baseline for a sustained period, indicating a continuous upward trend in network round-trip latency, it can be determined as network congestion; or, if the network round-trip latency changes drastically, such as rising to 500ms and remaining at the target duration before quickly falling back to the baseline level, it can be determined as network jitter.
[0053] Packet loss rate represents the proportion of sent data packets that fail to receive acknowledgments. If the packet loss rate is consistently higher than 1-5%, it can be determined that network congestion has occurred. For example, if the packet loss rate experiences a sudden peak and quickly returns to zero, it can be determined that network jitter has occurred.
[0054] The retransmission count represents the number of times a data packet is retransmitted without receiving an acknowledgment (timeout). It is a direct result of network congestion and packet loss. If the retransmission count is greater than or equal to a preset threshold, it can be determined that network congestion has occurred. If a brief retransmission burst occurs, it can be determined that network jitter has occurred.
[0055] It should be noted that when network congestion or jitter occurs, the gateway scheduler can limit the sending rate of low-priority data to ensure that high-priority data is uploaded first. For example, it can limit the sending rate of status data to ensure that alarm data and control data can be uploaded to the cloud server in a timely manner.
[0056] In another example, CPU utilization and memory utilization are mainly used to determine whether to trigger batch data merging. When CPU utilization and memory utilization indicate that the gateway is currently under high load, a batch compression or merging mechanism can be triggered to improve the throughput of the link.
[0057] Furthermore, for the logical channel between the gateway and the cloud server, the cloud server can configure the channel parameters by distributing configuration files. Optionally, the gateway can respond to the configuration file sent by the cloud server and set at least one of the following parameters for the logical channel: QoS level, message threshold, and sending interval. This enables remote policy configuration and hot switching of the channel, improving the flexibility of data transmission and allowing the logical channel to be adaptively adjusted according to actual data processing needs, thus enhancing the adaptability of data transmission. Optionally, the gateway can complete parameter switching without restarting after receiving the configuration, thereby achieving online optimization. For example, when a large number of alarms occur, the priority of the alarm channel can be temporarily increased to ensure its transmission stability.
[0058] In some examples, different channels have different configurations depending on the actual scenario requirements: Status channel: The trigger threshold can be set to "trigger a transmission once every 100 cached entries or 30 seconds", with a longer transmission interval to save bandwidth; Alarm channel: The threshold is usually 1 (immediate upload), and the transmission interval is close to real-time; Control channel: The trigger threshold is lower (e.g., 3 entries), and the transmission interval is 100~200ms, balancing real-time performance and bandwidth.
[0059] For example, if 10 air conditioners report their operating temperatures at the same time, the status channel can wait 30 seconds or accumulate 100 reports before sending them all at once. However, if an air conditioner compressor fails, the alarm channel will immediately send a single report.
[0060] In addition, the air conditioning system can record the corresponding sending status for each message and periodically upload the corresponding channel operation data to the cloud server for analysis and optimization. Optionally, the gateway can obtain the channel operation data corresponding to each logical channel and then upload the channel operation data to the cloud server. The channel operation data includes at least one of the following: cumulative number of messages sent, number of packet losses, number of retries, average network round-trip latency, maximum queue length, bandwidth usage, and the sending status of each message sent to the cloud server.
[0061] It should be noted that the above embodiments use MQTT connections as an example for illustrative purposes. It is understood that this can also be applied to WebSocket long-connection protocols to adapt to browser front-end requirements and achieve bidirectional data communication. Furthermore, a corresponding encryption layer can be extended within the gateway to further enhance the security of distributed data transmission, etc. This invention does not limit these possibilities.
[0062] In this embodiment of the invention, a gateway is applied to an air conditioning system. The air conditioning system also includes several air conditioning devices and a cloud server that are communicatively connected to the gateway. A data transmission connection is established between the gateway and the cloud server. This data transmission connection includes several logical channels. When an air conditioning device sends corresponding device data to the gateway, the gateway can respond by receiving the device data, obtaining the service type corresponding to the device data, routing the device data to the logical channel corresponding to the service type, obtaining the queue information and channel priority corresponding to the logical channel, and then transmitting the device data to the cloud server according to the channel priority and queue information. This achieves isolated transmission of business data by establishing multiple logical channels in the data transmission connection of the air conditioning system, breaking the limitations of a single-channel architecture. Furthermore, during data transmission, the gateway can dynamically adjust the data upload strategy based on queue information and channel priority, thereby improving the data timeliness and stability of the entire system.
[0063] To enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the following examples are provided for illustrative purposes: As an example, refer to Figure 2 The diagram illustrates a data pass-through process provided in an embodiment of the present invention. The specific process may include: Step 1: Logical channel initialization and channel identifier generation Upon startup, the gateway first establishes a physical MQTT connection. Based on this, it constructs several logical channels, each corresponding to different services such as running status, control commands, and fault alarms. Each logical channel is equipped with an independent buffer and is bound to preset topic rules (e.g., / deviceID / status, / deviceID / alarm, / deviceID / command). Simultaneously, when generating messages, the system appends channel identifiers and priority information based on the service type to facilitate subsequent scheduling.
[0064] Step 2: Message Scheduling and QoS Policy Settings Within each logical channel, the system maintains an independent message queue and sets corresponding QoS policies for different types of data. For example, status data uses QoS0 to save bandwidth; fault alarms use QoS2 to ensure reliable delivery; and control commands use QoS1 to balance response speed and reliability. The message scheduler can determine the sending order and rate of various message types by referring to priority, queue length, message waiting time, and channel load.
[0065] Step 3: Link Status Monitoring and Dynamic Load Balancing The gateway's built-in link detection module continuously collects metrics such as RTT, packet loss rate, and retransmission count. When network congestion or fluctuations are detected, the scheduler automatically reduces the transmission rate of low-priority channels, prioritizing bandwidth for alarm and control channels. If the system is under high load, it will also trigger batch compression or merging mechanisms to improve link throughput.
[0066] Step 4: Remote policy configuration and channel hot-switching The cloud-based operations and maintenance platform can adjust the QoS level, message threshold, or sending interval of logical channels by distributing configuration files. The gateway can switch parameters without restarting after receiving the configuration, thus achieving online optimization. For example, when a large number of alarms occur, the priority of the alarm channel can be temporarily increased to ensure stable transmission.
[0067] Step 5: Message Status Feedback and Channel Disaster Recovery Mechanism The system sends a status update (success, failure, or retry) for each message record and periodically uploads channel operation data to the cloud for analysis and optimization. If the primary MQTT server is detected to be faulty, the gateway will automatically switch to the backup server and maintain logical channel mapping consistency to avoid data transmission interruption.
[0068] In the above process, a logical channel distribution mechanism enables isolated transmission of business data, overcoming the limitations of the MQTT single-channel architecture. This allows critical data (such as alarm information) to be uploaded instantly, and status data to be uploaded in batches, improving the overall system's data timeliness and stability. Simultaneously, by integrating message priority strategies and link status feedback mechanisms, a dynamic scheduling algorithm is formed. This algorithm dynamically adjusts the sending rhythm and channel resource usage based on actual network conditions, improving the reachability of high-priority data in complex network environments and preventing control commands and alarm information from being delayed or invalidated due to bandwidth congestion.
[0069] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0070] Reference Figure 3 This diagram illustrates a structural block diagram of a data pass-through device for an air conditioning system provided in an embodiment of the present invention. The device is applied to a gateway in an air conditioning system, which also includes several air conditioning devices and a cloud server communicatively connected to the gateway. A data transmission connection is established between the gateway and the cloud server, and this connection includes several logical channels, specifically including the following modules: The data routing module 301 is used to, in response to receiving device data sent by the air conditioning device, obtain the service type corresponding to the device data and route the device data to the logical channel corresponding to the service type; Information acquisition module 302 is used to acquire queue information and channel priority corresponding to the logical channel; The transmission module 303 is used to transmit the device data to the cloud server according to the channel priority and the queue information.
[0071] Among some feasible implementation methods are: The parameter acquisition module is used to acquire the network status parameters and performance parameters of the gateway. An adjustment module is used to adjust the transmission rate corresponding to the logical channel if the network status parameters meet a first preset adjustment condition; and / or, to adjust the transmission mode corresponding to the logical channel if the performance parameters meet a second preset adjustment condition.
[0072] In some feasible implementations, the transmission module 303 is specifically used for: Target device data is selected from the device data according to the priority order corresponding to the channel priority and the queue information, wherein the target device data is the information with the highest priority; The target device data is transmitted to the cloud server.
[0073] In some feasible implementations, the logical channel includes at least one of an alarm channel, a control channel, and a status channel, wherein the alarm channel corresponds to a first channel priority, the control channel corresponds to a second channel priority, and the status channel corresponds to a third channel priority; wherein the priority of the first channel priority, the second channel priority, and the third channel priority decreases sequentially; the queue information includes at least a waiting time, and the transmission module 303 is specifically used for: If the alarm channel contains first device data, then the first device data is used as the target device data; If there is no device data in the alarm channel, but there is second device data in the control channel, then the second device data will be used as the target device data. If there is no device data in the alarm channel and no device data in the control channel, then the third device data in the status channel shall be used as the target device data. If there is no device data in the alarm channel, and there is a fourth device data in the control channel or the status channel with a waiting time reaching a preset threshold, then the fourth device data will be used as the target device data.
[0074] In some feasible implementations, the apparatus further includes: Configuration module, used for: Configure QoS 2 for the device data in the alarm channel; Configure QoS 1 for the device data in the control channel; Configure QoS 0 for the device data in the status channel.
[0075] In some feasible implementations, the first device data includes at least alarm notification information and general reminder information, and the transmission module 303 is specifically used for: The alarm message is used as target device data.
[0076] In some feasible implementations, the second device data includes at least switching instruction information and function control instruction information, and the transmission module 303 is specifically used for: The switch command information is used as target device data.
[0077] In some feasible implementations, the network state parameters include at least one of network round-trip delay, packet loss rate, and retransmission count, and the adjustment module is specifically used for: If at least one of the network round-trip delay, the packet loss rate, and the number of retransmissions indicates an anomaly in the current network, the transmission rate corresponding to the logical channel with the lowest channel priority is adjusted.
[0078] In some feasible implementations, the performance parameters include at least one of CPU utilization and memory utilization, the logical channel includes at least a status channel, and the adjustment module is specifically used for: If the CPU utilization rate reaches a first preset threshold, and / or the memory utilization rate reaches a second preset threshold, then the device data in the status channel is compressed to obtain corresponding compression information.
[0079] Among some feasible implementation methods are: The configuration module is used to respond to receiving a configuration file sent by the cloud server and set at least one of the QoS level, message threshold, and sending interval of the logical channel according to the configuration file.
[0080] Among some feasible implementation methods are: The data acquisition module is used to acquire the channel operation data corresponding to each of the logical channels; The data upload module is used to upload the channel operation data to the cloud server; The channel operation data includes at least one of the following: cumulative number of messages sent, number of packet losses, number of retries, average network round-trip latency, maximum queue length, bandwidth usage, and the sending status of each message sent to the cloud server.
[0081] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0082] In addition, this invention also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the various processes of the above-described data pass-through method embodiment for the air conditioning system and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0083] This invention also provides a readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the data transmission method embodiment for the air conditioning system described above, achieving the same technical effect. To avoid repetition, it will not be described again here. The readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0084] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0085] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, EEPROM, Flash, and eMMC, etc.) containing computer-usable program code.
[0086] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0087] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0088] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0089] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0090] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0091] The above provides a detailed description of a data transmission method and a data transmission device for an air conditioning system provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A data pass-through method of an air conditioning system, the method comprising: The gateway applied to an air conditioning system, the air conditioning system further comprising a plurality of air conditioning devices and a cloud server in communication connection with the gateway; wherein a data transmission connection is built between the gateway and the cloud server, the data transmission connection comprising a plurality of logical channels, and the method comprises: In response to receiving the device data sent by the air conditioning device, obtaining the service type corresponding to the device data, and routing the device data to the logical channel corresponding to the service type; Obtaining the queue information and the channel priority corresponding to the logical channel; According to the channel priority and the queue information, the device data is transmitted to the cloud server.
2. The method of claim 1, wherein, Further comprising: Obtaining the network state parameters and performance parameters of the gateway; If the network state parameters meet the first preset adjustment condition, adjust the transmission rate corresponding to the logical channel; And / or, if the performance parameters meet the second preset adjustment condition, adjust the transmission mode corresponding to the logical channel.
3. The method according to claim 1 or 2, characterized in that, According to the channel priority and the queue information, the device data is transmitted to the cloud server, comprising: According to the priority order corresponding to the channel priority and the queue information, the target device data is screened out from the device data, and the target device data is the highest priority information; The target device data is transmitted to the cloud server.
4. The method of claim 3, wherein, The logical channel at least includes one of an alarm channel, a control channel and a state channel, the alarm channel corresponds to a first channel priority, the control channel corresponds to a second channel priority, and the state channel corresponds to a third channel priority; wherein the priority order corresponding to the first channel priority, the second channel priority and the third channel priority decreases in turn; the queue information at least includes waiting time, and the target device data is screened out from the device data according to the priority order corresponding to the channel priority and the queue information, comprising: If there is first device data in the alarm channel, the first device data is taken as the target device data; If there is no device data in the alarm channel, and there is second device data in the control channel, the second device data is taken as the target device data; If there is no device data in the alarm channel, and there is also no device data in the control channel, the third device data in the state channel is taken as the target device data; If there is no device data in the alarm channel, and there is fourth device data in the control channel or the state channel, the fourth device data is taken as the target device data.
5. The method of claim 4, wherein, After the device data is routed to the logical channel corresponding to the service type, the method further comprises: Configuring QoS 2 for the device data in the alarm channel; Configuring QoS 1 for the device data in the control channel; Configuring QoS 0 for the device data in the state channel.
6. The method of claim 4, wherein, The first device data at least includes alarm prompt information and ordinary prompt information, and the first device data is taken as the target device data, comprising: The alarm prompt information is taken as target device data.
7. The method of claim 4, wherein, The second device data at least includes switch instruction information and function control instruction information, and the second device data is taken as target device data, which includes: The switch instruction information is taken as target device data.
8. The method of claim 2, wherein, The network state parameter at least includes one of network round-trip delay, packet loss rate and retransmission number, and if the network state parameter meets a first preset adjustment condition, the transmission rate corresponding to the logical channel is adjusted, which includes: If at least one of the network round-trip delay, the packet loss rate and the retransmission number represents that the current network is abnormal, the transmission rate corresponding to the logical channel with the lowest channel priority is adjusted.
9. The method of claim 2, wherein, The performance parameter at least includes one of CPU occupancy rate and memory occupancy rate, and the logical channel at least includes a state channel, and if the performance parameter meets a second preset adjustment condition, the transmission mode corresponding to the logical channel is adjusted, which includes: If the CPU occupancy rate reaches a first preset threshold value, and / or the memory occupancy rate reaches a second preset threshold value, the device data in the state channel is compressed to obtain corresponding compression information.
10. The method of claim 1, wherein, Further comprising: In response to receiving the configuration file sent by the cloud server, at least one of the QoS level, the message threshold value and the sending interval of the logical channel is set according to the configuration file.
11. The method of claim 1, wherein, Further comprising: Obtaining channel running data corresponding to each logical channel; Uploading the channel running data to the cloud server; The channel running data at least includes one of cumulative number of sent messages, number of lost packets, number of retries, average network round-trip delay, maximum queue length, bandwidth occupancy and sending state corresponding to each message sent to the cloud server.
12. A data pass-through device of an air conditioning system, characterized by, The gateway is applied to an air conditioning system, the air conditioning system further includes a plurality of air conditioning devices and a cloud server in communication connection with the gateway; wherein a data transmission connection is constructed between the gateway and the cloud server, the data transmission connection includes a plurality of logical channels, and the device includes: A data routing module is configured to, in response to receiving device data sent by the air conditioning device, obtain a service type corresponding to the device data, and route the device data to a logical channel corresponding to the service type; An information acquisition module is configured to obtain queue information and channel priority corresponding to the logical channel; A transmission module is configured to transmit the device data to the cloud server according to the channel priority and the queue information.
13. An electronic device, comprising: The device includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus; The memory is used to store a computer program; The processor is used to execute the program stored on the memory to implement the method of any one of claims 1-11.
14. A readable storage medium having instructions stored thereon, when the instructions are executed by one or more processors, the processors execute the method of any one of claims 1-11.
Citation Information
Patent Citations
MQTT protocol communication method for mass message transmission of power distribution Internet of Things
CN113194133A
Mass data cross-security domain transmission high-low priority queue hierarchical scheduling method based on Internet of Things equipment
CN120750876A
Data transmission method and device of Internet of Things equipment, electronic equipment and storage medium
CN120751436A
Prioritized Message Routing
US20200127911A1