An Internet of Things device access method, apparatus, system, and storage medium

By parsing the platform configuration information to select the appropriate connection mode and generating client instances, differentiated access for IoT devices is achieved, solving the problem of resource waste under the unified multi-connection mode and improving system resource utilization.

CN122069296BActive Publication Date: 2026-07-07HAIER ENERGY TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HAIER ENERGY TECHNOLOGY CO LTD
Filing Date
2026-04-23
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

In existing IoT device access methods, the uniform multi-connection mode leads to an exponential increase in system resource consumption, resulting in serious waste. How to improve system resource utilization has become an urgent problem to be solved.

Method used

By parsing the platform configuration information, the enabled IoT access platform is selected, and based on its status and connection parameters, a suitable single-connection mode or multi-connection mode client instance is generated to achieve differentiated device access. Multiple devices can share the client instance to reduce memory usage and CPU overhead.

Benefits of technology

When there are a large number of devices, sharing client instances through a single connection mode significantly reduces memory usage and CPU overhead, thereby improving system resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122069296B_ABST
    Figure CN122069296B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a kind of Internet of Things equipment access method, device, system and storage medium.The method comprises: by analyzing platform configuration information, screening out the target Internet of Things access platform enabled, and using the adaptive target connection mode of target Internet of Things access platform, i.e.single connection mode or multiple connection mode, for Internet of Things equipment generates the client instance under corresponding mode, realizes the differentiated Internet of Things equipment access control.By client instance, with the message proxy server of target Internet of Things access platform, communication link is established, and based on communication link, Internet of Things equipment is accessed to the Internet of Things center platform.In the numerous Internet of Things equipment to be accessed, by the single connection mode of opening Internet of Things access platform, so that multiple Internet of Things equipment share a client instance, greatly reduce the memory occupation and CPU overhead, improve system resource utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet of Things (IoT) integration technology, and in particular to an IoT device access method, apparatus, system, and storage medium. Background Technology

[0002] Currently, the manufacturing industry is accelerating its transformation towards intelligence, and the Industrial Internet of Things (IIoT) has become the core engine driving the intelligent upgrading of the manufacturing industry. Key information such as operating parameters and production data collected by various production and monitoring equipment in industrial scenarios needs to be uploaded to the IoT platform in real time and stably. Therefore, the efficient access of industrial equipment has become a core technical pain point for the implementation and application of IIoT systems.

[0003] The current method for connecting IoT devices is to use a unified multi-connection mode, where each device maintains an independent transmission queue. As the number of industrial devices continues to increase, this unified multi-connection mode, where each device maintains its own transmission queue, leads to an exponential increase in system resource consumption, resulting in a serious waste of system resources.

[0004] Therefore, how to provide an IoT device access method that can improve system resource utilization is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] This application provides an IoT device access method, apparatus, system, and storage medium to improve system resource utilization.

[0006] In a first aspect, embodiments of this application provide an IoT device access method, applied to an IoT system, the IoT system including: an IoT central platform and multiple IoT access platforms, the connection modes of the multiple IoT access platforms including: a single connection mode and a multi-connection mode; in the single connection mode, multiple IoT devices establish a communication link with the message broker server of the IoT access platform through a single client instance; in the multi-connection mode, multiple IoT devices establish a communication link with the message broker server of the IoT access platform through their respective corresponding client instances; the method includes:

[0007] Parse the platform configuration information to obtain the activation status and connection parameters of each of the multiple IoT access platforms;

[0008] Based on the target IoT access platform whose activation status is enabled, the target connection mode is determined, and a client instance is generated based on the target connection mode and the target connection parameters of the target IoT access platform;

[0009] The client instance establishes a communication link with the message broker server of the target IoT access platform, and connects IoT devices to the IoT central platform based on the communication link.

[0010] In one possible implementation, determining the target connection mode based on the target IoT access platform whose activation state is enabled includes:

[0011] Based on the platform identifier of the target IoT access platform, the initial connection mode is determined from the correspondence between connection modes and platforms;

[0012] If the initial connection mode is a multi-connection mode, then the current network status and current remaining resources of the target IoT access platform are obtained. If the current network status and current remaining resources meet preset conditions, then the target connection mode is adjusted to a single-connection mode.

[0013] In one possible implementation, the method further includes:

[0014] For each of the aforementioned IoT access platforms, based on a group of IoT devices corresponding to the IoT access platform, the data transmission characteristics and data isolation requirements of the IoT access platform are determined; wherein, the data transmission characteristics are used to characterize the data transmission behavior and communication load characteristics of the group of IoT devices corresponding to the IoT access platform; the data isolation requirements are used to characterize the security isolation requirements for data transmission of the group of IoT devices corresponding to the IoT access platform.

[0015] Based on the data transmission characteristics and data isolation requirements of the IoT access platform, a recommended connection mode for the IoT access platform is determined.

[0016] By integrating the recommended connection modes of the multiple IoT access platforms, the correspondence between the connection modes and the platforms is obtained.

[0017] In one possible implementation, the method further includes:

[0018] Obtain description information of multiple IoT devices to be connected;

[0019] Based on the description information of the multiple IoT devices to be connected and the connection mode of each IoT access platform, a group of IoT devices corresponding to the IoT access platform is determined.

[0020] The process of connecting IoT devices to the IoT central platform based on a communication link includes:

[0021] For each of the aforementioned IoT access platforms, based on the communication link established with the message broker server of the IoT access platform, a group of IoT devices corresponding to the IoT access platform are connected to the IoT central platform.

[0022] In one possible implementation, generating a client instance based on the target connection mode and the target connection parameters of the target IoT access platform includes:

[0023] When the target connection mode is single connection mode, a single client instance is generated and initialized based on the target connection parameters;

[0024] Based on the target connection parameters and attribute reporting topic template, generate device topic paths for each IoT device among the multiple IoT devices corresponding to the target IoT access platform, resulting in multiple device topic paths;

[0025] The multiple device topic paths are uniformly registered to the single client instance to obtain the single client instance corresponding to the single connection mode.

[0026] In one possible implementation, establishing a communication link with the message broker server of the target IoT access platform through the client instance includes:

[0027] The client instance initiates an encrypted connection to the message broker server to establish an encrypted transmission channel.

[0028] A hash calculation is performed on the current timestamp, the authentication parameters in the target connection parameters, and the device hardware information to obtain the connection credential;

[0029] The connection credential is authenticated through the encrypted transmission channel;

[0030] When authentication is successful and the encrypted transmission channel is connected normally, the encrypted transmission channel is identified as the communication link.

[0031] In one possible implementation, the method further includes, via the client instance:

[0032] When the encrypted transmission channel connection is abnormal, obtain connection abnormality information, select a reconnection mechanism based on the connection abnormality information, and determine the target reconnection mechanism.

