System and method for concurrent connection and access control of massive intelligent terminal devices

By combining a global load balancer, access control center, distributed connection gateway cluster, distributed cache cluster, and message middleware cluster, the bottleneck and security issues of concurrent connections of massive intelligent terminal devices in traditional architectures are solved, achieving efficient and secure system expansion and fine-grained access control.

CN121151069APending Publication Date: 2025-12-16浪潮智能终端有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511417936.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

Traditional client-server architectures suffer from bottlenecks in connection count, poor high-concurrency performance, insufficient access control security, and poor system scalability when faced with massive concurrent connections from smart terminal devices, making it difficult to achieve efficient, secure, and scalable connection management.

Method used

A combined solution of global load balancer, access control center, distributed connection gateway cluster, distributed cache cluster and message middleware cluster is adopted. Through identity authentication, permission management, dynamic heartbeat mechanism and broadcast-filtering mechanism, efficient distribution of device connections, status maintenance and command routing are achieved.

Benefits of technology

It effectively solves the bottleneck of connection count, high concurrency performance and security issues under massive device access, and realizes high availability, high scalability and fine-grained security management of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121151069A_ABST
    Figure CN121151069A_ABST
Patent Text Reader

Abstract

The invention discloses a mass intelligent terminal equipment concurrent connection and access control system and method, and relates to the technical field of Internet of Things communication, and the system comprises a global load balancer which is used for receiving a connection request of terminal equipment and matching a gateway node for the request; the access control center is used for carrying out identity authentication and authority management on the equipment; the distributed connection gateway cluster is used for matching a matched gateway node with different communication protocols from the equipment, establishing and maintaining an equipment connection state, creating a lightweight session context and forwarding equipment data and a back-end instruction after the equipment meets an access requirement; the distributed cache cluster is used for storing session metadata; the message middleware cluster is used for asynchronously receiving the equipment uplink data message forwarded by the gateway node and providing the equipment uplink data message to a back-end service system for consumption; and meanwhile, receiving a downlink instruction message sent by a back-end service system. According to the method, the problems of connection number bottleneck, high concurrency performance and safety under massive equipment access are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet of Things communication, in particular to a system and method for concurrent connection and access control of massive intelligent terminal devices. BACKGROUND

[0002] With the rapid development of Internet of Things technology, the number of intelligent terminal devices (such as intelligent temperature and humidity monitoring terminals) is growing exponentially. These devices need to establish persistent or frequent communication connections with cloud service platforms to realize functions such as data reporting, instruction receiving, and state synchronization.

[0003] Currently, the traditional client-server architecture faces many technical challenges when dealing with massive device concurrent connections:

[0004] 1. Connection number bottleneck. A single server or gateway is limited by the number of ports, threads / processes, memory, and CPU resources, and cannot support millions or even tens of millions of concurrent TCP / IP connections.

[0005] 2. High concurrency performance problem. When a large number of devices simultaneously initiate connection requests or report data, the traditional synchronous blocking I / O model can cause server resources to be exhausted, response delays to increase dramatically, and even service crashes.

[0006] 3. Coarse access control granularity. Traditional access control is mostly based on IP addresses or simple API keys, which cannot meet the fine-grained security management needs of large numbers of devices, diverse types, and complex permissions in Internet of Things scenarios. Leakage of a device's key can compromise the entire system.

[0007] 4. Poor scalability. The system is difficult to implement smooth horizontal expansion. When adding servers, complex configuration and load balancing strategies are usually required, and session state maintenance is difficult.

[0008] In the prior art, although there are some solutions based on load balancers or message queues, they still have deficiencies in protocol adaptation, connection state management, dynamic scaling, and the balance between security and efficiency. Therefore, there is an urgent need for a solution that can efficiently, securely, and scalably handle massive intelligent terminal device concurrent connections and access control. SUMMARY

[0009] The present application provides a system and method for concurrent connection and access control of massive intelligent terminal devices to address the connection number bottleneck, low concurrency performance, insufficient access control security, and poor system scalability of traditional architectures, achieving high availability, high scalability, and fine-grained security management of the system.

[0010] In a first aspect, the present application provides a system for mass intelligent terminal device concurrent connection and access control, which solves the above technical problems by adopting the following technical solutions:

[0011] A system for mass intelligent terminal device concurrent connection and access control, comprising:

