Industrial equipment management method and device, electronic equipment and readable storage medium

By receiving device management requests and parsing operation instructions, and calling local system tools or virtualization management libraries, unified management of the physical hardware and virtual machines of industrial controllers is achieved, solving the problem of intelligent control in heterogeneous environments and improving management efficiency and robustness.

CN122260929APending Publication Date: 2026-06-23DUAL DOMAIN TIMES (SHANGHAI) COMPUTER TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610150855.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-03
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing technologies are insufficient to achieve intelligent management and control of physical hardware and virtualized resources in highly heterogeneous industrial control environments, and traditional manual operation and maintenance methods are difficult to adapt to the needs of large-scale, efficient and intelligent modern industrial management.

Method used

The system receives device management requests through the application communication protocol interface, parses the target operation object and operation instructions, calls local system tools or virtualization management libraries, and performs monitoring and configuration of physical hardware or virtual machines to achieve unified management.

Benefits of technology

It enables centralized, efficient, and intelligent management and control of physical hardware and virtualized resources, isolates the differences between the upper-level management logic and the specific implementation of the underlying heterogeneous hardware and virtualization platform, and improves the robustness of device management and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122260929A_ABST
    Figure CN122260929A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of data processing, and provides an industrial equipment management method and device, electronic equipment and a readable storage medium. The method comprises the following steps: receiving a device management request issued by a calling party through an application program communication protocol interface; analyzing the device management request to determine a target operation object and an operation instruction; the target operation object is physical hardware or virtualized resources; in response to the target operation object being physical hardware, a local system tool or a hardware abstract library corresponding to the target physical hardware is called according to the operation instruction to execute monitoring or configuration on the target physical hardware on an industrial controller; and in response to the target operation object being virtualized resources, a bottom-layer virtualization engine is called through a virtualization management library according to the operation instruction to execute life cycle management or resource allocation on a target virtual machine running on the industrial controller.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to an industrial equipment management method, apparatus, electronic device, and readable storage medium. Background Technology

[0002] With the development of industrial technology and the deepening of intelligent manufacturing, industrial control systems are undergoing profound changes towards networking, intelligence, and platformization. Edge computing devices, industrial controllers, and virtualization technologies are widely deployed on production sites, undertaking core tasks such as data acquisition, process control, and equipment monitoring, driving industrial automation towards flexibility and integration.

[0003] However, industrial equipment is highly heterogeneous in hardware and has a decentralized management model. The traditional manual maintenance method for each machine is difficult to adapt to the needs of modern industrial management that is large-scale, efficient and intelligent, which restricts the overall efficiency of industrial systems and the process of digital transformation.

[0004] Therefore, in highly heterogeneous industrial control environments, it is difficult to achieve intelligent management and control of physical hardware and virtualized resources. Summary of the Invention

[0005] In view of this, embodiments of this application provide an industrial equipment management method, apparatus, electronic device, and readable storage medium to solve the problem that it is difficult to achieve intelligent control of physical hardware and virtualized resources in the prior art.

[0006] A first aspect of this application provides an industrial equipment management method applied to an industrial controller, comprising: Receive device management requests from the caller through the application communication protocol interface; The device management request is parsed to determine the target operation object and operation command; the target operation object is physical hardware or virtualized resources. In response to the parsed target operation object being physical hardware, the system calls the local system tool or hardware abstraction library corresponding to the target physical hardware according to the operation instructions to perform monitoring or configuration of the target physical hardware on the industrial controller. In response to the parsed target operation object being a virtualized resource, the underlying virtualization engine is invoked through the virtualization management library according to the operation instructions to perform lifecycle management or resource allocation for the target virtual machine running on the industrial controller.

[0007] A second aspect of this application provides an industrial equipment management device applied to an industrial controller, comprising: The receiving module is used to receive device management requests issued by the caller through the application communication protocol interface; The determination module is used to parse device management requests and determine the target operation object and operation instructions; the target operation object is physical hardware or virtualized resources. The first calling module is used to respond to the parsed target operation object being physical hardware, and according to the operation instructions, to call the local system tool or hardware abstraction library corresponding to the target physical hardware to perform monitoring or configuration of the target physical hardware on the industrial controller. The second calling module is used to respond to the parsed target operation object being a virtualized resource, and according to the operation instructions, to call the underlying virtualization engine through the virtualization management library to perform lifecycle management or resource allocation for the target virtual machine running on the industrial controller.

[0008] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.

[0009] A fourth aspect of this application provides a readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.