[0033] The reconnection thread is initiated according to the target reconnection mechanism, and the connection status is monitored until the client instance and the message broker server successfully establish a communication link.

[0034] Secondly, embodiments of this application provide an Internet of Things (IoT) device access device applied to an IoT system. The IoT system includes an IoT central platform and multiple IoT access platforms. The connection modes of the multiple IoT access platforms include a single connection mode and a multi-connection mode. In the single connection mode, multiple IoT devices establish a communication link with the message broker server of the IoT access platform through a single client instance. In the multi-connection mode, multiple IoT devices establish a communication link with the message broker server of the IoT access platform through their respective corresponding client instances.

[0035] IoT device access devices include:

[0036] The configuration parsing module is used to parse platform configuration information to obtain the activation status and connection parameters of each IoT access platform among multiple IoT access platforms;

[0037] The instance creation module is used to determine the target connection mode based on the target IoT access platform whose activation status is enabled, and to generate a client instance based on the target connection mode and the target connection parameters of the target IoT access platform;

[0038] The link establishment module is used to establish a communication link with the message broker server of the target IoT access platform through the client instance, and to connect IoT devices to the IoT central platform based on the communication link.

[0039] In one possible implementation, when the instance creation module determines the target connection mode based on the target IoT access platform being enabled, it specifically performs the following:

[0040] Based on the platform identifier of the target IoT access platform, the initial connection mode is determined from the correspondence between connection modes and platforms;

[0041] If the initial connection mode is a multi-connection mode, then the current network status and current remaining resources of the target IoT access platform are obtained. If the current network status and current remaining resources meet preset conditions, then the target connection mode is adjusted to a single-connection mode.

[0042] In one possible implementation, it also includes:

[0043] The correspondence generation module is used to determine the data transmission characteristics and data isolation requirements of each IoT access platform based on a group of IoT devices corresponding to the IoT access platform; wherein, the data transmission characteristics are used to characterize the data transmission behavior and communication load characteristics of the group of IoT devices corresponding to the IoT access platform; and the data isolation requirements are used to characterize the security isolation requirements for data transmission of the group of IoT devices corresponding to the IoT access platform.

[0044] Based on the data transmission characteristics and data isolation requirements of the IoT access platform, a recommended connection mode for the IoT access platform is determined.

[0045] By integrating the recommended connection modes of the multiple IoT access platforms, the correspondence between the connection modes and the platforms is obtained.

[0046] In one possible implementation, it also includes:

[0047] The device platform matching module is used to obtain description information of multiple IoT devices to be connected;

[0048] Based on the description information of the multiple IoT devices to be connected and the connection mode of each IoT access platform, a group of IoT devices corresponding to the IoT access platform is determined.

[0049] Accordingly, when the link establishment module connects IoT devices to the IoT central platform based on the communication link, it is specifically used for:

[0050] For each of the aforementioned IoT access platforms, based on the communication link established with the message broker server of the IoT access platform, a group of IoT devices corresponding to the IoT access platform are connected to the IoT central platform.

[0051] In one possible implementation, when the instance creation module generates a client instance based on the target connection mode and the target connection parameters of the target IoT access platform, it is specifically used for:

[0052] When the target connection mode is single connection mode, a single client instance is generated and initialized based on the target connection parameters;

[0053] Based on the target connection parameters and attribute reporting topic template, generate device topic paths for each IoT device among the multiple IoT devices corresponding to the target IoT access platform, resulting in multiple device topic paths;

[0054] The multiple device topic paths are uniformly registered to the single client instance to obtain the single client instance corresponding to the single connection mode.

[0055] In one possible implementation, when the link establishment module establishes a communication link with the message broker server of the target IoT access platform through the client instance, it is specifically used for:

[0056] The client instance initiates an encrypted connection to the message broker server to establish an encrypted transmission channel.

[0057] A hash calculation is performed on the current timestamp, the authentication parameters in the target connection parameters, and the device hardware information to obtain the connection credential;

[0058] The connection credential is authenticated through the encrypted transmission channel;

[0059] When authentication is successful and the encrypted transmission channel is connected normally, the encrypted transmission channel is identified as the communication link.

[0060] In one possible implementation, it also includes:

[0061] An abnormal reconnection module is used to obtain connection abnormality information when the encrypted transmission channel connection is abnormal, and to determine the target reconnection mechanism based on the connection abnormality information from the correspondence between the abnormality type and the reconnection mechanism.

[0062] The reconnection thread is initiated according to the target reconnection mechanism, and the connection status is monitored until the client instance and the message broker server successfully establish a communication link.

[0063] Thirdly, embodiments of this application provide an Internet of Things (IoT) device access system, including: a memory and a processor;

[0064] The memory stores computer-executed instructions;

[0065] The processor executes computer execution instructions stored in the memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.

[0066] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.

[0067] This application provides an IoT device access method, apparatus, system, and storage medium, applied to an IoT system including an IoT central platform and multiple IoT access platforms. It filters the enabled IoT access platforms (target IoT access platforms) by parsing platform configuration information and uses an adapted connection mode (single-connection mode or multi-connection mode) for the target IoT access platform to generate client instances for IoT devices, achieving differentiated IoT device access control. Through the client instances, a communication link is established with the message broker server of the target IoT access platform, and the IoT devices are connected to the IoT central platform based on this communication link. By configuring adapted connection modes for different IoT access platforms, the connection strategy matches the business requirements of the IoT access platforms. When there are many IoT devices to be connected, the single-connection mode of the IoT access platform allows multiple IoT devices to share a single client instance, significantly reducing memory usage and CPU overhead, and improving system resource utilization. Attached Figure Description

[0068] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0069] Figure 1 A schematic diagram illustrating a scenario where an IoT device connected to an IoT central platform, as provided in this application.

[0070] Figure 2 A schematic diagram of the structure of the Internet of Things system provided in this application;

[0071] Figure 3 A flowchart illustrating the IoT device access method provided in this application;

[0072] Figure 4 A schematic diagram illustrating the structure for generating multiple device topic paths using the attribute reporting topic template provided in this application;

[0073] Figure 5 A flowchart illustrating the hash-based dynamic authentication mechanism provided in this application;

[0074] Figure 6 This is a schematic diagram of the structure of the IoT device access device provided in this application;

[0075] Figure 7 This is a schematic diagram of the structure of the IoT device access system provided in this application.

