Method for managing internet of things devices and internet of things system
Patent Information
- Application Number
- CN202611394362.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-09
- Publication Date
- 2026-10-13
AI Technical Summary
其中,在物联网设备注册时,物模型的生成和匹配均由平台侧完成,使得物联网平台需要预先维护多种物联网设备的模型库/能力仓库,导致物联网平台的处理负担较重
[0014]由此,在本申请中,首先,在物联网设备的本地存储器中预存物模型定义数据,然后,在物联网设备注册时,向物联网平台或物联网网关发送包括物模型定义数据对应的物模型标识的注册请求,通过物联网平台或物联网网关解析注册请求获得物模型标识,并在对应的数据库中查询不到物模型标识的情况下,从物联网设备获取完整的物模型定义数据进行验证后,完成物联网设备的物模型注册,最后,在物联网平台完成物模型注册后,物联网平台或物联网网关,只需向物联网设备反馈同步成功响应,物联网设备即可基于自身的物模型定义数据进行业务数据上报。如此,通过赋予物联网设备完整的物模型自描述能力,可将物模型的定义与存储完全下沉至设备端,使物联网平台无需预先维护多种物联网设备的模型库/能力仓库,且无需执行复杂的物模型生成逻辑,从而减小物联网平台的处理负担。
Smart Images