[0010] The beneficial effects of this application embodiment compared with the prior art are as follows: It receives device management requests from callers through the application communication protocol interface; it parses the device management requests to determine the target operation object and operation instructions; the target operation object is physical hardware or virtualized resources; it transforms the upper-level management intent into clear hardware or virtualized operation objects and instructions, providing a clear logical entry point and execution path for unified management. In response to the parsed target operation object being physical hardware, according to the operation instructions, it calls the local system tool or hardware abstraction library corresponding to the target physical hardware to perform monitoring or configuration of the target physical hardware on the industrial controller; wherein, the physical hardware includes at least one of a central processing unit, memory, disk, network interface card, serial communication port, and high-speed peripheral component interconnection device, completing direct monitoring and precise configuration of underlying hardware resources such as the central processing unit and memory; in response to the parsed target operation object being virtualized resources, according to the operation instructions, it calls the underlying virtualization engine through the virtualization management library to perform lifecycle management or resource allocation of the target virtual machine running on the industrial controller, realizing indirect management of virtual machine resources and lifecycle. This integrates previously scattered manual operations that depended on specific hardware commands or virtualization tools into a coherent, software-defined automated sequence. This effectively isolates the differences between the upper-level management logic and the specific implementation of the underlying heterogeneous hardware and virtualization platform, enabling centralized, efficient, and intelligent control over physical hardware and virtualization resources. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a flowchart illustrating an industrial equipment management method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the architecture of a device control interface provided in an embodiment of this application; Figure 3 This is a schematic diagram of a communication method for a device control interface provided in an embodiment of this application; Figure 4 This is a flowchart illustrating an industrial equipment management method based on a device control interface, as provided in an embodiment of this application. Figure 5 This is a schematic diagram of the structure of an industrial equipment management device provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0013] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0014] An industrial equipment management method and apparatus according to embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0015] Figure 1 This is a flowchart illustrating an industrial equipment management method provided in an embodiment of this application. Figure 1 Industrial equipment management methods can be executed by a server. For example... Figure 1 As shown, the industrial equipment management method includes: Step S101: Receive device management requests from the caller through the application communication protocol interface; Step S102: Parse the device management request to determine the target operation object and operation command; the target operation object is physical hardware or virtualized resources; Step S103: In response to the parsed target operation object being physical hardware, according to the operation instruction, the local system tool or hardware abstraction library corresponding to the target physical hardware is called to perform monitoring or configuration of the target physical hardware on the industrial controller; wherein, the physical hardware includes at least one of a central processing unit, memory, disk, network interface card, serial communication port and high-speed device for interconnecting peripheral components; Step S104: In response to the parsed target operation object being a virtualized resource, the underlying virtualization engine is called through the virtualization management library according to the operation instructions to perform lifecycle management or resource allocation for the target virtual machine running on the industrial controller.

[0016] The application communication protocol interface (API) refers to a communication interface based on a standardized data exchange format such as PROTOBUF and encapsulated according to predetermined rules, used to implement instruction and data transmission between the caller and the service. The caller generally refers to any software entity that needs to manage the industrial controller, such as a remote monitoring client or an upper-level automation system. Local system tools or hardware abstraction libraries refer to software modules built into or additionally provided by the operating system for directly manipulating specific hardware, such as the libgpiod library for controlling general-purpose input / output pins, or the NetworkManager service for network configuration. Virtualization management libraries refer to software libraries like libvirt that provide abstract interfaces for virtual machine management, while the underlying virtualization engine refers to programs like QEMU-KVM that actually perform virtualization computing.

[0017] In step S101, the service running on the industrial controller listens for and receives network requests from the caller through a defined application communication protocol interface. For example, the caller sends a serialized data packet to the service, requesting to obtain the current utilization rate of the central processing unit.

[0018] In step S102, the service decodes and parses the received data packet to identify key fields in the request. For example, after parsing the data packet, it determines that the target operation object is the central processing unit in the physical hardware, and the operation instruction is to obtain its information.

[0019] In step S103, when the target is determined to be physical hardware, the method dispatches and calls the corresponding local tools or library functions to perform the actual operation based on the specific operation instruction. For example, when the operation instruction is to set a serial communication port to RS485 mode, the service will send a set of level signals to the specific general-purpose input / output pins associated with the serial port through the serial port control library according to the predefined mapping relationship, thereby changing its electrical characteristics and completing the mode switch. As another example, when the operation instruction is to configure the static IP address of a network interface card, the service will send detailed configuration parameters to the system network management service through inter-process communication mechanisms, and the latter will execute the underlying network configuration commands.

[0020] Step S104 handles requests for virtualization resources. When the target is determined to be a virtualization resource, the method forwards control commands to the underlying virtualization engine through the interface provided by the virtualization management library. For example, when the operation instruction is to start a virtual machine named "WinVM", the service calls the startup function of the virtualization management library, which then commands the underlying KVM and QEMU programs to load the image file of the specified virtual machine and start running. Another example is when the operation instruction is to allocate more memory to the virtual machine, the service modifies the virtual machine's XML definition file through the virtualization management library, increases the memory parameter value, and notifies the virtualization engine to dynamically apply this configuration.