[0076] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0077] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0078] The IoT device access method provided in this application is applicable to practical application scenarios such as multi-system access in smart cities, multi-subsystem linkage in smart buildings, multi-platform convergence in public security, and multi-system access in new energy manufacturing parks. For example, in the application scenario of multi-system access in smart cities, multiple IoT access platforms such as smart streetlights, environmental monitoring, and traffic signal control operate simultaneously under the IoT system. The IoT central platform is used to aggregate and process device data uploaded by each IoT access platform, realizing unified management and cross-business collaborative control of multiple smart city systems.

[0079] Figure 1 This is a schematic diagram illustrating a scenario where an IoT device connects to an IoT central platform, as provided in this application. Figure 1 As shown, the specific application scenario of this application is as follows: different business lines within an enterprise often build independent information systems and build independent IoT access platforms to support each independent information system, which means that the enterprise must connect to multiple IoT access platforms to achieve data collection for all businesses. Figure 1 Taking two IoT access platforms, IoT Access Platform A and IoT Access Platform B, as an example, IoT Access Platform A can be an energy-related IoT platform used to connect energy-related devices, such as photovoltaic inverters, electricity meters, and microgrid controllers. IoT Access Platform B can be a general-purpose IoT platform for general-purpose devices such as environmental monitoring, security monitoring, and access control systems, including sensors, cameras, and access control devices. The two IoT access platforms perform different business functions. Unifying the energy-related IoT platform and the general-purpose IoT platform into a unified IoT central platform enables centralized aggregation of data from multiple devices, improving the overall level of intelligent scheduling and resource utilization.

[0080] In existing technologies, multiple IoT access platforms enable IoT device access through a unified multi-connection mode. That is, each IoT device establishes a communication link with the IoT platform using an independent connection channel. As the number of IoT devices continues to increase, there is a serious technical problem of wasting system resources.

[0081] Based on this, the IoT device access method provided in this application abandons the unified multi-connection mode and flexibly selects single-connection mode or multi-connection mode according to the actual activation status of each IoT access platform to achieve differentiated device access management. Thus, when there are a large number of IoT devices to be connected, the IoT access platform in single-connection mode can enable multiple IoT devices to share a single client instance, which greatly reduces memory usage and CPU overhead and improves system resource utilization.

[0082] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.

[0083] Figure 2 The structural diagram of the Internet of Things system provided in this application is as follows: Figure 2 As shown, the IoT system includes: an IoT central platform and multiple IoT access platforms. Figure 2 Taking two IoT access platforms as an example, namely IoT access platform 1 and IoT access platform 2, in some embodiments there can be three or more IoT access platforms. The connection modes of multiple IoT access platforms include single-connection mode and multi-connection mode; that is, some IoT access platforms use single-connection mode, for example... Figure 2 One part of the IoT access platform is IoT access platform 1, and the other part of the IoT access platform uses a multi-connection mode, for example... Figure 2 IoT access platform 2 is used in the IoT platform. IoT access platform 1 connects devices 1 to N; IoT access platform 2 connects devices P and Q. IoT access platform 1, which handles a large amount of IoT device data, uses a single-connection mode, while IoT access platform 2, which handles a smaller amount of IoT device data, uses a multi-connection mode. In IoT access platform 1 using the single-connection mode, devices 1 to N share a single client instance O to establish a communication link with the message broker server, achieving logical isolation by assigning independent paths 1 to Path N to devices 1 to N. In IoT access platform 2 using the multi-connection mode, devices P and Q establish communication links with the message broker server through client instances P and Q, respectively.

[0084] In single-connection mode, multiple IoT devices share a single client instance, achieving logical isolation by assigning independent device paths to each IoT device; in multi-connection mode, multiple IoT devices establish communication links with the message broker server of the IoT access platform through their respective client instances.

[0085] Figure 3 This is a flowchart illustrating the IoT device access method provided in this application, such as... Figure 3 As shown, the method includes:

[0086] S301: Parse the platform configuration information to obtain the activation status and connection parameters of each IoT access platform among multiple IoT access platforms.

[0087] The platform configuration information includes various configuration parameters of each IoT access platform in the IoT system. The configuration parameters include the activation status and connection parameters. The platform configuration information can be a structured data set of multiple configuration parameters.

[0088] Connection parameters are those required to establish a connection with the IoT access platform, including but not limited to: platform access address, port number, device unique identifier, product unique identifier, authentication information, and communication protocol type. The product unique identifier is used to distinguish different product lines; a product line may include one or more IoT access platforms. The IoT access platform's activation status includes: enabled and disabled. If the IoT access platform is disabled, IoT devices cannot establish a connection with the IoT central platform through the IoT access platform.

[0089] The activation status of the IoT access platform can be controlled by adjusting the control parameters in the platform configuration information. That is, without modifying the source code, simply adjusting the control parameters in the platform configuration information can enable or disable the IoT access platform flexibly according to the system's business needs.

[0090] In one feasible implementation, the method further includes: an activation status configuration interface, which listens for interface events and updates the activation status of the IoT access platforms. Specifically, the activation status configuration interface displays the activation status configuration items for each IoT access platform, facilitating control of the activation status of each IoT access platform through the configuration interface. Alternatively, control parameters in the platform configuration information can also be directly modified. This application embodiment does not limit the specific implementation method of adjusting the activation status of each IoT access platform based on platform configuration information.

[0091] S302: Based on the target IoT access platform that is enabled, determine the target connection mode, and generate a client instance based on the target connection mode and the target connection parameters of the target IoT access platform.

[0092] The target physical access platform is an IoT access platform that is currently enabled, or an IoT access platform selected from those that are currently enabled. The target connection mode and target connection parameters are the connection mode and connection parameters of the target IoT access platform, respectively. For an IoT access platform, its connection mode can be single-connection mode or multi-connection mode, and can be fixed or switchable. The client instance is an entity object that can directly establish a communication link with the IoT access platform.

[0093] When there is only one enabled IoT access platform, the target connection mode for that enabled IoT access platform is determined based on the correspondence between connection modes and platforms. When there are multiple enabled IoT access platforms, the target connection mode is determined separately for each enabled IoT access platform based on the correspondence between connection modes and platforms. An enabled IoT access platform is defined as an IoT access platform whose enabled status is "enabled".

[0094] Based on the business needs of each IoT access platform, a corresponding connection mode can be matched for each IoT access platform in advance. This mode can be a single connection mode or a multi-connection mode, thereby obtaining the correspondence between the aforementioned connection modes and platforms.

[0095] The matching connection mode for each IoT access platform can be pre-determined based on its data transmission characteristics and data isolation requirements, establishing a correspondence between connection modes and platforms. This allows for efficient determination of the target connection mode for each enabled IoT access platform when devices connect. For example, for a target IoT access platform with a large number of concurrent IoT devices, a single connection mode can be selected, allowing multiple IoT devices to share a single client instance. Logical isolation is achieved by assigning independent device topic paths to each IoT device, significantly reducing memory usage and CPU overhead, and improving system resource utilization.

