Container management system of electric power Internet of Things terminal
By designing a container management system for power IoT terminals, including basic container control, information query and event monitoring components, the demand for power IoT terminals for multi-application management and resource monitoring is solved, flexible management and efficient operation of containers are achieved, and the performance and stability of the system are improved.
Patent Information
- Application Number
- CN202311314437.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-11
- Publication Date
- 2025-04-11
AI Technical Summary
The existing containerized management technology is difficult to meet the meticulous needs of power IoT terminals for multi-application management, resource restrictions and status monitoring.
A container management system for power Internet of Things terminals is designed, including container basic control components, container information query components and container event monitoring components. These components are connected to multiple applications in the container through the API interface, realizing multi-application control, resource information acquisition and real-time monitoring of the container.
It realizes flexible management and efficient operation of power IoT terminal containers, and improves the performance, reliability and stability of the system.
Smart Images

Figure CN119806716A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a container management system for an electric power Internet of Things terminal, and belongs to the technical field of direct current transmission and power electronics. Background Art
[0002] With the rapid development of Internet of Things technology and the continuous progress of the power industry, Internet of Things technology plays an increasingly important role in the application of the power industry. As an indispensable component of the Internet of Things, containerized management of current Internet of Things technology in the power industry provides an efficient, flexible and reliable way to manage Internet of Things devices and their applications. At present, mainstream containerization technologies such as Docker provide a series of basic control commands to facilitate users to create, manage and deploy containers. However, in the actual operation of the power Internet of Things, more granular control and management are often required, such as the requirements for multi-application management, resource restrictions, status monitoring, etc. of containers. Simply relying on basic container commands may not meet these requirements, so secondary development is required to expand and customize the functions of container management. Summary of the invention
[0003] The purpose of the present invention is to provide a container management system for an electric power Internet of Things terminal to meet the current application requirements of the electric power Internet of Things.
[0004] To achieve the above object, the solution of the present invention includes:
[0005] A container management system for an electric power Internet of Things terminal of the present invention includes a basic container control component and at least one of a container information query component and a container event monitoring component. Each container component is respectively connected to a user for communication. The basic container control component and the container information query component are both connected to multiple applications in the container through an API interface. The basic control component is used to control the container to perform a response action according to a control instruction sent by the user. The container information query component is used to obtain resource information of the container by calling different API interfaces. The container event monitoring component is used to obtain resource usage of the container system through the container information query component at a set period, and actively upload the obtained information to the user. The resource information includes configuration information, operating status, resource usage and fault information of the container.
[0006] Beneficial effects: The container management system of the electric power Internet of Things terminal of the present invention realizes multi-application control of the container by adding a basic container control component. At the same time, the configuration information of the container can be obtained through the container information query component and the container event monitoring component, and the container can be monitored in real time. Through secondary development, the basic framework of the electric power Internet of Things terminal container management strategy is formed, which provides necessary support and guarantee for the containerized deployment of the electric power Internet of Things. Through the refined management of multiple applications and real-time monitoring of container events, the flexible management and efficient operation of the electric power Internet of Things terminal container are fully realized, greatly improving the performance, reliability and stability of the electric power Internet of Things system.
[0007] Furthermore, the container basic control component, the container information query component and the container event monitoring component all communicate with the user terminal through the MQTT bus.
[0008] Beneficial effect: The components of the present invention and the user terminal realize data interaction through the MQTT communication protocol widely used in the field of Internet of Things, and have high compatibility and stability.
[0009] Furthermore, the container basic control component is used to create, start, stop, update and delete containers. The workflow of this component is: after receiving the user's control instruction information by subscribing to the MQTT topic, the corresponding API interface is called to perform operation processing according to the received control instruction, and the operation results are fed back to the user through MQTT messages.
[0010] Furthermore, the steps for updating the container in the container basic control component are: exporting the running target container as a dedicated image, stopping and deleting the running instance of the target container, recreating the container instance based on the dedicated image with updated parameters, monitoring the status of the container in real time during the process of creating the container instance, and if the container instance creation fails, immediately restoring the target container and its configuration through the dedicated image.
[0011] Beneficial effects: The system of the present invention improves the default update instructions of the container, recreates the container based on the dedicated image, and enables it to modify the properties of the container that originally does not support dynamic update. In the update process, it also realizes real-time monitoring of the update status of the container. Once the creation of the new container instance fails, the original container and its configuration are immediately restored through the dedicated image to avoid the container being unusable.
[0012] Furthermore, the container event monitoring component is also used to judge the resource usage of the container system. It determines whether the resource consumption of the container exceeds the set threshold based on the current resource usage of the container. When the resource consumption of the container exceeds the set threshold, the container event monitoring component issues an alarm or triggers corresponding automated operations to avoid abnormal crashes of the container or affect the normal operation of related applications.
[0013] Beneficial effect: User terminals can understand the usage and health status of containers in real time through the container event monitoring component, ensuring the stability and reliability of container operation.
[0014] Furthermore, the container event monitoring component is also used to query the real-time status, startup time and life cycle of the container by regularly calling the API interface, and determine whether the container has abnormal stop and restart based on the log information, and actively report the judgment result to the user terminal.
[0015] Beneficial effects: When the health status of the container is abnormal, the container event monitoring component will actively report the abnormal results to the user terminal, so that the user can take targeted measures for maintenance and repair as soon as possible, and maximize the stability and reliability of the container operation.
[0016] Furthermore, the container information query component, the container event monitoring component and the user terminal use a subscription and publishing mechanism to access the MQTT bus. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of an Internet of Things terminal container management framework based on a RESTful API in an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The present invention will be further described in detail below in conjunction with the accompanying drawings.
[0019] Implementation example of container management system for power IoT terminal:
[0020] like Figure 1A container management system for a power Internet of Things terminal is shown. The container management framework in this embodiment is based on the RESTful API to build a customized container management framework suitable for the power Internet of Things terminal. The container is fully managed and monitored through the MQTT message method to achieve flexible application deployment, efficient data transmission, optimized resource allocation and stable and reliable operation for the power system Internet of Things. The system in this embodiment includes a basic container control component, and also includes at least one of a container information query component and a container event monitoring component. Each container component is connected to the user for communication. The basic container control component and the container information query component are connected to multiple applications in the container through an API interface. The basic control component controls the container to respond according to the control instructions sent by the user. The container information query component obtains the configuration information of the container by calling different API interfaces. The container event monitoring component obtains the resource usage of the container system through the container information query component at a set period, and actively uploads the obtained information to the user. The following is a specific implementation method of this embodiment.
[0021] The basic image used by the container is equivalent to the operating system of the container, and all container instances are created and run based on the basic image. Based on the high complexity of the power system and the strict requirements for real-time performance, the basic image in the Docker in the power Internet of Things terminal in this embodiment adopts a customized image to enable multiple small applications to work together in the same container at runtime, and support the expansion of applications and the editing of related configuration information at any time. The basic image is implemented by a customized system script. Specifically, by writing an entry point (Entrypoint) execution script for a container, it is responsible for running multiple applications in the container at the same time when the container is started, and setting corresponding environment variables, parameters and configuration files, etc., to ensure that they can work together. During the normal operation of the container, the script is also responsible for monitoring the state changes of the container and maintaining the list of running applications. When it is necessary to expand the application in the container, the script can start a new application instance according to demand and add it to the collaborative application set. Finally, when the container stops and the script receives the system termination signal (SIGTERM), it is necessary to close all applications running in the container and perform necessary resource release and follow-up work.
[0022] In this embodiment, a container basic control component is provided, and the container basic control component is responsible for the most basic container operation, wherein the container operation includes the functions of creation, start, stop, update and deletion. Specifically, the basic workflow of the container basic control component is: first subscribe to the MQTT topic related to the container control operation; the user sends a control instruction to the power Internet of Things terminal through the MQTT bus (MQTT message), and the terminal's container basic control component parses the content after receiving the user's message, obtains the necessary parameters and calls the corresponding API interface method for processing, and finally feedbacks the operation result to the user in the form of an MQTT message. The implementation of the specific control function is encapsulated based on the RESTful API interface to provide a unified interface and a standardized interaction method. In the process of encapsulation, the interface parameters need to be customized according to the standard message format of the power Internet of Things. For example, for the control interface of creating a container, a customized basic image is used by default to create a container instance. In addition to defining some general resource restrictions and related parameters of the mapping strategy, it is often necessary to register some metadata that the container itself cannot support, such as resource-related alarm thresholds and environmental parameters such as identifiers, authentication information, and collection cycles of downstream power terminal equipment. These data can be stored with the help of an external data center using the container name or ID as the key value.
[0023] In addition, this embodiment also makes unified improvements and optimizations to the default API interface when designing the control interface. For example, when deleting a container, the Docker API must ensure that the target container is in a stopped state. In this embodiment, container status detection can be added when performing interface encapsulation, and the two API calls of stop and delete are merged to provide users with more convenient management operations. Another thing worth mentioning is the update operation of the container. The container update API provided by Docker by default has great limitations and can only dynamically modify a few parameters such as system resource allocation. The power system often requires support for modifying the container mapping port and mounting devices during operation, which requires merging a series of complex API calls to achieve this function. In short, this operation first exports the running target container as a dedicated image, then stops and deletes the running instance of the target container, and recreates the container instance based on the updated parameters set by the dedicated image. During the update process, it is also necessary to monitor the update status of the container in real time. Once the creation of the new instance fails, the original container and its configuration are immediately restored through the dedicated image.
[0024] The container information query component mainly obtains and integrates detailed information of the container according to the user's query instructions, including the container's configuration, operating status, resource consumption, fault information, etc. Its workflow is similar to that of the basic control component and will not be repeated here. Taking Docker as an example, the container information query component can obtain detailed configuration information of the container by calling Docker's inspect API. This information includes the container's network settings, resource configuration, mounted devices, etc. Users can learn about the basic properties and configuration of the container to manage and schedule the container. At the same time, the component can also call the container's stats API to obtain the container's CPU memory usage and other real-time operating status, monitor the container's resource consumption, and promptly expose resource shortages or abnormalities, providing support for container resource adjustment and performance optimization. In addition, users can also access the logs API through this component to obtain the container's log output. It is convenient to track the container's running process at any time and troubleshoot problems and faults. Among them, the container information query component and the user terminal use a subscription and publishing mechanism to access the MQTT bus.
[0025] The container event monitoring component is different from other components. It is mainly responsible for calling the container information query interface at a set period to obtain the system resource usage of the container and actively send it. The container event monitoring component and the user terminal access the MQTT bus through a subscription mechanism. The user terminal obtains the usage of the container's CPU, memory, disk storage and other resources by subscribing to relevant topics, and can understand the health status of the container in real time and determine whether there is a situation where resources are exhausted or exceed the threshold. If abnormal resource consumption is found, the component will promptly issue an alarm or trigger corresponding automated operations to avoid abnormal crashes of the container or affect the normal operation of other containers or applications. At the same time, the container event monitoring component is also responsible for monitoring the running status of the container. By regularly calling the API to query the real-time status, startup time, life cycle and other parameters of the container, combined with log information, it determines whether the container has abnormal stops and restarts and actively reports them, so that users can take targeted measures for maintenance and repair at the first time to maximize the stability and reliability of container operation.
[0026] In summary, these components together constitute the basic framework of the power Internet of Things terminal container management strategy, providing the necessary support and guarantee for the containerized deployment of the power Internet of Things. Through customized image and container operations, refined management of multiple applications, and real-time monitoring of container events, the flexible management and efficient operation of the power Internet of Things terminal containers are fully realized, greatly improving the performance, reliability, and stability of the power Internet of Things system.
Claims
1. A container management system for a power Internet of Things terminal, characterized in that: The system includes a basic container control component and at least one of a container information query component and a container event monitoring component. Each container component is respectively connected to a user for communication. The basic container control component and the container information query component are both connected to multiple applications in the container through an API interface. The basic control component is used to control the container to respond according to a control instruction sent by the user. The container information query component is used to obtain resource information of the container by calling different API interfaces. The container event monitoring component is used to obtain resource usage of the container system through the container information query component at a set period, and actively upload the obtained information to the user. The resource information includes configuration information, operating status, resource usage and fault information of the container.
2. The container management system for the electric power Internet of Things terminal according to claim 1 is characterized in that: The container basic control component, container information query component and container event monitoring component all communicate with the user terminal through the MQTT bus.
3. The container management system for the electric power Internet of Things terminal according to claim 2 is characterized in that: The container basic control component is used to create, start, stop, update and delete containers. The workflow of this component is as follows: after receiving the user's control instruction information by subscribing to the MQTT topic, the corresponding API interface is called to perform operation processing according to the received control instruction, and the operation results are fed back to the user through MQTT messages.
4. The container management system for the electric power Internet of Things terminal according to claim 3 is characterized in that: The steps for updating the container in the container basic control component are: export the running target container and use it as a dedicated image, stop and delete the running instance of the target container, recreate the container instance based on the dedicated image with updated parameters, monitor the status of the container in real time during the creation of the container instance, and if the container instance creation fails, immediately restore the target container and its configuration through the dedicated image.
5. The container management system for the electric power Internet of Things terminal according to claim 1 is characterized in that: The container event monitoring component is also used to determine the resource usage of the container system. It determines whether the resource consumption of the container exceeds the set threshold based on the current resource usage of the container. When the resource consumption of the container exceeds the set threshold, the container event monitoring component issues an alarm or triggers corresponding automated operations to avoid abnormal crashes of the container or affect the normal operation of related applications.
6. The container management system for the electric power Internet of Things terminal according to claim 5 is characterized in that: The container event monitoring component is also used to query the real-time status, startup time and life cycle of the container by regularly calling the API interface, and judge whether the container has abnormal stop and restart based on the log information, and actively report the judgment result to the user terminal.
7. The container management system for the electric power Internet of Things terminal according to claim 1 is characterized in that: The container information query component, container event monitoring component and user terminal use a subscription and publishing mechanism to access the MQTT bus.