Data Processing Method, Device, Gateway Device and Storage Medium of Internet of Things Gateway

By traversing the object model examples and service lists of terminal devices, obtaining and verifying service data, the problem of complex configuration of the terminal device protocol conversion Internet of Things gateway in the existing technology is solved, and the efficient processing of data by the Internet of Things gateway is realized.

CN115643316BActive Publication Date: 2025-05-30HANGZHOU HARMONY TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211326987.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2025-05-30
Estimated Expiration
2042-10-26

AI Technical Summary

Technical Problem

In the prior art, protocol conversion IoT gateways need to pre-configure or custom development of terminal devices in integrated energy application systems, resulting in heavy repetition of equipment access multiplexing, debugging, operation and maintenance, etc., which in turn reduces the data processing efficiency of IoT gateways.

Method used

By traversing the end device list, the predefined service list in the object model instance of each terminal device is obtained, and the service data is obtained based on the service information and communication parameters. The service data is checked and analyzed based on the object model instance, and finally the analysis results are sent to the Internet of Things cloud platform to realize unified management and data processing of different terminal devices.

Benefits of technology

It improves the efficiency of IoT gateway processing various business data, avoids the duplicate workload caused by protocol configuration or customized development of access to different terminal devices, and greatly improves the efficiency of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115643316B_ABST
    Figure CN115643316B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method, device, gateway device and storage medium for an Internet of Things gateway, which relates to the technical field of the Internet of Things. The present application mainly traverses the obtained list of end devices to obtain the communication parameters and physical model instances of each terminal device stored on the list of end devices. Terminal devices of the same type are instantiated with the same physical model to obtain the physical model instances of each terminal device; that is, according to the device information of the terminal devices, multiple different models are constructed, and the terminal devices corresponding to the device information with the same attributes are instantiated with the same model. Based on the model instances after instantiation of each terminal device, the service data collected by each obtained terminal device is uniformly managed, improving the data processing efficiency of the Internet of Things gateway and avoiding the problem of large repetitive workloads such as terminal device access multiplexing and debugging caused by protocol configuration or protocol customization development for different terminal devices connected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of the Internet of Things, and in particular, to a data processing method, device, gateway device and storage medium for an Internet of Things gateway. Background Art

[0002] In a comprehensive energy system, an Internet of Things gateway plays an important role in connecting the upper and lower levels. It accesses multiple on-site terminal devices at the lower level and docks with the Internet of Things cloud platform at the upper level, providing functions such as perfect data collection, edge computing processing, data uploading, control instructions, etc. As an important type of Internet of Things gateway, a protocol conversion Internet of Things gateway can perform protocol parsing on the collected data to obtain the parsed data, and then re-encapsulate and upload the parsed data according to the protocol format on the master station side.

[0003] Currently, in the comprehensive energy application system, the protocol conversion Internet of Things gateway needs to perform protocol configuration or protocol customization and development on different terminal devices to be accessed in advance, resulting in a large amount of repetitive work such as end-device access multiplexing, debugging, and operation and maintenance, and thus the data processing efficiency of the Internet of Things gateway is relatively low. Summary of the Invention

[0004] The purpose of the present application is to provide a data processing method, device, gateway device and storage medium for an Internet of Things gateway to solve the technical problems existing in the prior art in view of the above deficiencies.

[0005] To achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:

[0006] In a first aspect, an embodiment of the present application provides a data processing method for an Internet of Things gateway, which is applied to a protocol conversion Internet of Things gateway that is respectively connected to at least one terminal device and an Internet of Things cloud platform; the method includes:

[0007] Traverse the list of terminal devices to obtain the service list predefined in the object model instance of each terminal device, where the list of terminal devices stores the predefined communication parameters of each terminal device and the object model instance, and the object model is used to describe the data information of each terminal device, and the same type of terminal device uses the same object model;

[0008] Traverse the service list of each terminal device to obtain the execution commands corresponding to the service information of each terminal device;

[0009] According to the execution commands corresponding to the service information of each terminal device and the communication parameters of each terminal device, obtain the service data of each terminal device;

[0010] Verify the service data of each of the terminal devices based on the instance of the device model of each of the terminal devices;

[0011] Send the service analysis result of the terminal device to the Internet of Things cloud platform according to the verification result.

[0012] Optionally, the instance of the device model includes predefined dynamic attributes, and the dynamic attributes are used to limit the range of the service data of each of the terminal devices;

[0013] The step of verifying the service data of each of the terminal devices based on the instance of the device model of each of the terminal devices includes:

[0014] Based on the dynamic attributes in the instance of the device model of each of the terminal devices, compare the service data of the terminal device with the predefined threshold in the dynamic attributes to determine whether the service data of each of the terminal devices passes the verification.

[0015] Optionally, the step of sending the service analysis result of the terminal device to the Internet of Things cloud platform according to the verification result includes:

[0016] If the verification result is that the verification fails, create an out-of-limit event corresponding to the service data that fails the verification based on the instance of the device model of the terminal device, and send the out-of-limit event corresponding to the service data that fails the verification and the identifier of the terminal device to the Internet of Things cloud platform;

[0017] If the verification result is that the verification passes, save the service data that passes the verification to the data sharing library;

[0018] Perform analysis and processing on the service data that passes the verification to obtain an analysis result, and upload the analysis result, the service data that passes the verification, and the identifier of the terminal device to the Internet of Things cloud platform.

[0019] Optionally, the protocol conversion Internet of Things gateway runs an event processing application;

[0020] The step of creating an out-of-limit event corresponding to the service data that fails the verification based on the instance of the device model of the terminal device includes:

[0021] The event processing application creates an out-of-limit event corresponding to the service data that fails the verification based on the instance of the device model of the terminal device, and returns the out-of-limit event corresponding to the service data that fails the verification.

[0022] Optionally, the protocol conversion Internet of Things gateway runs an edge computing application;

