Method, device, equipment and medium for preventing errors in upgrading and rolling back containers of power monitoring systems

By generating standby container clusters and new version container clusters in the power monitoring system, containers can be automatically rolled back and re-upgraded, which solves the problem of time extension caused by failed container upgrades in the existing technology and improves the efficiency and availability of container upgrades.

CN113391959BActive Publication Date: 2024-09-27GUANGXI POWER GRID CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110758747.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-05
Publication Date
2024-09-27
Estimated Expiration
2041-07-05

AI Technical Summary

Technical Problem

The existing power monitoring system container upgrade method requires the user to re-perform the operation when the upgrade fails, resulting in prolonged upgrade time and low efficiency.

Method used

When the container version upgrade fails, it automatically rolls back to the available version and re-performs the version upgrade. By generating a standby container cluster and a new version container cluster, the container is automatically upgraded.

Benefits of technology

This reduces the time spent on container upgrades, improves the efficiency of container upgrades, and ensures the availability of containers during the upgrade process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113391959B
    Figure CN113391959B
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and medium for preventing errors in upgrading and rolling back containers of an electric power monitoring system. The present application can automatically roll back and re-upgrade containers when an upgrade fails. The method includes: obtaining an old version container cluster to be upgraded and a preset first new version container cluster; generating a spare container cluster corresponding to the old version container cluster according to the old version container cluster, the spare container cluster being used to roll back the old version container cluster to the state before the upgrade; for each old version container, controlling the first new version container corresponding to the old version container to replace the old version container to run, if the first new version container fails to run, recording the old version container, and controlling the spare container cluster to replace the old version container cluster to run; regenerating a second new version container according to the first new version container that failed to run and replacing the first new version container to obtain a second new version container cluster, and controlling the second new version container cluster to replace the spare container cluster to run.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power monitoring technology, and in particular to a method, device, computer equipment and storage medium for preventing errors in upgrading and rolling back containers of a power monitoring system. Background Art

[0002] With the continuous growth of user demand and the continuous optimization of services by developers, various business updates are frequent, especially Internet applications, which often release a new version every few days. For Internet applications after business containerization, application updates refer to upgrading the containers corresponding to each business in the application. In the existing power monitoring system container upgrade method, if the container upgrade fails, the user needs to re-execute the corresponding upgrade operation before continuing the container upgrade, which greatly prolongs the container upgrade time. Summary of the invention

[0003] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a method, device, computer equipment and storage medium for preventing errors in upgrading and rolling back containers in a power monitoring system, which can automatically roll back to the available container version when the container version upgrade fails, and re-execute the version upgrade, thereby reducing the time spent on container upgrades.

[0004] In a first aspect, an embodiment of the present invention provides a method for preventing errors in container upgrade rollback of an electric power monitoring system, comprising: obtaining an old version container cluster to be upgraded and a preset first new version container cluster, the old version container cluster comprising a plurality of old version containers, and the first new version container cluster comprising a plurality of first new version containers corresponding one to one with the old version containers; generating a backup container cluster corresponding to the old version container cluster according to the old version container cluster, the backup container cluster being used to roll back the old version container cluster to a state before the upgrade; for each of the old version containers, controlling the first new version container corresponding to the old version container to replace the old version container for operation, if the first new version container fails to run, recording the old version container, and controlling the backup container cluster to replace the old version container cluster for operation; regenerating a corresponding second new version container according to the first new version container that failed to run and replacing the first new version container with the second new version container to obtain a second new version container cluster, and then controlling the second new version container cluster to replace the backup container cluster for operation.

[0005] According to some embodiments of the first aspect of the present invention, generating a standby container cluster corresponding to the old version container cluster based on the old version container cluster includes: obtaining version information and a configuration file for each of the old version containers; and generating a number of standby old version containers corresponding one-to-one to the old version containers based on the version information and the configuration file to obtain a standby container cluster corresponding to the old version container cluster.

