Implementation method and system for configuring driver board interface function on equipment main control screen

By constructing a logic control unit and an interface function mapping table, a single main control program was developed to flexibly control a variety of peripherals, solving the problems of high maintenance costs and code redundancy in existing technologies, and improving the efficiency of peripheral control and the level of system automation.

CN122019004APending Publication Date: 2026-05-12HEBEI PLANANT BIOTECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HEBEI PLANANT BIOTECHNOLOGY CO LTD
Filing Date
2026-01-24
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In existing technologies, developing dedicated applications for different peripheral devices leads to high system maintenance costs, code redundancy, and an increased probability of errors, making it unsuitable for the needs of flexible access and efficient management of multiple peripheral devices in industrial scenarios.

Method used

By receiving user-inputted interface configuration information, a mapping table between logic control units and interface functions is constructed, enabling a single main control program to adapt to a variety of peripherals with flexible control. This includes interface function definition, protocol driver module encapsulation, logic control unit binding, and mapping table generation, supporting collaborative control and adaptive adjustment of multiple peripherals.

Benefits of technology

It reduces development and maintenance costs, decreases code redundancy and error probability, improves the response efficiency of peripheral control and the level of system automation and intelligence, and adapts to the device linkage needs in complex scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122019004A_ABST
    Figure CN122019004A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of program configuration, in particular to an implementation method and system for configuring a driver board interface function on a main control screen of equipment. The method comprises the following steps: receiving interface configuration information input by a user through a configuration interface of a main control screen, and storing the interface configuration information to a configuration file; when a main control program of the main control screen is started, reading and analyzing the configuration file, constructing a logic control unit of each physical interface based on the interface configuration information, and generating an interface function mapping table; responding to a control instruction input by a user through an equipment control interface of the main control screen, and determining a target peripheral device and a corresponding target physical interface and a target logic control unit according to the control instruction; the target logic control unit is called, so that the target logic control unit sends a control instruction through the target physical interface, and the control instruction is used for controlling the target peripheral device. According to the invention, flexible control of various peripherals can be realized by using one set of main control program, and the program cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of program configuration technology, and in particular to a method and system for implementing the interface function of a device main control screen configuration driver board. Background Technology

[0002] In the field of industrial control, when using the same driver board and main control panel program to achieve free switching and precise control of different peripheral devices such as water pumps, air conditioners, and internal circulation fans, existing technologies typically require developing corresponding dedicated applications for the interface functions of different peripherals and writing different programs into the main control panel to meet specific control requirements. However, this approach requires developing a separate program for each peripheral, which significantly increases system maintenance costs. Furthermore, the coexistence of multiple programs can easily lead to code redundancy, thereby increasing the probability of errors and failing to meet the needs of flexible access and efficient management of multiple peripherals in industrial scenarios. Summary of the Invention

[0003] To address the high maintenance costs associated with developing separate programs for each peripheral interface in scenarios with multiple peripheral accesses, this application provides a method and system for implementing the interface function of the device's main control screen configuration driver board.

[0004] Firstly, this application provides a method for implementing the interface function of the device's main control screen configuration driver board, adopting the following technical solution: A method for implementing the configuration driver board interface function of a device main control screen includes: The interface configuration information is received by the user through the configuration interface of the main control screen, and the interface configuration information is stored in the configuration file. The interface configuration information is used to define the logical function of at least one physical interface. When the main control program of the main control screen starts, it reads and parses the configuration file, constructs the logical control unit of each physical interface based on the interface configuration information, and generates an interface function mapping table. In response to the control command input by the user through the device control interface of the main control screen, the target peripheral device is determined according to the control command, and the target physical interface and target logic control unit corresponding to the target peripheral device are determined by querying the interface function mapping table. The target logic control unit is invoked so that it sends the control command through the target physical interface. The control command is used to control the target peripheral device.

[0005] By adopting the above technical solution, the interface configuration information input by the user is received and stored. At startup, the configuration is parsed and a mapping table between the logic control unit and the interface function is constructed. The control command is responded to and the corresponding unit is called to control the peripheral device. This realizes flexible control of a set of main control programs that can adapt to multiple peripheral devices. There is no need to develop separate programs for different peripheral devices, which greatly reduces development and maintenance costs and reduces code redundancy and error probability.

[0006] In a preferred embodiment, this application can be further configured such that the logical function of each physical interface includes a physical interface identifier, an associated peripheral device type, an adapted protocol type, and data parsing rules. The step of constructing a logical control unit for each physical interface based on the interface configuration information and generating an interface function mapping table includes: For each physical interface, a protocol driver module is loaded from a pre-configured protocol plugin library according to the protocol type of the physical interface. The protocol driver module and the data parsing rules of the physical interface are encapsulated to obtain the logic control unit of the physical interface. The physical interface identifier, associated peripheral device type, and logic control unit of each physical interface are bound together as an association relationship, and the association relationships of each physical interface constitute the interface function mapping table.

[0007] By adopting the above technical solution, the logical functional composition of the physical interface is clearly defined. By loading the driver module from the protocol plugin library and encapsulating it with data parsing rules to form a logical control unit, and then binding relevant information to generate a mapping table, the functional definition of the physical interface is clearer, the construction of the logical control unit is more standardized, and the mapping table ensures fast and accurate matching between control commands and physical interfaces and control units, thereby improving the response efficiency of peripheral control.

[0008] In a preferred embodiment, this application can be further configured such that: the control command includes the identifier of the target peripheral device and the operation type, the operation type including start control, stop control, parameter adjustment and data acquisition; The invocation of the target logic control unit includes: The protocol driver module of the target logic control unit encodes the control command into a data frame that conforms to the communication protocol of the target peripheral device, and sends the data frame to the target peripheral device; Specifically, when the operation type is data acquisition, the target logic control unit receives the original data of the target peripheral device after format conversion and verification based on the built-in data parsing rules, and updates and displays the peripheral device data on the display interface of the main control screen.

[0009] By adopting the above technical solution, the composition and operation type of control commands are refined. The control commands are encoded into compliant data frames and sent through the protocol driver module. The data is displayed after being processed by parsing rules during data acquisition. This ensures the effective transmission and execution of control commands, allowing the precise implementation of operations such as starting, stopping, and adjusting parameters of peripheral devices. At the same time, it realizes the visualization of sensor data, making it convenient for users to monitor the status of the equipment in real time.

