Container cluster inspection method, device, equipment, medium and program product
By obtaining the operating data within the container cluster, identifying abnormal containers and their types and severity, and automatically handling container cluster anomalies, the problems of low efficiency and low resource utilization in traditional solutions are solved, and efficient container cluster inspection is achieved.
Patent Information
- Application Number
- CN202510858351.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-09-16
AI Technical Summary
Traditional container cluster inspection solutions are inefficient, have low resource utilization, and are unable to efficiently handle abnormal containers.
By obtaining the operating data of each container in the container cluster, the abnormal container and its type and severity are determined, and automatic processing is carried out based on the severity of the overall abnormality of the cluster, including self-repair or prompting technicians.
It improves the efficiency and resource utilization of container cluster inspections, realizes the automated processing of abnormal container clusters, and saves inspection resources.
Smart Images

Figure CN120658644A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of anomaly detection technology and can be applied to the field of financial technology. In particular, it relates to a container cluster inspection method, device, equipment, medium and program product. Background Art
[0002] With the widespread use of container clusters, the need to inspect the health status of container clusters is becoming increasingly urgent.
[0003] Traditional solutions focus on monitoring and alerting each container in the container cluster separately, prompting technicians to handle abnormal containers. This is inefficient and has low resource utilization. Summary of the Invention
[0004] The present invention provides a container cluster inspection method, device, equipment, medium and program product to improve the inspection efficiency of the container cluster and the utilization rate of inspection resources.
[0005] In a first aspect, an embodiment of the present invention provides a container cluster inspection method, including:
[0006] For each container in the container cluster, obtain the running data of the container within the set time period;
[0007] According to the operation data of each container at each moment within a set time period, the abnormal container is determined from each container, as well as the abnormal type and severity of the abnormal container;
[0008] Determine the severity of the abnormality of the container cluster based on the abnormality type and severity of each abnormal container;
[0009] Handle the container cluster based on the severity of the abnormality.
[0010] In a second aspect, an embodiment of the present invention further provides a container cluster inspection device, including:
[0011] The data acquisition module is used to obtain the running data of each container in the container cluster within a set period of time;
[0012] A container determination module is used to determine an abnormal container from each container, as well as the abnormality type and severity of the abnormal container based on the operating data of each container at each moment within a set time period;
[0013] A severity determination module is used to determine the severity of the abnormality of the container cluster based on the abnormality type and severity of each abnormal container;
[0014] The processing module is used to handle the container cluster according to the severity of the abnormality of the container cluster.
[0015] In a third aspect, an embodiment of the present invention further provides an electronic device, including:
[0016] at least one processor; and
[0017] a memory communicatively coupled to at least one processor; wherein
[0018] The memory stores instructions that can be executed by at least one processor. The instructions are executed by the at least one processor so that the at least one processor can execute the container cluster inspection method provided by any embodiment of the present invention.
[0019] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium storing computer instructions, which are used to enable a processor to implement the container cluster inspection method of any embodiment of the present invention when executed.
[0020] In a fifth aspect, an embodiment of the present invention further provides a computer program product, characterized in that the computer program product includes a computer program, and when the computer program is executed by a processor, it implements the container cluster inspection method of any embodiment of the present invention.
[0021] The technical solution of the embodiment of the present invention can determine the abnormal container in the container cluster, and determine the severity of the abnormality of the container cluster as a whole according to the abnormality type and severity of the abnormal container, so as to automatically execute the processing of the container cluster according to the severity of the abnormality of the container cluster as a whole, thereby realizing the automated processing of the abnormal container cluster; and processing the container cluster according to the severity of the abnormality of the container cluster as a whole, compared with the technical solution in the prior art of processing any alarm container separately, it effectively saves inspection resources and improves the utilization rate of inspection resources.
[0022] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 This is a flowchart of a container cluster inspection method provided according to the first embodiment of the present invention;
[0025] Figure 2This is a flowchart of a container cluster inspection method provided according to the second embodiment of the present invention;
[0026] Figure 3 This is a schematic diagram of the structure of a container cluster inspection device provided according to the third embodiment of the present invention;
[0027] Figure 4 This is a structural diagram of an electronic device that implements a container cluster inspection method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first" and "second" and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the numbers used in this way are interchangeable where appropriate so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or apparatus.
[0030] In the technical solution of the embodiment of the present invention, the acquisition, storage and application of the prompt word element text and the financial text to be processed are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0031] Example 1
[0032] Figure 1 This is a flowchart of a container cluster inspection method provided in Example 1 of the present invention. This embodiment is applicable to situations where container clusters are inspected. The method can be performed by a container cluster inspection device, which can be implemented in the form of hardware and / or software and specifically configured in an electronic device.
[0033] See also Figure 1 The container cluster inspection method shown includes:
[0034] S101: For each container in the container cluster, obtain the running data of the container within a set time period.
[0035] In this embodiment, the container cluster may include at least one container. A container can be a software encapsulation unit that contains an application and the code, dependent libraries, and configuration files required for running the application.
[0036] It should be noted that the set duration can be independently set by technical personnel based on actual needs or practical experience, and the present invention does not limit this.
[0037] S102: Determine an abnormal container from among the containers based on the operation data of each container at each moment within a set time period, and determine the abnormal type and severity of the abnormal container.
[0038] In this embodiment, an abnormal container may refer to a container experiencing an abnormal operating status. The abnormality type may be the type of abnormal operating status of the abnormal container; abnormality types may include, but are not limited to, performance abnormality types and operational abnormality types. The severity of the abnormal container's abnormality may be used to indicate the extent to which the abnormality affects the normal operation of the abnormal container.
[0039] Specifically, a certain algorithm is used to determine abnormal containers, the abnormality type, and the severity of the abnormality of the abnormal container from among the containers based on the operating data of each container at each moment within a set time period.
[0040] S103: Determine the severity of the abnormality of the container cluster according to the abnormality type and severity of each abnormal container.
[0041] In this embodiment, the severity of the abnormality of the container cluster can be used to represent the degree of impact of the abnormal container in the container cluster on the normal operation of the container cluster.
[0042] Specifically, a certain algorithm may be used to determine the severity of the abnormality of the container cluster according to the abnormality type and severity of each abnormal container.
[0043] Optionally, the severity of the abnormality of the container cluster is determined based on the abnormality type and abnormality severity of each abnormal container, including: for each abnormal container, querying the abnormality weight of the abnormal container based on the abnormality type of the abnormal container; and determining the severity of the abnormality of the container cluster based on the abnormality weight and abnormality severity of each abnormal container.
[0044] The anomaly weight represents the degree to which an abnormal container's anomaly affects the normal operation of the container cluster. Specifically, for each abnormal container, the system queries the default configuration relationship between the container anomaly type and the anomaly weight for that container to determine its corresponding anomaly weight. The system then calculates a weighted combination of each abnormal container's anomaly weight and anomaly severity, which is then used as the anomaly severity for the container cluster.
[0045] It can be understood that by adopting the above technical solution, the abnormality severity of the container cluster as a whole can be determined based on the abnormality weight and abnormality severity of each abnormal container. The overall health status of the container cluster can be represented by the determined abnormality severity of the container cluster, so that the container cluster can be processed according to the abnormality severity of the container cluster as a whole.
[0046] S104: Process the container cluster according to the severity of the abnormality of the container cluster.
[0047] Specifically, a certain algorithm is used to process the container cluster according to the severity of the abnormality of the container cluster.
[0048] Optionally, the container cluster is processed according to the severity of the abnormality of the container cluster, including: if the severity of the abnormality is greater than or equal to a first degree threshold, for each abnormal container in the container cluster, the abnormal container is repaired according to the abnormality type of the abnormal container; if the severity of the abnormality is less than the first degree threshold and greater than or equal to a second degree threshold, a repair prompt message is sent to the technician to prompt the technician to repair the abnormal container in the container cluster; wherein the repair prompt message includes repair measure information; and the first degree threshold is greater than the second degree threshold.
[0049] Specifically, if the severity of the abnormality of the container cluster is greater than or equal to the first severity threshold, for each abnormal container in the container cluster, a repair operation matching the abnormality type of the abnormal container is queried, and the queried repair operation is automatically executed; exemplarily, if the abnormality type of the abnormal container is an operation abnormality type, the encapsulation unit to which the abnormal container belongs can be restarted, the abnormal container can be migrated to a standby node, and the encapsulation unit of the abnormal container can be rebuilt on the standby node.
[0050] In an optional embodiment, if the severity of the abnormality of the container cluster is less than the second severity threshold, the operating data of the abnormal container may be recorded without performing a repair action on the container cluster.
[0051] It should be noted that the first degree threshold and the second degree threshold can be independently set by technical personnel according to actual needs or practical experience, as long as the first program threshold is greater than the second degree threshold. The present invention does not limit this.
[0052] It can be understood that by adopting the above technical solution, the container cluster can be flexibly processed according to the severity of the abnormality of the container cluster, the first degree threshold and the second degree threshold. When the severity of the abnormality is high and affects the normal operation of the container cluster, self-repair can be automatically performed. When the severity of the abnormality is low, the technical staff is prompted to handle it or not. When the abnormality that has occurred in the container cluster does not have a significant impact on the normal operation of the container cluster, inspection resources can be saved.
[0053] The technical solution of the embodiment of the present invention can determine the abnormal container in the container cluster, and determine the severity of the abnormality of the container cluster as a whole according to the abnormality type and severity of the abnormal container, so as to automatically execute the processing of the container cluster according to the severity of the abnormality of the container cluster as a whole, thereby realizing the automated processing of the abnormal container cluster; and processing the container cluster according to the severity of the abnormality of the container cluster as a whole, compared with the technical solution in the prior art of processing any alarm container separately, it effectively saves inspection resources and improves the utilization rate of inspection resources.
[0054] Example 2
[0055] Figure 2 This is a flowchart of a container cluster inspection method provided in Example 2 of the present invention. Based on the technical solutions of the above embodiments, this embodiment of the present invention optimizes and improves the abnormal containers and the operation of determining the abnormal type and severity of the abnormal containers.
[0056] Furthermore, "determine the abnormal container, as well as the abnormality type and severity of the abnormal container, from each container based on the operating data of each container at each moment within the set time" is refined into "for each container, determine the first moment within the set time when the central processing unit usage of the container is greater than the set usage rate threshold; compare the set number threshold with the number of restarts of the container within the set time to obtain the number comparison result of the container; determine the abnormal container, as well as the abnormality type and severity of the abnormal container from each container based on the central processing unit usage at the first moment, the number comparison result and the real-time operating status of each container" to improve the operation of determining the abnormal container, as well as the abnormality type and severity of the abnormal container.
[0057] It should be noted that for the parts not described in detail in the embodiments of the present invention, reference can be made to the description of the aforementioned embodiments.
[0058] See also Figure 2 The container cluster inspection method shown includes:
[0059] S201. For each container in the container cluster, obtain the operating data of the container within a set time period; the operating data includes the CPU usage rate, the number of restarts, and the real-time operating status at each moment.
[0060] In this embodiment, the central processing unit utilization rate refers to the CPU (Central Processing Unit) utilization rate. The number of restarts can be the number of times the container restarts within a set duration. The real-time operating status can be the operating status of the container obtained at the end of the set duration. The operating status can include, but is not limited to, normal operating status and crash loop status.
[0061] S202: For each container, determine the first moment within a set period of time when the CPU usage of the container is greater than a set usage threshold.
[0062] Specifically, for each moment within a set time period, if the container's CPU usage is greater than a set usage threshold at that moment, then that moment is determined as the first moment. It should be noted that the usage threshold can be set independently by technicians based on actual needs or practical experience, and is not limited in the present invention. For example, it can be set to 90%.
[0063] S203: Compare the set number threshold with the number of restarts of the container within the set time period to obtain a number comparison result of the container.
[0064] It should be noted that the threshold number of times can be set independently by technical personnel according to actual needs or practical experience, and the present invention does not limit this. For example, it can be set to 3.
[0065] S204: Determine an abnormal container from each container, as well as the abnormality type and severity of the abnormal container, based on the CPU usage rate, the number comparison result, and the real-time operation status of each container at the first moment.
[0066] Specifically, a certain algorithm is used to determine the abnormal container, the abnormal type and the abnormal severity of the abnormal container from each container according to the CPU usage rate of each container at the first moment, the number comparison result and the real-time operation status.
[0067] Optionally, based on the CPU usage rate, number comparison result and real-time running status of each container at the first moment, an abnormal container, as well as the abnormality type and abnormality severity of the abnormal container are determined from each container, including: for each container, determining the maximum continuous number of the container at the first moment; if the maximum continuous number of the container is greater than the maximum continuous threshold, determining that the container is an abnormal container, and determining that the abnormality type of the container is a performance abnormality type; determining the abnormality severity of the container based on the CPU usage rate of the container at each first moment; for each container, if the number comparison result of the container is that the number of restarts is greater than the set number threshold, and the real-time running status of the container is a crash cycle state, determining that the container is an abnormal container, and determining that the abnormality type of the container is an operation abnormality type; determining the abnormality severity of the container based on the number of restarts of the container.
[0068] The maximum number of consecutive moments may be the maximum number of consecutive first moments. For example, if within the set duration, there are first moment 1, first moment 2, first moment 3, first moment 4, first moment 5, and first moment 6; among which first moment 1 and first moment 2 are discontinuous; first moment 2, first moment 3, and first moment 4 are continuous; first moment 4 and first moment 5 are discontinuous; and first moment 5 and first moment 6 are continuous, then the maximum number of consecutive moments is 3.
[0069] Specifically, for each container, the maximum consecutive count of the container at the first moment is determined; if the maximum consecutive count of the container is greater than the maximum consecutive threshold, the container is determined to be an abnormal container, and the abnormality type of the container is determined to be a performance abnormality type; a specific algorithm is used to determine the severity of the abnormality of the container based on the central processing unit usage rate of the container at each first moment; for each container, if the comparison result of the number of times the container is restarted is greater than the set number threshold, and the real-time operating state of the container is a crash loop state, the container is determined to be an abnormal container, and the abnormality type of the container is determined to be an operational abnormality type; based on the number of restarts of the container, the severity of the abnormality of the container is queried. It should be noted that the maximum consecutive threshold can be independently set by technical personnel based on actual needs or practical experience, and the present invention does not limit this.
[0070] It can be understood that by adopting the above technical solution, the abnormal container with the performance abnormality type can be determined based on the maximum continuous number at the first moment, and the abnormality severity can be determined based on the central processing unit usage rate; the abnormal container with the operation abnormality type can be determined based on the number comparison result and the real-time operation status, and the abnormality severity can be determined based on the number of restarts. It is possible to determine the abnormal containers with the performance abnormality type and the operation abnormality type from each container in the container cluster, and determine the abnormality severity in a targeted manner, thereby improving the accuracy of the abnormality type and abnormality severity of the abnormal container.
[0071] Optionally, the severity of the abnormality of the container is determined based on the central processing unit usage rate of the container at each first moment, including: determining the performance abnormality level at each first moment; determining the attenuation abnormality level at the first moment based on the end moment of the set duration, the first moment and the performance abnormality level at the first moment; and determining the severity of the abnormality of the container based on the attenuation abnormality level at each first moment.
[0072] The attenuation abnormality degree may refer to the degree of performance abnormality that decays over time. Specifically, for each first moment, the performance abnormality degree corresponding to the first moment is queried; the interval between the first moment and the end of the set duration is determined; the attenuation abnormality degree of the first moment is determined based on the interval duration and the performance abnormality degree of the first moment; the attenuation abnormality degrees of each first moment are averaged to obtain the severity of the abnormality of the container; illustratively, the attenuation abnormality degree can be determined using the following formula:
[0073] S(t)=S0×e -λt ;
[0074] Where S(t) represents the degree of attenuation abnormality; S0 represents the degree of performance abnormality; λ represents the attenuation factor; and t represents the interval duration.
[0075] It is understandable that by adopting the above technical solution, the performance abnormality level at the first moment can be attenuated according to the interval between the first moment and the end time of the set duration, thereby avoiding abnormal events that occurred earlier and affecting the determination of the real-time abnormality severity of the container, thereby improving the accuracy of the abnormality severity of the container.
[0076] S205: Determine the severity of the abnormality of the container cluster according to the abnormality type and severity of each abnormal container.
[0077] S206: Process the container cluster according to the severity of the abnormality of the container cluster.
[0078] The embodiment of the present invention determines, for each container, the first moment at which the central processing unit (CPU) usage of the container exceeds a set usage threshold within a set duration; compares a set number threshold with the number of restarts of the container within the set duration to obtain a number comparison result for the container; and determines, from each container, an abnormal container, as well as the abnormality type and severity of the abnormal container based on the CPU usage at the first moment, the number comparison result, and the real-time operating status of each container, thereby improving the accuracy of determining the abnormality type and severity.
[0079] Example 3
[0080] Figure 3This is a schematic diagram of the structure of a container cluster inspection device provided in Example 3 of the present invention. This embodiment of the present invention is applicable to inspecting container clusters. The device can execute a container cluster inspection method. The container cluster inspection device can be implemented in hardware and / or software and can be configured in an electronic device.
[0081] See also Figure 3 The container cluster inspection device shown includes a data acquisition module 301, a container determination module 302, a degree determination module 303 and a processing module 304, wherein:
[0082] The data acquisition module 301 is used to obtain the running data of each container in the container cluster within a set period of time;
[0083] The container determination module 302 is configured to determine an abnormal container, an abnormality type, and an abnormality severity of the abnormal container from among the containers based on the operating data of the containers at each moment within a set time period;
[0084] The severity determination module 303 is used to determine the severity of the abnormality of the container cluster based on the abnormality type and severity of each abnormal container;
[0085] The processing module 304 is configured to process the container cluster according to the severity of the abnormality of the container cluster.
[0086] The technical solution of the embodiment of the present invention can determine the abnormal container in the container cluster, and determine the severity of the abnormality of the container cluster as a whole according to the abnormality type and severity of the abnormal container, so as to automatically execute the processing of the container cluster according to the severity of the abnormality of the container cluster as a whole, thereby realizing the automated processing of the abnormal container cluster; and processing the container cluster according to the severity of the abnormality of the container cluster as a whole, compared with the technical solution in the prior art of processing any alarm container separately, it effectively saves inspection resources and improves the utilization rate of inspection resources.
[0087] Optionally, the operation data includes CPU usage, restart times, and real-time operation status at each moment;
[0088] Container determination module, including:
[0089] A first moment determination unit is configured to determine, for each container, a first moment at which the CPU usage of the container exceeds a set usage threshold within a set period of time;
[0090] a comparison unit, configured to compare a set number threshold with the number of restarts of the container within a set time period to obtain a number comparison result of the container;
[0091] The container determination unit is configured to determine an abnormal container, an abnormality type, and an abnormality severity of the abnormal container from among the containers based on the CPU usage rate, the number comparison result, and the real-time operation status of each container at a first moment.
[0092] Optionally, the container determination unit includes:
[0093] a quantity determination subunit, configured to determine, for each container, a maximum continuous quantity of the container at a first moment;
[0094] a first type determination unit, configured to determine that the container is an abnormal container and determine that the abnormality type of the container is a performance abnormality type if the maximum consecutive number of the container is greater than a maximum consecutive threshold;
[0095] a first severity determination unit, configured to determine the severity of the abnormality of the container based on the CPU usage of the container at each first moment;
[0096] A second type determination unit is configured to, for each container, determine that if the number of restarts of the container is greater than a set number threshold and the real-time running state of the container is a crash loop state, determine that the container is an abnormal container and determine that the abnormality type of the container is an operational abnormality type;
[0097] The second severity determination unit is configured to determine a severity of the abnormality of the container according to the number of restarts of the container.
[0098] Optionally, the first degree determination unit is specifically configured to:
[0099] For each first moment, determining a degree of performance abnormality at the first moment;
[0100] determining the degree of attenuation abnormality at the first moment according to the end time of the set duration, the first moment, and the degree of performance abnormality at the first moment;
[0101] The severity of the abnormality of the container is determined according to the degree of attenuation abnormality at each first moment.
[0102] Optional, degree determination module, specifically for:
[0103] For each abnormal container, query the abnormal weight of the abnormal container according to the abnormal type of the abnormal container;
[0104] The severity of the abnormality of the container cluster is determined based on the abnormality weight and severity of each abnormal container.
[0105] Optional processing module, specifically used for:
[0106] If the severity of the abnormality is less than or equal to the first severity threshold, repair each abnormal container in the container cluster according to the abnormality type of the abnormal container;
[0107] If the severity of the abnormality is greater than the first threshold and less than the second threshold, a repair prompt message is sent to the technician to prompt the technician to repair the abnormal container in the container cluster; wherein the repair prompt message includes repair measure information; and the first threshold is less than the second threshold.
[0108] The container cluster inspection device provided in the embodiment of the present invention can execute the container cluster inspection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the container cluster inspection method.
[0109] Example 4
[0110] Figure 4 A schematic diagram of the structure of a container cluster inspection device 410 that can be used to implement an embodiment of the present invention is shown. The container cluster inspection device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The container cluster inspection device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.
[0111] like Figure 4 As shown, the container cluster inspection device 410 includes at least one processor 411 and a memory, such as a read-only memory (ROM) 412, a random access memory (RAM) 413, etc., which is communicatively connected to the at least one processor 411. The memory stores a computer program that can be executed by the at least one processor. The processor 411 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 412 or the computer program loaded from the storage unit 418 to the random access memory (RAM) 413. The RAM 413 can also store various programs and data required for the operation of the container cluster inspection device 410. The processor 411, ROM 412, and RAM 413 are connected to each other via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.
[0112] Multiple components in container cluster inspection device 410 are connected to I / O interface 415, including: input unit 416, such as a keyboard and mouse; output unit 417, such as various types of displays and speakers; storage unit 418, such as a magnetic disk and optical disk; and communication unit 419, such as a network card, modem, wireless communication transceiver, etc. Communication unit 419 allows container cluster inspection device 410 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0113] Processor 411 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processor, controller, microcontroller, etc. Processor 411 executes the various methods and processes described above, such as the container cluster inspection method.
[0114] In some embodiments, the container cluster inspection method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as storage unit 418. In some embodiments, part or all of the computer program can be loaded and / or installed on the container cluster inspection device 410 via ROM 412 and / or communication unit 419. When the computer program is loaded into RAM 413 and executed by processor 411, one or more steps of the container cluster inspection method described above can be performed. Alternatively, in other embodiments, processor 411 can be configured to execute the container cluster inspection method in any other appropriate manner (for example, by means of firmware).
[0115] Various embodiments of the systems and techniques described above can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0116] Computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable container cluster inspection device, so that when executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a standalone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0117] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0118] To provide user interaction, the systems and techniques described herein can be implemented on a container cluster inspection device. The container cluster inspection device includes: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball), through which the user can provide input to the container cluster inspection device. Other types of devices can also be used to provide user interaction; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0119] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0120] A computing system may include clients and servers. The clients and servers are generally remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within a cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS (Virtual Private Server) services.
[0121] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0122] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A container cluster inspection method, characterized in that: The method comprises: For each container in the container cluster, obtain the running data of the container within the set time period; determining an abnormal container from among the containers, and the abnormality type and severity of the abnormal container, based on the operating data of the containers at each moment within a set time period; Determining the severity of the abnormality of the container cluster according to the abnormality type and severity of each abnormal container; The container cluster is processed according to the severity of the abnormality of the container cluster.
2. The method according to claim 1, characterized in that The operation data includes the CPU usage rate, restart times and real-time operation status at each moment; The step of determining an abnormal container from each container, and the abnormality type and severity of the abnormal container based on the operation data of each container at each moment within a set time period, includes: For each container, determine the first moment within a set period of time when the CPU usage of the container exceeds a set usage threshold; Compare the set number of times threshold with the number of times the container is restarted within the set time period to obtain the number comparison result of the container; According to the CPU usage rate, the number comparison result and the real-time operation status of each container at the first moment, an abnormal container is determined from each container, as well as the abnormality type and the abnormality severity of the abnormal container.
3. The method according to claim 2, characterized in that Determining an abnormal container from each of the containers, as well as the abnormality type and severity of the abnormal container based on the CPU usage rate, the number comparison result, and the real-time operating status of each of the containers at the first moment, includes: For each container, determine the maximum consecutive number of the container at the first moment; If the maximum consecutive number of the container is greater than the maximum consecutive threshold, the container is determined to be an abnormal container, and the abnormality type of the container is determined to be a performance abnormality type; determining a severity of the abnormality of the container based on the CPU usage of the container at each of the first moments; For each container, if the comparison result of the number of restarts of the container is greater than the set number threshold, and the real-time running state of the container is a crash loop state, then the container is determined to be an abnormal container, and the abnormality type of the container is determined to be an operational abnormality type; Determine the severity of the container exception based on the number of times the container has been restarted.
4. The method according to claim 3, characterized in that Determining the severity of the abnormality of the container based on the CPU usage of the container at each of the first moments includes: For each first moment, determining a degree of performance abnormality at the first moment; determining the degree of attenuation abnormality at the first moment according to the end time of the set duration, the first moment, and the degree of performance abnormality at the first moment; The severity of the abnormality of the container is determined according to the degree of attenuation abnormality at each of the first moments.
5. The method according to claim 1, wherein The determining the severity of the abnormality of the container cluster according to the abnormality type and severity of each abnormal container includes: For each abnormal container, query the abnormal weight of the abnormal container according to the abnormal type of the abnormal container; The severity of the abnormality of the container cluster is determined according to the abnormality weight and the severity of the abnormality of each abnormal container.
6. The method according to claim 1, wherein The processing of the container cluster according to the severity of the abnormality of the container cluster includes: If the severity of the abnormality is greater than or equal to a first severity threshold, repairing each abnormal container in the container cluster according to the abnormality type of the abnormal container; If the severity of the abnormality is less than a first threshold and greater than or equal to a second threshold, a repair prompt message is sent to a technician to prompt the technician to repair the abnormal container in the container cluster; wherein the repair prompt message includes repair measure information; and the first threshold is greater than the second threshold.
7. A container cluster inspection device, characterized in that: The device comprises: The data acquisition module is used to obtain the running data of each container in the container cluster within a set period of time; a container determination module, configured to determine an abnormal container, as well as an abnormality type and severity of the abnormal container, from among the containers based on the operating data of the containers at each moment within a set time period; a severity determination module, configured to determine the severity of the abnormality of the container cluster according to the abnormality type and severity of each abnormal container; The processing module is configured to process the container cluster according to the severity of the abnormality of the container cluster.
8. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor so that the at least one processor can execute the container cluster inspection method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the container cluster inspection method according to any one of claims 1 to 6 when executed.
10. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, the computer program implements the container cluster inspection method according to any one of claims 1 to 6.