Task threshold-based escape service elastic deployment method and system

CN121832970BActive Publication Date: 2026-10-27杭州佑首科技有限公司 +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202512019153.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-10-27
Estimated Expiration
2045-12-30

AI Technical Summary

Technical Problem

静态部署为应对峰值任务量需预留冗余节点,导致低负载时段资源闲置;人工调整节点数量存在响应延迟,易在任务量骤增时出现队列拥堵,或在任务量下降后未能及时缩减节点造成资源浪费

Benefits of technology

本发明实施例提供了一种基于任务阈值的转义服务弹性部署方法及系统,首先实时采集转义服务的任务队列长度、节点处理速率及资源占用率;然后根据所述任务队列长度、节点处理速率及资源占用率生成当前时间点的实时负载数据;之后通过所述实时负载数据、历史负载数据、所述当前时间点所处的时间段、历史预测准确度计算下一个时间点的预测负载数据;最后根据所述实时负载数据、所述预测负载数据以及预设阈值,增加、维持或减少处理所述转义服务的服务节点数量。从而通过本申请可以解决静态部署资源利用率低、动态调整响应滞后的缺陷,通过本申请可以实时监控任务量并触发节点自动扩缩容,实现资源的高效利用。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121832970B_ABST
    Figure CN121832970B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of task threshold-based escape service flexible deployment method and system, it is related to data processing technical field.Mainly include: real-time collection escape service's task queue length, node processing rate and resource occupancy rate;According to the task queue length, node processing rate and resource occupancy rate, the real-time load data of current time point is generated;Through the real-time load data, historical load data, the time period where the current time point is located, historical prediction accuracy calculates the prediction load data of next time point;According to the real-time load data, the prediction load data and preset threshold, increase, maintain or reduce the service node quantity of processing the escape service.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and more specifically to a method and system for elastic deployment of escape services based on task thresholds. Background Technology

[0002] In cloud computing and distributed service architectures, escaping services (such as data format conversion, encoding / decoding, and protocol adaptation) need to handle a large number of concurrent tasks, and their workload often fluctuates significantly due to business peaks (such as e-commerce promotions and batch log processing). Currently, the deployment of escaping service nodes mostly adopts static configuration or dynamic adjustment methods with manual intervention, which has the following drawbacks: Static deployments require reserving redundant nodes to handle peak workloads, resulting in idle resources during low-load periods. Manually adjusting the number of nodes introduces response delays, easily leading to queue congestion during sudden increases in workload, or wasting resources by failing to reduce the number of nodes in time after workload decreases. Therefore, there is an urgent need for a flexible deployment solution that can automatically and in real-time adjust the number of nodes based on task load to balance service performance and resource utilization. Summary of the Invention

[0003] The present invention aims to provide a method and system for elastic deployment of escape services based on task thresholds, so as to solve the shortcomings of the prior art. The technical problem to be solved by the present invention is achieved through the following technical solution.

[0004] This invention provides a method for elastic deployment of escaping services based on task thresholds, the method comprising: Real-time collection of task queue length, node processing rate, and resource utilization of the escape service; Real-time load data for the current time point is generated based on the task queue length, node processing rate, and resource utilization. The predicted load data for the next time point is calculated using the real-time load data, historical load data, the time period in which the current time point is located, and historical prediction accuracy. Based on the real-time load data, the predicted load data, and the preset threshold, the number of service nodes processing the escape service is increased, maintained, or decreased.

[0005] In an optional embodiment, generating real-time load data for the current time point based on the task queue length, node processing rate, and resource utilization includes: The task queue length, the node processing rate, and the resource utilization rate are standardized to obtain the standardized task queue length, node processing rate, and resource utilization rate. The efficiency factor and basic load are calculated using the standardized task queue length, node processing rate, and resource utilization. Real-time load data for the current time point is generated using the efficiency factor and the base load.

[0006] In an optional embodiment, the calculation of the efficiency factor and basic load using the standardized task queue length, node processing rate, and resource utilization includes: Efficiency factors are calculated using standardized node processing rates and resource utilization. The instantaneous pressure factor is calculated based on the standardized task queue length and resource utilization rate, and the congestion risk factor is calculated based on the standardized task queue length and node processing rate. The base load is obtained by calculating the average of the instantaneous pressure factor and the congestion risk factor.

