A method, apparatus, device and storage medium for data transmission
By using aggregation nodes in the home network to collect and combine heartbeat messages from smart home devices, the problem of bandwidth waste is solved, bandwidth utilization and device reliability are improved, while system costs and ecosystem barriers are reduced.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILEHANGZHOUINFORMATION TECH CO LTD
- Filing Date
- 2023-01-28
- Publication Date
- 2026-08-04
AI Technical Summary
In home networks, the increased number of smart home devices results in heartbeat message payloads that are much smaller than the minimum Ethernet packet length, causing serious bandwidth waste and uplink bandwidth congestion. Existing technologies cannot effectively solve this problem.
By sending time slices to smart home devices from the aggregation node side, the payload information of heartbeat messages is collected and combined to form a longer combined message, which is then sent to the IoT platform, thereby improving the message payload ratio and reducing uplink data redundancy.
It improves bandwidth utilization, saves uplink bandwidth, reduces system costs, and enhances the reliability and control success rate of smart home devices by dynamically adjusting the heartbeat cycle, breaking down the ecosystem barriers between different manufacturers.
Smart Images

Figure CN116915874B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet of Things (IoT) technology, and in particular to a method, apparatus, device, and storage medium for data transmission. Background Technology
[0002] In a home network, smart home devices can directly connect to the Internet of Things (IoT) platform after being configured with the network, and can maintain the connection with the IoT platform through periodic uplink (such as heartbeat) messages.
[0003] With the development of smart home technology, the number of smart home devices in home networks has increased significantly. In this situation, there will be a large number of heartbeat messages (heartbeat packets) sent from smart home devices to the Internet of Things (IoT) platform. Since the payload of the heartbeat message is much smaller than the minimum Ethernet packet length, this results in serious bandwidth waste. Summary of the Invention
[0004] This application provides at least one method, apparatus, device, and storage medium for data transmission.
[0005] The technical solution of this application is implemented as follows:
[0006] In a first aspect, embodiments of this application provide a data transmission method applied to an aggregation node. The method includes: periodically sending a first time slice to at least one smart home device under a first Internet of Things (IoT) platform, wherein the first time slice is used to instruct at least one smart home device to send a heartbeat message to the aggregation node within the first time slice; receiving heartbeat messages from at least one smart home device within the first time slice; combining the payload information in each heartbeat message within the first time slice to obtain a combined message; and sending the combined message to the first IoT platform.
[0007] Secondly, embodiments of this application provide a data transmission apparatus, comprising: a first transmitting module, configured to periodically transmit a first time slice to at least one smart home device under a first Internet of Things (IoT) platform, the first time slice being used to instruct at least one smart home device to send a heartbeat message to the apparatus within the first time slice; a first receiving module, configured to receive heartbeat messages from at least one smart home device within the first time slice; a combining module, configured to combine the payload information in each heartbeat message within the first time slice to obtain a combined message; and a second transmitting module, configured to transmit the combined message to the first IoT platform.
[0008] Thirdly, embodiments of this application provide a data transmission device, which includes a memory and a processor; wherein the memory is used to store computer-executable instructions; and the processor is connected to the memory and is used to implement the method described in the first aspect by executing the computer-executable instructions.
[0009] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by at least one processor, implements the method described in the first aspect.
[0010] This application provides a data transmission method, apparatus, device, and storage medium. On the aggregation node side, a first time slice is periodically sent to at least one smart home device under a first Internet of Things (IoT) platform. The first time slice is used to instruct the at least one smart home device to send a heartbeat message to the aggregation node within the first time slice. The method also receives heartbeat messages from the at least one smart home device within the first time slice; combines the payload information in each heartbeat message within the first time slice to obtain a combined message; and sends the combined message to the first IoT platform. This method, by combining the payload information in all heartbeat messages within the first time slice, increases the length of the message payload portion, thereby obtaining a combined message with a higher payload ratio. This improves bandwidth utilization and saves uplink bandwidth.
[0011] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of this application. Attached Figure Description
[0012] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.
[0013] Figure 1 This is a schematic diagram of a message format in the MQTT protocol;
[0014] Figure 2 A flowchart illustrating a data transmission method provided in an embodiment of this application;
[0015] Figure 3 This is a schematic diagram of a possible implementation flow of the data transmission method provided in the embodiments of this application;
[0016] Figure 4 This is a schematic diagram illustrating an example of the storage information of an aggregation node in an embodiment of this application;
[0017] Figure 5 A schematic diagram illustrating the structural composition of a data transmission device provided in an embodiment of this application;
[0018] Figure 6 This is a schematic diagram of a hardware entity of a data transmission device in an embodiment of this application. Detailed Implementation
[0019] In order to gain a more detailed understanding of the features and technical content of the embodiments of this application, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference and illustration only and are not intended to limit the embodiments of this application.
[0020] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.
[0021] In the following description, references to "some embodiments" refer to a subset of all possible embodiments. It is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. It should also be noted that the terms "first, second, third" used in the embodiments of this application are merely for distinguishing similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0022] It should be understood that the term "and / or" in the embodiments of this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. In addition, the character " / " in this document generally indicates that the related objects before and after it have an "or" relationship.
[0023] In home networks, smart home devices can directly connect to the IoT platform after being configured with the network and maintain this connection through periodic uplink (e.g., heartbeat) messages. However, with the development of smart home technology, the number of smart home devices in home networks has increased significantly. In this case, there will be a large number of heartbeat messages (heartbeat packets) sent from smart home devices to the IoT platform. Since the payload of the heartbeat message is much smaller than the minimum Ethernet packet length, this results in a serious waste of bandwidth.
[0024] In view of this, embodiments of this application provide a method, apparatus, device, and storage medium for data transmission. In this method, an aggregation node can periodically send a first time slice to at least one smart home device under a first Internet of Things (IoT) platform, and can collect heartbeat messages from the at least one smart home device within the first time slice. The node then combines the payload information from the collected heartbeat messages and sends the combined message to the first IoT platform. This method, by combining the payload information from the heartbeat messages collected within the first time slice, increases the length of the message payload, thereby obtaining a combined message with a higher payload-to-weight ratio. This improves bandwidth utilization and saves uplink bandwidth.
[0025] It should be understood that the aggregation node in the embodiments of this application can be understood as a node with data aggregation function, wherein the data aggregation function refers to the function of combining the payload information of at least two messages.
[0026] It should also be understood that the embodiments of this application do not limit the specific technology or device form used in the aggregation node. For example, the aggregation node can be a terminal device or a network device.
[0027] It should also be understood that the heartbeat message in the embodiments of this application can also be replaced with other non-urgent periodic uplink messages.
[0028] To facilitate understanding of the embodiments of this application, the Message Queuing Telemetry Transport (MQTT) protocol will be used as an example to briefly introduce the calculation method of the payload ratio of application messages (hereinafter referred to as messages).
[0029] Figure 1 This is a schematic diagram of a message format in the MQTT protocol. For example... Figure 1As shown, this message consists of a destination address, source address, type, Internet Protocol (IP) data, and a Frame Check Sequence (FCS). The IP data includes the IP header and IP data portion; the IP data portion includes the Transmission Control Protocol (TCP) header and TCP data portion; and the TCP data portion includes the MQTT header and MQTT payload. Therefore, the message payload ratio can be calculated as follows: Message payload ratio = MQTT payload length / (Ethernet header length + IP header length + TCP header length + MQTT header length + MQTT payload length + FCS). The Ethernet header consists of the destination address, source address, and type. This calculation method shows that increasing the message payload length can improve the message payload ratio, thereby improving bandwidth utilization.
[0030] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0031] Figure 2 This application illustrates a data transmission method according to an embodiment of the present application. This method can be executed by an aggregation node or implemented by components of the aggregation node (such as chips or circuits), and this application embodiment does not limit this. For ease of understanding, the following illustrative example illustrates the method executed by an aggregation node.
[0032] like Figure 2 As shown, the method may include:
[0033] S201, periodically send a first time slice to at least one smart home device under the first IoT platform. The first time slice is used to instruct at least one smart home device to send a heartbeat message to the aggregation node within the first time slice.
[0034] The at least one smart home device under the first IoT platform can also be understood as at least one smart home device that has been certified by the first IoT platform. This at least one smart home device may, for example, belong to the same network domain (such as the same home network domain). The periodic transmission of first time slices to at least one smart home device under the first IoT platform can also be understood as transmitting first time slices to at least one smart home device under the first IoT platform according to a certain period or time interval.
[0035] In S201, the aggregation node can send a first time slice to at least one smart home device under the first IoT platform, indicating the time when the at least one smart home device should send a heartbeat message to the aggregation node. Accordingly, after receiving the first time slice, the at least one smart home device can send a heartbeat message to the first IoT platform within the first time slice.
[0036] In some embodiments, before the aggregation node periodically sends a first time slice to at least one smart home device under the first IoT platform, the method further includes: receiving sniffing messages from each smart home device, each sniffing message including a corresponding sniffing identifier and a time to live (TTL).
[0037] The TTL (Time To Live) parameter specifies the maximum number of network segments a sniffed packet is allowed to pass through. In the Internet Control Message Protocol (ICMP), it specifies the number of times the sniffed packet is forwarded (hop count). Each time a sniffed packet passes through a hop device, that hop device modifies the TTL field value, for example, by decrementing the TTL value by 1.
[0038] In this embodiment, the format of the sniffing packet can be, for example, ICMP format. The sniffing packet may include its type, data body, destination address, and TTL start value. As an example, the type of the sniffing packet can be set to Echo(ping)request, the data body can include a sniffing identifier (such as the string "iotsnooping"), the destination address is the IoT platform address, and the TTL start value is N. N can be set according to the actual application scenario (such as the number of gateways or routers in the network domain).
[0039] In one possible scenario, the TTL (Time-To-Live) of the sniffed message received by the aggregator node is equal to 1. In this case, the aggregator node can send a response message to the corresponding smart home device based on the sniffed identifier. This response message can be used by the aggregator node to establish a connection with the corresponding smart home device.
[0040] For example, an aggregation node can receive messages from smart home devices and read the TTL and data body of those messages. If the TTL is 1, the aggregation node can determine whether to send a response message to the smart home device based on whether the data body includes a sniffing identifier. In one example, if the aggregation node reads a message TTL of 1 and the sniffing message's data body includes a sniffing identifier, the aggregation node can identify the message as a sniffing message and send a response message to the smart home device that sent it. This response message can be used by the aggregation node to establish a connection with the smart home device. In other words, in this case, the aggregation node can send a response message to the corresponding smart home device (the smart home device that sent the message) based on the sniffing identifier in the sniffing message. In another example, if the aggregation node reads a message TTL of 1 and the sniffing message's data body does not include a sniffing identifier, the aggregation node can determine that the received message is not a sniffing message. In this case, the aggregation node does not need to send a response message to the smart home device that sent the message.
[0041] Another possible scenario is that the TTL (Time-To-Live) of the sniffing message received by the aggregator node is greater than 1. In this case, the aggregator node can send the sniffing message to the next-hop node (device). For example, if there are no other nodes (devices) on the communication link between the aggregator node and the first IoT platform, then the first IoT platform is the next-hop node of the aggregator node. In another example, if there are other nodes on the communication link between the aggregator node and the first IoT platform, then the next-hop node of the aggregator node is any node on that communication link. For instance, if there are nodes A and B on the communication link between the aggregator node and the first IoT platform, and uplink messages from the aggregator node can be sent to the first IoT platform sequentially via nodes A and B, then node A is the next-hop node of the aggregator node.
[0042] According to the method of this embodiment, when the TTL of the sniffing packet equals 1, the aggregation node can send a response message to the corresponding smart home device based on the sniffing identifier. Thus, the smart home device receiving the response message can determine the node that sent the message based on the information carried in the response message. In other words, the smart home device receiving the response message can find the node with data aggregation function (i.e., the aggregation node) in the network domain based on the information carried in the response message. In other words, smart home devices in the network domain of this embodiment can discover aggregation nodes in the network domain by sending sniffing packets.
[0043] Furthermore, based on this response message, smart home devices can establish connections with the aggregation node. For example, after receiving a response message from the aggregation node, a smart home device can establish a connection with the aggregation node through an IoT open-source protocol. This IoT open-source protocol may include, for example, MQTT, Constrained Application Protocol (CoAP), etc. Once each smart home device in at least one smart home device under the first IoT platform has completed the discovery of the aggregation node (after receiving a response message from the aggregation node), the aggregation node can establish a connection with each smart home device. After the connection is established, each smart home device can report its identification information, the address of the first IoT platform, and platform authentication information to the aggregation node. The platform authentication information indicates that the smart home device is an authenticated device of the first IoT platform, or in other words, that the smart home device is a legitimate device under the first IoT platform.
[0044] In some embodiments, the method may further include: determining a first time slice. Exemplarily, the step of the aggregation node determining the first time slice may include steps 2011) to 2013):
[0045] (2011) Obtain a first reporting cycle value for at least one smart home device, wherein the first reporting cycle value is the cycle value for at least one smart home device to send heartbeat messages to the first Internet of Things platform as agreed upon (e.g., determined through negotiation) with the first Internet of Things platform.
[0046] As an example, suppose the first reporting period of a smart home device is t1. If the first IoT platform does not receive a heartbeat message from the smart home device within t1, the first IoT platform can consider that the smart home device has gone offline.
[0047] In one possible approach, the aggregation node can report the identification information and platform authentication information of at least one smart home device under the first IoT platform to the first IoT platform, and then obtain the first reporting cycle value of the at least one smart home device from the first IoT platform.
[0048] In one implementation, smart home devices on the same IoT platform share the same reporting cycle value. That is, in this implementation, each smart home device on the first IoT platform has the same first reporting cycle value. This first reporting cycle value is, for example, denoted as HBT0.
[0049] (2012) Based on the first reporting cycle value, the number of smart home devices, and the first preset cycle value, a second reporting cycle value is determined for the aggregation node. The second reporting cycle value is the cycle value for the aggregation node to send combined messages to the Internet of Things platform; wherein, the first preset cycle value is less than the first reporting cycle value.
[0050] The details of combined messages will be explained in S203 and will not be elaborated here.
[0051] The total number of smart home devices can also be understood as the total number of smart home devices that have established connections with the aggregation node under the first Internet of Things platform.
[0052] For example, determining the second reporting cycle value of the aggregation node based on the first reporting cycle value, the number of smart home devices, and the first preset cycle value includes: determining the ratio of the first reporting cycle value to the number of smart home devices; and determining the larger of the ratio and the first preset cycle value as the second reporting cycle value.
[0053] For example, assuming the second reporting period value is denoted as HBT, the first reporting period value is denoted as HBT0, the first preset period value is denoted as MIN_T, and the number of smart home devices is denoted as N, then the ratio of the first reporting period value to the number of smart home devices can be expressed as HBT0 / N, and the second reporting period value can be expressed as HBT=max(HBT0 / N,MIN_T).
[0054] In one possible approach, the aggregation node can use an open-source protocol (such as MQTT or CoAP) to report the identification information and platform authentication information of at least one smart home device under the first IoT platform to the first IoT platform, and negotiate with the first IoT platform to agree on a second reporting cycle value of HBT = max(HBT0 / N, MIN_T), thereby determining the second reporting cycle value based on the negotiation result.
[0055] According to the method of this embodiment, the aggregation node can determine the second reporting cycle value as HBT. Since N is greater than or equal to 1, and MIN_T is less than HBT0, HBT is less than or equal to HBT0. That is, the second reporting cycle value determined by the aggregation node and the first IoT platform is less than or equal to the first reporting cycle value determined by the smart home device and the first IoT platform.
[0056] (2013) Based on the second reporting cycle value, the first time slice is determined.
[0057] For example, the step of determining the first time slice based on the second reporting period value may include: obtaining the system time of the aggregation node; determining the end time of the first time slice by adding the system time of the aggregation node and the second reporting period value; and determining the difference between the end time of the first time slice and the first value as the start time of the first time slice.
[0058] The first value can be determined based on experience or actual needs. In one example, the first value is 5.
[0059] For example, assuming the system time of the aggregation node is denoted as CT and the first value is denoted as t, the end time of the first time slice can be represented as CT+HBT, and the start time of the first time slice can be represented as CT+HBT-t. Therefore, the first time slice can be represented as [CT+HBT-t, CT+HBT].
[0060] Furthermore, after determining the first time, the aggregation node can downlink the first time slice to at least one smart home device under the first IoT platform (that is, a smart home device under the first IoT platform that has established a connection with the aggregation node). Thus, the at least one smart home device can send a heartbeat message to the aggregation node within the first time slice based on the received first time slice.
[0061] S202 receives heartbeat messages from at least one smart home device within the first time slice.
[0062] After the aggregation node sends the first time slice to at least one corresponding smart home device, the at least one smart home device can send a heartbeat message to the aggregation node within the first time slice. Accordingly, the aggregation node can receive heartbeat messages from the at least one smart home device within the first time slice, or in other words, the aggregation node can collect heartbeat messages from the at least one smart home device within the first time slice.
[0063] S203, combine the payload information in each heartbeat message within the first time slice to obtain a combined message.
[0064] In this step, the aggregation node can combine the payload information from each heartbeat message within the first time slice. As one implementation, the aggregation node can combine (concatenate) the payload information from the heartbeat messages of various smart home devices according to a type / length / value (TLV) format to obtain a combined message. Thus, compared to a single heartbeat message, the payload portion of the combined message is longer. In other words, compared to the original heartbeat message, the combined message has a higher payload ratio, thereby improving bandwidth utilization.
[0065] S204, send a combined message to the first IoT platform.
[0066] After the aggregating node combines the heartbeat messages collected within the first time slice into a combined message, it can send the combined message to the first IoT platform. For example, the aggregating node can send the combined message to the first IoT platform via an open-source protocol (such as MQTT or CoAP).
[0067] It is understandable that when the aggregation node periodically sends a first time slice to at least one smart home device under the first IoT platform, the aggregation node can periodically collect heartbeat messages from the at least one smart home device within the first time slice. Therefore, the aggregation node can periodically send combined messages to the first IoT platform. Since the period value for the aggregation node to send combined messages to the first IoT platform is the second period value, in one possible approach, the period value for the aggregation node to send the first time slice to the at least one smart home device under the first IoT platform is also the second period value. In other words, the aggregation node can periodically send the first time slice to the at least one smart home device under the first IoT platform with the second period value as the period (or time interval). Furthermore, when the number of smart home devices N is greater than 1, the second reporting period value is less than the first reporting period value. That is, the method of this embodiment can reduce the heartbeat period of the smart home devices, thereby providing more reliable keep-alive for the smart home devices.
[0068] In some embodiments, the method further includes: sending connection establishment requests to at least two IoT platforms, including a first IoT platform; wherein the connection establishment request sent to each IoT platform includes identification information and platform authentication information of at least one smart home device under that IoT platform. The platform authentication information is used to indicate that at least one smart home device under that IoT platform is a device authenticated by that IoT platform.
[0069] According to the method of this embodiment, the aggregation node can send connection establishment requests to at least two IoT platforms, including the first IoT platform; in other words, the aggregation node supports establishing connections with at least two IoT platforms. These at least two IoT platforms can be from the same vendor or from different vendors, and this embodiment does not limit this. In one possible approach, the aggregation node supports establishing independent connections with IoT platforms from different vendors using open-source IoT protocols (such as MQTT or CoAP).
[0070] In one possible approach, smart home devices from different manufacturers' IoT platforms can connect to the aggregation node, and the aggregation node can connect to different manufacturers' IoT platforms, thereby helping to break down the ecosystem barriers between manufacturers.
[0071] It should be noted that when the aggregation node establishes connections with at least two IoT platforms, it can periodically send time slices to at least one smart home device under different IoT platforms, and instruct at least one smart home device under different IoT platforms to send heartbeat messages within the corresponding time slices. Then, it combines the payload information from each heartbeat message within different time slices and sends the combined message to the corresponding IoT platform. In other words, the data aggregation function of the aggregation node can be applied simultaneously to at least two IoT platforms in the network domain.
[0072] For example, assuming the aggregation node establishes a connection with both a first IoT platform and a second IoT platform, the aggregation node can, on the one hand, apply the methods in S201 to S204 to the first IoT platform. On the other hand, for the second IoT platform, the aggregation node can also perform the following steps: periodically sending a second time slice to at least one smart home device under the second IoT platform, the second time slice being used to instruct the at least one smart home device under the second IoT platform to send a heartbeat message to the aggregation node within the second time slice; receiving heartbeat messages from at least one smart home device under the second IoT platform within the second time slice; combining the payload information in each heartbeat message within the second time slice; and sending the combined message to the second IoT platform.
[0073] According to the method of this embodiment, the aggregation node can establish a connection with the IoT platform of each manufacturer as the only device node in the network domain, thereby reducing the number of connections with the IoT platform in the network domain, thus saving system resources and reducing equipment costs.
[0074] The above text combined Figure 2 This application introduces a data transmission method provided by an embodiment. To facilitate understanding of the embodiments of this application, the following description is provided in conjunction with... Figure 3 and Figure 4 This application describes one possible implementation flow of the data transmission method provided in its embodiments.
[0075] In existing technologies, smart homes generally establish connections with IoT platforms in the following two ways:
[0076] Method 1: After the smart home device is connected to the network, it directly establishes an MQTT or CoAP connection with the IoT platform to conduct data communication, and maintains the connection with the platform through periodic uplink (such as heartbeat) messages.
[0077] Method 2: Smart home devices from specific manufacturers connect to the internet via their own routers or other central control devices, which then establish a network connection with the platform. In other words, the smart home devices maintain a network connection with the routers or other central control devices; the central control devices maintain a network connection with the IoT platform.
[0078] In method 1 above, that is, in the solution where smart home devices directly connect to the IoT platform, the following disadvantages exist:
[0079] 1.1) With the development of smart homes and the increase of smart home devices in home networks, there will be a large number of heartbeat packets. Since the effective payload of heartbeat packets is much smaller than the minimum packet length of Ethernet, too much data redundancy will cause bandwidth waste. In particular, home broadband is an asymmetric network, and the uplink bandwidth is prone to congestion.
[0080] 1.2) To reduce the impact of heartbeat packets from a large number of smart home devices on the IoT platform, the uplink message (such as heartbeat) cycle is set to be relatively long, such as 5 minutes. Under such a long heartbeat cycle, the Network Address Translation (NAT) aging time of each node device in the network is inconsistent and uncertain. If device management is performed when the NAT table entries are aging, problems such as failure to manage smart home devices or large latency will occur.
[0081] 1.3) The connection established between the IoT platform and each smart home device requires a Layer 3 port. Connecting a large number of smart home devices requires a larger platform cluster or hardware support, increasing system costs.
[0082] In method 2 above, that is, in the solution where smart home devices from specific manufacturers connect to the network through their own routers or other central control devices, the following disadvantages exist:
[0083] 2.1) Inconsistent protocols among manufacturers mean that routers and other central control devices only connect to their own platforms, resulting in a lack of technological neutrality. Users need to purchase central control devices from the corresponding manufacturers when using smart home devices, increasing their operating costs.
[0084] 2.2) Some home appliances can only connect to the network by finding central control devices such as routers within the local area network. In multi-level routing networks, multiple central control devices are required.
[0085] To address these shortcomings, this invention utilizes a method for data aggregation in a home domain IoT network, effectively overcoming the deficiencies of existing technologies. On one hand, embodiments of this application can overcome local area network limitations through the sniffing capabilities of aggregation nodes, enabling the identification of the optimal node within the tree-structured topology of the home network domain. On the other hand, aggregation nodes use open-source protocols to establish connections with various ecosystem vendors' IoT platforms, breaking down ecosystem barriers and reducing the number of platform device connections. Furthermore, aggregation nodes can improve the packet payload ratio through unified authorization of uplink packet reporting time slices and data aggregation, saving uplink bandwidth on the home network. Simultaneously, by dynamically adjusting the heartbeat cycle between data nodes and IoT platforms, smart home devices can be more reliably kept alive under the same network resources, thereby improving the success rate of control.
[0086] It should be understood that the uplink message (uplink data) in this embodiment refers to non-urgent periodic uplink messages, such as heartbeat messages. These uplink messages can be used, for example, to maintain connectivity between smart home devices and the IoT platform.
[0087] It should also be understood that there may be multiple (e.g., two or more) smart home devices in the network domain of this embodiment. These multiple smart home devices may be smart home devices under the same Internet of Things platform or smart home devices under different Internet of Things platforms, and are not limited thereto.
[0088] Figure 3 This application illustrates a possible implementation flow of the data transmission method provided in an embodiment, which may include:
[0089] S301, smart home devices perform aggregation node sniffing.
[0090] S302, connecting smart home devices to the aggregation node.
[0091] S303, the aggregation node aggregates and forwards the uplink data from smart home devices.
[0092] The detailed procedures for steps S301 to S303 are described below.
[0093] S301, smart home devices perform aggregation node sniffing.
[0094] In this step, smart home devices can add payload information to ICMP messages and modify the message TTL, thereby completing the sniffing of the aggregation node by sending ICMP messages (sniffing messages).
[0095] As an example, S301 may include steps 3011) to 3015).
[0096] 3011) Smart home devices complete WiFi network configuration and obtain gateway address, IoT platform address and platform authentication information.
[0097] 3012) Smart home devices send sniffing messages in ICMP format.
[0098] The sniffing message is of type Echo(ping)request; a sniffing identifier, such as the string "iot snooping", can be added to the data body; the destination address of the sniffing message is the IoT platform address; and the starting TTL value of the sniffing message is N.
[0099] TTL stands for Time To Live, and this field specifies the maximum number of network segments an IP packet is allowed to pass through before being dropped by a router. In the ICMP protocol, TTL refers to the number of times an ICMP packet can be forwarded (hop count).
[0100] 3013) Waiting time T after a smart home device sends a sniffing message.
[0101] 3014) When a home router or home gateway receives a sniffing packet, if the TTL of the sniffing packet is greater than 1, it forwards it to the next-hop device (node). Otherwise, it proceeds to the next step: if the home router or home gateway supports data aggregation functionality of IoT open-source protocols (such as MQTT or CoAP), it responds to the smart home device that sent the sniffing packet; otherwise, it does not process it. The data aggregation function refers to the function of combining the payload information of at least two packets.
[0102] As can be understood, as mentioned above, when the TTL of a sniffing packet is greater than 1, the home router or home gateway can forward the sniffing packet to the next-hop device (the next-hop router or gateway). Each time the sniffing packet passes through a hop device, that hop device modifies the TTL field value, for example, decrementing the TTL value by 1. When the TTL reaches 0, the hop device will discard the received sniffing packet. Therefore, in the embodiments of this application, when a hop device (such as a router or gateway) receives a sniffing packet with a TTL of 1, if the hop device supports IoT open-source protocol data aggregation, it needs to respond to the smart home device that sent the sniffing packet.
[0103] 3015) If the smart home device receives a sniffing message response message, it stops sending sniffing messages, and the aggregation node ends sniffing; otherwise, it decrements the TTL value of the sniffing message by 1 and proceeds to step 3013.
[0104] For example, when a smart home device receives a sniffing message response message, it can determine the device that sent the response message based on the information carried in the response message. In this way, the optimal node (aggregation node) with data aggregation function can be found in the home network domain, thereby completing the sniffing of the aggregation node.
[0105] S302, connecting smart home devices to the aggregation node.
[0106] As an example, S302 may include steps 3021) to 3023).
[0107] 3021) Smart home devices connect to aggregation node devices via IoT open-source protocols (such as MQTT or CoAP), and simultaneously report smart home device identification information, IoT platform address, and platform authentication information to the aggregation node devices.
[0108] 3022) If the aggregation node device has no link connection with the IoT platform corresponding to the smart home device (i.e., the first smart home device is connected to the IoT platform), then the open source protocol P is used to carry the smart home device identification information, IoT platform address, platform authentication information and establish an initial connection with the IoT platform and obtain uplink data (non-urgent, such as heartbeat). The reporting period is HBT0 keep-alive.
[0109] 3023) Assuming the total number of smart home devices under a certain IoT platform is N, after the Nth smart home device completes the discovery of the aggregation node, the aggregation node device uses the open-source protocol P to report the smart home device identification information and platform authentication information to the corresponding IoT platform address, and negotiates with the IoT platform to agree on the uplink data reporting period of the aggregation node as HBT = max(HBT0 / N, MIN_T). Wherein, HBT0 is the uplink data reporting period of the smart home device, N is the total number of smart home devices under the IoT platform that have established a connection with the aggregation node, and MIN_T is the predefined uplink data reporting period of the aggregation node.
[0110] Figure 4 This is a schematic diagram illustrating an example of the storage information of an aggregation node in an embodiment of this application. For example... Figure 4 As shown, an aggregation node can store information about multiple (two or more) IoT platforms, such as IoT platform-A, IoT platform-B, and IoT platform-C. For each IoT platform, the stored information includes a list of smart home devices under that IoT platform and a data reporting cycle. The data reporting cycle can also be understood as the reporting cycle during which the aggregation node sends uplink data to that IoT platform, i.e., HBT (High-Level Data Transmission).
[0111] S303, the aggregation node aggregates and forwards the uplink data from smart home devices.
[0112] As an example, S303 may include steps 3031) to 3033).
[0113] 3031) The aggregation node and the IoT platform negotiate the reporting cycle for uplink data (non-urgent, such as heartbeat).
[0114] 3032) The aggregation node obtains the current system time (e.g., denoted as CT) and announces to the IoT platform that the uplink data reporting time slice of the corresponding smart home device is [CT+HBT-5, CT+HBT].
[0115] 3033) The aggregation node starts receiving uplink data from smart home devices at [CT+HBT-5,CT+HBT] and reassembles the payload information from the uplink messages of each smart home device according to TLV and other methods. Then, it sends this larger payload uplink to the IoT platform through the open source protocol P.
[0116] Based on the above implementation process, the data transmission method provided in this application embodiment can achieve the following functions:
[0117] 1) Use ICMP messages to sniff home domain network aggregation node devices by modifying the message TTL and adding payload information.
[0118] 2) The aggregation node announces the uplink data (non-urgent, such as heartbeat) reporting time slice of smart home devices, and re-aggregates (combines) multiple network messages within that time slice into a single network packet before sending it to the IoT platform.
[0119] 3) Aggregator nodes initiate negotiations on the uplink data (non-urgent, such as heartbeat) reporting cycle. In scenarios with multiple smart home devices, compared to solutions without aggregation nodes, the heartbeat cycle can be reduced while using the same network resources, thereby improving the reliability of link packet liveness.
[0120] 4) The aggregation node supports connecting to multiple IoT platforms, and each connection is independent of the others.
[0121] The technical solutions of this application embodiment can produce the following beneficial effects:
[0122] 1) Aggregation nodes improve the packet payload ratio by using unified authorized heartbeats and other uplink time slices and data aggregation, thereby saving uplink bandwidth on home networks.
[0123] 2) By dynamically adjusting the heartbeat cycle between data nodes and the IoT platform, the aggregation node can reduce the heartbeat cycle while using the same network resources, providing more reliable keep-alive and improving the success rate of smart home control.
[0124] 3) The aggregation node, as the sole device node in the home network, establishes connections with various vendors' IoT platforms, reducing the number of connections to IoT platforms, saving system resources, and simultaneously reducing equipment costs for home users.
[0125] 4) Aggregation nodes support the use of open-source IoT protocols (such as MQTT or CoAP) to establish independent connections with IoT platforms from various vendors, breaking down the ecosystem barriers between vendors.
[0126] Based on the foregoing embodiments, this application provides a data transmission device, which includes the modules included, and can be implemented by a processor in a node device (such as an aggregation node); of course, it can also be implemented by specific logic circuits; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor unit (MPU), a digital signal processor (DSP), or a field programmable gate array (FPGA), etc.
[0127] Figure 5 The diagram illustrates the structural composition of a data transmission apparatus 500 provided in an embodiment of this application. For example... Figure 5 As shown, the device 500 may include:
[0128] The first sending module 501 is used to periodically send a first time slice to at least one smart home device under the first IoT platform. The first time slice is used to instruct at least one smart home device to send a heartbeat message to device 500 within the first time slice. The first receiving module 502 is used to receive heartbeat messages from at least one smart home device within the first time slice. The combining module 503 is used to combine the payload information in each heartbeat message within the first time slice to obtain a combined message. The second sending module 504 is used to send the combined message to the first IoT platform.
[0129] In some embodiments, the device 500 further includes: a second receiving module, configured to receive sniffing messages from each smart home device, each sniffing message including a corresponding sniffing identifier and a time-to-live (TTL); and a third sending module, configured to send a response message to the corresponding smart home device based on the sniffing identifier when the TTL equals 1, the response message being used by the device 500 to establish a connection with the corresponding smart home device.
[0130] In some embodiments, the destination address of the sniffing message is the address of the first IoT platform. The device 500 further includes: a fourth sending module, configured to send the sniffing message to the next-hop node of the device 500 when the TTL is greater than 1; wherein the next-hop node of the device 500 is the first IoT platform, or a node on the communication link between the device 500 and the IoT platform.
[0131] In some embodiments, the device 500 further includes: an acquisition module, configured to acquire a first reporting cycle value of at least one smart home device, the first reporting cycle value being the cycle value agreed upon by the at least one smart home device and the first IoT platform for sending heartbeat messages to the first IoT platform; a first determination module, configured to determine a second reporting cycle value of the device 500 based on the first reporting cycle value, the number of smart home devices, and a first preset cycle value, the second reporting cycle value being the cycle value of the device 500 sending combined messages to the first IoT platform; wherein the first preset cycle value is less than the first reporting cycle value; and a second determination module, configured to determine a first time slice based on the second reporting cycle value.
[0132] In some embodiments, the first determining module is specifically configured to: determine the ratio of a first reporting cycle value to the number of smart home devices; and determine the larger of the ratio and a first preset cycle value as a second reporting cycle value.
[0133] In some embodiments, the second determining module is specifically used to: obtain the system time of the device 500; determine the result of adding the system time and the second reporting period value as the end time of the first time slice; and determine the difference between the end time of the first time slice and the first value as the start time of the first time slice.
[0134] In some embodiments, the device 500 further includes: a fifth sending module, configured to send a connection establishment request to at least two Internet of Things (IoT) platforms, including the first IoT platform; wherein the connection establishment request sent to each IoT platform includes identification information and platform authentication information of at least one smart home device under the IoT platform, and the platform authentication information is used to indicate that at least one smart home device under the IoT platform is a device authenticated by the IoT platform.
[0135] The descriptions of the apparatus embodiments above are similar to those of the method embodiments above, and have similar beneficial effects. In some embodiments, the functions or modules included in the apparatus provided in this application can be used to perform the methods described in the method embodiments above. For technical details not disclosed in the apparatus embodiments of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0136] It should be noted that, in the embodiments of this application, if the above-described methods are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, or the parts that contribute to related technologies, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks. Thus, the embodiments of this application are not limited to any specific hardware, software, or firmware, or any combination of hardware, software, and firmware.
[0137] This application also provides a data transmission device, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements some or all of the steps in the above-described method.
[0138] This application also provides a chip. The chip includes a processor for retrieving and running a computer program from a memory, causing a device equipped with the chip to perform some or all of the steps in the above-described method.
[0139] This application also provides a chip including a processor and a communication interface. The processor reads instructions stored in a memory through the communication interface to implement some or all of the steps in the above-described method. In some embodiments, as an implementation, the chip further includes a memory storing computer programs or instructions. The processor executes the computer programs or instructions stored in the memory. When the computer programs or instructions are executed, the processor performs some or all of the steps in the above-described method.
[0140] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements some or all of the steps in the above-described method. The computer-readable storage medium may be transient or non-transient.
[0141] This application also provides a computer program including computer-readable code, wherein when the computer-readable code is run in a node device (such as an aggregation node), a processor in the node device (such as an aggregation node) performs some or all of the steps in the above method.
[0142] This application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program. When the computer program is read and executed by a computer, it implements some or all of the steps in the above-described method. This computer program product can be implemented specifically through hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium; in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.
[0143] It should be noted that the descriptions of the various embodiments above tend to emphasize the differences between them, while their similarities or commonalities can be referred to interchangeably. The descriptions of the above embodiments of the device, storage medium, computer program, and computer program product are similar to the descriptions of the above method embodiments and have similar beneficial effects. For technical details not disclosed in the embodiments of the device, storage medium, computer program, and computer program product of this application, please refer to the descriptions of the method embodiments of this application for understanding.
[0144] It should be noted that, Figure 6 This is a schematic diagram of a hardware entity of a data transmission device in an embodiment of this application, such as... Figure 6 As shown, the hardware entity of the data transmission device 600 includes: a processor 601, a communication interface 602, and a memory 603, wherein:
[0145] The processor 601 typically controls the overall operation of the data transmission device 600.
[0146] The communication interface 602 enables the data transmission device 600 to communicate with other terminals or servers via a network.
[0147] The memory 603 is configured to store instructions and applications executable by the processor 601, and can also cache data to be processed or already processed (e.g., image data, audio data, voice communication data, and video communication data) in the processor 601 and the data transmission device 600. It can be implemented using flash memory or random access memory (RAM). Data transfer between the processor 601, the communication interface 602, and the memory 603 can be performed via bus 604.
[0148] In some embodiments, the data transmission device 600 may specifically be an aggregation node in the embodiments of this application, and the data transmission device 600 may implement the corresponding processes implemented by the aggregation node in the various methods of the embodiments of this application. For the sake of brevity, it will not be described in detail here.
[0149] It should be understood that the terms "one embodiment," "an embodiment," or "some embodiments" used throughout the specification mean that a specific feature, structure, or characteristic related to an embodiment is included in at least one embodiment of this application. Therefore, the phrases "in one embodiment," "in one embodiment," or "in some embodiments" appearing throughout the specification do not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. It should be understood that in the various embodiments of this application, the sequence numbers of the above steps / processes do not imply a sequential order of execution; the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application. The sequence numbers of the above embodiments of this application are merely descriptive and do not represent the superiority or inferiority of the embodiments.
[0150] It should also be understood that the formulas involved in the various embodiments of this application are illustrative and do not limit the scope of protection of the embodiments of this application. In the process of calculating the above-mentioned parameters, calculations can be performed according to the above formulas, or based on variations of the above formulas, or according to the formulas determined by the methods provided in the embodiments of this application, or calculations can be performed in other ways to satisfy the results of the formula calculations.
[0151] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0152] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.
[0153] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.
[0154] In addition, each functional unit in the various embodiments of this application can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0155] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as mobile storage devices, read-only memory (ROM), magnetic disks, or optical disks.
[0156] Alternatively, if the integrated units described above are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence or the part that contributes to related technologies, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, magnetic disks, or optical disks.
[0157] The above description is merely an embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for data transmission, characterized in that, Applied to aggregation nodes, the method includes: A first time slice is periodically sent to at least one smart home device under the first Internet of Things platform, the first time slice being used to instruct the at least one smart home device to send a heartbeat message to the aggregation node within the first time slice; Receive heartbeat messages from the at least one smart home device within the first time slice; The payload information in each heartbeat message within the first time slice is combined to obtain a combined message. Send the combined message to the first IoT platform; The method further includes: Obtain a first reporting cycle value for the at least one smart home device, wherein the first reporting cycle value is the cycle value agreed upon by the at least one smart home device and the first IoT platform for sending heartbeat messages to the first IoT platform; Based on the first reporting cycle value, the number of smart home devices, and the first preset cycle value, a second reporting cycle value for the aggregation node is determined. The second reporting cycle value is the cycle value at which the aggregation node sends combined messages to the first IoT platform. The first preset cycle value is less than the first reporting cycle value. The first time slice is determined based on the second reporting period value.
2. The method according to claim 1, characterized in that, Before periodically sending the first time slice to at least one smart home device under the first Internet of Things platform, the method further includes: Receive sniffing messages from each of the smart home devices, each sniffing message including a corresponding sniffing identifier and a time-to-live (TTL); When the TTL equals 1, a response message is sent to the corresponding smart home device based on the sniffing identifier. The response message is used by the aggregation node to establish a connection with the corresponding smart home device.
3. The method according to claim 2, characterized in that, The destination address of the sniffing message is the address of the first IoT platform, and the method further includes: If the TTL is greater than 1, the sniffing message is sent to the next-hop node of the aggregation node; wherein the next-hop node of the aggregation node is the first IoT platform, or a node on the communication link between the aggregation node and the first IoT platform.
4. The method according to any one of claims 1 to 3, characterized in that, The step of determining the second reporting cycle value of the aggregation node based on the first reporting cycle value, the number of smart home devices, and the first preset cycle value includes: Determine the ratio of the first reporting period value to the number of smart home devices; The larger of the ratio and the first preset period value is determined as the second reporting period value.
5. The method according to any one of claims 1 to 3, characterized in that, Determining the first time slice based on the second reporting period value includes: Obtain the system time of the aggregation node; The result of adding the system time and the second reporting cycle value is determined as the end time of the first time slice; The difference between the end time of the first time slice and the first value is determined as the start time of the first time slice.
6. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Send connection establishment requests to at least two IoT platforms, including the first IoT platform; The connection establishment request sent to each of the IoT platforms includes identification information and platform authentication information of at least one smart home device under the IoT platform. The platform authentication information is used to indicate that at least one smart home device under the IoT platform is a device that has been authenticated by the IoT platform.
7. A data transmission apparatus, characterized in that, The device includes: The first sending module is used to periodically send a first time slice to at least one smart home device under the first Internet of Things platform. The first time slice is used to instruct the at least one smart home device to send a heartbeat message to the device within the first time slice. The first receiving module is configured to receive heartbeat messages from the at least one smart home device within the first time slice; The combination module combines the payload information of each heartbeat message within the first time slice to obtain a combined message; The second sending module sends the combined message to the first IoT platform; Device 500 also includes: The acquisition module is used to acquire a first reporting cycle value of the at least one smart home device, wherein the first reporting cycle value is the cycle value agreed upon by the at least one smart home device and the first IoT platform for sending heartbeat messages to the first IoT platform; The first determining module is configured to determine a second reporting cycle value for the device based on the first reporting cycle value, the number of smart home devices, and a first preset cycle value. The second reporting cycle value is the cycle value at which the device sends combined messages to the first IoT platform. The first preset cycle value is less than the first reporting cycle value. The second determining module is used to determine the first time slice based on the second reporting period value.
8. A data transmission device, characterized in that, The data transmission device includes: Memory is used to store executable instructions for a computer; A processor, connected to the memory, is configured to implement the method of any one of claims 1 to 6 by executing the computer-executable instructions.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by at least one processor, implements the method as described in any one of claims 1 to 6.