Container resource adjustment method and device, equipment, medium and product

By monitoring status changes through container probes and dynamically adjusting container resource configuration, the problem of different resource requirements during the startup and operation stages of cloud platform application containers is solved, and efficient resource utilization and rapid startup are achieved.

CN120743526APending Publication Date: 2025-10-03INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510862356.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

The resource requirements of existing cloud platform application containers vary greatly between the startup and running stages, resulting in unreasonable resource allocation, waste of resources or long startup time.

Method used

Monitor container status changes through container probes, dynamically adjust container resource configuration, separate resource settings in the startup phase and the running phase, and ensure startup performance and resource utilization efficiency.

Benefits of technology

It reduces resource waste, improves container startup performance and stability, and increases application startup speed and resource utilization efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120743526A_ABST
    Figure CN120743526A_ABST
Patent Text Reader

Abstract

The invention discloses a container resource adjustment method and device, equipment, a medium and a product, relates to the technical field of computers and cloud computing, and can be applied to the field of financial science and technology. The method comprises the following steps: when a container set is started, obtaining starting resource configuration information of a target container; resource allocation is carried out on a target container based on the starting resource configuration information, so that the target container is started; determining whether the container state of the target container is changed or not through the container probe; if so, determining a target state of the target container; and according to target system resource information corresponding to the target state, performing configuration adjustment on resources of the target container. According to the technical scheme, the container resources can be dynamically optimized, and the container performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer and cloud computing technology and can be used in the field of financial technology. In particular, it relates to a container resource adjustment method, device, equipment, medium and product. Background Art

[0002] Currently, cloud platform application containers only support fixed resource configuration. However, a large number of cloud container applications have large differences in resource requirements between the startup phase and the running phase, resulting in the inability to reasonably configure container resources. For example, in scenarios such as Java application initialization, which consumes large CPU resources, and batch data processing task initialization, which is IO-intensive, configuring larger resources will lead to some resource waste in the subsequent running phase, while too small a configuration will cause the application startup time to be too long or even fail to start successfully.

[0003] Therefore, how to optimize application container resources to adapt to application containers with different resource requirements during the startup and post-startup phases is of great significance for saving container resources and accelerating container startup performance. Summary of the Invention

[0004] The present invention provides a container resource adjustment method, device, equipment, medium and product to dynamically adjust container resources and improve container performance.

[0005] According to one aspect of the present invention, a container resource adjustment method is provided, which is applied to a container scheduling controller in a container orchestration and scheduling platform, comprising:

[0006] When the container set is started, obtain the startup resource configuration information of the target container;

[0007] Allocating resources for the target container based on the startup resource configuration information, so as to start the target container;

[0008] Use the container probe to determine whether the container status of the target container has changed;

[0009] If a change occurs, determining a target state of the target container;

[0010] The resources of the target container are configured and adjusted according to the target system resource information corresponding to the target state.

[0011] According to another aspect of the present invention, a container resource adjustment device is provided, which is configured in a container scheduling controller in a container orchestration and scheduling platform, and includes:

[0012] The startup resource configuration information acquisition module is used to obtain the startup resource configuration information of the target container when the container set is started;

[0013] a startup resource configuration information allocation module, configured to allocate resources to a target container based on the startup resource configuration information, so as to enable the target container to start;

[0014] A status detection module is used to determine whether the container status of the target container has changed through a container probe;

[0015] a target state determination module, configured to determine the target state of the target container if a change occurs;

[0016] The container resource adjustment module is used to adjust the configuration of the resources of the target container according to the target system resource information corresponding to the target state.

[0017] According to another aspect of the present invention, an electronic device is provided, comprising:

[0018] at least one processor; and

[0019] a memory communicatively connected to the at least one processor; wherein,

[0020] The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the container resource adjustment method according to any embodiment of the present invention.

[0021] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the container resource adjustment method according to any embodiment of the present invention when executed.

[0022] According to another aspect of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the container resource adjustment method according to any embodiment of the present invention is implemented.

[0023] The technical solution of an embodiment of the present invention obtains the startup resource configuration information of the target container when the container set is started; allocates resources to the target container based on the startup resource configuration information to start the target container; determines whether the container state of the target container has changed through a container probe; if so, determines the target state of the target container; and adjusts the resource configuration of the target container based on the target system resource information corresponding to the target state. The above technical solution reduces resource waste by separating resource settings in the startup phase and the post-startup phase. It eliminates the need to configure excessive operating resources to ensure performance in the startup phase, thereby reducing resource waste caused by redundant configuration resources.

[0024] 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

[0025] 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.

[0026] Figure 1 is a flow chart of a container resource adjustment method provided according to an embodiment of the present invention;

[0027] Figure 2 is a flow chart of a container resource adjustment method provided according to an embodiment of the present invention;