[0007] In an optional embodiment, generating real-time load data for the current time point using the efficiency factor and the base load includes: Calculate the divisor between the base load and the efficiency factor, and normalize the divisor to obtain the real-time load data at the current time point.

[0008] In an optional embodiment, the step of calculating the predicted load data for the next time point using the real-time load data, historical load data, the time period in which the current time point is located, and historical prediction accuracy includes: The real-time load data, historical load data, the time period in which the current time point is located, and historical prediction accuracy are converted into data feature vectors. The data feature vector is input into multiple load prediction models to obtain multiple initial load results; and the weight value corresponding to each load prediction model is determined according to the recent prediction accuracy of the load prediction models. The predicted load data for the next time point is obtained by averaging the initial load results and their corresponding weight values.

[0009] In an optional embodiment, the step of increasing, maintaining, or decreasing the number of service nodes processing the escaping service based on the real-time load data, the predicted load data, and a preset threshold includes: Determine whether the real-time load data is greater than the emergency upper limit threshold; If the real-time load data exceeds the emergency upper limit threshold, then increase the number of service nodes processing the escaping service. If the real-time load data is less than or equal to the emergency upper limit threshold, then determine whether the predicted load data is greater than the warning threshold. If the predicted load data is greater than the warning threshold, then the number of service nodes processing the escaping service is increased. If the predicted load data is less than or equal to the warning threshold, then the number of service nodes processing the escape service is maintained or reduced.

[0010] In an optional embodiment, the step of maintaining or reducing the number of service nodes processing the escaping service if the predicted load data is less than or equal to the warning threshold includes: If the predicted load data is less than or equal to the warning threshold, determine whether the real-time load data is less than the scaling-down threshold. If the real-time load data is less than the scaling-down threshold, then the number of service nodes processing the escaping service is reduced. If the real-time load data is greater than or equal to the scaling-down threshold, then the number of service nodes processing the escape service is maintained.

[0011] In an optional embodiment, increasing the number of service nodes processing the escaping service includes: The number of nodes required to handle the load is calculated based on the real-time load data, the target utilization threshold, and the current number of nodes. Calculate the required number of nodes for the queue based on the task queue length, the queue digestion time target, and the node processing capacity. The number of service nodes processing the escape service is determined and increased based on the number of nodes with load demand and the number of nodes with queue demand.

[0012] In an optional embodiment, reducing the number of service nodes processing the escaping service includes: The number of nodes required to handle the load is calculated based on the real-time load data, the target utilization threshold, and the current number of nodes. The minimum value among the following is selected as the number of service nodes to reduce for processing the escape service: the difference between the current number of nodes and the number of nodes required for the load, the product of the current number of nodes and the maximum scaling-down ratio, and the difference between the current number of nodes and the minimum number of nodes.

[0013] This invention provides an elastic deployment system for escaping services based on task thresholds, the system comprising: The data acquisition module is used to collect the task queue length, node processing rate, and resource utilization of the escape service in real time. The generation module is used to generate real-time load data for the current time point based on the task queue length, node processing rate, and resource utilization rate. The prediction module is used to calculate the predicted load data for the next time point using the real-time load data, historical load data, the time period in which the current time point is located, and historical prediction accuracy. The determination module is used to increase, maintain, or decrease the number of service nodes processing the escaping service based on the real-time load data, the predicted load data, and a preset threshold.

[0014] The embodiments of the present invention have the following advantages: This invention provides a method and system for elastic deployment of escaping services based on task thresholds. First, it collects the task queue length, node processing rate, and resource utilization of the escaping service in real time. Then, it generates real-time load data for the current time point based on the task queue length, node processing rate, and resource utilization. Next, it calculates the predicted load data for the next time point using the real-time load data, historical load data, the time period of the current time point, and historical prediction accuracy. Finally, it increases, maintains, or decreases the number of service nodes processing the escaping service based on the real-time load data, the predicted load data, and a preset threshold. This invention addresses the shortcomings of low resource utilization in static deployment and lag in dynamic adjustment. It allows for real-time monitoring of task volume and triggers automatic scaling of nodes, achieving efficient resource utilization. Attached Figure Description

[0015] Figure 1 This is a flowchart of an elastic deployment method for escape services based on task thresholds provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of an escape service elastic deployment system based on task threshold provided in an embodiment of the present invention. Detailed Implementation

[0016] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0017] like Figure 1 As shown in this embodiment, an elastic deployment method for escape services based on task thresholds is provided. This method is used to perform the following steps: S101 collects the task queue length, node processing rate, and resource utilization of the escaping service in real time.