[0021] This application embodiment receives device management requests from callers through an application communication protocol interface; it parses the device management requests to determine the target operation object and operation instructions; the target operation object is physical hardware or virtualized resources; it transforms the upper-level management intent into explicit hardware or virtualized operation objects and instructions, providing a clear logical entry point and execution path for unified management. In response to the parsed target operation object being physical hardware, according to the operation instructions, it calls the local system tools or hardware abstraction library corresponding to the target physical hardware to perform monitoring or configuration of the target physical hardware on the industrial controller; wherein, the physical hardware includes at least one of a central processing unit, memory, disk, network interface card, serial communication port, and high-speed interconnection devices for peripheral components, completing direct monitoring and precise configuration of underlying hardware resources such as the central processing unit and memory; in response to the parsed target operation object being virtualized resources, according to the operation instructions, it calls the underlying virtualization engine through the virtualization management library to perform lifecycle management or resource allocation of the target virtual machine running on the industrial controller, realizing indirect management of virtual machine resources and lifecycle. This integrates previously scattered manual operations that depended on specific hardware commands or virtualization tools into a coherent, software-defined automated sequence. This effectively isolates the differences between the upper-level management logic and the specific implementation of the underlying heterogeneous hardware and virtualization platform, enabling centralized, efficient, and intelligent control over physical hardware and virtualization resources.

[0022] In some embodiments, prior to step S101, the method further includes: The device interface service reads the pre-configured hardware description configuration file; the hardware description configuration file includes the hardware parameter mapping relationship of different models of industrial controllers; Check if historical user configuration data exists in the user configuration database; If historical user configuration data exists in the user configuration database, the industrial controller will be configured using the historical user configuration data. If no historical user configuration data exists in the user configuration database, the industrial controller will be configured using the default parameters in the hardware description configuration file, and the parameters used in this configuration will be written into the user configuration database.

[0023] To ensure that industrial controllers are in a consistent and expected available state after power-on or service startup, and to avoid management anomalies caused by hardware differences or unexpected changes, an initialization process must be performed before receiving external management requests. This process begins with the device interface service reading a hardware description configuration file pre-installed in the file system. This file is written in a standardized format, defining the hardware mapping relationships between different models or batches of industrial controllers. For example, it maps the logical name "Serial Port A" to specific physical general-purpose input / output pin numbers, or presets the supported configuration modes for a specific model of network interface card. After the file is read, the service queries a user configuration database for persistent storage to check for the existence of historical user configuration data generated and saved by past management operations.

[0024] The user configuration database can be a lightweight relational database file. If a query finds historical user configuration data, such as a record specifying that a certain network port should use a static IP address of 192.168.1.100, the service will use this historical data as the basis for the current configuration, configure the corresponding hardware modules of the industrial controller, and restore the device state to the target state previously set by the user.

[0025] If no historical configuration data is found in the user configuration database, it indicates that the device may be being used for the first time or that the configuration has been cleared. In this case, the service will instead use default parameters predefined by the device manufacturer or system integrator and read from the hardware description configuration file for initialization. For example, based on the default parameters in the file, all serial ports will be initialized to RS232 mode, and all network ports will be set to obtain addresses via Dynamic Host Configuration Protocol (DHCP). After this default configuration is completed, the system will automatically write this set of default parameters actually used in this initialization as new historical user configuration data into the user configuration database, providing a baseline configuration for the device's next startup or recovery.

[0026] By introducing hardware description configuration files, software-based abstraction and unified description of heterogeneous hardware parameters are achieved, enabling the same management logic to adapt to controllers with different hardware models, thus enhancing system compatibility and portability. By querying and restoring historical user configuration data, the device can be automatically restored to the user's most recently set operating state, ensuring configuration continuity and operational reliability, which is crucial for industrial scenarios requiring a stable operating environment.

[0027] By employing a mechanism that initializes with default parameters and writes them back to the database, the system ensures that devices automatically enter a preset and reasonable default operating mode, even in initial or unknown states, thus reducing the technical threshold and complexity of initial deployment. These steps collectively construct a robust adaptive configuration layer, laying a reliable and consistent foundation for the subsequent stable reception and execution of dynamic management requests, thereby improving the robustness and user experience of the entire device management system.

[0028] In some embodiments, step S102 includes: When the target physical hardware is a serial communication port, if the operation instruction is to obtain serial port information, the current working mode of the serial communication port is read through the serial port control library or by querying the operating system device tree. If the operation command is to set the serial port mode, the general-purpose input / output pin number associated with the serial communication port is determined according to the hardware description configuration file, and a level control signal is sent to the pin indicated by the general-purpose input / output pin number through the serial port control library to switch the working mode of the serial communication port.

[0029] When the operation command is to obtain serial port information, that is, the caller needs to query the current status of a specific serial communication port, this can be achieved by calling the system's underlying serial port control library functions, or by querying the device tree information maintained by the operating system to directly read the current operating mode parameters reported by the serial port device driver. For example, for a serial port identified as "ttyS1" in the system, the above method can be used to read whether it is currently configured in RS232 mode or RS485 mode, and this information will be returned as a response.