[0096] Based on the target connection mode, a client base object corresponding to the communication protocol is created. This client base object is a basic communication carrier object built according to the target connection mode and the corresponding communication protocol. Heartbeat, reconnection, and encryption strategies are configured for the client base object. Then, the unique device identifier from the target connection parameters is written into the identity field of the client base object, giving the client instance a unique identity that can be recognized by the target IoT access platform. The target connection parameters are then configured into the client base object, thus obtaining the client instance. When the target connection mode is single-connection mode, a single client instance is created, and logical isolation is achieved by assigning independent device topic paths to each IoT device. When the target connection mode is multi-connection mode, a client instance must be created for each IoT device.

[0097] This client instance includes, but is not limited to: MQTT client instance, COAP client instance, TCP client instance, etc.

[0098] S303: Through the client instance, establish a communication link with the message broker server of the target IoT access platform, and connect IoT devices to the IoT central platform based on the communication link.

[0099] The client instance, acting on behalf of the IoT device, sends a connection request to the message broker server of the target IoT access platform according to the platform protocol specifications, completing the protocol handshake. Then, the message broker server authenticates the client instance; upon successful authentication, a communication link is established. The client instance and the message broker server maintain the link's viability through mechanisms such as heartbeats and Ping / Pong, synchronizing link status in real time to ensure stable and reliable communication. Finally, the IoT device is connected to the IoT center via this communication link. Based on the established communication link, the client instance uploads device data and events from the IoT device to the IoT center platform. Furthermore, the client instance can also forward control commands issued by the IoT center platform to the corresponding IoT device via the established communication link, completing bidirectional communication between the IoT device and the IoT center platform.

[0100] After an IoT device connects to the IoT central platform, the client instance uploads the device data to the IoT central platform via a communication link. The specific steps for data upload include: obtaining the data to be uploaded from the IoT device corresponding to the target IoT access platform; performing data transformation on the data to be uploaded based on the field mapping configuration rules of the target IoT access platform to obtain the target data; and uploading the target data to the IoT central platform via the established communication link. The target data can be in JSON format, but other data formats are also possible; this embodiment does not limit the specific format. The field mapping configuration rules are defined through mapping fields in the platform configuration information. For example, the `temperature` field in the data to be uploaded is mapped to the `temp` field of the target IoT access platform. Before data upload, the original data field names are replaced with platform field names based on this field mapping configuration rule to generate JSON data adapted to the target IoT access platform.

[0101] The IoT device access method provided in this application is applied to an IoT system including an IoT central platform and multiple IoT access platforms. It filters out the enabled IoT access platforms (target IoT access platforms) by parsing platform configuration information and generates client instances for IoT devices in the corresponding mode (single-connection mode or multi-connection mode) using the connection mode adapted to the target IoT access platform, thus achieving differentiated IoT device access control. A communication link is established between the client instance and the message broker server of the target IoT access platform, and the IoT device is connected to the IoT central platform based on this communication link. By configuring compatible connection modes for different IoT access platforms, the connection strategy matches the business requirements of the IoT access platforms. When there are a large number of IoT devices to be connected, the single-connection mode of the IoT access platform allows multiple IoT devices to share a single client instance, significantly reducing memory usage and CPU overhead, and improving system resource utilization.

[0102] Optionally, in this embodiment of the application, determining the target connection mode based on the target IoT access platform whose enabled state is enabled includes:

[0103] Based on the platform identifier of the target IoT access platform, the initial connection mode is determined from the correspondence between connection modes and platforms;

[0104] If the initial connection mode is multi-connection mode, the current network status and remaining resources of the target IoT access platform are obtained. If the current network status and remaining resources meet the preset conditions, the target connection mode is adjusted to single-connection mode.

[0105] In this embodiment, the initial connection mode can be a connection mode pre-determined for each IoT access platform based on its data transmission characteristics and data isolation requirements. Current network conditions include, but are not limited to, parameters such as network bandwidth, transmission latency, and network stability; current remaining resources include, but are not limited to, resource parameters such as server memory, processor utilization, and link capacity.

[0106] Obtain the platform identifier of the target IoT access platform. This platform identifier is a unique identifier for the target IoT access platform and is used to associate it with its preset connection mode configuration. Obtain the pre-defined mapping relationship between connection modes and platforms. This mapping relationship stores the association between each IoT access platform and the recommended connection mode. Then, based on the platform identifier of the target IoT access platform, query and determine the initial selection connection mode from the mapping relationship between connection modes and platforms.

[0107] Then, the initial connection mode is judged. If the initial connection mode is a single connection mode, the initial connection mode is directly determined as the target connection mode of the target IoT access platform without further verification.

[0108] If the initial connection mode is multi-connection mode, a condition verification process is initiated: First, the current network status and remaining resources of the target IoT access platform are collected. Then, the collected current network status and remaining resources are compared with preset conditions. If both the current network status and remaining resources meet the preset conditions, it indicates that the target IoT access platform has the basic conditions for operating in single-connection mode, and the target connection mode is adjusted to single-connection mode; if any parameter does not meet the preset conditions, the initial connection mode is maintained as the target connection mode.

[0109] The preset conditions include: network condition preset conditions and resource remaining preset conditions. Among them, the network condition preset conditions can be: network bandwidth is not lower than the preset bandwidth threshold, transmission delay is not higher than the preset delay threshold, and network stability index is higher than the preset stability threshold. The resource remaining preset conditions can be: server remaining memory is not lower than the preset memory threshold, processor utilization rate is not higher than the preset utilization rate threshold, and link carrying capacity remaining is not lower than the preset capacity threshold.

[0110] In this embodiment, based on the platform identifier of the target IoT access platform, the initial connection mode is efficiently determined from the correspondence between connection modes and platforms. If the initial connection mode is a multi-connection mode, the current network status and remaining resources of the target IoT access platform are obtained. If the current network status and remaining resources meet preset conditions, the target connection mode is adjusted to a single-connection mode. By verifying the current status of the target IoT access platform through preset conditions, it is determined whether it has the basis for stable operation in single-connection mode, avoiding abnormal IoT device access caused by blindly adjusting the connection mode. At the same time, the use of a switchable connection mode avoids resource redundancy in multi-connection mode, making the selection of the target connection mode more in line with the actual operating conditions of the target IoT access platform, thus improving the rationality of the target connection mode.

[0111] Optionally, in this embodiment of the application, the IoT device access method further includes:

[0112] For each IoT access platform, based on a group of IoT devices corresponding to the IoT access platform, the data transmission characteristics and data isolation requirements of the IoT access platform are determined. Among them, the data transmission characteristics are used to characterize the data transmission behavior and communication load characteristics of a group of IoT devices corresponding to the IoT access platform; the data isolation requirements are used to characterize the security isolation requirements for data transmission of a group of IoT devices corresponding to the IoT access platform.