[0023] Analyzing and processing the service data that passes the verification to obtain an analysis result, including:

[0024] The edge computing application analyzes and processes the service data that passes the verification to obtain an analysis result and returns the analysis result.

[0025] Optionally, the protocol conversion IoT gateway runs a protocol application;

[0026] Obtaining the service data of each terminal device according to the execution command corresponding to the service information of each terminal device and the communication parameters of each terminal device, including:

[0027] If the terminal device is a non-intelligent terminal device, send the execution command corresponding to the service information of the terminal device and the communication parameters of the terminal device to the protocol application;

[0028] The protocol application determines the target protocol type corresponding to the execution command according to a predefined protocol model, where the protocol model is used to represent the mapping relationship between the execution command and the protocol instruction;

[0029] The protocol application obtains the service data of the terminal device according to the target protocol type and returns the service data of the terminal device.

[0030] Optionally, before traversing the list of terminal devices to obtain the predefined service list in the device model instance of each terminal device, it further includes:

[0031] Determine the target device model corresponding to the terminal device according to the type of the terminal device input by the user;

[0032] Establish a device model instance of the terminal device according to the configuration information of the terminal device input by the user and the target device model;

[0033] Add the communication parameters and the device model instance of the terminal device to the list of terminal devices.

[0034] In a second aspect, an embodiment of the present application further provides a data processing device for an IoT gateway, which is applied to a protocol conversion IoT gateway. The protocol conversion IoT gateway is respectively connected to at least one terminal device and an IoT cloud platform; the device includes:

[0035] An acquisition module, configured to traverse a list of terminal devices, and acquire a list of services predefined in the physical model instances of each of the terminal devices. The communication parameters of each of the terminal devices and the physical model instances are predefined and stored in the list of terminal devices. The physical model is used to describe the data information of each of the terminal devices, and terminal devices of the same type use the same physical model. Traverse the service lists of each of the terminal devices, and acquire the execution commands corresponding to the service information of each of the terminal devices. Acquire the service data of each of the terminal devices according to the execution commands corresponding to the service information of each of the terminal devices and the communication parameters of each of the terminal devices.

[0036] A verification module, configured to verify the service data of each of the terminal devices based on the physical model instances of each of the terminal devices.

[0037] A sending module, configured to send the service analysis result of the terminal device to the Internet of Things cloud platform according to the verification result.

[0038] Optionally, the physical model instance includes predefined dynamic attributes, and the dynamic attributes are used to limit the range of the service data of each of the terminal devices.

[0039] The verification module is further configured to:

[0040] Compare the service data of the terminal device with the thresholds predefined in the dynamic attributes based on the dynamic attributes in the physical model instances of each of the terminal devices, so as to determine whether the service data of each of the terminal devices passes the verification.

[0041] Optionally, the sending module is further configured to:

[0042] If the verification result is that the verification fails, create an out-of-limit event corresponding to the service data that fails the verification based on the physical model instance of the terminal device, and send the out-of-limit event corresponding to the service data that fails the verification and the identifier of the terminal device to the Internet of Things cloud platform.

[0043] If the verification result is that the verification passes, save the service data that passes the verification to a data sharing library.

[0044] Perform analysis and processing on the service data that passes the verification to obtain an analysis result, and upload the analysis result, the service data that passes the verification, and the identifier of the terminal device to the Internet of Things cloud platform.

[0045] Optionally, an event processing application program runs on the protocol conversion Internet of Things gateway.

[0046] The sending module is further configured to:

[0047] The event processing application creates an out-of-limit event corresponding to the business data that fails the verification based on the physical model instance of the terminal device, and returns the out-of-limit event corresponding to the business data that fails the verification.

[0048] Optionally, the protocol conversion IoT gateway runs an edge computing application;

[0049] The sending module is further configured to:

[0050] The edge computing application analyzes and processes the business data that passes the verification to obtain an analysis result, and returns the analysis result.

[0051] Optionally, the protocol conversion IoT gateway runs a protocol application;

[0052] The obtaining module is further configured to:

[0053] If the terminal device is a non-intelligent terminal device, send the execution command corresponding to the service information of the terminal device and the communication parameters of the terminal device to the protocol application;

[0054] The protocol application determines the target protocol type corresponding to the execution command according to a pre-defined protocol model, where the protocol model is used to represent the mapping relationship between the execution command and the protocol instruction;

[0055] The protocol application obtains the business data of the terminal device according to the target protocol type, and returns the business data of the terminal device.

[0056] Optionally, the device further includes:

[0057] A determination module, configured to determine a target physical model corresponding to the terminal device according to the type of the terminal device input by the user;

[0058] An establishment module, configured to establish a physical model instance of the terminal device according to the configuration information of the terminal device input by the user and the target physical model;

[0059] An addition module, configured to add the communication parameters and the physical model instance of the terminal device to the list of terminal devices.

[0060] In a third aspect, an embodiment of the present application further provides a gateway device, and the processing device includes: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the gateway device runs, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the method provided in the first aspect.

[0061] Fourthly, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the method provided in the first aspect.

[0062] The beneficial effects of the present application are as follows:

[0063] An embodiment of the present application provides a data processing method, device, gateway device and storage medium for an Internet of Things gateway. In this solution, mainly the obtained list of end devices is traversed to obtain the communication parameters and physical model instances of each terminal device stored on the list of end devices. Among them, the same type of terminal devices is instantiated with the same physical model to obtain the physical model instances of each terminal device; that is, according to the device information of the terminal devices, multiple different models are constructed, and the terminal devices corresponding to the device information with the same attributes are instantiated with the same model. Then, based on the model instances after instantiation of each terminal device, the service data collected by each terminal device is uniformly managed, improving the processing efficiency of the Internet of Things gateway for various types of service data, and avoiding the need to perform protocol configuration or protocol customization development for different terminal devices to be accessed, resulting in a large amount of repetitive work such as terminal device access reuse, debugging, and operation and maintenance, and causing the problem of low data processing efficiency of the Internet of Things gateway. Description of the Drawings