[0006] According to some embodiments of the first aspect of the present invention, after generating a backup container cluster corresponding to the old version container cluster according to the old version container cluster, the method further includes: determining an old version container manager for managing the old version container according to the old version container cluster; building a new version container manager, and running the old version container manager and the new version container manager simultaneously.

[0007] According to some embodiments of the first aspect of the present invention, the controlling the first new version container corresponding to the old version container to replace the old version container to run includes: removing the old version container from the old version container manager, and moving the first new version container corresponding to the old version container to the new version container manager.

[0008] In a second aspect, an embodiment of the present invention provides an anti-error device for container upgrade rollback of an electric power monitoring system, comprising: an acquisition module, the acquisition module is used to obtain an old version container cluster to be upgraded and a preset first new version container cluster, the old version container cluster includes several old version containers, and the first new version container cluster includes several first new version containers corresponding to the old version containers one by one; a creation module, the first creation module is used to generate a backup container cluster corresponding to the old version container cluster according to the old version container cluster; a first control module, the first control module is used to control the first new version container corresponding to the old version container to replace the old version container for each of the old version containers, if the first new version container fails to run, the old version container is recorded, and the backup container cluster is controlled to replace the old version container cluster for operation; a second control module, the second control module is used to regenerate the corresponding second new version container according to the first new version container that failed to run and replace the first new version container with the second new version container to obtain a second new version container cluster, and then control the second new version container cluster to replace the backup container cluster for operation.

[0009] According to some embodiments of the second aspect of the present invention, the creation module includes: an acquisition unit, which is used to acquire version information and a configuration file of each of the old version containers; and a generation unit, which is used to generate a number of spare old version containers corresponding one-to-one to the old version containers according to the version information and the configuration file to obtain a spare container cluster corresponding to the old version container cluster.

[0010] According to some embodiments of the second aspect of the present invention, the power monitoring system container upgrade

[0011] The rollback error prevention device also includes: a first processing module, the first processing module is used to determine the old version container manager used to manage the old version container according to the old version container cluster; a second processing module, the second processing module is used to build a new version container manager and run the old version container manager and the new version container manager at the same time.

[0012] According to some embodiments of the second aspect of the present invention, the control module includes: an execution unit, which is used to remove the old version container from the old version container manager and move the first new version container corresponding to the old version container to the new version container manager.

[0013] In a third aspect, an embodiment of the present invention further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps in the above-mentioned embodiments of the power monitoring system container upgrade rollback and error prevention method are implemented.

[0014] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-mentioned embodiments of the power monitoring system container upgrade rollback error prevention method.

[0015] The above-mentioned power monitoring system container upgrade rollback error prevention method, device, computer equipment and storage medium first obtain the old version container cluster to be upgraded and the preset first new version container cluster, then generate a spare container cluster corresponding to the old version container cluster according to the old version container cluster, and then for each old version container, control the first new version container corresponding to the old version container to replace the old version container to run, if the first new version container fails to run, then record the old version container, and control the spare container cluster to replace the old version container cluster to run so that the old version container cluster is rolled back to the state before the upgrade, and then regenerate the corresponding second new version container according to the first new version container that failed to run and replace the first new version container with the second new version container to obtain the second new version container cluster, and then control the second new version container cluster to replace the spare container cluster to run, so as to realize the automatic upgrade of the container. The present application can automatically roll back to the available version of the container when the container version upgrade fails, and re-execute the version upgrade, thereby reducing the time spent on container upgrade and improving the upgrade efficiency of the container. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A flowchart of the steps of a method for preventing errors in upgrading and rolling back containers of a power monitoring system according to an embodiment of the first aspect of the present invention;

[0017] Figure 2 A flowchart of the steps of a method for preventing errors in upgrading and rolling back containers of a power monitoring system according to another embodiment of the first aspect of the present invention;

[0018] Figure 3 A flowchart of the steps of a method for preventing errors in upgrading and rolling back containers of a power monitoring system according to another embodiment of the first aspect of the present invention;