[0010] In a preferred embodiment, this application can be further configured such that the interface configuration information also includes logical linkage rules, which define the triggering conditions and execution actions between different peripheral devices; After the target logic control unit has completed executing the control commands to the target peripheral device, the method further includes: Detect whether the operating status of the target peripheral device meets the triggering conditions defined in the logical linkage rules; If the conditions are met, the collaborative peripheral device to be triggered is determined according to the aforementioned logical linkage rules. Query the interface function mapping table to retrieve the collaborative physical interface and collaborative logic control unit bound to the collaborative peripheral device; The collaborative logic control unit is invoked to execute the actions defined in the logical linkage rules in order to achieve collaborative control across peripheral devices.

[0011] By adopting the above technical solution and adding logical linkage rules to the interface configuration information, the trigger conditions are detected after the target peripheral is controlled. If the conditions are met, other peripherals are linked to perform actions. This breaks through the limitation of independent control of a single peripheral, realizes collaborative work between multiple peripherals, adapts to the device linkage requirements in complex scenarios, and improves the automation and intelligence level of the system.

[0012] In a preferred embodiment, this application can be further configured such that, after receiving the interface configuration information input by the user through the configuration interface of the main control screen, the method further includes: Based on a pre-configured verification rule base, the interface configuration information is verified. The verification rule base includes electrical compatibility rules and protocol matching rules. The electrical compatibility rules are used to verify the electrical signal compatibility between the physical interface type and the associated peripheral device type. The protocol matching rules are used to verify the matching between the protocol type of the physical interface and the hardware communication capability. If either the electrical compatibility rule or the protocol matching rule fails the verification, a verification error message containing the error type and correction suggestions will be displayed on the configuration interface, and the saving of the interface configuration information to the configuration file will be stopped.

[0013] By adopting the above technical solution, the interface configuration information is checked for electrical compatibility and protocol matching through a pre-configured verification rule base. If the verification fails, an error is reported and saving is stopped, thus avoiding problems such as equipment damage and communication failure caused by improper configuration, and ensuring the legality and compatibility of the interface configuration.

[0014] In a preferred embodiment, this application can be further configured such that the method also includes: If the protocol type adapted to the target peripheral device is not configured in the configuration file, then a new protocol driver module corresponding to the new protocol type is constructed; Register the new protocol driver module to the protocol plugin library. After the new protocol type is successfully registered, update the list of selectable protocol types in the configuration interface so that the new protocol type becomes an option for the user.

[0015] By adopting the above technical solution, a new protocol driver module is built and registered for the unconfigured peripheral protocol types, and the protocol list of the configuration interface is updated. This achieves compatibility support for new or proprietary protocol peripherals, expands the system's adaptability, and allows access to new protocol peripherals without refactoring the core program, further enhancing the system's flexibility and scalability.

[0016] In a preferred embodiment, this application can be further configured such that the method also includes: The target logic control unit monitors the communication link quality data of the target physical interface and obtains the operating status data of the target peripheral device through the target physical interface; Each index value in the received operating status data and communication link quality data transmitted by the target logic control unit is compared with the corresponding performance threshold. If any of the operational status data contains indicators that do not meet the corresponding performance thresholds, an indicator exceeding the threshold warning signal will be sent. If any indicator in the communication link quality data does not meet the corresponding performance threshold, the interface configuration adaptive adjustment mechanism will be triggered.

[0017] By adopting the above technical solution, peripheral operating status data and communication link quality data are collected and compared with performance thresholds. When the operating status is abnormal, an alert signal is sent. When the link quality is abnormal, adaptive adjustment is triggered. Real-time monitoring of device operating status and communication link is realized, timely warning of device abnormalities is given, and an automatic optimization entry point is provided for communication link problems.

[0018] In a preferred embodiment, this application can be further configured such that the triggering interface is configured with an adaptive adjustment mechanism, including: Identify the types of link metrics in the communication link quality data that do not meet the corresponding performance thresholds; An optimization strategy is determined based on the link metric type. The optimization strategy includes at least one of the following: replacing the protocol driver module, adjusting the communication parameters of the corresponding protocol driver module, and adjusting the data parsing rules. Update the interface configuration information of the target physical interface based on the optimization strategy; Based on the updated interface configuration information, reconstruct the target logic control unit of the target physical interface; Update the association relationships between the target physical interface, the reconstructed target logic control unit, and the target peripheral device in the interface function mapping table.

[0019] By adopting the above technical solution, the specific process of the interface configuration adaptive adjustment mechanism is clarified. By identifying the type of link anomaly, determining the optimization strategy, updating the configuration information, reconstructing the logical control unit and updating the mapping table, the automatic adaptation and optimization of communication link problems is realized. The link transmission quality can be improved without manual intervention, the system's self-healing ability to cope with communication anomalies is enhanced, and maintenance costs are further reduced.

[0020] Secondly, this application provides a system for implementing the interface function of the device main control screen configuration driver board, which adopts the following technical solution: A system for implementing the configuration driver board interface function of a device main control screen includes: a main control screen, a driver board and a configuration file storage module, wherein the main control screen includes a configuration interface, a device control interface and a main control program; The configuration interface is used to receive interface configuration information input by the user; The device control interface is used to receive control commands input by the user; The driver board connects the main control screen and the peripheral device, and integrates multiple physical interfaces for receiving control commands issued by the main control screen through the logic control unit, and sending the control commands to the peripheral device through the physical interfaces. The configuration file storage module is used to store the interface configuration information.

[0021] In a preferred embodiment, the application may be further configured such that the main control program is configured to: execute the implementation method of the device main control screen configuration driver board interface function as described in any of the first aspects.

[0022] In summary, this application includes the following beneficial technical effects: This application receives and stores user-inputted interface configuration information, parses the configuration upon startup and constructs a mapping table between the logic control unit and the interface function, responds to control commands and calls the corresponding unit to control peripherals, thus realizing flexible control of a single main control program that adapts to multiple peripherals. This eliminates the need to develop separate programs for different peripherals, significantly reducing development and maintenance costs and minimizing code redundancy and error probability. Attached Figure Description