[0012] A global load balancer, configured to: receive a connection request initiated by an intelligent terminal device, and match a gateway node in a distributed connection gateway cluster for the connection request according to a preset strategy;

[0013] An access control center, connected with the global load balancer, configured to: after the intelligent terminal device is matched to the gateway node through the global load balancer, perform identity authentication and permission management on the intelligent terminal device;

[0014] A distributed connection gateway cluster, connected with the access control center, configured to: after the intelligent terminal device passes the identity authentication and the permission check meets the access requirement, the matched gateway node adapts to different communication protocols from the device, establishes and maintains the device connection state; the matched gateway node creates a lightweight session context for the connection request of the intelligent terminal device, and synchronously stores session metadata to a distributed cache cluster; forwards the device uplink data and the backend downlink instruction based on the session context;

[0015] A distributed cache cluster, connected with the distributed connection gateway cluster, configured to: store the session metadata of all intelligent terminal devices, support the query and call of the session metadata by different gateway nodes in the distributed connection gateway cluster, realize the session state sharing across the gateway nodes, and ensure the continuity of the device connection and the accuracy of the instruction routing;

[0016] A message middleware cluster, connected with the distributed connection gateway cluster, configured to: asynchronously receive the device uplink data message forwarded by the gateway node in the distributed connection gateway cluster, and provide the device uplink data message to a backend business system for consumption; and simultaneously receive the downlink instruction message sent by the backend business system, and store the downlink instruction message in a corresponding downlink instruction topic.

[0017] Optionally, the global load balancer performs the following operations:

[0018] Receives and analyzes the connection request initiated by the intelligent terminal device, and extracts key information therefrom;

[0019] Based on the extracted key information, matches the gateway node in the distributed connection gateway cluster for the connection request through a preset strategy;

[0020] Queries and obtains the connection information of the matched gateway node from a gateway management system, and then accurately distributes the connection request of the intelligent terminal device to the matched gateway node, to complete the directional forwarding of the request.

[0021] Optionally, after the intelligent terminal device passes the identity authentication and the permission check, the matched gateway node first adapts to different communication protocols from the intelligent terminal device, and then establishes and maintains the device connection state;

[0022] Meanwhile, the gateway node and the intelligent terminal device establish a dynamic heartbeat mechanism, and adaptively adjust the heartbeat parameters according to the network condition and the type of the intelligent terminal device. Then, the intelligent terminal device sends a heartbeat message to the gateway node according to the agreed heartbeat parameters, thereby proving that it is in an online and normal operation state. The gateway node receives and records the heartbeat message of the intelligent terminal device in real time. If the heartbeat message of the device is not received within the set heartbeat timeout parameter, it is determined that the intelligent terminal device connection is abnormal, and an abnormal processing procedure is triggered. If the heartbeat recovery message of the intelligent terminal device is subsequently received again, the device state is quickly updated to "online", and the normal data interaction between the intelligent terminal device and the gateway node is restored.

[0023] Optionally, after the intelligent terminal device passes the identity authentication and the permission check, the matched gateway node in the distributed connection gateway cluster forwards the device data and the backend downlink instruction based on the session context, specifically including:

[0024] After the intelligent terminal device generates uplink data, the gateway node matched in the distributed connection gateway cluster serves as a message producer, and completes the uplink data forwarding based on the session context of the device. The message middleware cluster asynchronously receives the uplink data message of the device, and provides it to the backend business system for consumption.

[0025] The message middleware cluster receives the downlink instruction message issued by the backend business system, and stores it in the corresponding downlink instruction topic. At this time, all gateway nodes in the distributed connection gateway cluster that have subscribed to the downlink instruction topic serve as message consumers, and simultaneously receive the downlink instruction message. Then, the gateway nodes query the target device session metadata stored in the distributed cache cluster, accurately route the downlink instruction message to the corresponding target intelligent terminal device connection through the established connection, and complete the instruction pushing.

[0026] Optionally, the routing of the involved downlink instruction adopts a broadcast-filtering mechanism, specifically including:

[0027] After the message middleware cluster stores the downlink instruction message issued by the backend business system in the corresponding downlink instruction topic, all gateway nodes in the distributed connection gateway cluster receive the downlink instruction message, and only the gateway nodes that have established a connection with the target intelligent terminal device execute the instruction issuing operation by querying the distributed cache cluster. The remaining gateway nodes discard the downlink instruction message.

[0028] In a second aspect, the present application provides a method for concurrent connection and access control of mass intelligent terminal devices, which solves the above technical problems by adopting the following technical scheme:

[0029] A method for concurrent connection and access control of mass intelligent terminal devices, which comprises the following steps:

[0030] S1, a connection request initiated by an intelligent terminal device is received by a global load balancer, which matches a gateway node in a distributed connection gateway cluster for the connection request according to a preset strategy;

[0031] S2, after successfully matching the gateway node, an access control center performs identity authentication and authority management on the intelligent terminal device, and the intelligent terminal device performs the next operation after passing the identity authentication and authority check;

[0032] S3, the intelligent terminal device establishes a connection with the matched gateway node in the distributed connection gateway cluster, the gateway node first adapts different communication protocols from the device, establishes and maintains the device connection state, then creates a lightweight session context for the connection request of the intelligent terminal device, and synchronously stores the session metadata to a distributed cache cluster;

[0033] S4, the distributed cache cluster stores the session metadata of all intelligent terminal devices, thereby supporting the query and call of the session metadata by different gateway nodes in the distributed connection gateway cluster, realizing the sharing of session states across gateway nodes, and ensuring the continuity and accuracy of instruction routing when the device connection is interrupted and re-accessed;

[0034] S5, after the intelligent terminal device generates uplink data, the matched gateway node in the distributed connection gateway cluster is taken as a message producer, and the uplink data is forwarded based on the session context of the device; the message middleware cluster asynchronously receives the uplink data message of the device and provides it to a back-end business system for consumption;

[0035] S6, the message middleware cluster receives a downlink instruction message issued by a back-end business system and stores it in a corresponding downlink instruction topic; all gateway nodes in the distributed connection gateway cluster that have subscribed to the downlink instruction topic simultaneously receive the downlink instruction message as message consumers, then query the target device session metadata stored in the distributed cache cluster, and accurately route the downlink instruction message to the corresponding target intelligent terminal device connection through the established connection, thereby completing the instruction pushing.

[0036] Optionally, the global load balancer in step S1 performs the following operations:

[0037] Receives and parses the connection request initiated by the intelligent terminal device, and extracts key information therefrom;

[0038] Based on the extracted key information, a preset strategy is used to match the connection request with a gateway node in the distributed connection gateway cluster.

[0039] The system queries and retrieves the connection information of the matched gateway nodes from the gateway management system, and then accurately distributes the connection requests of the smart terminal devices to the matched gateway nodes, thus completing the targeted forwarding of the requests.

[0040] Optionally, when performing step S3, the gateway node matched in the distributed connection gateway cluster first adapts to different communication protocols from smart terminal devices, and then establishes and maintains the device connection status.

[0041] At the same time, the gateway node establishes a dynamic heartbeat mechanism with the smart terminal device, and adaptively adjusts the heartbeat parameters according to the network conditions and the type of smart terminal device.

[0042] Subsequently, the smart terminal device sends a heartbeat message to the gateway node according to the agreed heartbeat parameters to prove that it is online and operating normally. The gateway node receives and records the heartbeat messages of the smart terminal device in real time. If it does not receive the heartbeat message from the device within the set heartbeat timeout parameter, it determines that the smart terminal device is abnormal and triggers the abnormal handling process. If it subsequently receives the heartbeat recovery message from the smart terminal device, it quickly updates the device status to "online" and resumes normal data interaction with the smart terminal device.

[0043] Optionally, the routing of downlink commands adopts a broadcast-filtering mechanism, specifically as follows:

[0044] After the message middleware cluster stores the downlink instruction message issued by the backend business system in the corresponding downlink instruction topic, all gateway nodes in the distributed connection gateway cluster receive the downlink instruction message. By querying the distributed cache cluster, only the gateway node that has established a connection with the target smart terminal device executes the instruction issuance operation, while the other gateway nodes discard the downlink instruction message.

[0045] The system and method for concurrent connection and access control of massive intelligent terminal devices of the present invention have the following advantages compared with the prior art:

[0046] This invention effectively solves the bottleneck of connection count, high concurrency performance and security issues under massive device access, and realizes high availability, high scalability and fine-grained security management of the system. Attached Figure Description

[0047] Appendix Figure 1 This is a module connection block diagram of Embodiment 1 of the present invention;

[0048] Appendix Figure 2 This is a flowchart of the method according to Embodiment 2 of the present invention;

[0049] Appendix Figure 3 This is a flowchart illustrating the specific execution of Embodiment 2 of the present invention. Detailed Implementation