[0019] Figure 4 A flowchart of the steps of a method for preventing errors in upgrading and rolling back containers of a power monitoring system according to another embodiment of the first aspect of the present invention;

[0020] Figure 5 A schematic diagram of a module of a power monitoring system container upgrade rollback error prevention device according to an embodiment of the second aspect of the present invention;

[0021] Figure 6 A schematic diagram of the structure of a computer device according to an embodiment of the third aspect of the present invention.

[0022] Reference numerals:

[0023] Acquisition module 100; creation module 200; first control module 300; second control module 400; memory 500; processor 600. DETAILED DESCRIPTION

[0024] Embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0025] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood as not including the number itself, and "above", "below", "within" etc. are understood as including the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0026] In the description of the present invention, it should be understood that descriptions involving orientations, such as up, down, front, back, left, right, etc., and orientations or positional relationships indicated are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present invention.

[0027] In the description of the present invention, if there is a description of first and second, it is only for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0028] In the description of the present invention, unless otherwise clearly defined, terms such as setting, installing, connecting, etc. should be understood in a broad sense, and technicians in the relevant technical field can reasonably determine the specific meanings of the above terms in the present invention based on the specific content of the technical solution.

[0029] In the description of the embodiments of the present invention, the description with reference to the terms "one embodiment / implementation", "another embodiment / implementation" or "some embodiments / implementations" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least two embodiments or implementations of the present disclosure, and the schematic representation of the above terms does not necessarily refer to the same exemplary embodiment or implementation. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or implementations in a suitable manner.

[0030] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0031] The embodiments of the present invention are further described below in conjunction with the accompanying drawings.

[0032] In a first aspect, the present invention proposes a method for preventing errors in upgrading and rolling back containers of a power monitoring system.

[0033] Reference Figure 1 In some embodiments, the power monitoring system container upgrade rollback error prevention method includes but is not limited to step S100, step S200, step S300 and step S400.

[0034] Step S100: obtaining an old version container cluster to be upgraded and a preset first new version container cluster, wherein the old version container cluster includes a plurality of old version containers, and the first new version container cluster includes a plurality of first new version containers corresponding one-to-one to the old version containers;

[0035] Step S200: generating a standby container cluster corresponding to the old version container cluster according to the old version container cluster, where the standby container cluster is used to roll back the old version container cluster to a state before the upgrade;

[0036] Step S300: for each old version container, control the first new version container corresponding to the old version container to replace the old version container to run; if the first new version container fails to run, record the old version container, and control the backup container cluster to replace the old version container cluster to run;

[0037] Step S400: regenerate a corresponding second new version container according to the first new version container that failed to run, and replace the first new version container with the second new version container to obtain a second new version container cluster, and then control the second new version container cluster to replace the standby container cluster to run.

[0038] Through step S100, step S200, step S300 and step S400, firstly, the old version container cluster to be upgraded and the preset first new version container cluster are obtained, and then a spare container cluster corresponding to the old version container cluster is generated according to the old version container cluster, and then for each old version container, the first new version container corresponding to the old version container is controlled to replace the old version container for operation, if the first new version container fails to run, the old version container is recorded, and the spare container cluster is controlled to replace the old version container cluster for operation so that the old version container cluster is rolled back to the state before the upgrade, and then the corresponding second new version container is regenerated according to the first new version container that failed to run, and the second new version container replaces the first new version container to obtain the second new version container cluster, and then the second new version container cluster is controlled to replace the spare container cluster for operation, thereby realizing automatic container upgrade.

[0039] It can be understood that by using the power monitoring system container upgrade rollback error prevention method, it is possible to automatically roll back to the available version of the container when the container version upgrade fails, and re-execute the version upgrade, thereby reducing the time spent on container upgrades and improving the upgrade efficiency of the container.

[0040] It should be noted that the management and upgrade operations of the container can be run on the Rancher system or the Kubernetes system, and this embodiment does not limit it.