[0064] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0065] Figure 1 It is a schematic diagram of the data processing scenario of the Internet of Things gateway provided by the embodiment of the present application;

[0066] Figure 2 It is a schematic flowchart of a data processing method for an Internet of Things gateway provided by the embodiment of the present application;

[0067] Figure 3 It is a schematic flowchart of another data processing method for an Internet of Things gateway provided by the embodiment of the present application;

[0068] Figure 4 It is a schematic flowchart of yet another data processing method for an Internet of Things gateway provided by the embodiment of the present application;

[0069] Figure 5 It is a schematic flowchart of another data processing method for an Internet of Things gateway provided by the embodiment of the present application;

[0070] Figure 6 It is a schematic diagram of the overall process of another data processing method of the Internet of Things gateway provided by the embodiment of the present application;

[0071] Figure 7 It is a schematic diagram of the process of another data processing method of the Internet of Things gateway provided by the embodiment of the present application;

[0072] Figure 8 It is a schematic diagram of the structure of a data processing device of the Internet of Things gateway provided by the embodiment of the present application;

[0073] Figure 9 It is a schematic diagram of the structure of a gateway device provided by the embodiment of the present application.

[0074] Icons: 101 - Terminal device; 102 - Protocol conversion Internet of Things gateway; 103 - Internet of Things cloud platform. Specific embodiments

[0075] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. It should be understood that the accompanying drawings in the present application are only for the purpose of illustration and description, and are not used to limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn to actual scale. The flowcharts used in the present application illustrate the operations implemented according to some embodiments of the present application. It should be understood that the operations in the flowchart may not be implemented in sequence, and steps without a logical context relationship may be reversed or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart or remove one or more operations from the flowchart under the guidance of the content of the present application.

[0076] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application to be protected, but only represents the selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without creative efforts fall within the protection scope of the present application.

[0077] It should be noted that the term "including" will be used in the embodiments of the present application to indicate the existence of the features stated thereafter, but does not exclude the addition of other features.

[0078] First, before specifically describing the technical solutions provided by the present application, a brief description will be given to the data processing scenario of the Internet of Things gateway involved in the present application.

[0079] Figure 1 Schematic diagram of a data processing scenario of an Internet of Things gateway provided by an embodiment of the present application. Refer to Figure 1 As shown, the data processing scenario of the Internet of Things gateway may include multiple terminal devices 101, a protocol conversion Internet of Things gateway 102, and an Internet of Things cloud platform 103. Among them, the protocol conversion Internet of Things gateway 102 is respectively communicatively connected to each terminal device 101 and the Internet of Things cloud platform 103.

[0080] Exemplarily, for example, the terminal device 101 refers to an integrated energy power supply acquisition terminal device (such as a voltmeter, an ammeter), an integrated energy water supply acquisition terminal device (such as a water meter), and an integrated energy gas and heat acquisition terminal device (such as a gas meter), etc.

[0081] The Internet of Things cloud platform 103 may refer to an Internet of Things master station data center, an Internet of Things master station management system, etc.

[0082] The protocol conversion Internet of Things gateway 102 takes the edge proxy framework as the core, accesses the integrated energy water, electricity, and gas data detection terminal devices below, and docks with the Internet of Things cloud platform 103 (such as the Internet of Things data center and the Internet of Things master station management system) above, provides a device modeling function for the integrated energy field terminal devices, solves the general protocol structure configuration of the terminal devices and the definition of the event processing service model, and achieves the interoperability of the same type of terminal devices.

[0083] Specifically, the protocol conversion Internet of Things gateway 102 may obtain and process the service data collected by each terminal device 101, and forward the processed result to the Internet of Things cloud platform 103 for storage by the Internet of Things cloud platform 103.

[0084] It can be understood that Figure 1 The structure shown is only schematic, and the data processing scenario of the Internet of Things gateway may also include more or fewer components than those shown Figure 1 herein, or have a configuration different from that shown Figure 1 herein. Figure 1 Each component shown herein may be implemented by hardware, software, or a combination thereof.

[0085] The implementation principle and corresponding beneficial effects of the data processing method steps of the Internet of Things gateway provided by the present application will be described below through multiple specific embodiments.

[0086] Figure 2 Flow schematic diagram of a data processing method of an Internet of Things gateway provided by an embodiment of the present application; optionally, the execution subject of this method may be the Figure 1 protocol conversion Internet of Things gateway shown.

[0087] It should be understood that in other embodiments, the order of some steps in the data processing method of the Internet of Things gateway can be interchanged according to actual needs, or some of the steps can also be omitted or deleted. As Figure 2 shown, the method includes:

[0088] S201. Traverse the list of end devices, and obtain the service list predefined in the physical model instances of each terminal device.

[0089] Among them, the list of end devices stores, but is not limited to: communication parameters, identifiers, protocol model instances, and physical model instances of each predefined terminal device, etc. Among them, the physical model is mainly used to describe the data information of each terminal device, and the same type of terminal device uses the same physical model and protocol model. For example, the same type of electric energy meter can use the same predefined physical model to instantiate the physical model of a specific electric energy meter.

[0090] In this way, the device modeling function is provided for all terminal devices at the integrated energy site, avoiding the need for protocol configuration or protocol customization development for different terminal devices to be accessed, resulting in a large amount of repetitive work such as access reuse, debugging, and operation and maintenance of terminal devices, and thus causing the problem of low data processing efficiency of the Internet of Things gateway.

[0091] In this embodiment, the list of end devices provides the definition of end device management service information. For example, the following is a structure instance of a certain terminal device read from the list of end devices:

[0092]