[0050] To make the technical solution, the technical problem solved, and the technical effect of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with specific embodiments.

[0051] Example 1:

[0052] Combined with appendix Figure 1 This embodiment proposes a system for concurrent connection and access control of massive intelligent terminal devices, which includes: a global load balancer, an access control center, a distributed connection gateway cluster, a distributed cache cluster, and a message middleware cluster.

[0053] A global load balancer is used to: receive connection requests initiated by smart terminal devices and match the connection request with a gateway node in a distributed connection gateway cluster according to a preset strategy. Its specific implementation process is as follows:

[0054] Receive and parse connection requests initiated by smart terminal devices, and extract key information from them;

[0055] Based on the extracted key information, a preset strategy is used to match the connection request with a gateway node in the distributed connection gateway cluster.

[0056] The system queries and retrieves the connection information of the matched gateway nodes from the gateway management system, and then accurately distributes the connection requests of the smart terminal devices to the matched gateway nodes, thus completing the targeted forwarding of the requests.

[0057] The access control center, connected to the global load balancer, is used to perform identity authentication and access control for smart terminal devices after they are matched with the gateway node through the global load balancer.

[0058] When authenticating the identity of smart terminal devices, use an X.509 certificate or a combination of device key and dynamic token for authentication.

[0059] When managing permissions for smart terminal devices, the topic of each publish or subscribe operation by the device is verified to ensure that it has the permission to operate on that topic.

[0060] The distributed connection gateway cluster, connected to the access control center, is used for: establishing and maintaining the device connection status by adapting to different communication protocols (such as MQTT, CoAP, HTTP, TCP private protocol, etc.) from the smart terminal device after the smart terminal device passes identity authentication and permission verification meets the access requirements through the matched gateway node; creating a lightweight session context for the connection request of the smart terminal device through the matched gateway node, and synchronously storing the session metadata (device ID, gateway node ID, connection status) to the distributed cache cluster; and forwarding the device uplink data and backend downlink instructions based on the session context.

[0061] A distributed connection gateway cluster consists of multiple stateless or light-state connection gateway nodes. Stateless nodes do not store any request context and are "independent for each request". Light-state nodes store only "a very small amount of necessary context" rather than complete state.

[0062] After the smart terminal device passes identity authentication and permission verification, the matched gateway node first adapts to different communication protocols from the smart terminal device, and then establishes and maintains the device connection status. Simultaneously, the gateway node establishes a dynamic heartbeat mechanism with the smart terminal device, adaptively adjusting heartbeat parameters (such as heartbeat interval and timeout threshold) based on network conditions (e.g., latency, packet loss rate) and the type of smart terminal device (e.g., industrial environmental monitoring terminal, consumer terminal). Subsequently, the smart terminal device sends heartbeat messages to the gateway node according to the agreed heartbeat parameters to prove that it is online and operating normally. The gateway node receives and records the heartbeat messages from the smart terminal device in real time. If it does not receive a heartbeat message from the device within the set heartbeat timeout parameters, it determines that the smart terminal device connection is abnormal and triggers an exception handling process (e.g., marking the device status as "offline" and notifying the backend business system). If it subsequently receives a heartbeat recovery message from the smart terminal device, it quickly updates the device status to "online" and resumes normal data interaction with the smart terminal device.

[0063] After the smart terminal device passes identity authentication and the permission verification meets the access requirements, the gateway node matched in the distributed connection gateway cluster forwards device data and backend downlink instructions based on the session context, specifically including:

[0064] After the smart terminal device generates uplink data, the gateway node that has been matched in the distributed connection gateway cluster acts as the message producer and forwards the uplink data based on the device's session context; the message middleware cluster asynchronously receives the uplink data message from the device and provides it to the backend business system for consumption.

[0065] The message middleware cluster receives downlink instruction messages from the backend business system and stores them in the corresponding downlink instruction topic. At this time, all gateway nodes in the distributed connection gateway cluster that have subscribed to the downlink instruction topic act as message consumers and receive the downlink instruction message. Then, they query the target device session metadata (device ID, gateway node ID, connection status) stored in the distributed cache cluster and accurately route the downlink instruction message to the corresponding target smart terminal device connection through the established connection to complete the instruction push.