[0023] Figure 1 This is a schematic diagram of the structure of a system for implementing the interface function of a device main control screen configuration driver board according to an embodiment of this application; Figure 2 This is a flowchart illustrating a method for implementing the interface function of a device main control screen configuration driver board according to an embodiment of this application. Detailed Implementation

[0024] The following is in conjunction with the appendix Figure 1 To be continued Figure 2 This application will be described in further detail.

[0025] This specific embodiment is merely an explanation of this application and is not intended to limit it. After reading this specification, those skilled in the art can make modifications to this embodiment without contributing any inventive step, but such modifications are protected by patent law as long as they fall within the scope of the claims of this application.

[0026] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0027] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.

[0028] It should be noted that all data interaction processes involved in this application have corresponding transmission protocols, including authorized data collection and use, and both parties involved in the data interaction have completed data authorization through the execution of the protocol.

[0029] This application provides a method for implementing the configuration driver board interface function of a device main control screen. This method is applied to a system for implementing the configuration driver board interface function of a device main control screen. A schematic diagram of the system structure is shown below. Figure 1 As shown, system 100 includes: main control screen 101, driver board 102 and configuration file storage module 103. The main control screen 100 includes configuration interface, device control interface and main control program (not shown in the figure).

[0030] like Figure 2As shown, the method provided in this embodiment is executed by the main control screen, and the method includes steps S201-S204, wherein: S201. Receive the interface configuration information input by the user through the configuration interface of the main control screen, and store the interface configuration information in the configuration file. The interface configuration information is used to define the logical function of at least one physical interface.

[0031] Specifically, the interface configuration information is core data defined by the user based on peripheral control requirements, used to associate physical interfaces with peripheral functions. It includes the physical interface identifier, associated peripheral device type, protocol type, and data parsing rules. The physical interface identifier serves as a unique identification code for each hardware interface on the driver board, distinguishing different hardware communication channels and ensuring accurate binding of configuration information to the hardware interface. The associated peripheral device type refers to the type of external device bound to the physical interface, including water pumps, air conditioners, and internal circulation fans. The protocol type specifies the standard rules followed when the physical interface communicates with the peripheral device, including peripheral communication protocols such as RS485 and CAN. The data parsing rules define how the data fed back by the peripheral device is processed, including data byte length, checksum format, and numerical conversion formulas. The configuration file is an editable file in JSON, XML, or YAML format, used for persistent storage of interface configuration information, supporting flexible updates without code modification, avoiding the limitations of traditional hard-coding. The configuration interface is a visual operation interface on the main control screen, providing interactive elements such as a physical interface list, peripheral type selection box, protocol type drop-down menu, and data parsing rule configuration items for users to intuitively input configuration information.

[0032] After the main control screen starts, the user enters the configuration interface via touch or button operation. The interface automatically loads all physical interfaces recognized by the driver board and displays the hardware attributes of each physical interface in a list format, such as interface type, communication speed range, and electrical specifications, facilitating accurate selection by the user. For any physical interface, the user configures the logical functions in the interface, including selecting the associated peripheral device type, protocol type, and data parsing rules. The associated peripheral device type and protocol type can be selected via drop-down menus, while the data parsing rules can be entered from the interface form. After the user completes the configuration of the physical interface, clicking the save button on the interface triggers configuration information verification. If the verification passes, all configuration information is written to the configuration file according to the preset format, and the configuration file is stored in the main control screen's local storage module. The configuration information verification includes verifying the uniqueness of the interface identifier and the compatibility of the protocol type with the interface hardware.

[0033] S202. When the main control program of the main control screen starts, it reads and parses the configuration file, constructs the logical control unit of each physical interface based on the interface configuration information, and generates an interface function mapping table.

[0034] Specifically, the main control program is the core executable program built into the main control screen, responsible for coordinating core processes such as configuration loading, logic construction, and instruction processing, serving as the central hub of system operation. The logic control unit is a virtual control module built based on interface configuration information, encapsulating the protocol driver logic and data parsing logic for the corresponding physical interfaces. The interface function mapping table is an in-memory data table storing the correspondence between physical interface identifiers, associated peripheral device types, and logic control units, used for rapid lookup and location, improving control command response efficiency. The protocol plugin library is a collection of protocol driver modules pre-integrated into the main control program, containing ready-made driver code for various standard communication protocols, supporting on-demand loading and avoiding redundant development.

[0035] When the main control screen powers on or the main control program restarts, the main control program automatically triggers the configuration file reading process. It reads the locally stored configuration file through the file read / write interface and calls the corresponding parser based on the file extension. The parser performs syntax validation and data extraction on the configuration file, converting the structured data in JSON / XML / YAML format into a memory data structure recognizable by the main control program. It extracts key parameters such as physical interface identifier, peripheral type, protocol type, and data parsing rules from each configuration entry, while filtering out invalid configurations, such as those with incorrect formatting or missing parameters.

[0036] S203. Respond to the control commands input by the user through the device control interface of the main control screen, determine the target peripheral device according to the control commands, and query the interface function mapping table to determine the target physical interface and target logic control unit corresponding to the target peripheral device.

[0037] Specifically, the device control interface is the peripheral operation interface on the main control screen, displaying a list of all configured peripheral devices, such as water pump control and air conditioning control. It provides interactive elements such as start / stop buttons, parameter adjustment sliders, and data display areas, serving as the entry point for users to issue control commands. The target peripheral device is the peripheral device corresponding to the control command currently input by the user. The control command is the operation command entered by the user through the device control interface, including the target peripheral device identifier and operation type. Operation types include start, stop, speed adjustment, and water temperature acquisition. The target physical interface and target logic control unit are the physical interfaces and logic control units bound to the target peripheral device, found through the interface function mapping table. The target physical interface is the hardware channel for executing control commands, and the target logic control unit is the software core for executing control commands.

[0038] S204. Call the target logic control unit so that the target logic control unit sends control commands through the target physical interface. The control commands are used to control the target peripheral devices.

[0039] Specifically, the main control program calls the target logic control unit, which encodes the control instructions into peripheral-recognizable data frames through its encapsulated protocol driver module, and then sends them to the target peripheral device through the target physical interface. At the same time, it receives the response data from the target peripheral device and parses and feeds back the data. The core is to realize a complete control closed loop of instruction encoding, hardware transmission, peripheral execution, and data feedback.

