Multi-node keep-alive communication system and method for cellular Internet of Things

By intercepting and analyzing node data streams in gateway devices and performing sequence matching and clustering grouping, the problems of traffic waste and bandwidth efficiency in multi-node keep-alive in cellular IoT are solved, achieving more efficient network resource utilization and stable communication.

CN120676477AActive Publication Date: 2025-09-19SHANGHAI LIANGXUN IOT TECH CO LTD

Patent Information

Application Number
CN202511150314.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-18
Publication Date
2025-09-19
Estimated Expiration
2045-08-18

AI Technical Summary

Technical Problem

In the existing technology, independent keep-alive of multiple nodes in the cellular Internet of Things leads to waste of cellular traffic, low efficiency of bandwidth resource utilization, disordered keep-alive timing causing an increase in peak-to-average ratio, and keep-alive connections being easily affected by network congestion, resulting in the problem of erroneous judgment of network disconnection.

Method used

By deploying modules in the gateway device to intercept and copy the node data stream, extract the specified messages, and cluster and group them based on sequence matching and feature vectors, a periodic keep-alive channel is established, and keep-alive detection requests are sent to the remote server in a unified manner, reducing repeated communications and peak bandwidth impact.

Benefits of technology

It reduces cellular traffic costs, improves bandwidth utilization, reduces network resource usage, enhances communication stability and response success rate, and realizes centralized management and dynamic scheduling of node keep-alive behaviors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120676477A_ABST
    Figure CN120676477A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of Internet of Things communication, in particular to a cellular Internet of Things multi-node keep-alive communication system and method, and the system comprises a first module which is used for intercepting and copying uplink and downlink data streams of a plurality of nodes forwarded by gateway equipment in a bypass mode to obtain a data packet, and extracting a specified message from the data packet; the second module is used for receiving a specified message, matching the specified message with a pre-stored sequence, and updating a corresponding sequence field and determining a sequence state if matching succeeds; updating a sequence state and a period based on a matching result; feature vectors are extracted according to the matched specified messages and sequence periods, and all sequences are clustered and grouped; according to a clustering result, a periodic keep-alive channel is established between the gateway equipment and the target servers, a cellular IP address obtained by the gateway is used as a source address, and a keep-alive detection request is sent to each target server according to a set time slot; after the response is received, the sequence keep-alive state is updated and fed back to the corresponding node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet of Things communication technology, and in particular to a cellular Internet of Things multi-node keep-alive communication system and method. Background Art

[0002] With the widespread deployment of the Internet of Things (IoT), numerous communication nodes require long-term, stable connections with remote servers via cellular networks to enable real-time data synchronization, remote operation and maintenance, and security control. In particular, in scenarios such as shared charging, smart energy, and urban infrastructure, multiple nodes often connect to the same gateway, connecting to the external internet through that gateway's cellular network. This "multiple nodes connected to the same cellular gateway" topology has become a typical architectural form of the cellular IoT. Typically, in this type of network topology, each communication node uses a periodic keepalive (heartbeat) mechanism to send probe requests to the remote server to maintain network connectivity and check link reachability. These probes not only help the application layer detect network changes and promptly reestablish connection status, but also maintain address mappings in NAT (Network Address Translation) devices, ensuring that servers can proactively access end nodes. Existing technologies often use lightweight protocols such as the Internet Control Message Protocol and the Domain Name System (DNS) protocol to accomplish these probe tasks. Probes can be performed periodically, triggered by events, or a combination of both, and can carry lightweight service data to improve bandwidth utilization.

[0003] However, under this architecture, multiple nodes independently send keepalive detection requests to the server, which has a series of obvious technical defects. First, due to the lack of coordination between nodes, keepalive connections form a large number of duplicate links between the gateway and the remote server, which not only wastes cellular traffic charges but also puts pressure on limited bandwidth resources. Secondly, the timing overlap of multi-node periodic detection will cause peak loads on the gateway's keepalive traffic, increase the peak-to-average ratio, increase communication link jitter, and reduce overall bandwidth utilization. In addition, when forwarding keepalive packets, the gateway cannot perceive their priority, which can easily cause keepalive detection to fail when the network is congested, causing the node to misjudge the network link as disconnected and reset the connection, affecting the stable transmission of actual services.

[0004] Furthermore, because gateways and nodes typically come from different vendors and have limited protocol-layer collaboration, the current system cannot be uniformly optimized from an architectural perspective. Existing keepalive mechanisms fail to fully leverage the low-cost, high-reliability nature of local communication between nodes and gateways, nor do they aggregate and intelligently schedule keepalive behaviors based on global traffic awareness on the gateway side. This makes it difficult to balance multi-dimensional objectives such as link stability, traffic economy, and resource utilization. Summary of the Invention

[0005] (1) Technical issues to be resolved

[0006] In view of the above-mentioned shortcomings and deficiencies of the prior art, the present application provides a cellular Internet of Things multi-node keep-alive communication system and method, which solves the technical problems in the prior art caused by independent keep-alive of multiple nodes, such as waste of cellular traffic, connection redundancy, low efficiency of bandwidth resource utilization, disordered keep-alive timing causing increased peak-to-average ratio, and keep-alive connections being easily affected by network congestion and misjudging the network.

[0007] (2) Technical solution

[0008] In order to achieve the above objectives, the main technical solutions adopted in this application include:

[0009] In a first aspect, this embodiment provides a cellular Internet of Things multi-node keep-alive communication system, where the system is deployed in a gateway device in an Internet of Things topology, and includes:

[0010] The first module is used to intercept and copy the uplink and downlink data streams of multiple nodes in the IoT topology structure forwarded by the gateway device in a bypass manner to obtain a data packet containing complete protocol content and extract a specified message from the data packet;

[0011] The second module is configured to receive the specified message extracted by the first module and perform the following operations:

[0012] Match the specified message with the pre-stored sequence. If the match is successful, update the field information of the matched sequence and determine its sequence status.

[0013] Based on the specified message matching the sequence, the sequence state and sequence period of the sequence are updated;

[0014] Based on the specified message matched by the sequence and the sequence period corresponding to the sequence, the feature vector of the sequence is extracted, and the sequences are clustered and grouped using the feature vectors of each sequence;

[0015] Based on the clustering results, a periodic keepalive channel is established between the gateway device and the target server in the IoT topology. The cellular network IP address obtained by the gateway device is used as the source address, and keepalive detection requests are sent to each target server according to the sending time slot.

[0016] The sending time slot is determined by the sequence period of the sequence in the cluster group;

[0017] After receiving the response from the target server to the keep-alive detection request, the keep-alive status of the sequence is updated according to the response result, and the keep-alive status is fed back to the corresponding node in the IoT topology.

[0018] Preferably, in some embodiments of the present application, the first module includes: a data replication unit and a plurality of protocol filtering units;

[0019] The data replication unit is configured to intercept and replicate the uplink and downlink data flows of multiple nodes in the IoT topology structure forwarded by the gateway device in a bypass manner to obtain a data packet containing complete protocol content, identify the protocol type of the data packet, and distribute the data packet to a protocol filtering unit corresponding to the protocol type;

[0020] A plurality of protocol filtering units, each corresponding to a different protocol type configuration, each protocol filtering unit is used to receive a data packet of a corresponding protocol type, extract a specified message therefrom, and send the specified message to the second module;

[0021] The specified message includes a timestamp of a receiving time obtained from the extracted data packet, a source IP address of the packet header, a destination IP address of the packet header, a message type, and a packet length.

[0022] Preferably, in some embodiments of the present application, the second module includes: a sequence storage unit, a keep-alive unit, and a plurality of sequence calculation units;

[0023] The plurality of sequence calculation units correspond one-to-one to the plurality of protocol filtering units in the first module, and each sequence calculation unit is configured to receive a specified message of a corresponding protocol type and perform the following operations:

[0024] Match the specified message with the sequence pre-stored in the sequence storage unit. If the match is successful, update the field information of the matched sequence and determine its sequence status;

[0025] Based on the specified message matching the sequence, the sequence state and sequence period of the sequence are updated;

[0026] Extracting a feature vector of the sequence based on a specified message matched by the sequence and a sequence period corresponding to the sequence;

[0027] The keep-alive unit is configured to cluster and group each sequence based on the feature vectors extracted by the plurality of sequence calculation units, and establish a periodic keep-alive channel between the gateway device and a target server in the IoT topology structure according to the clustering result, and send a keep-alive detection request to each target server at a first time interval using the cellular network IP address obtained by the gateway device as the source address;

[0028] The sequence calculation unit is further configured to update the keep-alive status of the corresponding sequence based on the response result after receiving the response from the target server to the keep-alive detection request, and feed back the keep-alive status to the corresponding node in the IoT topology.

[0029] Preferably, in some embodiments of the present application, the sequence storage unit pre-stores at least one sequence, wherein each sequence includes the following field information:

[0030] Update time, used to record the timestamp of the last specified message that matched the sequence; sequence code, used to identify the unique coding field of the sequence; packet header source IP list, used to store the source IP address obtained by the node from the gateway device in the IoT topology; packet header destination IP, used to identify the target server IP address in the IoT topology; packet length, used to record the length of the data packet;

