Internet of Things gateway configuration method based on protocol component and data processing method and device

By generating device protocol tables and protocol components for self-identification processing modules, the system automatically identifies and processes electromechanical equipment data, solving the problem of time-consuming and labor-intensive configuration of IoT gateways in building automation engineering, improving configuration efficiency and lowering the configuration threshold.

CN120980066APending Publication Date: 2025-11-18GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511198476.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

In building automation engineering, the variety of electromechanical equipment types and models makes the configuration process of IoT gateways time-consuming and labor-intensive, requiring configuration personnel to be familiar with the characteristics of multiple protocols.

Method used

By using a large model based on protocol parsing and a large model based on protocol self-identification and processing, a device protocol table and a self-identification and processing module are generated to form a protocol component, which automatically identifies and processes electromechanical equipment data, reducing the configuration threshold.

Benefits of technology

It improves the configuration efficiency of IoT gateway devices, reduces configuration time and labor costs, and lowers the requirements for configuration personnel to be familiar with the protocols.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120980066A_ABST
    Figure CN120980066A_ABST
Patent Text Reader

Abstract

The invention provides an Internet of Things gateway configuration method based on a protocol component, and a data processing method and device, and relates to the field of control. The method comprises the following steps: based on a protocol analysis large model, processing contents related to protocol configuration in an electromechanical equipment document to obtain equipment protocol tables corresponding to a plurality of electromechanical equipment; based on the protocol self-identification processing large model, processing the device protocol tables corresponding to the multiple electromechanical devices to obtain device protocol self-identification processing modules corresponding to the multiple electromechanical devices, the device protocol self-identification processing modules being used for identifying the types of the electromechanical devices; and sending a protocol assembly formed by the device protocol tables corresponding to the plurality of electromechanical devices and the device protocol self-identification processing module to the Internet of Things gateway, so that the Internet of Things gateway processes the electromechanical device data based on the protocol assembly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of control, and more particularly to an IoT gateway configuration method, data processing method, and apparatus based on protocol components. Background Technology

[0002] In building automation engineering, there is a wide variety of electromechanical equipment types and models. The Internet of Things (IoT) gateway acts as a bridge between these equipment and the Building Management System (BMS). Configuring the equipment into the IoT gateway is a time-consuming and labor-intensive process. For example, configuration personnel need to understand the IoT gateway's configuration software and be familiar with the characteristics of various protocols to successfully configure the equipment using the IoT gateway. Summary of the Invention

[0003] One technical problem this disclosure aims to solve is to provide an IoT gateway configuration method, data processing method, and apparatus based on protocol components, which can improve the configuration efficiency of IoT gateways for devices.

[0004] According to one aspect of this disclosure, an IoT gateway configuration method is proposed, comprising: processing the protocol configuration-related content in the electromechanical equipment document based on a protocol parsing model to obtain a device protocol table corresponding to multiple electromechanical equipment; processing the device protocol tables corresponding to multiple electromechanical equipment based on a protocol self-identification processing model to obtain a device protocol self-identification processing module corresponding to multiple electromechanical equipment, wherein the device protocol self-identification processing module is used to identify the type of electromechanical equipment; and sending a protocol component consisting of the device protocol tables corresponding to multiple electromechanical equipment and the device protocol self-identification processing module to the IoT gateway so that the IoT gateway can process the electromechanical equipment data based on the protocol component.

[0005] In some embodiments, training the protocol self-identification processing large model includes: comparing the contents of the device protocol tables corresponding to multiple sample devices of the same protocol to construct a device feature library; using the device feature library to generate device protocol self-identification processing modules corresponding to multiple sample devices as annotation values ​​of the device protocol tables corresponding to multiple sample devices; and training a machine learning model based on the device protocol tables corresponding to multiple sample devices and the annotation values ​​to obtain the protocol self-identification processing large model.

[0006] In some embodiments, the device protocol self-identification processing module includes at least one of the following: protocol basic configuration information automatic detection logic code, device data address scanning code, device identifier verification logic code, and data verification code. The protocol basic configuration information automatic detection logic code is used to detect the protocol basic configuration information in the electromechanical equipment data; the device data address scanning code is used to verify whether the device data address range in the electromechanical equipment data meets expectations; the device identifier verification logic code is used to verify whether the register address in the electromechanical equipment data meets predefined values; and the data verification code is used to verify whether the electromechanical equipment data is within the expected value range.

[0007] In some embodiments, the device protocol self-identification processing module for generating multiple sample devices further includes: optimizing the device protocol self-identification processing module for multiple sample devices and verifying the identification accuracy.

[0008] In some embodiments, the protocol device table includes general data information of the protocol to which the device belongs and unique tags for all types of device data defined by the IoT gateway.

[0009] In some embodiments, the unique tags include multiple items from the following: data identifier, data dependency, data dependency condition, data priority, data read / write attribute, data type, numerical range, and protocol type.

[0010] In some embodiments, training the protocol parsing big model includes: extracting the content of a first sample file from documents of different formats; expanding the content of the first sample file to obtain the content of a second sample file; identifying data dependencies, data dependency conditions, and data priorities in the content of the second sample file; obtaining a sample protocol device table based on the data dependencies, data dependency conditions, and data priorities according to the device protocol table template, which serves as the annotation value for the content of the second sample file; and training a machine learning model based on the content of the second sample file and the corresponding annotation value to obtain the protocol parsing big model.

[0011] According to another aspect of this disclosure, a data processing method based on the above-mentioned IoT gateway configuration method is also proposed, including: acquiring electromechanical equipment data; processing the electromechanical equipment data using a device protocol self-identification processing module based on a device protocol table to identify the characteristic data of each electromechanical equipment; and identifying the type of each electromechanical equipment based on the characteristic data of each electromechanical equipment.

[0012] In some embodiments, based on the type of each electromechanical device, the number of devices corresponding to each type of electromechanical device is obtained; based on the number of devices corresponding to each type of electromechanical device and the device protocol table, the device database is initialized; based on the device protocol table, according to data dependencies and data dependency conditions, electromechanical device data that does not meet the data dependency conditions in the device database is deleted to obtain pre-stored data; based on the engineering optimization level, data priority, and the storage space of the IoT gateway, the pre-stored data is filtered to obtain valid data.

[0013] In some embodiments, the engineering optimization level includes a first optimization level, a second optimization level, and a third optimization level, and the data priority includes a first priority, a second priority, and a third priority. Based on the engineering optimization level, the data priority, and the storage space of the IoT gateway, the pre-stored data is filtered to obtain valid data, including: in response to the engineering optimization level being the first optimization level, storing the electromechanical equipment data belonging to the first priority in the pre-stored data as valid data in the device database; in response to the engineering optimization level being the second optimization level, storing the electromechanical equipment data belonging to the first priority in the pre-stored data as valid data in the device database, storing the electromechanical equipment data belonging to the second priority in the pre-stored data that meets the storage space requirements of the IoT gateway as valid data in the device database; and in response to the engineering optimization level being the third optimization level, storing the pre-stored data as valid data in the device database.