[0040] This embodiment receives and stores the interface configuration information input by the user, parses the configuration at startup and constructs a mapping table between the logic control unit and the interface function, responds to control commands and calls the corresponding unit to control the peripherals, thus realizing flexible control of a single main control program that can adapt to multiple peripherals. It eliminates the need to develop separate programs for different peripherals, greatly reducing development and maintenance costs and reducing code redundancy and error probability.

[0041] One possible implementation of this application embodiment is that the logical function of each physical interface includes a physical interface identifier, an associated peripheral device type, an adapted protocol type, and data parsing rules. Based on the interface configuration information, a logical control unit is constructed for each physical interface, and an interface function mapping table is generated, including: For each physical interface, a protocol driver module is loaded from a pre-configured protocol plugin library according to the protocol type of the physical interface. The protocol driver module and the data parsing rules of the physical interface are encapsulated to obtain the logical control unit of the physical interface. Each physical interface's physical interface identifier, associated peripheral device type, and logic control unit are bound together into an association relationship, and the association relationships of each physical interface constitute an interface function mapping table.

[0042] In this embodiment, the protocol plugin library is a standardized set of protocol drivers pre-integrated into the main control program. It contains ready-made driver code modules for various mainstream communication protocols. Each module corresponds to a protocol type and has low-level functions such as data sending, receiving, frame assembly, and frame parsing for that protocol, supporting dynamic loading on demand. The protocol driver module is an independent code unit in the protocol plugin library corresponding to a specific protocol type. It is the core software component for implementing interface and peripheral protocol adaptation, and has low-level communication functions such as control command encoding, data frame assembly, and data sending. The protocol plugin library stores protocol driver modules in a key-value pair manner, where the key is the protocol type name and the value is the memory address or file path of the driver module.

[0043] If a corresponding protocol driver module is matched from the pre-configured protocol plugin library based on the protocol type of the physical interface, the module is loaded into memory through the dynamic link library loading interface, and the core functions of the module are initialized, such as setting basic parameters like communication baud rate, data bits, and stop bits. The parameter values ​​are extracted from the interface configuration information.

[0044] If no corresponding driver module is found in the pre-configured protocol plugin library based on the protocol type of the physical interface, such as when a protocol type that is not pre-stored is configured, an exception prompt mechanism is triggered, displaying a prompt that the protocol type is not supported on the main control screen configuration interface, and skipping the construction of the logic control unit for that interface.

[0045] After loading the protocol driver module, the main control program passes the data parsing rules of the physical interface to the protocol driver module, and binds the two into an independent logical control unit through a wrapper function. The wrapper function creates a dedicated data structure for the logical control unit, containing function pointers of the protocol driver module and the parameter set of the data parsing rules. During the wrapper process, the data parsing rules are embedded into the data flow processing of the protocol driver module. For example, after receiving raw data from the peripheral device, the driver module automatically calls the verification logic in the parsing rules to verify the data validity, and then converts the raw data into actual values ​​through a conversion formula, without additional intervention from the main control program. A unique virtual identifier and a fixed memory address are assigned to each wrapped logical control unit to facilitate the binding and calling of subsequent interface function mapping tables.

[0046] The main control program initializes the data structure of the interface function mapping table, choosing a hash table as the storage medium. The key of the hash table is the associated peripheral device type, and the value is a structure containing the physical interface identifier and logic control unit information, ensuring fast location when querying by peripheral type. For each physical interface with a completed logic control unit encapsulation, an association record is constructed. The record fields include the physical interface identifier, the associated peripheral device type, the logic control unit virtual identifier, and the logic control unit memory address. The association record is inserted into the interface function mapping table. During insertion, a hash calculation is performed based on the associated peripheral device type to determine the storage location of the record in the hash table. If multiple physical interfaces are associated with the same type of peripheral, they are stored in the same hash bucket, sorted by the physical interface identifier, for easy and accurate matching later.

[0047] After the mapping table is constructed, the main control program loads it into the cache to reduce memory access latency during queries. Simultaneously, it performs integrity checks on the mapping table to ensure that each record has a unique physical interface identifier and a valid memory address for the logic control unit, preventing matching errors during queries. Once the checks pass, the interface function mapping table is ready, awaiting query and invocation of user control commands. For example, when a user issues a command to start a water pump, the main control program can quickly query the mapping table using the water pump peripheral device type to locate the corresponding physical interface and logic control unit, and directly invoke that control unit to execute the control logic.

[0048] This embodiment clearly defines the logical functional composition of the physical interface. By loading the driver module from the protocol plugin library and encapsulating it with data parsing rules to form a logical control unit, and then binding relevant information to generate a mapping table, the functional definition of the physical interface is clearer and the construction of the logical control unit is more standardized. At the same time, the mapping table ensures that the control commands are quickly and accurately matched with the physical interface and control unit, thereby improving the response efficiency of peripheral control.

[0049] In one possible implementation of this application, the control command includes the identifier of the target peripheral device and the operation type, which includes start control, stop control, parameter adjustment, and data acquisition. Invoking the target logic control unit includes: The protocol driver module of the target logic control unit encodes the control commands into data frames that conform to the communication protocol of the target peripheral device, and sends the data frames to the target peripheral device; When the operation type is data acquisition, the target logic control unit receives the original data of the target peripheral device based on the built-in data parsing rules, performs format conversion and verification on the received peripheral device data, and updates and displays the peripheral device data on the main control screen.

[0050] In this embodiment, the user issues control commands through the device control interface. The main control program receives the control commands through the interface interaction interface and calls the command parsing module to perform syntax parsing and validity verification on the commands. The verification content includes: verifying whether the command format is complete, whether the target peripheral identifier is in the configured peripheral list, and whether the operation type is one of the supported preset types.

[0051] After successful verification, the core information in the control commands is extracted, and the extracted target peripheral identifier, operation type, additional parameters, and other information are stored in a temporary command buffer to form a standardized command data structure. The main control program, based on the identifier of the target peripheral device, queries the interface function mapping table to locate the corresponding target logic control unit and target physical interface, and then transmits the standardized command data from the temporary command buffer to the target logic control unit.

