Energy controller container state monitoring method

文档序号:168557 发布日期:2021-10-29 浏览:29次 中文

阅读说明:本技术 一种能源控制器容器状态监控方法 (Energy controller container state monitoring method ) 是由 邬科科 王爽 冯丹荣 刘宁 于 2021-07-28 设计创作,主要内容包括:本发明涉及一种能源控制器容器状态监控方法,通过将已安装在能源控制器上的所有已安装容器作为监控目标,而不仅仅局限于有效容器,并通过对所有已安装容器内有效容器状态的判断处理,且对所有已安装容器均处于退出状态时的严重错误情况启动能源控制器的重启处理,将处于死亡状态的已安装容器作为无效容器在形成的已安装容器列表中删除,并保留被删除的容器可配置,对无效容器做安装目录删除,做到彻底卸载,防止占用系统存储,实现了针对所有容器状态的全面监控和异常自动处理,提高了容器的安全性、可靠性以及确保了能源控制器的正常运行。(The invention relates to a method for monitoring the container state of an energy controller, which uses all installed containers installed on the energy controller as monitoring targets, not only limited to valid containers, and starts the restart processing of the energy controller under the condition of serious error when all the installed containers are in an exit state by judging and processing the states of the valid containers in all the installed containers, deletes the installed containers in a death state as invalid containers in a formed installed container list, keeps the deleted containers configurable, deletes an installation catalog of the invalid containers, completely unloads the containers, prevents system storage from being occupied, realizes comprehensive monitoring and abnormal automatic processing aiming at the states of all the containers, improves the safety and reliability of the containers, and ensures the normal operation of the energy controller.)

1. A method for monitoring the state of a container of an energy controller is characterized by comprising the following steps of 1-9:

step 1, an energy controller acquires all installed container information and the total number of installed containers, and forms an installed container list by using all installed container information;

step 2, the energy controller respectively obtains the container state of each effective container in the installed container list and forms an effective container list by all the effective containers; wherein the container state is a dead state or an exited state or a non-dead non-exited state;

step 3, the energy controller judges whether all the valid container states in the valid container list are exit states:

when all the effective container states are exit states, the energy controller starts restarting and finishes executing subsequent operations; otherwise, turning to step 4;

step 4, the energy controller extracts any installed container information in the installed container list in a traversing way, and judges whether any installed container is an effective container in the effective container list:

when any one of the installed containers is an effective container in the effective container list, the step 5 is carried out; otherwise, judging that any one of the installed containers is an invalid container, and turning to the step 9;

step 5, the energy controller judges and processes the container state of any one installed container:

when the container state is a non-dead non-exit state, judging that the container state of any one installed container is normal, and turning to a step 6; otherwise, go to step 7;

step 6, the energy controller judges whether each installed container in the installed container list is traversed:

when the traversal is finished, finishing the execution of subsequent operations; otherwise, turning to the step 2;

step 7, the energy controller judges whether the container state of any one installed container is a death state:

when the container state is a non-death state, the step 8 is carried out; otherwise, the energy controller deletes any installed container in the valid container list, and the step 9 is carried out;

step 8, the energy controller judges whether the container state of any one installed container is an exit state:

when the container state is the exit state, the energy controller deletes any installed container in the valid container list, and the step 9 is carried out; otherwise, directly turning to the step 9;

step 9, the energy controller loads the reserved installed container list in the configuration file, and judges whether any installed container is located in the loaded installed container list:

when any installed container is in the recorded installed container list, the energy controller reinstalls any installed container, deletes the original installation catalog of any installed container, and goes to step 6; otherwise, the energy controller deletes the original installation catalog of any installed container and goes to step 6.

2. The method for monitoring the status of a power controller container as claimed in claim 1, wherein the container information is an ID identification number of the container.

3. The method for monitoring the container state of the energy controller according to claim 1, wherein in step 2, the energy controller obtains the container state of each valid container in the installed container list respectively according to a preset time interval.

4. The energy controller container state monitoring method of claim 3, wherein the energy controller obtains the container state of each valid container in the installed container list in real time.

5. The energy controller container state monitoring method according to any one of claims 1 to 4, wherein a Bluetooth module is installed on the energy controller, and a Bluetooth software version is installed on the Bluetooth module.

6. The power controller container condition monitoring method of claim 5, further comprising: and the energy controller executes upgrading management processing operation on the software version of the Bluetooth module.

7. The method for monitoring the state of the energy controller container according to claim 6, wherein the energy controller performing upgrade management processing operation on the software version of the bluetooth module comprises the following steps S1 to S6:

step S1, storing a Bluetooth software supporting version database in the energy controller in advance; the Bluetooth software supporting version database comprises Bluetooth software version information of at least one adaptive supporting energy controller;

step S2, the started energy controller detects the state of the Bluetooth software supporting version database:

when the bluetooth software support version database is in a normal state, the step S3 is executed; otherwise, the energy controller obtains the bluetooth software version information adaptive to and supporting the energy controller from the remote server, and stores the obtained bluetooth software version information into the bluetooth software support version database, and goes to step S3;

step S3, the energy controller obtains the Bluetooth software version information of the current Bluetooth module, and makes interpretation processing according to the obtaining result of the Bluetooth software version information:

when the bluetooth software version information is acquired, the step S4 is executed; otherwise, the energy controller sends alarm information to the master station;

step S4, the energy controller makes interpretation processing according to the acquired Bluetooth software version information and the Bluetooth software support version database:

when the bluetooth software version information is located in the bluetooth software support version database, go to step S5; otherwise, go to step S6;

step S5, the energy controller makes an interpretation process on whether the bluetooth software version information of the current bluetooth module needs to be updated:

when the Bluetooth software version needs to be updated, the energy controller uses the preset Bluetooth software version to update the Bluetooth software version of the current Bluetooth module; otherwise, the energy controller does not upgrade the Bluetooth software version of the current Bluetooth module;

step S6, the energy controller judges whether the current Bluetooth module supports the necessary AT command:

when supporting the necessary AT instruction, the energy controller adds the Bluetooth software version information of the current Bluetooth module into a Bluetooth software support version database as the Bluetooth software version information of the adaptive support energy controller; otherwise, the energy controller sends alarm information to the main station.

8. The method for monitoring the status of the energy controller container according to claim 7, wherein in step S5, the energy controller using the bluetooth software version preset therein to upgrade the bluetooth software version of the current bluetooth module further comprises: and the energy controller makes software version upgrading record on the Bluetooth software version upgrading information of the current Bluetooth module.

9. The power controller container condition monitoring method of claim 7, further comprising: when the current Bluetooth module does not support the necessary AT instruction, the energy controller controls the display screen to display the prompt information of the Bluetooth software version information of the current Bluetooth module.

10. The method for monitoring the state of the energy controller container according to claim 7, wherein the mandatory AT command comprises a standard AT command set and an extended AT command set; in step S6, the process of determining whether the current bluetooth module supports the necessary AT command by the energy controller includes:

step S61, the energy controller makes a test judgment on whether the current Bluetooth module supports the standard AT instruction set:

when the standard AT instruction set is supported, the process proceeds to step S62; otherwise, judging that the current Bluetooth module does not support the necessary AT instruction;

step S62, the energy controller makes a test judgment on whether the current Bluetooth module supports the expansion AT instruction set:

when the extended AT instruction set is supported, judging that the current Bluetooth module supports a necessary AT instruction; otherwise, judging that the current Bluetooth module does not support the necessary AT instruction.

Technical Field

The invention relates to the field of electric power, in particular to a method for monitoring the state of a container of an energy controller.

Background

For satisfying the diversified demand of market to power consumption information acquisition terminal for each district can dispose corresponding module combination according to actual demand, and then forms the terminal that has different functions, and the energy controller based on the modularization comes into force.

In practical applications, a plurality of applications are usually deployed and installed on the energy controller in a container manner to meet the requirements of different service scenarios. The energy controller for deploying the application program in the container mode is also called a container host. In general, many basic data of a container, such as a container list, container version information, and container operation status, may be obtained on a container host.

However, there are some disadvantages to the current monitoring method for the status of the container in the energy controller: the existing energy controller container state monitoring method mainly focuses on the concern about container reliability on an application program deployed in a single container, that is, an application program daemon process in the container cannot monitor the container state when the container state is abnormal, which is not favorable for the container reliability and influences the normal operation of the energy controller.

Disclosure of Invention

The technical problem to be solved by the present invention is to provide a method for monitoring the state of a container of an energy controller in view of the above prior art.

The technical scheme adopted by the invention for solving the technical problems is as follows: a method for monitoring the state of a container of an energy controller is characterized by comprising the following steps of 1-9:

step 1, an energy controller acquires all installed container information and the total number of installed containers, and forms an installed container list by using all installed container information;

step 2, the energy controller respectively obtains the container state of each effective container in the installed container list and forms an effective container list by all the effective containers; wherein the container state is a dead state or an exited state or a non-dead non-exited state;