[0041] It should be noted that the corresponding second new version container may be generated according to the preset image file and related configuration files of the first new version container, and this embodiment does not limit this.

[0042] Reference Figure 2 In some embodiments, regarding step S200, it may specifically include but is not limited to the following steps S210 and S220.

[0043] Step S210: Obtain version information and configuration files of each old version container;

[0044] Step S220: generating a plurality of spare old version containers corresponding one to one with the old version containers according to the version information and the configuration file, so as to obtain a spare container cluster corresponding to the old version container cluster.

[0045] It should be noted that the backup container cluster is the same as the old version container cluster, with the same business types and quantities, and calling relationships between containers, etc., so that the backup container cluster can replace the old version container cluster to normally execute application services before the version upgrade, thereby ensuring that when the old version container upgrade fails, users can normally use all corresponding application services before the upgrade.

[0046] Reference Figure 3 In some embodiments, after step S200, the following steps also include but are not limited to step S230 and step S240.

[0047] Step S230: determining an old version container manager for managing old version containers according to the old version container cluster;

[0048] Step S240: construct a new version container manager, and run the old version container manager and the new version container manager simultaneously.

[0049] Exemplarily, in the Kubernetes system, an old version container manager ReplicaSet(old) controlled by a container version management tool Deployment for managing an old version container cluster is determined, and then the Deployment is controlled to create a new version container manager ReplicaSet(new), and the Deployment is controlled to run ReplicaSet(old) and ReplicaSet(new) at the same time.

[0050] Reference Figure 4 In some embodiments, regarding step S300, it may specifically include but is not limited to the following step S310.

[0051] Step S310: remove the old version container from the old version container manager, and move the first new version container corresponding to the old version container to the new version container manager.

[0052] Specifically, in the Kubernetes system, Deployment controls ReplicaSet(old) to remove each old version container and add the first new version container corresponding to the old version container to ReplicaSet(new) until all old version containers under ReplicaSet(old) are removed and the corresponding first new version containers are all added to ReplicaSet(new), and each first new version container runs normally, then the old version container cluster is upgraded successfully.

[0053] In a second aspect, the present invention proposes an anti-error device for upgrading and rolling back containers of a power monitoring system.

[0054] Reference Figure 5, the device includes but is not limited to a collection module 100, a creation module 200, a first control module 300 and a second control module 400. Specifically, the collection module 100 is used to obtain an old version container cluster to be upgraded and a preset first new version container cluster, the old version container cluster includes a plurality of old version containers, and the first new version container cluster includes a plurality of first new version containers corresponding to the old version containers one by one; the first creation module 200 is used to generate a backup container cluster corresponding to the old version container cluster according to the old version container cluster; the first control module 300 is used to control the first new version container corresponding to the old version container to replace the old version container for each old version container to run, if the first new version container fails to run, then record the old version container, and control the backup container cluster to replace the old version container cluster to run; the second control module 400 is used to regenerate the corresponding second new version container according to the first new version container that failed to run and replace the first new version container with the second new version container to obtain the second new version container cluster, and then control the second new version container cluster to replace the backup container cluster to run.

[0055] When using the power monitoring system container upgrade rollback anti-error device, first, the acquisition module 100 obtains the old version container cluster to be upgraded and the preset first new version container cluster, and then the first creation module 200 generates a backup container cluster corresponding to the old version container cluster according to the old version container cluster, and then the first control module 300 controls the first new version container corresponding to the old version container to replace the old version container for each old version container. If the first new version container fails to run, the old version container is recorded, and the backup container cluster is controlled to replace the old version container cluster for operation. The second control module 400 regenerates the corresponding second new version container according to the failed first new version container and replaces the first new version container with the second new version container to obtain the second new version container cluster, and then controls the second new version container cluster to replace the backup container cluster for operation, thereby realizing automatic container upgrade.