[0052] The target logic control unit calls the built-in protocol driver module, which first reads the communication protocol parameters of the target peripheral from the interface configuration information. The communication protocol is a preset communication rule for the target peripheral device, including parameters such as data frame format, baud rate, data bits, stop bits, and parity bits; it is the language specification for data interaction between the main control panel and the peripheral. The protocol driver module encodes the control commands according to the operation type and communication protocol, assembling data frames. Each data frame includes an address code, function code, data segment, and checksum. The data frame format in the communication protocol defines the arrangement of the various components within the data frame. Different operation types correspond to different address codes and function codes. The data segments for start and stop control are empty; the data segments for parameter adjustment contain the corresponding target parameter values; and the data segments for data acquisition contain the register addresses of the corresponding sensors.

[0053] After the data frame is assembled, the protocol driver module, through the hardware driver of the target physical interface, sends the data frame to the target peripheral device in the form of an electrical signal according to the baud rate, data bits, and other parameters in the communication protocol. During the transmission process, the protocol driver module monitors the transmission status of the physical interface in real time. If a transmission completion signal is detected, it indicates successful transmission, and the subsequent response waiting process begins. If a transmission timeout or transmission failure is detected, the data is retransmitted according to the configured number of retries. If the transmission still fails after reaching the retries, a command transmission failure message is displayed on the main control screen.

[0054] When the operation type is data acquisition, after the target peripheral device responds to the data acquisition command data frame, it parses the function code and register address, acquires the corresponding physical quantity data, and converts the physical quantity into raw binary data, which is not directly readable. The target peripheral device assembles the response data frame according to the communication protocol, which includes the address code, function code (consistent with the acquisition command function code), data segment (raw data), and check code, and feeds it back to the target physical interface through the communication link.

[0055] The target physical interface receives the response data frame, converts the electrical signal into a digital signal, and transmits it to the protocol driver module of the target logic control unit. The protocol driver module first performs an integrity check on the response data frame, verifying whether the checksum matches the locally calculated result and whether the data frame length meets the communication protocol requirements. If the check fails, the data frame is discarded, and a re-acquisition command is triggered. If the check passes, the protocol driver module extracts the raw data from the data frame and processes the raw data using built-in data parsing rules. These data parsing rules are pre-configured raw data processing rules in the target logic control unit, including logic for data format conversion, validity verification, and unit conversion. Validity verification includes determining whether the acquired data is within a preset valid range, such as whether the acquired water temperature data is within the normal water temperature range; if it exceeds this range, the data is marked as abnormal. After data parsing is complete, the target logic control unit feeds back the processed peripheral device data to the main control program.

[0056] After receiving data from the peripheral device, the main control program calls the interface display module to update the displayed data in the corresponding data display area of ​​the device control interface. The data is displayed using preset normal and abnormal data display methods; for example, normal data is displayed in black, and abnormal data is displayed in red. Simultaneously, the data acquisition timestamp is recorded for easy viewing of historical data by the user.

[0057] This embodiment refines the composition and operation type of control commands. The control commands are encoded into compliant data frames and sent through the protocol driver module. The data is processed by parsing rules during data acquisition and then displayed, ensuring the effective transmission and execution of control commands. This allows for the precise execution of operations such as starting, stopping, and adjusting parameters of peripheral devices. At the same time, it realizes the visualization of sensor data, making it convenient for users to monitor the device status in real time.

[0058] In one possible implementation of this application embodiment, the interface configuration information further includes logical linkage rules, which define the triggering conditions and execution actions between different peripheral devices. After the target logic control unit has completed executing the control commands to the target peripheral device, the method further includes: Detect whether the operating status of the target peripheral device meets the triggering conditions defined in the logical linkage rules; If the conditions are met, the collaborative peripheral device to be triggered is determined according to the logical linkage rules. The query interface function mapping table is used to retrieve the collaborative physical interface and collaborative logic control unit bound to the collaborative peripheral device; The collaborative logic control unit is invoked to execute the actions defined in the logic linkage rules in order to achieve collaborative control across peripheral devices.

[0059] In this embodiment, the main control screen configuration interface adds a logical linkage rule configuration area in addition to the basic interface configuration area, providing a visual rule editing tool for users to create logical linkage rules. The triggering conditions can be state triggering, data threshold triggering, and delay triggering. After the user completes the rule configuration, they can click to save the rule. The main control program will write the logical linkage rule into the configuration file according to the main format of the configuration file and store it in association with the basic interface configuration information.

[0060] After the target logic control unit sends control commands to the target peripheral through the target physical interface, it continuously monitors the response status of the peripheral. If the control command is a start / stop command, it receives the operating status signal from the peripheral and records the time of the status change. If the control command is a parameter adjustment or data acquisition command, it receives the real-time operating data from the peripheral. The target logic control unit feeds back the current status of the target peripheral to the main control program, which stores the status data in a temporary status buffer.

[0061] The main control program queries the configuration file based on the target peripheral's identifier, filters out all logical linkage rules triggered by that peripheral device, and forms a list of associated rules. The main control program iterates through the list of associated rules, verifying whether the current state of the target peripheral meets the trigger conditions in each rule. If a rule's trigger condition is successfully matched, the rule is marked as pending execution, and the subsequent peripheral triggering process begins; if all rules fail to meet their trigger conditions, the linkage detection process ends, and the target peripheral's status and data are only updated on the main control screen.

[0062] Once the triggering condition is met, the main control program extracts the identifier of the collaborative peripheral device from the pending logical linkage rules. It then calls the query interface of the interface function mapping table, using the collaborative peripheral device identifier as the search keyword, and traverses the associated peripheral device type field in the mapping table to match the corresponding collaborative physical interface and collaborative logic control unit. The control process of the collaborative logic control unit over the collaborative peripheral device is consistent with the process of the target logic control unit executing control commands in the aforementioned embodiment. The main control program updates the status and data of the collaborative peripheral device on the device control interface and simultaneously records the linkage execution log.