[0030] When the operation command is to set the serial port mode, meaning the caller requests to switch a specific serial port to a specified operating mode, the service needs to determine the specific general-purpose input / output (GPIO) pin number associated with the target serial communication port on the hardware circuitry, used to control its mode switching, based on the mapping relationship defined in the pre-defined hardware description configuration file. For example, according to the configuration file, the mode switching of serial port "COM2" is controlled by the pin level of GPIO pin number "GPIO25," with a high level representing RS485 mode and a low level representing RS232 mode. Subsequently, the service sends the corresponding level control signal to the specific physical pin indicated by the determined GPIO pin number through the interface provided by the serial port control library. For example, if a request is made to set "COM2" to RS485 mode, a high-level signal is output to GPIO25. This level signal changes the circuit state of the serial port level conversion chip connected to that pin, thereby ultimately realizing the switching of the serial communication port's operating mode at the electrical characteristics and communication protocol levels.

[0031] By distinguishing between acquire and set commands, the system provides monitoring and remote configuration capabilities for port status, meeting the dual needs of industrial sites for equipment status visualization and parameter adjustability. Specifically, by querying the device tree or control library to obtain modes, it provides accurate and real-time hardware status feedback for upper-layer applications, forming the basis for fault diagnosis and system status awareness. The mechanism of mapping pins through configuration files and sending level signals for mode switching transforms complex physical operations at the hardware level, typically requiring manual DIP switches or jumpers, into purely software-based, programmable commands that can be executed remotely over a network. This greatly simplifies operation and maintenance, avoids the inefficiency and risk of misoperation caused by on-site manual intervention, and makes it possible to dynamically adjust serial port configurations according to different operating conditions, enhancing the adaptability and flexibility of industrial controllers for external device connections.

[0032] In some embodiments, step S102 includes: When the target physical hardware is a network interface card and the operation command is to configure network parameters, a network configuration request containing the operation command is sent to the system network management service through the inter-process communication interface of the system network management service. The system network management service then responds to the network configuration request by performing corresponding address configuration, routing settings, or service activation operations on the network interface card.

[0033] When the parser determines that the target physical hardware is a network interface card, and the operation command is to configure network parameters, such as setting a static IP address, configuring a gateway, adding a DNS server, or enabling a specific network service, the service sends a structured network configuration request to the system network management service through the inter-process communication interface opened by the system network management service provided by the operating system, such as the D-Bus interface.

[0034] The network configuration request contains specific configuration parameters derived from the parsed operation instructions. For example, the instruction "set IP to 192.168.1.10" is transformed into a request message containing fields such as network interface identifier, target IP address, and subnet mask. The purpose of sending this network configuration request is to allow the system network management service to respond and process it. As the unified manager of the operating system's network stack, this system network management service, upon receiving this network configuration request, parses the parameters and calls its internal management module to execute the actual configuration actions for the specified network interface card. For example, the service can call underlying command-line tools or library functions to modify the network interface's configuration file, or directly send socket instructions to the kernel to complete the configuration of the requested IP address, default route setting, or activation of specific network service functions.

[0035] Network configuration via a system service agent avoids the management service directly handling complex and volatile low-level network configuration details. This specialized work is delegated to the operating system's built-in, thoroughly tested and optimized network management components. This reduces the risk of errors and instability that might arise from implementing network configuration logic independently, ensuring the reliability of configuration operations. Secondly, inter-process communication interfaces typically include permission verification mechanisms, preventing unauthorized applications from arbitrarily changing network settings and enhancing system security. Furthermore, this method ensures consistency between network configuration policies and other parts of the operating system and standard management tools, avoiding policy conflicts or state confusion caused by different configuration methods. For example, configurations performed through this service can be correctly recognized by other network monitoring tools in the system. Finally, this design effectively decouples the upper-layer management logic from the lower-level network configuration, which may vary depending on the operating system version or distribution. This improves the portability and compatibility of the device management service itself, enabling it to more stably and reliably serve the configuration management needs of industrial network environments.

[0036] In some embodiments, step S103 includes: When the operation instruction is to allocate hardware resources, the resource configuration definition file of the target virtual machine is modified through the virtualization management library to exclusively allocate the specified central processing unit core, memory space or peripheral component interconnection high-speed device on the industrial controller to the target virtual machine. When the operation command is to control the virtual machine state, the virtualization management library sends state control commands to the underlying virtualization engine to start, shut down or restart the target virtual machine.

[0037] When performing virtual machine resource allocation and lifecycle management, the specific implementation methods are divided into two categories based on the core intent of the operation instructions: resource allocation and state control. When the operation instruction is to allocate hardware resources, the goal is to adjust the computing, storage, or input / output resource quotas of the target virtual machine. This is done through the programming interface provided by the virtualization management library, locating and modifying the resource configuration definition file corresponding to the target virtual machine. This file typically uses a structured format such as Extensible Markup Language (EXPLAIN) to describe the various resources required by the virtual machine.

[0038] The modification aims to exclusively allocate a segment of resources on the physical hardware of the industrial controller to a virtual machine. For example, executing instructions might assign cores 2 and 3 of the physical CPU to a virtual machine named "RT-VM," or directly pass through a high-speed network interface card (NIC) for interconnecting physical peripheral components to that virtual machine. These modifications are achieved by updating configuration sections in the definition file related to CPU affinity, memory size, or device pass-through.