[0018] Among them, the task queue length is an integer used to represent the number of tasks currently waiting to be processed; the node processing rate is a floating-point number used to represent the number of tasks processed by the node per second; and the resource utilization rate is a floating-point number used to represent the percentage of utilization of resources such as CPU and memory, ranging from 0 to 100%.

[0019] S102, generate real-time load data for the current time point based on the task queue length, node processing rate, and resource occupancy rate.

[0020] This embodiment can collect the task queue length, node processing rate, and resource utilization (CPU / memory utilization) of the escaping service in real time through a distributed monitoring module to generate real-time load data. In this embodiment, before generating the real-time load data for the current time point based on the task queue length, node processing rate, and resource utilization, the task queue length, node processing rate, and resource utilization can be preprocessed. This preprocessing can include normalization, outlier filtering, etc.

[0021] Specifically, in this embodiment, the real-time load data can be calculated using the following formula:

[0022] Among them, w1, w2, and w3 are weighting coefficients (adjusted according to system characteristics) used to balance the influence of various indicators. The overall system load index is the average of the load scores of all nodes.

[0023] It should be noted that the weight coefficients w1, w2, and w3 in this embodiment can be updated using a weight update model. Specifically, in this embodiment, the error of the previous time node, the normalized task queue length of the previous time node, the node processing rate, and the resource utilization rate are input into the weight update model to obtain w1, w2, and w3 corresponding to the current time node.

[0024] The error of the previous cycle is calculated based on the real-time load data and the predicted load data of the previous time point, using a loss function.

[0025] In one optional embodiment provided in this application, generating real-time load data for the current time point based on the task queue length, node processing rate, and resource utilization includes: S1021, the task queue length, the node processing rate, and the resource utilization rate are standardized to obtain standardized task queue length, node processing rate, and resource utilization rate.

[0026] S1022, calculate the efficiency factor and basic load using the standardized task queue length, node processing rate and resource utilization rate.

[0027] Specifically, the calculation of efficiency factor and basic load using the standardized task queue length, node processing rate, and resource utilization rate includes: calculating efficiency factor using standardized node processing rate and resource utilization rate; calculating instantaneous pressure factor based on standardized task queue length and resource utilization rate; calculating congestion risk factor using standardized task queue length and node processing rate; and obtaining the basic load by calculating the average of the instantaneous pressure factor and the congestion risk factor.

[0028] The efficiency factor measures how efficiently a node converts resource consumption into effective work output. In this embodiment, the efficiency factor can be calculated using the following formula:

[0029] in, To achieve a standardized node processing rate, For standardized resource utilization, A small constant (e.g.) ), used to prevent division by zero, This indicates that the node is highly efficient (high resource utilization and fast processing speed). This indicates that the node is inefficient (consuming a lot of resources but processing slowly). It represents an ideal state.

[0030] The instantaneous pressure factor aims to capture the intuitive pressure the system is experiencing at any given moment. It is calculated based on current resource utilization and queue length, and can be specifically expressed using the formula... The instantaneous pressure factor is calculated using this formula, which indicates that when high resource utilization and queue congestion occur simultaneously, the resulting pressure is not linear but rather exponential. Specifically, Instantaneous pressure factor, For standardized resource utilization, The standardized task queue length.

[0031] Congestion risk factor does not measure how busy the system is currently, but rather predicts the likelihood of future congestion if the current trend continues. This is key to implementing preventative scaling up and down. The congestion risk factor is calculated based on the ratio of task queue length to node processing rate. , This is used to represent the risk of future congestion, and can be calculated using the following formula:

[0032] The base load is obtained by averaging the instantaneous pressure factor and the congestion risk factor using the following formula:

[0033] in, Based on the load.

[0034] S1023, generate real-time load data for the current time point using the efficiency factor and the base load.

[0035] Specifically, generating real-time load data for the current time point using the efficiency factor and the base load includes: calculating the divisor between the base load and the efficiency factor, and normalizing the divisor to obtain the real-time load data for the current time point. The real-time load data for the current time point can be calculated using the following formula:

[0036] in, This is the real-time load data at the current point in time.

[0037] In this embodiment, the efficiency factor, instantaneous pressure factor, and congestion risk factor are independent yet complementary, and real-time load data are calculated together using the efficiency factor, instantaneous pressure factor, and congestion risk factor.

