Iot device management method and apparatus, and electronic device
By designing an aggregation model and generating an aggregation device shadow structure at the IoT platform layer, the problem of complex IoT device management logic is solved, and efficient device data management and querying are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIAXUN FEIHONG (BEIJING) INTELLIGENT TECH RES INST CO LTD
- Filing Date
- 2023-09-04
- Publication Date
- 2026-06-05
AI Technical Summary
Existing IoT device management methods cannot uniformly manage various component devices and aggregation relationships, resulting in complex management logic, difficulty in meeting the needs of massive data access, storage and real-time query, and low management efficiency.
By designing an aggregation model, IoT devices are aggregated at the platform layer to generate an aggregated device shadow structure, which unifies the management of device identifiers and aggregation relationships. A two-level index combined with runtime data storage is used to achieve efficient management of device data.
It improves the efficiency of IoT device management, simplifies management logic, and enhances storage and query efficiency in scenarios with massive amounts of data.
Smart Images

Figure CN117171167B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet of Things (IoT) technology, and in particular to an IoT device management method, apparatus, and electronic device. Background Technology
[0002] In practical IoT applications, it's necessary to handle situations where multiple different types of IoT devices are physically and logically related. In such cases, these devices need to be managed logically as a single entity, with the overall state of the device being the collection of all device states. The primary type of device relationship is aggregation, where each device in an aggregation has an independent lifecycle. Individual devices can exist independently of the whole; they can be created before the whole is created or destroyed after the whole is destroyed.
[0003] However, the management of aggregation relationships is generally designed for specific component devices and their aggregation relationships in IoT application systems. There is no unified management method for various component devices and aggregation relationships. This results in different management schemes and complex management logics for each application system, making it difficult to meet the needs of massive data access, storage and real-time querying, and further leading to low efficiency in the management of existing IoT devices. Summary of the Invention
[0004] The purpose of this invention is to provide an IoT device management method, apparatus, and electronic device to alleviate the problem of complex management logic caused by the need for specific management of specific component devices and their aggregation relationships in various IoT application systems at the application layer, thereby improving the efficiency of IoT device management.
[0005] In a first aspect, embodiments of the present invention provide an Internet of Things (IoT) device management method, comprising: obtaining a device identifier of a device instance corresponding to an IoT component device and a preset aggregation model corresponding to the IoT component device; the aggregation model being used to indicate a device composition structure model corresponding to a preset IoT scenario; generating an aggregated device shadow structure corresponding to the preset aggregation model based on the device identifier and the preset aggregation model; the aggregated device shadow structure being used to indicate a data structure after classifying the device identifier according to the preset aggregation model; and managing the operating data of the IoT component device based on the aggregated device shadow structure.
[0006] In a preferred embodiment of the present invention, before the step of managing data of the IoT component devices according to the above-mentioned aggregated device shadow structure, the method includes: if operating data sent by a first sub-device in the IoT component devices is received, determining a first target device identifier corresponding to the first sub-device from the device identifier based on the operating data; the step of managing data of the IoT component devices according to the above-mentioned aggregated device shadow structure includes: determining a first target aggregated device shadow structure corresponding to the first sub-device from the aggregated device shadow structure based on the first target device identifier and the above-mentioned aggregated device shadow structure; determining first index data of the operating data based on the first target aggregated device shadow structure; and managing the operating data of the first sub-device based on the first index data.
[0007] In a preferred embodiment of the present invention, after the step of determining the first target aggregation device shadow structure corresponding to the sub-device from the aggregation device shadow structure based on the first target device identifier and the aggregation device shadow structure, the method further includes: obtaining device information of other devices besides the first sub-device in the first target aggregation device shadow structure; determining second index data corresponding to the first index data based on the device information of the other devices; and managing the operating data of the first sub-device based on the first index data, including: managing the operating data of the first sub-device based on the first index data and the second index data.
[0008] In a preferred embodiment of the present invention, the step of determining the first target device identifier corresponding to the first sub-device from the device identifiers based on the above-mentioned operating data includes: determining the operating sequence of the first sub-device based on the above-mentioned operating data; and determining the first target device identifier corresponding to the sub-device from the device identifiers based on the above-mentioned operating sequence.
[0009] In a preferred embodiment of the present invention, before the step of determining the operating sequence of the sub-device based on the above operating data, the method further includes storing the above operating data in a preset columnar database.
[0010] In a preferred embodiment of the present invention, the step of managing the operating data of the IoT component devices according to the above-mentioned aggregation device shadow structure further includes: if a data query request is received, determining the model code of the preset aggregation model corresponding to the data query request according to the above-mentioned aggregation device shadow structure; determining index lookup parameters according to the above-mentioned data query request and the above-mentioned model code; searching the above-mentioned first index data and the above-mentioned second index data according to the above-mentioned index lookup parameters, and feeding back the target operating data corresponding to the above-mentioned index lookup parameters through the above-mentioned columnar database.
[0011] In a preferred embodiment of the present invention, after the step of generating the aggregated device shadow structure corresponding to the preset aggregation model based on the device identifier and the preset aggregation model, the method further includes: if a de-aggregation request is received from a second sub-device in the IoT component devices, determining a second target device identifier corresponding to the second sub-device from the device identifier based on the de-aggregation request; unbinding the second target device identifier from the corresponding preset aggregation model to obtain an updated aggregated device shadow structure; and managing the operating data of the IoT component devices based on the aggregated device shadow structure, including: managing the operating data of the IoT component devices based on the updated aggregated device shadow structure.
[0012] In a preferred embodiment of the present invention, before the step of obtaining the preset aggregation model corresponding to the aforementioned IoT component device, the method includes: obtaining the preset aggregation member model corresponding to the aforementioned IoT component device; and determining the preset aggregation model corresponding to the aforementioned IoT component device based on the preset aggregation member model.
[0013] Secondly, embodiments of the present invention provide an Internet of Things (IoT) device management method, comprising: a data acquisition module, configured to acquire device identifiers of device instances corresponding to IoT component devices and preset aggregation models corresponding to the IoT component devices; the aggregation models are used to indicate device composition structure models corresponding to preset IoT scenarios; a structure determination module, configured to generate aggregated device shadow structures corresponding to the preset aggregation models based on the device identifiers and the preset aggregation models; the aggregated device shadow structures are used to indicate data structures after classifying the device identifiers according to the preset aggregation models; and a data management module, configured to manage the operating data of the IoT component devices based on the aggregated device shadow structures.
[0014] Thirdly, the present invention provides an electronic device including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement any of the first to seventh possible embodiments of the Internet of Things device management method described above.
[0015] The present invention has the following beneficial technical effects:
[0016] This invention provides an IoT device management method, apparatus, and electronic device, comprising: obtaining device identifiers of device instances corresponding to IoT component devices and a preset aggregation model corresponding to the IoT component devices; the aggregation model indicating a device composition structure model corresponding to a preset IoT scenario; generating an aggregated device shadow structure corresponding to the preset aggregation model based on the device identifiers and the preset aggregation model; the aggregated device shadow structure indicating a data structure after classifying the device identifiers according to the preset aggregation model; and managing the operational data of the IoT component devices based on the aggregated device shadow structure. This method, by designing an aggregation model, aggregates IoT devices at the platform layer, alleviating the problem of complex management logic caused by the need for specific management of specific component devices and their aggregation relationships by various IoT application systems at the application layer, thereby improving the efficiency of IoT device management.
[0017] Other features and advantages disclosed in this embodiment will be set forth in the following description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing the techniques described above.
[0018] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0019] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating an IoT device management method provided in an embodiment of the present invention;
[0021] Figure 2 A flowchart illustrating another IoT device management method provided in an embodiment of the present invention;
[0022] Figure 3 This is a schematic diagram of the structure of an Internet of Things (IoT) device management device provided in an embodiment of the present invention;
[0023] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.
[0024] Icons: 31-Data acquisition module; 32-Structure determination module; 33-Data management module; 41-Memory; 42-Processor; 43-Bus; 44-Communication interface. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0026] In practical IoT applications, it's necessary to handle situations where multiple different types of IoT devices are physically and logically related. In such cases, these devices need to be managed logically as a single entity, with the overall state of the device being the collection of all device states. The primary device relationships are aggregation relationships, where each device in an aggregation has an independent lifecycle. Individual devices can exist independently of the whole; they can be created before the whole is created and destroyed after the whole is destroyed. However, the management of aggregation relationships typically involves designing management methods for specific constituent devices and their aggregation relationships at the application layer of the IoT application system. There isn't a unified method for managing all types of constituent devices and various aggregation relationships. This leads to inconsistent management schemes and complex management logic across different application systems, making it difficult to meet the needs of massive data access, storage, and real-time querying, further resulting in low efficiency in current IoT device management.
[0027] Based on this, embodiments of the present invention provide an IoT device management method, apparatus, and electronic device. This technology can alleviate the aforementioned technical problems. The method, by designing an aggregation model, aggregates IoT devices at the platform layer, thereby alleviating the problem of complex management logic caused by the need for specific management of specific component devices and their aggregation relationships by various IoT application systems at the application layer, and thus improving the efficiency of IoT device management. To facilitate understanding of the embodiments of the present invention, a detailed description of an IoT device management method disclosed in the embodiments of the present invention will be provided first.
[0028] Example 1
[0029] Figure 1 This is a flowchart illustrating an IoT device management method provided in an embodiment of the present invention.
[0030] like Figure 1 As seen, the method includes the following steps:
[0031] Step S101: Obtain the device identifier of the device instance corresponding to the IoT component device and the preset aggregation model corresponding to the IoT component device; the above aggregation model is used to indicate the device composition structure model corresponding to the preset IoT scenario.
[0032] In this embodiment, the aforementioned device instance includes: a data representation of a real, existing physical device. This includes the static attributes, status attributes, and configuration information of the physical device's device ID. Furthermore, the aforementioned device identifier is constructed based on the static attributes, status attributes, and configuration information of the aforementioned device ID.
[0033] Step S102: Based on the above device identifier and the above preset aggregation model, generate the aggregated device shadow structure corresponding to the above preset aggregation model; the above aggregated device shadow structure is used to indicate the data structure after classifying the above device identifier according to the above preset aggregation model.
[0034] In this embodiment, the above-mentioned aggregation model includes multiple member models. The identifier corresponding to each member model can reference the device identifier of the device instance corresponding to one or more member models and generate an aggregated device shadow structure.
[0035] Step S103: Based on the above-mentioned aggregated device shadow structure, manage the operating data of the above-mentioned IoT component devices.
[0036] This invention provides an IoT device management method, comprising: obtaining device identifiers of device instances corresponding to IoT component devices and a preset aggregation model corresponding to the IoT component devices; the aggregation model indicating a device composition structure model corresponding to a preset IoT scenario; generating an aggregated device shadow structure corresponding to the preset aggregation model based on the device identifiers and the preset aggregation model; the aggregated device shadow structure indicating a data structure after classifying the device identifiers according to the preset aggregation model; and managing the operational data of the IoT component devices based on the aggregated device shadow structure. This method, by designing an aggregation model, aggregates IoT devices at the platform layer, alleviating the problem of complex management logic caused by the need for specific management of specific component devices and their aggregation relationships by various IoT application systems at the application layer, thereby improving the efficiency of IoT device management.
[0037] Example 2
[0038] Figure 2 This is a flowchart illustrating another IoT device management method provided in an embodiment of the present invention. Figure 2 As seen, the method includes the following steps:
[0039] Step S201: Obtain the device identifier of the device instance corresponding to the IoT component device and the preset aggregation model corresponding to the IoT component device; the above aggregation model is used to indicate the device composition structure model corresponding to the preset IoT scenario.
[0040] Here, before the step of obtaining the preset aggregation model corresponding to the aforementioned IoT component device, the above method includes: obtaining the preset aggregation member model corresponding to the aforementioned IoT component device; and determining the preset aggregation model corresponding to the aforementioned IoT component device based on the aforementioned preset aggregation member model.
[0041] Step S202: Based on the above device identifier and the above preset aggregation model, generate the aggregated device shadow structure corresponding to the above preset aggregation model; the above aggregated device shadow structure is used to indicate the data structure after classifying the above device identifier according to the above preset aggregation model.
[0042] Step S203: If the operation data sent by the first sub-device in the above-mentioned IoT component devices is received, determine the first target device identifier corresponding to the first sub-device from the above-mentioned device identifiers based on the operation data.
[0043] In this embodiment, the step of determining the first target device identifier corresponding to the first sub-device from the device identifiers based on the above-mentioned operating data includes: determining the operating sequence of the first sub-device based on the above-mentioned operating data; and determining the first target device identifier corresponding to the sub-device from the device identifiers based on the above-mentioned operating sequence.
[0044] In actual operation, before determining the operating sequence of the sub-device based on the above operating data, the method further includes storing the above operating data in a preset columnar database.
[0045] Step S204: Based on the first target device identifier and the aggregation device shadow structure, determine the first target aggregation device shadow structure corresponding to the first sub-device from the aggregation device shadow structure.
[0046] Step S205: Determine the first index data of the above-mentioned operating data based on the shadow structure of the first target aggregation device.
[0047] In this embodiment, after step S205, the method further includes: storing the first index data.
[0048] Step S206: Manage the operating data of the first sub-device based on the first index data.
[0049] In one embodiment, after the step of determining the first target aggregation device shadow structure corresponding to the sub-device from the aggregation device shadow structure based on the first target device identifier and the aggregation device shadow structure, the method further includes the following steps A1 to A2:
[0050] Step A1: Obtain the device information of other devices in the shadow structure of the first target aggregation device, excluding the first sub-device.
[0051] Step A2: Based on the device information of the other devices mentioned above, determine the second index data corresponding to the first index data.
[0052] Furthermore, step S205 includes: managing the operating data of the first sub-device based on the first index data and the second index data.
[0053] Here, this invention utilizes a storage method based on a secondary index combined with operational data. During data reporting, a secondary index corresponding to the actual device is created, logically mapping the operational data of IoT devices to the time-series data stream of the device instance. Therefore, each device instance essentially possesses its own time-series data stream. In terms of storage operation complexity, only one additional index storage operation is added, and this operation can run in parallel with the original data storage logic, ensuring storage efficiency even in scenarios with massive connections and massive data volumes.
[0054] In one embodiment, the step of managing the operating data of the IoT component devices based on the aggregation device shadow structure further includes: if a data query request is received, determining the model code of the preset aggregation model corresponding to the data query request based on the aggregation device shadow structure; determining index lookup parameters based on the data query request and the model code; searching the first index data and the second index data based on the index lookup parameters, and feeding back the target operating data corresponding to the index lookup parameters through the columnar database.
[0055] In one embodiment, after the step of generating the aggregated device shadow structure corresponding to the preset aggregation model based on the device identifier and the preset aggregation model, the method further includes: if a de-aggregation request is received from a second sub-device in the IoT component devices, determining a second target device identifier corresponding to the second sub-device from the device identifier based on the de-aggregation request; unbinding the second target device identifier from the corresponding preset aggregation model to obtain an updated aggregated device shadow structure; and managing the operating data of the IoT component devices based on the aggregated device shadow structure, including: managing the operating data of the IoT component devices based on the updated aggregated device shadow structure.
[0056] Here, after unbinding the second target device identifier from the corresponding preset aggregation model to obtain the updated aggregation device shadow structure, the method further includes: obtaining the new device identifier of the newly added device instance and the corresponding model aggregation request; generating the new aggregation device shadow structure corresponding to the preset aggregation model based on the new device identifier and the preset aggregation model; and managing the operation data of the IoT component devices based on the new aggregation device shadow structure.
[0057] For ease of understanding, the embodiments of the present invention provide the following examples:
[0058] Assuming the transport vehicle is equipped with an onboard positioning terminal, during container transportation, the container and multiple transport vehicles establish aggregation relationships. First, device instances for the container and vehicles are created. After the vehicles report their location data, this data is combined with the aggregation model to create an index establishing the aggregation relationship between the container and the location data. Logically, time-series data regarding the container's location status is simulated. Finally, access to the container's location or trajectory data is implemented using the container ID and the aggregation model ID.
[0059] The specific steps in the above case include:
[0060] 1. Create a container model and a vehicle model, and then create an aggregated equipment model with the container model and vehicle model as member models.
[0061] 2. Create container equipment instances corresponding to physical containers and vehicle equipment instances corresponding to physical vehicles.
[0062] 3. Connect all vehicle equipment to the IoT platform and report location data.
[0063] 4. During transportation, containers and vehicles are aggregated. Aggregated device instances are created on the IoT platform using container device instances and vehicle device instances as member devices.
[0064] 5. The IoT platform stores the data reported by the vehicle devices and creates an aggregated device index for each data entry based on the aggregation model and the definition of the aggregated device.
[0065] 6. When a container is transferred between vehicles in the diagram, first remove the previous aggregation relationship and then establish an aggregation relationship between the container and the new vehicle. Delete the old aggregation device instance on the IoT platform and create a new aggregation device instance.
[0066] 7. The IoT platform generates an aggregated device index for each piece of data by combining the location data reported by the replaced device with the aggregated device model and the newly created aggregated device.
[0067] 8. IoT applications access the location and trajectory information of containers throughout the transportation process through container IDs and combined equipment model IDs.
[0068] This invention provides an IoT device management method, comprising: obtaining a device identifier for a device instance corresponding to an IoT component device and a preset aggregation model corresponding to the IoT component device; the aggregation model indicating a device composition structure model corresponding to a preset IoT scenario; generating an aggregated device shadow structure corresponding to the preset aggregation model based on the device identifier and the preset aggregation model; if receiving running data sent by a first sub-device in the IoT component device, determining a first target device identifier corresponding to the first sub-device from the device identifier based on the running data; determining a first target aggregated device shadow structure corresponding to the first sub-device from the aggregated device shadow structure based on the first target device identifier and the aggregated device shadow structure; determining first index data of the running data based on the first target aggregated device shadow structure; and managing the running data of the first sub-device based on the first index data. This method, by designing an aggregation model, aggregates IoT devices at the platform layer to form an aggregated device shadow structure, thereby managing the running data of sub-devices in the IoT component device based on this aggregated device shadow structure. This alleviates the problem of complex management logic caused by the need for specific management of specific component devices and their aggregation relationships by various IoT application systems at the application layer, further improving the efficiency of IoT device management.
[0069] Example 3
[0070] Figure 3 This is a schematic diagram of the structure of an Internet of Things (IoT) device management device provided in an embodiment of the present invention.
[0071] like Figure 3 As seen, the device includes:
[0072] The data acquisition module 31 is used to acquire the device identifier of the device instance corresponding to the IoT component device and the preset aggregation model corresponding to the IoT component device; the above-mentioned aggregation model is used to indicate the device composition structure model corresponding to the preset IoT scenario.
[0073] The structure determination module 32 is used to generate an aggregated device shadow structure corresponding to the preset aggregation model based on the device identifier and the preset aggregation model. The aggregated device shadow structure is used to indicate the data structure after classifying the device identifier according to the preset aggregation model.
[0074] The data management module 33 is used to manage the operating data of the IoT component devices according to the above-mentioned aggregated device shadow structure.
[0075] The data acquisition module 31, the structure determination module 32, and the data management module 33 are connected in sequence.
[0076] In one embodiment, the data management module 33 is further configured to, if it receives operating data sent by a first sub-device in the IoT component devices, determine a first target device identifier corresponding to the first sub-device from the device identifier based on the operating data; and manage the data of the IoT component devices according to the aggregated device shadow structure, including: determining a first target aggregated device shadow structure corresponding to the first sub-device from the aggregated device shadow structure based on the first target device identifier and the aggregated device shadow structure; determining first index data of the operating data based on the first target aggregated device shadow structure; and managing the operating data of the first sub-device based on the first index data.
[0077] In one embodiment, the data management module 33 is further configured to obtain device information of other devices in the first target aggregation device shadow structure besides the first sub-device; determine the second index data corresponding to the first index data based on the device information of the other devices; and manage the operating data of the first sub-device based on the first index data, including: managing the operating data of the first sub-device based on the first index data and the second index data.
[0078] In one embodiment, the data management module 33 is further configured to determine the runtime sequence of the first sub-device based on the runtime data; and to determine the first target device identifier corresponding to the sub-device from the device identifiers based on the runtime sequence.
[0079] In one embodiment, the data management module 33 is further configured to store the aforementioned running data in a preset columnar database.
[0080] In one embodiment, the data management module 33 is further configured to, upon receiving a data query request, determine the model code of the preset aggregation model corresponding to the data query request based on the aggregation device shadow structure; determine index lookup parameters based on the data query request and the model code; search for the first index data and the second index data based on the index lookup parameters; and return the target running data corresponding to the index lookup parameters through the columnar database.
[0081] In one embodiment, the data management module 33 is further configured to, upon receiving a de-aggregation request from a second sub-device in the IoT component devices, determine a second target device identifier corresponding to the second sub-device from the device identifiers according to the de-aggregation request; unbind the second target device identifier from the corresponding preset aggregation model to obtain an updated aggregation device shadow structure; and manage the operating data of the IoT component devices according to the aggregation device shadow structure, comprising: managing the operating data of the IoT component devices according to the updated aggregation device shadow structure.
[0082] In one embodiment, the data acquisition module 31 is further configured to acquire a preset aggregate member model corresponding to the IoT component device; and, based on the preset aggregate member model, confirm the preset aggregate model corresponding to the IoT component device.
[0083] The IoT device management apparatus provided in this embodiment of the invention has the same technical features as the IoT device management method provided in the above embodiments, and therefore can solve the same technical problems and achieve the same technical effects. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0084] Example 4
[0085] This embodiment provides an electronic device, including a processor and a memory. The memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of an Internet of Things (IoT) device management method.
[0086] See Figure 4 The diagram shows the structure of an electronic device, which includes a memory 42 and a processor 41. The memory stores a computer program that can run on the processor 41. When the processor executes the computer program, it implements the steps provided by the above-mentioned Internet of Things device management method.
[0087] like Figure 4 As shown, the device also includes a bus 43 and a communication interface 44, with the processor 41, the communication interface 44 and the memory 42 connected via the bus 43; the processor 41 is used to execute executable modules, such as computer programs, stored in the memory 42.
[0088] The memory 42 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 44 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.
[0089] Bus 43 can be an ISA bus, PCI bus, or EISA bus, etc. Buses can be divided into address buses, data buses, control buses, etc. For ease of representation, Figure 4 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0090] The memory 42 stores the program, and the processor 41 executes the program after receiving the execution instruction. The method executed by the IoT device management device disclosed in any of the foregoing embodiments of the present invention can be applied to the processor 41, or implemented by the processor 41. The processor 41 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor 41 or by instructions in the form of software. The processor 41 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this invention can be directly manifested as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 42, and processor 41 reads information from memory 42 and, in conjunction with its hardware, completes the steps of the above method.
Claims
1. A method for managing Internet of Things (IoT) devices, characterized in that, include: Obtain the device identifier of the device instance corresponding to the IoT component device and the preset aggregation model corresponding to the IoT component device; The preset aggregation model is used to indicate the device composition structure model corresponding to the preset Internet of Things scenario; Based on the device identifier and the preset aggregation model, generate the aggregated device shadow structure corresponding to the preset aggregation model; The aggregated device shadow structure is used to indicate the data structure after the device identifiers are classified according to the preset aggregation model; Based on the aggregation device shadow structure, the operating data of the IoT component devices are managed; Prior to the step of managing data for the IoT component devices based on the aggregated device shadow structure, the method includes: If operational data is received from the first sub-device in the IoT component devices, the first target device identifier corresponding to the first sub-device is determined from the device identifier based on the operational data; The steps for managing data of the IoT component devices based on the aggregation device shadow structure include: Based on the first target device identifier and the aggregation device shadow structure, determine the first target aggregation device shadow structure corresponding to the first sub-device from the aggregation device shadow structure; Based on the shadow structure of the first target aggregation device, determine the first index data of the running data; Based on the first index data, the operating data of the first sub-device is managed; After determining the first target aggregation device shadow structure corresponding to the sub-device from the aggregation device shadow structure based on the first target device identifier and the aggregation device shadow structure, the method further includes: Obtain device information for other devices besides the first sub-device in the shadow structure of the first target aggregation device; Based on the device information of the other devices, determine the second index data corresponding to the first index data; The steps for managing the operational data of the first sub-device based on the first index data include: The operating data of the first sub-device is managed based on the first index data and the second index data. When data is reported, a secondary index is created for the actual device corresponding to this data, so that the operating data of IoT devices is logically mapped to the time-series data stream of the device instance.
2. The IoT device management method according to claim 1, characterized in that, The step of determining the first target device identifier corresponding to the first sub-device from the device identifiers based on the operational data includes: Based on the operational data, the operational sequence of the first sub-device is determined; Based on the runtime sequence, the first target device identifier corresponding to the sub-device is determined from the device identifiers.
3. The IoT device management method according to claim 2, characterized in that, Before the step of determining the runtime sequence of the sub-device based on the runtime data, the method further includes: The runtime data is stored in a preset columnar database.
4. The IoT device management method according to claim 3, characterized in that, The step of managing the operational data of the IoT component devices based on the aggregation device shadow structure further includes: If a data query request is received, the model code of the preset aggregation model corresponding to the data query request is determined according to the aggregation device shadow structure; Based on the data query request and the model encoding, determine the index lookup parameters; The first index data and the second index data are searched according to the index lookup parameters, and the target running data corresponding to the index lookup parameters is fed back through the columnar database.
5. The IoT device management method according to claim 1, characterized in that, After the step of generating the aggregated device shadow structure corresponding to the preset aggregated model based on the device identifier and the preset aggregated model, the method further includes: If a de-aggregation request is received from the second sub-device in the IoT component devices, the second target device identifier corresponding to the second sub-device is determined from the device identifier based on the de-aggregation request; The second target device identifier is unbound from the corresponding preset aggregation model to obtain the updated aggregation device shadow structure; The steps for managing the operational data of the IoT component devices based on the aggregated device shadow structure include: Based on the updated aggregated device shadow structure, the operating data of the IoT component devices are managed.
6. The IoT device management method according to claim 1, characterized in that, Before the step of obtaining the preset aggregation model corresponding to the IoT component devices, the method includes: Obtain the preset aggregate member model corresponding to the IoT component devices; Based on the preset aggregation member model, the preset aggregation model corresponding to the IoT component devices is determined.
7. An Internet of Things (IoT) device management device, characterized in that, To implement the Internet of Things (IoT) device management method according to any one of claims 1 to 6, comprising: The data acquisition module is used to acquire the device identifier of the device instance corresponding to the IoT component device and the preset aggregation model corresponding to the IoT component device; the preset aggregation model is used to indicate the device composition structure model corresponding to the preset IoT scenario; The structure determination module is used to generate an aggregated device shadow structure corresponding to the preset aggregation model based on the device identifier and the preset aggregation model; the aggregated device shadow structure is used to indicate the data structure after classifying the device identifier according to the preset aggregation model; The data management module is used to manage the operating data of the IoT component devices according to the aggregation device shadow structure.
8. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing computer-executable instructions that can be executed by the processor, the processor executing the computer-executable instructions to implement the Internet of Things device management method according to any one of claims 1 to 6.