[0039] When the operation command is to control the virtual machine state, its goal is to change the virtual machine's running stage, such as switching from shutdown to running. This is achieved by sending corresponding state control commands from the virtualization management library to the underlying virtualization engine that performs the actual computing tasks. For example, a start command can be sent to instruct the virtualization engine to load and run the virtual machine image according to the definition file; a shutdown command can be sent to request the virtualization engine to orderly stop the virtual machine processes; or a restart command can be sent to combine shutdown and start operations.

[0040] Resource allocation through modification of definition files allows for flexible planning or modification of available physical resources before and after virtual machine (VM) operation. In particular, it enables direct, low-loss pass-through of high-performance physical hardware resources, providing crucial support for VMs to meet the real-time, high-bandwidth, and other specific industrial application requirements. Controlling the status by sending commands allows for direct manipulation of the dynamic "instances" of the VM, achieving real-time and precise control over its lifecycle. The combination of these two types of operations enables VM management to balance planning flexibility with execution immediacy. For example, a dedicated network interface card (NIC) can be assigned to a VM by modifying the definition file, and then immediately activated via a startup command. This software-defined approach abstracts virtualization resource management, which previously required complex physical configuration and command-line operations, into simple parameter modification and command invocation, significantly improving the efficiency and automation of deploying, adjusting, and maintaining virtualized workloads in industrial control environments.

[0041] In some embodiments, the hardware performance data of the industrial controller is periodically collected by a data acquisition daemon and stored in a ring buffer database. In response to a device management request that is a hardware performance query request, the corresponding hardware performance data is read from the circular buffer database. Hardware performance data is returned to the caller via the application communication protocol interface.

[0042] This is achieved by introducing an independent hardware performance monitoring mechanism to provide continuous awareness of the industrial controller's operational status. This mechanism is implemented through a data acquisition daemon that runs continuously in the background. This daemon is woken up at fixed time intervals to actively collect performance data from various hardware components on the industrial controller. For example, the daemon periodically reads the file interfaces exposed by the operating system kernel to obtain the overall utilization rate of the CPU and the load of each core, calculates the used and remaining system memory, collects disk partition read / write speeds and remaining space information, and may further collect network interface traffic data.

[0043] All collected raw performance data is written in real time to a pre-configured circular buffer database for temporary storage. This database is characterized by having fixed storage space. As new data is continuously written and fills the space, it automatically overwrites the oldest historical data, thus forming a continuously scrolling window of recent performance data.

[0044] When the device management request received in step S101 is parsed in step S102 and determined to be a hardware performance query request, the system reads the corresponding pre-processed or aggregated hardware performance dataset from the time-series data records stored in the circular buffer database, based on the time range or data metric specified in the query request. For example, to query the average CPU utilization over the past five minutes, the system calculates and extracts the average data for the corresponding time period from the database. This performance data read from the circular buffer database is encapsulated into a standard response format through the application communication protocol interface and returned to the caller who initiated the query.

[0045] By separating data acquisition from request processing, a separate daemon process periodically and with low overhead completes data acquisition, avoiding the high-overhead hardware status read operations performed only when a query request arrives. This significantly reduces query response latency, ensuring that the management interface can maintain a fast response even when facing high-frequency performance queries, and avoiding performance interference with the controller's real-time tasks. The circular buffer database, as a unified, intermediate data layer, guarantees a consistent view of performance data over a period of time. Regardless of when a query is initiated, the obtained data originates from the same set of acquisition logic and storage format, avoiding data fluctuations or random errors that may arise from directly reading instantaneous values. Even if the data acquisition process experiences a brief anomaly or there are data gaps in the circular buffer, the management interface service itself can still handle other types of management requests normally and gracefully handle performance queries by returning cached data or error messages, preventing the spread of single points of failure. This provides an efficient, reliable, and low-intrusive software monitoring window for the industrial controller's operating status, serving as a crucial data foundation for predictive maintenance and intelligent operation and maintenance.

[0046] In some embodiments, after monitoring or configuration, or lifecycle management or resource allocation is performed, the operation results or updated configuration data are written to the user configuration database.

[0047] Two types of data are written to a dedicated user configuration database: one type is the result status information of the operation execution, such as the specific mode value read after executing the "Get Serial Port Information" command, or the success confirmation returned after executing the "Start Virtual Machine" command; the other type is the actual configuration data that causes changes in the state of the industrial controller or virtual machine after the configuration operation is performed, such as a newly set static IP address and gateway for the network interface card, or a newly allocated and modified CPU core list and memory size parameters for the virtual machine. This user configuration database serves as the authoritative record source of system configuration, and its write operations ensure that any state changes that take effect through the management interface are reliably recorded and saved.