[0093] From the above instance, it can be obtained that from the list of end devices, the end device identifier Id of this terminal device is 10000abcd, the physical model instance is 100001, the protocol model instance is HL, and communication parameters, etc. Among them, the information contained in the communication parameters is as follows:

[0094]

[0095]

[0096] After obtaining the physical model instance of this terminal device, the predefined service list can be continuously read from the physical model instance 100001 of this terminal device. Among them, the service list stores multiple service data to be collected by this terminal device, execution commands when collecting each service data, types of each service data, etc.

[0097] The following is the information contained in the physical model instance 100001 of this terminal device:

[0098]

[0099]

[0100]

[0101]

[0102]

[0103]

[0104]

[0105]

[0106]

[0107]

[0108]

[0109]

[0110]

[0111] Therefore, the service list services can continue to be read from the device model instance 100001 of the terminal device.

[0112] S202. Traverse the service lists of all terminal devices to obtain the execution commands corresponding to the service information of all terminal devices.

[0113] The service information refers to the specific service data to be collected by the terminal device. For example, if the terminal device is an electricity meter, the service information of the electricity meter can be to query the three-phase current of the electricity meter.

[0114] Based on the above embodiments, for example, from the service list services, the service information of the terminal device is obtained as time calibration by electricity meter broadcast, querying the A-phase voltage of the electricity meter, and querying the three-phase current of the electricity meter. Among them, the execution command corresponding to querying the A-phase voltage of the electricity meter is "queryUa".

[0115] S203. Obtain the service data of all terminal devices according to the execution commands corresponding to the service information of all terminal devices and the communication parameters of all terminal devices.

[0116] In this embodiment, according to the information such as the address, port number, and baud rate in the communication parameters of the terminal device in the above embodiment, the execution command "queryUa" corresponding to querying the A-phase voltage of the electric energy meter can be called to obtain the service data collected by the terminal device, that is, the voltage value of the A-phase voltage of the electric energy meter.

[0117] S204. Verify the service data of each terminal device based on the physical model instances of each terminal device.

[0118] Optionally, based on the physical model instance of the terminal device, the voltage value of the A-phase voltage of the electric energy meter of the collected terminal device can also be verified to determine whether the voltage value of the A-phase voltage of the currently collected electric energy meter is within the normal range.

[0119] S205. Send the service analysis result of the terminal device to the Internet of Things cloud platform according to the verification result.

[0120] Optionally, in order to perform an overall analysis of the service data collected by each terminal device to facilitate timely problem discovery. The service analysis result of the terminal device can also be sent to the Internet of Things cloud platform according to the verification result.

[0121] For example, if the service data verification of a certain terminal device fails, an alarm event for the service data of the terminal device can be generated, and the alarm event for the service data of the terminal device can be sent to the Internet of Things cloud platform, so that the user can view and process the alarm event for the service data of the terminal device in a timely manner on the Internet of Things cloud platform, improving the stability and reliability of the operation of the terminal device.

[0122] In summary, the embodiment of the present application provides a data processing method for an Internet of Things gateway. In this solution, mainly the obtained list of terminal devices is traversed first to obtain the communication parameters and physical model instances of each terminal device stored on the list of terminal devices. Among them, the same type of terminal device is instantiated with the same physical model to obtain the physical model instances of each terminal device; that is, according to the device information of the terminal device, multiple different models are constructed, and the terminal devices corresponding to the device information with the same attributes are instantiated with the same model. Then, based on the model instances after instantiation of each terminal device, the service data collected by each terminal device is uniformly managed, improving the processing efficiency of the Internet of Things gateway for various types of service data, and avoiding the problem of low processing efficiency of the Internet of Things gateway for data caused by the need to perform protocol configuration or protocol customization development for different terminal devices to be connected, resulting in a large amount of repetitive work such as terminal device access reuse, debugging, and operation and maintenance.

[0123] In addition, read the pre-defined service list from the physical model instances of each terminal device, traverse the service lists of each terminal device, obtain the execution commands corresponding to the service information of each terminal device, and use the execution commands corresponding to the service information of each terminal device and the communication parameters of each terminal device to obtain the service data of each terminal device. Then, based on the physical model instances of each terminal device, verify the service data of each terminal device. Finally, according to the verification results, send the service analysis results of the terminal device to the IoT cloud platform, realizing the overall analysis of the service data collected by each terminal device to facilitate timely problem discovery.

[0124] The following embodiments will specifically explain how to verify the service data of each terminal device based on the physical model instances of each terminal device in step S204 above.

[0125] Optionally, the physical model instance includes pre-defined dynamic attributes, which are used to limit the range of the service data of each terminal device. In step S204 above, it includes:

[0126] Based on the dynamic attributes in the physical model instances of each terminal device, compare the service data of the terminal device with the pre-defined thresholds in the dynamic attributes to determine whether the service data of each terminal device passes the verification.

[0127] In this embodiment, the physical model will be introduced first.

[0128] Specifically, the physical model is a digital description of the terminal devices (signals) used in the integrated energy system in the physical space. By standardizing the unified modeling method for all terminal devices connected to the Internet of Things, a description model of terminal device data information is constructed to realize a unified description model for all terminal device data in the Internet of Things, and support the interactive application of various business terminal data information in the integrated energy application among business applications, IoT management platforms, and edge IoT agents.

[0129] In this embodiment, the physical model includes but is not limited to: model identifier, static attributes, dynamic attributes, event attributes, and service attributes. Specifically, as shown in Table 1, Table 2, and Table 3.

[0130] Table 1 Static / Dynamic Attribute Structure

[0131] Name Type Required Description identified String Yes Object Model Number of Belonging name Sting Yes Attribute Name accessMode String Yes Release Accessible required String Yes Is Required dataType Sting Yes Data Type property String Yes Static / Dynamic Attribute Differentiation

[0132] Table 2 Event Attribute Structure