[0038] S103, calculate the predicted load data for the next time point using the real-time load data, historical load data, the time period in which the current time point is located, and historical prediction accuracy.

[0039] In one optional embodiment provided in this application, the step of calculating the predicted load data for the next time point using the real-time load data, historical load data, the time period in which the current time point is located, and historical prediction accuracy includes: converting the real-time load data, historical load data, the time period in which the current time point is located, and historical prediction accuracy into a data feature vector; inputting the data feature vector into multiple load prediction models to obtain multiple initial load results; determining the weight value corresponding to each load prediction model based on the recent prediction accuracy of the load prediction models; and performing a weighted average of the initial load results and their corresponding weight values ​​to obtain the predicted load data for the next time point.

[0040] Before converting real-time load data, historical load data, the time period at the current time point, and historical prediction accuracy into data feature vectors, it is necessary to perform data cleaning on the real-time load data, historical load data, the time period at the current time point, and historical prediction accuracy. This data cleaning may include handling missing values ​​and outliers (such as using the sliding window capping method). Then, the features of the real-time load data and historical load data are statistically analyzed using a sliding window. These features can be the mean, standard deviation, slope, etc. of the most recent 1 min / 5 min / 15 min. After that, the statistical features, the time period at the current time point, and the historical prediction accuracy are converted into data feature vectors.

[0041] Among them, the historical load data consists of similar data from the past few days or weeks, used for training and pattern recognition; the current time period can be holidays, weekdays, etc.; the historical prediction accuracy is the accuracy calculated based on the difference between the real-time load data and the predicted load data.

[0042] In this embodiment, the data feature vector is input into multiple load prediction models to obtain multiple initial load results. The multiple load prediction models can be models trained by Facebook Prophet, LSTM, Temporal Fusion Transformer (TFT), etc.

[0043] S104, based on the real-time load data, the predicted load data, and the preset threshold, increase, maintain, or decrease the number of service nodes processing the escaping service.

[0044] In this embodiment, real-time load data can be compared with a preset threshold. If one of the following conditions is met, the corresponding operation is triggered: when the task queue length is greater than or equal to the expansion threshold for 30 consecutive seconds and the average resource utilization rate of the node is greater than or equal to 80%, an expansion instruction is generated; when the task queue length is less than or equal to the shrinkage threshold for 60 consecutive seconds and the average resource utilization rate of the node is less than or equal to 30%, a shrinkage instruction is generated.

[0045] The preset thresholds for the escaping service include expansion thresholds (e.g., the number of tasks to be processed within a unit of time ≥ 1000) and reduction thresholds (e.g., the number of tasks to be processed within a unit of time ≤ 200), and it supports setting differentiated thresholds according to task type (e.g., text escaping, binary escaping).

[0046] Based on scaling instructions, the container orchestration engine automatically adds or removes service nodes. During scaling, new nodes are added at a ratio of "current number of nodes × 1.5" (not exceeding a preset limit), and tasks are allocated using a load balancing algorithm. During scaling down, idle nodes with the lowest resource utilization are prioritized for shutdown (at least one core node is retained), and their tasks are smoothly migrated to the remaining nodes. The response time, resource utilization changes, and task processing success rate for each scaling operation are recorded, and threshold parameters are dynamically optimized using a reinforcement learning model (e.g., the scaling threshold is automatically increased by 5% based on historical peak values).

[0047] In one optional embodiment provided in this application, the step of increasing, maintaining, or decreasing the number of service nodes processing the escaping service based on the real-time load data, the predicted load data, and a preset threshold includes: S1041, determine whether the real-time load data is greater than the emergency upper limit threshold.

[0048] The emergency upper limit threshold can be 85%. Exceeding this value indicates that the system is currently or will soon be in an overload state. In this embodiment, if the current real-time load has exceeded the emergency upper limit threshold, or the queue length exceeds the maximum allowed length, it means that the system is overloaded and must be significantly expanded immediately without much calculation.

[0049] S1042, if the real-time load data is greater than the emergency upper limit threshold, then increase the number of service nodes processing the escaping service.

[0050] S1043, if the real-time load data is less than or equal to the emergency upper limit threshold, then determine whether the predicted load data is greater than the warning threshold.

[0051] The warning threshold can be 70%. Exceeding this value means that the system is at risk of overload in the near future. In this embodiment, if the system is currently functioning normally, but the prediction indicates that it is about to exceed the warning threshold, predictive capacity expansion is triggered.