step 3, the energy controller judges whether all the valid container states in the valid container list are exit states:

when all the effective container states are exit states, the energy controller starts restarting and finishes executing subsequent operations; otherwise, turning to step 4;

step 4, the energy controller extracts any installed container information in the installed container list in a traversing way, and judges whether any installed container is an effective container in the effective container list:

when any one of the installed containers is an effective container in the effective container list, the step 5 is carried out; otherwise, judging that any one of the installed containers is an invalid container, and turning to the step 9;

step 5, the energy controller judges and processes the container state of any one installed container:

when the container state is a non-dead non-exit state, judging that the container state of any one installed container is normal, and turning to a step 6; otherwise, go to step 7;

step 6, the energy controller judges whether each installed container in the installed container list is traversed:

when the traversal is finished, finishing the execution of subsequent operations; otherwise, turning to the step 2;

step 7, the energy controller judges whether the container state of any one installed container is a death state:

when the container state is a non-death state, the step 8 is carried out; otherwise, the energy controller deletes any installed container in the valid container list, and the step 9 is carried out;

step 8, the energy controller judges whether the container state of any one installed container is an exit state:

when the container state is the exit state, the energy controller deletes any installed container in the valid container list, and the step 9 is carried out; otherwise, directly turning to the step 9;

step 9, the energy controller loads the reserved installed container list in the configuration file, and judges whether any installed container is located in the loaded installed container list:

when any installed container is in the recorded installed container list, the energy controller reinstalls any installed container, deletes the original installation catalog of any installed container, and goes to step 6; otherwise, the energy controller deletes the original installation catalog of any installed container and goes to step 6.

In an improved manner, in the method for monitoring the state of the energy controller container, the container information is an ID identification number of the container.

In step 2, the energy controller respectively obtains the container status of each valid container in the installed container list according to a preset time interval.

Preferably, in the energy controller container state monitoring method, the energy controller respectively obtains the container state of each valid container in the installed container list in real time.

And then, in the energy controller container state monitoring method, a Bluetooth module is installed on the energy controller, and a Bluetooth software version is installed on the Bluetooth module.

Further, the method for monitoring the state of the energy controller container further comprises the following steps: and the energy controller executes upgrading management processing operation on the software version of the Bluetooth module.

Further, in the method for monitoring the state of the energy controller container, the step of performing upgrade management processing operation on the software version of the bluetooth module by the energy controller includes the following steps S1 to S6:

step S1, storing a Bluetooth software supporting version database in the energy controller in advance; the Bluetooth software supporting version database comprises Bluetooth software version information of at least one adaptive supporting energy controller;

step S2, the started energy controller detects the state of the Bluetooth software supporting version database:

when the bluetooth software support version database is in a normal state, the step S3 is executed; otherwise, the energy controller obtains the bluetooth software version information adaptive to and supporting the energy controller from the remote server, and stores the obtained bluetooth software version information into the bluetooth software support version database, and goes to step S3;

step S3, the energy controller obtains the Bluetooth software version information of the current Bluetooth module, and makes interpretation processing according to the obtaining result of the Bluetooth software version information:

when the bluetooth software version information is acquired, the step S4 is executed; otherwise, the energy controller sends alarm information to the master station;

step S4, the energy controller makes interpretation processing according to the acquired Bluetooth software version information and the Bluetooth software support version database:

when the bluetooth software version information is located in the bluetooth software support version database, go to step S5; otherwise, go to step S6;

step S5, the energy controller makes an interpretation process on whether the bluetooth software version information of the current bluetooth module needs to be updated:

when the Bluetooth software version needs to be updated, the energy controller uses the preset Bluetooth software version to update the Bluetooth software version of the current Bluetooth module; otherwise, the energy controller does not upgrade the Bluetooth software version of the current Bluetooth module;

step S6, the energy controller judges whether the current Bluetooth module supports the necessary AT command:

when supporting the necessary AT instruction, the energy controller adds the Bluetooth software version information of the current Bluetooth module into a Bluetooth software support version database as the Bluetooth software version information of the adaptive support energy controller; otherwise, the energy controller sends alarm information to the main station.

In step S5, the method for monitoring the status of the energy controller container further includes: and the energy controller makes software version upgrading record on the Bluetooth software version upgrading information of the current Bluetooth module.

In another improvement, the method for monitoring the state of the energy controller container further comprises the following steps: when the current Bluetooth module does not support the necessary AT instruction, the energy controller controls the display screen to display the prompt information of the Bluetooth software version information of the current Bluetooth module.