[0048] This ensures configuration persistence, preventing the loss of manually or automatically adjusted configurations due to system restarts, service reloads, or unexpected power outages. It allows industrial controllers to automatically restore to their most recently set operating state upon re-entry, which is crucial for industrial environments requiring continuous and stable operation. Secondly, it provides an auditable log foundation for all management operations. The "operation results" written to the database serve as historical records for subsequent problem diagnosis, operation backtracking, or compliance checks. It binds dynamic operational processes to static configuration goals. Any successful configuration change is immediately solidified into the new "desired state" and saved. This gives the system declarative management characteristics; the configuration stored in the database represents the target state the device should achieve, providing a data source for automatic configuration recovery. like Figure 2 As shown, the Advanced Device Interface (ADI) involves the following functions: Device Interface Service: refers to the software service entity that runs on the industrial controller and provides unified management functions. Application Programming Communication Protocol Interface: is the standardized communication channel exposed by ADI and is the core part of implementing interface functions. Virtualization Management Library and Serial Port Control Library, together, constitute the overall capabilities of ADI.

[0049] This ADI service architecture follows a layered design principle. The top-level user interface layer interacts with the system, providing a web interface, QT desktop application, or other custom applications as entry points. All device management commands issued by the user here are standardized and encapsulated and transmitted through an intermediate communication layer. The core component is the ACP client (ACP-CLIENT), responsible for converting user requests into application communication protocol messages based on Protocol Buffer (PROTOBUF) format. These requests are then directed to the core ADI service interface layer, which serves as the system's business logic hub. This layer includes six functional modules: network card management, serial port management, CPU management, memory management, disk management, and virtual machine management. Each module specifically handles the corresponding type of hardware or virtualization resource operations.

[0050] When the ADI service interface layer receives a request, it relies on the data support layer to complete the specific operation execution and status maintenance. The data support layer optimizes performance through a data caching mechanism and performs persistent interaction with the underlying lightweight database (SQLite) through a read / write database module to ensure that user configurations are securely stored; the data synchronization module is responsible for maintaining updates to information such as real-time hardware status. All configuration data and status information are persistently stored in the underlying SQLite database. In the entire process, user requests are passed from the communication layer to the service layer for parsing, the service layer invokes the support layer to execute specific operations and access the database, and the operation results or queried data are returned along the original path, finally presented in the user display layer, thereby achieving unified, closed-loop management of industrial controller hardware and virtualization resources.

[0051] like Figure 3 The diagram illustrates the communication process by which ADI services interact with user code developed using different programming languages. Users can write their own management programs using various programming languages ​​such as C++, C#, Go, and ST. When a device needs to be managed, the user code constructs a specific management request and then uses a language-independent data serialization tool to convert the request into a standard binary data stream. This binary stream is then encapsulated into a request message in ACP (Application Communication Protocol) format.

[0052] The ACP request is sent over the network to the background service running on the industrial controller, namely the ADI service interface layer. The ADI service interface receives and parses the ACP request, extracts the protobuf serialized data, deserializes it to understand the user's intent, and performs the corresponding hardware or virtual machine management operations.

[0053] After the operation is completed, the ADI service interface serializes the result again using protobuf, encapsulates it into an ACP response message, and returns it to the user's backend service. Upon receiving the ST (ACP response), the user's backend service unpacks and deserializes it, ultimately returning the operation result to the user code that originally called it. The entire process, through protobuf and ACP, ensures the consistency of data formats and the reliability of communication between clients and servers written in different languages.

[0054] like Figure 4 The diagram illustrates the internal process of the ADI service interface after receiving a management request from a user application, including request processing, resource configuration, and data storage. The entire process begins with a request initiated by the user application. This request is first verified by the device authentication module to ensure the legitimacy of the operation. After successful verification, the request is submitted to the ADI settings interface, which serves as the distribution center for business logic.

[0055] The ADI configuration interface directs requests to different resource configuration modules based on the request type. If the request involves virtualization resources, it will call modules such as virtual machine, memory configuration, and PCIe device configuration to perform operations such as allocating memory for virtual machines, binding CPU cores, or passing through physical PCIe devices. If the request targets the physical machine itself, it will call modules such as network card configuration, serial port configuration, disk monitoring, memory monitoring, and CPU monitoring to perform functions such as setting network parameters, switching serial port modes, or querying hardware status.

[0056] To ensure accuracy and adaptability, these configuration modules collaborate with a default configuration module during execution. The default configuration module acts as a hardware adaptation knowledge base, pre-configuring various driver information, default virtual machine XML templates, graphics card parameters, CPU and memory baseline information, default network modes, general-purpose input / output (GPIO) pin mappings, and default serial port modes. When performing specific configurations, the relevant modules query this module to obtain the default parameters or physical mappings for the hardware, and then combine this with the specific parameters requested by the user to complete the final configuration.

[0057] All successfully executed and persistent configuration information is ultimately categorized and written to the underlying database. The database is divided into multiple structured data tables, such as the network card configuration table, the peripheral component interconnect express (PCIE) table, the PCIE information table, and the serial port configuration table. This ensures that all user configurations can be accurately restored after the device restarts or the service is reloaded, thereby achieving persistent management of the device state.

[0058] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.