[0014] In some embodiments, based on the device protocol table, the device protocol self-identification processing module detects the basic configuration information of the electromechanical equipment data; based on the device protocol table, the device protocol self-identification processing module verifies whether the device data address range of the electromechanical equipment data meets expectations; based on the device protocol table, the device protocol self-identification processing module verifies whether the register address of the electromechanical equipment data meets predefined values; based on the device protocol table, the device protocol self-identification processing module verifies whether the electromechanical equipment data is within the expected value range.

[0015] According to another aspect of this disclosure, an IoT gateway configuration device is also proposed, comprising: a device protocol table generation unit, configured to process the protocol configuration-related content in the electromechanical equipment document based on a protocol parsing big model to obtain device protocol tables corresponding to multiple electromechanical equipment; a self-identification processing module generation unit, configured to process the device protocol tables corresponding to multiple electromechanical equipment based on a protocol self-identification processing big model to obtain device protocol self-identification processing modules corresponding to multiple electromechanical equipment, wherein the device protocol self-identification processing modules are used to identify the type of electromechanical equipment; and a configuration unit, configured to send a protocol component consisting of the device protocol tables corresponding to multiple electromechanical equipment and the device protocol self-identification processing modules to the IoT gateway, so that the IoT gateway processes the electromechanical equipment data based on the protocol component.

[0016] According to another aspect of this disclosure, a data processing apparatus based on the above-described IoT gateway configuration method is also proposed, comprising: a data acquisition unit configured to acquire electromechanical equipment data; and a type identification unit configured to process the electromechanical equipment data using a device protocol self-identification processing module based on a device protocol table, identify the characteristic data of each electromechanical equipment, and identify the type of each electromechanical equipment based on the characteristic data of each electromechanical equipment.

[0017] In some embodiments, the data processing apparatus further includes: an initialization unit configured to obtain the number of devices corresponding to each type of electromechanical device based on the type of each electromechanical device, and initialize a device database based on the number of devices corresponding to each type of electromechanical device and a device protocol table; a first filtering unit configured to delete electromechanical device data in the device database that does not meet the data dependency conditions based on the device protocol table, according to data dependency relationships and data dependency conditions, to obtain pre-stored data; and a second filtering unit configured to filter the pre-stored data based on engineering optimization level, data priority, and the storage space of the IoT gateway to obtain valid data.

[0018] According to another aspect of this disclosure, an electronic device is also proposed, comprising: a processor; and a memory coupled to the processor for storing instructions, which, when executed by the processor, cause the processor to perform the IoT gateway configuration method described above, or the data processing method described above.

[0019] According to another aspect of this disclosure, a computer-readable storage medium is also provided, on which computer instructions are stored, wherein the computer instructions, when executed by a processor, implement the above-described IoT gateway configuration method or the above-described data processing method.

[0020] According to another aspect of this disclosure, a computer program product is also proposed, comprising: computer instructions that, when executed by a processor, implement the above-described IoT gateway configuration method or the above-described data processing method.

[0021] Other features and advantages of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0022] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the specification, serve to explain the principles of this disclosure.

[0023] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein:

[0024] Figure 1 A flowchart illustrating some embodiments of the IoT gateway configuration method disclosed herein;

[0025] Figure 2 This is a schematic diagram of the training process of a large model for protocol self-identification processing in some embodiments of this disclosure;

[0026] Figure 3 This is a schematic diagram illustrating the training process of a large model for protocol parsing in some embodiments of this disclosure;

[0027] Figure 4 Schematic diagrams of device components are generated for some embodiments of this disclosure;

[0028] Figure 5 This is a flowchart illustrating some embodiments of the data processing method disclosed herein;

[0029] Figure 6 This is a flowchart illustrating some other embodiments of the data processing method disclosed herein;

[0030] Figure 7 Schematic diagrams of some embodiments of the IoT gateway configuration device disclosed herein;

[0031] Figure 8 These are schematic diagrams illustrating some embodiments of the data processing apparatus of this disclosure;

[0032] Figure 9 These are schematic diagrams of other embodiments of the data processing apparatus of this disclosure;

[0033] Figure 10 This is a schematic diagram of some embodiments of the electronic device disclosed herein. Detailed Implementation

[0034] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values ​​of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.

[0035] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.

[0036] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit this disclosure or its application or use.

[0037] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.

[0038] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.

[0039] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.

[0040] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0041] In related technologies, electromechanical equipment protocols are diverse, leading to a high level of protocol familiarity required for IoT gateway configuration personnel, and the large amount of device data results in lengthy configuration times. This disclosure provides an IoT gateway configuration method that can lower the barrier to entry for IoT gateway device configuration.

[0042] Figure 1 The following is a flowchart illustrating some embodiments of the IoT gateway configuration method disclosed herein, including steps S11-S13.

[0043] In step S11, based on the protocol parsing model, the content related to protocol configuration in the electromechanical equipment document is processed to obtain the equipment protocol table corresponding to multiple electromechanical equipment.

[0044] For example, in the configuration software, a large protocol parsing model can be configured. This large protocol parsing model can generate a device protocol table from the protocol configuration-related content in the electromechanical equipment document according to the device protocol table template.

[0045] The protocol configuration includes information such as the data category, data name, and data range. The device protocol table contains protocol data information for various device models.

[0046] In some embodiments, this protocol parsing model can preprocess the protocol configuration-related content in electromechanical equipment documents to generate a device protocol table. For example, if the electromechanical equipment document contains text content in different formats, the chapter structure and table information can be preserved. For image tables in the document, the document is divided into semantic blocks based on the heading hierarchy, for example, according to "1.1 Protocol Overview" and "2.3 Parameter Configuration". Each semantic block corresponds to a different part of the device protocol table. The preprocessed content makes the generated device protocol table more accurate and clear.

[0047] In step S12, based on the protocol self-identification processing model, the equipment protocol tables corresponding to multiple electromechanical devices are processed to obtain the equipment protocol self-identification processing module corresponding to multiple electromechanical devices. The equipment protocol self-identification processing module is used to identify the type of electromechanical device.

[0048] For example, a protocol self-identification processing model is configured in the configuration software. Device protocol tables corresponding to multiple electromechanical devices are sent to this model, which can then generate device protocol self-identification processing code. This code constitutes the device protocol self-identification processing module.

[0049] The device protocol self-identification processing module can identify device types. For example, when multiple different models of devices with the same protocol are connected to an IoT gateway, the module automatically identifies the model of each connected device. For instance, the model of the electromechanical device can be determined by examining communication parameters, register data, and numerical ranges in the device's data.

[0050] In some embodiments, the device protocol self-identification processing module is generated only after the user confirms that all types of devices have been added to the configuration software project. The protocol self-identification processing model in the configuration software compares the contents of the device protocol table of devices configured on the same port and with the same protocol one by one to determine the data characteristics and then generates the device protocol self-identification processing module.