[0031] Sequence state, used to indicate the state of the current sequence, including the first state, the second state, the third state, and the fourth state; message type, a field used to indicate the message protocol type; domain name system request body, used to store the list of domain names initiated for resolution by the node in the domain name system protocol type keep-alive; sequence period, a field used to record the sequence keep-alive period; remaining survival time, used to indicate the remaining waiting time for the next specified message to arrive; keep-alive state, a keep-alive status field used to indicate whether the most recent keep-alive detection request for the sequence was successful; keep-alive reply information, used to store information about the target server's response to the keep-alive detection request; sequence feature vector, a vector used to indicate the sequence feature extracted based on the specified message; keep-alive group, a field used to indicate the keep-alive cluster group to which the sequence belongs.

[0032] Preferably, in some embodiments of the present application, the condition for successful matching is that the destination IP, message type and packet length in the packet header of the received designated message are the same as the corresponding field information in any pre-stored sequence;

[0033] Matches the specified message with the pre-stored sequence. If the match is successful, updates the field information of the matched sequence and determines its sequence status, including:

[0034] Add the source IP address of the packet header in the specified message to the packet header source IP list field of the matched sequence;

[0035] Updating the timestamp of the received packet in the designated message to the update time in the matched sequence field information;

[0036] Reset the remaining survival time in the matched sequence field information to a preset initial value. The remaining survival time is a decrement timer. When its value drops to 0, perform the following processing:

[0037] If the sequence state of the matched sequence is the first state, deleting the sequence from the sequence storage unit;

[0038] If the sequence state is the second state, update it to the fourth state;

[0039] If the sequence state is the third state, keep the current state unchanged;

[0040] If the sequence state is the fourth state, update it to the first state;

[0041] The first state indicates that the sequence currently receives only one specified message, and the sequence period in the field information of the sequence is set to -1;

[0042] The second state indicates that the sequence receives multiple specified messages within the remaining waiting time for the next specified message to arrive, but the sequence period has not been confirmed. The sequence period in the field information of the sequence is set to -1;

[0043] The third state indicates that the sequence has confirmed the sequence period, the previous state of which is the second state, and the sequence period in the field information of the sequence has a period value;

[0044] The fourth state indicates that the cycle calculation is not completed because the number of received specified messages is less than the preset minimum value, and the sequence cycle in the field information of the sequence is set to -1;

[0045] The sequence calculation unit is further configured to generate a sequence corresponding to the designated message when the received designated message fails to match the sequence pre-stored in the sequence storage unit, and set the sequence state of the generated sequence to the first state;

[0046] The field information of the generated sequence is all initial values ​​extracted from the specified message.

[0047] Preferably, in some embodiments of the present application, updating the sequence state and sequence period of the sequence based on the specified message matching the sequence specifically includes:

[0048] Extract the timestamps of the k specified messages currently received in the sequence and convert the timestamps into a relative time series based on the timestamp of the first specified message; where k is greater than a preset minimum value;

[0049] For relative time series, a time interval series is constructed based on the difference between adjacent timestamps;

[0050] Sort the time interval sequence, obtain the first quartile Q1 and the third quartile Q3 of the sorted time interval sequence, and calculate the interquartile range (IQR) based on them; all time intervals smaller than the lower limit or greater than the upper limit are considered as outliers and removed, and the remaining data are retained to form a set of non-jump time intervals;

[0051] Where, IQR = Q3 - Q1; lower limit = Q1 - 1.5 × IQR; upper limit = Q3 + 1.5 × IQR;

[0052] Based on the non-jump time interval set, the average value and standard deviation are calculated, and the coefficient of variation is determined accordingly; the coefficient of variation = standard deviation / average value;

[0053] When the coefficient of variation is less than the set threshold, the current sequence is judged to be periodic, and the initial period estimation value is taken as the average value of the non-jump time interval set;

[0054] If the sequence satisfies the requirement that the coefficient of variation is less than the threshold value in all subsequent M consecutive designated messages, the subsequent judgment is terminated in advance, and the initial period estimation value is used as the final period estimation value;

[0055] If the number of received specified messages has reached the preset maximum value but the final period estimation value has not been obtained, the sequence is considered to have no periodic characteristics;

[0056] The sequence calculation unit sends the periodicity judgment result to the sequence storage unit:

[0057] If the sequence is periodic, the sequence period in the field information of the sequence is updated to the final period estimate, and the sequence state in the field information is updated to the third state;

[0058] If the sequence is not periodic, the sequence period in the field information of the sequence remains at the initial value, and the sequence state in the field information remains unchanged.

[0059] Preferably, in some embodiments of the present application, extracting a feature vector of the sequence based on the designated message matched by the sequence and the sequence period corresponding to the sequence specifically includes:

[0060] Set the timestamp of the first specified message in the sequence to zero time;

[0061] Based on the sequence period in the sequence field information, the phase offset of each specified message timestamp relative to its sequence period position is calculated using the following formula:

[0062] ;

[0063] is the timestamp of the first specified message in the sequence; i is the sequence code of the sequence; is the timestamp of the kth specified message; is the value of the sequence period in the field information of the sequence whose sequence code is i; is the phase offset of the kth specified message timestamp relative to its sequence period position;

[0064] Counting the phase offset of each specified message timestamp corresponding to the sequence relative to its sequence period position, and obtaining the variance of the counted phase offset of the sequence;

[0065] Normalize each statistical feature separately and scale it to the interval [0, 1] to obtain the normalized statistical feature;

[0066] The statistical features include: the variance of the phase offset of the sequence, the first feature of the sequence, and the second feature of the sequence;

[0067] The first feature = final cycle estimate;

[0068] The second feature = IQR / median of the sorted time interval sequence;

[0069] The normalized statistical features are combined to form a feature vector, and the feature vector is written into the sequence feature vector in the field information corresponding to the sequence in the third state in the sequence storage unit.

[0070] Preferably, in some embodiments of the present application, the keep-alive unit clusters and groups each sequence based on the feature vectors extracted by the multiple sequence calculation units, and establishes a periodic keep-alive channel between the gateway device and the target server in the IoT topology structure based on the clustering result, and uses the cellular network IP address obtained by the gateway device as the source address to send a keep-alive detection request to each target server according to the sending time slot, specifically including:

[0071] The keep-alive unit obtains, from the sequence storage unit, a sequence feature vector of each sequence that is in the third state and whose sequence period field is not -1;

[0072] The distance metric of each sequence is calculated using the following formula:

[0073] + + ;

[0074] is the distance metric of the sequence whose sequence code is i; is the first scale parameter; is the second scale parameter; is the third scale parameter; is the normalized first feature corresponding to the sequence with sequence encoding i; The first feature of the initial centroid of the K-means algorithm corresponding to the sequence with sequence code j; is the normalized second feature corresponding to the sequence with sequence encoding i; The second feature of the initial centroid of the K-means algorithm corresponding to the sequence with sequence code j; is the variance of the normalized phase offset corresponding to the sequence with sequence code i; is the variance of the phase shift of the initial centroid of the K-means algorithm corresponding to the sequence with sequence code j;

[0075] The clustering effect under different K values ​​is evaluated based on the elbow rule, and the optimal number of clusters K is determined to minimize the intra-cluster sum of squared errors;

[0076] The K-means clustering method is used to divide the sequence into K cluster groups, and the clustering results are updated to the keep-alive group of each sequence in the sequence storage unit;

[0077] The keep-alive unit determines a keep-alive sending period of each keep-alive channel according to the sequence period of the sequence in each cluster group, wherein the keep-alive sending period takes the value of the minimum sequence period in the cluster group;

[0078] Establishing an initial keep-alive sending queue in each keep-alive channel, wherein the duration of the keep-alive sending queue is equal to the value of the minimum sequence period in the cluster group;

[0079] Among them, each sending time slot in the keep-alive sending queue corresponds to a unique target server IP in a cluster group;

[0080] The length of the sending time slot is: the value of the minimum sequence period in the group divided by the number of target server IP addresses in the group;

[0081] The keep-alive unit sorts the messages in the sending queue in chronological order according to the timestamp of each sequence, uses the cellular network IP address obtained by the gateway device as the source IP, and sends proxy keep-alive detection requests to each target server IP in the queue according to the sending time slot;

[0082] At the end of each transmission time slot, the keep-alive unit updates the keep-alive status field of all sequences in the packet according to the received response, and the keep-alive status field is normal or abnormal;

[0083] When the keep-alive unit does not receive a response from the target server in the current sending time slot and the sending time slot is not exhausted, the keep-alive unit continues to repeatedly send proxy keep-alive requests in the sending time slot to form intensive detection until a response from the target server is received or the sending time slot is exhausted;

[0084] After receiving the response from the target server, the keep-alive unit updates the keep-alive status field and keep-alive reply information field of each sequence in the packet according to the response result. If the keep-alive status is normal, it generates keep-alive response data of the corresponding protocol and forwards it to the node.

[0085] Preferably, in some embodiments of the present application, the sequence calculation unit is further configured to, after receiving a response from the target server to the keep-alive detection request, update the keep-alive status of the corresponding sequence based on the response result, and feed back the keep-alive status to the corresponding node in the IoT topology structure, specifically including:

[0086] The sequence calculation unit is configured to, after receiving a response from the target server to the keep-alive detection request, update the keep-alive status field and the keep-alive reply information field of the sequence associated with the request based on the response, and determine whether to feed back keep-alive response information to the corresponding node according to the keep-alive status of the sequence;

[0087] If the keep-alive status field is normal, the sequence calculation unit constructs a keep-alive response data packet corresponding to the protocol type used by the node and sends it to the node, specifically including:

[0088] When the protocol type corresponding to the designated message is Internet Control Message Protocol, constructing a network connectivity test response data packet for reply, wherein the source IP address of the data packet is the destination IP address of the packet header of the sequence, the destination IP address is the IP address of the node, and the response delay is set based on the keep-alive reply information field;

[0089] When the protocol type corresponding to the designated message is the Domain Name System protocol, constructing a Domain Name System response data packet for replying to the query request, wherein the source IP address of the data packet is the destination IP address in the packet header of the sequence, the destination IP address is the IP address of the node, and the domain name resolution result is set based on the keep-alive reply information field;

[0090] If the keep-alive status field is abnormal, no keep-alive response data packet is sent to the node;

[0091] When the protocol type corresponding to the designated message is the Internet Control Message Protocol, when constructing a network connectivity test response data packet for reply, adaptive padding is performed according to the packet length field of the corresponding sequence to simulate a preset reply packet corresponding to the original network connectivity test request probe message initiated by multiple nodes;

[0092] When the protocol type corresponding to the designated message is the domain name system protocol, a domain name system response data packet for responding to the query request is constructed, and the domain name resolution result in the domain name system request body is fed back to multiple nodes.

[0093] In a second aspect, this embodiment further provides a cellular Internet of Things multi-node keep-alive communication method, which is performed by the cellular Internet of Things multi-node keep-alive communication system described in the first aspect, and the method includes:

[0094] intercepting and copying the uplink and downlink data streams of multiple nodes in the IoT topology structure forwarded by the gateway device through the first module to obtain data packets containing complete protocol content, and extracting specified messages from the data packets respectively;

[0095] The second module receives the specified message extracted by the first module and performs the following operations:

[0096] Match the specified message with the pre-stored sequence. If the match is successful, update the field information of the matched sequence and determine its sequence status.

[0097] Based on the specified message matching the sequence, the sequence state and sequence period of the sequence are updated;

[0098] Based on the specified message matched by the sequence and the sequence period corresponding to the sequence, the feature vector of the sequence is extracted, and the sequences are clustered and grouped using the feature vectors of each sequence;

[0099] Based on the clustering results, a periodic keepalive channel is established between the gateway device and the target server in the IoT topology. The cellular network IP address obtained by the gateway device is used as the source address, and keepalive detection requests are sent to each target server according to the sending time slot.

[0100] The sending time slot is determined by the sequence period of the sequence in the cluster group;

[0101] After receiving the response from the target server to the keep-alive detection request, the keep-alive status of the sequence is updated according to the response result, and the keep-alive status is fed back to the corresponding node in the IoT topology.

[0102] (3) Beneficial effects

[0103] The present application provides a multi-node keep-alive communication system and method for a cellular Internet of Things. A first module intercepts and copies the uplink and downlink data streams of multiple nodes forwarded by a gateway device in a bypass manner, obtains a data packet containing complete protocol content, and extracts a specified message using multiple protocol filtering units. A second module uses multiple sequence calculation units to perform sequence matching, status updates, and period calculation on the extracted specified messages, and clusters them based on feature vectors. This allows for automatic identification of keep-alive messages with similar periodic characteristics sent by multiple nodes in the Internet of Things, completes group management of keep-alive sequences, and improves the systematicness and accuracy of keep-alive processing.

[0104] This application provides a cellular IoT multi-node keepalive communication system, establishing a periodic keepalive channel based on clustering results. This system uses the cellular network IP address obtained by a gateway device as the source address and sends proxy keepalive probe requests to the target server according to the transmission time slot within the cluster group. By sharing a keepalive probe request across multiple sequences, the combined transmission of keepalive probes is achieved, significantly reducing duplicate communications in the cellular network and reducing network resource usage. BRIEF DESCRIPTION OF THE DRAWINGS

[0105] Figure 1 This is a schematic diagram of the structure of a multi-node keep-alive communication system for a cellular Internet of Things according to an embodiment of the present application;

[0106] Figure 2This is a schematic diagram of an Internet of Things topology structure in the prior art;

[0107] Figure 3 This is a schematic diagram of the specific structure of the multi-node keep-alive communication system of the cellular Internet of Things in an embodiment of the present application;

[0108] Figure 4 Assuming that the protocol type of the data packet in this embodiment is the Internet Control Message Protocol type, the extracted specified message;

[0109] Figure 5 This is a schematic diagram of the deployment of a cellular Internet of Things multi-node keep-alive communication system in an Internet of Things topology according to an embodiment of the present application. DETAILED DESCRIPTION

[0110] In order to better explain the present application and facilitate understanding, the present application is described in detail below through specific implementation methods in conjunction with the accompanying drawings.

[0111] In related technologies, multi-node keep-alive communication in cellular IoT usually relies on each node independently sending detection messages such as Internet Control Message Protocol and Domain Name System Protocol to the server in a periodic or event-triggered manner to maintain the active state of the network connection. However, see Figure 2In a network topology where a large number of nodes access the Internet through the same gateway device, the existing keep-alive mechanism has several significant deficiencies: First, the keep-alive detection initiated independently by each node will repeatedly establish a large number of connections between the gateway device and the server, resulting in redundant communication, which will lead to excessive occupation of cellular network bandwidth resources and additional fee consumption; Second, due to the lack of a coordination mechanism among the nodes, the time distribution of their keep-alive detection is random and overlaps seriously, which can easily cause the bandwidth usage peak to increase, thereby increasing the peak-to-average ratio of the communication link, affecting the overall bandwidth utilization and service transmission stability; Third, the existing technology lacks the utilization of the local connection characteristics between the gateway device and the node, and fails to take advantage of the stable and bill-free node-gateway connection to alleviate the pressure on the cellular link; Fourth, when the network quality degrades, the keep-alive detection packet is mixed with other service data packets in the gateway device. Because it is not given a priority control mechanism, it is easy to be lost during transmission, misleading the node to determine that the current link is broken, and then mistakenly reset the network connection, causing unnecessary interruption risks. To this end, the cellular Internet of Things multi-node keep-alive communication system and method provided by the present application implements bypass interception of node uplink and downlink communication data and designated message extraction based on the first module of the gateway device, matches the designated message with the pre-stored sequence with the help of the second module, and implements clustering and grouping of multiple sequences through period identification and feature vector extraction. On this basis, a periodic keep-alive channel is established, and the gateway unified agent sends a keep-alive detection request to the remote server. This solution not only avoids the redundant behavior of repeated detection of multiple nodes and reduces cellular traffic costs, but also reduces the peak bandwidth impact caused by detection overlap by sending time slot control. At the same time, the system supports on-demand execution of intensive detection when detection fails, improves the response success rate, and returns keep-alive status feedback information through local connections to achieve centralized management, dynamic scheduling and status monitoring of node keep-alive communication behavior. It has the advantages of more controllable communication load, more timely response feedback, and more efficient network resource utilization. It is suitable for cellular Internet of Things application scenarios such as multi-node dense deployment and limited link resources.

[0112] To better understand the above technical solutions, exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. Instead, these embodiments are provided to enable a clearer and more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.

[0113] This embodiment provides a cellular Internet of Things multi-node keep-alive communication system, which is deployed in a gateway device in an Internet of Things topology to form a Figure 5 The schematic diagram of the cellular Internet of Things multi-node keep-alive communication system deployed in the Internet of Things topology is shown in FIG. Figure 2As shown, the cellular Internet of Things multi-node keep-alive communication system is as follows: Figure 1 Shown, including:

[0114] The first module is used to intercept and copy the uplink and downlink data streams of multiple nodes in the IoT topology structure forwarded by the gateway device in a bypass manner to obtain a data packet containing complete protocol content and extract a specified message from the data packet;

[0115] For details, see Figure 3 In the specific structure of the cellular Internet of Things multi-node keep-alive communication system of this embodiment, the first module includes: a data replication unit and multiple protocol filtering units; wherein the data replication unit is used to intercept and replicate the uplink and downlink data streams of multiple nodes in the Internet of Things topology structure forwarded by the gateway device in a bypass manner to obtain a data packet containing complete protocol content, identify the protocol type of the data packet, and distribute the data packet to the protocol filtering unit corresponding to the protocol type;

[0116] Multiple protocol filtering units correspond to different protocol type configurations. Each protocol filtering unit is used to receive data packets of the corresponding protocol type, extract specified messages from them, and send the specified messages to the second module; the specified messages include the timestamp of the receiving time obtained from the extracted data packets, the source IP of the packet header, the destination IP of the packet header, the message type, and the packet length.