[0059] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0060] Figure 5 This is a schematic diagram of an industrial equipment management device provided in an embodiment of this application. Figure 5 As shown, the industrial equipment management device includes: The receiving module 501 is used to receive device management requests issued by the caller through the application communication protocol interface; The determination module 502 is used to parse the device management request and determine the target operation object and operation instruction; the target operation object is physical hardware or virtualized resources; The first calling module 503 is used to respond to the parsed target operation object being physical hardware, and according to the operation instruction, call the local system tool or hardware abstraction library corresponding to the target physical hardware to perform monitoring or configuration of the target physical hardware on the industrial controller; wherein, the physical hardware includes at least one of a central processing unit, memory, disk, network interface card, serial communication port and high-speed device for interconnecting peripheral components; The second calling module 504 is used to respond to the parsed target operation object being a virtualization resource, and according to the operation instruction, to call the underlying virtualization engine through the virtualization management library to perform lifecycle management or resource allocation for the target virtual machine running on the industrial controller.

[0061] In this embodiment, a device management request is received from a caller via an application communication protocol interface. The request is parsed to determine the target operation object and operation instructions. The target operation object is either physical hardware or virtualized resources. The upper-level management intent is transformed into a clear hardware or virtualized operation object and instructions, providing a clear logical entry point and execution path for unified management. In response to the parsed target operation object being physical hardware, the corresponding local system tool or hardware abstraction library is invoked according to the operation instructions to monitor or configure the target physical hardware on the industrial controller. The physical hardware includes at least one of a central processing unit (CPU), memory, disk, network interface card, serial communication port, and high-speed interconnection devices for peripheral components, enabling direct monitoring and precise configuration of underlying hardware resources such as the CPU and memory. In response to the parsed target operation object being virtualized resources, the underlying virtualization engine is invoked through the virtualization management library according to the operation instructions to perform lifecycle management or resource allocation for the target virtual machine running on the industrial controller, achieving indirect management of virtual machine resources and lifecycle. This integrates previously scattered manual operations that depended on specific hardware commands or virtualization tools into a coherent, software-defined automated sequence. This effectively isolates the differences between the upper-level management logic and the specific implementation of the underlying heterogeneous hardware and virtualization platform, enabling centralized, efficient, and intelligent control over physical hardware and virtualization resources.

[0062] In some embodiments, the industrial equipment management device further includes: The reading module is used to read the preset hardware description configuration file through the device interface service; the hardware description configuration file includes the hardware parameter mapping relationship of different models of industrial controllers; The query module is used to check whether historical user configuration data exists in the user configuration database; The configuration module is used to configure the industrial controller using historical user configuration data if such data exists in the user configuration database. The configuration module is also used to configure the industrial controller using the default parameters in the hardware description configuration file if no historical user configuration data exists in the user configuration database, and to write the parameters used in this configuration to the user configuration database.

[0063] In some embodiments, the first calling module 503 is specifically used for: When the target physical hardware is a serial communication port, if the operation instruction is to obtain serial port information, the current working mode of the serial communication port is read through the serial port control library or by querying the operating system device tree. If the operation command is to set the serial port mode, the general-purpose input / output pin number associated with the serial communication port is determined according to the hardware description configuration file, and a level control signal is sent to the pin indicated by the general-purpose input / output pin number through the serial port control library to switch the working mode of the serial communication port.

[0064] In some embodiments, the first calling module 503 is specifically used for: When the target physical hardware is a network interface card and the operation command is to configure network parameters, a network configuration request containing the operation command is sent to the system network management service through the inter-process communication interface of the system network management service. The system network management service then responds to the network configuration request by performing corresponding address configuration, routing settings, or service activation operations on the network interface card.

[0065] In some embodiments, the second calling module 504 is specifically used for: When the operation instruction is to allocate hardware resources, the resource configuration definition file of the target virtual machine is modified through the virtualization management library to exclusively allocate the specified central processing unit core, memory space or peripheral component interconnection high-speed device on the industrial controller to the target virtual machine. When the operation command is to control the virtual machine state, the virtualization management library sends state control commands to the underlying virtualization engine to start, shut down or restart the target virtual machine.

[0066] In some embodiments, the industrial equipment management device further includes: The data acquisition module is used to periodically acquire hardware performance data of the industrial controller through a data acquisition daemon and store it in a circular buffer database. The reading module is also used to read the corresponding hardware performance data from the circular buffer database in response to device management requests or hardware performance query requests. The return module is used to return hardware performance data to the caller via the application communication protocol interface.

[0067] In some embodiments, the industrial equipment management device further includes: The write module is used to write the operation results or updated configuration data to the user configuration database after monitoring, configuration, lifecycle management or resource allocation is completed. It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0068] Figure 6 This is a schematic diagram of the electronic device 6 provided in an embodiment of this application. Figure 6 As shown, the electronic device 6 of this embodiment includes a processor 601, a memory 602, and a computer program 603 stored in the memory 602 and executable on the processor 601. When the processor 601 executes the computer program 603, it implements the steps in the various method embodiments described above. Alternatively, when the processor 601 executes the computer program 603, it implements the functions of each module / unit in the various device embodiments described above.

[0069] Electronic device 6 can be a desktop computer, laptop, handheld computer, cloud server, or other electronic device. Electronic device 6 may include, but is not limited to, processor 601 and memory 602. Those skilled in the art will understand that... Figure 6 This is merely an example of electronic device 6 and does not constitute a limitation on electronic device 6. It may include more or fewer components than shown, or different components.