[0113] Based on the data transmission characteristics and data isolation requirements of the IoT access platform, the recommended connection mode for the IoT access platform is determined.

[0114] By integrating recommended connection modes from multiple IoT access platforms, the correspondence between connection modes and platforms is obtained.

[0115] In this application embodiment, data transmission characteristics include, but are not limited to, device data transmission frequency, data transmission volume, and communication load fluctuations, comprehensively characterizing the data transmission behavior and communication load characteristics of a group of IoT devices corresponding to the IoT access platform. Data isolation requirements include, but are not limited to, whether cross-device isolation is required, whether data isolation with other IoT access platforms is required, isolation level, and isolation scope, clearly characterizing the security isolation requirements for data transmission of a group of IoT devices corresponding to the IoT access platform.

[0116] For each IoT access platform, a set of IoT devices corresponding to the IoT access platform is pre-defined, that is, an association relationship is established between the IoT access platform and the corresponding IoT device group. Then, historical data transmission records and real-time transmission behaviors of all IoT devices within the IoT device group are collected, and key features are extracted to form the data transmission characteristics of the IoT access platform. At the same time, based on the application scenarios and data types of the set of IoT devices corresponding to the IoT access platform, the data isolation requirements of the IoT access platform are determined.

[0117] Furthermore, based on the data transmission characteristics and data isolation requirements of the IoT access platform, the recommended connection mode for the IoT access platform is determined. In one feasible approach, a classification model is pre-trained based on a large number of IoT access platform data transmission characteristics, data isolation requirements, and corresponding optimal connection mode samples to obtain a connection mode recommendation model. The data transmission characteristics and data isolation requirements of the IoT access platform are then input into the trained connection mode recommendation model, which performs inference and prediction. The recommended connection mode output by the connection mode recommendation model is then used as the recommended connection mode for that IoT access platform.

[0118] In another feasible approach, based on the data transmission characteristics and data isolation requirements of the IoT access platform, a preset judgment logic is used to determine the recommended connection mode, which includes a single-connection mode and a multi-connection mode. The core rule of the preset judgment logic is: if the data transmission characteristics are low load (e.g., low transmission frequency, small data volume) and low data isolation requirements (e.g., no need for cross-device isolation), then a single-connection mode is recommended, enabling efficient resource utilization and avoiding resource redundancy in the multi-connection mode. If the data transmission characteristics are high load (e.g., high transmission frequency, large data volume, significant load fluctuations) and high data isolation requirements (e.g., requiring device-level security isolation), then a multi-connection mode is recommended, which can distribute communication pressure, meet isolation requirements, and prevent operational failures such as link congestion and data interference in the single-connection mode. The specific logical details of the preset judgment logic are not limited in this embodiment; users can set them according to their actual needs.

[0119] Finally, by integrating the recommended connection modes from multiple IoT access platforms, the correspondence between connection modes and platforms is obtained.

[0120] In this embodiment, for each IoT access platform, based on a set of IoT devices corresponding to that platform, the data transmission characteristics and data isolation requirements of the IoT access platform are determined. Then, based on these characteristics and isolation requirements, a recommended connection mode for each IoT access platform is determined. Finally, the recommended connection modes from multiple IoT access platforms are integrated to obtain the correspondence between connection modes and platforms. By simultaneously considering data transmission characteristics and data isolation requirements when determining the recommended connection mode, a balance between efficiency and security is achieved.

[0121] Optionally, in this embodiment of the application, the IoT device access method further includes:

[0122] Obtain description information of multiple IoT devices to be connected;

[0123] Based on the description information of multiple IoT devices to be connected, and the connection mode of each IoT access platform, a group of IoT devices corresponding to the IoT access platform is determined.

[0124] Correspondingly, connecting IoT devices to the IoT central platform via communication links includes:

[0125] For each IoT access platform, a group of IoT devices corresponding to the IoT access platform are connected to the IoT central platform based on the communication link established with the message broker server of the IoT access platform.

[0126] In this embodiment, the connection mode of the IoT access platform is pre-fixed, and IoT devices can dynamically select the IoT access platform when accessing the IoT central platform. The descriptive information is used to characterize key information such as IoT device attributes and access requirements, including but not limited to: unique device identifier, device data transmission frequency, single device data volume, and data isolation requirements.

[0127] Specifically, the pre-defined connection modes of each IoT access platform are obtained. Based on the core characteristics of each IoT access platform's connection mode and the description information of the IoT devices, feature matching is performed. During feature matching, IoT devices with low data transmission frequency, small data volume per device, and no strong isolation are preferentially assigned to IoT access platforms using a single connection mode. For IoT devices with high data transmission frequency, large data volume per device, and high security isolation or real-time requirements, they are preferentially assigned to IoT access platforms using a multi-connection mode. Based on the feature matching results, the multiple IoT devices to be accessed are categorized, and IoT devices that meet the adaptation conditions of the same IoT access platform are grouped together, ultimately determining the group of IoT devices corresponding to each IoT access platform.

[0128] In this embodiment, a group of IoT devices corresponding to an IoT access platform is determined based on the description information of multiple IoT devices to be connected and the connection mode of each IoT access platform. This eliminates the need for pre-binding IoT devices to IoT access platforms; instead, devices are dynamically allocated according to their own attributes and the connection mode of the IoT access platform, improving the flexibility and scalability of IoT device access.

[0129] Optionally, in this embodiment of the application, generating a client instance based on the target connection mode and the target connection parameters of the target IoT access platform includes:

[0130] When the target connection mode is single connection mode, a single client instance is generated and initialized based on the target connection parameters;

[0131] Based on the target connection parameters and attribute reporting topic template, generate device topic paths for each IoT device in multiple IoT devices corresponding to the target IoT access platform, resulting in multiple device topic paths;

[0132] Multiple device topic paths are registered to a single client instance, resulting in a single client instance corresponding to the single connection mode.

[0133] In this embodiment, the attribute reporting topic template is pre-set and stored within the IoT device access system. The attribute reporting topic template is / {product_id} / {device_id} / properties / report, where {product_id} represents the unique identifier of the product and {device_id} represents the unique identifier of the device. {product_id} and {device_id} are placeholders that are dynamically replaced with the unique identifier of the product and the unique identifier of the device at runtime. Of course, this attribute reporting topic template can also be modified according to the actual requirements of the target IoT access platform. For example, if the target IoT access platform requires the device topic path to be / {device_id} / {product_id} / data, only the template parameters need to be updated, without modifying the code.