[0051] In step S13, the protocol component consisting of the device protocol table corresponding to multiple electromechanical devices and the device protocol self-identification processing module is sent to the IoT gateway so that the IoT gateway can process the electromechanical device data based on the protocol component.

[0052] The device protocol table and the device protocol self-identification processing module are configured in the configuration software project. The project is downloaded to the IoT gateway, which realizes the configuration of the IoT gateway. This enables the IoT gateway to use the device protocol table and the device protocol self-identification processing module to process the electromechanical equipment data and realize the identification of the device type.

[0053] In this embodiment, IoT gateway configuration personnel do not need to be familiar with the protocols. Instead, they generate a device protocol table through a large-scale protocol parsing model and a device protocol self-identification processing module through a large-scale protocol self-identification processing model. The IoT gateway can then be configured simply by adding the protocol components, enabling it to process electromechanical equipment data. This embodiment lowers the configuration threshold for devices accessing the IoT gateway, saves time and manpower costs, and significantly improves device configuration efficiency.

[0054] Next, we will continue to combine Figure 2 and Figure 3 The training processes for the protocol self-identification and processing large model and the protocol parsing large model are introduced respectively.

[0055] like Figure 2 As shown, Figure 2 This is a schematic diagram of the training process of a protocol self-identification processing large model in some embodiments of this disclosure, including steps S21-S23.

[0056] In step S21, the contents of the device protocol tables corresponding to multiple sample devices of the same protocol are compared to construct a device feature library.

[0057] For example, the contents of the device protocol tables of different devices with the same protocol are compared one by one to build a device feature library, and a feature vector containing baud rate range, register address range and data range is created for each device model.

[0058] In some embodiments, NLP (Natural Language Processing) models are used to identify differences in parameter names, data types, and value ranges of different device models, thereby extracting features for each device model and constructing a feature library for that device.

[0059] In step S22, the device feature library is used to generate device protocol self-identification processing modules corresponding to multiple sample devices, which serve as annotation values ​​for the device protocol tables corresponding to multiple sample devices.

[0060] For example, using an encoder-decoder model, feature vectors from a device feature library are used to generate device protocol self-identification processing code, which constitutes the device protocol self-identification processing module.

[0061] In some embodiments, the device protocol self-identification processing code includes automatic detection logic code for protocol basic configuration information. This automatic detection logic code is used to detect the protocol basic configuration information in the electromechanical equipment data. For example, for a Modbus protocol device, the Modbus baud rate is automatically detected, and different baud rates are tried until communication is successful. By using the device protocol self-identification processing code to detect the protocol basic configuration information in the electromechanical equipment data, there is no need for manual learning of the basic configuration information that needs to be detected for each protocol, thereby reducing the cost of manual identification.

[0062] In some embodiments, the device protocol self-identification processing code includes a device data address scanning code, which is used to verify whether the range of device data addresses in the electromechanical equipment data meets expectations. Automatically identifying whether the device data address range meets expectations using the device data address scanning code can reduce the time and configuration costs associated with manual learning.

[0063] In some embodiments, the device protocol self-identification processing code includes device identifier verification logic code, which is used to verify whether the register address in the electromechanical equipment data conforms to a predefined value. For example, the device identifier verification logic code calls the device protocol table to determine whether the device's register address conforms to a predefined value.

[0064] In some embodiments, the device protocol self-identification processing module includes a data verification code used to verify whether the electromechanical equipment data is within the expected value range. For example, the data verification code can call a device protocol table to identify the value range of data for each type of device in the device protocol table, thereby verifying whether the electromechanical equipment data is within the expected value range.

[0065] The code described above can be used to identify characteristic data in the data of different electromechanical equipment. For example, the model of the electromechanical equipment can be determined by communication parameters, register data, and numerical range.

[0066] The device protocol self-identification processing module, which generates multiple sample devices using the device feature library, is labeled. The labeled content is then divided into training set, validation set, test set, etc., to construct a training dataset for subsequent training.

[0067] In step S23, the machine learning model is trained based on the device protocol table and labeled values ​​corresponding to multiple sample devices to obtain a large protocol self-identification processing model.

[0068] For example, the device protocol tables corresponding to multiple sample devices are input into a machine learning model to predict the device protocol self-identification processing module corresponding to the device protocol tables for these sample devices. The predicted device protocol self-identification processing module is then used as the predicted value. The predicted value is compared with the labeled value to determine whether the comparison result meets the requirements of the loss function for constructing a large-scale protocol self-identification processing model. The parameters of the machine learning model are iterated repeatedly, optimized, and adjusted until the comparison result finally meets the requirements of the loss function for constructing a large-scale protocol self-identification processing model. The machine learning model is then saved, resulting in the large-scale protocol self-identification processing model.

[0069] In the above embodiments, by training a large model for protocol self-identification processing, the automatic generation of the device protocol self-identification processing module can be realized, thereby facilitating the construction of protocol components and providing support for the subsequent configuration of IoT gateways. This enables the IoT gateway to run the device protocol self-identification processing module, reducing the time-consuming manual configuration process and the requirement for configuration personnel to be familiar with various protocol configuration writing.

[0070] In some embodiments, the device protocol self-identification processing module corresponding to multiple sample devices is optimized, and the identification accuracy is verified.

[0071] For example, the generated code is optimized and unit tested via model-device communication to verify the recognition accuracy.

[0072] The optimization process includes adding exception handling mechanisms to reduce unexpected code crashes, optimizing code structure to support fault tolerance and degradation strategies, and ensuring the continued operation of core functions.

[0073] Alternatively, the optimization process may include adding multithreading / asynchronous communication, enabling the code to handle concurrent tasks more efficiently, improving program responsiveness and system throughput, optimizing task collaboration, and increasing code flexibility.

[0074] Alternatively, the optimization process may include performance enhancements, such as adding caching mechanisms, which can significantly improve data access speed, reduce response latency, and handle traffic peaks in high-concurrency scenarios, thereby improving system availability.

[0075] In the above embodiments, by optimizing the device protocol self-identification processing module and verifying the identification accuracy, the device protocol self-identification processing module can better meet the actual business needs when applied, making the IoT gateway identification capability stronger and more reliable.

[0076] Figure 3 This is a schematic diagram of the training process for a large model in protocol parsing according to some embodiments of this disclosure. This embodiment includes steps S31-S35.

[0077] In step S31, the content of the first sample file of documents in different formats is extracted.

[0078] For example, extracting text content from documents of different formats, preserving chapter structure and table information, and handling image tables within the document. The document is divided into semantic blocks based on heading hierarchy, with each semantic block corresponding to a different part of the device protocol table, and entities such as parameter names, data types, and default values ​​are labeled.

[0079] In step S32, the content of the first sample file is expanded to obtain the content of the second sample file.

[0080] For example, synonym replacement and sentence restructuring can be performed on the original document to generate semantically equivalent but differently expressed document variants. For example, all possible parameter combinations can be generated based on the value range to expand the training samples. Furthermore, configuration paragraphs from different protocols can be mixed to train the model to distinguish the differences in similar parameters across different protocols, such as differentiating register addresses between Modbus RTU and Modbus TCP.