[0028] Figure 3 2 is a schematic structural diagram of a container resource adjustment device provided according to an embodiment of the present invention;

[0029] Figure 4 It is a structural diagram of an electronic device for implementing the container resource adjustment method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] 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.

[0031] It should be noted that the terms "first", "second", etc. in the description 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 sequence. It should be understood that the numbers used in this way can be interchanged 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 device that includes 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 devices.

[0032] In addition, it should be noted that in the technical solution of the present invention, the information collected is information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data comply with the relevant laws, regulations and standards of relevant countries and regions, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0033] Figure 1 This is a flowchart of a container resource adjustment method provided according to an embodiment of the present invention. This embodiment is applicable to dynamically allocating resources for cloud applications with significantly different resource requirements during startup and operation, such as startup-intensive applications or applications with high startup speed requirements. Typical scenarios are as follows:

[0034] For example, during application initialization, an application might require significantly more CPU resources than it needs during normal process operation. Specifying CPU requests and limits appropriate for normal operation for such an application can result in long startup times. Such a collection of containers, such as a Pod, can request a higher CPU value when creating the Pod. After the application completes initialization, the resource allocation can be reduced to maintain normal operation.

[0035] For example, in batch scenarios, the CPU usage of some batch task executors increases during the preparation phase. This is because the initialization content, such as building the Spring context, creating resources, and initializing batch data, leads to high CPU usage.

[0036] For example, some large model services require a large amount of memory during the model loading phase and a large amount of memory during the startup phase, but relatively less memory is required during formal operation.

[0037] The method can be performed by a container resource adjustment device, which can be implemented in the form of hardware and / or software. The container resource adjustment device can be configured in an electronic device that carries the container resource adjustment function, such as a container scheduling controller in a container orchestration and scheduling platform. Among them, the container scheduling controller is a key component in the container orchestration and scheduling platform, responsible for monitoring and maintaining the status of resource objects in the cluster to ensure that they always conform to the desired declarative configuration. The controller observes the state changes of resource objects and takes necessary actions to adjust these objects to achieve the desired state defined by the user.

[0038] like Figure 1 As shown, the method includes:

[0039] S110: When the container set is started, the startup resource configuration information of the target container is obtained.

[0040] The target container refers to the container in the container set that requires resource adjustment; there can be one or more target containers. It should be noted that a container set is the minimum scheduling unit of the container orchestration and scheduling platform; a container set contains multiple containers; and a container contains an application. The startup resource configuration information refers to the system resources required to start the container set; system resources include memory resources and CPU resources. It should be noted that the startup resource configuration information can be flexibly configured by the container manager.

[0041] Specifically, when the container set is started, the startup resource configuration information of the target container is obtained from the locally stored configuration file.

[0042] S120: Allocate resources for the target container based on the startup resource configuration information, so as to start the target container.

[0043] Specifically, corresponding system resources are allocated to the target container based on the startup resource configuration information; accordingly, the target container receives the startup resources and starts the target container, which ensures that the container can be started smoothly.

[0044] S130: Determine, through a container probe, whether the container status of the target container has changed.

[0045] Container probes monitor container startup completion and health. Optionally, they include startup and readiness probes. Container probes are preconfigured for a collection of containers. Container probes can be configured by modifying the configuration file through configuration items.

[0046] The so-called container state refers to the state of the container during the startup process, including inactive state and active state. Among them, the inactive state refers to the state of the container during the startup phase; the active state refers to the state of the container after startup.

[0047] An optional method is to detect the target container through a container probe based on interface access, port check, or command execution check to determine whether the container status of the target container has changed.

[0048] Specifically, the container probe can perform container health detection through any of the following methods: interface access, port check, and command execution check, by configuring timing parameters, and obtain a status signal to determine whether the container status of the target container has changed.

[0049] It is understandable that by configuring an appropriate container probe, it is possible to determine when the target container is successfully started, thereby facilitating adjustment of resources after the target container is started.

[0050] S140: If a change occurs, determine the target state of the target container.

[0051] The target state refers to the state of the target container after it is started, that is, the active state.

[0052] Specifically, if it is determined based on the probe that the container state of the target container changes, the target state of the target container is determined to be an active state.

[0053] S150: Adjust the configuration of the target container's resources according to the target system resource information corresponding to the target state.

[0054] The target system resource information refers to the system resource configuration information required after the target container is started; optionally, the target system resource information is smaller than the startup resource configuration information.

[0055] In one optional approach, if the target state is active and the target container has been configured with startup resource configuration information, the target container's resources are configured and adjusted based on the target system resource information. Specifically, if the target state is active and it is determined that the target container has been configured with startup resource configuration information, i.e., the target container has completed startup, the target container's resources are configured and adjusted based on the target system resource information.