[0056] It can be understood that by using the power monitoring system container upgrade rollback anti-error device, it is possible to automatically roll back to the available version of the container when the container version upgrade fails, and re-execute the version upgrade, thereby reducing the time spent on container upgrades and improving the upgrade efficiency of the container.

[0057] In some embodiments, the creation module 200 includes: an acquisition unit, which is used to acquire version information and configuration files of each old version container; and a generation unit, which is used to generate a number of spare old version containers corresponding one to one with the old version containers according to the version information and configuration files to obtain a spare container cluster corresponding to the old version container cluster.

[0058] It should be noted that since the power monitoring system container upgrade rollback error prevention device in this embodiment and the power monitoring system container upgrade rollback error prevention method in the above embodiment are based on the same inventive concept, the corresponding contents in the method embodiment are also applicable to the present system embodiment and will not be described in detail here.

[0059] In some embodiments, the power monitoring system container upgrade rollback anti-error device also includes: a first processing module, the first processing module is used to determine the old version container manager used to manage the old version container according to the old version container cluster; a second processing module, the second processing module is used to build a new version container manager, and run the old version container manager and the new version container manager at the same time.

[0060] It should be noted that since the power monitoring system container upgrade rollback error prevention device in this embodiment and the power monitoring system container upgrade rollback error prevention method in the above embodiment are based on the same inventive concept, the corresponding contents in the method embodiment are also applicable to the present system embodiment and will not be described in detail here.

[0061] In some embodiments, the control module includes: an execution unit, the execution unit is used to remove the old version container from the old version container manager, and move the first new version container corresponding to the old version container to the new version container manager.

[0062] It should be noted that since the power monitoring system container upgrade rollback error prevention device in this embodiment and the power monitoring system container upgrade rollback error prevention method in the above embodiment are based on the same inventive concept, the corresponding contents in the method embodiment are also applicable to the present system embodiment and will not be described in detail here.

[0063] Based on the power monitoring system container upgrade rollback error prevention method of the first aspect embodiment, a computer device of each embodiment of the third aspect of the present invention is proposed.

[0064] Reference Figure 6 ,The computer device can be a router, a switch, a server or other data processing and transmission equipment.

[0065] It should be noted that since the computer device in this embodiment and the power monitoring system container upgrade rollback error prevention method in the above embodiment are based on the same inventive concept, the corresponding content in the method embodiment is also applicable to the present system embodiment and will not be described in detail here.

[0066] It is understandable that the processor 600 and the memory 500 may be connected via a bus or other means.

[0067] It should be noted that the non-transient software program and instructions required to implement the power monitoring system container upgrade rollback error prevention method of the above embodiment are stored in the memory 500. When executed by the processor 600, the power monitoring system container upgrade rollback error prevention method of the above embodiment is executed, for example, Figure 1 The method steps S100 to S400, Figure 2 Steps S210 to S220 of the method, Figure 3 Steps S230 to S240 of the method, Figure 4 Method step S310 in .

[0068] It can be understood that since the computer device of the third aspect embodiment of the present invention executes the power monitoring system container upgrade rollback and error prevention method including any one of the first aspect embodiments mentioned above, the specific implementation methods and technical effects of the computer device of the third aspect embodiment of the present invention can refer to the specific implementation methods and technical effects of the power monitoring system container upgrade rollback and error prevention method of any one of the first aspect embodiments mentioned above, and will not be repeated here.

[0069] The above described embodiments of the computer device are merely illustrative, wherein the units described as separate components may or may not be physically separated, i.e., may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0070] Based on the power monitoring system container upgrade rollback error prevention method of the first aspect embodiment, a computer-readable storage medium of each embodiment of the fourth aspect of the present invention is proposed, and the computer-readable storage medium stores a computer program. The computer program is executed by a processor 600 or a controller, for example, by a processor 600 in the above-mentioned computer device embodiment, so that the above-mentioned processor 600 can execute the power monitoring system container upgrade rollback error prevention method in the above-mentioned embodiment, for example, execute as follows Figure 1 The method steps S100 to S400, Figure 2 Steps S210 to S220 of the method, Figure 3 Steps S230 to S240 of the method, Figure 4 Method step S310 in .