[0081] In step S33, the data dependencies, data dependency conditions, and data priorities in the content of the second sample file are identified.

[0082] For example, predict whether each word in a document belongs to a category such as parameter name or data type. Determine if two parameters have relationships such as "belong to" or "depend on", and the dependency judgment conditions. Determine data priority based on parameter name, device type, and historical configuration parameters of similar devices.

[0083] In step S34, according to the device protocol table template, based on data dependencies, data dependency conditions, and data priorities, a sample protocol device table is obtained, which serves as the annotation value for the content of the second sample file.

[0084] For example, a predefined device protocol table template can be used to forcibly convert the parameter information obtained in the preceding steps into a structured protocol table. This protocol table serves as the annotation value.

[0085] In step S35, the machine learning model is trained based on the content of the second sample file and the corresponding labeled values ​​to obtain the protocol parsing large model.

[0086] For example, the content of a second sample file is input into a machine learning model to predict the device protocol table corresponding to that content, and this device protocol table is used as the predicted value. The predicted value is compared with the labeled value to determine whether the comparison result meets the requirements of the loss function for building a large protocol parsing model. The parameters of the machine learning model are iterated repeatedly to optimize and adjust the comparison result until it finally meets the requirements of the loss function for building a large protocol parsing model. The machine learning model is then saved to obtain the large protocol parsing model.

[0087] In the above embodiments, by training a large protocol parsing model, the large protocol parsing model can convert the data protocol of electromechanical equipment into a device protocol table, which facilitates the construction of subsequent protocol components, provides support for the configuration of IoT gateways, and reduces the time-consuming manual configuration process and the requirement for configuration personnel to be familiar with various protocol configuration writing.

[0088] In some embodiments, the above-mentioned protocol device table includes general data information of the protocol to which the device belongs and unique tags for all types of device data defined by the IoT gateway.

[0089] In this embodiment, by defining the contents of the device protocol table, the subsequent protocol self-identification processing large model can use the device protocol self-identification processing module corresponding to multiple electromechanical devices to obtain the device protocol self-identification processing module. Furthermore, the device protocol table can also constitute part of the protocol component for configuring the IoT gateway so that the IoT gateway can use the device protocol table to identify the device type.

[0090] Common data information for the protocols to which the device belongs includes, for example, register addresses and data transmission metadata. The unique tags for all types of device data defined by the IoT gateway are shown in Table 1, including multiple items from data identifier, data dependency, data dependency condition, data priority, data read / write attributes, data type, numerical range, and protocol type.

[0091] Table 1 Unique Labels

[0092]

[0093] ID is the data identifier; data read / write attributes include readable and writable, read-only, write-only, etc.; data types include enumerated values, integers, floating-point numbers, etc.; the numerical range is determined according to the actual situation.

[0094] Data dependency refers to whether a piece of data depends on other data. If it depends on other data, the data will only exist if the dependency condition is met. The dependency condition means that the IoT gateway will only store the data if the condition is true.

[0095] Taking an air conditioner using the Modbus RTU protocol as an example, this protocol supports multiple air conditioner models. When the value of register address x1 is 1, it indicates that the connected air conditioner model is b1; when the value of register address x1 is 2, it indicates that the connected air conditioner model is b2. When the value of register address x1 is 1, register address x2 indicates that the air conditioner's temperature sensor is faulty. If the value of register address x1 is 2, then register address x2 does not store any data. Therefore, whether register address x2 needs to store data depends on the data in register address x1, and register address x2 only needs to store data when the value of register address x1 is 1.

[0096] Data priority can also be called data importance. Data priority is divided into multiple levels. For example, if data priority is divided into three levels, as shown in Table 2, if the data priority is level 1 (N1), it means that the data is highly important and necessary, so the data must be stored; if the data priority is level 2 (N2), it means that the data is relatively important, and the data will be stored if there is sufficient memory space in the IoT gateway; if the data priority is level 3 (N3), it means that the data is not important, and whether the data needs to be stored can be determined based on the optimization level of the project and the memory space remaining in the IoT gateway.

[0097] Table 2 Data Priority

[0098] Priority importance N1 necessary N2 Relatively important N3 unimportant

[0099] Protocol types include, for example, Modbus RTU and Modbus TCP. Data that does not belong to the device protocol data is defined as virtual points. For example, the daily electricity consumption data obtained by calculating the electricity consumption data of an electricity meter is defined as a virtual point.

[0100] In the above embodiments, unique tags are defined for all types of device data defined by the IoT gateway. By comparing the data with the device protocol table one by one, the data characteristics of different types of devices can be determined, providing support for the generation of subsequent valid data.

[0101] In some embodiments of this disclosure, a large-scale logic operation processing model can be used to generate logic components from the logic operation-related content in the electromechanical equipment data. These logic components can perform conditional judgments and operational logic, and may include, for example, a logic operation module and a logic library. The logic library contains logic identifiers, input quantities, input data identifiers, and output data identifiers, with the data identifiers matching those in the protocol components. The logic operation module contains various logic operation codes used by the device, and the corresponding logic operation code can be found and executed based on the logic identifiers in the logic library.

[0102] like Figure 4 As shown, Figure 4The diagram illustrates the generation of device components in some embodiments of this disclosure. The electromechanical equipment document preprocessing model 41 splits the document content according to parameters required by other large models, transmits protocol configuration-related content to the protocol parsing model 42, and transmits logic operation-related content to the logic operation processing model 44. For example, the electromechanical equipment document preprocessing model 41 transmits data type, data name, data range, etc., to the protocol parsing model 42, and transmits data name, calculation formula, judgment logic, flowchart, etc., to the logic operation processing model 44. The protocol parsing model 42 sends the generated device protocol table to the device component generation module 45. The protocol self-identification processing model 43 generates device protocol self-identification processing code based on the device protocol table and sends the device protocol self-identification processing code to the device component generation module 45. The device component generation module 45 combines the device protocol table and the device protocol self-identification processing code to form a protocol component. The logic operation processing model 44 generates a logic component according to the logic component template and sends it to the device component generation module 45.

[0103] The device component generation module 45 combines protocol components and logic components to form a device component. Users import the device component into the configuration software project, modify data priorities and project optimization levels according to their needs, and finally download the project to the IoT gateway to complete the IoT gateway configuration. Configuration personnel do not need to manually write logic formulas or code, nor do they need to understand the IoT gateway configuration software or be familiar with the characteristics of multiple protocols. Instead, they can complete the configuration simply by adding the device component directly to the IoT gateway. This lowers the configuration threshold for devices connected to the IoT gateway, saves time and manpower costs, and significantly improves device configuration efficiency.

[0104] In related technologies, there may be electromechanical devices of different types connected to the Internet of Things (IoT) gateway under the same protocol. Therefore, it is necessary to identify the type of each electromechanical device.

