An application method of object model in industrial Internet of Things
By introducing the object model into the industrial Internet of Things, the controller of the edge device accesses and collects data, solving the problem of hidden dangers of railway switches, realizing efficient interconnection of equipment and edge intelligence, providing a flexible computing method and unified framework, and improving Improve data security and analysis capabilities.
Patent Information
- Application Number
- CN202210306386.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-25
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-03-25
AI Technical Summary
In the industrial Internet of Things, existing technologies are difficult to effectively solve the hidden dangers caused by railway switches, and the ubiquitous links and interconnections between things and people and things are not effective.
By introducing the object model into the industrial Internet of Things, the controller of the edge device is connected, data is collected, and through object model attribute abstraction, service method mapping and event collection, secure channel transmission of data and data analysis and rule calculation of the intelligent platform are realized. and statistics to realize device interconnection and edge intelligence.
It achieves efficient interconnection and edge intelligence of devices, provides flexible computing methods and a unified framework, supports multi-service device control and customized input and output parameters, and improves data security and analysis capabilities.
Smart Images

Figure CN115002146B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of industrial Internet of Things, and specifically is an application method of a physical model in the industrial Internet of Things. Background Art
[0002] The new generation of IoT technology adopts the end-cloud combination method. The IoT platform built has the ability to collect and analyze data, which can solve the hidden dangers caused by railway turnouts more efficiently, safely and energy-savingly. At the same time, the industrial IoT uses the data analysis capabilities of the cloud platform to improve the process and unify the scheduling and management of inspection personnel. Realize efficient collaboration between objects, people and clouds In the development process of industrial IoT applications, the object model mainly solves the role of realizing ubiquitous links and interconnection between "objects" and "people-objects".
[0003] The object model is a digital representation of entities in the physical space (such as sensors, vehicle-mounted devices, buildings, factories, etc.) in the cloud. It includes three dimensions: attributes, services, and events, which respectively describe what the entity is, what it can do, and what information it can provide to the outside world. Attributes are mainly used to describe information about the device status. Services are mainly used to describe commands sent to devices and their responses. Events are mainly used to describe event data actively reported by devices. Summary of the invention
[0004] The present invention proposes an application method of a physical model in the industrial Internet of Things, which connects the controller of the edge device, collects the data of each device, and transmits it to the intelligent platform through a secure channel through physical model attribute abstraction, service method mapping, and event collection. The platform calculates and analyzes the data through data parsing, rule calculation, and rule statistics to achieve the goals of industrial field equipment interconnection and edge intelligence.
[0005] The method for applying the object model in the industrial Internet of Things has the following specific steps:
[0006] Step 1: Collect edge data and transmit it to the IOT message server;
[0007] The data flow is carried out using the Topic flag. The message body carries the published and subscribed Topic. The data analysis service subscribes to the corresponding Topic to obtain the message content reported by the device, and reads the corresponding configuration information and identification code from the relational database. One identification code corresponds to a specific device under one gateway.
[0008] Step 2: The host computer is connected to the cloud, and the device is configured through the object model in the cloud;
[0009] For several real devices in the same gateway, each device corresponds to an identification code, and one identification code corresponds to one object model, that is, the real device and the object model are associated one by one.
[0010] The object model includes 5 data tables: device model table 1, model attribute table 2, model service table 3, model event table 4, model topic table 5;
[0011] The device model table 1 stores the device model ID and device model name; in the enabled state, the model attributes cannot be modified, but the model services and events can be modified.
[0012] Model attribute table 2 stores attribute codes, attribute names, device reporting identifiers, calculation methods, and extended scripts. When enabled, all parameters need to be written into the message queue in the time series database for the parser to subscribe and update. The time series database is used to update the subsequent description of the message queue format, update the model, and update the binding relationship.
[0013] Model service table 3 stores the format of commands sent to the device and its responses; RemoteServiceCall table records the issuance of each instruction.
[0014] Model event table 4 stores the model event name, number of parameters and parameter description, etc.; the parameter description uses parameter identification, parameter name and parameter type in json format. Similarly, the event status of the equipment is recorded in the EquipmentEvent table.
[0015] The model Topic table 5 stores the publish / subscribe modes of various services, such as attribute reporting, attribute setting, service calling, service reply, event reporting device and other services.
[0016] Step 3: After the parameters of each device are configured in the cloud, the sensors of the physical devices collect data in real time, pre-process it, and save it in the database;
[0017] Step 4: The cloud collects data through real-time monitoring, compares the monitoring data with the rules set by business management requirements, determines and obtains alarm information, and publishes the service through the object model;
[0018] The service release is all through the MQTT message server, and the cloud sets the various scheduling modes of the equipment. When the mode is switched, the channels in the control cabinet are started at different times.
[0019] Step 5: The object model calls the corresponding tables for each service, converts them into ID information and sends them to the edge.
[0020] During the communication process, the device SN is obtained by scanning or the key is calculated by dynamically distributing the broadcast SN. The key changes every 10 minutes.
[0021] The gateway loads the object model to specify the instance identification code and alias, which are stored in the object model. Through the universal serial port of the module, it adopts the transparent transmission mode or the transparent transmission mode + custom broadcast packet to communicate with the edge device in two directions;
[0022] Step 6: The edge end sends corresponding control instructions to perform intelligent control and fault detection of each device.
[0023] The advantages of the present invention are:
[0024] 1. A method for applying a physical model in the industrial Internet of Things introduces a configurable script into the physical model attribute calculation, and the calculation method is more flexible.
[0025] 2. A method for applying a thing model in the industrial Internet of Things, combining the publish-subscribe model with the thing model to form a unified framework.
[0026] 3. A method for applying a thing model in the industrial Internet of Things. When setting services and properties, multiple services for device control can be set, and input and output parameters can be customized. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 It is a diagram of the physical model parsing and data exchange architecture of the present invention;
[0028] Figure 2 is a flow chart of physical model data analysis of the present invention;
[0029] Figure 3 It is a flow chart of an application method of a physical model in the industrial Internet of Things of the present invention. DETAILED DESCRIPTION
[0030] The technical solution of the present invention is described below in conjunction with the accompanying drawings and embodiments.
[0031] The present invention proposes an application method of a physical model in the industrial Internet of Things, which involves the development process of physical model control and model building, and is actually applied to a railway turnout control cabinet; Figure 1 As shown in the figure, for several real devices in the same gateway to report attributes, messages are sent uplink to the cloud; the cloud performs data parsing in JSON format, combined with database object model mapping configuration, and time series database records data flow; and sends it downlink to the real device. Among them, data parsing adopts the publish-subscribe mode, and the Topic flag is used for data flow.
[0032] Among them, Figure 2As shown, when sending data uplink, the device side performs device authentication and device access. Data authentication occurs before the access gateway-device model is associated. It can be configured during data access or in the device object model management. The main content of the configuration includes the corresponding relationship between the associated access channel and the downstream device model and instance. The result is that the channel authentication relationship is automatically generated and stored in the relational database. The cloud performs data analysis and management, and stores it in the database through the rule calculation of the rule engine.
[0033] When sending data downlink, first set the device attributes, services and events, send the data to the real device for monitoring through rule calculation, compare the monitoring data with the rules set by the business management requirements, determine and obtain alarm information, push and manage information, and publish services through the object model; the edge end executes the instructions sent down, and judges and reports fault detection, meter detection and other alarm information.
[0034] The application method of the object model in the industrial Internet of Things, such as Figure 3 As shown, the specific steps are as follows:
[0035] Step 1: Connect the edge of each physical device to the railway turnout, and collect edge data and transmit it to the IOT message server;
[0036] Physical equipment includes turnout control cabinets, smart meters, and weather stations;
[0037] The edge data collection device connects to the IOT message server via SSL / TLS to achieve encrypted transmission of messages;
[0038] The encrypted transmission includes: two-way authentication and asymmetric encryption; for asymmetric encryption, a basic CA certificate, device serial number SN and project PK / PS must be built into the edge data acquisition device in advance, and authentication is performed through APIKEY authentication. Since the controller does not have a display or output method to obtain the key, the dynamic pairing code cannot be used. A static pairing code is used for authentication. The pairing code is generated by scanning the QR code or the SN serial number to calculate a 6-digit key.
[0039] The specific encryption process is as follows:
[0040] First, the user enters the command AT+SECL:1 or AT+LESC:0. AT+LESC determines whether to use a static pairing code or a dynamic pairing code during authentication. If LESC is 0, a static pairing code is used during authentication; if LESC is 1, a dynamic pairing code is used during authentication.
[0041] Then, enter the pairing code: AT+PASS:pairing code; this mode supports authentication and encryption. The authentication of the two devices is based on the static pairing code set by the user, and the communication encryption algorithm is also based on the pairing code set by the user; that is to say, after a third party captures the air packet data, if they do not know the pairing code, they will not be able to crack the communication data between the two devices, thus ensuring secure data transmission.
[0042] Next, data analysis adopts the publish-subscribe mode and uses the Topic flag for data flow. The message body carries the topic of publishing and subscription, such as Things / {clientid} / Attribute / Post. The data analysis service subscribes to the corresponding Topic to obtain the message content reported by the device, and reads the corresponding configuration information and identification code from the relational database. One identification code corresponds to a specific device under one gateway.
[0043] Step 2: The host computer is connected to the cloud, and the device is configured through the object model in the cloud;
[0044] For the reporting of several real device attributes in the same gateway, the Topic flag is the same, the difference is that each device corresponds to an identification code, and an identification code corresponds to a physical model, that is, the real device and the physical model are associated one by one. Although the topic of a gateway is the same, the identification code of each device is different, so the devices can be distinguished; clientid is the unique identifier of the collection device in the MQTT message server, and it is also the unique identifier in the software system; the edge controller has one machine and one password, and the certificate uses one set of certificates for one project.
[0045] Based on the above correspondence, the parsing program performs data parsing through the correspondence in the table. The parsing content includes the status of the service being sent, error logs, and the current data status. At the same time, a time series database subtable is created for each device parsing status. The parsing status is stored in the time series database table. The Status field indicates whether the device is online or not. It is calculated in real time by the gateway going online and offline. The online status of the gateway and the device hanging under the gateway is consistent. The service method, property setting, and query request in the downlink data are sent down. Each message has a unique ID as an identifier and is assigned to the corresponding device, which means that the data is managed.
[0046] The object model consists of three parts: attributes, service methods, and events.
[0047] By defining the transmission parameters, attribute parameters, service methods, and event parameters of each type of device, it is possible to add, delete, and update device models; monitor the status of device models; add access channels and bind devices; and monitor and operate basic devices.
[0048] Attribute class parameters can be used for data monitoring and device control, service methods can be used for remote device control or device parameter setting, and events are mainly used to monitor real-time messages of devices. Setting services can set multiple services for device control and define input and output parameters. Setting events can set event information reported by the device, such as messages, exceptions, etc.
[0049] In the IoT device scenario, it is necessary to set attribute parameters under the device model to define the parameters reported by the device. When setting the attribute parameters, if the device report identifier is filled in, the parameter will directly report the data through the device. If the device report identifier is empty, the parameter needs to be defined in the rule operation. The data of this type of parameter is generally generated by other parameters after data operation.
[0050] The underlying database corresponding to the implementation of the object model specifically includes 5 data tables: device model table 1, model attribute table 2, model service table 3, model event table 4, and model topic table 5.
[0051] In the device model table 1, the key fields include the device model ID and the device model name, which are used to uniquely identify the model. The model can only be associated and parsed when it is enabled. The enabled state is a fixed state for the model, and a time series database model super table needs to be created when it is started. The model attributes cannot be modified in the enabled state, but the model services and events can be modified.
[0052] In model attribute table 2, key fields include attribute code, attribute name, device reporting identifier, calculation method and extended script, etc. Since the attributes of the model often involve calculation, the calculation method set in the present invention includes position calculation, linear calculation, script calculation, and default empty without calculation. When performing script calculation, attention should be paid to the escape symbol of the script. When the model is enabled, all parameters of the model need to be written into the message queue in the time series database for the parser to subscribe and update. The format of the message queue for updating the time series database will be described later, including updating the model, updating the binding relationship, etc.
[0053] In the model service table 3, the format of the command sent to the device and its response is described. The input and output parameters are in json format. At the same time, the input and output parameter descriptions are stored in the escape storage table to match the number of input and output parameters, so as to flexibly set the model service. In order to ensure that the service delivery can be traced and queried, the service delivery status records the delivery of each command in the RemoteServiceCall table.
[0054] Model event table 4 is similar to the model service table, with the equipment model ID as the unique identifier. The table content includes the model event name, number of parameters, parameter description, etc. Note that the parameter description uses the parameter identifier, parameter name, and parameter type in json format. Similarly, the event table records the event status of the equipment in the EquipmentEvent table.
[0055] Model Topic Table 5 is a publish / subscribe mode for the services in Table 2, Table 3, and Table 4, such as attribute reporting, attribute setting, service calling, service reply, event reporting device, and other related functions. The present invention combines the calling of service calling, attribute setting, attribute query and other methods with topic, uses the device unique identifier as the index, and provides the calling mode of attribute operation and service calling 2.
[0056] Step 3: After the parameters of each device are configured in the cloud, the sensors of the physical devices collect data in real time, pre-process it, and save it in the database;
[0057] The platform needs to calculate non-null values such as average and peak values for real-time data collection for analysis, and implement rule calculation and statistics by setting rules for the rule engine. Preprocessing refers to setting rules for the rule engine to implement rule calculation and statistics;
[0058] Rule operation obtains the required complex parameter attributes through complex operation of the original parameter attributes of the device model data, supports configurable scripts such as Python and Lua, and has a more flexible calculation method. Rule statistics is to perform statistical rule operations on the original parameters, including four arithmetic operations, aggregation, variance, square root and integration, and present the statistical data of the corresponding parameters on the page through the visual configuration function.
[0059] Rule control is the parameter control rules set on the same device or between different devices.
[0060] Step 4: The cloud collects data through real-time monitoring, compares the monitoring data with the rules set by business management requirements, determines and obtains alarm information, and publishes the service through the object model;
[0061] The TD-Engine time series database is used to store the real-time collected device data, and the MySQL database is used to store the configuration rules. At the same time, the Redis cache database and FastDFS distributed file management system are provided.
[0062] The service release is sent through the MQTT message server. The cloud sets the various scheduling modes of the device. When the mode is switched, the channels in the control cabinet are started at different times. The scheduling modes are as follows:
[0063] 1) Automatic control mode; 2) Emergency mode; 3) Scheduling mode; 4) Hierarchical control mode;
[0064] Step 5: The object model calls the corresponding tables for each service, converts them into ID information and sends them to the edge.
[0065] The key is calculated by scanning to obtain the device SN or by broadcasting the SN to dynamically distribute the key, and the key changes every 10 minutes. The communication device mapping table is as follows:
[0066]
[0067] The access permission of the topic of the object model is obtained by the gateway adapter. The topic rules are generated when the model is associated with the controller. The scale mode is as above, and wildcards can also be used. The topics permitted by each model are customized. The gateway loads the object model to specify the instance identification code and alias, which are stored in the object model. Through the universal serial port of the module, the transparent transmission mode or the transparent transmission mode + customized broadcast package is used to communicate with the edge device in two directions;
[0068] Step 6: The edge terminal sends corresponding control instructions to perform intelligent control and fault detection of each device;
[0069] Turnout faults: circuit breaker switch status, contactor status and output control matching, overpower alarm, underpower alarm, communication alarm;
[0070] Meter fault inspection: voltage over-high, under-low alarm, frequency over-high, under-low alarm, meter communication alarm
[0071] Other alarms: lightning protection alarm, cabinet door switch alarm, rain and snow signal alarm, general IO board alarm, and scheduling configuration parameter check.
[0072] The edge access and collection, time series storage, object modeling, and data rule statistics proposed in the present invention realize an end-to-end and end-to-cloud solution for accessing field equipment, sensors, and instruments to intelligent application services.
Claims
1. An application method of object model in industrial Internet of Things, It is characterized in that The specific steps are as follows: First, collect edge data and transmit it to the IOT message server; The host computer is connected to the cloud, where the device parameters are configured through the physical model. The sensors of the physical device collect data in real time, pre-process it, and save it in the database. The object model includes 5 data tables: device model table 1, model attribute table 2, model service table 3, model event table 4, model topic table 5; The device model table 1 stores the device model ID and device model name; in the enabled state, the model attributes cannot be modified, but the model services and events can be modified; Model attribute table 2 stores attribute codes, attribute names, device reporting identifiers, calculation methods, and extended scripts. When enabled, all parameters need to be written into the message queue in the time series database for the parser to subscribe and update. The time series database is used to update the message queue format, update the model, and update the binding relationship. Model service table 3 stores the format of commands sent to the device and its responses; Record the delivery of each command in the RemoteServiceCall table; Model event table 4 stores the model event name, number of parameters and parameter description; the parameter description uses the parameter identifier, parameter name and parameter type in the Json format. Similarly, the equipment event status is recorded in the EquipmentEvent table; Model Topic Table 5 stores the publish / subscribe patterns provided by various services; Including attribute reporting, attribute setting, service calling, service reply and event reporting equipment; Preprocessing refers to the rule setting of the rule engine to realize the calculation and statistics of the rules; Rule operation obtains the required complex parameter attributes through complex operations on the original parameter attributes of the device model data, and supports configurable scripts; rule statistics perform statistical rule operations on the original parameters, including four arithmetic operations, aggregation, variance, square root and integration, and presents the statistical data of the corresponding parameters on the page through the visual configuration function; Rule control is the parameter control rules set on the same device or between different devices; Then, the cloud collects data through real-time monitoring, compares the monitoring data with the alarm threshold set by business management requirements, determines and obtains alarm information, and publishes it through the object model. The object model calls the corresponding tables for each service, converts it into ID information and sends it to the edge. The service release is sent through the MQTT message server. The cloud sets the various scheduling modes of the device. When the mode is switched, the channels in the control cabinet are started at different times. The scheduling modes are as follows: 1) Automatic control mode; 2) Emergency mode; 3) Scheduling mode; 4) Hierarchical control mode; Finally, the edge performs intelligent control and fault detection of each device by issuing control instructions.
2. The method for applying a physical model in industrial Internet of Things as claimed in claim 1, It is characterized in that The edge data collection device connects to the IOT message server via SSL / TLS to achieve encrypted transmission of messages; Data flow is carried out using the Topic flag. The message body carries the topic of publishing and subscription. The data analysis service subscribes to the corresponding Topic to obtain the message content reported by the device, and reads the corresponding configuration information and identification code from the relational database. One identification code corresponds to a specific device under one gateway.
3. The method for applying a physical model in industrial Internet of Things as claimed in claim 2, It is characterized in that The specific devices under the gateway include one or more devices, and the Topic flag is the same. Each device corresponds to an identification code, and an identification code corresponds to a physical model, that is, the real device is associated with the physical model one by one.
4. The method for applying a physical model in industrial Internet of Things as claimed in claim 2, It is characterized in that The gateway loads the object model to specify the instance identification code and alias, which are stored in the object model. Through the universal serial port, the gateway uses the transparent transmission mode or the transparent transmission mode + custom broadcast packet to communicate with the edge device in two directions.
