A multi-protocol adaptive acquisition APP low-code development method and system based on multi-dimensional feature modeling
Patent Information
- Application Number
- CN202511047535.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-29
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2045-07-29
AI Technical Summary
[0004]1、灵活性差、扩展性弱:新增设备类型或协议需要修改核心代码并重新编译部署,难以适应设备快速迭代
[0047]本发明公开了一种智能设备协议自适应采集方法,通过构建目标设备的多维度特征模型,实现对未知协议设备的自动识别和动态适配。该方法首先获取设备的静态、动态和参数特征,建立特征模型;然后基于特征模型确定通信需求,从协议元模型库中提取适配的协议模型,生成协议帧结构和数据映射关系;对于未知协议设备,采用自适应识别模块构造探测帧进行协议类型判断;根据确定的协议类型,动态加载相应的协议解析器插件,生成采集请求并解析响应数据;当设备模型发生变更时,触发动态感知机制重新加载模型并调整采集逻辑。
Smart Images

Figure CN121029266B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of power distribution Internet of Things (IoT) technology and edge computing technology, and more specifically, to a multi-protocol adaptive acquisition APP development framework based on multi-dimensional feature modeling. Background Technology
[0002] Currently, the types of edge devices in the power distribution Internet of Things are diverse, with various communication protocols and communication methods.
[0003] Developing data acquisition micro-applications for such heterogeneous devices presents significant challenges:
[0004] 1. Poor flexibility and scalability: Adding new device types or protocols requires modifying the core code and recompiling and deploying, making it difficult to adapt to rapid device iteration.
[0005] 2. Protocol identification relies on manual configuration: When a device is connected, the protocol type often needs to be manually specified, which is prone to errors and cannot automatically adapt to unknown protocols.
[0006] 3. Inconsistent equipment data models: Data points (such as voltage, current, alarms, and parameters) of different devices lack a unified and structured model for description and management, resulting in complex data processing.
[0007] Therefore, there is an urgent need for a low-code, adaptive, and scalable development framework and methodology to simplify the development, deployment, and maintenance of multi-protocol data acquisition apps for heterogeneous devices.
[0008] How to construct an intelligent and adaptive device protocol acquisition method to achieve automatic identification, dynamic adaptation and unified access of devices with multiple protocols is a key technical problem that urgently needs to be solved. Summary of the Invention
[0009] The purpose of this invention is to address the problem of how to construct an intelligent and adaptive device protocol acquisition method to achieve automatic identification, dynamic adaptation and unified access of devices with multiple protocols. It proposes a low-code development method and system for multi-protocol adaptive acquisition APP based on multi-dimensional feature modeling.
[0010] The technical solution of this invention is:
[0011] This invention provides a low-code development method for a multi-protocol adaptive data acquisition application based on multi-dimensional feature modeling. The method includes the following steps:
[0012] S1. Construct a multi-dimensional device feature model to describe the static characteristics, dynamic characteristics, and parameter characteristics of the device;
[0013] S2. Establish a configurable protocol meta-model library to abstractly describe the syntax structure and data mapping rules of different communication protocol models;
[0014] S3. Build a protocol plugin container to load parsers for different protocols;
[0015] When a device is connected, read the target device file to obtain configuration information, and load the corresponding protocol parser plugin according to the target protocol type.
[0016] S4. Dynamically generate acquisition or control messages that conform to the target protocol according to the rules in the protocol meta-model library and send them to the device. Receive device response frames, parse data values and store them in the multi-dimensional device feature model.
[0017] Further, S1 includes:
[0018] Obtain static characteristic data for each device to describe its inherent information;
[0019] Acquire dynamic characteristic data for each type of equipment to reflect its operating status;
[0020] Obtain parameter characteristic data for each device, including operating parameters and action parameters;
[0021] Based on the static characteristic data, dynamic characteristic data, and parameter feature data, a multi-dimensional feature model for the corresponding device is constructed for the storage and management of device data, ensuring that different devices have differentiated feature descriptions.
[0022] Furthermore, the inherent information includes communication parameters, equipment information, and manufacturer information; the operating status includes voltage, current, power, and fault alarm information; the operating parameters include rated voltage and rated current; and the action parameters include overvoltage threshold.
[0023] Further, S2 includes:
[0024] S2-1. Define the protocol meta-model to describe the protocol frame structure, data point mapping relationship, data point attributes, and control command template;
[0025] S2-2. Based on the protocol meta-model, predefine standard communication protocol models and store them in the protocol model repository; by configuring the parameters of the protocol meta-model, support the extension of new protocol models.
[0026] Further, S3 includes:
[0027] S3-1. Build a protocol plugin container to support the operation of different protocol parsers by loading dynamic link libraries;
[0028] S3-2. Configure the protocol automatic identification module to read the target device file to obtain configuration information when the device is connected;
[0029] If the adaptive mode switch is enabled or the protocol type is unknown, a probe frame is constructed based on the protocol meta-model library and the response frame is analyzed to determine the target protocol type.
[0030] If the adaptive mode switch is not enabled and the protocol type is known, the corresponding parser will be loaded directly according to the protocol type specified in the archive file.
[0031] S3-3. Through dynamic model perception, periodically check the changes in the multi-dimensional device feature model and protocol meta-model library, load the updated model, and ensure that the acquisition logic is consistent with the latest model.
[0032] Further, S4 includes:
[0033] S4-1. Load the corresponding protocol model according to the target protocol type of the device, and parse the message construction rules in the protocol model, including frame structure, data point mapping relationship and data point attributes;
[0034] S4-2. Based on the list of data points to be collected or the control commands to be issued, and in conjunction with the data point mapping relationship, call the loaded corresponding protocol plugin container to generate a collection request frame or control command frame that conforms to the target protocol specification; send the generated message through the communication interface, and receive the device response frame for subsequent processing.
[0035] Furthermore, S4-2 specifically includes:
[0036] a. Based on the equipment file, poll each equipment in turn. During the data collection polling process, traverse the list of data points to be collected for the corresponding equipment in the multi-dimensional equipment feature model.
[0037] b. Based on the mapping information and attribute definitions in the protocol meta-model library, call the loaded protocol parser to generate a collection request frame;
[0038] c. Send acquisition request frames through pre-configured communication parameters and receive device response frames;
[0039] d. Perform format verification and validity judgment on the response frame, parse out the data value and store it in the multi-dimensional device feature model.
[0040] The system used in a low-code development method for a multi-protocol adaptive data acquisition application based on multi-dimensional feature modeling includes:
[0041] A multi-dimensional device feature model is used to describe the static and dynamic characteristics of a device.
[0042] Protocol meta-model library, used to abstractly describe the syntax structure and data mapping rules of different communication protocols;
[0043] The protocol plugin container is used to load parsers for different protocols and set up an automatic protocol identification module to determine the target protocol type when a device is connected.
[0044] The protocol automatic identification module is used to construct probe frames and analyze response frames based on the protocol meta-model library to determine the target protocol type when the adaptive mode switch is enabled or the protocol type is unknown.
[0045] The message processing module is used to dynamically generate acquisition or control messages that conform to the target protocol according to the rules in the protocol meta-model library and send them to the device, receive device response frames, parse data values and store them in the multi-dimensional device feature model.
[0046] The beneficial effects of this invention are:
[0047] This invention discloses an adaptive acquisition method for smart device protocols. By constructing a multi-dimensional feature model of the target device, it achieves automatic identification and dynamic adaptation of devices with unknown protocols. The method first acquires the static, dynamic, and parametric features of the device to establish a feature model. Then, based on the feature model, it determines the communication requirements, extracts the appropriate protocol model from a protocol meta-model library, and generates protocol frame structures and data mapping relationships. For devices with unknown protocols, an adaptive identification module constructs probe frames to determine the protocol type. According to the determined protocol type, the corresponding protocol parser plugin is dynamically loaded to generate acquisition requests and parse response data. When the device model changes, a dynamic perception mechanism is triggered to reload the model and adjust the acquisition logic.
[0048] This invention enables unified access and data acquisition for devices using multiple protocols, improving system compatibility and scalability, and providing an effective solution for the interconnection of heterogeneous devices in the Industrial Internet of Things.
[0049] Other features and advantages of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0050] The above and other objects, features and advantages of the present invention will become more apparent from the more detailed description of exemplary embodiments of the invention in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the invention.
[0051] Figure 1 The diagram shows the architecture of the low-code development system for multi-protocol adaptive acquisition apps based on multi-dimensional feature modeling according to the present invention.
[0052] Figure 2 A flowchart of the low-code development method for multi-protocol adaptive acquisition apps based on multi-dimensional feature modeling of the present invention is shown. Detailed Implementation
[0053] Preferred embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While preferred embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0054] This invention provides a low-code development method for a multi-protocol adaptive data acquisition application based on multi-dimensional feature modeling. The method includes the following steps:
[0055] S1. Construct a multi-dimensional device feature model to describe the static and dynamic characteristics of the device;
[0056] Specifically, a multi-dimensional device feature model is constructed for each type of device, based on static characteristics, dynamic characteristics, and parameter features. Static characteristics describe the device's inherent information, such as communication parameters, device information, and manufacturer information. Dynamic characteristics reflect the device's operating status, such as voltage, current, power, and fault alarms. Parameter features include operating parameters and action parameters, such as rated voltage and current, and overvoltage thresholds. Different feature models are constructed for different devices to facilitate the storage and management of device data.
[0057] S2. Establish a configurable protocol meta-model library to abstractly describe the syntax structure and data mapping rules of different communication protocols;
[0058] Specifically, S2-1 defines the protocol meta-model, which describes the protocol frame structure, data point mapping relationship, data point attributes, and control command templates;
[0059] Protocol frame structure definition: describes the syntax rules, position and meaning of the header (such as address field, function code / control code, length field) and trailer (such as check code) of the protocol frame.
[0060] Data point mapping table: Defines the mapping relationship between device data points (corresponding to dynamic characteristics and parameter characteristics in the device feature model) and specific identifiers in the protocol (such as register address, data identifier DI, object attribute descriptor OAD).
[0061] Data point attribute definition: including read and write permissions of data points, data type (such as int16, uint32, float, string, ASCII), range conversion factor (multiplier / offset), unit, etc.
[0062] Control command template: Defines the rules for constructing protocol command frames for device control (such as function codes and data field formats).
[0063] S2-2. Based on the aforementioned protocol meta-model, predefine standard communication protocol models and store them in the protocol model repository (such as DL / T645 model, Modbus-RTU model, Modbus-TCP model, DL / T698.45 model); support the extension of new protocol models by configuring meta-model parameters.
[0064] S3. Construct a protocol plugin container to load parsers for different protocols; when a device is connected, read the target device file to obtain configuration information, and load the corresponding protocol parser plugin according to the target protocol type; specifically;
[0065] S3-1. Build a protocol plugin container at the application layer of the data acquisition APP. This container supports the operation of different protocol parsers (such as DL / T645 parser, Modbus parser, DL / T698 parser) by loading dynamic link libraries.
[0066] S3-2. Configure the protocol automatic identification module to read the target device file to obtain configuration information when the device is connected;
[0067] Adaptive Mode: Enabled when the protocol type is unknown or requires verification upon device access. This module automatically constructs and sends probe frames according to a preset protocol order based on a protocol model repository. By analyzing the correctness of the device's response frames, the correct protocol type is matched, and the corresponding protocol parser plugin is loaded accordingly.
[0068] Non-adaptive mode: Enabled when the protocol type is explicitly specified in the device feature model, directly loading the corresponding protocol parser plugin according to the protocol type specified in the archive file.
[0069] S3-3. Through dynamic model sensing, periodically or event-triggered checks are performed on the device feature model and associated protocol model. When a model change (such as update or replacement) is detected, the updated model is automatically reloaded to ensure that the acquisition logic is consistent with the latest model.
[0070] S4. Based on the rules in the protocol meta-model library and the multi-dimensional device feature model, dynamically generate acquisition or control messages that conform to the target protocol, specifically including:
[0071] S4-1. Load the corresponding protocol model (from the S2 protocol meta-model library) according to the target device, and parse the message construction rules in the protocol model, including frame structure, data point mapping relationship and data point attributes;
[0072] S4-2. Based on the list of data points to be collected or the control commands to be issued, and combined with the mapping relationship of data points in the protocol model, call the loaded corresponding protocol plugin container to generate a collection request frame or control command frame that conforms to the target protocol specification; send the generated message through the communication interface, and receive the device response frame for subsequent processing.
[0073] a. Based on the equipment file, poll each device sequentially; during the data collection polling process, for the current device, traverse the list of data points to be collected in the multi-dimensional device feature model;
[0074] b. Based on the mapping information and attribute definitions in the protocol meta-model library, call the loaded protocol parser to generate a collection request frame;
[0075] c. Send acquisition request frames through pre-configured communication parameters and receive device response frames;
[0076] d. Perform format verification and validity judgment on the response frame, parse out the data value and store it in the multi-dimensional device feature model.
[0077] After polling all the preset data points of a device, the latest data in the device's feature model is encapsulated; the encapsulated device data is then reported to the data center for persistent storage via the data reporting interface.
[0078] The various embodiments of the present invention have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments.
Claims
1. A low-code development method for a multi-protocol adaptive data acquisition app based on multi-dimensional feature modeling, characterized in that: The method includes the following steps: S1. Construct a multi-dimensional device feature model to describe the static characteristics, dynamic characteristics, and parameter characteristics of the device; S2. Establish a configurable protocol meta-model library to abstractly describe the syntax structure and data mapping rules of different communication protocol models; S3. Build a protocol plugin container to load parsers for different protocols; When a device is connected, read the target device file to obtain configuration information, and load the corresponding protocol parser plugin according to the target protocol type. S4. Dynamically generate acquisition or control messages that conform to the target protocol according to the rules in the protocol meta-model library and send them to the device; receive device response frames, parse data values and store them in the multi-dimensional device feature model. S2 includes: S2-1, defining a protocol meta-model to describe the protocol frame structure, data point mapping relationship, data point attributes, and control command templates; S2-2, predefining standard communication protocol models based on the protocol meta-model and storing them in a protocol model repository; and supporting the extension of new protocol models by configuring the parameters of the protocol meta-model. S3 includes: S3-1, constructing a protocol plugin container to support the operation of different protocol parsers by loading dynamic link libraries; S3-2, setting up an automatic protocol identification module to read the target device file to obtain configuration information when the device is connected; if the adaptive mode switch is enabled or the protocol type is unknown, constructing a probe frame based on the protocol meta-model library and analyzing the response frame to determine the target protocol type; if the adaptive mode switch is not enabled and the protocol type is known, directly loading the corresponding parser according to the protocol type specified in the file; S3-3, through model dynamic perception, periodically checking the changes of the multi-dimensional device feature model and protocol meta-model library, loading the updated model, and ensuring that the acquisition logic is consistent with the latest model; S4 includes: S4-1, loading the corresponding protocol model according to the target protocol type of the device, parsing the message construction rules in the protocol model, including frame structure, data point mapping relationship and data point attributes; S4-2, based on the list of data points to be collected or the control commands to be issued, combined with the data point mapping relationship, calling the loaded corresponding protocol plug-in container to generate a collection request frame or control command frame that conforms to the target protocol specification; sending the generated message through the communication interface, and receiving the device response frame for subsequent processing; S4-2 specifically includes: a) polling each device sequentially according to the device file, and traversing the list of data points to be collected for the corresponding device in the multi-dimensional device feature model during the data collection polling process; b) generating a collection request frame by calling the loaded protocol parser according to the mapping information and attribute definitions in the protocol meta-model library; c) sending the collection request frame through pre-configured communication parameters and receiving the device response frame; d) performing format verification and validity judgment on the response frame, parsing out the data value and storing it in the multi-dimensional device feature model.
2. The low-code development method for multi-protocol adaptive acquisition APP based on multi-dimensional feature modeling as described in claim 1, characterized in that... S1 includes: Obtain static characteristic data for each device to describe its inherent information; Acquire dynamic characteristic data for each type of equipment to reflect its operating status; Obtain parameter characteristic data for each device, including operating parameters and action parameters; Based on the static characteristic data, dynamic characteristic data, and parameter feature data, a multi-dimensional feature model for the corresponding device is constructed for the storage and management of device data, ensuring that different devices have differentiated feature descriptions.
3. The low-code development method for multi-protocol adaptive acquisition APP based on multi-dimensional feature modeling as described in claim 2, characterized in that, The inherent information includes communication parameters, equipment information, and manufacturer information; the operating status includes voltage, current, power, and fault alarm information; the operating parameters include rated voltage and rated current; and the action parameters include overvoltage threshold.
4. A system used in the low-code development method for a multi-protocol adaptive acquisition app based on multi-dimensional feature modeling as described in any one of claims 1-3, characterized in that, include: A multi-dimensional device feature model is used to describe the static and dynamic characteristics of a device. Protocol meta-model library, used to abstractly describe the syntax structure and data mapping rules of different communication protocols; The protocol plugin container is used to load parsers for different protocols and set up an automatic protocol identification module to determine the target protocol type when a device is connected. The protocol automatic identification module is used to construct probe frames and analyze response frames based on the protocol meta-model library to determine the target protocol type when the adaptive mode switch is enabled or the protocol type is unknown. The message processing module is used to dynamically generate acquisition or control messages that conform to the target protocol according to the rules in the protocol meta-model library and send them to the device, receive device response frames, parse data values and store them in the multi-dimensional device feature model.
Citation Information
Patent Citations
Automatic interface docking method and system, medium and low-code development platform
CN119718306A
System and method for automated code generation using language neutral software code
WO2004066088A2