[0105] Figure 5 This is a flowchart illustrating some embodiments of the data processing method disclosed herein, which includes steps S51-S53.

[0106] In step S51, acquire electromechanical equipment data.

[0107] For example, the device protocol self-identification processing module communicates with the data processing module through the protocol communication module to obtain electromechanical equipment data.

[0108] In step S52, based on the device protocol table, the device protocol self-identification processing module is used to process the electromechanical equipment data and identify the characteristic data of each electromechanical equipment.

[0109] For example, the device protocol self-identification processing module uses the device protocol table to detect the data of the electromechanical equipment, determining the differences in characteristic data between this electromechanical equipment and other types of equipment. For instance, an IoT gateway compares data information from different models of devices connected to the same IoT interface to identify the characteristic data of the electromechanical equipment. For example, two different Modbus RTU devices: device 1's register address x1 has a data range of 100-200, while device 2's register x2 has a data range of 0 and 1.

[0110] In step S53, the type of each electromechanical device is identified based on the characteristic data of each electromechanical device.

[0111] By identifying the differences in characteristic data between this electromechanical device and other types of devices, the corresponding device type can be determined. For example, the model of the electromechanical device connected to the IoT gateway can be determined by communication parameters, register data, and numerical ranges.

[0112] For example, the data range of register address x1 for device 1 is 100-200. The data range of register x2 for device 2 is 0 and 1. When the obtained device register address value is in the range of 100-200, it is device 1; if it is 0 and 1, it is device 2.

[0113] In the above embodiments, the protocol components of the IoT gateway can use the device protocol table and the device protocol self-identification processing module to identify the device type, thereby facilitating the automatic retrieval of the number of devices that are normally connected to the network. This is beneficial for the IoT gateway to perform the same configuration on the same type of electromechanical equipment in the future, reducing the duplication and complexity of the configuration content.

[0114] When identifying the device type, the data processing method may also perform the following steps.

[0115] Based on the device protocol table, a device protocol self-identification processing module is used to detect basic protocol configuration information in electromechanical equipment data. For example, automatic detection logic code based on basic protocol configuration information detects basic protocol configuration information in electromechanical equipment data. For instance, for Modbus protocol devices, it automatically detects the Modbus baud rate, tries different baud rates until communication is successful. By using the device protocol self-identification processing code to detect basic protocol configuration information in electromechanical equipment data, there is no need for manual learning of the basic configuration information required for each protocol, thus reducing manual identification costs.

[0116] Based on the device protocol table, the device protocol self-identification processing module verifies whether the device data address range of the electromechanical equipment data meets expectations. For example, it verifies whether the device data address range in the electromechanical equipment data meets expectations based on the device data address scanning code. Automatically identifying whether the device data address range meets expectations through the device data address scanning code can reduce the time and configuration costs associated with manual learning.

[0117] Based on the device protocol table, the device protocol self-identification processing module verifies whether the register addresses of electromechanical equipment data conform to predefined values. For example, the device identification verification logic code calls the device protocol table to determine whether the device's register address conforms to predefined values.

[0118] Based on the device protocol table, the device protocol self-identification processing module verifies whether the electromechanical equipment data is within the expected value range. For example, the data verification code can call the device protocol table, identify the value range of data for each type of device in the device protocol table, and thus verify whether the electromechanical equipment data is within the expected value range.

[0119] Through the above verification and identification, it is determined which type of equipment the data belongs to, thereby identifying the type of equipment. This facilitates the unified configuration of similar equipment in the future and reduces the problem of excessively long configuration time caused by high repetition in equipment configuration.

[0120] In related technologies, during the device data configuration phase of IoT gateways, all devices and their data need to be configured one by one. When there are many devices and a large amount of data, this leads to high redundancy in configuration and is time-consuming. However, some device data, such as program versions, is not needed in the project. Furthermore, when different device models use the same protocol, different models require different device data. It is necessary to select the appropriate device data for configuration based on the actual device model being used. Manually filtering data is time-consuming and laborious, and important data may be missed during this process. Since IoT gateways have limited RAM resources, if all data is configured, the gateway may not be able to store the configured data due to insufficient RAM space. The following will combine... Figure 6 This disclosure describes the data processing procedure.

[0121] Figure 6 This is a flowchart illustrating some embodiments of the data processing method disclosed herein, which includes steps S61-S64.

[0122] In step S61, based on the type of each type of electromechanical equipment, the number of devices corresponding to each type of electromechanical equipment is obtained.

[0123] In step S62, the equipment database is initialized based on the number of devices and the equipment protocol table corresponding to each type of electromechanical equipment.

[0124] Based on the number of devices and the device protocol table, a device database is generated, which contains data for each device.

[0125] In step S63, based on the device protocol table, according to the data dependency relationship and data dependency condition, the electromechanical equipment data that does not meet the data dependency condition in the device database is deleted to obtain the pre-stored data.

[0126] For example, after the device protocol self-identification processing module initializes the device database, it sends a message to the data dependency module. The data dependency module searches for data dependencies in the device database based on the device protocol table, obtains the data values, and deletes data that does not meet the dependency conditions from the device database. For instance, if the dependent source data does not meet the data dependency judgment conditions of its subordinate data, the corresponding subordinate data is deleted from the device database.

[0127] In step S64, the pre-stored data is filtered based on the engineering optimization level, data priority, and the storage space of the IoT gateway to obtain valid data.

[0128] For example, the priority processing module obtains the IoT gateway's space margin and engineering optimization level, deletes excess data from the device database, and leaves only valid data in the device database.

[0129] In the above embodiments, based on the automatically identified device type and device protocol table, the IoT gateway can generate effective device data based on data dependencies and data priorities, thereby reducing the time cost and data omission caused by manual data screening, and also reducing the storage space of the IoT gateway and improving the operating efficiency of the IoT gateway.

[0130] In some embodiments, the engineering optimization level includes a first optimization level, a second optimization level, and a third optimization level, and the data priority includes a first priority, a second priority, and a third priority. Based on the engineering optimization level, the data priority, and the storage space of the IoT gateway, the pre-stored data is filtered to obtain valid data, including: in response to the engineering optimization level being the first optimization level, storing the electromechanical equipment data belonging to the first priority in the pre-stored data as valid data in the device database; in response to the engineering optimization level being the second optimization level, storing the electromechanical equipment data belonging to the first priority in the pre-stored data as valid data in the device database, storing the electromechanical equipment data belonging to the second priority in the pre-stored data that meets the storage space requirements of the IoT gateway as valid data in the device database; and in response to the engineering optimization level being the third optimization level, storing the pre-stored data as valid data in the device database.

[0131] For example, as shown in Table 3, the optimization level of the project is divided into three levels: the first optimization level M1, the second optimization level M2, and the third optimization level M3. If the optimization level of the project is M1, then only the data of the first priority N1 is stored. If the optimization level of the project is M2, then only the data of the first priority N1 is stored, and the data of the second priority N2 is stored according to the remaining memory space capacity of the IoT gateway. If the optimization level of the project is M3, then the data of the first priority N1, the second priority N2, and the third priority N3 are all stored.