[0071] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above can be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components can be implemented as software executed by processor 600, such as a central processing unit, a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0072] The embodiments of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in the relevant technical field without departing from the purpose of the present invention.

Claims

1. A method for preventing errors in upgrading and rolling back containers in a power monitoring system, characterized in that: include: Acquire an old version container cluster to be upgraded and a preset first new version container cluster, wherein the old version container cluster includes a plurality of old version containers, and the first new version container cluster includes a plurality of first new version containers corresponding one-to-one to the old version containers; Obtaining version information and configuration files of each of the old version containers; generating a number of spare old version containers corresponding one-to-one to the old version containers according to the version information and the configuration files to obtain a spare container cluster corresponding to the old version container cluster, wherein the spare container cluster is used to roll back the old version container cluster to a state before the upgrade; determining an old version container manager for managing the old version containers according to the old version container cluster; constructing a new version container manager, and running the old version container manager and the new version container manager at the same time; For each of the old version containers, remove the old version container from the old version container manager, and move the first new version container corresponding to the old version container to the new version container manager; if the first new version container fails to run, record the old version container, and control the standby container cluster to replace the old version container cluster to run; Regenerate a corresponding second new version container according to the first new version container that failed to run and replace the first new version container with the second new version container to obtain a second new version container cluster, and then control the second new version container cluster to replace the standby container cluster to run.

2. A device for preventing errors in upgrading and rolling back containers in a power monitoring system, characterized in that: include: A collection module, the collection module is used to obtain an old version container cluster to be upgraded and a preset first new version container cluster, the old version container cluster includes a plurality of old version containers, and the first new version container cluster includes a plurality of first new version containers corresponding one-to-one to the old version containers; A first creation module, the first creation module is used to obtain version information and configuration files of each of the old version containers; generate a number of spare old version containers corresponding to the old version containers one by one according to the version information and the configuration files to obtain a spare container cluster corresponding to the old version container cluster, the spare container cluster is used to roll back the old version container cluster to the state before the upgrade; determine the old version container manager used to manage the old version containers according to the old version container cluster; build a new version container manager, and run the old version container manager and the new version container manager at the same time; A first control module, wherein the first control module is used to remove each of the old version containers from the old version container manager, and move the first new version container corresponding to the old version container to the new version container manager; if the first new version container fails to run, record the old version container, and control the standby container cluster to replace the old version container cluster to run; A second control module, the second control module is used to regenerate a corresponding second new version container according to the first new version container that failed to run and replace the first new version container with the second new version container to obtain a second new version container cluster, and then control the second new version container cluster to replace the standby container cluster to run.

3. The power monitoring system container upgrade rollback error prevention device according to claim 2, characterized in that: The creation module includes: An acquisition unit, the acquisition unit is used to acquire version information and configuration files of each of the old version containers; A generating unit, the generating unit is used to generate a plurality of spare old version containers corresponding one-to-one to the old version containers according to the version information and the configuration file to obtain a spare container cluster corresponding to the old version container cluster.

4. The power monitoring system container upgrade rollback error prevention device according to claim 2, characterized in that: The device also includes: A first processing module, the first processing module is used to determine an old version container manager for managing the old version container according to the old version container cluster; The second processing module is used to construct a new version container manager and run the old version container manager and the new version container manager at the same time.

5. The power monitoring system container upgrade rollback error prevention device according to claim 4, characterized in that: The control module comprises: An execution unit, wherein the execution unit is used to remove the old version container from the old version container manager, and move the first new version container corresponding to the old version container to the new version container manager.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the power monitoring system container upgrade rollback error prevention method described in claim 1 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the power monitoring system container upgrade rollback error prevention method according to claim 1 are implemented.