[0052] S1044, If the predicted load data is greater than the warning threshold, then increase the number of service nodes processing the escape service.

[0053] Specifically, increasing the number of service nodes processing the escaping service in steps S1042 and S1044 includes: calculating the number of load-demanding nodes based on the real-time load data, the target utilization threshold, and the current number of nodes; calculating the number of queue-demanding nodes based on the task queue length, the queue digestion time target, and the node processing capacity; and determining and increasing the number of service nodes processing the escaping service based on the load-demanding nodes and the queue-demanding nodes. The target utilization threshold can be 50%. The ideal task processing resource utilization rate is used to calculate how many nodes are needed.

[0054] In this embodiment, the number of nodes required for the queue can be calculated using the following formula:

[0055] in, The number of nodes required for the queue. This is real-time load data (standardized load values ​​calculated at the current point in time, typically ranging from [0, 1]). The target utilization threshold is the ideal load level that the system is expected to achieve after expansion (e.g., 0.5 or 0.6). This value is lower than the emergency threshold, providing a buffer for the system. This represents the current number of nodes, specifically the number of currently running and healthy escape service nodes.

[0056] The required number of nodes for the queue is calculated using the following formula:

[0057] in, The number of nodes required for the queue, i.e., to process the current backlog of tasks within time T. The number of additional nodes required, This represents the task queue length, the total number of tasks currently waiting to be processed in the message queue (such as RabbitMQ or Kafka); This refers to the node's processing capacity, i.e., the capacity of a single node under ideal conditions (load is...). The number of tasks that can be processed per second (hourly), this value needs to be obtained through stress testing or long-term monitoring; To achieve the queue digestion time target, the currently backlogged queue will be cleared. Maximum time required to complete all processing (in seconds).

[0058] Determining and increasing the number of service nodes processing the escape service based on the number of load demand nodes and the number of queue demand nodes includes using the formula... Add the number of nodes required for the load demand to the number of nodes required for the queue, and then apply the formula... Determine the number of service nodes to increase the number of nodes processing the escape service.

[0059] S1045, if the predicted load data is less than or equal to the warning threshold, then maintain or reduce the number of service nodes processing the escape service.

[0060] Specifically, the step of maintaining or reducing the number of service nodes processing the escaping service if the predicted load data is less than or equal to the warning threshold includes: if the predicted load data is less than or equal to the warning threshold, determining whether the real-time load data is less than the scaling-down threshold; if the real-time load data is less than the scaling-down threshold, reducing the number of service nodes processing the escaping service; and if the real-time load data is greater than or equal to the scaling-down threshold, maintaining the number of service nodes processing the escaping service.

[0061] More specifically, reducing the number of service nodes processing the escaping service includes: calculating the number of load-demanding nodes based on the real-time load data, the target utilization threshold, and the current number of nodes; and selecting the minimum value from the difference between the current number of nodes and the load-demanding nodes, the product of the current number of nodes and the maximum single scaling-down ratio, and the difference between the current number of nodes and the minimum number of nodes as the number of service nodes to be reduced for processing the escaping service.

[0062] In this embodiment, the number of nodes required for the queue can be calculated using the following formula:

[0063] in, The number of nodes required for the queue. This is real-time load data (standardized load values ​​calculated at the current point in time, typically ranging from [0, 1]). The target utilization threshold is the ideal load level that the system is expected to achieve after expansion (e.g., 0.5 or 0.6). This value is lower than the emergency threshold, providing a buffer for the system. This represents the current number of nodes, specifically the number of currently running and healthy escape service nodes.

[0064] Specifically, the number of service nodes processing the escape service is reduced using a formula:

[0065] in, To reduce the number of service nodes handling escape services, This represents the current number of nodes. This represents the maximum reduction ratio in a single operation. This represents the minimum number of nodes.

[0066] This embodiment provides a method for elastic deployment of escaping services based on task thresholds. First, it collects the task queue length, node processing rate, and resource utilization of the escaping service in real time. Then, it generates real-time load data for the current time point based on the task queue length, node processing rate, and resource utilization. Next, it calculates the predicted load data for the next time point using the real-time load data, historical load data, the time period in which the current time point is located, and historical prediction accuracy. Finally, it increases, maintains, or decreases the number of service nodes processing the escaping service based on the real-time load data, the predicted load data, and a preset threshold. Therefore, this application can solve the defects of low resource utilization in static deployment and lag in dynamic adjustment. It can monitor task volume in real time and trigger automatic scaling of nodes, achieving efficient resource utilization.