[0133]

[0134] Table 3 Service Attribute Structure

[0135]

[0136] In this embodiment, continuing with the physical model instance 100001 of the electric energy meter mentioned in the above embodiment as an example, for the dynamic property "dynamicProperties" in the physical model instance 100001 of the electric energy meter, for example, in the dynamic property "dynamicProperties", the predefined range of the collected "current" is: the minimum value "min" is "0.0001", the maximum value "max" is "99999", and the predefined range of the collected "phase A voltage" is: the minimum value "min" is "0.0001", the maximum value "max" is "99999", etc.

[0137] Therefore, the current collected by the electric energy meter can be compared with the predefined range of "current" in the dynamic property to determine whether the current collected by the electric energy meter falls within the defined range. For example, if the current I1 collected by the electric energy meter at time t1 is 0.00001 A, that is, the current I1 does not fall within the range of [0.0001, 99999], it can be determined that the current I1 collected by the current electric energy meter is abnormal, that is, it fails the verification; if the current I2 collected by the electric energy meter at time t2 is 0.0009 A, that is, the current I2 falls within the range of [0.0001, 99999], it can be determined that the current I2 collected by the current electric energy meter is normal, that is, it passes the verification.

[0138] The following embodiments will specifically explain how to send the service analysis result of the terminal device to the Internet of Things cloud platform according to the verification result in step S205 above.

[0139] Optionally, referring to Figure 3 As shown, the above step S205 includes:

[0140] S301. If the verification result is that the verification fails, an out-of-limit event corresponding to the service data with verification failure is created based on the physical model instance of the terminal device, and the out-of-limit event corresponding to the service data with verification failure and the identifier of the terminal device are sent to the Internet of Things cloud platform.

[0141] Based on the above embodiment, for example, if the current I1 collected by the electric energy meter at time t1 is 0.00001 A and fails the verification, an out-of-limit event corresponding to the verification current I1 can be created based on the physical model instance of the electric energy meter, and the out-of-limit event corresponding to the current I1 and the identifier 10000abcd of the electric energy meter are sent to the Internet of Things cloud platform, so that users can view and process the out-of-limit event of the current I1 collected by the electric energy meter in a timely manner on the Internet of Things cloud platform, improving the stability and reliability of the operation of the electric energy meter.

[0142] S302. If the verification result is passed, save the business data with passed verification to the data sharing library.

[0143] S303. Analyze and process the business data with passed verification to obtain an analysis result, and upload the analysis result, the business data with passed verification, and the identifier of the terminal device to the Internet of Things cloud platform.

[0144] Exemplarily, for example, the analysis result may refer to the prediction of the current values collected by the electricity meter in a future period of time, so as to evaluate the electricity consumption situation according to the prediction result.

[0145] Based on the above embodiments, for example, if the current I2 = 0.0009A collected by the electricity meter at time t2 passes the verification, the current I2 collected by the electricity meter can be saved to the data sharing library, and the current I2 collected by the electricity meter is analyzed and processed to obtain an analysis result. Then, the analysis result, the current I2 with passed verification, and the identifier 10000abcd of the electricity meter are uploaded to the Internet of Things cloud platform, so that the user can view the operation status of the electricity meter 10000abcd on the Internet of Things cloud platform in a timely manner.

[0146] Optionally, in the present application, in order to solve the problem that the protocol conversion Internet of Things gateways provided in the prior art do not provide a unified edge computing framework integrating container technology, resulting in the inability to manage each application program running on the protocol conversion Internet of Things gateway, making the development and maintenance of edge computing functions difficult, it is proposed to adopt the Docker integrated container management technology to integrate the event processing application program, the edge computing application program, and the protocol application program running on the protocol conversion Internet of Things gateway into the Docker container, so as to realize functions such as business isolation, update, operation and maintenance, and service startup of each application program, thereby improving the data processing efficiency of the Internet of Things gateway.

[0147] First, introduce the functions of the event processing application program.

[0148] Optionally, an event processing application program runs on the protocol conversion Internet of Things gateway; creating an out-of-limit event corresponding to the business data with failed verification based on the physical model instance of the terminal device in the above step S301 includes:

[0149] The event processing application program creates an out-of-limit event corresponding to the business data with failed verification based on the physical model instance of the terminal device, and returns the out-of-limit event corresponding to the business data with failed verification.

[0150] In this embodiment, for example, the event processing application APP can create an out-of-limit event corresponding to the current I1 with failed verification based on the event attributes in the physical model instance 100001 of the electricity meter (shown in Table 2 above), and return the out-of-limit event corresponding to the current I1. In this way, it is possible for the dedicated event processing application APP to create out-of-limit events corresponding to business data with failed verification, meeting different business processing requirements and effectively improving the data processing efficiency of the IoT gateway.

[0151] Second, introduce the functions of the edge computing application.

[0152] Optionally, the protocol conversion IoT gateway runs an edge computing application. The above step S304 analyzes and processes the verified business data to obtain an analysis result, including:

[0153] The edge computing application analyzes and processes the verified business data to obtain an analysis result and returns the analysis result.

[0154] In this embodiment, for example, the edge computing application APP can analyze and process the verified business data I2 to obtain an analysis result and return the analysis result. In this way, it is possible for the dedicated edge computing application APP to perform edge computing on the verified business data, effectively improving the data processing efficiency of the IoT gateway.

[0155] Third, introduce the functions of the protocol application.

[0156] Optionally, the protocol conversion IoT gateway runs a protocol application; as shown in Figure 4 The above step S203 analyzes and processes the verified business data to obtain an analysis result, including:

[0157] S401. If the terminal device is a non-intelligent terminal device, send the execution command corresponding to the service information of the terminal device and the communication parameters of the terminal device to the protocol application.

[0158] It should be understood that if a certain terminal device is an intelligent terminal device, then the terminal device has the function of data communication with the IoT gateway based on its own protocol type.