[0117] It should be noted that the protocol type of the data packet in this embodiment includes but is not limited to the Internet Control Message Protocol and the Domain Name System Protocol. For example, assuming that the protocol type of the data packet in this embodiment is the Internet Control Message Protocol protocol type, then the specified message extracted from the data packet of the Internet Control Message Protocol protocol type includes: timestamp, packet header source IP, packet header destination IP, message type, packet length, such as Figure 4 shown.

[0118] This embodiment achieves a one-to-one correspondence between the configuration of the protocol filtering unit and the data packet protocol type by setting a data replication unit and multiple protocol filtering units of corresponding protocol types in the first module, and directly extracting the "specified message" field based on the standard protocol header structure, thereby having good modularity and extensibility. The Internet Control Message Protocol and Domain Name System Protocol currently listed are standard protocols with stable packet structures and fixed field formats, and can be easily expanded to support other common protocols (such as HTTP, MQTT, CoAP, etc.). Each protocol filtering unit in the first module can quickly extract the specified message by identifying the standard protocol header fields (such as source IP, destination IP, message type, packet length, etc.), avoiding in-depth analysis of the protocol body or complex load, saving computing resources, and improving processing efficiency.

[0119] The second module is configured to receive the specified message extracted by the first module and perform the following operations:

[0120] Match the specified message with the pre-stored sequence. If the match is successful, update the field information of the matched sequence and determine its sequence status.

[0121] Based on the specified message matching the sequence, the sequence state and sequence period of the sequence are updated;

[0122] Based on the specified message matched by the sequence and the sequence period corresponding to the sequence, the feature vector of the sequence is extracted, and the sequences are clustered and grouped using the feature vectors of each sequence;

[0123] According to the clustering grouping results, a periodic keep-alive channel is established between the gateway device and the target server in the IoT topology structure, and the cellular network IP address obtained by the gateway device is used as the source address to send a keep-alive detection request to each target server according to the sending time slot; the sending time slot is determined by the sequence period of the sequence in the clustering grouping; after receiving the response of the target server to the keep-alive detection request, the keep-alive status of the sequence is updated according to the response result, and the keep-alive status is fed back to the corresponding node in the IoT topology structure.

[0124] See also Figure 3 In the specific structure of the multi-node keep-alive communication system of the cellular Internet of Things in this embodiment, the second module includes: a sequence storage unit, a keep-alive unit, and multiple sequence calculation units;

[0125] The plurality of sequence calculation units correspond one-to-one to the plurality of protocol filtering units in the first module, and each sequence calculation unit is configured to receive a specified message of a corresponding protocol type and perform the following operations:

[0126] Match the specified message with the sequence pre-stored in the sequence storage unit. If the match is successful, update the field information of the matched sequence and determine its sequence status;

[0127] Based on the specified message matching the sequence, the sequence state and sequence period of the sequence are updated;

[0128] Extracting a feature vector of the sequence based on a specified message matched by the sequence and a sequence period corresponding to the sequence;

[0129] The keep-alive unit is configured to cluster and group each sequence based on the feature vectors extracted by the plurality of sequence calculation units, and establish a periodic keep-alive channel between the gateway device and a target server in the IoT topology structure according to the clustering result, and send a keep-alive detection request to each target server at a first time interval using the cellular network IP address obtained by the gateway device as the source address;

[0130] The sequence calculation unit is further configured to update the keep-alive status of the corresponding sequence based on the response result after receiving the response from the target server to the keep-alive detection request, and feed back the keep-alive status to the corresponding node in the IoT topology.

[0131] In this embodiment, the second module includes multiple sequence calculation units, each corresponding to a specific message type output by each protocol filtering unit in the first module. Each sequence calculation unit processes messages of its own protocol type and uses a unified data structure for matching and analysis, resulting in excellent protocol scalability and adaptability. Regardless of the type of new protocol message, only the corresponding sequence calculation unit needs to be added, without reconfiguring the overall logic.

[0132] Specifically, the sequence storage unit pre-stores at least one sequence, wherein each sequence includes the following field information:

[0133] Update time, used to record the timestamp of the last specified message that matched the sequence; sequence code, used to identify the unique coding field of the sequence; packet header source IP list, used to store the source IP address obtained by the node from the gateway device in the IoT topology; packet header destination IP, used to identify the target server IP address in the IoT topology; packet length, used to record the length of the data packet;

[0134] Sequence state, used to indicate the state of the current sequence, including the first state, the second state, the third state, and the fourth state; message type, a field used to indicate the message protocol type; domain name system request body, used to store the list of domain names initiated for resolution by the node in the domain name system protocol type keep-alive; sequence period, a field used to record the sequence keep-alive period; remaining survival time, used to indicate the remaining waiting time for the next specified message to arrive; keep-alive state, a keep-alive status field used to indicate whether the most recent keep-alive detection request for the sequence was successful; keep-alive reply information, used to store information about the target server's response to the keep-alive detection request; sequence feature vector, a vector used to indicate the sequence feature extracted based on the specified message; keep-alive group, a field used to indicate the keep-alive cluster group to which the sequence belongs.

[0135] In this embodiment, the second module, through the sequence storage unit, provides a lightweight sequence structure with clear structure, fixed fields, and low computational complexity. This structure includes information such as update time, source / destination IP address, message type, packet length, keepalive status, and feature vectors. This unified structure facilitates data sharing and manipulation across multiple modules, significantly reducing read, write, and matching overhead, improving system responsiveness, and making it particularly suitable for resource-constrained gateway device environments.

[0136] The conditions for successful matching are: the destination IP, message type and packet length in the received designated message are the same as the corresponding field information in any pre-stored sequence; specifically, based on the strategy of key field matching, the accurate attribution of the designated message is ensured, and when processing the designated message, key fields such as destination IP, message type, and packet length are used for sequence matching. This method can effectively distinguish messages belonging to different keep-alive channels, ensure the uniqueness of the keep-alive sequence, and avoid misattribution, confusion, and redundant analysis. When multiple nodes send keep-alive packets to the same target server through a gateway with the same protocol and content, the system attributes these designated messages to the same keep-alive sequence, and includes the source IP of the node in the packet header source IP list, indicating that these nodes share a keep-alive channel. This mechanism supports multi-node aggregate identification and centralized keep-alive, significantly reducing the detection frequency and network load.

[0137] Matches the specified message with the pre-stored sequence. If the match is successful, updates the field information of the matched sequence and determines its sequence status, including:

[0138] Add the source IP address of the packet header in the specified message to the packet header source IP list field of the matched sequence;

[0139] Updating the timestamp of the received packet in the designated message to the update time in the matched sequence field information;

[0140] Reset the remaining survival time in the matched sequence field information to a preset initial value. The remaining survival time is a decrement timer. When its value drops to 0, perform the following processing:

[0141] If the sequence state of the matched sequence is the first state, the sequence is deleted from the sequence storage unit; if the sequence state is the second state, it is updated to the fourth state; if the sequence state is the third state, the current state is kept unchanged; if the sequence state is the fourth state, it is updated to the first state;

[0142] Among them, the first state indicates that the sequence has currently received only one specified message, and the sequence period in the field information of the sequence is set to -1; the second state indicates that the sequence receives multiple specified messages within the remaining waiting time for the arrival of the next specified message, but the sequence period has not yet been confirmed, and the sequence period in the field information of the sequence is set to -1; the third state indicates that the sequence period has been confirmed, and its previous state is the second state. The sequence period in the field information of the sequence has a period value; the fourth state indicates that the period calculation is not completed because the number of received specified messages is less than the preset minimum value, and the sequence period in the field information of the sequence is set to -1;

[0143] The sequence calculation unit is further configured to generate a sequence corresponding to the designated message when the received designated message fails to match the sequence pre-stored in the sequence storage unit, and set the sequence state of the generated sequence to the first state;

[0144] The field information of the generated sequence is all initial values ​​extracted from the specified message.

[0145] Preferably, in some embodiments of the present application, updating the sequence state and sequence period of the sequence based on the specified message matching the sequence specifically includes:

[0146] Extract the timestamps of the k specified messages currently received in the sequence and convert the timestamps into a relative time series based on the timestamp of the first specified message; where k is greater than a preset minimum value; for the relative time series, construct a time interval series based on the difference between adjacent timestamps;

[0147] Sort the time interval series, obtain the first quartile Q1 and the third quartile Q3 of the sorted time interval series, and calculate the interquartile range (IQR) based on them; all time intervals that are less than the lower limit or greater than the upper limit are considered as outliers and removed, and the remaining data are retained to form a set of non-jump time intervals; where IQR = Q3 - Q1; the lower limit = Q1 - 1.5 × IQR; the upper limit = Q3 + 1.5 × IQR;

[0148] Based on the set of non-jump time intervals, the mean and standard deviation are calculated, and the coefficient of variation is determined accordingly; the coefficient of variation = standard deviation / mean value; when the coefficient of variation is less than a set threshold, the current sequence is judged to be periodic, and the initial period estimate is taken as the average value of the set of non-jump time intervals; if the sequence satisfies the coefficient of variation less than the threshold in M ​​consecutive subsequent designated messages, the subsequent judgment is terminated early, and the initial period estimate is used as the final period estimate; if the number of received designated messages reaches a preset maximum value and the final period estimate is not obtained, the sequence is considered to have no periodic characteristics;

