Internet of Things gateway layered mapping management method and system
By introducing ITP identifiers to build a mapping relationship between the master device, ITP, and logical port, the problem of fixed mapping levels in the management of multiple sub-devices in IoT gateway devices is solved, enabling precise management and flexible adjustment, and improving the stability and reliability of the system.
Patent Information
- Application Number
- CN202511364779.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-23
- Publication Date
- 2026-01-09
AI Technical Summary
Existing IoT gateway devices have a fixed mapping hierarchy when managing multiple sub-devices, which lacks flexibility and cannot be dynamically adjusted. Furthermore, it is difficult to accurately identify sub-devices when unbinding them, which may lead to business interruption or data inconsistency.
The ITP identifier is introduced as an intermediate abstract identifier to build a transitive mapping relationship between the master device, ITP, and logical port. The logicPortMap and enMap mapping tables enable precise management of the master device and sub-devices, supporting dynamic adjustment and independent operation.
It enables independent management of master and slave devices, avoiding unnecessary business interruptions and data inconsistencies, improving system stability and reliability, and supporting rapid expansion into new business scenarios.
Smart Images

Figure CN121309302A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet of Things (IoT) technology, and in particular to an IoT gateway hierarchical mapping management method and system. Background Technology
[0002] In industrial IoT applications, IoT gateways play a crucial role in connecting heterogeneous underlying devices with cloud platforms. In many practical deployments, a single gateway's physical port may need to manage multiple sub-devices simultaneously. For example, a gateway may connect to one or more elevators, each of which contains multiple sub-devices, including voice modules, video modules, access control modules, lighting modules, and air conditioning. The gateway needs to associate and manage these multiple sub-devices with the main device, such as the elevator.
[0003] Currently, IoT gateway devices can be managed through hierarchical mapping, such as establishing a three-tier mapping relationship between ports, devices, and services to manage sub-devices and master devices. However, this method has a fixed mapping hierarchy, lacks flexibility, and cannot dynamically adjust the mapping relationship. Secondly, when unbinding sub-devices, because ports, devices, and services are all interconnected, it is difficult to accurately identify which sub-device is unbound from which port when a device needs to be unbound or goes offline. This is especially problematic when multiple devices share a port, potentially leading to unnecessary service interruptions or data inconsistencies.
[0004] CN201610214878 discloses a design method for the whole-process management of IT equipment based on a hierarchical model, including the following steps:
[0005] Step 1: Taking equipment resources as the core, and based on the closeness of the relationship between equipment resources and business, divide the three types of business—information scheduling, operation, and maintenance—into the following layers from top to bottom: peripheral business layer, basic business layer, core operation layer, and equipment resource layer.
[0006] Step 2: Abstract each business layer and clarify the relationships between them;
[0007] Step 3: Independently encapsulate each business layer and perform standardized and normalized design, while decoupling each business layer;
[0008] Step 4: Define the basic state of equipment resources throughout the entire process, realize the transition between basic states through basic business processes, and realize the standardization and normalization of equipment resource data through basic business process operations;
[0009] Step 5: Basic business processes support peripheral business processes, which in turn enable the peripheral business processes to perform their complete scheduling, operation, and maintenance operations through basic business processes.
[0010] This comparison document constructs an outer business layer, a basic business layer, a core operation layer, and a device resource layer to achieve decoupling. Then, through standardized and normalized design, it achieves the management of IT devices. However, when this method is applied to the management of IoT devices, since it mainly manages the relationship between ports, sub-devices, and master devices, it cannot adapt to the situation where a physical port connects to multiple sub-devices.
[0011] The technical problem that this invention aims to solve is: how to achieve precise management between master devices and sub-devices by an IoT gateway. Summary of the Invention
[0012] The main objective of this invention is to provide a hierarchical mapping management method for IoT gateways. By introducing an ITP identifier as an intermediate abstract identifier between two layers, a transitive mapping relationship of "master device - ITP - logical port" is constructed. This architecture achieves precise management between master devices and sub-devices through independent logicPortMap and enMap mapping tables.
[0013] In addition, an IoT gateway hierarchical mapping management system is also provided.
[0014] To achieve the above objectives, the technical solution adopted in this application is as follows:
[0015] A hierarchical mapping management method for IoT gateways includes the following steps:
[0016] Step 1: Obtain the physical port of the gateway and the identifier of the master device. Abstract the physical port of the gateway into at least one logical port. A master device includes multiple sub-devices, and the sub-devices communicate with the logical ports.
[0017] Step 2: Set the ITP identifier, build the mapping relationship between logical ports and ITP identifiers to obtain the logicPortMap mapping table, and build the mapping relationship between ITP identifiers and the identifiers of the master device to obtain the enMap mapping table;
[0018] Step 3: By modifying the configuration of the logicPortMap and enMap mapping tables, management between the sub-device and the master device can be achieved.
[0019] It should be noted that:
[0020] ITP Identifier: ITP (iotThingProfile) is an IoT asset identifier. It is a neutral identifier without specific business meaning and is only used as a bridge between the logical port and the master device.
[0021] logicPortMap mapping table: Defines the correspondence between logical ports and ITPs.
[0022] enMap mapping table: Defines the correspondence between ITP and master device.
[0023] Preferably, the number of ITP identifiers corresponds one-to-one with the number of master devices.
[0024] Preferably, in step 3, the management between the sub-device and the master device includes: adding or deleting sub-devices, changing the logical port corresponding to the sub-device, replacing or unbinding the master device, and registering a new master device.
[0025] Preferably, the specific operation of adding or deleting sub-devices is as follows: add or remove the logical port of the corresponding sub-device from the ports list of the corresponding ITP identifier in the logicPortMap mapping table.
[0026] Preferably, the specific operation of changing the logical port corresponding to the sub-device is as follows: modify the mapping relationship between the sub-device and the corresponding logical port in the logicPortMap mapping table to the mapping relationship between the sub-device and other logical ports.
[0027] Preferably, the specific operation of replacing or unbinding the master device is as follows: replacing the original master device identifier with the new master device identifier in the enMap mapping table to complete the master device replacement; deleting the entry corresponding to the master device identifier in the enMap mapping table to cut off the connection between the master device and all sub-devices to complete the master device unbinding.
[0028] Preferably, the specific operation of registering a new master device is as follows: set a new ITP identifier in the logicPortMap mapping table, construct a mapping relationship between the logical port and the new ITP identifier, and then create a new master device identifier in the enMap mapping table, constructing a mapping relationship between the new master device identifier and the new ITP identifier.
[0029] Preferably, a capabilities field is configured in the enMap mapping table. The capabilities field is used to indicate the data types that the master device can receive. If the data type of the received data is not within the range of the capabilities field, the data is discarded.
[0030] Preferably, both the logicPortMap and enMap mapping tables are constructed using externalized JSON configuration files.
[0031] In addition, an IoT gateway hierarchical mapping management system is also provided, including the following units:
[0032] Acquisition Unit: Used to acquire the physical port of the gateway and the identifier of the master device, and abstract the physical port of the gateway into a logical port. A master device includes multiple sub-devices, and the sub-devices communicate with the logical ports.
[0033] Mapping construction unit: Set ITP identifier, construct the mapping relationship between logical port and ITP identifier to obtain the logicPortMap mapping table, construct the mapping relationship between ITP identifier and master device identifier to obtain the enMap mapping table;
[0034] Device Management Unit: Used to manage the relationship between sub-devices and master devices by modifying the configuration of the logicPortMap and enMap mapping tables.
[0035] Compared with existing technologies, this solution has the following advantages:
[0036] This management approach introduces ITP identifiers to construct a transitive mapping relationship of "master device - ITP - logical port". The ITP identifier aggregates a group of specific, scattered logical ports (such as XRS1, XRS2, XAL1-1) into a single, meaningful logical unit. One ITP identifier corresponds to one master device. The logicPortMap and enMap mapping tables can be modified independently to manage sub-devices and master devices. Moreover, operations on sub-devices and operations on master devices are independent of each other and do not affect each other. This not only simplifies operations but also avoids unnecessary service interruptions or data inconsistencies when unbinding a sub-device when a physical port corresponds to multiple sub-devices. Attached Figure Description
[0037] Figure 1 This is a flowchart of the IoT gateway hierarchical mapping management method in Example 1;
[0038] Figure 2 This is a flowchart of the IoT gateway hierarchical mapping management system in Example 1. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of this application implemented as described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0040] Example 1
[0041] refer to Figure 1A hierarchical mapping management method for IoT gateways includes the following steps:
[0042] Step 1: Obtain the physical port of the gateway and the identifier of the master device. Abstract the physical port of the gateway into at least one logical port. A master device includes multiple sub-devices, and the sub-devices communicate with the logical ports.
[0043] In this embodiment, an elevator is used as the main device for illustration. This method can also manage other business entities, such as intercoms, cameras, elevator controllers, and lights. The identifier of the main device is its device number, which serves as a unique business identifier for the IoT device, corresponding to a specific business entity. The gateway's physical ports include XRS1, XRS2, XAL1, XAL2, and XIT, where XRS is a serial port, XAL is a network port, and XIT is a voice port.
[0044] Then, the physical ports of the gateway are abstracted into at least one logical port. The gateway needs to control multiple elevators simultaneously. This embodiment takes controlling two elevators simultaneously as an example. Since each elevator has a voice intercom, camera, elevator controller, lighting, etc., the physical ports of the gateway need to connect to multiple sub-devices. For example, the voice port (XIT) of the gateway is abstracted into two logical ports (XIT1 and XIT2). XIT1 and XIT2 are respectively connected to the voice intercoms of the two elevators. Alternatively, the serial port (XRS1) of the gateway is abstracted into two logical ports (XRS1-1 and XRS1-2). XRS1-1 and XRS1-2 are respectively connected to the cameras of the two elevators. Other physical ports are abstracted into logical ports in the same way. Moreover, the number of physical ports abstracted into logical ports depends on the number of elevators and the number of sub-devices.
[0045] Step 2: Set the ITP identifier, build the mapping relationship between logical ports and ITP identifiers to obtain the logicPortMap mapping table, and build the mapping relationship between ITP identifiers and the identifiers of the master device to obtain the enMap mapping table;
[0046] In this embodiment, ITP identifiers are set, and the number of ITP identifiers corresponds one-to-one with the number of master devices (elevators). Then, a mapping relationship is constructed between all logical ports implementing the function of an elevator and their corresponding ITP identifiers. Next, a mapping relationship is constructed between ITP identifiers and identifiers of master devices. In this way, all elevators and their corresponding sub-devices are connected through their respective ITP identifiers, thereby obtaining the logicPortMap and enMap mapping tables. The logicPortMap mapping table contains ITP identifiers and their corresponding logical ports. An example of its data structure is as follows:
[0047]
[0048]
[0049] Among them, itpab7c43853 and itpab7c43854 are the names of two ITP identifiers. The ITP identifier (itpab7c43853) is mapped to three logical ports: XRS1, XRS2, and XAL1-1, and the ITP identifier (itpab7c43854) is mapped to three logical ports: XRS3, XAL2, and XAL1-2.
[0050] The enMap mapping table contains ITP identifiers and their corresponding master device identifiers. An example of its data structure is as follows:
[0051]
[0052] Among them, en20130015 and en20130016 are the device numbers of the master device, that is, the identifier of the master device. The specific meaning of the code here is: the elevator number en20130015 is mapped to the ITP identifier (itpab7c43853), and the elevator number en20130016 is mapped to the ITP identifier (itpab7c43854).
[0053] By using the mapping relationships between the logicPortMap and enMap mapping tables, we can obtain the mapping between elevator number en20130015 and the ITP identifier (itpab7c43853), and the mapping between the ITP identifier (itpab7c43853) and the three logical ports XRS1, XRS2, and XAL1-1. This gives us the mapping relationship between elevator number en20130015 and XRS1, XRS2, and XAL1-1. Similarly, we can obtain the mapping relationship between elevator number en20130016 and XRS3, XAL2, and XAL1-2.
[0054] Essentially, ITP itself has no specific meaning; it simply serves as a bridge between the master device and the logical port mapping, enabling communication between the master device and the sub-device.
[0055] Secondly, both the logicPortMap and enMap mapping tables are built through externalized JSON configuration files, rather than being hard-coded into the gateway's program logic. When it is necessary to modify the mapping relationship between logical ports and ITP identifiers, or the mapping relationship between ITP identifiers and master devices, it is only necessary to modify the JSON configuration file and then reload it.
[0056] Preferably, a capabilities field is configured in the enMap mapping table. The capabilities field is used to indicate the data types that the master device can receive. If the data type of the received data is not within the range of the capabilities field, the data is discarded.
[0057] In this embodiment, the capabilities field can be configured in the enMap mapping table to achieve device information filtering. During the data reporting identification process, after the gateway finds the identifier of the data source through the logical port-ITP identifier-master device identifier, it can further check the capabilities list of that identifier. If the reported data type (such as temperature and humidity) is not within its capabilities, the gateway can directly discard the data at the edge without uploading it to the cloud. This allows for service-related message filtering at the gateway edge, significantly reducing network bandwidth waste and cloud platform processing costs caused by invalid data reporting to the cloud, and improving the overall system efficiency.
[0058] An example of the data structure for the enMap mapping table with the capabilities field added is as follows:
[0059] Step 3: By modifying the configuration of the logicPortMap and enMap mapping tables, management between the sub-device and the master device can be achieved.
[0060] In this embodiment, the management between the sub-device and the master device includes: adding or deleting sub-devices, changing the logical port corresponding to the sub-device, replacing or unbinding the master device, and registering a new master device.
[0061] The following details how to manage various aspects between master and slave devices by modifying the logicPortMap and enMap mapping tables:
[0062] The specific operation for adding or deleting sub-devices is as follows: add or remove the logical port of the corresponding sub-device from the ports list of the corresponding ITP identifier in the logicPortMap mapping table.
[0063] In this embodiment, adding or deleting a sub-device can also be described as binding or unbinding a sub-device. When it is necessary to add or delete the function of the main device, it is necessary to bind or unbind the corresponding sub-device. The specific operation is as follows: in the logicPortMap mapping table, find the ITP identifier corresponding to the main device, and then add or remove the logical port of the corresponding sub-device from the ports list of the ITP identifier to complete the addition or deletion of the sub-device. In this way, other ports under the ITP identifier will not be affected, and precise unbinding or binding can be achieved. The accuracy of binding or unbinding can ensure that it will not affect other devices that are running normally under the unified gateway.
[0064] The specific operation for changing the logical port corresponding to the sub-device is as follows: modify the mapping relationship between the sub-device and the corresponding logical port in the logicPortMap mapping table to the mapping relationship between the sub-device and other logical ports.
[0065] For example, if a sub-device connected to the XRS1 serial port malfunctions and is replaced with one connected to the SRS4 port after repair, then you only need to look up the corresponding ITP identifier in the logicPortMap mapping table and replace "XRS1" with "XRS4" in the ports list. In this way, the asset represented by the master device identifier never changes for the upper-layer business, and the business is unaware of it, thus realizing the transparency of the underlying hardware changes.
[0066] The specific operations for replacing or unbinding the master device are as follows: replace the original master device identifier with the new master device identifier in the enMap mapping table to complete the master device replacement; delete the entry corresponding to the master device identifier in the enMap mapping table to cut off the connection between the master device and all sub-devices to complete the master device unbinding.
[0067] In this embodiment, due to business needs, it is necessary to swap the business numbers of two elevators (assuming that the hardware configuration of the two elevators is the same) and replace the main equipment. At this time, the contents of the logicPortMap mapping table do not need to be modified. Only the ITP identifiers of the two elevators in the enMap mapping table need to be swapped. Only two records need to be modified, which is efficient and has a low risk of error.
[0068] If it is necessary to unbind the master device, simply delete the entry related to the master device identifier in the enMap mapping table. This operation will immediately cut off the business connection between the master device and all its sub-devices. All data reported from these ports will be considered invalid because the corresponding master device identifier cannot be found, thus achieving a clean and thorough unbinding.
[0069] The specific steps for registering a new master device are as follows: set a new ITP identifier in the logicPortMap mapping table, establish a mapping relationship between the logical port and the new ITP identifier, and then create a new master device identifier in the enMap mapping table, establishing a mapping relationship between the new master device identifier and the new ITP identifier.
[0070] In this embodiment, when a new master device needs to be added (equivalent to master device registration), a new ITP identifier is first defined in the logicPortMap mapping table, and a mapping relationship is established between the logical ports associated with the master device and the new ITP identifier. Then, a new record is created in the enMap mapping table, establishing a mapping relationship between the new master device identifier and the new ITP identifier. In this way, each sub-device can obtain a clear and unambiguous identity path, facilitating device management by staff.
[0071] The advantages of this solution are:
[0072] 1. Clearer Device Identification: By setting up ITP identifiers as a bridge, a clear mapping from physical ports to service devices is achieved. Especially in scenarios where one physical port corresponds to multiple sub-devices, through the transitive mapping relationship of logical port - ITP identifier - master device, each sub-device can obtain a clear and unambiguous identity path, reducing the complexity of device registration and management.
[0073] 2. More flexible mapping: Supports dynamic adjustment of the mapping relationship between physical ports and devices. Only the logicPortMap and enMap mapping tables need to be modified. There is no need to change or re-mutate the firmware code, which improves the maintainability of the system.
[0074] 3. More precise unbinding operation: By setting the ITP identifier as an intermediate bridge, the transitive mapping relationship between logical port, ITP identifier and master device is realized, which can accurately identify and locate the device that needs to be unbound. At the same time, it avoids the impact on other devices and improves the stability and reliability of the system.
[0075] 4. More efficient message processing: By setting the capabilities field in the enMap mapping table, data filtering based on business needs is achieved, which not only reduces the transmission of invalid data, but also reduces network load and cloud processing costs.
[0076] 5. Supports rapid expansion for new business scenarios: When it is necessary to support a new type of device with a completely different combination of ports, simply add the new ITP identifier and the mapping relationship of the device to the mapping table. The core logic of the system does not need to be changed, and it can quickly adapt to the new business scenario.
[0077] Example 2
[0078] refer to Figure 2 An IoT gateway hierarchical mapping management system includes the following units:
[0079] Acquisition Unit: Used to acquire the physical port of the gateway and the identifier of the master device, and abstract the physical port of the gateway into at least one logical port. A master device includes multiple sub-devices, and the sub-devices communicate with the logical ports.
[0080] Mapping construction unit: Set ITP identifier, construct the mapping relationship between logical port and ITP identifier to obtain the logicPortMap mapping table, construct the mapping relationship between ITP identifier and master device identifier to obtain the enMap mapping table;
[0081] Device Management Unit: Used to manage the relationship between sub-devices and master devices by modifying the configuration of the logicPortMap and enMap mapping tables.
[0082] In this embodiment, the specific workflow of the management system is as follows: The acquisition unit acquires the physical port of the gateway and the identifier of the master device, abstracts the physical port into a logical port, and then sends the logical port and the identifier of the master device to the mapping construction unit. The mapping construction unit sets a corresponding number of ITP identifiers based on the number of identifiers of the master device, then constructs a mapping relationship between the logical port and the ITP identifier associated with the master device identifier, obtaining the logicPortMap mapping table. It then constructs a mapping relationship between the master device and the corresponding ITP identifier, obtaining the enMap mapping table, and finally sends the logicPortMap mapping table and the enMap mapping table to the device management unit. The device management unit modifies the logicPortMap mapping table to add, delete, or replace sub-devices and logical ports; and modifies the enMap mapping table to manage the relationship between the master device and the logical ports.
[0083] By using the logicPortMap mapping table, enMap mapping table, and ITP identifier as bridges, adjustments to sub-devices do not affect other devices, which can continue to function normally. Conversely, adjustments to the master device do not affect the connection relationships of sub-devices, thus improving the stability and reliability of the system.
[0084] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A hierarchical mapping management method for IoT gateways, characterized in that, Includes the following steps: Step 1: Obtain the physical port of the gateway and the identifier of the master device. Abstract the physical port of the gateway into at least one logical port. A master device includes multiple sub-devices, and the sub-devices communicate with the logical ports. Step 2: Set the ITP identifier, build the mapping relationship between logical ports and ITP identifiers to obtain the logicPortMap mapping table, and build the mapping relationship between ITP identifiers and the identifiers of the master device to obtain the enMap mapping table; Step 3: By modifying the configuration of the logicPortMap and enMap mapping tables, management between the sub-device and the master device can be achieved.
2. The IoT gateway hierarchical mapping management method according to claim 1, characterized in that, The number of ITP identifiers corresponds one-to-one with the number of master devices.
3. The IoT gateway hierarchical mapping management method according to claim 1, characterized in that, In step 3, the management between the sub-device and the master device includes: adding or deleting sub-devices, changing the logical port corresponding to the sub-device, replacing or unbinding the master device, and registering a new master device.
4. The IoT gateway hierarchical mapping management method according to claim 3, characterized in that, The specific operation of adding or deleting sub-devices is as follows: add or remove the logical port of the corresponding sub-device from the ports list of the corresponding ITP identifier in the logicPortMap mapping table.
5. The IoT gateway hierarchical mapping management method according to claim 3, characterized in that, The specific operation of changing the logical port corresponding to the sub-device is as follows: modify the mapping relationship between the sub-device and the corresponding logical port in the logicPortMap mapping table to the mapping relationship between the sub-device and other logical ports.
6. The IoT gateway hierarchical mapping management method according to claim 3, characterized in that, The specific operation for replacing or unbinding the master device is as follows: replace the original master device identifier with the new master device identifier in the enMap mapping table to complete the master device replacement; delete the entry corresponding to the master device identifier in the enMap mapping table to cut off the connection between the master device and all sub-devices to complete the master device unbinding.
7. The IoT gateway hierarchical mapping management method according to claim 3, characterized in that, The specific operation of registering a new master device is as follows: set a new ITP identifier in the logicPortMap mapping table, establish a mapping relationship between the logical port and the new ITP identifier, and then create a new master device identifier in the enMap mapping table, and establish a mapping relationship between the new master device identifier and the new ITP identifier.
8. The IoT gateway hierarchical mapping management method according to claim 1, characterized in that, Configure the capabilities field in the enMap mapping table. The capabilities field is used to indicate the data types that the master device can receive. If the data type of the received data is not within the range of the capabilities field, the data will be discarded.
9. The IoT gateway hierarchical mapping management method according to claim 1, characterized in that, Both the logicPortMap and enMap mapping tables are constructed using externalized JSON configuration files.
10. An IoT gateway hierarchical mapping management system, characterized in that, Includes the following units: Acquisition Unit: Used to acquire the physical port of the gateway and the identifier of the master device, and abstract the physical port of the gateway into a logical port. A master device includes multiple sub-devices, and the sub-devices communicate with the logical ports. Mapping construction unit: Set ITP identifier, construct the mapping relationship between logical port and ITP identifier to obtain the logicPortMap mapping table, construct the mapping relationship between ITP identifier and master device identifier to obtain the enMap mapping table; Device Management Unit: Used to manage the relationship between sub-devices and master devices by modifying the configuration of the logicPortMap and enMap mapping tables.
Citation Information
Patent Citations
IT equipment overall process management design method based on layered model
CN105844449A
Improvements in or relating to non-return valve devices
GB510052A