[0063] This embodiment adds logical linkage rules to the interface configuration information. After the target peripheral is controlled, the trigger condition is detected. If the condition is met, other peripherals are linked to perform actions. This breaks through the limitation of independent control of a single peripheral, realizes collaborative work between multiple peripherals, adapts to the device linkage requirements in complex scenarios, and improves the automation and intelligence level of the system.

[0064] In one possible implementation of this application embodiment, after receiving the interface configuration information input by the user through the configuration interface of the main control screen, the method further includes: Based on a pre-configured verification rule base, the interface configuration information is verified. The verification rule base includes electrical compatibility rules and protocol matching rules. Electrical compatibility rules are used to verify the electrical signal compatibility between the physical interface type and the associated peripheral device type. Protocol matching rules are used to verify the matching between the protocol type of the physical interface and the hardware communication capability. If either the electrical compatibility rule or the protocol matching rule fails the verification, the verification error message containing the error type and correction suggestions will be displayed on the configuration interface, and the saving of the interface configuration information to the configuration file will be stopped.

[0065] In this embodiment, after the main control screen is powered on, it accesses the locally stored verification rule base file through the file reading interface, parses the rule base file, and extracts electrical compatibility rules and protocol matching rules. The electrical compatibility rules include the physical interface type, the range of compatible peripheral device types, and electrical parameter matching requirements; the protocol matching rules include the physical interface type, the list of protocol types supported by the interface, and the hardware capability requirements corresponding to the protocol.

[0066] After completing the configuration of one or more interfaces on the main control screen configuration interface, the user clicks the save button. The configuration interface module receives the save command, collects all currently entered interface configuration information, and organizes it into standardized verification data according to a preset format, such as a structure array containing fields such as physical interface type, associated peripheral type, and protocol type. The configuration interface module sends a verification request to the verification module, passing the standardized verification data to the verification module and triggering the verification process.

[0067] The verification module iterates through each interface configuration record in the standardized verification data. For each record, it extracts the physical interface type and associated peripheral device type. Using the physical interface type as an index, it queries the electrical compatibility association table in the rule cache to obtain the range of compatible peripheral types and electrical parameter requirements for that interface type. It then compares the current configuration information to see if the peripheral device type is within the compatibility range and whether the electrical parameters match the interface's electrical parameters. If they match, the electrical compatibility verification passes; otherwise, it records an electrical compatibility verification failure and marks the error type as electrical incompatibility.

[0068] For the interface configuration information that has passed electrical compatibility verification, extract the physical interface type and the configured protocol type. Using the physical interface type as an index, query the protocol matching association table in the rule cache to obtain a list of supported protocol types for that interface. Check whether the configured protocol type is in the supported list and whether the corresponding hardware requirements (such as communication rate) do not exceed the hardware capabilities of the interface. If it is in the supported list and the hardware capabilities meet the requirements, the protocol matching verification passes; if it is not in the supported list or the hardware capabilities do not meet the requirements, record the protocol matching verification as failed and mark the error type as protocol mismatch.

[0069] If all configuration information passes the verification, the verification module returns a verification pass signal to the configuration interface module. The configuration interface module then writes the interface configuration information into the configuration file, completes the save operation, and displays a save success message on the interface.

[0070] If any verification fails, the verification module generates an error message for each failed configuration, including the error type (electrical incompatibility / protocol mismatch), a detailed error description, and suggested corrections. After receiving the error message, the configuration interface module displays all error items in a list format in the error message area of ​​the configuration interface, highlighting them in red, while simultaneously preventing the configuration information from being saved to the configuration file. After viewing the error message, the user can modify the interface configuration information according to the suggested corrections. After modification, clicking "Save" again triggers the verification process again until verification succeeds.

[0071] This embodiment uses a pre-configured verification rule base to perform electrical compatibility and protocol matching verification on the interface configuration information. If the verification fails, an error is reported and saving is stopped, thus avoiding problems such as equipment damage and communication failure caused by improper configuration, and ensuring the legality and compatibility of the interface configuration.

[0072] One possible implementation of this application embodiment includes: If the protocol type adapted to the target peripheral device is not configured in the configuration file, then a new protocol driver module corresponding to the new protocol type will be built. Register the new protocol driver module to the protocol plugin library. After the new protocol type is successfully registered, update the list of selectable protocol types in the configuration interface so that the new protocol type becomes an option for the user.

[0073] In this embodiment, the user selects the target peripheral device on the main control screen configuration interface, and the interface automatically reads the device description information of the peripheral. The main control program extracts the protocol type from the device description information, calls the configuration file reading interface, and obtains the predefined protocol type list in the configuration file. The main control program compares the extracted peripheral protocol type with the predefined list one by one. If the protocol type already exists in the list, the subsequent operations are performed according to the normal configuration process; if the protocol type does not appear in the list, it is determined to be a new protocol type, triggering the new protocol driver module construction process, and displaying a prompt on the configuration interface asking whether to build the corresponding driver module after detecting an unsupported protocol, waiting for user confirmation.

[0074] After the user clicks the "Confirm Build" button on the configuration interface, the interface redirects to the new protocol configuration page, providing protocol parameter configuration items such as frame format configuration, communication parameter settings, and data parsing rule configuration. After the user completes the parameter configuration, the main control program calls the protocol driver module template, embeds the configured new protocol parameters into the corresponding logical location in the template, and automatically generates the code file for the new protocol driver module. The main control program compiles and performs functional testing on the generated new protocol driver module, including simulating the sending and receiving of data frames under the new protocol to verify whether the module can correctly encode instructions and parse response data. If the test passes, it proceeds to the next step; if the test fails, it returns an error message, guiding the user to modify the parameters and regenerate.

[0075] The main control program stores the tested new protocol driver module file in a designated directory of the protocol plugin library. It then calls the registration interface of the protocol plugin library to enter the registration information of the new protocol driver module into the library, forming an index entry containing: protocol type name, driver module storage path, module function interface address, and module initialization function. The protocol plugin library updates its index table, integrating the registration information of the new protocol driver module with existing module information, completing the registration process, and returning a confirmation signal of successful registration to the main control program.

[0076] After the new protocol driver module is successfully registered, the main control program will synchronously update the protocol type list in the configuration interface and add the new protocol type to the selectable list. Users can directly select the new protocol from the protocol type list in the subsequent interface configuration process and associate it with the target peripheral. The main control program can load the corresponding new protocol driver module normally to realize the control and data interaction of the new protocol peripheral.

