Load scheduling method, system and equipment based on container technology and medium
Through the load scheduling method based on container technology, the window period of financial services is dynamically identified and adapted to the window period of financial services, and scheduled according to load data and resource configuration, the problem of difficult to identify the window period and lack of resource buffering in the prior art is solved, and the guarantee of business stability and continuity is achieved.
Patent Information
- Application Number
- CN202510284142.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-27
AI Technical Summary
The existing workload scheduling technology is difficult to dynamically identify and adapt to the window period of the core financial services, making it difficult to find a time window that does not affect business continuity and can implement changes smoothly. The scheduling algorithm takes resource utilization as its core goal, resulting in a lack of resource buffering in the financial core system and it is difficult to ensure business stability.
The load scheduling method based on container technology is adopted to obtain the load data applied at each preset time point, and the time window can be automatically adjusted when the preset change conditions are met. At the same time, evaluate whether the application resource configuration meets the load requirements, determine whether load scheduling is needed, and schedule according to the number of target instances and resource configuration.
It realizes the accurate determination of the appropriate time window to ensure business stability and continuity, avoids business interruptions or performance degradation caused by improper resource allocation, and improves the accuracy and effectiveness of scheduling decisions.
Smart Images

Figure CN120216180A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of load scheduling, and in particular, to a load scheduling method, system, device, and medium based on container technology. Background Art
[0002] In the financial industry, due to the extremely high requirements for sensitivity and accuracy, financial core services (such as transaction settlement, accounting processing, etc.) usually follow a strict maintenance window system. These windows are specifically set for necessary service operations (such as service termination, migration, or configuration changes) to ensure that these operations do not interfere with the continuity and stability of the business. If configuration changes are made outside the window period, it is very likely to disrupt the normal operation of the business, potentially leading to serious financial risks such as transaction failures and financial losses. Therefore, how to accurately determine the appropriate time window for application configuration changes is crucial for the smooth operation of financial services.
[0003] Although there are already various workload scheduling technologies in the market, their application in financial core services still faces many challenges. On the one hand, existing workload scheduling technologies mainly focus on the resource requirements of application services and cannot dynamically identify and adapt to the business window period, making it difficult to find a time window that neither affects business continuity nor disrupts the implementation of changes. On the other hand, existing scheduling algorithms take resource utilization as the core goal and tend to allocate node resources to a nearly fully loaded state to improve the overall resource utilization efficiency. This leaves the financial core system lacking the necessary resource buffer and makes it difficult to ensure business stability at critical moments.
[0004] Application Content
[0005] This application provides a load scheduling method, system, device, and medium based on container technology to ensure business continuity and stability.
[0006] In a first aspect, this application provides a load scheduling method based on container technology, including:
[0007] Obtain the load data of the application at each preset time point, and determine the first time window for possible changes based on the load data;
[0008] When the preset change conditions are met, perform window change based on the first time window to obtain a second time window:
[0009] Obtain the first application resource configuration and the initial scaling-down quantity corresponding to the second time window, and determine whether the second time window meets the load scheduling condition based on the first application resource configuration. If the load scheduling condition is met, perform load scheduling according to the target instance quantity and the first application resource configuration, where the target instance quantity is determined according to the first application resource configuration, the initial scaling-down quantity, and the preset minimum number of application replicas.
[0010] By collecting and analyzing the load data in different time periods, the embodiments of the present application can understand the running status and potential demand fluctuations of the application, and then accurately determine the first time window that can be changed. When the preset change condition is met, the time window is automatically adjusted to better cope with emergencies and maintain the stability of the service. After determining the appropriate time window, by evaluating whether the first application resource configuration meets the future load requirements, it is further determined whether load scheduling is required, ensuring the accuracy and effectiveness of the scheduling decision and avoiding service interruption or performance degradation caused by improper resource configuration. When it is determined that load scheduling is required, the system will perform scheduling operations according to the target instance quantity and the first application resource configuration. Compared with the prior art, the present application can ensure the continuity and stability of the service.
[0011] Further, the determining the first time window that can be changed based on the load data is specifically:
[0012] Determine a preset load threshold based on the load data;
[0013] If the load data is lower than the preset load threshold, determine the time series data corresponding to the load data, and determine the first time window that can be changed based on the time series data.
[0014] In this way, by collecting and analyzing the load data in different time periods, the running status and potential demand fluctuations of the application can be understood, and then the first time window that can be changed can be accurately determined.
[0015] Further, the obtaining the first application resource configuration corresponding to the second time window is specifically:
[0016] Obtain the recommended CPU resource configuration, and determine the CPU resource configuration corresponding to the second time window based on the recommended CPU resource configuration and the preset CPU resource buffer ratio;
[0017] Obtain the recommended memory resource configuration, and determine the memory resource configuration of the second time window based on the recommended memory resource configuration and the preset memory resource buffer ratio;
[0018] Based on the CPU resource configuration and the memory resource configuration, determine the first application resource configuration corresponding to the second time window.
[0019] In this way, by obtaining the first application resource configuration, it is convenient to subsequently determine whether load scheduling is required based on the first application resource configuration, thereby ensuring the accuracy and effectiveness of the scheduling decision.
[0020] Furthermore, the calculation formulas for the CPU resource configuration and the memory resource configuration are specifically as follows:
[0021] The CPU resource configuration = the recommended CPU resource configuration * (1 + the CPU resource buffer ratio);
[0022] The memory resource configuration = the recommended memory resource configuration * (1 + the memory resource buffer ratio).
[0023] Furthermore, the load scheduling method based on container technology further includes:
[0024] Obtain the second application resource configuration of the current second time window. If the second application resource configuration is the same as the first application resource configuration and the target instance number is greater than the preset threshold, perform load scheduling according to the target instance number.
[0025] In this way, by evaluating whether the second application resource configuration is the same as the first application resource configuration, if they are the same, it means that the first application resource configuration has met the configuration requirements, and only load scheduling needs to be performed according to the target instance number.
[0026] Furthermore, the target instance number is determined according to the first application resource configuration, the initial scale-down number, and the preset minimum number of application replicas, specifically as follows:
[0027] Obtain the number of running first instances;
[0028] Based on the number of first instances and the initial scale-down number, determine the number of second instances;
[0029] Based on the number of second instances and the minimum number of application replicas, determine the corresponding target instance number.
[0030] In this way, by considering the minimum number of application replicas, the initial scale-down number, and the current application resource configuration, it is ensured that the system after scheduling can not only meet the load requirements but also maintain a certain degree of redundancy to enhance the stability and fault tolerance of the system.
[0031] Furthermore, after determining the first time window in which changes can be made based on the load data, it further includes:
[0032] Calculate the deviation degree between the first time window and the preset change window;
[0033] If the deviation degree is greater than a preset notification threshold, relevant personnel will be reminded via email or text message.
[0034] In this way, by monitoring the difference between the first time window and the preset change window in real time, early warnings can be issued when the preset notification threshold is exceeded, which helps relevant personnel respond quickly and take necessary measures to address potential problems or risks.
[0035] In a second aspect, the present application provides a load scheduling system based on container technology, including: an acquisition module, a change module, and a scheduling module;
[0036] The acquisition module is used to obtain the load data of the application at each preset time point and determine the first time window that can be changed based on the load data;
[0037] The change module is used to perform window change based on the first time window when the preset change conditions are met, so as to obtain a second time window:
[0038] The scheduling module is used to obtain the first application resource configuration and the initial scale-down quantity corresponding to the second time window, and determine whether the second time window meets the load scheduling conditions based on the first application resource configuration. If the load scheduling conditions are met, load scheduling will be performed according to the target instance quantity and the first application resource configuration, where the target instance quantity is determined according to the first application resource configuration, the initial scale-down quantity, and the preset minimum number of application replicas.
[0039] Through collecting and analyzing the load data in different time periods, the embodiments of the present application can understand the running status and potential demand fluctuations of the application, and then accurately determine the first time window that can be changed; when the preset change conditions are met, the time window will be automatically adjusted to better handle emergencies and maintain the stability of the business; after determining the appropriate time window, by evaluating whether the first application resource configuration meets the future load requirements, it is further determined whether load scheduling is required, ensuring the accuracy and effectiveness of the scheduling decision and avoiding service interruption or performance degradation caused by improper resource configuration; when it is determined that load scheduling is required, the system will perform scheduling operations according to the target instance quantity and the first application resource configuration. Compared with the prior art, the present application can ensure the continuity and stability of the business.
[0040] In a third aspect, the present application further provides a terminal device, including: one or more processors; a memory coupled to the processors for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors implement the load scheduling method based on container technology as described in the present application.
[0041] Fourthly, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the load scheduling method based on container technology as described in the present application is implemented. Description of the Drawings
[0042] Figure 1 is a schematic flowchart of an embodiment of the load scheduling method based on container technology provided by the present application;
[0043] Figure 2 is a schematic structural diagram of an embodiment of the load scheduling system based on container technology provided by the present application;
[0044] Figure 3 is the hardware structure of the terminal device provided by the present application. Detailed Embodiments
[0045] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present application.
[0046] It should be understood that the step numbers used in the text are only for convenient description and do not limit the execution order of the steps.
[0047] It should be understood that the terms used in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms.
[0048] The terms "comprising" and "including" indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their combinations.
[0049] The term " / and" refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0050] In the financial industry, core operations (such as transaction settlement and accounting) follow a strict maintenance window system due to high sensitivity and precision requirements to ensure business continuity and stability. Changes outside the window may lead to risks such as transaction failures and financial losses. Therefore, determining an appropriate time window is crucial for the smooth operation of the business. Despite various workload scheduling technologies, they still face challenges: one is that the technology mainly focuses on resource requirements and it is difficult to dynamically adapt to business windows; the other is that the scheduling algorithm aims at resource utilization rate, resulting in a lack of resource buffer in the system and affecting business stability.
[0051] Next, the terms involved in this application are analyzed:
[0052] Artificial intelligence (AI): It is a new technical science that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence; artificial intelligence is a branch of computer science. It attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a way similar to human intelligence. The research in this field includes robots, speech recognition, image recognition, natural language processing, and expert systems, etc. Artificial intelligence can simulate the information process of human consciousness and thinking. It also uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results in terms of theories, methods, technologies, and application systems.
[0053] Based on this, the embodiments of this application provide a load scheduling method, system, device, and medium based on container technology, which can ensure business continuity and stability.
[0054] The load scheduling method, system, device, and medium based on container technology provided by the embodiments of this application are specifically described through the following embodiments. First, a load scheduling method based on container technology in the embodiments of this application is described.
[0055] A load scheduling method based on container technology provided by an embodiment of the present application relates to the field of load scheduling. The load scheduling method based on container technology provided by the embodiment of the present application can be applied to a terminal, or to a server side, or can also be software running on a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or can be configured as a server cluster or a distributed system composed of multiple physical servers, or can also be configured as a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing a load scheduling method based on container technology, etc., but is not limited to the above forms.
[0056] The present application can also be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and so on. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0057] Embodiment 1
[0058] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of an embodiment of the load scheduling method based on container technology provided by the present application, including steps S101 to S103;
[0059] Step S101, obtain the load data of the application at each preset time point, and determine a first time window that can be changed based on the load data;
[0060] In some embodiments, a series of preset time points need to be determined first to obtain data, such as every half hour or every hour, etc. The preset time points can be set according to the characteristics of business operation or historical data, etc. Then, when each preset time point is reached, the load data of the application is collected through a monitoring tool or a logging system. Among them, the load data includes but is not limited to key performance indicators such as CPU usage rate, memory occupancy, disk I / O, network bandwidth, and transaction processing rate.
[0061] In some embodiments, determining the first changeable time window based on the load data specifically includes: determining a preset load threshold based on the load data; if the load data is lower than the preset load threshold, determining the time series data corresponding to the load data, and determining the first changeable time window based on the time series data. Specifically, after obtaining the load data, a reasonable load threshold can be determined based on the load data. The load threshold can be an absolute threshold (such as the CPU usage rate does not exceed 50%), or a relative value (such as a certain percentage of the average load); then, the load data collected at each time point is compared with the preset load threshold. If the load data is lower than the preset load threshold, the time series data (i.e., time points) corresponding to these load data is determined, and a new set of time series points is formed with the filtered time series data. Subsequently, with 30 minutes as a window segment, 24 hours is divided into 48 window segments, and each window segment corresponds to a specific time range. For each data point in the filtered low-load time series point set, determine the time window segment it belongs to. Finally, traverse all window segments and check whether more than half of the monitored time series points in each window segment are in the filtered low-load time series point set. If more than half of the monitored time series points in the window segment are in the filtered time series point set, mark the window segment, and take the longest window segment composed of adjacent window segments as the changeable time window.
[0062] It should be noted that the first time window generally refers to a specific time period during which operations such as configuration changes or load scheduling have the least impact on financial operations.
[0063] In this way, by collecting and analyzing the load data in different time periods, the operating conditions and potential demand fluctuations of the application can be understood, and then the first changeable time window can be accurately determined.
[0064] In some embodiments, after determining the first time window that can be changed based on the load data, it further includes: calculating the deviation degree between the first time window and a preset change window; if the deviation degree is greater than a preset notification threshold, relevant personnel are reminded via email or text message. Specifically, after obtaining the first time window that can be changed, calculate its deviation degree from the preset change window. Here, the preset change window is the desired time window, that is, the optimal or standard time period is considered. Then, compare the calculated deviation degree with the preset notification threshold. If the deviation degree is greater than the preset notification threshold, summarize the specific information of the first time window, the information of the preset change window, the calculated deviation degree, and possible suggestions or action guidelines, and choose to remind relevant personnel via email or text message.
[0065] It should be noted that the calculation formula for the deviation degree is: deviation degree = 1 - (overlapping interval / preset change window).
[0066] In this way, by real-time monitoring the difference between the first time window and the preset change window, early warning can be given when the preset notification threshold is exceeded, which helps relevant personnel respond quickly and take necessary measures to deal with potential problems or risks.
[0067] Step S102, when the preset change condition is met, perform window change based on the first time window to obtain a second time window:
[0068] In some embodiments, if the load data meets the preset change condition, trigger the window change process. Then, obtain the detailed information of the currently used time window (the first time window), and perform window change based on the first time window information to obtain a second time window.
[0069] It should be noted that the preset change condition is usually determined based on application performance metrics, business load conditions, or requirements for a specific time period. It can be that the CPU usage rate continuously stays below a certain threshold, the memory occupancy remains at a low level, the business request volume significantly decreases, or the time reaches a certain specific point, etc. Evaluating whether the preset change condition is met can accurately determine whether the actual load situation does not match the expectation or whether the business requirements have changed.
[0070] It should be noted that the specific operations for window change may include window translation, expansion, contraction, or re-selection, etc. These operations need to be determined according to actual business requirements, system performance, and monitoring data. Exemplarily, if the CPU usage rate is continuously low, we can consider expanding the first time window to a time period with lower business load (that is, the second time window) for more configuration changes or load scheduling.
[0071] Step S103: Obtain the first application resource configuration and the initial scaling-down quantity corresponding to the second time window, and determine whether the second time window meets the load scheduling condition based on the first application resource configuration. If the load scheduling condition is met, perform load scheduling according to the target instance quantity and the first application resource configuration, where the target instance quantity is determined based on the first application resource configuration, the initial scaling-down quantity, and the preset minimum number of application replicas.
[0072] In some embodiments, the obtaining of the first application resource configuration corresponding to the second time window is specifically as follows: Obtain the recommended CPU resource configuration, and determine the CPU resource configuration corresponding to the second time window based on the recommended CPU resource configuration and the preset CPU resource buffer ratio; obtain the recommended memory resource configuration, and determine the memory resource configuration corresponding to the second time window based on the recommended memory resource configuration and the preset memory resource buffer ratio; determine the first application resource configuration corresponding to the second time window based on the CPU resource configuration and the memory resource configuration. Specifically, first, calculate the recommended value of the CPU resources that meet the application requirements according to the preset prediction algorithm, and then calculate the CPU resource configuration of the second time window based on the CPU resource configuration and the preset resource buffer ratio. Similarly, calculate the memory resource configuration of the second time window, and finally integrate the calculated CPU resource configuration and memory resource configuration into the first application resource configuration, that is, the overall resource configuration situation.
[0073] It should be noted that the preset memory buffer ratio is a part of the memory resources reserved to ensure the stable operation of the application in the face of sudden loads or memory leaks. The CPU resource buffer ratio is similar to the memory resource buffer ratio. The CPU buffer ratio is also a part of the CPU resources reserved to ensure the stable operation of the application in the face of sudden loads or memory leaks. Both of them need to be set in advance.
[0074] It should be noted that the first, second, etc. do not represent order and can be understood as nouns. Among them, the first application resource configuration is the overall resource configuration of the second time window calculated based on the preset memory resource buffer ratio, CPU resource buffer ratio, and the performance requirements of the application, and the second application resource configuration is the current resource configuration of the second time window.
[0075] In some embodiments, the calculation formulas for the CPU resource configuration and the memory resource configuration are specifically as follows:
[0076] The CPU resource configuration = the recommended CPU resource configuration * (1 + the CPU resource buffer ratio);
[0077] The configured memory resources = the recommended memory resources * (1 + the memory resource buffer ratio).
[0078] It should be noted that the recommended CPU resource configuration and the recommended memory resource configuration are determined based on the historical operation data of the application or a load prediction algorithm. The specific calculation means is not the focus of this application, so it will not be elaborated here.
[0079] In this way, by obtaining the first application resource configuration, it is convenient to subsequently evaluate whether the current application resource configuration meets the future load requirements and whether load scheduling is required, thereby ensuring the accuracy and effectiveness of the scheduling decision.
[0080] It should be noted that the initial scaling-down quantity refers to the number of application instances planned to be reduced during the load scheduling process, which is usually determined based on the evaluation of the current load situation, business requirements, and resource efficiency. Exemplarily, a load prediction model can be used to predict the load situation in a future period of time, and the initial scaling-down quantity, etc., can be determined based on the prediction results.
[0081] In some embodiments, the load scheduling method based on container technology further includes: obtaining the second application resource configuration of the second time window. If the second application resource configuration is the same as the first application resource configuration and the target instance quantity is greater than a preset threshold, then perform load scheduling according to the target instance quantity. Specifically, first, obtain the current resource configuration situation of the application within the second time window, that is, the second application resource configuration, which usually includes the usage and allocation of resources such as memory, CPU, disk I / O, network bandwidth, etc. Then, determine whether the second application resource configuration is consistent with the first application resource configuration. If it is consistent, it means that the configuration requirements are met and no resource configuration adjustment is required. At the same time, if the target instance quantity is greater than the preset threshold, that is, greater than or equal to zero, only the number of instances needs to be adjusted.
[0082] It should be noted that load scheduling involves reducing the number of application instances. If the number of application instances needs to be reduced, it is called scaling down.
[0083] In this way, by evaluating whether the second application resource configuration is the same as the first application resource configuration, if it is the same, it means that the first application resource configuration has met the configuration requirements, and only load scheduling needs to be performed according to the target instance quantity.
[0084] In some embodiments, it is determined whether the second time window meets the load scheduling condition based on the first application resource configuration. If the load scheduling condition is met, load scheduling is performed according to the target instance number and the first application resource configuration. Specifically, when the second application resource configuration is inconsistent with the first application resource configuration, it indicates that the load scheduling condition is met, and load scheduling needs to be performed according to the target instance number and the first application resource configuration simultaneously.
[0085] It should be noted that when performing load scheduling according to the target instance number and the first application resource configuration simultaneously, it is executed in a rolling upgrade manner. The specific execution method is not the focus of this application, so it will not be elaborated here.
[0086] In some embodiments, the target instance number is determined according to the first application resource configuration, the initial scaling-down number, and the preset minimum number of application replicas. Specifically: Obtain the number of running first instances; Based on the number of first instances and the initial scaling-down number, determine the number of second instances; Based on the number of second instances and the minimum number of application replicas, determine the corresponding target instance number. Specifically, determine the number of currently running application instances through a monitoring tool, log analysis, or directly querying the system configuration to understand the running scale and resource occupancy of the current application; Then, based on the number of first instances and the initial scaling-down number, determine the number of second instances to understand the expected number of application instances after the scaling-down operation, that is, the number of second instances = the number of first instances - the initial scaling-down number; Finally, if the number of second instances is greater than or equal to the minimum number of application replicas, the target instance number is the number of second instances. If the number of second instances is less than the minimum number of application replicas, the target instance number should be the minimum number of application replicas.
[0087] It should be noted that the minimum number of application replicas can ensure that the application can still run stably and meet the lowest business requirements after scaling down, and is usually determined according to the business characteristics, performance requirements, and fault recovery strategy of the application.
[0088] In this way, by considering the minimum number of application replicas, the initial scaling-down number, and the current application resource configuration, it is ensured that the scheduled system can not only meet the load requirements but also maintain a certain degree of redundancy to enhance the stability and fault tolerance of the system.
[0089] By collecting and analyzing the load data at different time periods, the embodiments of the present application can understand the operating conditions and potential demand fluctuations of the application, and then accurately determine the first time window that can be changed; when the preset change conditions are met, the time window is automatically adjusted to better cope with emergencies and maintain the stability of the service; after determining the appropriate time window, by evaluating whether the first application resource configuration meets the future load requirements, it is further determined whether load scheduling is required, ensuring the accuracy and effectiveness of the scheduling decision and avoiding service interruption or performance degradation caused by improper resource configuration; when it is determined that load scheduling is required, the system will perform scheduling operations according to the target instance number and the first application resource configuration. Compared with the prior art, the present application can ensure the continuity and stability of the service.
[0090] Embodiment 2
[0091] Please refer to Figure 2 , Figure 2 which is a receiving schematic diagram of an embodiment of a load scheduling system based on container technology provided by the present application, including: an acquisition module 100, a change module 200, and a scheduling module 300;
[0092] The acquisition module 100 is used to acquire the load data of the application at each preset time point and determine the first time window that can be changed based on the load data;
[0093] The change module 200 is used to perform window change based on the first time window when the preset change conditions are met to obtain a second time window:
[0094] The scheduling module 300 is used to acquire the first application resource configuration and the initial scale-down number corresponding to the second time window, and determine whether the second time window meets the load scheduling conditions based on the first application resource configuration. If the load scheduling conditions are met, load scheduling is performed according to the target instance number and the first application resource configuration, where the target instance number is determined according to the first application resource configuration, the initial scale-down number, and the preset minimum number of application replicas.
[0095] Regarding the information interaction, execution process, etc. among the modules in the above load scheduling system based on container technology, since they are based on the same concept as the embodiment of the load scheduling method based on container technology in the first aspect of the present invention, the achieved technical effects are basically the same. For specific content, reference can be made to the description in Embodiment 1 of the method of the present invention, which will not be elaborated here.
[0096] The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separated, that is, they may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the method of this embodiment.
[0097] Please refer to Figure 3 , Figure 3 which illustrates the hardware structure of a terminal device according to another embodiment. The terminal device includes:
[0098] A processor 301, which can be implemented in ways such as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided by the embodiments of this application;
[0099] A memory 302, which can be implemented in forms such as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 302 can store an operating system and other application programs. When implementing the technical solutions provided by the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 302 and are called by the processor 301 to execute the large model-based conversation risk assessment method of the embodiments of this application;
[0100] An input / output interface 303, which is used to implement information input and output;
[0101] A communication interface 304, which is used to implement communication interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.);
[0102] A bus 305, which transmits information between various components of the device (such as the processor 301, the memory 302, the input / output interface 303, and the communication interface 304);
[0103] Among them, the processor 301, the memory 302, the input / output interface 303, and the communication interface 304 achieve communication connections with each other inside the device through the bus 305.
[0104] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, a load scheduling method based on container technology as described in the first embodiment above is implemented.
[0105] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.
[0106] The specific embodiments described above further elaborate on the purpose, technical solutions, and beneficial effects of the present application. It should be understood that the above are only specific embodiments of the present application and are not used to limit the protection scope of the present application.
[0107] It is particularly pointed out that for those skilled in the art, any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A load scheduling method based on container technology, characterized in that: include: Obtaining load data of the application at each preset time point, and determining a changeable first time window based on the load data; When the preset change condition is met, the window is changed based on the first time window to obtain a second time window: Obtain the first application resource configuration and the initial shrinkage number corresponding to the second time window, and determine whether the second time window meets the load scheduling conditions based on the first application resource configuration; if the load scheduling conditions are met, perform load scheduling according to the target number of instances and the first application resource configuration, wherein the target number of instances is determined based on the first application resource configuration, the initial shrinkage number, and a preset minimum number of application replicas.
2. The load scheduling method based on container technology according to claim 1 is characterized in that: The determining of the changeable first time window based on the load data is specifically: determining a preset load threshold based on the load data; If the load data is lower than the preset load threshold, time series data corresponding to the load data is determined, and a changeable first time window is determined based on the time series data.
3. The load scheduling method based on container technology according to claim 1 is characterized in that: The obtaining of the first application resource configuration corresponding to the second time window is specifically: Obtaining a recommended CPU resource configuration, and determining a CPU resource configuration corresponding to the second time window based on the recommended CPU resource configuration and a preset CPU resource buffer ratio; Obtaining a recommended memory resource configuration, and determining a memory resource configuration for the second time window based on the recommended memory resource configuration and a preset memory resource buffer ratio; Based on the CPU resource configuration and the memory resource configuration, determine the first application resource configuration corresponding to the second time window.
4. The load scheduling method based on container technology according to claim 3 is characterized in that: The calculation formulas for the CPU resource configuration and the memory resource configuration are specifically: The CPU resource configuration = the recommended CPU resource configuration * (1 + the CPU resource buffer ratio); The memory resource configuration=the recommended memory resource configuration*(1+the memory resource buffer ratio).
5. The load scheduling method based on container technology according to claim 4 is characterized in that: Also includes: The current second application resource configuration of the second time window is obtained. If the second application resource configuration is the same as the first application resource configuration and the number of target instances is greater than a preset threshold, load scheduling is performed according to the number of target instances.
6. The load scheduling method based on container technology according to claim 1 is characterized in that: The target number of instances is determined according to the first application resource configuration, the initial shrinkage number, and the preset minimum number of application replicas, specifically: Get the number of running first instances; Determine a second number of instances based on the first number of instances and the initial reduction number; Based on the second number of instances and the minimum number of copies of the application, a corresponding target number of instances is determined.
7. The load scheduling method based on container technology according to claim 1 is characterized in that: After determining the changeable first time window based on the load data, the method further includes: Calculating the deviation between the first time window and the preset change window; If the deviation is greater than the preset notification threshold, relevant personnel will be reminded via email or text message.
8. A load scheduling system based on container technology, characterized in that: include: Acquisition module, change module and scheduling module; The acquisition module is used to acquire the load data of the application at each preset time point, and determine the changeable first time window based on the load data; The changing module is used to change the window based on the first time window to obtain a second time window when a preset change condition is met: The scheduling module is used to obtain the first application resource configuration and the initial shrinkage number corresponding to the second time window, and determine whether the second time window meets the load scheduling conditions based on the first application resource configuration. If the load scheduling conditions are met, load scheduling is performed according to the target number of instances and the first application resource configuration, wherein the target number of instances is determined based on the first application resource configuration, the initial shrinkage number and a preset minimum number of application replicas.
9. A terminal device, characterized in that: include: one or more processors; A memory, coupled to the processor, for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the load scheduling method based on container technology as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the load scheduling method based on container technology as described in any one of claims 1 to 7 is implemented.