[0159] In this embodiment, if a certain terminal device is a non-intelligent terminal device, it is necessary to assemble the execution command corresponding to the service information of the terminal device and the communication parameters of the terminal device, and publish the assembled result to the data bus.

[0160] S402. The protocol application determines the target protocol type corresponding to the execution command according to the pre-defined protocol model.

[0161] Among them, the protocol model is used to characterize the mapping relationship between execution commands and protocol instructions.

[0162] In this embodiment, the protocol model mainly targets terminal devices that only support protocol communication for data exchange, such as terminal devices using communication methods like Modbus and DLT645. In the definition of the thing model, for this type of terminal device, it is impossible to directly send commands to obtain corresponding attribute data. Instead, corresponding information needs to be obtained through protocol communication parsing. Therefore, it is necessary to define the mapping relationship between commands and protocol instructions for this type of terminal device. The protocol command structure is as shown in the following example:

[0163]

[0164]

[0165]

[0166] S403. The protocol application program obtains the service data of the terminal device according to the target protocol type and returns the service data of the terminal device.

[0167] Based on the above embodiment, the protocol application program APP receives the assembled result from the data bus, determines the target protocol type corresponding to the execution command included in the assembled result according to the assembled result and the pre-defined protocol model, and then, according to the target protocol type, obtains the service data collected by the terminal device and returns the service data collected by the terminal device in the form of a key-value pair result.

[0168] The following embodiments will specifically explain how to configure to obtain an instance of the thing model of a certain terminal device.

[0169] Optionally, as shown in Figure 5 before the above step S201, it further includes:

[0170] S501. Determine the target thing model corresponding to the terminal device according to the type of the terminal device input by the user.

[0171] In this embodiment, the same type of terminal device uses the same thing model. For example, if the terminal device A to be connected to the Internet of Things is an electric energy meter, that is, the user inputs the type of the terminal device A as an electric energy meter, then based on the type of the terminal device A, the target thing model corresponding to the terminal device A can be further determined as 100001.

[0172] S502. Establish an instance of the thing model of the terminal device according to the configuration information of the terminal device input by the user and the target thing model.

[0173] Among them, the device information of the terminal device may include, but is not limited to: static attributes, dynamic attributes, event attributes, and service attributes. Among them, the service attributes include: service information and the execution commands corresponding to the service information.

[0174] S503. Add the communication parameters of the terminal device and the physical model instance to the list of terminal devices.

[0175] In this embodiment, the configuration information such as the static attributes, dynamic attributes, event attributes, and service attributes of the terminal device A input by the user can be filled into the corresponding configuration areas in the determined target physical model respectively to construct the physical model instance of the terminal device A. At the same time, the communication parameters of the terminal device A and the physical model instance are added to the list of terminal devices.

[0176] Optionally, as shown in Figure 6 The overall flowchart of a data processing method for an Internet of Things gateway provided by an embodiment of the present application is also shown. The method includes:

[0177] S601. Traverse the list of terminal devices to obtain the predefined service list in the physical model instance of each terminal device.

[0178] S602. Traverse the service list of each terminal device to obtain the execution commands corresponding to the service information of each terminal device.

[0179] S603. Determine whether the terminal device is an intelligent terminal device. If so, execute step S604. If not, jump to step S605.

[0180] S604. Obtain the service data of each terminal device according to the execution commands corresponding to the service information of each terminal device and the communication parameters of each terminal device, and jump to step S607.

[0181] S605. Send the execution commands corresponding to the service information of the terminal device and the communication parameters of the terminal device to the protocol application program.

[0182] S606. The protocol application program determines the target protocol type corresponding to the execution command according to the predefined protocol model, obtains the service data of the terminal device according to the target protocol type, and returns the service data of the terminal device.

[0183] S607. Based on the physical model instance of each terminal device, verify the service data of each terminal device to obtain a verification result.

[0184] S608. If the verification result fails, the event handling application creates an out-of-limit event corresponding to the business data with failed verification based on the physical model instance of the terminal device, returns the out-of-limit event corresponding to the business data with failed verification, and sends the out-of-limit event corresponding to the business data with failed verification and the identifier of the terminal device to the Internet of Things cloud platform.

[0185] S609. If the verification result passes, save the business data with passed verification to the data sharing library.

[0186] S610. The edge computing application analyzes and processes the business data with passed verification to obtain an analysis result, returns the analysis result, and uploads the analysis result, the business data with passed verification, and the identifier of the terminal device to the Internet of Things cloud platform.

[0187] Optionally, the overall implementation steps and the beneficial effects of the data processing method of the Internet of Things gateway provided in this application embodiment have been described in detail in the foregoing specific embodiments, and will not be elaborated herein one by one.

[0188] Optionally, this application also proposes that a power-off protection module can be added to the protocol conversion Internet of Things gateway structure design, that is, a thin-film battery installation is added to the protocol conversion Internet of Things gateway structure design to ensure that it has a power-off protection function without increasing the device installation space. The designed backup power supply supports a power supply time of more than 30 minutes, realizes the finishing work of data transmission and processing between the gateway device and the Internet of Things cloud platform, ensures that the Internet of Things cloud platform clearly knows the reason for the device operation failure, provides a decision reference for device maintenance processing, and integrates device power-off alarms as Figure 7 shown.

[0189] S701. The power supply service module of the protocol conversion Internet of Things gateway obtains the operation data of each terminal device.

[0190] S702. The protocol conversion Internet of Things gateway uploads the operation data of each terminal device to the Internet of Things cloud platform.

[0191] S703. The Internet of Things cloud platform receives the operation data of each terminal device.

[0192] S704. The Internet of Things cloud platform determines whether the power supply status of each terminal device has changed.

[0193] S705. If so, confirm whether the number of cycles of the operation data of each received terminal device is satisfied.