[0056] The technical solution of the present invention allows users to adjust the size of the CPU and memory resources allocated to the Pod without restarting the container, and dynamically adjusts the CPU and memory resources of the container based on the user-defined startup phase and post-startup phase configuration during the startup process, achieving the effect of fine-tuning the container resources during the application startup process, so that the application Pod container can request higher computing resources when creating the Pod, and after the application is initialized, it can still run normally by reducing the resource configuration. Improve startup performance and predictability, achieve faster horizontal expansion operations, and by configuring higher startup phase CPU and memory resources, you can greatly improve the application startup speed, ensure the stability of application startup, and speed up the horizontal expansion of containers.

[0057] The technical solution of an embodiment of the present invention obtains the startup resource configuration information of the target container when the container set is started; allocates resources to the target container based on the startup resource configuration information to start the target container; determines whether the container state of the target container has changed through a container probe; if so, determines the target state of the target container; and adjusts the resource configuration of the target container based on the target system resource information corresponding to the target state. The above technical solution reduces resource waste by separating resource settings in the startup phase and the post-startup phase. It eliminates the need to configure excessive operating resources to ensure performance in the startup phase, thereby reducing resource waste caused by redundant configuration resources.

[0058] Figure 2 This is a flow chart of a container resource adjustment method provided according to an embodiment of the present invention; based on the above embodiment, this embodiment further elaborates on the determination of the target container and the configuration of container resources. Figure 2 As shown, the method includes:

[0059] S210: Determine a target container from the container set according to the container identifier.

[0060] The target container is the container whose resources need to be dynamically adjusted. The container identifier is used to identify the container whose resources need to be adjusted.

[0061] Specifically, the target container may be determined from the container set based on the container identifier.

[0062] S220: Configure target system resource information of different container states for the target container.

[0063] The target system resource information includes memory resources and CPU resources; the container status includes inactive state and active state.

[0064] An optional method is to provide an interactive interface, and obtain the resource configuration interface of the target container in response to the user's search based on the container name on the interactive interface; in the resource configuration interface, in response to the user's selection operation on the container status, the system resource configuration items are displayed, and the user can fill in the corresponding values ​​in the corresponding configuration items to implement the configuration of the target system resource information, so as to obtain the target system resource information of the target container in different container states.

[0065] Another optional method is to allow the user to configure resources for different container states of the target container in the form of a configuration file to obtain target system resource information corresponding to different container states.

[0066] S230: When the container set is started, the startup resource configuration information of the target container is obtained.

[0067] S240: Allocate resources for the target container based on the startup resource configuration information, so as to start the target container.

[0068] S250: Determine, through a container probe, whether the container state of the target container has changed.

[0069] S260: If a change occurs, determine the target state of the target container.

[0070] S270: Adjust the configuration of the target container's resources according to the target system resource information corresponding to the target state.

[0071] The technical solution provided by the embodiment of the present invention determines the target container from the container set based on the container identifier; configures the target system resource information of different container states for the target container; obtains the startup resource configuration information of the target container when the container set is started; allocates resources to the target container based on the startup resource configuration information to start the target container; determines whether the container state of the target container has changed through the container probe; if it has changed, determines the target state of the target container; and configures and adjusts the resources of the target container based on the target system resource information corresponding to the target state. Through the above technical solution, the target container can be quickly located through the container identifier, and the user can configure the system resources of the target container in different states, which can ensure the rational use of resources and avoid resource waste.

[0072] It should be noted that existing technologies require a trade-off between achieving consistent startup time and minimizing post-startup resource waste, making it difficult to simultaneously ensure both startup performance and resource efficiency. Furthermore, manual scaling of containers is possible, but this is labor-intensive and incapable of achieving precise container resource scaling. The technical solution of the present invention significantly improves the performance and startup speed of the container startup phase, ensures container startup stability, and enhances the computing resource efficiency of application containers.

[0073] Figure 3 This is a structural diagram of a container resource adjustment device provided according to an embodiment of the present invention. This embodiment can be applied to how to dynamically allocate resources for cloud applications with large differences in resource requirements during the startup and running phases, such as startup-intensive applications, applications with high startup speed requirements, and other cloud applications. The container resource adjustment device can be implemented in the form of hardware and / or software, and the container resource adjustment device can be configured in an electronic device that carries the container resource adjustment function, such as a container scheduling controller in a container orchestration and scheduling platform. Figure 3 As shown, the device includes:

[0074] The startup resource configuration information acquisition module 310 is used to obtain the startup resource configuration information of the target container when the container set is started;

[0075] A startup resource configuration information allocation module 320 is configured to allocate resources to a target container based on the startup resource configuration information so as to start the target container;

[0076] A status detection module 330 is used to determine whether the container status of the target container has changed through a container probe;

[0077] a target state determination module 340 for determining the target state of the target container if a change occurs;

[0078] The container resource adjustment module 350 is configured to adjust the resource configuration of the target container according to the target system resource information corresponding to the target state.