[0067] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0068] In one embodiment, a task threshold-based elastic deployment system for escape services is provided. For example... Figure 2 As shown, the functional modules of this task threshold-based escaping service elastic deployment system are described in detail below: The acquisition module 21 is used to collect the task queue length, node processing rate and resource utilization of the escaping service in real time. The generation module 22 is used to generate real-time load data for the current time point based on the task queue length, node processing rate and resource utilization rate. Prediction module 23 is used to calculate the predicted load data for the next time point using the real-time load data, historical load data, the time period in which the current time point is located, and historical prediction accuracy. The determination module 24 is used to increase, maintain, or decrease the number of service nodes processing the escaping service based on the real-time load data, the predicted load data, and a preset threshold.

[0069] In an optional embodiment, the generation module 22 is specifically used for: The task queue length, the node processing rate, and the resource utilization rate are standardized to obtain the standardized task queue length, node processing rate, and resource utilization rate. The efficiency factor and basic load are calculated using the standardized task queue length, node processing rate, and resource utilization. Real-time load data for the current time point is generated using the efficiency factor and the base load.

[0070] In an optional embodiment, the generation module 22 is specifically used for: Efficiency factors are calculated using standardized node processing rates and resource utilization. The instantaneous pressure factor is calculated based on the standardized task queue length and resource utilization rate, and the congestion risk factor is calculated based on the standardized task queue length and node processing rate. The base load is obtained by calculating the average of the instantaneous pressure factor and the congestion risk factor.

[0071] In an optional embodiment, the generation module 22 is specifically used for: Calculate the divisor between the base load and the efficiency factor, and normalize the divisor to obtain the real-time load data at the current time point.

[0072] In an optional embodiment, the prediction module 23 is specifically used for: The real-time load data, historical load data, the time period in which the current time point is located, and historical prediction accuracy are converted into data feature vectors. The data feature vector is input into multiple load prediction models to obtain multiple initial load results; and the weight value corresponding to each load prediction model is determined according to the recent prediction accuracy of the load prediction models. The predicted load data for the next time point is obtained by averaging the initial load results and their corresponding weight values.

[0073] In an optional embodiment, the determining module 24 is specifically used for: Determine whether the real-time load data is greater than the emergency upper limit threshold; If the real-time load data exceeds the emergency upper limit threshold, then increase the number of service nodes processing the escaping service. If the real-time load data is less than or equal to the emergency upper limit threshold, then determine whether the predicted load data is greater than the warning threshold. If the predicted load data is greater than the warning threshold, then the number of service nodes processing the escaping service is increased. If the predicted load data is less than or equal to the warning threshold, then the number of service nodes processing the escape service is maintained or reduced.

[0074] In an optional embodiment, the determining module 24 is specifically used for: If the predicted load data is less than or equal to the warning threshold, determine whether the real-time load data is less than the scaling-down threshold. If the real-time load data is less than the scaling-down threshold, then the number of service nodes processing the escaping service is reduced. If the real-time load data is greater than or equal to the scaling-down threshold, then the number of service nodes processing the escape service is maintained.

[0075] In an optional embodiment, the determining module 24 is specifically used for: The number of nodes required to handle the load is calculated based on the real-time load data, the target utilization threshold, and the current number of nodes. Calculate the required number of nodes for the queue based on the task queue length, the queue digestion time target, and the node processing capacity. The number of service nodes processing the escape service is determined and increased based on the number of nodes with load demand and the number of nodes with queue demand.

[0076] In an optional embodiment, the determining module 24 is specifically used for: The number of nodes required to handle the load is calculated based on the real-time load data, the target utilization threshold, and the current number of nodes. The minimum value among the following is selected as the number of service nodes to reduce for processing the escape service: the difference between the current number of nodes and the number of nodes required for the load, the product of the current number of nodes and the maximum scaling-down ratio, and the difference between the current number of nodes and the minimum number of nodes.

[0077] It should be noted that the above detailed descriptions are exemplary and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0078] For specific limitations regarding the task threshold-based escaping service elastic deployment system, please refer to the limitations of the task threshold-based escaping service elastic deployment method above, which will not be repeated here. Each module in the aforementioned device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0079] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the system can be divided into different functional units or modules to complete all or part of the functions described above.