[0077] This embodiment constructs and registers a new protocol driver module for peripheral protocol types that are not configured, updates the protocol list in the configuration interface, realizes compatibility support for new or proprietary protocol peripherals, expands the system's adaptability, and allows access to new protocol peripherals without refactoring the core program, further enhancing the system's flexibility and scalability.

[0078] One possible implementation of this application embodiment includes: The target logic control unit monitors the communication link quality data of the target physical interface and obtains the operating status data of the target peripheral device through the target physical interface; Each index value in the received operating status data and communication link quality data transmitted by the target logic control unit is compared with the corresponding performance threshold. If any metrics in the running status data do not meet the corresponding performance thresholds, an metric exceeding the threshold warning signal will be sent. If there are indicators in the communication link quality data that do not meet the corresponding performance threshold, the interface configuration adaptive adjustment mechanism will be triggered.

[0079] Specifically, the target logic control unit invokes its built-in protocol driver module to send a status query command to the target peripheral device via the target physical interface. Upon receiving the query command, the target peripheral device sends back a response frame containing its own operating status data, including speed, fault codes, and temperature. The target physical interface receives the response frame and transmits it to the target logic control unit. The target logic control unit parses the response frame according to data parsing rules, extracts the operating status data, and stores it in the status data buffer. Simultaneously, the target logic control unit activates the link monitoring module, collecting communication link quality data, including transmission delay, packet loss rate, and bit error rate, at the preset sampling frequency in the configuration file. The collected communication link quality data is then stored in the link data buffer. Performance thresholds are the pre-configured criteria for each indicator in the system, including operating status thresholds and communication link quality thresholds, set by the user based on the normal operating requirements of peripherals and the system's communication performance needs. The main control program reads the pre-stored performance threshold configurations and stores them in the threshold buffer. It extracts the operating status data of the target peripheral from the status data buffer and compares it with the corresponding operating status thresholds one by one. If it is a numerical parameter, such as pump speed, it compares whether it is within the threshold range; if it exceeds, it is determined to be substandard. If it is a fault code, it compares whether it is a preset fault-free code; if it is not a fault-free code, it is determined to be substandard. It extracts communication link quality data from the link data buffer and compares it with the corresponding communication link quality thresholds one by one.

[0080] The comparison results of all indicators are summarized. If at least one indicator of the communication link quality data fails to meet the performance threshold, it is determined that adjustment is needed, and the adaptive adjustment trigger process is initiated. If all indicators meet the standards, the system returns to normal monitoring status and continues to collect data in a loop.

[0081] This embodiment collects peripheral operating status data and communication link quality data and compares them with performance thresholds. When the operating status is abnormal, it sends an alert signal. When the link quality is abnormal, it triggers adaptive adjustment, realizing real-time monitoring of device operating status and communication link, timely warning of device abnormalities, and providing an automatic optimization entry point for communication link problems.

[0082] One possible implementation of this application embodiment triggers an interface configuration adaptive adjustment mechanism, including: Identify the types of link metrics in the communication link quality data that do not meet the corresponding performance thresholds; The optimization strategy is determined based on the type of link metric. The optimization strategy includes at least one of the following: replacing the protocol driver module, adjusting the communication parameters of the corresponding protocol driver module, and adjusting the data parsing rules. Update the interface configuration information of the target physical interface based on the optimization strategy; Based on the updated interface configuration information, reconstruct the target logical control unit of the target physical interface; Update the relationship between the target physical interface, the reconstructed target logic control unit, and the target peripheral device in the interface function mapping table.

[0083] In this embodiment, the link metrics include transmission delay, packet loss rate, bit error rate, and signal strength. Transmission delay represents the time difference between data transmission and reception response; packet loss rate represents the proportion of lost data frames to the total number of transmitted frames; bit error rate represents the proportion of erroneous bits to the total number of transmitted bits; and signal strength represents the power of the transmitted signal.

[0084] The pre-defined correspondence between the types of link metrics exceeding the standard and the optimization strategies includes: if the link metric is excessive transmission delay or excessive packet loss rate, the optimization strategy is to reduce the communication baud rate and extend the communication timeout, where the baud rate is reduced according to a preset gradient and the timeout is extended proportionally to the delay exceeding the standard. This strategy corresponds to adjusting the communication parameters of the corresponding protocol driver module. If the link metric is excessive bit error rate, the optimization strategy is to enhance the data frame verification logic, replacing the original verification rule with CRC16 or CRC32 verification rules. This strategy corresponds to adjusting the data parsing rules. If the link metric is insufficient signal strength, the protocol optimization strategy is to replace it with a protocol type with stronger anti-interference capabilities, such as CAN2.0 or RS485. This strategy corresponds to replacing the protocol driver module. If the optimization strategy for the target physical interface includes both adjusting the communication parameters of the corresponding protocol driver module and replacing the protocol driver module, the replacement of the protocol driver module is performed first, followed by adjusting the communication parameters of the replaced protocol driver module.

[0085] According to the aforementioned embodiments, the logic control unit is constructed from the logic of the protocol driver module and the data parsing rules. Based on the updated interface configuration information, the adapted protocol driver module is reloaded, the adjusted parsing rules are encapsulated, and the target logic control unit is reconstructed, so that the optimization strategy is integrated into the logic control unit.

[0086] This embodiment clarifies the specific process of the interface configuration adaptive adjustment mechanism. By identifying the type of link anomaly, determining the optimization strategy, updating the configuration information, reconstructing the logic control unit, and updating the mapping table, it realizes automatic adaptation and optimization of communication link problems. It can improve the link transmission quality without manual intervention, enhance the system's self-healing ability to cope with communication anomalies, and further reduce maintenance costs.

[0087] This application provides a system 100 for implementing the interface function of a device main control screen configuration driver board, including: a main control screen 101, a driver board 102, and a configuration file storage module 103. The main control screen 101 includes a configuration interface, a device control interface, and a main control program. The configuration interface is used to receive interface configuration information input by the user; the device control interface is used to receive control commands input by the user; the driver board connects the main control screen and peripheral devices, integrates multiple physical interfaces, and is used to receive control commands issued by the main control screen through the logic control unit and send the control commands to the peripheral devices through the physical interfaces; the configuration file storage module is used to store the interface configuration information.

