Internet of Things equipment information processing method, device, system and product
By generating super tables of IoT devices in the TDengine timing database and determining operating specifications, the problem of different types of IoT devices in the prior art requires writing different logical codes, and the readability and maintainability of the code are improved.
Patent Information
- Application Number
- CN202510372578.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-06-20
AI Technical Summary
Existing IoT device information processing systems require different logical codes for different types of IoT devices, resulting in a greatly reduced readability and maintainability of the code infrastructure.
By generating super tables of various IoT devices in the TDengine timing database based on the object model reported by multiple types of IoT devices, the super table is determined, the operation specifications of the super table are obtained, the information of the pending IoT device is analyzed, and the processing is completed based on the operation specifications based on the analysis results.
It reduces the development work of processing information reported by IoT devices, improves the readability and maintainability of the code infrastructure, and realizes the unified processing of information of different types of IoT devices.
Smart Images

Figure CN120179653A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of the Internet of Things, and particularly to a method, device, system, and product for processing Internet of Things device information. Background Art
[0002] In the existing Internet of Things device information processing system, it is usually necessary to parse the encapsulated information in a specific format uploaded by each type of Internet of Things device, and only after parsing can the Internet of Things device data be injected into the system as needed. As the types of Internet of Things devices increase, a large amount of development work will be generated for processing the reported information of Internet of Things devices. At the same time, the system needs to use different logical codes for different Internet of Things devices, resulting in a significant reduction in the readability and maintainability of the code infrastructure of the system. Summary of the Invention
[0003] This application provides a method, device, system, and product for processing Internet of Things device information, which reduces the development work for processing the reported information of Internet of Things devices and improves the readability and maintainability of the code infrastructure.
[0004] This application provides a method for processing Internet of Things device information, including: Generating a supertable of each type of the Internet of Things device in the TDengine time series database according to the physical models reported by multiple types of Internet of Things devices, and determining the operation specifications of the supertable; Obtaining the Internet of Things device information to be processed, parsing the Internet of Things device information, and obtaining a parsing result; Processing the Internet of Things device information based on the parsing result according to the operation specifications.
[0005] As an embodiment, generating a supertable of each type of the Internet of Things device in the TDengine time series database according to the physical models reported by multiple types of Internet of Things devices includes: Determining the device type number, attribute dimension data, event dimension data, and service dimension data of the Internet of Things device according to the physical model; Generating a supertable of the Internet of Things device in the TDengine time series database according to the device type number, the attribute dimension data, the event dimension data, and the service dimension data.
[0006] As an embodiment, generating a supertable of the Internet of Things device in the TDengine time series database according to the device type number, the attribute dimension data, the event dimension data, and the service dimension data includes: Construct respective corresponding supertable sub-tables for the attribute dimension data, the event dimension data, and the service dimension data, where the table name of the supertable sub-table is determined based on the device type number and the corresponding dimension string; Map the attribute dimension data, the event dimension data, and the service dimension data to their respective corresponding supertable sub-tables; Use each of the supertable sub-tables as the supertable of the Internet of Things device in the TDengine time series database.
[0007] As an embodiment, after respectively mapping the attribute dimension data, the event dimension data, and the service dimension data to their respective corresponding supertable sub-tables, it further includes: Determine the statistical fields of the supertable according to the basic information of the Internet of Things device included in the device model; Determine the time primary key of the supertable according to the system time.
[0008] As an embodiment, the operation specifications of the TDengine time series database include a sub-table creation rule, a sub-table data addition rule, and a supertable query rule. The sub-table creation rule refers to creating a supertable sub-table according to the data structure of the supertable and the device type number; the sub-table data addition rule refers to mapping the device model to the supertable sub-table for storage according to the device type number; the supertable query rule refers to querying the entire table data of the supertable sub-table according to the device type number, statistical fields, and time primary key.
[0009] As an embodiment, the parsing of the Internet of Things device information to obtain a parsing result includes: Parse the Internet of Things device information, and use the device type, device type number, and data dimension corresponding to the Internet of Things device information as the parsing result.
[0010] This application also provides an Internet of Things device information processing device, including: A preprocessing module, configured to generate a supertable of each type of Internet of Things device in the TDengine time series database according to the device models reported by multiple types of Internet of Things devices, and determine the operation specifications of the supertable; A parsing module, configured to obtain the Internet of Things device information to be processed, and parse the Internet of Things device information to obtain a parsing result; A processing module, configured to complete the processing of the Internet of Things device information based on the parsing result and the operation specifications.
[0011] The present application also provides an Internet of Things (IoT) device information processing system, including multiple types of IoT devices, a TDengine time series database, and a service platform; The service platform is configured to generate a supertable in the TDengine time series database for each type of IoT device according to the device models reported by multiple types of IoT devices, and determine the operation specifications of the supertable; obtain IoT device information to be processed, parse the IoT device information to obtain a parsing result; and process the IoT device information based on the parsing result and the operation specifications.
[0012] As an embodiment, the service platform is further configured to process the IoT device information stored in the TDengine time series database for any type of IoT device according to the privatized operation specifications of the IoT device.
[0013] The present application also provides a computer program product, including a computer program which, when executed by a processor, implements the IoT device information processing method as described in any one of the above.
[0014] The IoT device information processing method, apparatus, system, and product provided by the present application generate a supertable in the TDengine time series database for each type of IoT device according to the device models reported by multiple types of IoT devices, and determine the operation specifications of the supertable; obtain IoT device information to be processed, parse the IoT device information to obtain a parsing result; and process the IoT device information based on the parsing result and the operation specifications. By constructing a unified supertable and its operation specifications for each type of IoT device, data processing can be automatically performed according to the operation specifications after receiving the IoT device information to be processed, reducing code development work and improving the readability and maintainability of the code infrastructure. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] To more clearly illustrate the technical solutions in the present application or the prior art, the following briefly introduces the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application, and those of ordinary skill in the art can also obtain other drawings based on these drawings without creative efforts.
[0016] Figure 1 It is a flowchart of the IoT device information processing method provided by the present application.
[0017] Figure 2 It is a flowchart of generating a supertable provided by the present application.
[0018] Figure 3It is a schematic diagram of the automatic processing flow of Internet of Things device information provided by this application.
[0019] Figure 4 It is a schematic diagram of the structure of the Internet of Things device information processing device provided by this application.
[0020] Figure 5 It is a schematic diagram of the structure of the Internet of Things device information processing system provided by this application.
[0021] Figure 6 It is a schematic diagram of the structure of the electronic device provided by this application. Specific Embodiments
[0022] To make the objectives, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below with reference to the accompanying drawings in this application. Obviously, the described embodiments are some but not all of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in this application without creative efforts shall fall within the scope of protection of this application.
[0023] It should be noted that all actions of obtaining signals, information or data in this application are carried out on the premise of complying with the corresponding data protection regulations and policies of the location and with the authorization given by the owner of the corresponding device.
[0024] Figure 1 It is a schematic diagram of the flow of the Internet of Things device information processing method provided by this application. As Figure 1 shown, this application provides an Internet of Things device information processing method, including steps S100 - S300.
[0025] In step S100, according to the device models reported by multiple types of Internet of Things devices, a supertable of each type of the Internet of Things devices in the TDengine time series database is generated, and the operation specifications of the supertable are determined.
[0026] This application does not limit the application scenarios and models of Internet of Things devices. Taking OneNET devices as an example for illustration, OneNET devices refer to Internet of Things devices that can access the China Mobile Internet of Things Open Platform. Correspondingly, the Internet of Things device information processing method provided by this application is applicable to the OneNET platform.
[0027] The device model defines the characteristics, states, operations and interrelationships of Internet of Things devices, enabling Internet of Things devices to communicate and cooperate effectively in the network.
[0028] TDengine time series database is an open-source database designed specifically for processing time series data, providing efficient storage and query capabilities in scenarios such as the Internet of Things (IoT), big data analysis, and monitoring applications.
[0029] A super table is a special data structure used to store multiple time series data tables with the same schema. The operation specification of the super table refers to the rules for automatically performing relevant operation processing on the super table mapped by the IoT device in response to the data reported by the IoT device.
[0030] Step S200: Obtain the IoT device information to be processed, and parse the IoT device information to obtain a parsing result.
[0031] Optionally, this application is developed using the Java language and uses the TDengine time series database as the storage medium. Therefore, the IoT device information to be processed obtained is JSON data. By parsing the JSON data, it is determined whether there is a super table corresponding to the IoT device information to be processed and the data dimension of the IoT device information in the TDengine time series database, and a parsing result is obtained.
[0032] Step S300: Based on the parsing result, complete the processing of the IoT device information according to the operation specification.
[0033] If the parsing result indicates that there is a super table corresponding to the IoT device information to be processed in the TDengine time series database and the data dimension of the IoT device information to be processed is determined, then response operations are performed on different super tables according to different dimension data.
[0034] It can be understood that this application uses the TDengine time series database as the medium to store device data, generates the super tables and related operation processes of the TDengine time series database through the general rules of the physical model, realizes the unified storage specification of all IoT device physical models, greatly reduces the development work related to parsing IoT devices, and at the same time, due to the characteristics of the TDengine time series database itself, it can achieve high-performance writing and query of a large amount of data, solving the performance problems existing in the case of storing a large amount of data in MySQL and saving storage resources.
[0035] Based on the above embodiments, as an optional embodiment, generating the super tables of various IoT devices in the TDengine time series database according to the physical models reported by multiple types of IoT devices includes Step S110 - Step S120.
[0036] Step S110: Determine the device type number, attribute dimension data, event dimension data, and service dimension data of the IoT device according to the device model.
[0037] Step S120: Generate a supertable of the IoT device in the TDengine time series database according to the device type number, the attribute dimension data, the event dimension data, and the service dimension data.
[0038] As Figure 2 shown, in Step S110, the device model describes the basic information of the device type and the data information of the three dimensions of the device. The three dimensions are Property, Event, and Service respectively.
[0039] The device type number serves as the unique identifier of the device type in the OneNET system and is mapped to the supertable name in the TDengine supertable.
[0040] The attribute (Property) dimension data describes the status and characteristics of the device. The reporting time and specific reported values of the data to be stored are required, and various processing logics will be performed on this type of data.
[0041] The event (Event) data identifies the data automatically reported by the device to the platform during operation. It is necessary to provide timely feedback to the system on the device to enable the user to perceive the reporting of this type of data as soon as possible.
[0042] The service (Service) data is the operation record of the device. The third-party system pushes input parameters to the device, and then the device returns output parameters. A complete service record consists of two pieces of data.
[0043] By parsing the three-dimensional data of the device model, a supertable for storing the three-dimensional data is established to record the interaction data between the device and the third-party system.
[0044] In Step S120, the generation of the supertable of the IoT device in the TDengine time series database needs to meet the following principles: There are no fields with the same name allowed in the supertable; the supertable can contain all the information of the OneNET device interaction; the supertable itself does not store data, but the subtable depending on the supertable will store the original data of the device and third-party platform interaction, and update operations on this type of data are not allowed. The steps for generating the supertable are described in detail below.
[0045] As an optional embodiment, the generating of the supertable of the IoT device in the TDengine time series database according to the device type number, the attribute dimension data, the event dimension data, and the service dimension data includes Step S121 - Step S123.
[0046] Step S121: Construct respective corresponding supertable sub - tables for the attribute dimension data, the event dimension data, and the service dimension data. The table name of the supertable sub - table is determined based on the device type number and the corresponding dimension string.
[0047] Step S122: Map the attribute dimension data, the event dimension data, and the service dimension data to their respective corresponding supertable sub - tables.
[0048] Step S123: Use each of the supertable sub - tables as the supertable of the IoT device in the TDengine time - series database.
[0049] In step S121, the table name of the supertable uses the device type number (device type id) as the prefix. The data tables of the three different dimensions use different suffix names. The suffix name string for the attribute dimension is "property", the suffix name string for the event dimension is "event", and the suffix name string for the service dimension is "service". The prefix and suffix are connected by "_".
[0050] In step S122, the fields in the device model are mapped to TDengine fields. The fields in the device model are mapped according to the three dimensions. "properties" in the device model is the mapping of attribute fields, "events" is the mapping of event fields, and "services" is the mapping of service fields. The field mapping rules are distinguished by dimension, and the specific rules are as follows.
[0051] "properties": Each object in the "properties" object array in the device model is used as an attribute unit.
[0052] When the "type" attribute value in the "dataType" field of the unit is not "struct" (structure) and "array" (array), take the "identifier" attribute value of the unit as the TDengine field name.
[0053] When the "type" attribute value in the "dataType" field of the unit is "struct" (structure), the unit is not directly mapped to the database. Take the "identifier" attribute value of the unit as the prefix of the TDengine field name. Take the "specs" in the "dataType" attribute value of the unit as a new object array. Each object in the object array is used as an attribute unit for mapping again. Take the "identifier" attribute value of the unit as the suffix of the TDengine field name. The field name is prefix + suffix.
[0054] When the value of the "type" attribute in the "dataType" field of the unit is "array", take the value of the "identifier" attribute of the unit as the prefix of the TDengine field name, and take the "length" in the "dataType" field of the unit as the length to generate length fields. The naming rule for each field is the prefix + the serial number starting from 1 to length.
[0055] "events": Each object in the "events" object array in the device model is used as an attribute unit. The first-level attribute units uniformly have the "outputData" parameter. Take the "identifier" parameter of this unit as the prefix name. The format of the "outputData" parameter in the first-level attribute is an object array. Each object in this attribute is also used as an attribute unit, and map this attribute unit as the field of the TDengine data table.
[0056] The mapping rule in the "outputData" field is similar to the mapping rule of the above properties. The only difference is that the prefix of the TDengine field name after mapping needs to add the "identifier" of the first-level attribute unit to which this "outputData" field belongs.
[0057] "Service": Each object in the "Service" object array in the device model is used as an attribute unit. The mapping rule of this attribute is similar to the "events" mapping rule. The actually mapped attribute of "events" is the "outputData" object array in the first-level attribute. The actually mapped attributes of "Service" are the "input" and "output" object arrays in the first-level attribute. The "input" object array describes the input parameters of the device for this service. The TDengine database fields mapped by this object array use the "identifier" field of the first-level attribute to which it belongs + the string "input" as the prefix, and the "identifier" field of this object array as the suffix; the "output" field is similar to "input", using the "identifier" field of the first-level attribute to which it belongs + the string "output" as the prefix, and the "identifier" field of this object array as the suffix.
[0058] In step S123, map the data storage type of TDengine. The object in the OneNET device model contains a "dataType" field, and the "type" in this field describes the data types of the device-reported data and the device-sent data. By mapping these data types to the TDengine data types, it is ensured that the device-reported data can be accurately stored in the database. The specific mapping relationship is shown in the following table (this tool is implemented in Java, and the usage types of Java objects are also included in this mapping relationship).
[0059] As an optional embodiment, after separately mapping the attribute dimension data, the event dimension data, and the service dimension data to their respective corresponding supertable sub-tables, steps S124 to S125 are further included.
[0060] Step S124: Determine the statistical fields of the supertable according to the basic information of the Internet of Things device included in the device model.
[0061] Step S125: Determine the time primary key of the supertable according to the system time.
[0062] In step S124, the tag field in the TDengine supertable is used as the key statistical field of the system business and needs to contain the basic information related to the device. Among them, the basic information of the device mainly included in the device model includes the following two points: "productId": the device product id, and the data type is String; "version": the device model version number, and the data type is String. At the same time, this tag stores some statistical dimension fields of the device data in the business system, such as data like the tenant id to which the device belongs and the resource id to which the device belongs. Adding this type of data facilitates the statistical analysis of device data based on the system business.
[0063] In step S125, a TIMESTAMP type data must be used as the primary key of the data acquisition volume of this data in the TDengine supertable. At the same time, this field is also the sorting dependency of the TDengine time-series database. This field cannot be mapped from the device model and needs to be created and the storage logic thereof needs to be established. In this application, the system time stored in the business system is used as the business logic of this field.
[0064] As an optional embodiment, the operation specifications of the TDengine time series database include sub-table creation rules, sub-table data addition rules, and super-table query rules. The sub-table creation rules refer to creating sub-tables of the super-table according to the data structure of the super-table and the device type number. The sub-table data addition rules refer to mapping the physical model to the sub-tables of the super-table for storage according to the device type number. The super-table query rules refer to querying the entire table data of the sub-tables of the super-table according to the device type number, statistical fields, and time primary key.
[0065] Specifically, after the TDengine super-table is generated, the super-table needs to be created in the TDengine database according to the following rules. The rules are as follows: The sub-table creation rules of TDengine use the device ID and product ID to create sub-tables. The sub-tables will automatically inherit the data structure of the super-table, and one device unit corresponds to one TDengine sub-table. The sub-table data addition rules of TDengine use the device ID to map some system fields and device real-time data to the sub-tables for storage. The whole-table query rules of TDengine query the data of the whole table of TDengine sub-tables through the device ID, tag data, and time range.
[0066] It can be understood that this application uses the TDengine database as the storage medium for device raw data, and at the same time performs corresponding rule mapping according to the characteristics and specifications of the TDengine database, so as to realize the automatic processing of the reported data of this type of device after parsing the OneNET device physical model, reduce the development work, and realize the unified processing of the reported data of OneNET devices; by formulating the processing specifications for device reported data, reduce the code maintenance cost and increase the code readability; introduce and use the TDengine time series database to improve the database performance; reduce the real-time data storage space and improve the resource utilization rate.
[0067] Based on the above embodiments, as an optional embodiment, the parsing of the Internet of Things device information to obtain a parsing result includes: Parsing the Internet of Things device information, and taking the device type, device type number, and data dimension corresponding to the Internet of Things device information as the parsing result.
[0068] As Figure 3 shown, after the initialization mapping of the physical model to the TDengine database is completed through step S100, the Internet of Things device information uploaded by the Internet of Things device is analyzed, where the Internet of Things device information is json data.
[0069] The parsing of the Internet of Things device information specifically includes: extracting the fields in the json data, and sequentially determining whether there is a supertable of this device type and the device type number in the TDengine database. If so, judge the data dimension of the json data.
[0070] Determining whether there is a supertable of this device type in the TDengine database specifically includes: extracting the "productid" field in the json data, using this field for configuration in the TDengine database, and querying whether there is a supertable of this product id in the TDengine database. If the matching operation fails, subsequent operations cannot be performed.
[0071] Determining whether there is a supertable of this device type number in the TDengine database specifically includes: extracting the "deviceId" field in the json data, using this field and the "productid" field to match the tag field in the database. If the matching operation fails, the relevant supertable subtable needs to be created first before subsequent operations can be performed.
[0072] An addition operation of a piece of device data in only one dimension can be expressed by one piece of json data. When adding device data, the dimension information of the reported json needs to be obtained through relevant fields, and different TDengine supertables need to be operated on for different dimension information.
[0073] According to the design of the physical model, the data to be reported is assembled in the "data" object of the reported json, and this data is expressed using the object. Among them, the value of the "identifier" attribute in the physical model is used as the key, and the reported data is used as the value. To store this type of data in TDengine, general processing needs to be done. The processing logic is similar to the above rules for parsing the physical model. The storage fields are concatenated according to the type of the object-reported data to ensure correspondence with the TDengine database fields.
[0074] There will be some system-privatized development work during TDengine storage, including but not limited to obtaining the primary key timestamp during TDengine storage and obtaining the device-reported data time. Such operations can be added to the general operations of the device, but for the privatized operations of each device type, secondary processing needs to be done when the data is stored in TDengine.
[0075] It can be understood that, through the parsing of the object model, this application maps relevant attribute fields to the TDengine time-series database, and then processes the data reported by the device according to fixed rules, so as to store the device parameters into the generated database. At the same time, the device parameters can be obtained from the simple database, solving the defect that there is no specific processing specification for the json data reported by the device, and different types of devices need to process the reported json fields to inject the required device data into the database.
[0076] The following describes the Internet of Things device information processing device provided by this application. The Internet of Things device information processing device described below can be mutually referred to with the Internet of Things device information processing method described above.
[0077] Figure 4 is a schematic structural diagram of the Internet of Things device information processing device provided by this application. As Figure 4 shown, this application also provides an Internet of Things device information processing device, including: A preprocessing module 410, configured to generate supertables of various Internet of Things devices in the TDengine time-series database according to the object models reported by multiple types of Internet of Things devices, and determine the operation specifications of the supertables; A parsing module 420, configured to obtain the Internet of Things device information to be processed, parse the Internet of Things device information, and obtain a parsing result; A processing module 430, configured to complete the processing of the Internet of Things device information based on the operation specifications according to the parsing result.
[0078] As an embodiment, the generating of the supertables of various Internet of Things devices in the TDengine time-series database according to the object models reported by multiple types of Internet of Things devices includes: According to the object model, determine the device type number, attribute dimension data, event dimension data, and service dimension data of the Internet of Things device; Generate the supertable of the Internet of Things device in the TDengine time-series database according to the device type number, the attribute dimension data, the event dimension data, and the service dimension data.
[0079] As an embodiment, the generating of the supertable of the Internet of Things device in the TDengine time-series database according to the device type number, the attribute dimension data, the event dimension data, and the service dimension data includes: Respectively construct corresponding supertable sub-tables for the attribute dimension data, the event dimension data, and the service dimension data. The table names of the supertable sub-tables are determined based on the device type number and the corresponding dimension strings; Map the attribute dimension data, the event dimension data, and the service dimension data to their respective corresponding supertable sub-tables respectively; Use each of the supertable sub-tables as the supertable of the Internet of Things device in the TDengine time series database.
[0080] As an embodiment, after respectively mapping the attribute dimension data, the event dimension data, and the service dimension data to their respective corresponding supertable sub-tables, it further includes: Determine the statistical fields of the supertable according to the basic information of the Internet of Things device included in the device model; Determine the time primary key of the supertable according to the system time.
[0081] As an embodiment, the operation specifications of the TDengine time series database include sub-table creation rules, sub-table data addition rules, and supertable query rules. The sub-table creation rules refer to creating supertable sub-tables according to the data structure of the supertable and the device type number; the sub-table data addition rules refer to mapping the device model to the supertable sub-tables for storage according to the device type number; the supertable query rules refer to querying the entire table data of the supertable sub-tables according to the device type number, statistical fields, and time primary key.
[0082] As an embodiment, the parsing of the Internet of Things device information to obtain a parsing result includes: Parse the Internet of Things device information, and use the device type, device type number, and data dimension corresponding to the Internet of Things device information as the parsing result.
[0083] The Internet of Things device information processing system provided by the present application will be described below. The Internet of Things device information processing system described below can be mutually corresponding and referred to the Internet of Things device information processing method and device described above.
[0084] Figure 5 is a schematic structural diagram of the Internet of Things device information processing system provided by the present application. As Figure 5 shown, the present application also provides an Internet of Things device information processing system, including multiple types of Internet of Things devices 10, a TDengine time series database 20, and a service platform 30; The service platform 30 is used to generate supertables of various Internet of Things devices in the TDengine time series database according to the device models reported by multiple types of Internet of Things devices, and determine the operation specifications of the supertables; obtain the Internet of Things device information to be processed, parse the Internet of Things device information to obtain a parsing result; and complete the processing of the Internet of Things device information based on the parsing result and the operation specifications.
[0085] As an embodiment, the service platform 30 is further configured to process the Internet of Things device information stored in the TDengine time series database of the Internet of Things device according to the privatization operation specification of any type of the Internet of Things device.
[0086] As an embodiment, the generated object models reported by the multiple types of Internet of Things devices generate super tables of each type of the Internet of Things device in the TDengine time series database, including: Determine the device type number, attribute dimension data, event dimension data, and service dimension data of the Internet of Things device according to the object model; Generate a super table of the Internet of Things device in the TDengine time series database according to the device type number, the attribute dimension data, the event dimension data, and the service dimension data.
[0087] As an embodiment, the generating the super table of the Internet of Things device in the TDengine time series database according to the device type number, the attribute dimension data, the event dimension data, and the service dimension data includes: Construct respective corresponding super table sub-tables for the attribute dimension data, the event dimension data, and the service dimension data, and the table name of the super table sub-table is determined based on the device type number and the corresponding dimension string; Map the attribute dimension data, the event dimension data, and the service dimension data to their respective corresponding super table sub-tables respectively; Use each of the super table sub-tables as the super table of the Internet of Things device in the TDengine time series database.
[0088] As an embodiment, after respectively mapping the attribute dimension data, the event dimension data, and the service dimension data to their respective corresponding super table sub-tables, it further includes: Determine the statistical fields of the super table according to the basic information of the Internet of Things device included in the object model; Determine the time primary key of the super table according to the system time.
[0089] As an embodiment, the operation specification of the TDengine time series database includes a sub-table creation rule, a sub-table data addition rule, and a super table query rule. The sub-table creation rule refers to creating a super table sub-table according to the data structure of the super table and the device type number; the sub-table data addition rule refers to mapping the object model to the super table sub-table for storage according to the device type number; the super table query rule refers to querying the entire table data of the super table sub-table according to the device type number, statistical fields, and time primary key.
[0090] As an embodiment, parsing the Internet of Things device information to obtain a parsing result includes: Parsing the Internet of Things device information, and taking the device type, device type number, and data dimension corresponding to the Internet of Things device information as the parsing result.
[0091] Figure 6 An example of the physical structure diagram of an electronic device is shown as Figure 6 shown. The electronic device may include: a processor 610, a communications interface 620, a memory 630, and a communication bus 640. Among them, the processor 610, the communications interface 620, and the memory 630 complete mutual communication through the communication bus 640. The processor 610 can call the logical instructions in the memory 630 to execute the Internet of Things device information processing method, and the method includes: generating a super table of each type of the Internet of Things device in the TDengine time series database according to the object models reported by multiple types of Internet of Things devices, and determining the operation specifications of the super table; obtaining the Internet of Things device information to be processed, parsing the Internet of Things device information to obtain a parsing result; and based on the parsing result, completing the processing of the Internet of Things device information based on the operation specifications.
[0092] In addition, when the logical instructions in the above-mentioned memory 630 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk, or an optical disc that can store program codes.
[0093] On the other hand, the present application also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the Internet of Things device information processing method provided by each of the above methods. The method includes: generating super tables of various Internet of Things devices in the TDengine time series database according to the device models reported by multiple types of Internet of Things devices, and determining the operation specifications of the super tables; obtaining the Internet of Things device information to be processed, parsing the Internet of Things device information to obtain a parsing result; and based on the parsing result, completing the processing of the Internet of Things device information according to the operation specifications.
[0094] In another aspect, the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it is configured to execute the Internet of Things device information processing method provided by each of the above methods. The method includes: generating super tables of various Internet of Things devices in the TDengine time series database according to the device models reported by multiple types of Internet of Things devices, and determining the operation specifications of the super tables; obtaining the Internet of Things device information to be processed, parsing the Internet of Things device information to obtain a parsing result; and based on the parsing result, completing the processing of the Internet of Things device information according to the operation specifications.
[0095] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0096] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0097] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than limiting them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for processing information of an Internet of Things device, characterized in that: include: Generate a super table of each type of IoT device in the TDengine time series database based on the object models reported by multiple types of IoT devices, and determine the operation specifications of the super table; Obtaining the IoT device information to be processed, parsing the IoT device information, and obtaining a parsing result; According to the analysis result, the processing of the IoT device information is completed based on the operation specification.
2. The method for processing information of an Internet of Things device according to claim 1, characterized in that: The method generates a super table of each type of IoT device in the TDengine time series database according to the object models reported by the multiple types of IoT devices, including: Determine the device type number, attribute dimension data, event dimension data, and service dimension data of the IoT device according to the object model; A super table of the Internet of Things device in the TDengine time series database is generated according to the device type number, the attribute dimension data, the event dimension data and the service dimension data.
3. The method for processing information of an Internet of Things device according to claim 2, characterized in that: The step of generating a super table of the IoT device in the TDengine time series database according to the device type number, the attribute dimension data, the event dimension data, and the service dimension data includes: Constructing corresponding super table sub-tables for the attribute dimension data, the event dimension data and the service dimension data respectively, wherein the table name of the super table sub-table is determined based on the device type number and the corresponding dimension character string; Respectively mapping the attribute dimension data, the event dimension data and the service dimension data to their corresponding super table sub-tables; Each of the super table sub-tables is used as the super table of the Internet of Things device in the TDengine time series database.
4. The method for processing information of an Internet of Things device according to claim 3, characterized in that: After mapping the attribute dimension data, the event dimension data and the service dimension data to their corresponding super table sub-tables respectively, the method further includes: Determine the statistical fields of the super table according to the basic information of the IoT device contained in the object model; According to the system time, the time primary key of the super table is determined.
5. The method for processing information of an Internet of Things device according to any one of claims 2 to 4, characterized in that: The operation specifications of the TDengine time series database include sub-table creation rules, sub-table data addition rules and super-table query rules. The sub-table creation rules refer to creating a super-table sub-table according to the data structure of the super-table and the device type number; the sub-table data addition rules refer to mapping the object model to the super-table sub-table for storage according to the device type number; the super-table query rules refer to querying the entire table data of the super-table sub-table according to the device type number, statistical field and time primary key.
6. The method for processing information of an Internet of Things device according to claim 5, characterized in that: The parsing of the IoT device information to obtain a parsing result includes: The IoT device information is parsed, and the device type, device type number, and data dimension corresponding to the IoT device information are used as parsing results.
7. An IoT device information processing device, characterized in that: include: A preprocessing module, which is used to generate a super table of each type of IoT device in the TDengine time series database according to the object models reported by multiple types of IoT devices, and determine the operation specifications of the super table; The parsing module is used to obtain the IoT device information to be processed, parse the IoT device information, and obtain the parsing result; A processing module is used to complete the processing of the Internet of Things device information based on the analysis result and the operation specification.
8. An Internet of Things device information processing system, characterized in that: Includes multiple types of IoT devices, TDengine time series database and business platform; The business platform is used to generate a super table of each type of IoT device in the TDengine time series database according to the object models reported by multiple types of IoT devices, and determine the operation specifications of the super table; Obtain the IoT device information to be processed, parse the IoT device information to obtain a parsing result; and complete the processing of the IoT device information based on the parsing result and the operation specification.
9. The IoT device information processing system according to claim 8, characterized in that: The business platform is also used to process the IoT device information of the IoT device stored in the TDengine time series database according to the privatized operation specifications of any type of the IoT device.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for processing information of an Internet of Things device as claimed in any one of claims 1 to 6 is implemented.