In a further improvement, in the energy controller container state monitoring method, the essential AT instruction includes a standard AT instruction set and an extended AT instruction set; in step S6, the process of determining whether the current bluetooth module supports the necessary AT command by the energy controller includes:

step S61, the energy controller makes a test judgment on whether the current Bluetooth module supports the standard AT instruction set:

when the standard AT instruction set is supported, the process proceeds to step S62; otherwise, judging that the current Bluetooth module does not support the necessary AT instruction;

step S62, the energy controller makes a test judgment on whether the current Bluetooth module supports the expansion AT instruction set:

when the extended AT instruction set is supported, judging that the current Bluetooth module supports a necessary AT instruction; otherwise, judging that the current Bluetooth module does not support the necessary AT instruction.

Compared with the prior art, the invention has the advantages that: the invention takes all installed containers installed on the energy controller as monitoring targets, not only limited to valid containers, and starts the restart processing of the energy controller by judging and processing the states of the valid containers in all the installed containers and the serious error condition when all the installed containers are in the exit state, deletes the installed containers in the death state as invalid containers in the formed installed container list, keeps the deleted containers configurable, deletes the installation catalog of the invalid containers, completely unloads, prevents the occupation of system storage, realizes the comprehensive monitoring and abnormal automatic processing of all the container states, improves the safety and reliability of the containers and ensures the normal operation of the energy controller.

Drawings

Fig. 1 is a schematic flow chart of a method for monitoring the state of an energy controller container according to an embodiment of the present invention.

Detailed Description

The invention is described in further detail below with reference to the accompanying examples.

The embodiment provides a method for monitoring the state of an energy controller container. Specifically, referring to fig. 1, the energy controller container state monitoring method of the embodiment includes the following steps 1-9:

step 1, an energy controller acquires all installed container information and the total number of installed containers, and forms an installed container list by using all installed container information; wherein, the container information in this embodiment is ID identification number of the container;

step 2, the energy controller respectively obtains the container state of each effective container in the installed container list and forms an effective container list by all the effective containers; wherein the container state is a dead state or an exited state or a non-dead non-exited state;

step 3, the energy controller judges whether all the valid container states in the valid container list are exit states:

when all the valid container states are exit states, the states of all the containers are abnormal errors which cannot be recovered at the moment, the energy controller starts restarting, and the execution of subsequent operations is finished; otherwise, turning to step 4;

step 4, the energy controller extracts any installed container information in the installed container list in a traversing way, and judges whether any installed container is an effective container in the effective container list:

when any one of the installed containers is an effective container in the effective container list, the step 5 is carried out; otherwise, judging that any one of the installed containers is an invalid container, and turning to the step 9;

that is, the power controller extracts an installed container information in the installed container list at will, and then performs step 4; then, extracting the information of the installed container from all the containers remaining in the installed container list, and then executing the step 4, repeating the steps until all the container information in the installed container list is traversed;

step 5, the energy controller judges and processes the container state of any one installed container:

when the container state is a non-dead non-exit state, judging that the container state of any one installed container is normal, and turning to a step 6; otherwise, go to step 7;

step 6, the energy controller judges whether each installed container in the installed container list is traversed:

when the traversal is finished, finishing the execution of subsequent operations; otherwise, turning to the step 2;

step 7, the energy controller judges whether the container state of any one installed container is a death state:

when the container state is a non-death state, the step 8 is carried out; otherwise, the container state is a dead state, any installed container is in an invalid state at the moment, the energy controller deletes any installed container in the valid container list, and the step 9 is carried out;

step 8, the energy controller judges whether the container state of any one installed container is an exit state:

when the container state is the exit state, the energy controller deletes any installed container in the valid container list, and the step 9 is carried out; otherwise, directly turning to the step 9;

step 9, the energy controller loads the reserved installed container list in the configuration file, and judges whether any installed container is located in the loaded installed container list:

when any installed container is in the recorded installed container list, the energy controller reinstalls any installed container, deletes the original installation catalog of any installed container, and goes to step 6; otherwise, the energy controller deletes the original installation catalog of any installed container and goes to step 6.

In a specific application, the energy controller may be enabled to respectively obtain the container status of each valid container in the installed container list according to a preset time interval in step 2, as required. For example, the energy controller may be enabled to obtain the container status of each valid container in the installed container list in real time.

In order to meet the data communication requirement of the energy controller and the outside based on the bluetooth connection mode, the energy controller in this embodiment may be further configured with a bluetooth module, and the bluetooth module is configured with a bluetooth software version.