[0194] S706. If so, change the power supply status of the terminal device.

[0195] S708. Determine whether the substation has lost power.

[0196] S709. If so, the Internet of Things cloud platform generates a power loss alarm.

[0197] In this embodiment, it solves the problem in the prior art that the protocol conversion Internet of Things gateway does not provide sufficient design considerations for its own anomalies such as the power supply state, resulting in the inability to distinguish between power supply and network communication failures.

[0198] Based on the same inventive concept, an Internet of Things gateway data processing device corresponding to the data processing method of the Internet of Things gateway is also provided in the embodiments of the present application. Since the principle of solving problems by the device in the embodiments of the present application is similar to the data processing method of the Internet of Things gateway in the above embodiments of the present application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be elaborated.

[0199] Reference Figure 8 As shown, an Internet of Things gateway data processing device is also provided in the embodiments of the present application, which is applied to a protocol conversion Internet of Things gateway. The protocol conversion Internet of Things gateway is respectively connected to at least one terminal device and an Internet of Things cloud platform; the device includes:

[0200] An acquisition module 801, configured to traverse the list of terminal devices, acquire the service list predefined in the physical model instances of each terminal device. Among them, the communication parameters and physical model instances of each predefined terminal device are stored on the list of terminal devices. The physical model is used to describe the data information of each terminal device, and the same type of terminal devices use the same physical model; traverse the service list of each terminal device, and acquire the execution commands corresponding to the service information of each terminal device; according to the execution commands corresponding to the service information of each terminal device and the communication parameters of each terminal device, acquire the service data of each terminal device;

[0201] A verification module 802, configured to verify the service data of each terminal device based on the physical model instances of each terminal device;

[0202] A sending module 803, configured to send the service analysis result of the terminal device to the Internet of Things cloud platform according to the verification result.

[0203] Optionally, the physical model instance includes predefined dynamic attributes, and the dynamic attributes are used to limit the range of the service data of each terminal device;

[0204] The verification module 802 is further configured to:

[0205] Based on the dynamic attributes in the physical model instances of each terminal device, compare the service data of the terminal device with the thresholds predefined in the dynamic attributes to determine whether the service data of each terminal device passes the verification.

[0206] Optionally, the sending module 803 is further configured to:

[0207] If the verification result fails, an out-of-limit event corresponding to the business data that fails the verification is created based on the physical model instance of the terminal device, and the out-of-limit event corresponding to the business data that fails the verification and the identifier of the terminal device are sent to the Internet of Things cloud platform;

[0208] If the verification result passes, the business data that passes the verification is saved to the data sharing library;

[0209] The business data that passes the verification is analyzed and processed to obtain an analysis result, and the analysis result, the business data that passes the verification, and the identifier of the terminal device are uploaded to the Internet of Things cloud platform.

[0210] Optionally, the protocol conversion Internet of Things gateway runs an event processing application;

[0211] The sending module 803 is further configured to:

[0212] An out-of-limit event corresponding to the business data that fails the verification is created by the event processing application based on the physical model instance of the terminal device, and the out-of-limit event corresponding to the business data that fails the verification is returned.

[0213] Optionally, the protocol conversion Internet of Things gateway runs an edge computing application;

[0214] The sending module 803 is further configured to:

[0215] The business data that passes the verification is analyzed and processed by the edge computing application to obtain an analysis result, and the analysis result is returned.

[0216] Optionally, the protocol conversion Internet of Things gateway runs a protocol application;

[0217] The obtaining module 801 is further configured to:

[0218] If the terminal device is a non-intelligent terminal device, the execution command corresponding to the service information of the terminal device and the communication parameters of the terminal device are sent to the protocol application;

[0219] The protocol application determines the target protocol type corresponding to the execution command according to a pre-defined protocol model, where the protocol model is used to represent the mapping relationship between the execution command and the protocol instruction;

[0220] The protocol application obtains the business data of the terminal device according to the target protocol type and returns the business data of the terminal device.

[0221] Optionally, the device further includes:

[0222] A determination module, configured to determine a target physical model corresponding to the terminal device according to the type of the terminal device input by the user;

[0223] A building module, configured to build an instance of the object model of the terminal device according to the configuration information of the terminal device input by the user and the target object model;

[0224] An adding module, configured to add the communication parameters of the terminal device and the instance of the object model to the list of terminal devices.

[0225] The above device is used to execute the method provided in the foregoing embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.

[0226] The above modules may be one or more integrated circuits configured to implement the above method. For example: one or more Application Specific Integrated Circuits (ASICs), or, one or more digital signal processors (DSPs), or, one or more Field Programmable Gate Arrays (FPGAs), etc. Again, when a certain module above is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processors that can call program code. Again, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0227] Figure 9 This is a schematic structural diagram of a gateway device provided by an embodiment of the present application; this gateway device is used to implement the data processing method of the Internet of Things gateway provided by the present application.

[0228] As Figure 9 shown, the electronic device includes a memory 901 and a processor 902. Among them, the memory 901 and the processor 902 are directly or indirectly electrically connected to each other to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.

[0229] The memory 901 stores software function modules stored in the memory 901 in the form of software or firmware. The processor 902 executes various functional applications and data processing by running the software programs and modules stored in the memory 901, that is, realizes the data processing method of the Internet of Things gateway in the embodiment of the present application.

[0230] Among them, the memory 901 can be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), etc. Among them, the memory 901 is used to store a program, and after receiving an execution instruction, the processor 902 executes the program.

[0231] The processor 902 may be an integrated circuit chip with the ability to process signals. The above-mentioned processor 902 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.

[0232] Optionally, the present application also provides a program product, such as a computer-readable storage medium, including a program that is used to execute the above method embodiments when executed by a processor.

[0233] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the devices or units can be in electrical, mechanical or other forms.