[0066] The distributed cache cluster, connected to the distributed connection gateway cluster, is used to: store session metadata (device ID, gateway node ID, connection status) of all smart terminal devices, support different gateway nodes in the distributed connection gateway cluster to query and call session metadata (device ID, gateway node ID, connection status), realize session state sharing across gateway nodes, and ensure the continuity of device connections and the accuracy of command routing.

[0067] The message middleware cluster, connected to the distributed connection gateway cluster, is used to asynchronously receive uplink data messages from devices forwarded by gateway nodes in the distributed connection gateway cluster and provide them to the backend business system for consumption; at the same time, it receives downlink instruction messages issued by the backend business system and stores them in the corresponding downlink instruction topic.

[0068] Downlink command routing employs a broadcast-filtering mechanism, specifically as follows:

[0069] After the message middleware cluster stores the downlink instruction message issued by the backend business system in the corresponding downlink instruction topic, all gateway nodes in the distributed connection gateway cluster receive the downlink instruction message. By querying the distributed cache cluster, only the gateway node that has established a connection with the target smart terminal device executes the instruction issuance operation, while the other gateway nodes discard the downlink instruction message.

[0070] Example 2:

[0071] Combined with appendix Figure 2 This embodiment proposes a method for concurrent connection and access control of massive intelligent terminal devices, characterized by the following steps:

[0072] S1. A connection request initiated by a smart terminal device is received by the global load balancer, which matches the connection request with a gateway node in the distributed connection gateway cluster according to a preset strategy.

[0073] The global load balancer performs the following operations:

[0074] Receive and parse connection requests initiated by smart terminal devices, and extract key information from them;

[0075] Based on the extracted key information, a preset strategy is used to match the connection request with a gateway node in the distributed connection gateway cluster.

[0076] The system queries and retrieves the connection information of the matched gateway nodes from the gateway management system, and then accurately distributes the connection requests of the smart terminal devices to the matched gateway nodes, thus completing the targeted forwarding of the requests.

[0077] S2. After successfully matching the gateway node, the access control center performs identity authentication and permission management on the smart terminal device. After the smart terminal device passes the identity authentication and permission verification and meets the access requirements, it will execute the next operation.

[0078] When performing this step, authentication of the smart terminal device is performed using an X.509 certificate or a combination of a device key and a dynamic token; when managing the permissions of the smart terminal device, the topic of each publish or subscribe operation by the device is verified to ensure that it has the permission to operate on that topic.

[0079] S3. The smart terminal device establishes a connection with the gateway node matched in the distributed connection gateway cluster. The gateway node first adapts to different communication protocols from the device (such as MQTT, CoAP, HTTP, TCP private protocol, etc.), establishes and maintains the device connection state, and then creates a lightweight session context for the connection request of the smart terminal device, and synchronously stores the session metadata (device ID, gateway node ID, connection state) to the distributed cache cluster.

[0080] A distributed connection gateway cluster consists of multiple stateless or light-state connection gateway nodes. Stateless nodes do not store any request context and are "independent for each request". Light-state nodes store only "a very small amount of necessary context" rather than complete state.

[0081] When executing step S3, the gateway node matched in the distributed connection gateway cluster first adapts to different communication protocols from smart terminal devices, and then establishes and maintains the device connection status.

[0082] Simultaneously, the gateway node establishes a dynamic heartbeat mechanism with the smart terminal device, adaptively adjusting heartbeat parameters (such as heartbeat interval and timeout threshold) based on network conditions (e.g., latency, packet loss rate) and the type of smart terminal device (e.g., industrial environmental monitoring terminals, consumer terminals). Subsequently, the smart terminal device sends heartbeat messages to the gateway node according to the agreed heartbeat parameters to prove that it is online and operating normally. The gateway node receives and records the heartbeat messages of the smart terminal device in real time. If it does not receive a heartbeat message from the device within the set heartbeat timeout parameters, it determines that the smart terminal device is connected abnormally and triggers an abnormal handling process (e.g., marking the device status as "offline" and notifying the backend business system). If it subsequently receives a heartbeat recovery message from the smart terminal device, it quickly updates the device status to "online" and resumes normal data interaction with the smart terminal device.

[0083] S4, the distributed cache cluster stores the session metadata (device ID, gateway node ID, connection status) of all smart terminal devices, thereby supporting different gateway nodes in the distributed connection gateway cluster to query and call the session metadata (device ID, gateway node ID, connection status), realize the sharing of session status across gateway nodes, and ensure the continuity and accuracy of command routing when the device connection is interrupted and reconnected.