In order to meet the software version update requirement for the bluetooth module on the existing energy controller, the energy controller of this embodiment also performs an upgrade management processing operation on the software version of the bluetooth module. Specifically, the step of the energy controller performing the upgrade management processing operation on the software version of the bluetooth module includes the following steps S1 to S6:

step S1, storing a Bluetooth software supporting version database in the energy controller in advance; the Bluetooth software supporting version database comprises Bluetooth software version information of at least one adaptive supporting energy controller;

step S2, the started energy controller detects the state of the Bluetooth software supporting version database:

when the bluetooth software support version database is in a normal state, the step S3 is executed; otherwise, the energy controller obtains the bluetooth software version information adaptive to and supporting the energy controller from the remote server, and stores the obtained bluetooth software version information into the bluetooth software support version database, and goes to step S3;

step S3, the energy controller obtains the Bluetooth software version information of the current Bluetooth module, and makes interpretation processing according to the obtaining result of the Bluetooth software version information:

when the bluetooth software version information is acquired, indicating that the bluetooth module is installed in the energy controller, the process goes to step S4; otherwise, the energy controller does not acquire the Bluetooth software version information, namely the energy controller is not provided with a Bluetooth module, the energy controller sends alarm information to the master station at the moment, and controls a display screen of the energy controller to display prompt information of no Bluetooth module at present according to the requirement;

step S4, the energy controller makes interpretation processing according to the acquired Bluetooth software version information and the Bluetooth software support version database:

when the bluetooth software version information is located in the bluetooth software support version database, indicating that the bluetooth software version supports the bluetooth module in the energy controller, and going to step S5; otherwise, the bluetooth module in the energy controller is not supported by the bluetooth software version, and the step S6 is executed;

step S5, the energy controller makes an interpretation process on whether the bluetooth software version information of the current bluetooth module needs to be updated:

when the Bluetooth software version needs to be updated, the energy controller uses the preset Bluetooth software version to update the Bluetooth software version of the current Bluetooth module; otherwise, the energy controller does not upgrade the Bluetooth software version of the current Bluetooth module; in step S5, the energy controller further records the bluetooth software version upgrade information of the current bluetooth module as required;

step S6, the energy controller judges whether the current Bluetooth module supports the necessary AT command:

when supporting the necessary AT instruction, the energy controller adds the Bluetooth software version information of the current Bluetooth module into a Bluetooth software support version database as the Bluetooth software version information of the adaptive support energy controller; otherwise, the current Bluetooth module does not support the necessary AT instruction, the energy controller sends alarm information to the master station, and controls a display screen of the energy controller to display prompt information of the Bluetooth software version information which does not identify the current Bluetooth module according to the requirement. Here, the mandatory AT command includes a standard AT command set and an extended AT command set.

Specifically, in step S6 of this embodiment, the process of determining, by the energy controller, whether the current bluetooth module supports the necessary AT instruction includes:

step S61, the energy controller makes a test judgment on whether the current Bluetooth module supports the standard AT instruction set:

when the standard AT instruction set is supported, recording standard AT instruction support information, and going to step S62; otherwise, judging that the current Bluetooth module does not support the necessary AT instruction;

step S62, the energy controller makes a test judgment on whether the current Bluetooth module supports the expansion AT instruction set:

when the extended AT instruction set is supported, judging that the current Bluetooth module supports a necessary AT instruction, and recording extended AT instruction support information; otherwise, judging that the current Bluetooth module does not support the necessary AT instruction.

In order to enable the remote server to timely obtain the bluetooth software version information of the current bluetooth module in the support energy controller, in this embodiment, after the energy controller adds the bluetooth software version information of the current bluetooth module as the bluetooth software version information of the adaptive support energy controller into the bluetooth software support version database, the energy controller further sends the bluetooth software version information of the current bluetooth module as the bluetooth software version information of the adaptive support energy controller to the remote server for storage. Furthermore, the energy controller and the remote server in this embodiment may be configured to perform synchronous operation processing on the bluetooth software version information supporting the energy controller as needed.

In addition, as required, before step S2 is executed, the serial number of the bluetooth module of the energy controller, the bluetooth software version information, and the necessary AT commands supported by the bluetooth module may be stored in the energy controller in advance.

Although preferred embodiments of the present invention have been described in detail hereinabove, it should be clearly understood that modifications and variations of the present invention are possible to those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:异常处理方法、装置、服务器及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!