[0132] Table 3. Explanation of Engineering Optimization Level

[0133]

[0134]

[0135] In the above embodiments, redundant data is deleted from the device database according to the engineering optimization level and data priority, and the device database initialization is completed. The effective data can be filtered without manual configuration.

[0136] Figure 7 The diagram below illustrates some embodiments of the IoT gateway configuration device 7 disclosed herein. The IoT gateway configuration device 7 includes a device protocol table generation unit 710, a self-identification processing module generation unit 720, and a configuration unit 730.

[0137] The device protocol table generation unit 710 is configured to process the protocol configuration-related content in the electromechanical equipment document based on the protocol parsing model, and obtain device protocol tables corresponding to multiple electromechanical equipment.

[0138] For example, the large protocol parsing model can be configured in the configuration software. This large protocol parsing model can generate a device protocol table from the protocol configuration-related content in the electromechanical equipment document according to the device protocol table template.

[0139] In some embodiments, the protocol device table includes general data information of the protocol to which the device belongs and unique tags for all types of device data defined by the IoT gateway.

[0140] In some embodiments, the unique tags include multiple items from the following: data identifier, data dependency, data dependency condition, data priority, data read / write attribute, data type, numerical range, and protocol type.

[0141] The self-identification processing module generation unit 720 is configured to process the device protocol tables corresponding to multiple electromechanical devices based on the protocol self-identification processing large model, thereby obtaining the device protocol self-identification processing modules corresponding to multiple electromechanical devices. The device protocol self-identification processing modules are used to identify the types of electromechanical devices.

[0142] For example, a protocol self-identification processing model is configured in the configuration software. Device protocol tables corresponding to multiple electromechanical devices are sent to this model, which can then generate device protocol self-identification processing code. This code constitutes the device protocol self-identification processing module.

[0143] The configuration unit 730 is configured to send a protocol component consisting of a device protocol table corresponding to multiple electromechanical devices and a device protocol self-identification processing module to the IoT gateway, so that the IoT gateway can process the electromechanical device data based on the protocol component.

[0144] In this embodiment, IoT gateway configuration personnel do not need to be familiar with the protocols. Instead, they generate a device protocol table through a large-scale protocol parsing model and a device protocol self-identification processing module through a large-scale protocol self-identification processing model. The IoT gateway can then be configured simply by adding protocol components, enabling it to process electromechanical equipment data. This embodiment lowers the configuration threshold for devices accessing the IoT gateway, saves time and manpower costs, and significantly improves device configuration efficiency.

[0145] In some embodiments, training the protocol self-identification processing large model includes: comparing the contents of the device protocol tables corresponding to multiple sample devices of the same protocol to construct a device feature library; using the device feature library to generate device protocol self-identification processing modules corresponding to multiple sample devices as annotation values ​​of the device protocol tables corresponding to multiple sample devices; and training a machine learning model based on the device protocol tables corresponding to multiple sample devices and the annotation values ​​to obtain the protocol self-identification processing large model.

[0146] In the above embodiments, by training a large model for protocol self-identification processing, the automatic generation of the device protocol self-identification processing module can be realized, thereby facilitating the construction of protocol components and providing support for the subsequent configuration of IoT gateways. This enables the IoT gateway to run the device protocol self-identification processing module, reducing the time-consuming manual configuration process and the requirement for configuration personnel to be familiar with various protocol configuration writing.

[0147] In some embodiments, the device protocol self-identification processing module includes at least one of the following: protocol basic configuration information automatic detection logic code, device data address scanning code, device identifier verification logic code, and data verification code. The protocol basic configuration information automatic detection logic code is used to detect the protocol basic configuration information in the electromechanical equipment data; the device data address scanning code is used to verify whether the device data address range in the electromechanical equipment data meets expectations; the device identifier verification logic code is used to verify whether the register address in the electromechanical equipment data meets predefined values; and the data verification code is used to verify whether the electromechanical equipment data is within the expected value range.

[0148] In some embodiments, the device protocol self-identification processing module corresponding to multiple sample devices is optimized, and the identification accuracy is verified. By optimizing the device protocol self-identification processing module and verifying the identification accuracy, the device protocol self-identification processing module can better meet actual business needs in application, making the IoT gateway identification capability stronger and more reliable.

[0149] The training of the protocol parsing model includes: extracting the content of a first sample file from documents of different formats; expanding the content of the first sample file to obtain the content of a second sample file; identifying the data dependencies, data dependency conditions, and data priorities in the content of the second sample file; obtaining a sample protocol device table based on the data dependencies, data dependency conditions, and data priorities according to the device protocol table template, which serves as the annotation value for the content of the second sample file; and training the machine learning model based on the content of the second sample file and the corresponding annotation values ​​to obtain the protocol parsing model.

[0150] In the above embodiments, by training a large protocol parsing model, the large protocol parsing model can convert the data protocol of electromechanical equipment into a device protocol table, which facilitates the construction of subsequent protocol components, provides support for the configuration of IoT gateways, and reduces the time-consuming manual configuration process and the requirement for configuration personnel to be familiar with various protocol configuration writing.

[0151] Figure 8 The diagram shows some embodiments of the data processing apparatus 8 disclosed herein, which includes a data acquisition unit 810 and a type identification unit 820.

[0152] The data acquisition unit 810 is configured to acquire electromechanical equipment data.

[0153] The type identification unit 820 is configured to process the electromechanical equipment data based on the device protocol table using the device protocol self-identification processing module, identify the characteristic data of each electromechanical equipment, and identify the type of each electromechanical equipment based on the characteristic data of each electromechanical equipment.

[0154] In the above embodiments, the protocol components of the IoT gateway can use the device protocol table and the device protocol self-identification processing module to identify the device type, thereby facilitating the automatic retrieval of the number of devices that are normally connected to the network. This is beneficial for the IoT gateway to perform the same configuration on the same type of electromechanical equipment in the future, reducing the duplication and complexity of the configuration content.

[0155] In some embodiments, the type identification unit 820 is further configured to, based on the device protocol table, use the device protocol self-identification processing module to detect the basic configuration information of the electromechanical equipment data; based on the device protocol table, use the device protocol self-identification processing module to verify whether the device data address range of the electromechanical equipment data meets expectations; based on the device protocol table, use the device protocol self-identification processing module to verify whether the register address of the electromechanical equipment data meets predefined values; and based on the device protocol table, use the device protocol self-identification processing module to verify whether the electromechanical equipment data is within the expected value range.

[0156] Through the above verification and identification, it is determined which type of equipment the data belongs to, thereby identifying the type of equipment. This facilitates the unified configuration of similar equipment in the future and reduces the problem of excessively long configuration time caused by high repetition in equipment configuration.

[0157] In some embodiments, such as Figure 9 As shown, Figure 9 The diagram below illustrates some other embodiments of the data processing apparatus 8 of this disclosure. The data processing apparatus 8 further includes an initialization unit 910, a first filtering unit 920, and a second filtering unit 930.

