Multi-protocol multi-device access system and method based on industrial Internet of Things platform
By adopting multi-protocol parser and low-code data format conversion module on the industrial Internet of Things platform, the flexibility and scalability of multi-protocol multi-device access is solved, and lower cost and efficient device access and data processing is achieved.
Patent Information
- Application Number
- CN202411717078.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-02-28
AI Technical Summary
Existing industrial IoT platforms have problems with high development costs, difficulty in maintenance, lack of flexibility and scalability in multi-protocol and multi-device access, especially when facing differences in new protocols and device data formats.
It adopts a multi-protocol multi-device access system based on the industrial Internet of Things platform, and implements device access and multi-protocol analysis through several protocol parsers, and uses a low-code data format conversion module to convert different protocols and device data into a unified data format, supporting multiple communication protocols such as HTTP, MQTT, Modbus, etc.
It improves the flexibility and convenience of equipment access, reduces development and maintenance costs, and significantly improves the compatibility and scalability of industrial IoT platforms.
Smart Images

Figure CN119544829A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial Internet of Things, and in particular to a multi-protocol multi-device access system and method based on an industrial Internet of Things platform. Background Art
[0002] With the rapid development of industrial Internet of Things technology, more and more devices need to be connected to the industrial Internet of Things platform for centralized management and monitoring. Due to the wide variety of devices and different communication protocols, how to achieve convenient access of multiple protocols and multiple devices has become a problem. Traditional access methods usually require writing dedicated access codes for each protocol and device, which has high development costs and difficult maintenance, and is not conducive to the expansion of the platform and the improvement of compatibility.
[0003] Current multi-protocol multi-device access solutions usually face the following problems: 1) Support for new protocols requires a lot of development work and lacks flexibility and scalability; 2) Different data formats of devices make data integration and analysis difficult; 3) When users access devices and convert data formats, the operations are complicated and inefficient. Summary of the invention
[0004] The object of the present invention is to provide a multi-protocol multi-device access system and method based on an industrial Internet of Things platform.
[0005] In order to achieve the above object, the present invention provides a multi-protocol multi-device access system based on an industrial Internet of Things platform, comprising: Several protocol analyzers for device access and multi-protocol analysis; A low-code data format conversion module, which is used to convert data parsed by several protocol parsers into a unified data format for the industrial Internet of Things platform; Data in a unified data format is reported to the application end of the industrial Internet of Things platform.
[0006] In a preferred implementation scheme, several protocol parsers are provided in the device access layer in the form of plug-ins, and the device access layer is also provided with a predefined protocol template; the device information corresponding to each protocol parser is configured in the protocol adaptation layer; the several protocol parsers include an MQTT protocol parser, an HTTP protocol parser, a Modbus protocol parser and a database docking parser.
[0007] Furthermore, the low-code data format conversion module includes: Data model, used to represent JSON data structure; The field mapping module is used to complete the field mapping according to the mapping rules between the fields in the source data and the target fields in the data format unified by the platform; The data type conversion module completes the data type conversion according to the conversion rules when the type of the source data is inconsistent with the type of the target field; A conditional module, filtering data according to a filtering condition and / or computing data according to a computing condition; The missing field setting module, after field mapping, identifies whether there are fields with missing values in the target data structure, and sets the missing fields according to the missing field setting rules; Converted data output module: outputs converted data.
[0008] In a preferred implementation scheme, the low-code data format conversion process is: first perform field mapping, then perform data type conversion, then perform conditional judgment, and finally perform missing field setting and converted data output.
[0009] Furthermore, several protocol parsers and low-code data format conversion modules are located in the device access layer of the IoT middleware. The IoT middleware also includes a data processing module. The data with a unified data format converted by the low-code data format conversion module is sent to the data processing module, which calculates, filters, cleans and stores the data. The data can then be uploaded to the application end of the industrial IoT platform.
[0010] Preferably, when performing conditional judgment, the priority of operation is higher than the priority of filtering.
[0011] Another object of the present invention is to disclose a multi-protocol multi-device access method based on an industrial Internet of Things platform, comprising the following steps: Use several protocol analyzers to analyze the data reported by the connected devices; Convert the data parsed by several protocol parsers into the unified JSON data format of the industrial Internet of Things platform; Data in a unified data format is reported to the application end of the industrial Internet of Things platform.
[0012] In a preferred implementation scheme, the low-code data format conversion process is: first perform field mapping, then perform data type conversion, then perform conditional judgment, and finally perform missing field setting and converted data output.
[0013] Preferably, a data model is set up to characterize the JSON data structure; field mapping is completed according to the mapping rules between the fields in the source data and the target fields in the platform's unified data format; data type conversion is completed according to the conversion rules when the type of the source data is inconsistent with the type of the target field; data is filtered according to the filtering conditions and / or data is calculated according to the calculation conditions; it is identified whether there are fields with missing values in the target data structure, and the missing fields are set according to the missing field setting rules; and the converted data is output.
[0014] Furthermore, several protocol parsers are provided in the device access layer in the form of plug-ins, and the device access layer is also provided with a predefined protocol template; the device information corresponding to each protocol parser is configured in the protocol adaptation layer; the several protocol parsers include an MQTT protocol parser, an HTTP protocol parser, a Modbus protocol parser and a database docking parser.
[0015] Compared with the prior art, the present invention has the following significant technical effects: the system and method of the present invention can support the access of devices of multiple protocols, and use low-code data format conversion to complete data format conversion. It not only improves the flexibility and convenience of device access, but also reduces the development and maintenance costs, and significantly improves the compatibility and scalability of the industrial Internet of Things platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a schematic diagram of a multi-protocol and multi-device access system based on the industrial Internet of Things platform. DETAILED DESCRIPTION
[0017] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0018] The technical contents not described in detail in this article all adopt the existing technology.
[0019] The present invention provides a multi-protocol multi-device access method based on an industrial Internet of Things platform, the method comprising the following steps: Build the device access layer: Build the device access layer on the IoT middleware. This layer has multi-protocol parsing capabilities and can parse data from multiple protocols such as HTTP, MQTT, Modbus, and databases. Support for different protocols is achieved through configuration, allowing the platform to flexibly access various devices.
[0020] In addition to setting up multiple protocol parsers, the device access layer also sets up a low-code data format conversion module: In order to reduce development and maintenance costs, the present invention uses low-code technology to convert data formats. Through the configuration of a visual interface, format conversion and standardized processing of different device data are realized. Users can easily complete the access and conversion of device data without writing complex codes.
[0021] Data parsing and storage: The device data parsed by the protocol parser is converted into a unified data format by the low-code data format conversion module and then sent to the data processing module for further processing. The data processing module will calculate, filter, clean, and store the data for subsequent analysis and visualization.
[0022] Data converted into low-code data format can be directly reported to the application end of the IoT platform, or it can be reported to the application end of the IoT platform after data processing.
[0023] Scalability and compatibility: The access method of the present invention has good scalability and compatibility. By manually adding new protocol parser plug-ins, more types of communication protocols can be easily supported. In addition, the use of low-code technology also enables the platform to quickly adapt to the data formats of different devices, improving the compatibility of the platform.
[0024] The industrial Internet of Things platform constructed by the present invention includes a device access layer, a data processing layer (i.e., a data processing module) and a data display layer.
[0025] The device access layer completely parses the data format corresponding to the relevant protocols (such as HTTP, MQTT, Modbus, database, etc.), and then completes the data format conversion through low-code methods, converting it into a unified data format for the platform. When completing the data format conversion through low-code methods, the visual interface of the IoT platform (located in the data display layer) provides a general data format conversion configuration interface, allowing users to configure data conversion rules through the visual interface to achieve standardized processing of device data. For complex formats that cannot be completed through the configuration interface, the device access layer also provides a Python script setting entry so that users can customize the original data format and platform data format conversion rules through Python scripts. The advantage of data format conversion at the device access layer is that device data docking can be quickly completed through low-code data format conversion methods.
[0026] In the device access layer, multiple protocol parsers are set up to support HTTP, MQTT, Modbus, database and other protocols. Each protocol parser is responsible for parsing the device data of the corresponding protocol.
[0027] The low-code data format conversion module allows developers or users to configure data conversion rules through a visual interface. When the source data after protocol parsing enters the low-code data format conversion module, the low-code data format conversion module obtains and sends all fields of the source data and all fields of the data model to the visual interface, which provides a comparison of all fields of the source data and all fields of the data model, making it convenient for users to configure data conversion rules through the visual interface. It usually includes the following aspects: Field mapping: The low-code data format conversion module provides a field mapping configuration function through a visual interface. Developers or users need to specify the mapping relationship between the fields in the source data (such as the data fields sent by the device) and the target fields in the data model used inside the IoT platform (that is, the data model in the low-code data format conversion module, that is, the target data structure). For example, map the "temp" field sent by the device to the "temperature" field of the platform model. The specific mapping method of the data value is: directly fill the source data field value into the field value corresponding to the target data structure, or calculate the source data field value according to a predefined calculation formula and then fill the calculation result into the field value corresponding to the target data structure.
[0028] Data type conversion: The low-code data format conversion module provides data type conversion function through a visual interface; when the data type of the source data field is inconsistent with the predefined data type of the corresponding field in the target data structure, the data type of the source data field is converted to the predefined data type of the corresponding field in the target data structure. For example, when the type of a field in the source data does not match the type of the target field, the developer or user specifies the conversion rules, such as converting the temperature value of the string type in the source data to a floating point number.
[0029] Filter conditions: The low-code data format conversion module provides a filter condition function through a visual interface. Developers or users can set filter conditions to filter out unnecessary data. For example, only keep data with temperature values within a specific range.
[0030] Calculation conditions: The low-code data format conversion module provides calculation condition functions through a visual interface. Developers or users can configure rules for simple operations on data, such as calculating the average, maximum, and minimum values of data in a certain field.
[0031] Aggregation rules: The low-code data format conversion module provides aggregation rule configuration function through a visual interface. For data that needs to be aggregated (the same field or different fields), developers or users can specify the aggregation method (such as sum, average) and aggregation dimension (such as time, device ID).
[0032] Missing field setting: After completing field mapping through the field mapping module, identify whether there are fields with missing values in the target data structure, and set the missing fields according to the missing field setting rules; for example, set default values for these fields; Converted data output: Output the converted data according to the target data structure.
[0033] Through the visual interface, developers or users can directly configure fields, select conversion types, set conditions, etc. without writing complex code. This approach lowers the technical threshold and enables non-technical personnel to complete the configuration of data conversion rules.
[0034] The low-code data format conversion module encapsulates complex conversion logic through predefined conversion templates (which are pre-defined by the low-code data format conversion module and displayed in the visual interface for configuring rules. The conversion templates can be used to configure missing field setting rules, aggregation rules, operation condition rules, filter condition rules, data type conversion rules, and field mapping rules) and rule bases (all conversion rules set by developers or users will be stored in the rule base). Users only need to complete the setting of data conversion rules through simple configuration. The low-code approach not only lowers the technical threshold, but also improves development efficiency, making data format conversion more flexible and efficient.
[0035] Low-code data format conversion has certain requirements for raw data. The raw data should have certain standardization and consistency, and need to be able to match predefined conversion rules. For example, the name and data type of the data field should comply with certain standards or conventions. For example: The Modbus protocol frame is parsed by the Modbus protocol parser to generate data in JSON format, and then the data structure conversion can be completed through low code. If only the Modbus data frame is used as the raw data, the low-code data format conversion module cannot complete the data structure conversion.
[0036] The data processing layer calculates, filters, cleans and stores the received data for data analysis and visualization.
[0037] In the device access layer, new protocol parsers can be added in the form of plug-ins to support more types of communication protocols and improve the scalability and compatibility of the platform. Several protocol parsers can be used as an expandable multi-protocol access module, which not only supports existing HTTP, MQTT, Modbus and other communication protocols, but also can quickly adapt to new protocols that may appear in the future through predefined protocol templates, configuration interfaces and protocol adaptation layers. Through predefined protocol templates, configuration interfaces and protocol adaptation layers, the multi-protocol access module can parse and adapt new protocols according to different protocol types without large-scale reconstruction or development of the entire system.
[0038] Predefined agreement templates: A series of standard protocol structures and processing flow (i.e. parsing flow) templates are predefined. These templates cover the common features that different protocols may have, such as message format, field definition, encoding method, etc. When a new protocol needs to be added, developers can quickly configure it at the device access layer based on these templates without having to design it from scratch. The predefined protocol templates can define content including but not limited to: message header structure, data field type, message body encoding method, error handling mechanism, etc.
[0039] Configure the interface: The configuration interface is located at the device access layer. Its main purpose is to provide flexible configuration options. The configuration content includes but is not limited to: ① protocol identifier, which is used to distinguish different protocols; ② network parameters such as the port number and IP address of the connected device; ③ authentication method and security settings.
[0040] Protocol Adaptation Layer: It means that when adding HTTP, MQTT, Modbus and other protocol parsers through plug-ins (the protocol parser is existing and is directly added to the device access layer through plug-ins), the protocol adaptation layer is used to manage the correspondence between each protocol parser and the data of a specific device. That is, assuming that a device and the IoT middleware upload data through the HTTP protocol, the developer predefines in the protocol adaptation layer that the data uploaded by the device is parsed by the HTTP protocol parser. The configuration method is: in the protocol adaptation layer, the device ID is matched with the HTTP protocol parser (the specific configuration is completed through the configuration interface). Therefore, when the device uploads data to the IoT middleware, the multi-protocol access module searches for the protocol parser corresponding to the device in the protocol adaptation layer and directly calls the HTTP protocol parser to complete the parsing of the corresponding data.
[0041] The device access layer is mainly responsible for communicating with the device, receiving data from the device, and parsing the data according to the device's communication protocol. The device access layer also converts the original data into a unified data format for the platform for subsequent data processing. The converted data is passed to the data processing layer through internal interfaces (such as APIs, message queues, etc.). The data processing layer is responsible for further processing of these unified format data, such as data cleaning and storage. This communication method ensures the decoupling between the device access layer and the data processing layer, allowing the system to respond to data of different protocols more flexibly, while also facilitating system maintenance and expansion.
[0042] Multi-protocol access can be implemented by using plug-in services. Each plug-in parses a protocol, and new protocols are added by adding plug-in services. Different plug-ins are decoupled; all plug-ins follow a unified interface specification to facilitate loading, calling, and management of plug-ins.
[0043] A plug-in is a protocol parser. Through the plug-in service mode, the IoT platform can flexibly schedule these protocol parsers to meet the access requirements of different devices.
[0044] Among them, the MQTT protocol parser is used to parse the MQTT protocol data uploaded by the device into data in JSON format; the HTTP protocol parser is used to parse the HTTP protocol data uploaded by the device into data in JSON format; the Modbus protocol parser is used to parse the Modbus protocol data uploaded by the device into data in JSON format; all of them are prior art. When the parsed JSON format data is consistent with the target data structure in the low-code data format conversion module, data processing is performed directly; otherwise, the data format conversion is implemented by the low-code data format conversion module.
[0045] The database docking parser connects to the database through the ODBC interface, parses the read data into a JSON data structure, and reports the data to the platform application end through the IoT platform API interface.
[0046] The specific process of parsing the database docking parser into a JSON data structure is as follows: ① Query data: Use SQL statements to query the required data from the database.
[0047] ②Data mapping: Map each row of data in the query results to a JSON object, and map each column of data to an attribute of the JSON object.
[0048] Steps for low-code data format conversion: ① Receive data parsed by the protocol parser; the exception is: when the received original data is already in JSON format, the original data is directly received and low-code data format conversion is performed without protocol parsing. Accordingly, the protocol parser information corresponding to the device will not be configured in the protocol adaptation layer.
[0049] ② Application field mapping: According to the predefined mapping rules between source data fields and target data structure fields, map the source data fields (i.e., the data received in ①) to the corresponding fields of the target data structure, where fields are variables; the specific mapping method for data values is: directly fill the source data field values into the corresponding field values of the target data structure, or calculate the source data field values according to the predefined calculation formula and then fill the calculation results into the corresponding field values of the target data structure.
[0050] ③Perform data type conversion: When the data type of the source data field is inconsistent with the data type of the corresponding field in the target data structure, the data type of the source data field is converted to the data type corresponding to the field in the target data structure according to the predefined data type conversion rules.
[0051] ④ Execute conditional judgment: According to the conditional expression in the conversion rule, perform conditional judgment on the source data (that is, determine whether there are operation conditions, filtering conditions, and aggregation conditions in turn), and execute the corresponding conversion logic according to the judgment result (the order of execution is operation, filtering, and finally aggregation).
[0052] ⑤Handle missing fields: Identify whether there are fields with missing values in the target data structure after mapping, and set default values for these fields.
[0053] ⑥Output the converted data.
[0054] The present invention realizes device access and data format conversion of multiple communication protocols through multiple protocol parsers and low-code technology, reduces development and maintenance costs, and improves the compatibility and scalability of the industrial Internet of Things platform.
[0055] Data processing: A data processing module is integrated into the IoT middleware, which receives data obtained by the device access layer of the IoT middleware and processes the data; The data processing module includes a data stream segmentation module and a parallel processing module; The data stream segmentation module segments the real-time data stream into a number of data stream sub-streams according to the time window, and each data stream sub-stream segmented according to the time window is allocated to the processing unit with the least number of current connections; The parallel processing module includes a number of processing units running simultaneously, each processing unit independently and in parallel processes the allocated data flow sub-flow; the processing unit performs data calculation, screening and cleaning on the allocated data flow sub-flow.
[0056] The data processing module further includes a storage management module; the storage management module includes a memory management module; The memory management module calculates the memory space required for data processing of the data stream substreams according to the data volume of each data stream substream and the data processing rule preset memory coefficient after the data stream segmentation module determines to allocate the data stream substreams to the corresponding processing units, and dynamically allocates the memory space to the corresponding processing units. After the corresponding processing unit completes the data processing of a single data stream substream, the memory space allocated for the single data stream substream is released.
[0057] The data processing module also includes a data processing rule module for storing data calculation, screening and cleaning rules.
[0058] When a single data flow sub-flow is allocated to the processing unit with the least current connection number, if there is more than one processing unit with the least current connection number, the data flow sub-flow is randomly allocated to one of the processing units with the least current connection number.
[0059] The parallel processing module includes 2-5 processing units. In the parallel processing module, the upper limit of the number of data flow sub-streams that are processed simultaneously is the number of CPU cores of the industrial Internet of Things platform server + 1. When the number of data flow sub-streams that need to be processed exceeds the upper limit, the extra data flow sub-streams are in a waiting state. When a data flow sub-stream in the parallel processing module completes data processing and disconnects from the corresponding processing unit, the waiting data flow sub-stream is connected to the idle processing unit. After being assigned to a data flow sub-stream, each processing unit in the parallel processing module calls the corresponding data processing rules in the data processing rule module (i.e., completes rule loading) according to the device ID and variables corresponding to each data in the data flow sub-stream to perform data processing.
[0060] When the number of data stream sub-streams that need to be processed does not exceed the upper limit, whether a data stream sub-stream can successfully connect to the parallel processing module depends on whether the total memory allocated to all processing units after the memory management module calculates the memory space required for the data stream sub-stream is not greater than the total memory that can be allocated by the memory management module. If not, it is successfully connected; if greater, there is insufficient memory, causing the data stream sub-stream to be in a waiting state.
[0061] A data structure (such as a hash table or dictionary) is established that contains all processing units and their current connection numbers (when a data stream sub-flow is assigned to a processing unit for processing, a connection is formed, and when the data stream sub-flow completes data processing, the connection will be disconnected). This data structure is located in the parallel processing module. Whenever a data stream substream allocation request arrives, the parallel processing module checks this data structure and finds the processing unit with the least number of connections (where the data stream substreams divided according to the time window need to be allocated to the processing unit with the least current connections; the data stream substreams divided according to the device ID need to be allocated to the same processing unit, and the device ID is also allocated to the processing unit with the least current connections when it appears for the first time). The memory management module then calculates the memory space required for data processing by the data stream substream to be allocated. When the required memory space plus the total memory allocated to all processing units is not greater than the total memory that can be allocated by the memory management module, the data stream substream allocation request is allocated to the processing unit and the processing unit performs data processing. At this time, the data stream substream is successfully accessed (connected); otherwise, the data stream substream to be allocated is in a waiting state, that is, it waits for the memory to be released before determining whether the required memory space plus the total memory allocated to all processing units is not greater than the total memory that can be allocated by the memory management module.
[0062] Data operation, screening and cleaning rules can be preset rules, and can also be customized. Each rule corresponds to a specific device ID and variable. Therefore, when a data flow sub-flow is connected to the processing unit for data processing, the processing unit can call the rules of the data processing rule module according to the device ID and specific variables corresponding to the data in the data flow sub-flow, and then complete the corresponding data processing.
[0063] The device access layer and data processing module of the present invention are part of the Internet of Things middleware, and the Internet of Things middleware is installed in the industrial Internet of Things platform server.
[0064] In the present invention, the total memory that can be allocated by the memory management module is 80% of the total memory M of the CPU of the industrial Internet of Things platform server.
[0065] Specifically, the memory space allocated to a single data stream sub-stream can be 80% of the total CPU memory M of the industrial Internet of Things platform server divided by the upper limit of the number of data stream sub-streams; or, the memory space allocated to a single data stream sub-stream = data volume * memory space required for a single data * preset memory coefficient a. Since the memory must store all data of the data stream sub-stream and reserve a certain amount of memory space for data processing, a is 1.1-2.
[0066] When a data stream substream in a time window is assigned to a processing unit, it is regarded as 1 connection of the processing unit (that is, the number of connections of the processing unit + 1); that is, when a single data stream substream is assigned to a processing unit, the number of connections corresponding to the processing unit + 1. A time window can be set to 2-8 seconds (preferably 5 seconds). A time window refers to the difference between the latest timestamp and the earliest timestamp of the data in a single data stream substream.
[0067] For the data stream sub-streams divided according to the time window, after the corresponding processing unit completes data processing and data push / storage for a single data stream sub-stream, the number of connections of the corresponding processing unit is reduced by 1 (that is, the connection between the data stream sub-stream and the corresponding processing unit is disconnected), and the memory management module automatically releases the memory space allocated for the single data stream sub-stream.
[0068] The storage management module also includes a cache management module. For data stream sub-streams divided according to time windows, the cache management module is used to cache in real time the intermediate results obtained by each processing unit during data processing. The intermediate results are data calculation results and data screening results. When the processing unit completes data processing of a single data stream sub-stream, the corresponding cache is automatically released.
[0069] In the parallel processing module, for the data flow sub-flows divided according to the time window, data operations are performed according to predefined operation rules; data screening is performed according to predefined screening rules; data cleaning is performed according to missing value processing rules, outlier processing rules, and data type conversion rules.
[0070] The present invention designs a flexible data processing flow for data stream sub-streams divided according to time windows, including data operation, data screening, and data cleaning. Among them, data cleaning can automatically identify and correct abnormal values and noise in the data; data screening can screen data according to predefined rules; data operation supports complex operations such as four arithmetic operations and mathematical function operations of single or multiple data.
[0071] All cleaning rules, screening rules, and operation rules can be customized by users, that is, a user-customizable interface is provided for users to define relevant rules, which has strong flexibility. Alternatively, the relevant cleaning, screening, and operation rules can be predefined by developers.
[0072] Examples of operation rules: Arithmetic operations: perform the four basic operations of addition, subtraction, multiplication and division on data.
[0073] Relational operations: equal to, not equal to, greater than, less than, etc.
[0074] Mathematical function operation: Apply mathematical functions such as exponential, logarithmic, and trigonometric functions to process data.
[0075] Logical operations: AND, OR, NOT.
[0076] The data results obtained through calculation can be more conveniently displayed in subsequent visualization.
[0077] Examples of screening rules: ① Time filtering: filter according to the time range of data generation, such as selecting data within the last week or day.
[0078] ② Equipment screening: Screening based on the equipment from which the data comes, such as selecting equipment data for a specific production line or area.
[0079] ③Threshold screening: Set thresholds for specific parameters, such as temperature, humidity, pressure, etc., and select data that exceeds or is below the threshold.
[0080] ④Logical combination screening: logically combine multiple screening conditions to meet more complex screening needs.
[0081] Examples of cleaning rules: ①Missing value processing rules: fill missing values with mean, median, mode, specific value, etc., or delete data rows containing missing values.
[0082] ②Outlier processing rules: Identify outliers based on statistical methods such as Z-score, IQR, etc., add outlier tags to outliers, or delete outliers, replace outliers with mean values or medians, etc.
[0083] ③Data type conversion rules: for example, converting a string to a numeric type, or converting a date and time string to a date and time format.
[0084] Specific steps and methods to identify missing values, outliers, and data type mismatches (as part of the cleaning rules): ① Missing value identification: Steps: Iterate through the dataset and check if the value of each field is empty or a specific marker (such as "NA", "NULL", etc.).
[0085] ②Outlier Identification: Steps: First calculate the statistics of the data (such as mean, standard deviation, median, quartiles, etc.), and then set thresholds based on these statistics to identify outliers.
[0086] Method: Z-score (standard score) and IQR (interquartile range) were used for judgment.
[0087] ③Data type mismatch identification: Steps: Check whether the data type of each field in the dataset is consistent with the predefined data type.
[0088] The above shows and describes the basic principles, main features and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any form, and any technical solution obtained by equivalent replacement or equivalent transformation falls within the protection scope of the present invention.
Claims
1. A multi-protocol multi-device access system based on an industrial Internet of Things platform, characterized in that: include: Several protocol analyzers for device access and multi-protocol analysis; A low-code data format conversion module, which is used to convert data parsed by several protocol parsers into a unified data format for the industrial Internet of Things platform; Data in a unified data format is reported to the application end of the industrial Internet of Things platform.
2. According to claim 1, a multi-protocol multi-device access system based on an industrial Internet of Things platform is characterized in that: Several protocol parsers are set in the device access layer in the form of plug-ins, and the device access layer is also provided with a predefined protocol template; the device information corresponding to each protocol parser is configured in the protocol adaptation layer; the several protocol parsers include MQTT protocol parser, HTTP protocol parser, Modbus protocol parser and database docking parser.
3. According to the multi-protocol multi-device access system based on the industrial Internet of Things platform of claim 1, it is characterized in that: The low-code data format conversion module includes: Data model, used to represent JSON data structure; The field mapping module is used to complete the field mapping according to the mapping rules between the fields in the source data and the target fields in the data format unified by the platform; The data type conversion module completes the data type conversion according to the conversion rules when the type of the source data is inconsistent with the type of the target field; A conditional module, filtering data according to a filtering condition and / or computing data according to a computing condition; The missing field setting module, after field mapping, identifies whether there are fields with missing values in the target data structure, and sets the missing fields according to the missing field setting rules; Converted data output module: outputs converted data.
4. According to claim 3, a multi-protocol multi-device access system based on an industrial Internet of Things platform is characterized in that: The low-code data format conversion process is: first perform field mapping, then perform data type conversion, then perform conditional judgment, and finally set missing fields and output the converted data.
5. According to claim 1, a multi-protocol multi-device access system based on an industrial Internet of Things platform is characterized in that: Several protocol parsers and low-code data format conversion modules are located in the device access layer of the IoT middleware. The IoT middleware also includes a data processing module. The data with a unified data format converted by the low-code data format conversion module is sent to the data processing module, which calculates, filters, and cleans the data. After that, the data can be uploaded to the application end of the industrial IoT platform.
6. According to claim 4, a multi-protocol multi-device access system based on an industrial Internet of Things platform is characterized in that: When making conditional judgments, the priority of operations is higher than that of filtering.
7. A multi-protocol multi-device access method based on an industrial Internet of Things platform, characterized in that: The steps include: Use several protocol analyzers to analyze the data reported by the connected devices; Convert the data parsed by several protocol parsers into the unified JSON data format of the industrial Internet of Things platform; Data in a unified data format is reported to the application end of the industrial Internet of Things platform.
8. The multi-protocol multi-device access method based on the industrial Internet of Things platform according to claim 7 is characterized in that: The low-code data format conversion process is: first perform field mapping, then perform data type conversion, then perform conditional judgment, and finally set missing fields and output the converted data.
9. The multi-protocol multi-device access method based on the industrial Internet of Things platform according to claim 7 is characterized in that: Set up a data model to represent the JSON data structure; complete field mapping according to the mapping rules between the fields in the source data and the target fields in the platform's unified data format; complete data type conversion according to the conversion rules when the type of the source data is inconsistent with the type of the target field; filter data according to the filtering conditions and / or operate on data according to the operation conditions; Identify whether there are fields with missing values in the target data structure, set the missing fields according to the missing field setting rules; and output the converted data.
10. The multi-protocol multi-device access method based on the industrial Internet of Things platform according to claim 7, characterized in that: Several protocol parsers are set in the device access layer in the form of plug-ins, and the device access layer is also provided with a predefined protocol template; the device information corresponding to each protocol parser is configured in the protocol adaptation layer; the several protocol parsers include MQTT protocol parser, HTTP protocol parser, Modbus protocol parser and database docking parser.
Citation Information
Cited By
Internet of Things gateway configuration method based on protocol component and data processing method and device
CN120980066A
External data unified access storage method and device and storage medium
CN121233560A
Multi-source annunciator protocol unified conversion and access system
CN121357259A
Data access method based on digital platform equipment
CN121388046A
System for protocol adaptation and unified access of multi-source heterogeneous industrial equipment
CN121691487A