[0134] In single-connection mode, multiple IoT devices establish communication links with the message broker server of the IoT access platform through a single client instance. By generating an independent topic path for each IoT device, data from different IoT devices is ensured to be transmitted independently within the message broker server. This reduces the number of client instances created and the computational resource consumption, achieving centralized resource utilization and improving system resource efficiency. The specific process for generating a client instance in single-connection mode is as follows: Based on the target connection parameters, a single client instance is generated and initialized. At this point, the client instance has not yet registered a topic. Then, based on the target connection parameters and attribute reporting topic templates, device topic paths for each IoT device are generated. Figure 4 This application provides a structural diagram illustrating the generation of multiple device topic paths using an attribute reporting topic template, as shown below. Figure 4 As shown, the attribute reporting topic template is: / {Product Number} / {Device Number} / Attribute / Report. Replace the {Product Number} placeholder in the attribute reporting topic template with the product identifier 01 of device 1 and the product identifier N of device N. Replace the {Device Number} placeholder in the attribute reporting topic template with the device identifier 01 of device 1 and the device identifier N of device N. This will obtain the device topic paths for device 1 and device N respectively. Then, register the device topic paths for device 1 and device N to a single client instance.

[0135] In multi-connection mode, multiple IoT devices establish communication links with the message broker server of the IoT access platform through their respective client instances. That is, each IoT device creates a separate client instance and establishes a separate connection, with complete isolation between IoT devices. Specifically, each IoT device is looped through, and a separate client is created and initialized for each IoT device. The target connection parameters are then injected into the initialized client, resulting in multiple client instances.

[0136] In this embodiment, when the target connection mode is single connection mode, a single client instance is generated and initialized based on the target connection parameters. Then, multiple device topic paths are obtained based on the target connection parameters and the attribute reporting topic template. Since different IoT access platforms have different naming conventions for device topic paths, the attribute reporting topic template can adapt to various naming conventions of different device topic paths without modifying the source code, reducing development, iteration, and operation and maintenance costs. Furthermore, multiple device topic paths are uniformly registered to a single client instance, resulting in a single client instance corresponding to the single connection mode.

[0137] Optionally, in this embodiment of the application, establishing a communication link with the message broker server of the target IoT access platform through a client instance includes:

[0138] The client instance initiates an encrypted connection to the message broker server to establish an encrypted transmission channel.

[0139] The connection credentials are obtained by hashing the current timestamp, the authentication parameters in the target connection parameters, and the device hardware information.

[0140] Authentication of connection credentials is achieved through an encrypted transmission channel;

[0141] When authentication is successful and the encrypted transmission channel is connected normally, the encrypted transmission channel is identified as a communication link.

[0142] In this embodiment, an encrypted connection is initiated to the message broker server through a client instance to establish an encrypted transmission channel. There are various encryption methods, and this embodiment does not limit the specific encryption method. For example, one or more combinations of TLS / SSL one-way or two-way encryption, DTLS encryption, AES symmetric encryption, etc., can be selected.

[0143] Figure 5 A flowchart illustrating the hash-based dynamic authentication mechanism provided in this application is shown below. Figure 5As shown. The process begins by obtaining the current timestamp, concatenating it with the authentication parameters from the target connection parameters, and the device hardware information to obtain the raw data to be hashed. This raw data is then input into the built-in MD5 algorithm. The MD5 algorithm first initializes the raw data using MD5, preparing the basic context for its operation and ensuring the consistency and correctness of subsequent hash operations. The output of this step is the initial state. Next, the input raw data is preprocessed by grouping it into 512-bit units. The preprocessed data is written to the algorithm buffer block by block, and the MD5 context state is updated block by block, combining this with the initial state from the previous stage. This completes the segmented input and state iteration, outputting the updated state and providing processed standard data blocks for the four rounds of hash transformation. Then, based on the updated state output from the data update phase and the 512-bit data block, four rounds of cyclic hashing are performed. Each round of hashing includes 16 non-linear function operations, bitwise operations, shift operations, and constant additions. After the four rounds of transformation, the results of the four state variables are concatenated to generate a 128-bit binary hash value, completing the data hash compression. Following this, the 128-bit binary hash value generated by the four rounds of hashing is converted bit by bit into hexadecimal characters according to the rule of 4 binary bits corresponding to 1 hexadecimal digit, ultimately generating a 32-bit hexadecimal string. Finally, based on the username and the 32-bit hexadecimal string, the connection credential is obtained.

[0144] The connection credentials are authenticated through an encrypted transmission channel. When authentication is successful and the encrypted transmission channel is connected normally, the encrypted transmission channel is identified as a communication link. If authentication fails, the current encrypted transmission channel is immediately disconnected, and the establishment of a communication link is refused. If authentication is successful but the encrypted transmission channel connection is abnormal, an automatic reconnection mechanism is triggered. If both authentication failure and encrypted transmission channel connection abnormality occur simultaneously, the security control measures for authentication failure are implemented first.

[0145] In this embodiment, dynamic credentials are generated based on timestamps, giving the connection credentials a time-limited validity period. Even if intercepted, they cannot be reused at other times, ensuring the authentication process is valid only once. Simultaneously, by incorporating device hardware information into hash calculations, the connection credentials are strongly bound to the device's unique hardware identifier, preventing the key from being copied to other devices for unauthorized access to the platform. These technical operations significantly improve the security and reliability of IoT device access authentication.

[0146] Optionally, in this embodiment of the application, the method further includes, through a client instance:

[0147] When the encrypted transmission channel connection is abnormal, obtain the connection abnormality information, and determine the target reconnection mechanism based on the correspondence between the abnormality type and the reconnection mechanism.

[0148] The reconnection thread is initiated according to the target reconnection mechanism, and the connection status is monitored until the client instance and the message broker server successfully establish a communication link.

[0149] In this embodiment, connection error information includes, but is not limited to: connection error code, error type, error occurrence time, client identifier, current network status, channel negotiation parameters, and heartbeat detection results. The target reconnection mechanism is a reconnection mechanism that matches the connection error information, and the reconnection mechanism includes, but is not limited to: fast reconnection mechanism, exponential backoff reconnection mechanism, random delay reconnection mechanism, and resource adaptive reconnection mechanism.