[0158] The initialization unit 910 is configured to obtain the number of devices corresponding to each type of electromechanical equipment based on the type of each electromechanical equipment, and initialize the device database based on the number of devices corresponding to each type of electromechanical equipment and the device protocol table.

[0159] The device database contains data for each device.

[0160] The first filtering unit 920 is configured to delete electromechanical equipment data in the device database that does not meet the data dependency conditions based on the device protocol table, according to the data dependency relationship and data dependency conditions, and obtain pre-stored data.

[0161] For example, if the dependent source data information is obtained from the device protocol table, and the dependent source data does not meet the data dependency judgment conditions of its subordinate data, then the corresponding subordinate data will be deleted from the device database.

[0162] The second filtering unit 930 is configured to filter pre-stored data based on engineering optimization level, data priority, and IoT gateway storage space to obtain valid data.

[0163] For example, the priority processing module obtains the IoT gateway's space margin and engineering optimization level, deletes excess data from the device database, and leaves only valid data in the device database.

[0164] In the above embodiments, based on the automatically identified device type and device protocol table, the IoT gateway can generate effective device data based on data dependencies and data priorities, thereby reducing the time cost and data omission caused by manual data screening, and also reducing the storage space of the IoT gateway and improving the operating efficiency of the IoT gateway.

[0165] In some embodiments, the engineering optimization level includes a first optimization level, a second optimization level, and a third optimization level, and the data priority includes a first priority, a second priority, and a third priority. Based on the engineering optimization level, the data priority, and the storage space of the IoT gateway, the pre-stored data is filtered to obtain valid data, including: in response to the engineering optimization level being the first optimization level, storing the electromechanical equipment data belonging to the first priority in the pre-stored data as valid data in the device database; in response to the engineering optimization level being the second optimization level, storing the electromechanical equipment data belonging to the first priority in the pre-stored data as valid data in the device database, storing the electromechanical equipment data belonging to the second priority in the pre-stored data that meets the storage space requirements of the IoT gateway as valid data in the device database; and in response to the engineering optimization level being the third optimization level, storing the pre-stored data as valid data in the device database.

[0166] In the above embodiments, redundant data is deleted from the device database according to the engineering optimization level and data priority, and the device database initialization is completed. The effective data can be filtered without manual configuration.

[0167] It should be noted that the above modules are logical modules based on their specific functions, and are not intended to limit the specific implementation method. For example, they can be implemented in software, hardware, or a combination of both. In actual implementation, the above modules can be implemented as independent IoT entities, or they can be implemented by a single entity (e.g., a processor (CPU or DSP, etc.), integrated circuit, etc.).

[0168] Figure 10 This is a schematic diagram of some embodiments of the electronic device disclosed herein. The electronic device 10 includes a memory 1010 and a processor 1020. The memory 1010 may be a disk, flash memory, or any other non-volatile storage medium. The memory 1010 is used to store instructions in the above embodiments. The processor 1020 is coupled to the memory 1010 and may be implemented as one or more integrated circuits, such as a microprocessor or microcontroller. The processor 1020 is used to execute the instructions stored in the memory.

[0169] In some embodiments, the processor 1020 is coupled to the memory 1010 via a BUS bus 1030. The electronic device 10 can also be connected to an external storage device 1050 via a storage interface 1040 to access external data, and can also be connected to a network or another computer system (not shown) via a network interface 1060, which will not be described in detail here.

[0170] In this embodiment, by storing data instructions in a memory and then processing them with a processor, the configuration threshold for devices connected to the IoT gateway can be lowered, saving time and labor costs and significantly improving device configuration efficiency. Furthermore, based on the on-site device access status, the IoT gateway automatically identifies the number of devices and the validity of their data, eliminating the need for manual device configuration to filter valid data.

[0171] In other embodiments, a computer-readable storage medium stores computer program instructions that, when executed by a processor, implement the steps of the methods described above. Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, apparatus, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0172] In some embodiments, a computer program product is protected, comprising a computer program or instructions that, when executed by a processor, implement the methods described above. The computer program product includes a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowchart. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device, or installed from ROM. When the computer program is executed by a CPU, it performs the functions defined in the methods of embodiments of this disclosure.

[0173] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create a machine for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0174] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0175] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0176] It should be noted that the above modules are logical modules divided according to their specific functions, and are not intended to limit the specific implementation method. For example, they can be implemented in software, hardware, or a combination of both. In actual implementation, the above modules can be implemented as independent physical entities, or they can be implemented by a single entity (e.g., a processor (CPU or DSP, etc.), integrated circuit, etc.). Furthermore, the modules shown in the accompanying drawings with dashed lines indicate that these modules may not actually exist, and the operations / functions they perform can be implemented by the processing circuitry itself.

[0177] This concludes the detailed description of the present disclosure. To avoid obscuring the concept of the disclosure, some details known in the art have not been described. Those skilled in the art will fully understand how to implement the technical solutions disclosed herein based on the above description.

[0178] The methods and apparatus of this disclosure may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the methods is for illustrative purposes only, and the steps of the methods of this disclosure are not limited to the order specifically described above unless otherwise specifically stated. Furthermore, in some embodiments, this disclosure may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the methods according to this disclosure. Thus, this disclosure also covers recording media storing programs for performing the methods according to this disclosure.

[0179] While specific embodiments of this disclosure have been described in detail by way of example, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of this disclosure. Those skilled in the art should understand that modifications can be made to the above embodiments without departing from the scope and spirit of this disclosure. The scope of this disclosure is defined by the appended claims.

Claims

1. A method for configuring an Internet of Things (IoT) gateway, comprising: Based on the large model of protocol parsing, the content related to protocol configuration in the electromechanical equipment documents is processed to obtain the equipment protocol table corresponding to multiple electromechanical equipment. Based on the protocol self-identification processing model, the equipment protocol tables corresponding to the multiple electromechanical devices are processed to obtain the equipment protocol self-identification processing module corresponding to the multiple electromechanical devices. The equipment protocol self-identification processing module is used to identify the type of electromechanical devices. The protocol component, consisting of the device protocol table corresponding to the plurality of electromechanical devices and the device protocol self-identification processing module, is sent to the IoT gateway so that the IoT gateway can process the electromechanical device data based on the protocol component.

2. The IoT gateway configuration method according to claim 1, wherein, The training of the protocol self-identification processing large model includes: By comparing the contents of the device protocol tables corresponding to multiple sample devices with the same protocol, a device feature library is constructed. Using the device feature library, a device protocol self-identification processing module corresponding to the multiple sample devices is generated, which serves as the annotation value for the device protocol table corresponding to the multiple sample devices; Based on the device protocol tables and labeled values ​​corresponding to the multiple sample devices, the machine learning model is trained to obtain the protocol self-identification processing large model.