[0234] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0235] In addition, each functional unit in various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware, or in the form of a combination of hardware and software functional units.

[0236] The integrated unit implemented in the form of software functional units can be stored in a computer-readable storage medium. The above-mentioned software functional units are stored in a storage medium and include several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute some steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (English: Read-Only Memory, abbreviated as: ROM), random access memories (English: Random Access Memory, abbreviated as: RAM), magnetic disks, or optical discs that can store program codes.

Claims

1. A data processing method for an Internet of Things gateway, characterized in that, it is applied to a protocol conversion Internet of Things gateway, and the protocol conversion Internet of Things gateway is respectively connected to at least one terminal device and an Internet of Things cloud platform; the method includes: Traverse the list of terminal devices to obtain the service list predefined in the physical model instances of each terminal device, where the communication parameters and the physical model instances of each terminal device predefined are stored on the list of terminal devices, and the physical model is used to describe the data information of each terminal device, and the same type of terminal devices use the same physical model; Traverse the service lists of each terminal device to obtain the execution commands corresponding to the service information of each terminal device; Obtain the service data of each terminal device according to the execution commands corresponding to the service information of each terminal device and the communication parameters of each terminal device; Based on the physical model instances of each terminal device, verify the service data of each terminal device; According to the verification result, send the service analysis result of the terminal device to the Internet of Things cloud platform; wherein, the physical model instance includes predefined dynamic attributes, and the dynamic attributes are used to limit the range of the service data of each terminal device; The step of verifying the service data of each terminal device based on the physical model instances of each terminal device includes: Based on the dynamic attributes in the physical model instances of each terminal device, compare the service data of the terminal device with the thresholds predefined in the dynamic attributes to determine whether the service data of each terminal device passes the verification.

2. The method according to claim 1, characterized in that, The step of sending the service analysis result of the terminal device to the Internet of Things cloud platform according to the verification result includes: If the verification result is that the verification fails, create an out-of-limit event corresponding to the service data that fails the verification based on the physical model instance of the terminal device, and send the out-of-limit event corresponding to the service data that fails the verification and the identifier of the terminal device to the Internet of Things cloud platform; If the verification result is that the verification passes, save the service data that passes the verification to the data sharing library; Analyze and process the service data that passes the verification to obtain an analysis result, and upload the analysis result, the service data that passes the verification, and the identifier of the terminal device to the Internet of Things cloud platform.

3. The method according to claim 2, characterized in that, The protocol conversion Internet of Things gateway runs an event processing application program; The step of creating an out-of-limit event corresponding to the service data that fails the verification based on the physical model instance of the terminal device includes: The event processing application program creates an out-of-limit event corresponding to the service data that fails the verification based on the physical model instance of the terminal device, and returns the out-of-limit event corresponding to the service data that fails the verification.

4. The method according to claim 2, characterized in that, The protocol conversion Internet of Things gateway runs an edge computing application program; Analyzing and processing the business data that has passed the verification to obtain an analysis result, including: The edge computing application analyzes and processes the business data that has passed the verification to obtain an analysis result and returns the analysis result.

5. The method according to claim 1, wherein, The protocol conversion IoT gateway runs a protocol application; The obtaining of the business data of each terminal device according to the execution command corresponding to the service information of each terminal device and the communication parameters of each terminal device includes: If the terminal device is a non-intelligent terminal device, the execution command corresponding to the service information of the terminal device and the communication parameters of the terminal device are sent to the protocol application; The protocol application determines the target protocol type corresponding to the execution command according to a pre-defined protocol model, wherein the protocol model is used to represent the mapping relationship between the execution command and the protocol instruction; The protocol application obtains the business data of the terminal device according to the target protocol type and returns the business data of the terminal device.

6. The method according to any one of claims 1-5, wherein, Before traversing the list of terminal devices to obtain the pre-defined service list in the physical model instance of each terminal device, it further includes: Determining the target physical model corresponding to the terminal device according to the type of the terminal device input by the user; Establishing a physical model instance of the terminal device according to the configuration information of the terminal device input by the user and the target physical model; Adding the communication parameters and the physical model instance of the terminal device to the list of terminal devices.

7. A data processing device for an IoT gateway, wherein, Applied to a protocol conversion IoT gateway, the protocol conversion IoT gateway is respectively connected to at least one terminal device and an IoT cloud platform; the device includes: An obtaining module, configured to traverse the list of terminal devices to obtain the pre-defined service list in the physical model instance of each terminal device, wherein the list of terminal devices stores the pre-defined communication parameters and the physical model instance of each terminal device, wherein the physical model is used to describe the data information of each terminal device, and the same type of terminal device uses the same physical model; traversing the service list of each terminal device to obtain the execution command corresponding to the service information of each terminal device; obtaining the business data of each terminal device according to the execution command corresponding to the service information of each terminal device and the communication parameters of each terminal device; A verification module, configured to verify the business data of each terminal device based on the physical model instance of each terminal device; A sending module, configured to send the business analysis result of the terminal device to the IoT cloud platform according to the verification result; The verification module, specifically: Wherein, the physical model instance includes pre-defined dynamic attributes, and the dynamic attributes are used to limit the range of the business data of each terminal device; Based on the dynamic attributes in the physical model instances of each of the terminal devices, compare the service data of the terminal devices with the thresholds predefined in the dynamic attributes to determine whether the service data of each of the terminal devices passes the verification.

8. A gateway device, characterized in that, it includes: A processor, a storage medium and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device runs, the processor communicates with the storage medium through the bus. The processor executes the machine-readable instructions to perform the steps of the method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, a computer program is stored on the storage medium, and when the computer program is run by a processor, it performs the steps of the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Abstract equipment creating method and device

    CN104866650A

  • Construction method and calling system of internet of things compound model

    CN114371883A

  • Data processing method, Internet of Things system, electronic equipment and computer storage medium

    CN115102981A