[0070] The processor 601 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0071] The memory 602 can be an internal storage unit of the electronic device 6, such as a hard disk or RAM of the electronic device 6. The memory 602 can also be an external storage device of the electronic device 6, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., equipped on the electronic device 6. The memory 602 can also include both internal and external storage units of the electronic device 6. The memory 602 is used to store computer programs and other programs and data required by the electronic device.

[0072] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0073] If an integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program may include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in a computer-readable medium can be appropriately added to or subtracted according to the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0074] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. An industrial equipment management method characterized by comprising: Applied to industrial controllers, the method includes: Receive device management requests from the caller through the application communication protocol interface; The device management request is parsed to determine the target operation object and operation command; the target operation object is physical hardware or virtualized resources. In response to the parsed target operation object being physical hardware, the local system tool or hardware abstraction library corresponding to the target physical hardware is invoked according to the operation instruction to perform monitoring or configuration of the target physical hardware on the industrial controller. In response to the parsed target operation object being a virtualized resource, the underlying virtualization engine is invoked through the virtualization management library according to the operation instruction to perform lifecycle management or resource allocation for the target virtual machine running on the industrial controller.

2. The method according to claim 1, characterized in that, Before receiving the device management request issued by the caller through the application communication protocol interface, the method further includes: The device interface service reads a pre-configured hardware description configuration file; the hardware description configuration file includes the hardware parameter mapping relationship of different models of industrial controllers. Check if historical user configuration data exists in the user configuration database; If historical user configuration data exists in the user configuration database, the industrial controller is configured using the historical user configuration data. If no historical user configuration data exists in the user configuration database, the industrial controller is configured using the default parameters in the hardware description configuration file, and the parameters used in this configuration are written into the user configuration database.

3. The method according to claim 2, characterized in that, The step of invoking a local system tool or hardware abstraction library corresponding to the target physical hardware according to the operation instruction to perform monitoring or configuration of the target physical hardware on the industrial controller includes: When the target physical hardware is a serial communication port, if the operation instruction is to obtain serial port information, the current working mode of the serial communication port is read through the serial port control library or by querying the operating system device tree. If the operation instruction is to set the serial port mode, the general input / output pin number associated with the serial communication port is determined according to the hardware description configuration file, and a level control signal is sent to the pin indicated by the general input / output pin number through the serial port control library to switch the working mode of the serial communication port.

4. The method according to claim 2, characterized in that, The step of invoking a local system tool or hardware abstraction library corresponding to the target physical hardware according to the operation instruction to perform monitoring or configuration of the target physical hardware on the industrial controller includes: When the target physical hardware is a network interface card and the operation instruction is to configure network parameters, a network configuration request containing the operation instruction is sent to the system network management service through the inter-process communication interface of the system network management service, so that the system network management service can respond to the network configuration request and perform corresponding address configuration, routing settings or service activation operations on the network interface card.

5. The method according to claim 1, characterized in that, The step of calling the underlying virtualization engine through the virtualization management library according to the operation instructions to perform lifecycle management or resource allocation for the target virtual machine running on the industrial controller includes: When the operation instruction is to allocate hardware resources, the resource configuration definition file of the target virtual machine is modified through the virtualization management library to exclusively allocate the central processing unit core, memory space or peripheral component interconnection high-speed device specified on the industrial controller to the target virtual machine; When the operation instruction is to control the virtual machine state, the virtualization management library sends a state control command to the underlying virtualization engine to start, shut down, or restart the target virtual machine.

6. The method according to claim 1, characterized in that, The method further includes: The data acquisition daemon periodically collects the hardware performance data of the industrial controller and stores it in a circular buffer database. In response to the device management request being a hardware performance query request, the corresponding hardware performance data is read from the circular buffer database; The hardware performance data is returned to the caller through the application communication protocol interface.

7. The method according to claim 1, characterized in that, The method further includes: After the monitoring or configuration, or the lifecycle management or resource allocation is completed, the operation results or updated configuration data are written to the user configuration database.

8. An industrial equipment management device, characterized in that, Applications in industrial controllers, including: The receiving module is used to receive device management requests issued by the caller through the application communication protocol interface; The determination module is used to parse the device management request and determine the target operation object and operation instruction; the target operation object is physical hardware or virtualized resources; The first invocation module is used to respond to the parsed target operation object being physical hardware, and according to the operation instruction, to invoke the local system tool or hardware abstraction library corresponding to the target physical hardware to perform monitoring or configuration of the target physical hardware on the industrial controller; wherein, the physical hardware includes at least one of a central processing unit, memory, disk, network interface card, serial communication port, and high-speed device for interconnecting peripheral components; The second calling module is used to respond to the parsed target operation object being a virtualization resource, and according to the operation instruction, to call the underlying virtualization engine through the virtualization management library to perform lifecycle management or resource allocation for the target virtual machine running on the industrial controller.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 7.

10. A readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.