[0079] The technical solution of an embodiment of the present invention obtains the startup resource configuration information of the target container when the container set is started; allocates resources to the target container based on the startup resource configuration information to start the target container; determines whether the container state of the target container has changed through a container probe; if so, determines the target state of the target container; and adjusts the resource configuration of the target container based on the target system resource information corresponding to the target state. The above technical solution reduces resource waste by separating resource settings in the startup phase and the post-startup phase. It eliminates the need to configure excessive operating resources to ensure performance in the startup phase, thereby reducing resource waste caused by redundant configuration resources.

[0080] Optionally, the device further includes a container identification module, configured to:

[0081] When the container set is started, before obtaining the startup resource configuration information of the target container, the target container is determined from the container set according to the container identifier; wherein the target container is the container that requires dynamic resource adjustment.

[0082] Optionally, the device further includes a resource configuration module, configured to:

[0083] When the container set is started, before obtaining the startup resource configuration information of the target container, target system resource information of different container states is configured for the target container; the target system resource information includes memory resources and CPU resources; the container state includes inactive state and active state.

[0084] Optionally, the status detection module 330 is configured to:

[0085] The container probe detects the target container based on interface access, port inspection, or command execution inspection to determine whether the container status of the target container has changed.

[0086] Optionally, the container resource adjustment module 350 is configured to:

[0087] If the target state is active and the target container has been configured with startup resource configuration information, the resources of the target container are configured and adjusted according to the target system resource information.

[0088] Optionally, the target system resource information is smaller than the startup resource configuration information.

[0089] The container resource adjustment device provided in the embodiment of the present invention can execute the container resource adjustment method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0090] According to an embodiment of the present invention, the present invention further provides an electronic device, a readable storage medium, and a computer program product.

[0091] Figure 4 It is a structural diagram of an electronic device for implementing the container resource adjustment method according to an embodiment of the present invention. Figure 4 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic 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 electronic device can also represent various forms of mobile devices, such as personal digital processing, 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.

[0092] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0093] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0094] Processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of processor 11 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 11 executes the various methods and processes described above, such as the container resource adjustment method.

[0095] In some embodiments, the container resource adjustment method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the container resource adjustment method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the container resource adjustment method in any other appropriate manner (e.g., via firmware).

[0096] Various embodiments of the systems and techniques described herein 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), 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.

[0097] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0098] 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.

[0099] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: 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 electronic device. Other types of devices can also be used to provide interaction with the user; 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).

[0100] 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.

[0101] A computing system may include clients and servers. The clients and servers are typically 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 the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0102] 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.

[0103] 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 resource adjustment method, characterized in that: The container scheduling controller used in the container orchestration and scheduling platform includes: When the container set is started, obtain the startup resource configuration information of the target container; Allocating resources for the target container based on the startup resource configuration information, so as to start the target container; Use the container probe to determine whether the container status of the target container has changed; If a change occurs, determining a target state of the target container; The resources of the target container are configured and adjusted according to the target system resource information corresponding to the target state.

2. The method according to claim 1, characterized in that When the container set is started, before obtaining the startup resource configuration information of the target container, it also includes: According to the container identifier, a target container is determined from the container set; wherein the target container is a container that requires dynamic resource adjustment.

3. The method according to claim 1, characterized in that When the container set is started, before obtaining the startup resource configuration information of the target container, it also includes: Target system resource information of different container states is configured for the target container; the target system resource information includes memory resources and CPU resources; and the container states include an inactive state and an active state.

4. The method according to claim 1, wherein Use container probes to determine whether the target container's status has changed, including: The container probe detects the target container based on interface access, port inspection, or command execution inspection to determine whether the container status of the target container has changed.

5. The method according to claim 1, wherein Adjusting the configuration of the target container's resources according to the target system resource information corresponding to the target state includes: If the target state is active and the target container has been configured with startup resource configuration information, the resources of the target container are configured and adjusted according to the target system resource information.

6. The method according to any one of claims 1 to 5, characterized in that The target system resource information is smaller than the startup resource configuration information.

7. A container resource adjustment device, characterized in that: The container scheduling controller configured in the container orchestration and scheduling platform includes: The startup resource configuration information acquisition module is used to obtain the startup resource configuration information of the target container when the container set is started; a startup resource configuration information allocation module, configured to allocate resources to a target container based on the startup resource configuration information, so as to enable the target container to start; A status detection module is used to determine whether the container status of the target container has changed through a container probe; a target state determination module, configured to determine the target state of the target container if a change occurs; The container resource adjustment module is used to adjust the configuration of the resources of the target container according to the target system resource information corresponding to the target state.

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 to enable the at least one processor to execute the container resource adjustment 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 resource adjustment method according to any one of claims 1 to 6 when executed.

10. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the container resource adjustment method according to any one of claims 1 to 6.