[0084] S5. After the smart terminal device generates uplink data, the gateway node that has been matched in the distributed connection gateway cluster acts as the message producer and completes the uplink data forwarding based on the device's session context. The message middleware cluster asynchronously receives the uplink data message from the device and provides it to the backend business system for consumption.

[0085] S6. The message middleware cluster receives downlink instruction messages from the backend business system and stores them in the corresponding downlink instruction topic. All gateway nodes in the distributed connection gateway cluster that have subscribed to the downlink instruction topic act as message consumers and receive the downlink instruction message. Then, they query the target device session metadata stored in the distributed cache cluster and accurately route the downlink instruction message to the corresponding target smart terminal device connection through the established connection to complete the instruction push.

[0086] Downlink command routing employs a broadcast-filtering mechanism, specifically as follows:

[0087] After the message middleware cluster stores the downlink instruction message issued by the backend business system in the corresponding downlink instruction topic, all gateway nodes in the distributed connection gateway cluster receive the downlink instruction message. By querying the distributed cache cluster, only the gateway node that has established a connection with the target smart terminal device executes the instruction issuance operation, while the other gateway nodes discard the downlink instruction message.

[0088] Based on the method of this embodiment, specifically taking Kafka as the message middleware as an example, assuming a massive IoT device monitoring scenario in a smart city, more than 1 million environmental monitoring sensors need to be connected, refer to the appendix... Figure 3 The specific implementation process is as follows:

[0089] (1) Device access.

[0090] The intelligent terminal device (equipped with sensors) initiates a connection request via the MQTT protocol through the communication module. The global load balancer, based on preset strategies (such as node load and health status), distributes this request to gateway node A corresponding to the IP address in the distributed connection gateway cluster.

[0091] (2) Authentication and session creation.

[0092] The access control center requires smart terminal devices (equipped with sensors) to provide a device ID and password (or certificate) for authentication and access control (e.g., only allowing the device to publish messages to the / env-data / sensor01 topic). After successful authentication, gateway node A creates a lightweight session context for the smart terminal device's connection request and synchronously stores the session metadata {Device ID: sensor01, Gateway IP: Node A, Status: online} to the distributed cache cluster.

[0093] (3) Data reporting.

[0094] The intelligent terminal device (equipped with sensors) reports the temperature and humidity data collected by the sensors to the preset topic / env-data / sensor01 through the established MQTT connection.

[0095] After receiving the data, gateway node A first verifies whether the smart terminal device has permission to publish messages to the / env-data / sensor01 topic. If the verification is successful, it immediately forwards the data message to the Kafka iot_data topic.

[0096] (4) Data processing.

[0097] Both the "Data Parsing Service" and "Alarm Service" of the backend business system subscribe to the Kafka iot_datatopic. When the data message forwarded by gateway node A enters this topic, the "Data Parsing Service" and the "Alarm Service" pull the message from Kafka in parallel and process it separately. The "Data Parsing Service" parses the message and performs the data storage operation, while the "Alarm Service" determines whether the data exceeds the preset temperature and humidity thresholds. If it does, it generates the corresponding alarm.

[0098] (5) Issuance of instructions.

[0099] The user sends a configuration update command to the smart terminal device (corresponding device ID: sensor01), and the "Configuration Management Service" of the backend business system publishes the command {deviceId:sensor01,command:"update_interval=60s"} to the iot_command topic of Kafka.

[0100] (6) Command routing.

[0101] All gateway nodes in the distributed connection gateway cluster, including gateway node A and gateway node B, have subscribed to the Kafka iot_command topic. Therefore, all of these gateway nodes will receive the configuration update command simultaneously.

[0102] Upon receiving the instruction, each gateway node accesses the distributed cache cluster to query the gateway node currently connected to the smart terminal device with deviceId sensor01. If gateway node A confirms that the device is connected to it, it will send the configuration update instruction to the corresponding smart terminal device through the established MQTT connection. Other gateway nodes in the distributed connection gateway cluster, excluding gateway node A, will find that the device is not connected to them and will discard the instruction.

[0103] The following needs to be added:

[0104] (7) Reconnecting after disconnection.

[0105] If gateway node A crashes unexpectedly, the sensor will disconnect and attempt to reconnect.

[0106] Assume the load balancer is now directing it to gateway node C. After successful authentication, gateway node C can read the previous device's session context from the distributed cache cluster (if any state needs to be restored), achieving a seamless switchover.