[0088] The above are only some embodiments of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for implementing the configuration driver board interface function of a device main control screen, characterized in that, A system for implementing the configuration driver board interface function of a device main control screen, wherein the method is executed by the main control screen, and the method includes: The interface configuration information is received by the user through the configuration interface of the main control screen, and the interface configuration information is stored in the configuration file. The interface configuration information is used to define the logical function of at least one physical interface. When the main control program of the main control screen starts, it reads and parses the configuration file, constructs the logical control unit of each physical interface based on the interface configuration information, and generates an interface function mapping table. In response to the control command input by the user through the device control interface of the main control screen, the target peripheral device is determined according to the control command, and the target physical interface and target logic control unit corresponding to the target peripheral device are determined by querying the interface function mapping table. The target logic control unit is invoked so that it sends the control command through the target physical interface. The control command is used to control the target peripheral device.

2. The method for implementing the device main control screen configuration driver board interface function according to claim 1, characterized in that, The logical functions of each physical interface include physical interface identifier, associated peripheral device type, adapted protocol type, and data parsing rules; The step of constructing a logical control unit for each physical interface based on the interface configuration information and generating an interface function mapping table includes: For each physical interface, a protocol driver module is loaded from a pre-configured protocol plugin library according to the protocol type of the physical interface. The protocol driver module and the data parsing rules of the physical interface are encapsulated to obtain the logic control unit of the physical interface. The physical interface identifier, associated peripheral device type, and logic control unit of each physical interface are bound together as an association relationship, and the association relationships of each physical interface constitute the interface function mapping table.

3. The method for implementing the device main control screen configuration driver board interface function according to claim 1, characterized in that, The control command includes the identifier of the target peripheral device and the operation type, which includes start control, stop control, parameter adjustment, and data acquisition. The invocation of the target logic control unit includes: The protocol driver module of the target logic control unit encodes the control command into a data frame that conforms to the communication protocol of the target peripheral device, and sends the data frame to the target peripheral device; Specifically, when the operation type is data acquisition, the target logic control unit receives the original data of the target peripheral device after format conversion and verification based on the built-in data parsing rules, and updates and displays the peripheral device data on the display interface of the main control screen.

4. The method for implementing the device main control screen configuration driver board interface function according to claim 1, characterized in that, The interface configuration information also includes logical linkage rules, which define the triggering conditions and execution actions between different peripheral devices; After the target logic control unit has completed executing the control commands to the target peripheral device, the method further includes: Detect whether the operating status of the target peripheral device meets the triggering conditions defined in the logical linkage rules; If the conditions are met, the collaborative peripheral device to be triggered is determined according to the aforementioned logical linkage rules. Query the interface function mapping table to retrieve the collaborative physical interface and collaborative logic control unit bound to the collaborative peripheral device; The collaborative logic control unit is invoked to execute the actions defined in the logical linkage rules in order to achieve collaborative control across peripheral devices.

5. The method for implementing the device main control screen configuration driver board interface function according to claim 1, characterized in that, After receiving the interface configuration information input by the user through the configuration interface of the main control screen, the method further includes: Based on a pre-configured verification rule base, the interface configuration information is verified. The verification rule base includes electrical compatibility rules and protocol matching rules. The electrical compatibility rules are used to verify the electrical signal compatibility between the physical interface type and the associated peripheral device type. The protocol matching rules are used to verify the matching between the protocol type of the physical interface and the hardware communication capability. If either the electrical compatibility rule or the protocol matching rule fails the verification, a verification error message containing the error type and correction suggestions will be displayed on the configuration interface, and the saving of the interface configuration information to the configuration file will be stopped.

6. The method for implementing the device main control screen configuration driver board interface function according to claim 1, characterized in that, The method further includes: If the protocol type adapted to the target peripheral device is not configured in the configuration file, then a new protocol driver module corresponding to the new protocol type is constructed; Register the new protocol driver module to the protocol plugin library. After the new protocol type is successfully registered, update the list of selectable protocol types in the configuration interface so that the new protocol type becomes an option for the user.

7. The method for implementing the device main control screen configuration driver board interface function according to claim 1, characterized in that, The method further includes: The target logic control unit monitors the communication link quality data of the target physical interface and obtains the operating status data of the target peripheral device through the target physical interface; Each index value in the received operating status data and communication link quality data transmitted by the target logic control unit is compared with the corresponding performance threshold. If any of the operational status data contains indicators that do not meet the corresponding performance thresholds, an indicator exceeding the threshold warning signal will be sent. If any indicator in the communication link quality data does not meet the corresponding performance threshold, the interface configuration adaptive adjustment mechanism will be triggered.

8. The method for implementing the device main control screen configuration driver board interface function according to claim 7, characterized in that, The trigger interface is configured with an adaptive adjustment mechanism, including: Identify the types of link metrics in the communication link quality data that do not meet the corresponding performance thresholds; An optimization strategy is determined based on the link metric type. The optimization strategy includes at least one of the following: replacing the protocol driver module, adjusting the communication parameters of the corresponding protocol driver module, and adjusting the data parsing rules. Update the interface configuration information of the target physical interface based on the optimization strategy; Based on the updated interface configuration information, reconstruct the target logic control unit of the target physical interface; Update the association relationships between the target physical interface, the reconstructed target logic control unit, and the target peripheral device in the interface function mapping table.

9. A system for implementing the interface function of a device main control screen configuring a driver board, characterized in that, include: The system includes a main control screen, a driver board, and a configuration file storage module. The main control screen includes a configuration interface, a device control interface, and a main control program. The configuration interface is used to receive interface configuration information input by the user; The device control interface is used to receive control commands input by the user; The driver board connects the main control screen and the peripheral device, and integrates multiple physical interfaces for receiving control commands issued by the main control screen through the logic control unit, and sending the control commands to the peripheral device through the physical interfaces. The configuration file storage module is used to store the interface configuration information.

10. The system for implementing the device main control screen configuration driver board interface function according to claim 9, characterized in that, The main control program is configured to: execute the implementation method of the device main control screen configuration driver board interface function as described in any one of claims 1-8.