3. The IoT gateway configuration method according to claim 1 or 2, wherein, The device protocol self-identification processing module includes at least one of the following: protocol basic configuration information automatic detection logic code, device data address scanning code, device identifier verification logic code, and data verification code. The automatic detection logic code for protocol basic configuration information is used to detect the protocol basic configuration information in the electromechanical equipment data; The device data address scanning code is used to verify whether the range of device data addresses in the electromechanical equipment data meets expectations; The device identification verification logic code is used to verify whether the register address in the electromechanical equipment data conforms to a predefined value; The data verification code is used to verify whether the electromechanical equipment data is within the expected value range.

4. The IoT gateway configuration method according to claim 2, wherein, The device protocol self-identification processing module for generating the multiple sample devices further includes: The device protocol self-identification processing module corresponding to the multiple sample devices was optimized, and the identification accuracy was verified.

5. The IoT gateway configuration method according to claim 1, wherein, The protocol device table includes general data information of the protocol to which the device belongs and unique tags for all types of device data defined by the IoT gateway.

6. The IoT gateway configuration method according to claim 5, wherein, The unique tags include: Multiple items from the following: data identifier, data dependency, data dependency condition, data priority, data read / write attribute, data type, numerical range, and protocol type.

7. The IoT gateway configuration method according to any one of claims 1 to 2 and 4 to 6, wherein, The training of the large-scale protocol parsing model includes: Extract the content of the first sample file from documents of different formats; The content of the first sample file is expanded to obtain the content of the second sample file; Identify the data dependencies, data dependency conditions, and data priorities in the content of the second sample file; According to the device protocol table template, based on the data dependency relationship, the data dependency condition, and the data priority, a sample protocol device table is obtained, which serves as the annotation value for the content of the second sample file; Based on the content of the second sample file and the corresponding labeled values, the machine learning model is trained to obtain the large protocol parsing model.

8. A data processing method based on the IoT gateway configuration method according to any one of claims 1 to 7, comprising: Acquire electromechanical equipment data; Based on the device protocol table, the device protocol self-identification processing module is used to process the electromechanical equipment data and identify the characteristic data of each electromechanical equipment. Based on the characteristic data of each electromechanical device, the type of each electromechanical device is identified.

9. The data processing method according to claim 8, further comprising: Based on the type of each type of electromechanical equipment, the number of equipment corresponding to each type of electromechanical equipment is obtained; Initialize the equipment database based on the number of devices corresponding to each type of electromechanical equipment and the equipment protocol table; Based on the device protocol table, according to the data dependency relationship and data dependency condition, delete the electromechanical equipment data in the device database that does not meet the data dependency condition to obtain the pre-stored data; Based on the engineering optimization level, data priority, and the storage space of the IoT gateway, the pre-stored data is filtered to obtain valid data.

10. The data processing method according to claim 9, wherein, The engineering optimization levels include a first optimization level, a second optimization level, and a third optimization level. The data priorities include a first priority, a second priority, and a third priority. Based on the engineering optimization level, data priorities, and the storage space of the IoT gateway, the pre-stored data is filtered to obtain valid data, including: In response to the engineering optimization level being the first optimization level, the electromechanical equipment data belonging to the first priority in the pre-stored data is stored as the valid data in the equipment database; In response to the engineering optimization level being the second optimization level, the electromechanical equipment data belonging to the first priority in the pre-stored data is stored as the valid data in the equipment database, and the electromechanical equipment data belonging to the second priority in the pre-stored data and meeting the storage space requirements of the IoT gateway is stored as the valid data in the equipment database; In response to the engineering optimization level being the third optimization level, the pre-stored data is stored as the valid data in the device database.

11. The data processing method according to any one of claims 8 to 10, further comprising at least one of the following: Based on the device protocol table, the device protocol self-identification processing module is used to detect the basic configuration information of the electromechanical equipment data. Based on the device protocol table, the device protocol self-identification processing module is used to verify whether the device data address range of the electromechanical equipment data meets expectations; Based on the device protocol table, the device protocol self-identification processing module is used to verify whether the register address of the electromechanical equipment data conforms to the predefined value; Based on the device protocol table, the device protocol self-identification processing module is used to verify whether the electromechanical equipment data is within the expected value range.

12. An Internet of Things (IoT) gateway configuration device, comprising: The device protocol table generation unit is configured to process the protocol configuration-related content in the electromechanical equipment document based on the protocol parsing model, and obtain device protocol tables corresponding to multiple electromechanical equipment. The self-identification processing module generation unit is configured to process the device protocol table corresponding to the multiple electromechanical devices based on the protocol self-identification processing big model, and obtain the device protocol self-identification processing module corresponding to the multiple electromechanical devices. The device protocol self-identification processing module is used to identify the type of electromechanical devices. The configuration unit is configured to send a protocol component consisting of a device protocol table corresponding to the plurality of electromechanical devices and a device protocol self-identification processing module to the Internet of Things (IoT) gateway, so that the IoT gateway processes the electromechanical device data based on the protocol component.

13. A data processing apparatus based on the IoT gateway configuration method according to any one of claims 1 to 7, comprising: The data acquisition unit is configured to acquire data from electromechanical equipment. The type identification unit is configured to process the electromechanical equipment data using the device protocol self-identification processing module based on the device protocol table, identify the characteristic data of each electromechanical equipment, and identify the type of each electromechanical equipment based on the characteristic data of each electromechanical equipment.

14. The data processing apparatus according to claim 13, further comprising: The initialization unit is configured to obtain the number of devices corresponding to each type of electromechanical equipment based on the type of each electromechanical equipment, and initialize the device database based on the number of devices corresponding to each type of electromechanical equipment and the device protocol table; The first filtering unit is configured to delete electromechanical equipment data in the equipment database that does not meet the data dependency conditions based on the equipment protocol table, according to data dependency relationships and data dependency conditions, to obtain pre-stored data; The second filtering unit is configured to filter the pre-stored data based on the engineering optimization level, data priority, and the storage space of the IoT gateway to obtain valid data.

15. An electronic device comprising: processor; as well as A memory coupled to the processor is used to store instructions that, when executed by the processor, cause the processor to perform the IoT gateway configuration method as described in any one of claims 1 to 7, or the data processing method as described in any one of claims 8 to 11.

16. A computer-readable storage medium having stored thereon computer instructions, wherein, When executed by a processor, the computer instructions implement the IoT gateway configuration method according to any one of claims 1 to 7, or the data processing method according to any one of claims 8 to 11.

17. A computer program product comprising: It includes computer instructions that, when executed by a processor, implement the IoT gateway configuration method according to any one of claims 1 to 7, or the data processing method according to any one of claims 8 to 11.

Citation Information

Patent Citations

  • Equipment identification method and device in wireless network

    CN111757378A

  • Equipment multi-protocol analysis method based on industrial Internet of Things gateway

    CN112261061A

  • Automatic internet of things protocol adaptation method and system based on large model

    CN119211393A

  • Multi-protocol multi-device access system and method based on industrial Internet of Things platform

    CN119544829A