[0107] In summary, the system and method for concurrent connection and access control of massive intelligent terminal devices of the present invention effectively solves the bottleneck of connection number, high concurrency performance and security issues under massive device access, and realizes high availability, high scalability and fine-grained security management of the system.

[0108] The above specific examples illustrate the principles and implementation methods of the present invention in detail. These embodiments are merely for the purpose of helping to understand the core technical content of the present invention. Based on the above specific embodiments of the present invention, any improvements and modifications made to the present invention by those skilled in the art without departing from the principles of the present invention should fall within the patent protection scope of the present invention.

Claims

1. A system for concurrent connection and access control of massive intelligent terminal devices, characterized in that, It includes: A global load balancer is used to: receive connection requests initiated by smart terminal devices and match the connection request with gateway nodes in a distributed connection gateway cluster according to a preset strategy. The access control center, connected to the global load balancer, is used to: perform identity authentication and access control for smart terminal devices after they are matched with the gateway node through the global load balancer. The distributed connection gateway cluster, connected to the access control center, is used for: after a smart terminal device passes identity authentication and its permissions verification meets the access requirements, the matched gateway node adapts to different communication protocols from the device, establishes and maintains the device connection status; the matched gateway node creates a lightweight session context for the connection request of the smart terminal device and synchronously stores the session metadata to the distributed cache cluster; and forwards the device's uplink data and backend downlink instructions based on the session context. The distributed cache cluster, connected to the distributed connection gateway cluster, is used to: store session metadata of all smart terminal devices, support different gateway nodes in the distributed connection gateway cluster to query and call session metadata, realize session state sharing across gateway nodes, and ensure the continuity of device connection and the accuracy of command routing. The message middleware cluster, connected to the distributed connection gateway cluster, is used to asynchronously receive uplink data messages from devices forwarded by gateway nodes in the distributed connection gateway cluster and provide them to the backend business system for consumption; at the same time, it receives downlink instruction messages issued by the backend business system and stores them in the corresponding downlink instruction topic.

2. The system for concurrent connection and access control of massive intelligent terminal devices according to claim 1, characterized in that, The global load balancer specifically performs the following operations: Receive and parse connection requests initiated by smart terminal devices, and extract key information from them; Based on the extracted key information, a preset strategy is used to match the connection request with a gateway node in the distributed connection gateway cluster. The system queries and retrieves the connection information of the matched gateway nodes from the gateway management system, and then accurately distributes the connection requests of the smart terminal devices to the matched gateway nodes, thus completing the targeted forwarding of the requests.

3. The system for concurrent connection and access control of massive intelligent terminal devices according to claim 1, characterized in that, After the smart terminal device passes identity authentication and the permission verification meets the access requirements, the matched gateway node first adapts to the different communication protocols from the smart terminal device, and then establishes and maintains the device connection status. Meanwhile, the gateway node establishes a dynamic heartbeat mechanism with the smart terminal device, adaptively adjusting the heartbeat parameters according to network conditions and the type of smart terminal device. Subsequently, the smart terminal device sends a heartbeat message to the gateway node according to the agreed heartbeat parameters to prove that it is online and operating normally. The gateway node receives and records the heartbeat messages of the smart terminal device in real time. If it does not receive the heartbeat message from the device within the set heartbeat timeout parameter, it determines that the smart terminal device is abnormal and triggers the abnormal handling process. If a heartbeat recovery message is subsequently received from the smart terminal device, the device status will be quickly updated to "online," and normal data interaction with the smart terminal device will be restored.

4. The system for concurrent connection and access control of massive intelligent terminal devices according to claim 1, characterized in that, After the smart terminal device passes identity authentication and the permission verification meets the access requirements, the gateway node matched in the distributed connection gateway cluster forwards device data and backend downlink instructions based on the session context, specifically including: After the smart terminal device generates uplink data, the gateway node that has been matched in the distributed connection gateway cluster acts as the message producer and forwards the uplink data based on the device's session context; the message middleware cluster asynchronously receives the uplink data message from the device and provides it to the backend business system for consumption. The message middleware cluster receives downlink instruction messages from the backend business system and stores them in the corresponding downlink instruction topic. At this time, all gateway nodes in the distributed connection gateway cluster that have subscribed to the downlink instruction topic act as message consumers and simultaneously receive the downlink instruction message. They then query the target device session metadata stored in the distributed cache cluster and accurately route the downlink instruction message to the corresponding target smart terminal device connection through the established connection to complete the instruction push.