[0150] Specifically, the abnormal information is analyzed to determine the type of connection error, which includes, but is not limited to, network jitter, excessive server load, and server-initiated link closure. Then, based on the connection error information, a reconnection mechanism is selected from the correspondence between error types and reconnection mechanisms to determine the target reconnection mechanism. This correspondence stores multiple preset reconnection mechanisms and compatible connection error types. The correspondence between anomaly types and reconnection mechanisms can be as follows: For connection anomalies caused by network jitter, a fast reconnection mechanism is selected; for connection anomalies caused by excessive server load, a random delay reconnection mechanism is selected to distribute reconnection time points and avoid a large number of client instances reconnecting simultaneously, which would exacerbate the pressure on the message broker server; for connection anomalies caused by the server actively closing the link, a resource adaptive reconnection mechanism is selected, which dynamically adjusts the reconnection timing and number of retries based on the real-time load of the IoT access platform; for unknown anomalies or anomaly types that are unclear, an exponential backoff reconnection mechanism is selected, with an initial reconnection delay of 1 second. After each failed reconnection attempt, the delay time doubles (e.g., 2 seconds, 4 seconds, 8 seconds, etc.) until the maximum reconnection delay is reached, which is usually 60 seconds. This exponential backoff reconnection mechanism can avoid excessively frequent reconnection attempts from putting pressure on the network.

[0151] Then, a reconnection thread is initiated according to the target reconnection mechanism, and the connection status is monitored until the client instance and the message broker server successfully establish a communication link. The reconnection thread and the main thread are synchronized through a mutex lock to ensure thread safety. Of course, this embodiment also supports configuring a maximum number of reconnections to prevent unlimited reconnections from consuming system resources. That is, when the number of reconnections exceeds the limit, an error log is recorded and reconnection attempts are stopped; when the reconnection is successful, the reconnection counter and delay time are reset to the initial state, and a log of successful reconnection is recorded for easy monitoring of system status.

[0152] In this embodiment, when the encrypted transmission channel connection fails, a reconnection mechanism is used to actively repair the communication link, ensuring that the client instance and the message broker server can eventually establish a successful connection, thus guaranteeing the smooth progress of the IoT device access process. However, different connection failure scenarios have different causes. If a fixed reconnection method is used, problems such as low reconnection efficiency, resource waste, or reconnection failure may occur. Therefore, the target reconnection mechanism is matched accurately based on the connection failure information first, and then the reconnection thread is started according to the target reconnection mechanism and its status is monitored. This shortens the reconnection time and avoids frequent reconnections consuming system computing resources and network bandwidth.

[0153] Figure 6 This is a schematic diagram of the structure of the IoT device access device provided in this application, such as... Figure 6 As shown, the IoT device access device 60 provided in this embodiment is applied to an IoT system. The IoT system includes an IoT central platform and multiple IoT access platforms. The connection modes of the multiple IoT access platforms include a single connection mode and a multi-connection mode. In the single connection mode, multiple IoT devices establish a communication link with the message broker server of the IoT access platform through a single client instance. In the multi-connection mode, multiple IoT devices establish a communication link with the message broker server of the IoT access platform through their respective corresponding client instances.

[0154] The Internet of Things (IoT) device access device 60 includes:

[0155] The configuration parsing module 601 is used to parse the platform configuration information to obtain the activation status and connection parameters of each IoT access platform among multiple IoT access platforms;

[0156] The instance creation module 602 is used to determine the target connection mode based on the target IoT access platform whose activation status is enabled, and to generate a client instance based on the target connection mode and the target connection parameters of the target IoT access platform;

[0157] The link establishment module 603 is used to establish a communication link with the message broker server of the target IoT access platform through a client instance, and to connect IoT devices to the IoT central platform based on the communication link.

[0158] In one possible implementation, when the instance creation module 602 determines the target connection mode based on the target IoT access platform's enabled state, it is specifically used for:

[0159] Based on the platform identifier of the target IoT access platform, the initial connection mode is determined from the correspondence between connection modes and platforms;

[0160] If the initial connection mode is multi-connection mode, the current network status and remaining resources of the target IoT access platform are obtained. If the current network status and remaining resources meet the preset conditions, the target connection mode is adjusted to single-connection mode.

[0161] In one possible implementation, the device further includes:

[0162] The mapping relationship generation module is used to determine the data transmission characteristics and data isolation requirements of each IoT access platform based on a set of IoT devices corresponding to the IoT access platform. Among them, the data transmission characteristics are used to characterize the data transmission behavior and communication load characteristics of a set of IoT devices corresponding to the IoT access platform; the data isolation requirements are used to characterize the security isolation requirements for data transmission of a set of IoT devices corresponding to the IoT access platform.

[0163] Based on the data transmission characteristics and data isolation requirements of the IoT access platform, the recommended connection mode for the IoT access platform is determined.

[0164] By integrating recommended connection modes from multiple IoT access platforms, the correspondence between connection modes and platforms is obtained.

[0165] In one possible implementation, the device further includes:

[0166] The device platform matching module is used to obtain description information of multiple IoT devices to be connected;

[0167] Based on the description information of multiple IoT devices to be connected, and the connection mode of each IoT access platform, a group of IoT devices corresponding to the IoT access platform is determined.

[0168] Accordingly, when the link establishment module 603 performs the function of connecting IoT devices to the IoT central platform based on the communication link, it is specifically used for:

[0169] For each IoT access platform, a group of IoT devices corresponding to the IoT access platform are connected to the IoT central platform based on the communication link established with the message broker server of the IoT access platform.

[0170] In one possible implementation, when the instance creation module 602 generates a client instance based on the target connection mode and the target IoT access platform, it is specifically used for:

[0171] When the target connection mode is single connection mode, a single client instance is generated and initialized based on the target connection parameters;

[0172] Based on the target connection parameters and attribute reporting topic template, generate device topic paths for each IoT device in multiple IoT devices corresponding to the target IoT access platform, resulting in multiple device topic paths;

[0173] Multiple device topic paths are registered to a single client instance, resulting in a single client instance corresponding to the single connection mode.

[0174] In one possible implementation, when the link establishment module 603 establishes a communication link with the message broker server of the target IoT access platform through the client instance, it is specifically used for:

[0175] The client instance initiates an encrypted connection to the message broker server to establish an encrypted transmission channel.

[0176] The connection credentials are obtained by hashing the current timestamp, the authentication parameters in the target connection parameters, and the device hardware information.

[0177] Authentication of connection credentials is achieved through an encrypted transmission channel;

[0178] When authentication is successful and the encrypted transmission channel is connected normally, the encrypted transmission channel is identified as a communication link.

[0179] In one possible implementation, the device further includes:

[0180] The abnormal reconnection module is used to obtain connection abnormality information when the encrypted transmission channel connection is abnormal, and determine the target reconnection mechanism based on the correspondence between the abnormality type and the reconnection mechanism.

[0181] The reconnection thread is initiated according to the target reconnection mechanism, and the connection status is monitored until the client instance and the message broker server successfully establish a communication link.

[0182] The IoT device access device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.