[0149] The sequence calculation unit sends the periodicity judgment result to the sequence storage unit:

[0150] If the sequence is periodic, the sequence period in the field information of the sequence is updated to the final period estimate, and the sequence state in the field information is updated to the third state; if the sequence is not periodic, the sequence period in the field information of the sequence remains at the initial value, and the sequence state in the field information remains unchanged.

[0151] For example, in this embodiment, the sequence calculation unit identifies and estimates periodic characteristics by standardizing, statistically analyzing, and determining the volatility of received designated message timestamps. Specifically, taking a sequence as an example, assuming a cumulative total of k = 12 designated Internet Control Message Protocol messages have been received, the system first converts the original timestamp of each message into a relative time series (in seconds) based on the timestamp of the first message, yielding the following result: T(k) = [0.0, 2.1, 4.3, 6.0, 8.2, 10.1, 12.0, 14.2, 16.0, 18.3, 20.1, 22.0]. Subsequently, the time interval sequence t = [2.1, 2.2, 1.7, 2.2, 1.9, 1.9, 2.2, 1.8, 2.3, 1.8, 1.9] is calculated for adjacent timestamps. To eliminate abnormal jump values, the system sorts the time interval series and determines the valid interval of non-jump data based on the interquartile range (IQR) method. Q1 is approximately 1.85, Q3 is approximately 2.2, and IQR = 0.35. The lower limit value is calculated to be 1.325 and the upper limit value is 2.725. After eliminating extreme values ​​outside this range, the remaining non-jump time interval set is [2.1, 2.2, 2.2, 1.9, 1.9, 2.2, 1.8, 1.8, 1.9].

[0152] Based on the above set of non-jump time intervals, the system calculates that the mean value is approximately 2.0 seconds and the standard deviation is approximately 0.15 seconds, resulting in a coefficient of variation of 0.15 / 2.0 = 0.075. Since this coefficient of variation is less than the preset threshold of 0.1, the current sequence is deemed periodic, and the initial period estimate is set to 2.0 seconds. To further verify the stability of the period, the system continuously monitors the time intervals of M consecutive designated messages (M ≥ 3). If the coefficient of variation remains consistently less than 0.1, the period is considered stable, the subsequent determination process is terminated early, and 2.0 seconds is output as the final period estimate. If the sequence meets these conditions for all M consecutive messages, the system updates the sequence period field to 2.0 seconds, provided that the number of messages k ≥ the preset minimum value, and simultaneously updates the sequence status field to the third state, indicating that the sequence has stable periodic characteristics. Conversely, if the conditions are still not met after the number of designated messages received reaches the preset maximum, the sequence is deemed non-periodic, and the sequence period field remains at its initial value.

[0153] Through these steps, while effectively filtering out abnormal data, the coefficient of variation is combined to quantify the volatility of time intervals, improving the accuracy of period determination while ensuring the rational use of computing resources. Once the periodicity determination is complete, the sequence calculation unit notifies the sequence storage unit of the calculation results, which then updates or maintains the sequence period value and status, providing an accurate basis for subsequent keepalive detection period scheduling.

[0154] In practical applications of this embodiment, extracting the feature vector of the sequence based on the designated message matched by the sequence and the sequence period corresponding to the sequence specifically includes:

[0155] The timestamp of the first specified message in the sequence is set to time zero; based on the sequence period in the sequence field information, the phase offset of each specified message timestamp relative to its sequence period position is calculated using the following formula: ;

[0156] is the timestamp of the first specified message in the sequence; i is the sequence code of the sequence; is the timestamp of the kth specified message; is the value of the sequence period in the field information of the sequence whose sequence code is i; is the phase offset of the kth specified message timestamp relative to its sequence period position;

[0157] Counting the phase offset of each specified message timestamp corresponding to the sequence relative to its sequence period position, and obtaining the variance of the counted phase offset of the sequence;

[0158] Normalize each statistical feature separately and scale it to the interval [0, 1] to obtain the normalized statistical feature;

[0159] The statistical features include: the variance of the phase offset of the sequence, the first feature of the sequence, and the second feature of the sequence; the first feature = the final cycle estimate; the second feature = IQR / the median of the sorted time interval sequence;

[0160] The normalized statistical features are combined to form a feature vector, and the feature vector is written into the sequence feature vector in the field information corresponding to the sequence in the third state in the sequence storage unit.

[0161] For example, in the practical application of this embodiment, to more comprehensively characterize the behavioral characteristics of a periodic sequence, the system extracts a corresponding feature vector based on a specified message sequence determined to be periodic and writes it to a sequence storage unit. The construction of this feature vector primarily relies on the statistical regularity of the sequence's phase characteristics and periodic structure. The specific process is as follows.

[0162] First, the timestamp of the first specified message in the periodic sequence is set to time zero, and all timestamps in the sequence are shifted to obtain a relative timestamp sequence. For example, if a sequence is numbered i and its estimated period is 2.0 seconds, and the timestamps of the currently matched k = 8 specified messages are: 0.0, 2.0, 3.9, 5.8, 8.0, 9.9, 12.0, 14.1 (in seconds), then after relativization, the relative timestamps of the sequence are: [0.0, 2.0, 3.9, 5.8, 8.0, 9.9, 12.0, 14.1]. Next, the system calculates the phase offset of each specified message relative to the periodic position using the following phase offset formula: For this example, assume the calculated phase offset values ​​are: [0.0, 0.0, -0.1, -0.2, 0.0, -0.1, 0.0, 0.1] (in seconds). Next, a variance statistic is performed on the phase offset sequence to measure the consistency of alignment of each message within the sequence with the ideal period. The phase offset variance of the above sequence is approximately 0.0075, a small value, indicating a stable periodic structure. Furthermore, to further enrich the description of periodic behavior, the system introduces two additional statistical features: the first is the final estimated period of the sequence (assumed to be 2.0); the second is the dispersion of the time interval sequence, calculated as the interquartile range (IQR) of the sorted time interval sequence divided by its median. In this example, the time interval sequence is [2.0, 1.9, 1.9, 2.2, 1.9, 2.1, 2.1]. After sorting, Q1 = 1.9, Q3 = 2.1, resulting in an IQR of 0.2 and a median of 2.0, making the second feature 0.1. Subsequently, the three statistical features are normalized so that their values ​​fall within the interval [0, 1] to ensure consistency and comparability across feature dimensions. Assume that, after normalization, the phase offset variance corresponds to a normalized value of 0.08, the first feature is normalized to 0.67, and the second feature is normalized to 0.12. These three normalized values ​​are combined into a three-dimensional feature vector [0.08, 0.67, 0.12] and written to the field information corresponding to the sequence in the third state. This vector is then used by subsequent modules such as sequence clustering, similar behavior identification, or cyclic trend modeling.

[0163] By extracting and archiving the above-mentioned feature vectors, the quantitative expression of periodic behavior can be achieved based solely on time series data, which improves the efficiency and accuracy of modeling and analysis of IoT node behavior.

[0164] Preferably, in some embodiments of the present application, the keep-alive unit clusters and groups each sequence based on the feature vectors extracted by the multiple sequence calculation units, and establishes a periodic keep-alive channel between the gateway device and the target server in the IoT topology structure based on the clustering result, and uses the cellular network IP address obtained by the gateway device as the source address to send a keep-alive detection request to each target server according to the sending time slot, specifically including:

[0165] The keep-alive unit obtains, from the sequence storage unit, a sequence feature vector of each sequence that is in the third state and whose sequence period field is not -1;

[0166] The distance metric of each sequence is calculated using the following formula:

[0167] + + ;

[0168] is the distance metric of the sequence whose sequence code is i; is the first scale parameter; is the second scale parameter; is the third scale parameter; is the normalized first feature corresponding to the sequence with sequence encoding i; The first feature of the initial centroid of the K-means algorithm corresponding to the sequence with sequence code j; is the normalized second feature corresponding to the sequence with sequence encoding i; The second feature of the initial centroid of the K-means algorithm corresponding to the sequence with sequence code j; is the variance of the normalized phase offset corresponding to the sequence with sequence code i; is the variance of the phase shift of the initial centroid of the K-means algorithm corresponding to the sequence with sequence code j; in this embodiment, is 0.5; is 0.3; is 0.2.

[0169] The clustering effect under different K values ​​is evaluated based on the elbow rule, and the optimal number of clusters K is determined to minimize the intra-cluster sum of squared errors;

[0170] The K-means clustering method is used to divide the sequences into K cluster groups, and the clustering results are updated to the keep-alive group field of each sequence in the sequence storage unit. In this embodiment, to determine the appropriate number of clusters, the elbow rule is used to evaluate the intra-cluster sum-of-squared error under different cluster numbers. The cluster number corresponding to the significant decrease in error is selected as the optimal cluster number. Subsequently, all sequences are divided into several cluster groups based on the K-means algorithm, and the clustering results of each sequence are updated to the keep-alive group field in the sequence storage unit.

[0171] The keep-alive unit determines a keep-alive sending period of each keep-alive channel according to the sequence period of the sequence in each cluster group, wherein the keep-alive sending period takes the value of the minimum sequence period in the cluster group;