Figure CN122909145A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet of Things (IoT) technology, specifically to a management method for IoT devices and an IoT system. Background Technology
[0002] In IoT systems, building object models of IoT devices on an IoT platform allows upper-layer applications to process similar devices according to a unified logic. However, during IoT device registration, the generation and matching of object models are handled by the platform itself. This necessitates the IoT platform maintaining a pre-maintained model library / capability repository for various IoT devices, resulting in a heavy processing burden. Summary of the Invention
[0003] The main objective of this application is to provide a management method and system for Internet of Things (IoT) devices, which aims to at least partially solve the aforementioned technical problems.
[0004] Firstly, a method for managing IoT devices is provided, applied to an IoT platform, which includes a device model repository. The management method includes: When a registration request from an IoT device is received, the registration request is parsed to obtain the IoT device's object model identifier; the object model identifier is generated by the IoT device based on the object model definition data stored in its local memory; When the object model identifier does not exist in the object model repository, the object model definition data is obtained from the IoT device, and the object model definition data is verified according to the model verification identifier and object model identifier corresponding to the object model definition data. When the object model definition data passes the verification, the object model definition data is stored in the object model repository to obtain the first mapping relationship between the object model identifier and the object model of the IoT device, thus completing the object model registration of the IoT device. Send a synchronization success response to the IoT device so that the IoT device can report business data based on the object model identifier; the business data includes the object model identifier and business measurement point data; Receive and parse business data to obtain the object model identifier and business measurement point data, and store the business measurement point data by retrieving the object model from the object model repository based on the object model identifier.
[0005] In some implementations, object model definition data is obtained from IoT devices, and the object model definition data is verified based on the model verification identifier and object model identifier corresponding to the object model definition data, including: A model synchronization response is sent to the IoT device so that the IoT device can retrieve the object model definition data from its local storage based on the model synchronization response. The object model definition data and the object model identifier are packaged into a synchronization data packet and returned. The object model identifier is obtained by performing a hash operation on the object model definition data. Parse the synchronization data packets returned by the IoT device to obtain the object model definition data and the object model identifier; Perform a hash operation on the object model definition data to obtain the model verification identifier; Compare the model validation identifier with the object model identifier; When the model verification identifier is the same as the object model identifier, the object model definition data is deemed to have passed verification. When the model verification identifier is different from the object model identifier, the object model definition data is determined to have failed verification.
[0006] In some implementations, based on the object model identifier, the business measurement point data is stored by retrieving the object model from the object model repository, including: Based on the object model identifier, retrieve the corresponding object model from the object model repository; Based on the object model, the business measurement point data is parsed and mapped, and the business measurement point data is converted into structured data that conforms to the definition of the object model for storage.
[0007] In some implementations, before parsing the registration request to obtain the object model identifier of the IoT device, the management method further includes: Parse the registration request to obtain the device identity information of the IoT device; Authenticate IoT devices based on their device identity information; When an IoT device is authenticated, a communication connection is established with the IoT device to connect it to the IoT system.
[0008] Secondly, a management method for IoT devices is provided, applied to an IoT gateway. The IoT gateway is used to establish a communication connection between the IoT device and the IoT platform. The IoT gateway includes a local model cache library, and the IoT platform includes a device model repository. The management method includes: When a registration request from an IoT device is received, the registration request is parsed to obtain the IoT device's object model identifier; the object model identifier is generated by the IoT device based on the object model definition data stored in its local memory; When there is no object model identifier in the local model cache library and no object model identifier in the object model repository library, the object model definition data is obtained from the IoT device, and the object model definition data is verified according to the model verification identifier and object model identifier corresponding to the object model definition data. When the object model definition data passes verification, the object model definition data is stored in the local model cache library to obtain the second mapping relationship between the object model identifier and the object model of the IoT device. The object model definition data is then sent to the IoT platform so that the IoT platform stores the object model definition data in the object model repository to obtain the first mapping relationship between the object model identifier and the object model of the IoT device, thus completing the object model registration of the IoT device. The system receives a synchronization success response from the IoT platform and sends the response to the IoT device, enabling the IoT device to report business data based on the object model identifier. The business data includes the object model identifier and business measurement point data. The system receives business data and forwards it to the IoT platform, enabling the IoT platform to parse the business data, obtain the object model identifier and business measurement point data, and store the business measurement point data by retrieving the object model from the object model repository based on the object model identifier.
[0009] In some implementations, object model definition data is obtained from IoT devices, and the object model definition data is verified based on the model verification identifier and object model identifier corresponding to the object model definition data, including: A model synchronization response is sent to the IoT device so that the IoT device can retrieve the object model definition data from its local storage based on the model synchronization response. The object model definition data and the object model identifier are packaged into a synchronization data packet and returned. The object model identifier is obtained by performing a hash operation on the object model definition data. Parse the synchronization data packets returned by the IoT device to obtain the object model definition data and the object model identifier; Perform a hash operation on the object model definition data to obtain the model verification identifier; Compare the model validation identifier with the object model identifier; When the model verification identifier is the same as the object model identifier, the object model definition data is deemed to have passed verification. When the model verification identifier is different from the object model identifier, the object model definition data is determined to have failed verification.
[0010] In some of these implementations, the number of IoT devices is multiple, and the IoT devices include at least one of the basic devices before the update and the latest updated devices. The object models of IoT devices in the local model cache library include at least one of the basic object models corresponding to the basic devices and the latest object models corresponding to the latest devices. And / or, The object models of IoT devices in the object model repository include at least one of the basic object models corresponding to basic devices and the latest object models corresponding to the latest devices.
[0011] Thirdly, a management method for IoT devices is provided, applied to IoT devices, wherein the IoT device's local memory stores the IoT device's object model definition data, the IoT device communicates with an IoT platform, the IoT platform includes an object model repository, and the management method includes: Generate object model identifiers based on object model definition data; Generate a registration request based on the object model identifier; Send a registration request to the IoT platform so that the IoT platform can parse the registration request to obtain the object model identifier, and return a model synchronization response to the IoT device when the object model identifier does not exist in the object model repository; Receive the model synchronization response and report the object model definition data to the IoT platform according to the model synchronization response. Then, the IoT platform verifies the object model definition data according to the model verification identifier and object model identifier corresponding to the object model definition data, stores the object model definition data in the object model repository, obtains the first mapping relationship between the object model identifier and the object model of the IoT device, completes the object model registration of the IoT device, and sends a synchronization success response to the IoT device. Upon receiving a successful synchronization response, the system reports business data to the IoT platform based on the object model identifier. This enables the IoT platform to parse the business data, obtain the object model identifier and business measurement point data, and retrieve the object model from the object model repository based on the object model identifier to store the business measurement point data.
[0012] In some implementations, it also includes: Based on the data defined by the object model, collect business measurement point data.
[0013] Fourthly, an Internet of Things (IoT) system is provided, including an IoT platform; The Internet of Things (IoT) platform is communicatively connected to at least one IoT device to implement the IoT device management method as described in any of the above embodiments. or, The IoT platform communicates with at least one IoT device through an IoT gateway, which is used to implement the IoT device management method as described in any of the above embodiments.
[0014] Therefore, in this application, firstly, object model definition data is pre-stored in the local memory of the IoT device. Then, during IoT device registration, a registration request including the object model identifier corresponding to the object model definition data is sent to the IoT platform or IoT gateway. The IoT platform or IoT gateway parses the registration request to obtain the object model identifier. If the object model identifier cannot be found in the corresponding database, the complete object model definition data is retrieved from the IoT device for verification, and the object model registration of the IoT device is completed. Finally, after the IoT platform completes the object model registration, the IoT platform or IoT gateway only needs to send a synchronization success response to the IoT device, and the IoT device can then report business data based on its own object model definition data. In this way, by giving IoT devices complete object model self-description capabilities, the definition and storage of object models can be completely decentralized to the device side, eliminating the need for the IoT platform to pre-maintain model libraries / capability repositories for various IoT devices and to execute complex object model generation logic, thereby reducing the processing burden of the IoT platform.
[0015] Other features and advantages of this application will be described in detail in the following detailed description section. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram of the structure of an Internet of Things system provided in an exemplary embodiment of this application; Figure 2 This is another structural schematic diagram of the Internet of Things system provided in an exemplary embodiment of this application; Figure 3 This is a schematic diagram of the first process of the IoT device management method provided in an exemplary embodiment of this application; Figure 4 This is a second flowchart illustrating the management method for IoT devices provided in an exemplary embodiment of this application; Figure 5 This is a schematic diagram of a third process for a method of managing IoT devices provided in an exemplary embodiment of this application; Figure 6 This is a schematic diagram of the fourth process of the IoT device management method provided in the exemplary embodiments of this application; Figure 7 This is a schematic diagram of the object model definition data provided in an exemplary embodiment of this application.
[0018] The realization of the objectives, functional features and advantages of the embodiments of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0019] 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. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0021] "A and / or B" includes the following three combinations: A only, B only, and a combination of A and B.
[0022] The use of "applies to" or "configured to" in this application implies open and inclusive language, which does not exclude the applicability to or configuration to devices performing additional tasks or steps. Additionally, the use of "according to" implies openness and inclusiveness, because processes, steps, calculations, or other actions "according to" one or more of the stated conditions or values may in practice be based on additional conditions or values beyond those stated.
[0023] In this application, the term "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is provided to enable any person skilled in the art to make and use this application. Details are set forth in the following description for purposes of explanation. It should be understood that those skilled in the art will recognize that this application can be made without using these specific details. In other instances, well-known structures and processes are not described in detail to avoid obscuring the description of this application with unnecessary detail. Therefore, this application is not intended to be limited to the embodiments shown, but is consistent with the broadest scope of the principles and features disclosed in this application.
[0024] First, in order to facilitate understanding of the implementation schemes provided in the embodiments of this application, the background technology involved in the management method of IoT devices and IoT system provided in the embodiments of this application will be further explained.
[0025] In IoT systems, a "thing model" is a data model that digitally abstracts and describes physical IoT devices. It typically includes device attributes (such as voltage, current, and power), events (such as overload alarms and power failure notifications), and service functional definitions (such as remote switching and parameter settings). The thing model allows upper-layer applications to process similar devices according to a unified logic, without having to develop separate adaptation code for each device.
[0026] In related technologies, the management and synchronization of object models mainly involve the following solutions.
[0027] Option 1: Predefined object models on the IoT platform, passive device adaptation. Specifically, this method involves manual configuration on the IoT platform. Object models are first created in the cloud for different types of devices. Then, after the IoT devices connect, they report data according to the cloud-defined models. This method is inefficient and results in strong coupling between the devices and the platform.
[0028] Option 2: Automatic identification based on meta-models. Specifically, firstly, a device meta-model database (including device manufacturer meta-models and device attribute information meta-models) is built on the platform side. Then, when a device connects, the platform parses the device feature data and matches it with the meta-models to generate the corresponding object model. In this option, both the matching logic and model generation are completed on the platform side; the device itself does not possess self-descriptive capabilities for object models.
[0029] Option 3: Dynamic combination based on capability components. Specifically, firstly, when a device goes online, it declares a capability list (including capability unit identifiers) to the platform. Then, the platform retrieves the corresponding capability units from the capability repository and dynamically combines them to generate the target object model.
[0030] In summary, the current method of managing object models for IoT devices has the following problems: 1. The generation and matching of object models both rely on the platform side. Whether it is meta-model matching or capability component combination, the platform side needs to maintain a huge model library / capability repository, which results in a heavy processing burden on the IoT platform and limited scalability when the number of device types increases massively.
[0031] 2. The device side lacks initiative and is in a passive position of being "identified" and "matched". The device itself does not carry a complete object model definition, which makes the device access process highly dependent on the processing capabilities of the platform side.
[0032] 3. The synchronization direction of the object model is "top-down", following the path of "platform definition → device adaptation" or "platform matching → device distribution". The authoritative source of the object model is always the IoT platform, which is not conducive to edge autonomy and offline scenario support.
[0033] 4. Separation of device authentication and model matching: The authentication of IoT devices (such as device certificates and keys) and the matching of the object model are two independent processes, which increases the complexity and latency of the IoT device access process.
[0034] Therefore, this application provides a management method and system for IoT devices. First, object model definition data is pre-stored in the local memory of the IoT device. Then, during IoT device registration, a registration request including the object model identifier corresponding to the object model definition data is sent to the IoT platform or IoT gateway. The IoT platform or IoT gateway parses the registration request to obtain the object model identifier. If the object model identifier is not found in the corresponding database, the complete object model definition data is retrieved from the IoT device for verification, thus completing the object model registration of the IoT device. Finally, after the IoT platform completes the object model registration, the IoT platform or IoT gateway only needs to send a synchronization success response to the IoT device, and the IoT device can then report business data based on its own object model definition data. In this way, by giving IoT devices complete object model self-description capabilities, the definition and storage of object models can be completely decentralized to the device side. This eliminates the need for the IoT platform to pre-maintain model libraries / capability repositories for various IoT devices and to execute complex object model generation logic, thereby reducing the processing burden of the IoT platform. Furthermore, by endowing IoT devices with complete self-description capabilities of object models, the device can transform from a passive "being identified" role to an active "self-declaration" role, thereby solving the problems of device lack of initiative and the access process being highly dependent on the IoT platform.
[0035] Furthermore, in this application, the synchronization direction of the object model is "bottom-up," with on-demand synchronization initiated by the IoT device. When the IoT device connects for the first time or when the IoT device's object model identifier token is not matched, the device actively uploads the complete object model definition data to the IoT platform and / or IoT gateway. This allows the platform to passively receive, verify, and store the data, eliminating the need to maintain a large model library in advance. Simultaneously, it enables the "self-growth" of the object model from the device to the platform, avoiding scalability limitations when the number of device types increases dramatically. Moreover, by constructing a bottom-up synchronization path from device to platform, the authoritative source of the object model is migrated from the cloud to the device, resolving the issues of missing edge autonomy capabilities and insufficient offline scenario support caused by misaligned synchronization directions.
[0036] Finally, this application employs a hash algorithm to generate a unique object model identifier (Token) from the object model definition data. This Token serves as a lightweight index for the object model, enabling a lightweight model matching mechanism based on the Token. When an IoT device connects, it only needs to report the Token, allowing the IoT platform and / or IoT gateway to complete model matching through a simple key-value query, eliminating the need for complex meta-model reasoning, capability combination, or semantic parsing. Furthermore, integrating the object model identifier Token into the IoT device registration request combines the model registration and device authentication processes, reducing the complexity and latency of the IoT device access process caused by the separation of device identity authentication and object model matching.
[0037] Next, the IoT system involved in the IoT device management method provided in the embodiments of this application will be described.
[0038] Firstly, such as Figure 1 As shown, this application provides an Internet of Things (IoT) system, which may include an IoT platform. The IoT platform is communicatively connected to at least one IoT device to implement the IoT device management method of any of the embodiments below. In this embodiment, the IoT device can be a terminal device with sensing, data collection, and data transmission capabilities, and capable of receiving instructions from the IoT platform to execute corresponding operations. For example, the IoT device can be a smart switch, relay, smart meter, etc. The IoT platform is the core control unit of the IoT system, responsible for communicating with various IoT devices and executing IoT device management methods, enabling functions such as device access, data management, instruction issuance, and operation and maintenance control. IoT devices 1 to N are all directly communicatively connected to the IoT platform; N is a positive integer greater than or equal to 1. The IoT device may include a local memory and a communication module, where the local memory is non-volatile memory.
[0039] In other embodiments, such as Figure 2 As shown, an IoT system may include an IoT platform and an IoT gateway. The IoT platform communicates with at least one IoT device through the IoT gateway, which is used to implement the IoT device management method of any of the embodiments below. Unlike the above embodiments, in this embodiment, the IoT device can communicate indirectly with the IoT platform through the IoT gateway, which can be an edge gateway or an access node. As another example, the IoT system may simultaneously include IoT devices that communicate directly with the IoT platform and IoT devices that communicate indirectly with the IoT platform through the IoT gateway.
[0040] Secondly, embodiments of this application provide a method for managing IoT devices, applied to an IoT platform, such as... Figure 3 As shown, the management method may include the following steps: S301: When a registration request from an IoT device is received, the registration request is parsed to obtain the IoT device's object model identifier. The object model identifier is generated by the IoT device based on object model definition data stored in its local memory.
[0041] In this embodiment, the local memory of the IoT device can store object model definition data and corresponding object model identifiers (Tokens). An IoT device may include multiple object models and corresponding Tokens. For example, a composite IoT device includes multiple object models and corresponding Tokens. The object model identifiers and object model definition data can be pre-configured and stored in the local memory during the initialization phase before the IoT device leaves the factory or is deployed. This pre-configuration process is as follows: generate corresponding object model definition data according to the device type and functional specifications; then, perform a hash operation on the object model definition data to obtain the corresponding Token; finally, write the object model definition data and the corresponding Token into the local memory and establish a mapping relationship between the object model definition data and the Token. The object model definition data may include device attribute definitions, event definitions, service definitions, and data format descriptions. For example, for a single-phase smart meter, its object model may include attributes such as "voltage," "current," "active power," and "power factor," events such as "overvoltage alarm," "undervoltage alarm," and "power failure event," and services such as "remote tripping," "remote closing," and "parameter settings." The hash algorithm can be SHA-256. A token can define a fingerprint of a physical object model, obtained by hashing the data, and can be a fixed-length (e.g., 64-bit) fingerprint consisting of all or the first few bits. Alternatively, tokens can be generated in other ways, such as using the device UUID (Universally Unique Identifier) combined with the device type code, as long as the unique correspondence between the token and the physical object model can be guaranteed.
[0042] In practice, after the IoT device is powered on, the communication module can actively read each token from the local storage and report it when initiating a registration request. After receiving the registration request, the IoT platform parses the request to obtain the object model identifier to complete the subsequent object model registration process.
[0043] S302: When the object model identifier does not exist in the object model repository, object model definition data is obtained from the IoT device, and the object model definition data is verified according to the model verification identifier and object model identifier corresponding to the object model definition data. In this embodiment, the IoT platform can maintain an object model repository to store object models of different IoT devices and their corresponding object model identifiers. After the IoT platform parses the object model identifier carried in the registration request, it can determine whether there is an IoT device of the same type that has completed object model registration by querying whether the object model identifier exists in the object model repository. In addition, the IoT platform may also include a synchronization management service. When the IoT platform finds that the object model identifier does not exist in the local object model storage, it means that the IoT device corresponding to the object model identifier has not completed object model registration; the IoT platform can call the synchronization management service to return a model synchronization response to the IoT device, so that the IoT device reads the object model definition data corresponding to the object model identifier from the local storage according to the model synchronization response, encapsulates it into a synchronization data packet in a predefined format, and uploads it to the IoT platform. The model synchronization response may include a synchronization session identifier (sync_session_id) for context association in this synchronization process. In addition, when the IoT platform detects the existence of a device model identifier in the device model repository, it can return a synchronization success response to the IoT device, enabling the IoT device to report business data based on that device model identifier. Furthermore, the IoT platform can also provide a Token verification service. After receiving the synchronization data packet, the IoT platform can parse the packet to obtain the device model identifier and device model definition data. It then calls the Token verification service to obtain a model verification identifier based on the device model definition data and performs consistency verification between the model verification identifier and the device model identifier to verify the device model definition data.
[0044] S303: When the object model definition data passes verification, the object model definition data is stored in the object model repository, and a first mapping relationship is established between the object model identifier and the object model of the IoT device, completing the object model registration of the IoT device. In this embodiment, the IoT platform can also maintain a model registry. After receiving an unregistered object model identifier and the corresponding object model definition data, when the object model definition data passes verification, the IoT platform can store the object model identifier and the corresponding object model definition data in the object model repository, establish a first mapping relationship between the object model identifier and the corresponding object model in the model registry, and complete the object model registration of the IoT device.
[0045] S304: Send a synchronization success response to the IoT device, enabling the IoT device to report business data based on the object model identifier; wherein, the business data includes the object model identifier and business measurement point data. In this embodiment, after the IoT platform completes the object model registration of the IoT device, it can return a synchronization success response to the IoT device, enabling the IoT device to report business data based on the object model identifier. The business measurement point data can be various operating parameters and status data collected by the device based on its own operating status.
[0046] S305: Receive and parse business data to obtain the object model identifier and business measurement point data. Based on the object model identifier, retrieve the object model from the object model repository to store the business measurement point data. In this embodiment, firstly, after completing object model registration, the IoT device can periodically or triggerically report business data to the IoT platform according to its own operating status. Then, after receiving the business data, the IoT platform parses and processes it; after extracting the object model identifier, it uses the object model identifier as a query condition to retrieve the corresponding object model from the object model repository, converting the original business measurement point data into structured data conforming to the object model definition for storage, facilitating subsequent storage, analysis, display, and business application invocation by the IoT platform.
[0047] In some embodiments, in S302, a model synchronization response can first be sent to the IoT device, enabling the IoT device to retrieve the object model definition data from its local memory based on the model synchronization response. The object model definition data and the object model identifier are then packaged into a synchronization data packet, which is returned. The object model identifier is obtained by hashing the object model definition data. Next, the synchronization data packet returned by the IoT device is parsed to obtain the object model definition data and the object model identifier. Then, a hash operation is performed on the object model definition data to obtain a model verification identifier, which is then compared with the object model identifier. Finally, if the model verification identifier and the object model identifier are the same, the object model definition data is deemed to have passed verification. If the model verification identifier and the object model identifier are different, the object model definition data is deemed to have failed verification.
[0048] In this embodiment, the parsing process of business data can select the corresponding parsing rules according to the encapsulation format of the data reported by the device, ensuring accurate extraction of the object model identifier and business measurement point data. The IoT platform can also call the Token verification service, using the same hash algorithm generated by the IoT device to perform a hash operation on the parsed object model definition data to obtain the model verification identifier. The model verification identifier is then compared with the object model identifier to verify the consistency between the object model definition data and the Token. If the consistency verification passes, the object model definition data is deemed to have passed verification. If the consistency verification fails, the object model definition data is deemed to have failed verification, and a model synchronization response is resent to the IoT device to re-acquire the object model definition data until the correct object model definition data corresponding to the object model identifier is obtained. Thus, the accuracy of the first mapping relationship is ensured through consistency verification.
[0049] In some embodiments, in step S305, the corresponding object model can first be obtained from the object model repository based on the object model identifier. Then, the business measurement point data is parsed and mapped based on the object model, converting the business measurement point data into structured data that conforms to the object model definition corresponding to the object model identifier.
[0050] In this embodiment, the business measurement point data is the raw data reported by the device. Its format, unit, and value range may be inconsistent with the requirements defined by the object model. Therefore, it is necessary to perform parsing and mapping processing based on the object model to convert the raw business measurement point data into structured data that conforms to the object model definition.
[0051] Thus, in this embodiment, after the object model of the IoT device is successfully registered, during subsequent data communication, when the IoT device reports business data, it can complete the call of the object model by only carrying the token, without having to repeatedly upload the object model definition data, which can reduce communication overhead.
[0052] In some embodiments, before registering the object model, the management method may first parse the registration request to obtain the device identity information of the IoT device. Then, based on the device identity information, the IoT device is authenticated. Finally, when the IoT device is successfully authenticated, a communication connection is established with the IoT device to connect it to the IoT system.
[0053] In this embodiment, the registration request reported by the IoT device can also carry device identity information for authentication. This device identity information can include basic device identification information (such as MAC address, serial number, etc.). The IoT platform can access a device whitelist and a preset device access permission table to perform multi-level authentication based on the parsed device identity information. After successful authentication of the IoT device, the next step, integrated binding and access process, is initiated, connecting the IoT device to the IoT system. This allows the IoT device to communicate with the IoT platform for data transmission. Thus, this embodiment integrates the token and device identity information into the registration request, combining the IoT device model matching and access process into one.
[0054] In some embodiments, the number of IoT devices can be multiple, and each IoT device can include at least one of the base device before the update and the latest device after the update. The object models of IoT devices in the object model repository include at least one of the base object models corresponding to the base devices and the latest object models corresponding to the latest devices. In this embodiment, when multiple IoT devices of the same type are connected to the IoT system, the IoT devices that have not undergone firmware or function updates are base devices, and the IoT devices that have undergone firmware or function updates are the latest devices. When a latest device exists in the IoT system, the object model definition data in the local memory of the latest device will also be updated. The latest device can report a new token the next time it connects to the IoT system or triggers an update, triggering the IoT platform to complete the registration of the latest object model corresponding to the new token. At this time, the IoT platform can simultaneously store the token and corresponding base object model of this type of IoT device, as well as the new token and corresponding latest object model, in the object model repository to support the coexistence of existing devices and upgraded devices and achieve historical compatibility. Specifically, when the IoT system includes multiple base devices, the object models in the object model repository include the base object models corresponding to multiple base devices. When an IoT system includes multiple latest devices, the object model repository contains the latest object models corresponding to those latest devices. When an IoT system includes basic devices and latest devices, the object model repository contains the basic object models corresponding to the basic devices and the latest object models corresponding to the latest devices.
[0055] Thirdly, embodiments of this application provide a management method for IoT devices, applied to IoT gateways, with reference to... Figure 4 and Figure 5 The management method may include the following steps: S401: When a registration request from an IoT device is received, the registration request is parsed to obtain the IoT device's object model identifier. The object model identifier is generated by the IoT device based on object model definition data stored in its local memory. In this embodiment, when the IoT device indirectly communicates with the IoT platform through an IoT gateway, the IoT gateway acts as the first hop for the IoT device to access the IoT system. The IoT device can send the registration request to the IoT gateway, which then completes model matching, further reducing the processing burden on the IoT platform. Specifically, after the IoT device powers on, the communication module can actively read each token from its local memory and perform a reporting process when initiating a registration request. After receiving the registration request, the IoT gateway parses the request to obtain the object model identifier for the subsequent object model registration process.
[0056] S402: When the object model identifier does not exist in the local model cache and the object model repository, the object model definition data is obtained from the IoT device, and the object model definition data is verified according to the model verification identifier corresponding to the object model definition data and the object model identifier. In this embodiment, a token matching engine and a local model cache can be deployed in the IoT gateway. The token matching engine is used to query whether the object model identifier exists in the local model cache and whether the object model identifier exists in the object model repository of the IoT platform. The local model cache is used to cache the object model identifier and the corresponding object model definition data. After the IoT gateway parses the object model identifier carried in the registration request, it can determine whether there is an IoT device of the same type that has completed object model registration by querying whether the object model identifier exists in the local model cache. When the IoT gateway finds that the object model identifier does not exist in the local model cache, the IoT gateway further calls the token matching engine to query whether the object model identifier exists in the object model repository of the IoT platform. Furthermore, if the IoT gateway finds that neither the object model identifier in its local model cache nor in its object model repository, it indicates that the IoT device corresponding to the object model identifier has not completed object model registration. The IoT gateway can invoke the synchronization management service to return a model synchronization response to the IoT device. This allows the IoT device to read the object model definition data corresponding to the object model identifier from its local storage based on the synchronization response, encapsulate it into a synchronization data packet in a predefined format, and upload it to the IoT gateway. Additionally, the IoT gateway can also provide a token verification service. After receiving the synchronization data packet, the IoT gateway can parse it to obtain the object model identifier and object model definition data. It then invokes the token verification service to obtain a model verification identifier based on the object model definition data and performs consistency verification between the model verification identifier and the object model identifier to verify the object model definition data.
[0057] As another implementation, when a device model identifier exists in the local model cache, a synchronization success response is returned to the IoT device, and the device model with the device model identifier is obtained from the local model cache and sent to the IoT platform, so that the IoT platform completes the device model registration for the IoT device, enabling the IoT device to report business data based on the device model identifier.
[0058] As another implementation, when a device model identifier exists in the device model repository, the device model corresponding to the device model identifier is retrieved from the device model repository. The device model corresponding to the device model identifier is stored in the local model cache library to obtain the second mapping relationship between the device model identifier and the device model of the IoT device, and a synchronization success response is returned to the IoT device so that the IoT device can report business data based on the device model identifier.
[0059] S403: When the object model definition data passes verification, the object model definition data is stored in the local model cache library to obtain the second mapping relationship between the object model identifier and the object model of the IoT device. The object model definition data is then sent to the IoT platform so that the IoT platform stores the object model definition data in the object model repository to obtain the first mapping relationship between the object model identifier and the object model of the IoT device, thus completing the object model registration of the IoT device. In this embodiment, the IoT gateway can also maintain a model cache registry. After receiving an unregistered object model identifier and its corresponding object model definition data, when the object model definition data passes verification, the IoT gateway stores the object model identifier and its corresponding object model definition data in the local model cache library, establishes the second mapping relationship between the object model identifier and its corresponding object model in the model cache registry, and sends the object model definition data to the IoT platform for storage, thus completing the object model registration of the IoT device.
[0060] S404: Receive a synchronization success response from the IoT platform and send the synchronization success response to the IoT device, so that the IoT device can report business data based on the object model identifier. In this embodiment, the IoT platform can return a synchronization success response to the IoT gateway, and the IoT gateway can forward the synchronization success response to the IoT device, enabling the IoT device to report business data based on the object model identifier.
[0061] Therefore, unlike the above-mentioned embodiments where IoT devices directly communicate with the IoT platform, this embodiment, by deploying a token matching engine and a local model cache library on the IoT gateway, can directly complete model matching confirmation at the edge for cached object models, and request complete object model definition data from the IoT device and upload it to the platform for uncached object models, thereby completing the object model registration of the IoT device and further reducing the processing burden of the IoT platform.
[0062] S405: Receive business data and forward it to the IoT platform so that the IoT platform can parse the business data, obtain the object model identifier and business measurement point data, and store the business measurement point data by retrieving the object model from the object model repository according to the object model identifier. In this embodiment, the IoT gateway can forward the received business data to the IoT platform, so that the IoT platform can store the business data received from the IoT gateway according to the business data storage method in the above embodiment.
[0063] As another implementation, in step S405, business data reported by IoT devices can be received first. Then, the business data is sent to the IoT platform, which parses the data to obtain the object model identifier and business measurement point data. Based on the object model identifier, the corresponding object model is retrieved from the object model repository. The business measurement point data is then parsed and mapped based on the object model, converting it into structured data that conforms to the object model definition corresponding to the object model identifier. In this way, the IoT gateway can convert the business data reported by the IoT devices, obtain the corresponding structured data, and forward it to the IoT platform, achieving data conversion at the edge and further reducing the processing burden on the IoT platform.
[0064] In some embodiments, in S402, a model synchronization response can be sent to the IoT device first, enabling the IoT device to retrieve the object model definition data from its local memory based on the model synchronization response. The object model definition data and the object model identifier are then packaged into a synchronization data packet, which is returned. The object model identifier is obtained by hashing the object model definition data. Then, the synchronization data packet returned by the IoT device is parsed to obtain the object model definition data and the object model identifier. Next, a hash operation is performed on the object model definition data to obtain a model verification identifier. Then, the model verification identifier is compared with the object model identifier. Finally, if the model verification identifier and the object model identifier are the same, the object model definition data is deemed to have passed verification. If the model verification identifier and the object model identifier are different, the object model definition data is deemed to have failed verification. In this embodiment, when the IoT device and the IoT platform communicate indirectly through an IoT gateway, the Token verification service can be deployed on the IoT gateway to further reduce the processing burden on the IoT platform. As another embodiment, when the IoT device and the IoT platform communicate indirectly through an IoT gateway, the Token verification service can also be deployed on the IoT platform, with the IoT gateway forwarding the synchronization data packet to the IoT platform for Token verification. The specific implementation of the Token verification service can be referred to the above-mentioned IoT platform-side implementation, and will not be repeated here for the sake of brevity.
[0065] In some embodiments, the number of IoT devices can be multiple, and the IoT devices can include at least one of the base device before the update and the latest device after the update. The object model of the IoT device in the local model cache library includes at least one of the base object model corresponding to the base device and the latest object model corresponding to the latest device. And / or, the object model of the IoT device in the object model repository library includes at least one of the base object model corresponding to the base device and the latest object model corresponding to the latest device. In this embodiment, when the IoT system includes multiple base devices, the object model in the object model repository library includes the base object models corresponding to multiple base devices, and the object model in the local model cache library includes the base object models corresponding to multiple base devices. When the IoT system includes multiple latest devices, the object model in the object model repository library includes the latest object models corresponding to multiple latest devices, and the object model in the local model cache library includes the latest object models corresponding to multiple latest devices. When the IoT system includes both base devices and latest devices, the object model in the object model repository library includes the base object models corresponding to the base devices and the latest object models corresponding to the latest devices, and the object model in the local model cache library includes the base object models corresponding to the base devices and the latest object models corresponding to the latest devices.
[0066] In some embodiments, before registering the IoT device model, the management method may first parse the registration request to obtain the device identity information of the IoT device. Then, based on the device identity information, the IoT device is authenticated. Finally, when the IoT device is successfully authenticated, a communication connection is established between the IoT device and the IoT platform to connect the IoT device to the IoT system. In this embodiment, the IoT gateway may also perform authentication of the IoT device based on the registration request.
[0067] Fourthly, embodiments of this application provide a management method for IoT devices, applied to IoT devices, such as... Figure 5 As shown, the management method may include the following steps: S501: Generate an object model identifier based on the object model definition data. In this embodiment, after the IoT device is powered on, it can retrieve the object model definition data from its local memory, and perform a hash operation on the object model definition data using the hash algorithm described in the above embodiment to obtain the object model identifier.
[0068] S502: Generate a registration request based on the object model identifier. In this embodiment, the IoT device can package the object model identifier into the registration request when initiating it. This allows the IoT gateway or IoT platform to query whether object model registration is required for the IoT device after connecting it to the IoT system based on the IoT identifier in the registration request.
[0069] S503: Send a registration request to the IoT platform so that the IoT platform can parse the registration request to obtain the object model identifier. If the object model identifier does not exist in the object model repository, return a model synchronization response to the IoT device. In this embodiment, after the IoT device actively reports a registration request, if the IoT platform cannot find the object model identifier reported by the IoT device in the object model repository, it indicates that the IoT device has not completed object model registration, and returns a model synchronization response to the IoT device.
[0070] S504: Receive the model synchronization response and report the object model definition data to the IoT platform based on the model synchronization response. This allows the IoT platform to verify the object model definition data using the model verification identifier and object model identifier corresponding to the object model definition data. Afterward, the platform stores the object model definition data in the object model repository, obtaining the first mapping relationship between the object model identifier and the object model of the IoT device. This completes the object model registration of the IoT device, and a synchronization success response is sent to the IoT device. In this embodiment, after receiving the model synchronization response, the IoT device retrieves the object model definition data corresponding to the object model identifier from its local memory, packages it into a synchronization data packet, and sends it to the IoT platform for object model registration. It is understood that the IoT device can communicate directly with the IoT platform or indirectly through an IoT gateway. The method for object model registration between the IoT platform and the IoT gateway can be referred to in the above embodiment; for the sake of brevity, it will not be described in detail here.
[0071] S505: Receive a synchronization success response and report business data to the IoT platform based on the object model identifier. This allows the IoT platform to parse the business data, obtain the object model identifier and business measurement point data, and retrieve the object model from the object model repository to store the business measurement point data based on the object model identifier. In this embodiment, after completing object model registration, it can periodically or triggerically report business data to the IoT platform according to its own operating status. The method for the IoT platform to store business measurement point data can refer to the above embodiment; for the sake of brevity, it will not be described in detail here.
[0072] In some embodiments of this management method, business measurement point data can also be collected based on the object model definition data. As an example, the business measurement point data reported by IoT devices may include all operating parameters and status data collected based on their own operating status. As another example, the business measurement point data reported by IoT devices may only include specific operating parameters and status data corresponding to the device attribute definitions, event definitions, and service definitions in the object model definition data. This can reduce the size of data packets when uploading business data, improve data transmission rate, and reduce the storage burden on the IoT platform.
[0073] Finally, refer to Figure 6 and Figure 7This paper illustrates the management method for IoT devices provided in this application embodiment using a specific example. Taking a smart meter access scenario as an example, a residential community deploys 300 single-phase smart meters of the same model (model: DDZY102-Z). The meters are connected to a concentrator (edge gateway) via an RS-485 bus, and the concentrator is connected to the power IoT platform via 4G / Ethernet. The meter's factory pre-configuration process is as follows: During the production process, the meter manufacturer generates a property model definition data for the DDZY102-Z model meter. This property model defines the following attributes: defined events include overvoltage alarm (over_voltage_alarm), undervoltage alarm (under_voltage_alarm), and power loss event (power_loss); defined services include remote switching on (switch_on), remote switching off (switch_off), and parameter settings (set_params). After serializing the above object model definition data into JSON, the hash value is calculated using the SHA-256 algorithm. The first 64 hexadecimal bits are taken as the object model identifier token, for example: "a3f7c2d9e1b45678". The complete object model JSON data and the token are written together into the flash memory of the electricity meter. After the electricity meters are powered on and connected, and after all 300 electricity meters are installed and powered on, the electricity meters send a registration request to the concentrator via the RS-485 bus. Taking the first electricity meter (serial number: EM001) as an example, its registration request includes the device ID, device model, object model token, and firmware version. After receiving the registration request, the concentrator extracts the token "a3f7c2d9e1b45678" and queries the local object model cache. Since this is the first time this model of electricity meter has been connected, there is no record corresponding to this token in the local object model cache, nor is there a corresponding record on the IoT platform. The concentrator returns a model synchronization response to the meter, which includes the sync_session_id "SYNC_20260521_001". Upon receiving the model synchronization response, meter EM001 reads the complete object model JSON data corresponding to the token "a3f7c2d9e1b45678" from its Flash memory, encapsulates it into a synchronization data packet, and uploads it to the concentrator. After receiving the object model data, the concentrator performs a SHA-256 hash calculation on the JSON data, takes the first 64 bits, and compares them with the token "a3f7c2d9e1b45678". If the comparison is successful, the concentrator stores the object model data in its local object model cache, establishing a second mapping relationship between token and object model. It also synchronizes and uploads the object model definition data to the IoT platform, where it is stored in the object model repository. The platform returns a synchronization success response to meter EM001. After the remaining 299 meters are powered on, each sends a registration request containing the same token "a3f7c2d9e1b45678".The concentrator finds the token already exists in the local object model cache and directly returns a successful match response without triggering model synchronization again. The connection time for each device is only the time for token lookup and confirmation, enabling rapid connection of batch devices.
[0074] During subsequent data communication, all meters report data according to the synchronized object model definition. For example, the meters periodically report attribute data such as voltage, current, and power, and actively push alarm events when overvoltage occurs. The platform automatically parses the data based on the object model definition, without requiring additional development for this model of meter.
[0075] In the object model update scenario, when the firmware of the DDZY102-Z meter is upgraded to v2.0.0, adding the "Total Harmonic Voltage Distortion Rate" attribute, the firmware upgrade package for the meter also includes the updated object model definition data and generates a new token "b8c3e2f1a9d04567". After the meter upgrades, it reports the new token "b8c3e2f1a9d04567" upon the next access. The concentrator finds that this token is not registered and triggers the synchronization process. The meter uploads the complete object model definition data of the new version. The platform stores the new object model and establishes a mapping for the new token, while retaining the mapping for the old token to ensure that un-upgraded meters can still operate normally. This allows upgraded devices to report the new token, match the new object model, and report the "Total Harmonic Voltage Distortion Rate" attribute. Un-upgraded existing devices still report the old token, match the old object model, and only report the original attributes.
[0076] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0077] The above provides a detailed description of a management method and system for IoT devices provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for managing Internet of Things (IoT) devices, characterized in that, Applied to an Internet of Things (IoT) platform, the IoT platform including a repository of object models, the management method includes: When a registration request from an IoT device is received, the registration request is parsed to obtain the object model identifier of the IoT device; wherein, the object model identifier is generated by the IoT device based on object model definition data stored in its local memory; When the object model identifier does not exist in the object model repository, the object model definition data is obtained from the IoT device, and the object model definition data is verified according to the model verification identifier corresponding to the object model definition data and the object model identifier. When the object model definition data passes verification, the object model definition data is stored in the object model repository to obtain the first mapping relationship between the object model identifier and the object model of the IoT device, thus completing the object model registration of the IoT device. A synchronization success response is sent to the IoT device so that the IoT device can report service data based on the object model identifier; wherein, the service data includes the object model identifier and service measurement point data; The system receives and parses the business data to obtain the object model identifier and the business measurement point data. Based on the object model identifier, it retrieves the object model from the object model repository and stores the business measurement point data.
2. The management method according to claim 1, characterized in that, The step of obtaining the object model definition data from the IoT device and verifying the object model definition data according to the model verification identifier corresponding to the object model definition data and the object model identifier includes: A model synchronization response is sent to the IoT device, so that the IoT device can retrieve the object model definition data from the local memory according to the model synchronization response, package the object model definition data and the object model identifier into a synchronization data packet, and return the synchronization data packet; wherein, the object model identifier is obtained by performing a hash operation on the object model definition data; Parse the synchronization data packet returned by the IoT device to obtain the object model definition data and the object model identifier; Perform a hash operation on the object model definition data to obtain a model verification identifier; Compare the model verification identifier with the object model identifier; When the model verification identifier is the same as the object model identifier, the object model definition data is determined to have passed verification. When the model verification identifier is different from the object model identifier, it is determined that the object model definition data has failed verification.
3. The management method according to claim 1, characterized in that, The step of retrieving the object model from the object model repository based on the object model identifier and storing the business measurement point data includes: Based on the object model identifier, retrieve the corresponding object model from the object model repository; Based on the object model, the business measurement point data is parsed and mapped, and the business measurement point data is converted into structured data that conforms to the definition of the object model for storage.
4. The management method according to claim 1, characterized in that, Before parsing the registration request to obtain the object model identifier of the IoT device, the management method further includes: The device identity information of the IoT device is obtained by parsing the registration request; The IoT device is authenticated based on the device identity information; When the IoT device is authenticated, a communication connection is established with the IoT device to connect the IoT device to the IoT system.
5. A method for managing Internet of Things (IoT) devices, characterized in that, Applied to an IoT gateway, the IoT gateway is used to establish a communication connection between IoT devices and an IoT platform. The IoT gateway includes a local model cache library, and the IoT platform includes a device model repository. The management method includes: When a registration request from the IoT device is received, the registration request is parsed to obtain the object model identifier of the IoT device; wherein, the object model identifier is generated by the IoT device based on object model definition data stored in its local memory; When the object model identifier does not exist in the local model cache library and the object model identifier does not exist in the object model repository library, the object model definition data is obtained from the IoT device, and the object model definition data is verified according to the model verification identifier corresponding to the object model definition data and the object model identifier. When the object model definition data passes verification, the object model definition data is stored in the local model cache library to obtain a second mapping relationship between the object model identifier and the object model of the IoT device. The object model definition data is then sent to the IoT platform so that the IoT platform stores the object model definition data in the object model repository to obtain a first mapping relationship between the object model identifier and the object model of the IoT device, thus completing the object model registration of the IoT device. The system receives a synchronization success response from the IoT platform and sends the synchronization success response to the IoT device, so that the IoT device can report business data based on the object model identifier; wherein, the business data includes the object model identifier and business measurement point data; The system receives the business data and forwards it to the IoT platform, so that the IoT platform can parse the business data to obtain the object model identifier and the business measurement point data, and retrieve the object model from the object model repository according to the object model identifier to store the business measurement point data.
6. The management method according to claim 5, characterized in that, The step of obtaining the object model definition data from the IoT device and verifying the object model definition data according to the model verification identifier corresponding to the object model definition data and the object model identifier includes: A model synchronization response is sent to the IoT device, so that the IoT device can retrieve the object model definition data from the local memory according to the model synchronization response, package the object model definition data and the object model identifier into a synchronization data packet, and return the synchronization data packet; wherein, the object model identifier is obtained by performing a hash operation on the object model definition data; Parse the synchronization data packets returned by the IoT device to obtain the object model definition data and the object model identifier; Perform a hash operation on the object model definition data to obtain a model verification identifier; Compare the model verification identifier with the object model identifier; When the model verification identifier is the same as the object model identifier, the object model definition data is determined to have passed verification. When the model verification identifier is different from the object model identifier, it is determined that the object model definition data has failed verification.
7. The management method according to claim 5, characterized in that, The number of IoT devices is multiple, and the IoT devices include at least one of the basic devices before the update and the latest updated devices; The object model of the IoT device in the local model cache library includes at least one of the basic object model corresponding to the basic device and the latest object model corresponding to the latest device. And / or, The object models of the IoT devices in the object model repository include at least one of the basic object models corresponding to the basic devices and the latest object models corresponding to the latest devices.
8. A method for managing Internet of Things (IoT) devices, characterized in that, Applied to the aforementioned IoT device, the IoT device's local memory stores the IoT device's object model definition data, the IoT device is communicatively connected to an IoT platform, the IoT platform includes an object model repository, and the management method includes: Generate an object model identifier based on the object model definition data; A registration request is generated based on the object model identifier; The registration request is sent to the IoT platform so that the IoT platform can parse the registration request to obtain the object model identifier, and when the object model identifier does not exist in the object model repository, a model synchronization response is returned to the IoT device. The system receives the model synchronization response and reports the object model definition data to the IoT platform based on the model synchronization response. The IoT platform then verifies the object model definition data based on the model verification identifier and the object model identifier corresponding to the object model definition data, stores the object model definition data in the object model repository, obtains the first mapping relationship between the object model identifier and the object model of the IoT device, completes the object model registration of the IoT device, and sends a synchronization success response to the IoT device. The system receives the synchronization success response and reports business data to the IoT platform based on the object model identifier, so that the IoT platform can parse the business data to obtain the object model identifier and business measurement point data, and retrieve the object model from the object model repository based on the object model identifier to store the business measurement point data.
9. The management method according to claim 8, characterized in that, Also includes: Based on the object model definition data, collect the business measurement point data.
10. An Internet of Things (IoT) system, characterized in that, Including IoT platforms; The IoT platform is communicatively connected to at least one IoT device to implement the IoT device management method as described in any one of claims 1-4; or, The IoT platform communicates with at least one of the IoT devices through an IoT gateway, which is used to implement the management method for the IoT devices as described in any one of claims 5-7.