5. The system for concurrent connection and access control of massive intelligent terminal devices according to claim 1, characterized in that, Downlink command routing employs a broadcast-filtering mechanism, specifically as follows: After the message middleware cluster stores the downlink instruction message issued by the backend business system in the corresponding downlink instruction topic, all gateway nodes in the distributed connection gateway cluster receive the downlink instruction message. By querying the distributed cache cluster, only the gateway node that has established a connection with the target smart terminal device executes the instruction issuance operation, while the other gateway nodes discard the downlink instruction message.

6. A method for concurrent connection and access control of massive intelligent terminal devices, characterized in that, Includes the following steps: S1. A connection request initiated by a smart terminal device is received by the global load balancer, which matches the connection request with a gateway node in the distributed connection gateway cluster according to a preset strategy. S2. After successfully matching the gateway node, the access control center performs identity authentication and permission management on the smart terminal device. After the smart terminal device passes the identity authentication and the permission verification meets the access requirements, it will execute the next operation. S3. The smart terminal device establishes a connection with the gateway node matched in the distributed connection gateway cluster. The gateway node first adapts to different communication protocols from the device, establishes and maintains the device connection status, and then creates a lightweight session context for the connection request of the smart terminal device and synchronously stores the session metadata to the distributed cache cluster. S4. The distributed cache cluster stores the session metadata of all smart terminal devices, thereby supporting different gateway nodes in the distributed connection gateway cluster to query and call the session metadata, realize the sharing of session state across gateway nodes, and ensure the continuity and accuracy of command routing when the device connection is interrupted and reconnected. S5. After the smart terminal device generates uplink data, the gateway node that has been matched in the distributed connection gateway cluster acts as the message producer and completes the uplink data forwarding based on the device's session context. The message middleware cluster asynchronously receives the uplink data message from the device and provides it to the backend business system for consumption. S6. The message middleware cluster receives downlink instruction messages from the backend business system and stores them in the corresponding downlink instruction topic. All gateway nodes in the distributed connection gateway cluster that have subscribed to the downlink instruction topic act as message consumers and receive the downlink instruction message. Then, they query the target device session metadata stored in the distributed cache cluster and accurately route the downlink instruction message to the corresponding target smart terminal device connection through the established connection to complete the instruction push.

7. The method for concurrent connection and access control of massive intelligent terminal devices according to claim 6, characterized in that, In step S1, the global load balancer specifically performs the following operations: Receive and parse connection requests initiated by smart terminal devices, and extract key information from them; Based on the extracted key information, a preset strategy is used to match the connection request with a gateway node in the distributed connection gateway cluster. The system queries and retrieves the connection information of the matched gateway nodes from the gateway management system, and then accurately distributes the connection requests of the smart terminal devices to the matched gateway nodes, thus completing the targeted forwarding of the requests.

8. The method for concurrent connection and access control of massive intelligent terminal devices according to claim 6, characterized in that, When executing step S3, the gateway node matched in the distributed connection gateway cluster first adapts to different communication protocols from smart terminal devices, and then establishes and maintains the device connection status. Meanwhile, the gateway node establishes a dynamic heartbeat mechanism with the smart terminal device, adaptively adjusting the heartbeat parameters according to network conditions and the type of smart terminal device. Subsequently, the smart terminal device sends a heartbeat message to the gateway node according to the agreed heartbeat parameters to prove that it is online and operating normally. The gateway node receives and records the heartbeat messages of the smart terminal device in real time. If it does not receive the heartbeat message from the device within the set heartbeat timeout parameter, it determines that the smart terminal device is abnormal and triggers the abnormal handling process. If a heartbeat recovery message is subsequently received from the smart terminal device, the device status will be quickly updated to "online," and normal data interaction with the smart terminal device will be restored.

9. A method for concurrent connection and access control of massive intelligent terminal devices according to claim 6, characterized in that, Downlink command routing employs a broadcast-filtering mechanism, specifically as follows: After the message middleware cluster stores the downlink instruction message issued by the backend business system in the corresponding downlink instruction topic, all gateway nodes in the distributed connection gateway cluster receive the downlink instruction message. By querying the distributed cache cluster, only the gateway node that has established a connection with the target smart terminal device executes the instruction issuance operation, while the other gateway nodes discard the downlink instruction message.