[0172] Establishing an initial keep-alive sending queue in each keep-alive channel, wherein the duration of the keep-alive sending queue is equal to the value of the minimum sequence period in the cluster group;

[0173] Among them, each sending time slot in the keep-alive sending queue corresponds to a unique target server IP in a cluster group;

[0174] The length of the sending time slot is: the value of the minimum sequence period in the group divided by the number of target server IP addresses in the group;

[0175] The keep-alive unit sorts the messages in the sending queue in chronological order according to the timestamp of each sequence, uses the cellular network IP address obtained by the gateway device as the source IP, and sends proxy keep-alive detection requests to each target server IP in the queue according to the sending time slot;

[0176] At the end of each transmission time slot, the keep-alive unit updates the keep-alive status field of all sequences in the packet according to the received response, and the keep-alive status field is normal or abnormal;

[0177] When the keep-alive unit does not receive a response from the target server in the current sending time slot and the sending time slot is not exhausted, the keep-alive unit continues to repeatedly send proxy keep-alive requests in the sending time slot to form intensive detection until a response from the target server is received or the sending time slot is exhausted;

[0178] After receiving the response from the target server, the keep-alive unit updates the keep-alive status field and keep-alive reply information field of each sequence in the packet according to the response result. If the keep-alive status is normal, it generates keep-alive response data of the corresponding protocol and forwards it to the node.

[0179] For example, in this embodiment, for each cluster group, the keepalive unit uses the minimum sequence period within the group as the group's keepalive transmission period, establishing a corresponding periodic keepalive channel. Within each keepalive channel, the keepalive unit divides the transmission period into a number of transmission time slots based on the number of target servers within the cluster group, with each time slot corresponding to a unique target server IP address. The keepalive unit uses the cellular network IP address obtained by the gateway device as the source address and sends proxy keepalive probe requests to the corresponding target servers in sequence according to the transmission time slots, simulating the keepalive behavior of each node.

[0180] During the transmission process, if no response is received from the target server within a time slot, the keepalive unit will repeatedly send keepalive requests for the remainder of that time slot, forming an intensive probe, until a response is received or the time slot ends. Upon receiving a response, the keepalive unit promptly updates the keepalive status field and keepalive reply information field for all sequences within the cluster group. If the response is normal, the keepalive status is marked as normal, and keepalive response data corresponding to the protocol is generated and fed back to the IoT node, ensuring that the node can obtain the keepalive result in real time.

[0181] Through clustering and dynamic scheduling, this method uses a single public IP address to efficiently proxy periodic keep-alive detection for a large number of IoT nodes, significantly reducing network resource usage and management complexity while ensuring the timeliness and accuracy of keep-alive detection. It is suitable for health management and status monitoring in large-scale cellular IoT environments.

[0182] For example, suppose five sequences are clustered into three cluster groups: Group 1: Sequences 1 and 2 (assuming the minimum sequence period is 2 seconds); Group 2: Sequences 3 and 4 (assuming the minimum sequence period is 5.5 seconds); and Group 3: Sequence 1 (assuming the minimum sequence period is 9 seconds). The keepalive unit updates the clustering result in the fields of each sequence and records it in the keepalive group number field. Next, the keepalive unit establishes a periodic keepalive channel for each cluster group, using the public cellular IP address obtained by the gateway device as the source IP address, and initiates keepalive probe requests to the target server in each group. For Group 1, for example, the keepalive channel's transmission period is set to the minimum period in the group, i.e., 2.0 seconds.

[0183] Assuming that the target server for sequence 1 in group 1 is IP1 (10.0.0.101) and the target server for sequence 2 is IP2 (10.0.0.102), the keepalive send queue has a duration of 2.0 seconds and consists of two send time slots: Time slot 1: [0s–1s] sends to IP1; Time slot 2: [1s–2s] sends to IP2. A send cycle occurs every 2.0 seconds, with a keepalive probe request message preferentially sent once in each time slot. If the keepalive unit fails to receive a timely response from the target server within a send time slot, for example, no response from IP2 in the second time slot, the system will continue to send repeated probes for the remaining time (up to 1 second) until a response is received or the time slot expires.

[0184] Upon successfully receiving a response from the target server, the keepalive unit immediately updates the keepalive status field of the corresponding sequence within its group to normal and records the response information (such as RTT and response code) in the "keepalive reply information field." If no response is received within the send time slot, the corresponding sequence status is set to abnormal. In practical applications, a gateway device can simulate the periodic heartbeat behavior of multiple nodes using only a single public IP address, effectively avoiding the resource waste and address allocation pressure caused by a large number of IoT terminals directly accessing public servers.

[0185] Preferably, in some embodiments of the present application, the sequence calculation unit is further configured to, after receiving a response from the target server to the keep-alive detection request, update the keep-alive status of the corresponding sequence based on the response result, and feed back the keep-alive status to the corresponding node in the IoT topology structure, specifically including:

[0186] The sequence calculation unit is configured to, after receiving a response from the target server to the keep-alive detection request, update the keep-alive status field and the keep-alive reply information field of the sequence associated with the request based on the response, and determine whether to feed back keep-alive response information to the corresponding node according to the keep-alive status of the sequence;

[0187] If the keep-alive status field is normal, the sequence calculation unit constructs a keep-alive response data packet corresponding to the protocol type used by the node and sends it to the node, specifically including:

[0188] When the protocol type corresponding to the designated message is the Internet Control Message Protocol, a network connectivity test response data packet for reply is constructed, the source IP address of the data packet is the destination IP of the packet header of the sequence, the destination IP address is the IP address of the node, and the response delay is set based on the keep-alive reply information field; when the protocol type corresponding to the designated message is the domain name system, a domain name system response data packet for replying to the query request is constructed, the source IP address of the data packet is the destination IP of the packet header of the sequence, the destination IP address is the IP address of the node, and the domain name resolution result is set based on the keep-alive reply information field; if the keep-alive status field is abnormal, no keep-alive response data packet is sent to the node;

[0189] When the protocol type corresponding to the designated message is the Internet Control Message Protocol, when constructing a network connectivity test response data packet for reply, the packet length field of the corresponding sequence is adapted and filled to simulate the preset reply packet corresponding to the original network connectivity test request message initiated by multiple nodes; when the protocol type corresponding to the designated message is the Domain Name System protocol, a Domain Name System response data packet is constructed to respond to the query request, and the domain name resolution result in the Domain Name System request body is fed back to the multiple nodes. Since the corresponding proxy domain name resolution request data packet has been sent during the proxy keep-alive phase, it carries the Domain Name System request body, which contains a list of resolved domain names for keep-alive detection and is a meaningful payload; since the domain name of the request body of each node may be different, the corresponding resolution result must be fed back for each node's different requests when responding.

[0190] For example, in this embodiment, the sequence calculation unit not only identifies sequence cycles but also performs the critical function of maintaining keepalive status. The specific process is as follows: when a gateway device initiates a proxy keepalive request and successfully receives a response from the target server, the sequence calculation unit first identifies the sequence to which the keepalive request corresponds. It immediately updates the keepalive status field of that sequence to normal and writes relevant response information (such as latency and domain name resolution results) into the keepalive reply information field of that sequence. Subsequently, based on this keepalive status, it determines whether to send back the constructed response packet to a specific node in the IoT topology.