[0080] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for elastic deployment of escape services based on task thresholds, characterized in that, The method includes: Real-time collection of task queue length, node processing rate, and resource utilization of the escape service; The system generates real-time load data for the current time point based on the task queue length, node processing rate, and resource utilization rate. Specifically, this includes: standardizing the task queue length, node processing rate, and resource utilization rate; calculating an efficiency factor using the standardized node processing rate and resource utilization rate; calculating an instantaneous pressure factor based on the standardized task queue length and resource utilization rate; calculating a congestion risk factor based on the standardized task queue length and node processing rate; obtaining a base load by calculating the average of the instantaneous pressure factor and the congestion risk factor; and calculating the quotient of the base load divided by the efficiency factor, and normalizing the quotient to obtain the real-time load data for the current time point. The predicted load data for the next time point is calculated using the real-time load data, historical load data, the time period in which the current time point is located, and historical prediction accuracy. Based on the real-time load data, the predicted load data, and a preset threshold, the number of service nodes processing the escape service is increased, maintained, or decreased; specifically including: Determine whether the real-time load data is greater than the emergency upper limit threshold; If the real-time load data exceeds the emergency upper limit threshold, then increase the number of service nodes processing the escaping service. If the real-time load data is less than or equal to the emergency upper limit threshold, then determine whether the predicted load data is greater than the warning threshold. If the predicted load data is greater than the warning threshold, then the number of service nodes processing the escaping service is increased. If the predicted load data is less than or equal to the warning threshold, then maintain or reduce the number of service nodes processing the escape service; The increase in the number of service nodes processing the escaping service includes: The number of nodes required to handle the load is calculated based on the real-time load data, the target utilization threshold, and the current number of nodes. Calculate the required number of nodes for the queue based on the task queue length, the queue digestion time target, and the node processing capacity. The number of service nodes processing the escape service is determined and increased based on the number of nodes with load demand and the number of nodes with queue demand.

2. The method according to claim 1, characterized in that, The calculation of the predicted load data for the next time point using the real-time load data, historical load data, the time period in which the current time point is located, and historical prediction accuracy includes: The real-time load data, historical load data, the time period in which the current time point is located, and historical prediction accuracy are converted into data feature vectors. The data feature vector is input into multiple load prediction models to obtain multiple initial load results; and the weight value corresponding to each load prediction model is determined according to the recent prediction accuracy of the load prediction models. The predicted load data for the next time point is obtained by averaging the initial load results and their corresponding weight values.

3. The method according to claim 1, characterized in that, The step of maintaining or reducing the number of service nodes processing the escaping service if the predicted load data is less than or equal to the warning threshold includes: If the predicted load data is less than or equal to the warning threshold, determine whether the real-time load data is less than the scaling-down threshold. If the real-time load data is less than the scaling-down threshold, then the number of service nodes processing the escaping service is reduced. If the real-time load data is greater than or equal to the scaling-down threshold, then the number of service nodes processing the escape service is maintained.

4. The method according to claim 3, characterized in that, The reduction of the number of service nodes processing the escaping service includes: The number of nodes required to handle the load is calculated based on the real-time load data, the target utilization threshold, and the current number of nodes. The minimum value among the following is selected as the number of service nodes to reduce for processing the escape service: the difference between the current number of nodes and the number of nodes required for the load, the product of the current number of nodes and the maximum scaling-down ratio, and the difference between the current number of nodes and the minimum number of nodes.

5. A task threshold-based escaping service elastic deployment system, used to implement the method as described in any one of claims 1-4, characterized in that, The system includes: The data acquisition module is used to collect the task queue length, node processing rate, and resource utilization of the escape service in real time. The generation module is used to generate real-time load data for the current time point based on the task queue length, node processing rate, and resource utilization rate. The prediction module is used to calculate the predicted load data for the next time point using the real-time load data, historical load data, the time period in which the current time point is located, and historical prediction accuracy. The determination module is used to increase, maintain, or decrease the number of service nodes processing the escaping service based on the real-time load data, the predicted load data, and a preset threshold.

Citation Information

Patent Citations

  • Predictive elastic scaling method and system considering multi-dimensional load characteristics

    CN118260089A

  • Thread pool self-adaption method and device and medium

    CN120687259A

  • Communication node dynamic heat balance management method and system supporting edge computing

    CN121705017A