[0183] Figure 7 This is a schematic diagram of the structure of the IoT device access system provided in this application. Figure 7 As shown, the IoT device access system 70 provided in this embodiment includes at least one processor 701 and a memory 702. Optionally, the device 70 further includes a communication component 703. The processor 701, memory 702, and communication component 703 are connected via a bus 704.

[0184] In a specific implementation, at least one processor 701 executes computer execution instructions stored in memory 702, causing at least one processor 701 to perform the above-described method.

[0185] The specific implementation process of processor 701 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0186] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.

[0187] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0188] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0189] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0190] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.

[0191] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.

[0192] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.

[0193] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0194] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0195] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0196] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0197] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.

[0198] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.

Claims

1. A method for accessing Internet of Things (IoT) devices, characterized in that, This method is applied to an Internet of Things (IoT) system, which includes an IoT central platform and multiple IoT access platforms. The connection modes of the multiple IoT access platforms include a single-connection mode and a multi-connection mode. In the single-connection mode, multiple IoT devices establish a communication link with the message broker server of the IoT access platform through a single client instance. In the multi-connection mode, multiple IoT devices establish a communication link with the message broker server of the IoT access platform through their respective corresponding client instances. Parse the platform configuration information to obtain the activation status and connection parameters of each of the multiple IoT access platforms; Based on the target IoT access platform whose activation status is enabled, the target connection mode is determined, and a client instance is generated based on the target connection mode and the target connection parameters of the target IoT access platform; The client instance establishes a communication link with the message broker server of the target IoT access platform, and connects IoT devices to the IoT central platform based on the communication link. The determination of the target connection mode based on the target IoT access platform whose activation status is enabled includes: Based on the platform identifier of the target IoT access platform, the initial connection mode is determined from the correspondence between connection modes and platforms; If the initial connection mode is a multi-connection mode, then the current network status and current remaining resources of the target IoT access platform are obtained. If the current network status and current remaining resources meet the preset conditions, then the target connection mode is adjusted to a single-connection mode. The method further includes: For each of the aforementioned IoT access platforms, based on a group of IoT devices corresponding to the IoT access platform, the data transmission characteristics and data isolation requirements of the IoT access platform are determined; wherein, the data transmission characteristics are used to characterize the data transmission behavior and communication load characteristics of the group of IoT devices corresponding to the IoT access platform; the data isolation requirements are used to characterize the security isolation requirements for data transmission of the group of IoT devices corresponding to the IoT access platform. Based on the data transmission characteristics and data isolation requirements of the IoT access platform, a recommended connection mode for the IoT access platform is determined. By integrating the recommended connection modes of the multiple IoT access platforms, the correspondence between the connection modes and the platforms is obtained.

2. The IoT device access method according to claim 1, characterized in that, The method further includes: Obtain description information of multiple IoT devices to be connected; Based on the description information of the multiple IoT devices to be connected and the connection mode of each IoT access platform, a group of IoT devices corresponding to the IoT access platform is determined. The process of connecting IoT devices to the IoT central platform based on a communication link includes: For each of the aforementioned IoT access platforms, based on the communication link established with the message broker server of the IoT access platform, a group of IoT devices corresponding to the IoT access platform are connected to the IoT central platform.

3. The IoT device access method according to claim 1, characterized in that, The process of generating a client instance based on the target connection mode and the target connection parameters of the target IoT access platform includes: When the target connection mode is single connection mode, a single client instance is generated and initialized based on the target connection parameters; Based on the target connection parameters and attribute reporting topic template, generate device topic paths for each IoT device among the multiple IoT devices corresponding to the target IoT access platform, resulting in multiple device topic paths; The multiple device topic paths are uniformly registered to the single client instance to obtain the single client instance corresponding to the single connection mode.

4. The IoT device access method according to any one of claims 1-3, characterized in that, The step of establishing a communication link with the message broker server of the target IoT access platform through the client instance includes: The client instance initiates an encrypted connection to the message broker server to establish an encrypted transmission channel. A hash calculation is performed on the current timestamp, the authentication parameters in the target connection parameters, and the device hardware information to obtain the connection credential; The connection credential is authenticated through the encrypted transmission channel; When authentication is successful and the encrypted transmission channel is connected normally, the encrypted transmission channel is identified as the communication link.

5. The IoT device access method according to claim 4, characterized in that, The method further includes: When the encrypted transmission channel connection is abnormal, obtain connection abnormality information, and determine the target reconnection mechanism based on the connection abnormality information from the correspondence between the abnormality type and the reconnection mechanism. The reconnection thread is initiated according to the target reconnection mechanism, and the connection status is monitored until the client instance and the message broker server successfully establish a communication link.

6. An Internet of Things (IoT) device access device, characterized in that, This invention is applied to an Internet of Things (IoT) system, which includes an IoT central platform and multiple IoT access platforms. The connection modes of the multiple IoT access platforms include a single connection mode and a multi-connection mode. In the single connection mode, multiple IoT devices establish a communication link with the message broker server of the IoT access platform through a single client instance. In the multi-connection mode, multiple IoT devices establish a communication link with the message broker server of the IoT access platform through their respective corresponding client instances. IoT device access devices include: The configuration parsing module is used to parse platform configuration information to obtain the activation status and connection parameters of each IoT access platform among multiple IoT access platforms; The instance creation module is used to determine the target connection mode based on the target IoT access platform whose activation status is enabled, and to generate a client instance based on the target connection mode and the target connection parameters of the target IoT access platform; The link establishment module is used to establish a communication link with the message broker server of the target IoT access platform through the client instance, and to connect the IoT device to the IoT central platform based on the communication link; The instance creation module is specifically used to determine the initial connection mode based on the platform identifier of the target IoT access platform from the correspondence between connection modes and platforms; If the initial connection mode is a multi-connection mode, then the current network status and current remaining resources of the target IoT access platform are obtained. If the current network status and current remaining resources meet the preset conditions, then the target connection mode is adjusted to a single-connection mode. The correspondence generation module is used to determine the data transmission characteristics and data isolation requirements of each IoT access platform based on a group of IoT devices corresponding to the IoT access platform; wherein, the data transmission characteristics are used to characterize the data transmission behavior and communication load characteristics of the group of IoT devices corresponding to the IoT access platform; and the data isolation requirements are used to characterize the security isolation requirements for data transmission of the group of IoT devices corresponding to the IoT access platform. Based on the data transmission characteristics and data isolation requirements of the IoT access platform, a recommended connection mode for the IoT access platform is determined. By integrating the recommended connection modes of the multiple IoT access platforms, the correspondence between the connection modes and the platforms is obtained.

7. An Internet of Things (IoT) device access system, characterized in that, include: Memory, processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory, causing the processor to perform the Internet of Things device access method as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the Internet of Things (IoT) device access method as described in any one of claims 1-5.