[0191] For example, suppose node A periodically sends Internet Control Message Protocol (ICMP) connectivity probe messages. After sequence extraction and period identification, this behavior is incorporated into an ICP periodic sequence. The gateway device proactively initiates a proxy connectivity probe request to the target server according to the keepalive period and successfully receives a response (e.g., with a delay of 15ms). At this point, the sequence calculation unit updates the keepalive status field of the ICP sequence to normal, and the keepalive reply information field records the 15ms delay. The sequence calculation unit then constructs a network connectivity test response packet with the source IP address set to the destination IP address in the original request (i.e., the target server's public IP address), the destination IP address to node A's IP address, and the response content containing a simulated 15ms delay. To ensure the receiving node can successfully identify the response, the response packet adapts and pads the returned network connectivity test response based on the length field in the original request packet to maintain the expected format, thereby achieving the effect of "masquerading as a real response" and allowing node A to maintain its connection status.

[0192] Let's use the Domain Name System (DNS) protocol as an example. Assume that node B periodically requests resolution of the domain name "abc.device.net" from its configured DNS server. This behavior is identified as a periodic DNS protocol sequence, and a keepalive relationship is established. After the keepalive channel is established, the gateway device, acting on behalf of node B, sends a DNS resolution request to the target DNS server. The request body includes the domain name to be resolved. The DNS server returns the resolution result (for example, "abc.device.net" resolves to 10.1.1.10). After receiving this response, the sequence calculation unit identifies the DNS protocol sequence to which it belongs, updates the status field to normal, and records the resolution result "10.1.1.10" in the keepalive reply information field.

[0193] Subsequently, the sequence calculation unit will construct a domain name system response data packet, with the source IP being the IP of the domain name system server and the destination IP being the IP of node B, and the "abc.device.net" requested in the domain name system request body and its corresponding resolution result "10.1.1.10" will be written into the response body. In this way, the domain name system response received by node B will fully conform to the format and content expected by its normal request behavior, and will not perceive any abnormalities. In particular, considering that each node may request a different domain name, in actual applications, the sequence calculation unit will construct personalized domain name system response data based on the domain name system request body content retained in each sequence to support parallel processing of multiple nodes, multiple domain names, and multiple results, ensuring that each node obtains the correct resolution result for its specific request.

[0194] It's important to note that if the target server doesn't respond within a keepalive transmission slot, the sequence calculation unit updates the sequence keepalive status to abnormal and does not send any simulated responses to the corresponding node. This prevents the node from misjudging the network status due to erroneous data. This mechanism ensures consistent protocol stack behavior across nodes while accurately simulating the actual network keepalive status.

[0195] As can be seen from the above examples, this embodiment, through a sophisticated state judgment and protocol adaptation mechanism, enables the gateway device to complete keep-alive interactions for a large number of IoT terminal nodes in a cellular public network environment, thereby ensuring system activity, reducing signaling burden, and improving the transparency and stability of node operation. In addition, this embodiment also provides a cellular IoT multi-node keep-alive communication method, which is executed by the cellular IoT multi-node keep-alive communication system of the above embodiment. The method includes: intercepting and copying the uplink and downlink data streams of multiple nodes in the IoT topology structure forwarded by the gateway device through a first module to obtain a data packet containing complete protocol content, and extracting specified messages from the data packet respectively;

[0196] The second module receives the specified message extracted by the first module and performs the following operations:

[0197] Match the specified message with the pre-stored sequence. If the match is successful, update the field information of the matched sequence and determine its sequence state; based on the specified message that matches the sequence, update the sequence state and sequence period of the sequence; based on the specified message matched by the sequence and the sequence period corresponding to the sequence, extract the feature vector of the sequence, and cluster the sequences using the feature vectors of each sequence; based on the clustering result, establish a periodic keep-alive channel between the gateway device and the target server in the Internet of Things topology, and use the cellular network IP address obtained by the gateway device as the source address to send a keep-alive detection request to each target server according to the sending time slot; the sending time slot is determined by the sequence period of the sequence in the clustering group; after receiving the response of the target server to the keep-alive detection request, update the keep-alive state of the sequence according to the response result, and feed back the keep-alive state to the corresponding node in the Internet of Things topology.

[0198] Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations on the present application. Ordinary technicians in this field can change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A multi-node keep-alive communication system for cellular Internet of Things, characterized in that: The system is deployed in a gateway device in an Internet of Things topology, and includes: The first module is used to intercept and copy the uplink and downlink data streams of multiple nodes in the IoT topology structure forwarded by the gateway device in a bypass manner to obtain a data packet containing complete protocol content and extract a specified message from the data packet; The second module is configured to receive the specified message extracted by the first module and perform the following operations: Match the specified message with the pre-stored sequence. If the match is successful, update the field information of the matched sequence and determine its sequence status. Based on the specified message matching the sequence, the sequence state and sequence period of the sequence are updated; Based on the specified message matched by the sequence and the sequence period corresponding to the sequence, the feature vector of the sequence is extracted, and the sequences are clustered and grouped using the feature vectors of each sequence; Based on the clustering results, a periodic keepalive channel is established between the gateway device and the target server in the IoT topology. The cellular network IP address obtained by the gateway device is used as the source address, and keepalive detection requests are sent to each target server according to the sending time slot. The sending time slot is determined by the sequence period of the sequence in the cluster group; After receiving the response from the target server to the keep-alive detection request, the keep-alive status of the sequence is updated according to the response result, and the keep-alive status is fed back to the corresponding node in the IoT topology.

2. The cellular Internet of Things multi-node keep-alive communication system according to claim 1, characterized in that: The first module includes: a data replication unit and a plurality of protocol filtering units; The data replication unit is configured to intercept and replicate the uplink and downlink data flows of multiple nodes in the IoT topology structure forwarded by the gateway device in a bypass manner to obtain a data packet containing complete protocol content, identify the protocol type of the data packet, and distribute the data packet to a protocol filtering unit corresponding to the protocol type; A plurality of protocol filtering units, each corresponding to a different protocol type configuration, each protocol filtering unit is used to receive a data packet of a corresponding protocol type, extract a specified message therefrom, and send the specified message to the second module; The specified message includes a timestamp of a receiving time obtained from the extracted data packet, a source IP address of the packet header, a destination IP address of the packet header, a message type, and a packet length.

3. The cellular Internet of Things multi-node keep-alive communication system according to claim 2, characterized in that: The second module includes: a sequence storage unit, a keep-alive unit, and a plurality of sequence calculation units; The plurality of sequence calculation units correspond one-to-one to the plurality of protocol filtering units in the first module, and each sequence calculation unit is configured to receive a specified message of a corresponding protocol type and perform the following operations: Match the specified message with the sequence pre-stored in the sequence storage unit. If the match is successful, update the field information of the matched sequence and determine its sequence status; Based on the specified message matching the sequence, the sequence state and sequence period of the sequence are updated; Extracting a feature vector of the sequence based on a specified message matched by the sequence and a sequence period corresponding to the sequence; The keep-alive unit is configured to cluster and group each sequence based on the feature vectors extracted by the plurality of sequence calculation units, and establish a periodic keep-alive channel between the gateway device and a target server in the IoT topology structure according to the clustering result, and send a keep-alive detection request to each target server at a first time interval using the cellular network IP address obtained by the gateway device as the source address; The sequence calculation unit is further configured to update the keep-alive status of the corresponding sequence based on the response result after receiving the response from the target server to the keep-alive detection request, and feed back the keep-alive status to the corresponding node in the IoT topology.

4. The cellular Internet of Things multi-node keep-alive communication system according to claim 3, characterized in that: The sequence storage unit pre-stores at least one sequence, wherein each sequence includes the following field information: Update time, used to record the timestamp of the last specified message that matched the sequence; sequence code, used to identify the unique coding field of the sequence; packet header source IP list, used to store the source IP address obtained by the node from the gateway device in the IoT topology; packet header destination IP, used to identify the target server IP address in the IoT topology; packet length, used to record the length of the data packet; Sequence state, used to indicate the state of the current sequence, including the first state, the second state, the third state, and the fourth state; message type, a field used to indicate the message protocol type; domain name system request body, used to store the list of domain names initiated for resolution by the node in the domain name system protocol type keep-alive; sequence period, a field used to record the sequence keep-alive period; remaining survival time, used to indicate the remaining waiting time for the next specified message to arrive; keep-alive state, a keep-alive status field used to indicate whether the most recent keep-alive detection request for the sequence was successful; keep-alive reply information, used to store information about the target server's response to the keep-alive detection request; sequence feature vector, a vector used to indicate the sequence feature extracted based on the specified message; keep-alive group, a field used to indicate the keep-alive cluster group to which the sequence belongs.

5. The cellular Internet of Things multi-node keep-alive communication system according to claim 4, characterized in that: The matching success condition is that the destination IP, message type and packet length in the received designated message are the same as the corresponding field information in any pre-stored sequence; Matches the specified message with the pre-stored sequence. If the match is successful, updates the field information of the matched sequence and determines its sequence status, including: Add the source IP address of the packet header in the specified message to the packet header source IP list field of the matched sequence; Updating the timestamp of the received packet in the designated message to the update time in the matched sequence field information; Reset the remaining survival time in the matched sequence field information to a preset initial value. The remaining survival time is a decrement timer. When its value drops to 0, perform the following processing: If the sequence state of the matched sequence is the first state, deleting the sequence from the sequence storage unit; If the sequence state is the second state, update it to the fourth state; If the sequence state is the third state, keep the current state unchanged; If the sequence state is the fourth state, update it to the first state; The first state indicates that the sequence currently receives only one specified message, and the sequence period in the field information of the sequence is set to -1; The second state indicates that the sequence receives multiple specified messages within the remaining waiting time for the next specified message to arrive, but the sequence period has not been confirmed. The sequence period in the field information of the sequence is set to -1; The third state indicates that the sequence period has been confirmed, and the previous state is the second state. The sequence period in the field information of the sequence has a period value; The fourth state indicates that the cycle calculation is not completed because the number of received specified messages is less than the preset minimum value, and the sequence cycle in the field information of the sequence is set to -1; The sequence calculation unit is further configured to generate a sequence corresponding to the designated message when the received designated message fails to match the sequence pre-stored in the sequence storage unit, and set the sequence state of the generated sequence to the first state; The field information of the generated sequence is all initial values ​​extracted from the specified message.

6. The cellular Internet of Things multi-node keep-alive communication system according to claim 5, characterized in that: The updating of the sequence state and sequence period of the sequence based on the specified message matching the sequence specifically includes: Extract the timestamps of the k specified messages currently received in the sequence and convert the timestamps into a relative time series based on the timestamp of the first specified message; where k is greater than a preset minimum value; For relative time series, a time interval series is constructed based on the difference between adjacent timestamps; Sort the time interval sequence, obtain the first quartile Q1 and the third quartile Q3 of the sorted time interval sequence, and calculate the interquartile range (IQR) based on them; all time intervals smaller than the lower limit or greater than the upper limit are considered as outliers and removed, and the remaining data are retained to form a set of non-jump time intervals; Where, IQR = Q3 - Q1; lower limit = Q1 - 1.5 × IQR; upper limit = Q3 + 1.5 × IQR; Based on the non-jump time interval set, the average value and standard deviation are calculated, and the coefficient of variation is determined accordingly; the coefficient of variation = standard deviation / average value; When the coefficient of variation is less than the set threshold, the current sequence is judged to be periodic, and the initial period estimation value is taken as the average value of the non-jump time interval set; If the sequence satisfies the requirement that the coefficient of variation is less than the threshold value in all subsequent M consecutive designated messages, the subsequent judgment is terminated in advance, and the initial period estimation value is used as the final period estimation value; If the number of received specified messages has reached the preset maximum value but the final period estimation value has not been obtained, the sequence is considered to have no periodic characteristics; The sequence calculation unit sends the periodicity judgment result to the sequence storage unit: If the sequence is periodic, the sequence period in the field information of the sequence is updated to the final period estimate, and the sequence state in the field information is updated to the third state; If the sequence is not periodic, the sequence period in the field information of the sequence remains at the initial value, and the sequence state in the field information remains unchanged.

7. The cellular Internet of Things multi-node keep-alive communication system according to claim 6, characterized in that: The extracting of a feature vector of the sequence based on the designated message matched by the sequence and the sequence period corresponding to the sequence specifically includes: Set the timestamp of the first specified message in the sequence to zero time; Based on the sequence period in the sequence field information, the phase offset of each specified message timestamp relative to its sequence period position is calculated using the following formula: ; is the timestamp of the first specified message in the sequence; i is the sequence code of the sequence; is the timestamp of the kth specified message; is the value of the sequence period in the field information of the sequence whose sequence code is i; is the phase offset of the kth specified message timestamp relative to its sequence period position; Counting the phase offset of each specified message timestamp corresponding to the sequence relative to its sequence period position, and obtaining the variance of the counted phase offset of the sequence; Normalize each statistical feature separately and scale it to the interval [0, 1] to obtain the normalized statistical feature; The statistical features include: the variance of the phase offset of the sequence, the first feature of the sequence, and the second feature of the sequence; The first feature = final cycle estimate; The second feature = IQR / median of the sorted time interval sequence; The normalized statistical features are combined to form a feature vector, and the feature vector is written into the sequence feature vector in the field information corresponding to the sequence in the third state in the sequence storage unit.

8. The cellular Internet of Things multi-node keep-alive communication system according to claim 7, characterized in that: The keep-alive unit clusters and groups each sequence based on the feature vectors extracted by multiple sequence calculation units. Based on the clustering results, it establishes a periodic keep-alive channel between the gateway device and the target server in the IoT topology. It uses the cellular network IP address obtained by the gateway device as the source address and sends a keep-alive detection request to each target server according to the sending time slot. Specifically, it includes: The keep-alive unit obtains, from the sequence storage unit, a sequence feature vector of each sequence that is in the third state and whose sequence period field is not -1; The distance metric of each sequence is calculated using the following formula: + + ; is the distance metric of the sequence whose sequence code is i; is the first scale parameter; is the second scale parameter; is the third scale parameter; is the normalized first feature corresponding to the sequence with sequence encoding i; The first feature of the initial centroid of the K-means algorithm corresponding to the sequence with sequence code j; is the normalized second feature corresponding to the sequence with sequence encoding i; The second feature of the initial centroid of the K-means algorithm corresponding to the sequence with sequence code j; is the variance of the normalized phase offset corresponding to the sequence with sequence code i; is the variance of the phase shift of the initial centroid of the K-means algorithm corresponding to the sequence with sequence code j; The clustering effect under different K values ​​is evaluated based on the elbow rule, and the optimal number of clusters K is determined to minimize the intra-cluster sum of squared errors; The K-means clustering method is used to divide the sequence into K cluster groups, and the clustering results are updated to the keep-alive group of each sequence in the sequence storage unit; The keep-alive unit determines a keep-alive sending period of each keep-alive channel according to the sequence period of the sequence in each cluster group, wherein the keep-alive sending period takes the value of the minimum sequence period in the cluster group; Establishing an initial keep-alive sending queue in each keep-alive channel, wherein the duration of the keep-alive sending queue is equal to the value of the minimum sequence period in the cluster group; Among them, each sending time slot in the keep-alive sending queue corresponds to a unique target server IP in a cluster group; The length of the sending time slot is: the value of the minimum sequence period in the group divided by the number of target server IP addresses in the group; The keep-alive unit sorts the messages in the sending queue in chronological order according to the timestamp of each sequence, uses the cellular network IP address obtained by the gateway device as the source IP, and sends proxy keep-alive detection requests to each target server IP in the queue according to the sending time slot; At the end of each transmission time slot, the keep-alive unit updates the keep-alive status field of all sequences in the packet according to the received response, and the keep-alive status field is normal or abnormal; When the keep-alive unit does not receive a response from the target server in the current sending time slot and the sending time slot is not exhausted, the keep-alive unit continues to repeatedly send proxy keep-alive requests in the sending time slot to form intensive detection until a response from the target server is received or the sending time slot is exhausted; After receiving the response from the target server, the keep-alive unit updates the keep-alive status field and keep-alive reply information field of each sequence in the packet according to the response result. If the keep-alive status is normal, it generates keep-alive response data of the corresponding protocol and forwards it to the node.

9. The cellular Internet of Things multi-node keep-alive communication system according to claim 8, characterized in that: The sequence calculation unit is further configured to, after receiving a response from the target server to the keep-alive detection request, update the keep-alive status of the corresponding sequence based on the response result, and feed back the keep-alive status to the corresponding node in the IoT topology structure, specifically including: The sequence calculation unit is configured to, after receiving a response from the target server to the keep-alive detection request, update the keep-alive status field and the keep-alive reply information field of the sequence associated with the request based on the response, and determine whether to feed back keep-alive response information to the corresponding node according to the keep-alive status of the sequence; If the keep-alive status field is normal, the sequence calculation unit constructs a keep-alive response data packet corresponding to the protocol type used by the node and sends it to the node, specifically including: When the protocol type corresponding to the designated message is Internet Control Message Protocol, constructing a network connectivity test response data packet for reply, wherein the source IP address of the data packet is the destination IP address of the packet header of the sequence, the destination IP address is the IP address of the node, and the response delay is set based on the keep-alive reply information field; When the protocol type corresponding to the designated message is the Domain Name System protocol, constructing a Domain Name System response data packet for replying to the query request, wherein the source IP address of the data packet is the destination IP address in the packet header of the sequence, the destination IP address is the IP address of the node, and the domain name resolution result is set based on the keep-alive reply information field; If the keep-alive status field is abnormal, no keep-alive response data packet is sent to the node; When the protocol type corresponding to the designated message is the Internet Control Message Protocol, when constructing a network connectivity test response data packet for reply, adaptive padding is performed according to the packet length field of the corresponding sequence to simulate a preset reply packet corresponding to the original network connectivity test request message initiated by multiple nodes; When the protocol type corresponding to the designated message is the domain name system protocol, a domain name system response data packet for responding to the query request is constructed, and the domain name resolution result in the domain name system request body is fed back to multiple nodes.

10. A multi-node keep-alive communication method for cellular Internet of Things, characterized in that: The method is performed by the cellular Internet of Things multi-node keep-alive communication system according to any one of claims 1 to 9, and the method includes: intercepting and copying the uplink and downlink data streams of multiple nodes in the IoT topology structure forwarded by the gateway device through the first module to obtain data packets containing complete protocol content, and extracting specified messages from the data packets respectively; The second module receives the specified message extracted by the first module and performs the following operations: Match the specified message with the pre-stored sequence. If the match is successful, update the field information of the matched sequence and determine its sequence status. Based on the specified message matching the sequence, the sequence state and sequence period of the sequence are updated; Based on the specified message matched by the sequence and the sequence period corresponding to the sequence, the feature vector of the sequence is extracted, and the sequences are clustered and grouped using the feature vectors of each sequence; Based on the clustering results, a periodic keepalive channel is established between the gateway device and the target server in the IoT topology. The cellular network IP address obtained by the gateway device is used as the source address, and keepalive detection requests are sent to each target server according to the sending time slot. The sending time slot is determined by the sequence period of the sequence in the cluster group; After receiving the response from the target server to the keep-alive detection request, the keep-alive status of the sequence is updated according to the response result, and the keep-alive status is fed back to the corresponding node in the IoT topology.

Citation Information

Patent Citations

  • Methods and apparatus to support network-based IP flow mobility via multiple wireless accesses for a wireless device

    CN106465227A

  • Devices for packet system bearer splitting

    CN106664601A

  • Keep-alive mechanism realized by optimizing node communication

    CN114007232A

  • Dual-stack network adaptive scheduling method and system based on DNS analysis strategy

    CN120017715A

  • Optimal service discovery method based on explicit multicast assistance, medium and equipment

    CN120263717A

Cited By

  • Dynamic link detection method and device for client front-end equipment

    CN121193641A