WO2022257389A1 - Task delay risk detection method, electronic device and storage medium - Google Patents

Task delay risk detection method, electronic device and storage medium Download PDF

Info

Publication number
WO2022257389A1
WO2022257389A1 PCT/CN2021/136007 CN2021136007W WO2022257389A1 WO 2022257389 A1 WO2022257389 A1 WO 2022257389A1 CN 2021136007 W CN2021136007 W CN 2021136007W WO 2022257389 A1 WO2022257389 A1 WO 2022257389A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
tenant
tasks
interval
total number
Prior art date
Application number
PCT/CN2021/136007
Other languages
French (fr)
Chinese (zh)
Inventor
笪尚
谢健
卢明杰
邸帅
卢道和
Original Assignee
深圳前海微众银行股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2022257389A1 publication Critical patent/WO2022257389A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3017Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is implementing multitasking
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the corresponding first interval is determined based on the server's processing of historical tasks, and by comparing the total number of tasks to be processed corresponding to the server with the first interval corresponding to the server, it can be accurately determined according to the comparison result Whether the server can meet the computing requirements can accurately determine whether the server has a task delay risk, and if the server has a task delay risk, output the first prompt information to give an early warning of the task delay risk, so that the operation and maintenance personnel to process.
  • Step 201 Based on the historical task information of each tenant corresponding to each server in the server cluster, determine the maximum total amount of tasks of each tenant corresponding to each server, the peak average processing speed corresponding to each server, and the corresponding The total number of servers and the maximum set delay time of historical tasks corresponding to each tenant; where the maximum total amount of tasks represents the maximum total amount of historical tasks waiting to be processed; the peak average processing speed represents the average of all peaks of task processing speed.
  • the electronic device determines the corresponding relationship between the server and the tenant based on the historical task information of each tenant corresponding to each server in the server cluster, and determines the corresponding relationship between the server and the tenant based on the corresponding relationship between the server and the tenant. Total number of servers.
  • the electronic device determines the task processing speed corresponding to the server at different times from the historical task information corresponding to each tenant corresponding to the server.
  • the task processing speed represents the number of tasks processed per second; based on the task processing speed corresponding to the server at different times , determine the task processing speed curve corresponding to the server; from the task processing speed curve corresponding to the server, determine all the peak values of the task processing speed corresponding to the server; calculate the mean value of all peak values of the task processing speed corresponding to the server, and obtain the Corresponding peak average processing speed.
  • the historical task information includes the maximum set delay time corresponding to the historical task, and the electronic device determines the maximum set delay time of each historical task corresponding to each tenant corresponding to the server from the historical task information of each tenant corresponding to the server.
  • Step 202 Based on the maximum total amount of tasks corresponding to each tenant corresponding to each server, the peak average processing speed corresponding to each server, the total number of servers corresponding to each tenant, and the determined maximum setting The delay time determines the first interval corresponding to each server.
  • the maximum set delay time of all historical tasks The minimum value is determined as the maximum setting delay time of the historical tasks corresponding to this server.
  • the electronic device determines the maximum total amount of tasks corresponding to each tenant corresponding to each server , based on the server corresponding to each tenant, and based on the maximum total amount of tasks of each tenant corresponding to each server, the maximum total amount of historical tasks waiting to be processed corresponding to the same tenant is summed to obtain the corresponding Maximum task accumulation.
  • the electronic device counts the maximum cumulative amount of tasks corresponding to each tenant on a daily basis. Based on the maximum cumulative amount of tasks corresponding to each tenant per day, the maximum cumulative amount of tasks corresponding to each tenant within the set period is determined. The first interval corresponding to the server corresponding to the tenant is calculated according to the maximum accumulated amount of tasks corresponding to the tenant within the set period. Wherein, the duration of the setting period is longer than one day, for example, the setting period may be set with a minimum unit of week or month.
  • the electronic device can determine the corresponding first interval based on the historical task information corresponding to the server, and detect whether the server has a task delay risk through the first interval determined based on the historical task information, which can improve the task delay risk. accuracy of the test results.
  • the electronic device sums the maximum amount of historical tasks waiting to be processed corresponding to the same tenant to obtain each The maximum task accumulation corresponding to the tenant; based on the maximum task accumulation corresponding to each tenant and the total number of servers corresponding to each tenant, the average number of tasks processed by each server corresponding to each tenant is calculated, and the per-tenant corresponding to the tenant The first boundary value of the first interval corresponding to the server, that is, the minimum value.
  • the first boundary value of the first interval corresponding to each server corresponding to each tenant is calculated based on the following formula: Among them, LB gi represents the first boundary value of the first interval of the i-th server corresponding to the g-th tenant; MAX g represents the maximum task accumulation amount corresponding to the g-th tenant; I g represents the value of the server corresponding to the g-th tenant total.
  • the performance difference of each server is not considered, so the calculation process of calculating the first interval can be simplified, and the efficiency of calculating the first interval can be improved.
  • the The first information also includes performance parameters of the server; the method also includes:
  • the electronic device may determine a reference server from all servers corresponding to each tenant; based on the first performance parameter of the reference server corresponding to the tenant and the second performance parameter of the non-reference server, determine the The performance weight of the benchmark server.
  • the ratio between the performance weight of the reference server and the performance weight of the non-reference server may be determined based on the ratio between the second performance parameter and the first performance parameter.
  • C gk represents the performance weight of the k-th server corresponding to the g-th tenant
  • C gi represents the performance weight of the i-th server corresponding to the g-th tenant.
  • the server 1 corresponding to the tenant corresponds to 3 servers, and the performance weight of server 1 is C1, the performance weight of server 2 is 1.5C1, and the performance weight of server 3 is C1, the server 1 corresponding to the tenant corresponds to
  • the method for calculating the second boundary value of the first interval corresponding to the server remains unchanged. That is to say, regardless of whether the first information includes the performance parameter of the server, the method for calculating the second boundary value of the first section corresponding to the server is the same.
  • the timed task is used to trigger the electronic device to regularly update the first interval corresponding to the server.
  • the electronic device recalculates the first boundary value and the second boundary value of the first interval corresponding to each server by executing the timing task; based on the recalculated first boundary value and the second boundary value of the first interval value, and update the first section currently corresponding to the corresponding server.
  • the method also includes:
  • the server cluster In the case where the total number of tasks to be processed corresponding to the first server in the server cluster is not in the first interval corresponding to the first server, output the number of servers to be added corresponding to the first tenant; wherein, the The first tenant is a tenant corresponding to the first server.
  • the electronic device detects that the total number of tasks to be processed corresponding to the first server among the servers corresponding to the first tenant is not in the first interval corresponding to the first server, it determines that in the case of eliminating the risk of task delay, The number of servers to be added corresponding to the first tenant, and the number of servers to be added corresponding to the first tenant is output.
  • the electronic device when the electronic device detects that the total number of tasks to be processed corresponding to the first server is not in the first interval corresponding to the first server, it may output information about the new server corresponding to the tenant when eliminating the risk of task delay. Quantity, so that the operation and maintenance personnel can expand the server cluster; compared with the method that the operation and maintenance personnel determine the data of the new server based on personal experience, it can reduce the need for re-expansion due to the failure to meet the computing needs after the expansion of the server cluster situation occurs.
  • the method further includes:
  • the first parameter includes:
  • a redundancy value Cr is set for the first section of the server; in some embodiments, the first parameter also includes:
  • the set redundancy value corresponding to the first interval is the set redundancy value corresponding to the first interval.
  • the server when the total number of tasks to be processed by the server is less than the first boundary value of the first interval corresponding to the server, it will lead to peak time resource shortage, resulting in task delays, and even tasks submitted by tenants are rejected by the server; when the server's When the total number of pending tasks is greater than the second boundary value of the first interval corresponding to the server, there will be too many pending tasks in the peak time cache queue, and each newly submitted task must wait for too long, resulting in batch delay; therefore, if the total number of tasks to be processed by the server is not in the first interval corresponding to the server, there is a risk of task delay, and it is necessary to increase the number of servers corresponding to the tenant corresponding to the server in the server cluster to Eliminate the risk of task delays.
  • the electronic device determines that the first server has a task delay risk based on the correspondence between the server and the tenant, and determines the The first tenant corresponding to the first server, and all servers corresponding to the first tenant are determined; based on the total number of pending tasks corresponding to each server corresponding to the first tenant, and the first interval corresponding to each server corresponding to the first tenant At least one boundary value of , and the total number of servers corresponding to the first tenant determine the number of servers to be added corresponding to the first tenant.
  • the electronic device When the set redundancy value corresponding to the first interval is obtained, the electronic device based on at least one boundary value of the first interval corresponding to the server, the set redundancy value corresponding to the first interval, and the total number of tasks to be processed by the server , to determine whether the server has a task delay risk.
  • the total number of tasks to be processed by the server is less than or equal to the sum of the first boundary value of the corresponding first interval and the set redundancy value, or when the total number of tasks to be processed by the server is greater than or equal to the corresponding first boundary value If there is a difference between the second boundary value of an interval and the set redundancy value, it indicates that the server currently has a task delay risk.
  • C jb represents the total number of tasks to be processed by the server
  • LB represents the first boundary value of the first interval corresponding to the server
  • C r represents the set redundancy value of the first interval
  • UB represents the first boundary value of the first interval corresponding to the server.
  • the first information corresponding to the server does not include the performance parameters of the server, there is no need to consider the performance difference between the servers, and the number of servers to be added corresponding to the first tenant is determined by the following method:
  • the number of servers to be added corresponding to the first tenant is determined based on the product of the total number of servers of the first tenant and the quotient of the product and the total number of tasks to be processed corresponding to the first server. That is, by the formula Calculate the number of servers to be added corresponding to the first tenant; I is the total number of servers corresponding to the first tenant; n represents the number of servers to be added corresponding to the first tenant; C jb represents the number of servers to be processed corresponding to the first server The total number of tasks.
  • the redundancy value of the first interval when the total number of tasks to be processed corresponding to the first server is greater than the second boundary value of the first interval corresponding to the first server, based on the first interval corresponding to the first server Recalculate the total number of tasks to be processed corresponding to the first server; based on the first boundary value of the first interval corresponding to the first server, the total number of servers corresponding to the first tenant, and recalculate The calculated total number of tasks to be processed corresponding to the first server determines the number of servers to be added corresponding to the first tenant. In practical application, the formula Calculate the number of servers to be added corresponding to the first tenant, where,
  • the redundancy value of the first interval when the total number of tasks to be processed by the first server is less than or equal to the sum of the first boundary value of the corresponding first interval and the set redundancy value, based on the first The first boundary value of the first interval corresponding to the server, the set redundancy value corresponding to the first interval, the total number of servers corresponding to the first tenant, and the total number of tasks to be processed corresponding to the first server determine the corresponding The number of servers to be added.
  • electronics are based on the formula Calculate the number of servers to be added corresponding to the first tenant.
  • the first information corresponding to the server includes the performance parameters of the server, it is necessary to consider the performance difference between the servers, and determine the number of servers to be added corresponding to the first tenant by the following method:
  • the electronic device determines the number of servers to be added corresponding to the first tenant through formula (1) and formula (2):
  • the electronic device determines the number of servers to be added corresponding to the first tenant based on the following formulas (3) to (5):
  • the total number of servers corresponding to the first tenant determines the number of servers to be added corresponding to the first tenant.
  • the electronic device determines the number of servers to be added corresponding to the first tenant through formula (1)' and formula (2), wherein the formula (1)' is as follows:
  • C ri represents the set redundancy value of the first section corresponding to the i-th server.
  • the redundancy value of the first interval when the total number of tasks to be processed corresponding to the first server is greater than or equal to the difference between the second boundary value of the corresponding first interval and the set redundancy value, based on the second Recalculate the total number of tasks to be processed corresponding to each server corresponding to the first tenant based on the first boundary value and the second boundary value of the first interval corresponding to each server corresponding to the first tenant;
  • the total number of tasks to be processed corresponding to each server corresponding to the first tenant of the first tenant determines the number of servers to be added corresponding to the first tenant.
  • the electronic device determines the number of servers to be added corresponding to the first tenant based on the following formula (3)', formula (4) and formula (5), where the formula (3)'
  • the embodiment of the present application also provides a server, as shown in Figure 3, the electronic device includes:
  • the obtaining unit 31 is configured to obtain the total number of pending tasks cached in the cache queue corresponding to each server in the server cluster;
  • the prompt unit 32 is configured to output first prompt information when the total number of tasks to be processed corresponding to the first server in the server cluster is not in the first interval corresponding to the first server;
  • the first prompt information indicates that the first server has a task delay risk; the first interval indicates the interval of the maximum total number of pending tasks allowed to exist in the cache queue of the server; the first interval is based on the server cluster.
  • the first information corresponding to each server is determined; the first information represents the data processing capability of the server corresponding to each tenant when processing historical tasks.
  • the obtaining unit 31 is specifically configured as:
  • the first information includes historical task information of each tenant; the electronic device further includes:
  • the first determining unit is configured to determine, based on the historical task information of each tenant corresponding to each server in the server cluster, the maximum total amount of tasks of each tenant corresponding to each server, the peak average processing speed corresponding to each server, The total number of servers corresponding to each tenant and the maximum set delay time of historical tasks corresponding to each tenant; where the maximum total amount of tasks represents the maximum total amount of historical tasks waiting to be processed; the peak average processing speed represents all of the task processing speed the mean value of the peak value;
  • the second determination unit is configured to determine based on the maximum total amount of tasks corresponding to each tenant corresponding to each server, the peak average processing speed corresponding to each server, the total number of servers corresponding to each tenant, and The maximum set delay time for each server is determined to determine the first interval corresponding to each server.
  • the second determination unit is specifically configured to:
  • the first information further includes server performance parameters; the second determination unit is further configured to: based on the total number of servers corresponding to each tenant, the performance of each server corresponding to each tenant The parameters and the maximum total amount of tasks corresponding to each tenant corresponding to each server determine the first boundary value of the first interval corresponding to the server.
  • the update unit is configured to update the first interval corresponding to each server by executing a scheduled task.
  • the electronic device also includes:
  • An output unit configured to output the number of servers to be added corresponding to the first tenant when the total number of tasks to be processed corresponding to the first server in the server cluster is not in the first interval corresponding to the first server ;
  • the first tenant is the tenant corresponding to the first server.
  • the electronic device also includes:
  • the first parameters include:
  • the total number of servers corresponding to the first tenant The total number of servers corresponding to the first tenant.
  • the first parameter also includes:
  • the set redundancy value corresponding to the first interval is the set redundancy value corresponding to the first interval.
  • each of the above units can be composed of a processor in an electronic device, such as a central processing unit (CPU, Central Processing Unit), a digital signal processor (DSP, Digital Signal Processor), a micro control unit (MCU, Microcontroller Unit) or a Programmable Gate Array (FPGA, Field-Programmable Gate Array) and other implementations.
  • a processor in an electronic device, such as a central processing unit (CPU, Central Processing Unit), a digital signal processor (DSP, Digital Signal Processor), a micro control unit (MCU, Microcontroller Unit) or a Programmable Gate Array (FPGA, Field-Programmable Gate Array) and other implementations.
  • the processor needs to run the programs stored in the memory to realize the functions of the above-mentioned program modules.
  • the electronic device provided in the above embodiment performs task delay risk detection, it only uses the division of the above-mentioned program modules as an example for illustration. In practical applications, the above-mentioned processing can be assigned by different program modules according to needs. , that is, divide the internal structure of the device into different program modules, so as to complete all or part of the processing described above.
  • the electronic device provided in the above embodiment and the embodiment of the task delay risk detection method belong to the same concept, and the specific implementation process thereof is detailed in the method embodiment, and will not be repeated here.
  • FIG. 4 is a schematic diagram of the hardware composition structure of the electronic device of the embodiment of the present application. As shown in FIG. 4, the electronic device 4 includes:
  • Communication interface 41 capable of exchanging information with other devices such as network devices;
  • the processor 42 is connected to the communication interface 41 to realize information interaction with other devices, and is configured to execute the task delay risk detection method provided by one or more technical solutions above when running a computer program. Instead, the computer program is stored on the memory 43 .
  • bus system 44 is configured to enable connection communication between these components.
  • bus system 44 also includes a power bus, a control bus and a status signal bus.
  • the various buses are labeled as bus system 44 in FIG. 4 .
  • the memory 43 in the embodiment of the present application is configured to store various types of data to support the operation of the electronic device 4 .
  • Examples of such data include: any computer program for operating on the electronic device 4 .
  • the volatile memory may be random access memory (RAM, Random Access Memory), which is used as an external cache.
  • RAM random access memory
  • RAM Random Access Memory
  • many forms of RAM are available, such as Static Random Access Memory (SRAM, Static Random Access Memory), Synchronous Static Random Access Memory (SSRAM, Synchronous Static Random Access Memory), Dynamic Random Access Memory Memory (DRAM, Dynamic Random Access Memory), synchronous dynamic random access memory (SDRAM, Synchronous Dynamic Random Access Memory), double data rate synchronous dynamic random access memory (DDRSDRAM, Double Data Rate Synchronous Dynamic Random Access Memory), enhanced Synchronous Dynamic Random Access Memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), Synchronous Link Dynamic Random Access Memory (SLDRAM, Sync Link Dynamic Random Access Memory), Direct Memory Bus Random Access Memory (DRRAM, Direct Rambus Random Access Memory) Memory).
  • SRAM Static Random Access Memory
  • SSRAM Synchronous Static Random Access Memory
  • DRAM Dynamic Random Access Memory
  • SDRAM Synchronous Dynamic Random Access Memory
  • the methods disclosed in the foregoing embodiments of the present application may be applied to the processor 42 or implemented by the processor 42 .
  • the processor 42 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 42 or instructions in the form of software.
  • the aforementioned processor 42 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like.
  • the processor 42 may implement or execute various methods, steps, and logic block diagrams disclosed in the embodiments of the present application.
  • a general purpose processor may be a microprocessor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor.
  • the software module may be located in a storage medium, and the storage medium is located in the memory 43, and the processor 42 reads the program in the memory 43, and completes the steps of the foregoing method in combination with its hardware.
  • the embodiment of the present application also provides a storage medium, that is, a computer storage medium, specifically a computer-readable storage medium, for example, including a first memory 43 storing a computer program, and the above-mentioned computer program can be processed by the terminal
  • the device 42 is executed to complete the steps described in the foregoing method.
  • the computer-readable storage medium can be memories such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disk, or CD-ROM.
  • the units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units; Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application can be integrated into one processing module, or each unit can be used as a single unit, or two or more units can be integrated into one unit; the above-mentioned integration
  • the unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
  • the term "and/or" in the embodiment of the present application is only a kind of association relationship describing associated objects, which means that there may be three kinds of relationships, for example, A and/or B, which can mean: A alone exists , both A and B exist, and B exists alone.
  • the term "at least one” herein means any combination of any one or more of at least two of a plurality, for example, including at least one of A, B, and C, which may mean including from A, Any one or more elements selected from the set formed by B and C.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Quality & Reliability (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Hardware Redundancy (AREA)

Abstract

A task delay risk detection method, an electronic device (4), and a storage medium. The task delay risk detection method comprises: acquiring the total number of tasks to be processed that are cached in a cache queue corresponding to each server in a server cluster (101); and when the total number of tasks to be processed that correspond to a first server in the server cluster is not in a first interval corresponding to the first server, outputting first prompt information (102), wherein the first prompt information represents the fact that the first server has a task delay risk; the first interval represents an interval, where the maximum total number of tasks to be processed that are allowed to exist are located, in the cache queue of the server; the first interval is determined on the basis of first information corresponding to each server in the server cluster; and the first information represents the data processing capability of a server corresponding to each tenant during the processing of a historical task.

Description

任务延迟风险检测方法、电子设备及存储介质Task delay risk detection method, electronic device and storage medium
相关申请的交叉引用Cross References to Related Applications
本申请基于申请号为202110644030.6,申请日为2021年06月09日的中国专利申请提出,并要求上述中国专利申请的优先权,上述中国专利申请的全部内容在此引入本申请作为参考。This application is based on a Chinese patent application with application number 202110644030.6 and a filing date of June 9, 2021, and claims the priority of the above-mentioned Chinese patent application. The entire content of the above-mentioned Chinese patent application is hereby incorporated by reference into this application.
技术领域technical field
本申请涉及计算机技术领域,具体涉及一种任务延迟风险检测方法、电子设备及存储介质。The present application relates to the field of computer technology, and in particular to a task delay risk detection method, electronic equipment and a storage medium.
背景技术Background technique
随着计算机技术的发展,越来越多的技术(例如,大数据等)应用在金融领域,传统金融业正在逐步向金融科技转变,然而,由于金融行业的安全性、实时性要求,金融科技也对技术提出了更高的要求。金融科技领域下,针对服务器集群,通过基于峰值时间用户提交任务的速度和每秒处理的最大任务数量之间的差值判断是否小于设定阈值,来确定服务器集群是否能够满足计算需求。但是,针对执行大数据批量任务的服务器集群而言,由于用户在单位时间内提交的任务数量有限,且单个任务响应时间长,因此,采用这种方法无法准确地确定出服务器集群是否能够满足计算需求,进而无法准确地确定是否存在任务延迟风险。With the development of computer technology, more and more technologies (for example, big data, etc.) are applied in the financial field, and the traditional financial industry is gradually transforming into financial technology. It also puts forward higher requirements for technology. In the field of financial technology, for server clusters, it is determined whether the server cluster can meet the computing needs by judging whether the difference between the speed of tasks submitted by users at the peak time and the maximum number of tasks processed per second is less than the set threshold. However, for server clusters that perform large data batch tasks, due to the limited number of tasks submitted by users per unit time and the long response time of a single task, this method cannot accurately determine whether the server cluster can meet the computing requirements. demand, making it impossible to accurately determine whether there is a risk of task delay.
发明内容Contents of the invention
为解决相关技术问题,本申请实施例提供了一种任务延迟风险检测方法、电子设备及存储介质。In order to solve related technical problems, embodiments of the present application provide a task delay risk detection method, electronic equipment, and a storage medium.
本申请实施例提供了一种任务延迟风险检测方法,包括:The embodiment of this application provides a task delay risk detection method, including:
获取服务器集群中每台服务器对应的缓存队列中缓存的待处理任务的总数;Obtain the total number of pending tasks cached in the cache queue corresponding to each server in the server cluster;
在所述服务器集群中第一服务器对应的待处理任务的总数未处于所述第一服务器对应的第一区间的情况下,输出第一提示信息;其中,When the total number of tasks to be processed corresponding to the first server in the server cluster is not in the first interval corresponding to the first server, output first prompt information; wherein,
所述第一提示信息表征所述第一服务器存在任务延迟风险;所述第一区间表征服务器的缓存队列中允许存在的待处理任务的最大总数的区间;所述第一区间基于所述服务器集群中每台服务器对应的第一信息确定出; 所述第一信息表征每个租户对应的服务器在处理历史任务时的数据处理能力。The first prompt information indicates that the first server has a task delay risk; the first interval indicates the interval of the maximum total number of pending tasks allowed to exist in the cache queue of the server; the first interval is based on the server cluster The first information corresponding to each server is determined; the first information represents the data processing capability of the server corresponding to each tenant when processing historical tasks.
上述方案中,所述第一信息包括每个租户的历史任务信息;所述方法还包括:In the above solution, the first information includes historical task information of each tenant; the method further includes:
基于服务器集群中每台服务器对应的每个租户的历史任务信息,确定出每台服务器对应的每个租户的最大任务总量、每台服务器对应的峰值平均处理速度、每个租户对应的服务器的总数和每个租户对应的历史任务的最大设定延迟时间;其中,最大任务总量表征等待处理的历史任务的最大总量;峰值平均处理速度表征任务处理速度的所有峰值的均值;Based on the historical task information of each tenant corresponding to each server in the server cluster, determine the maximum total amount of tasks for each tenant corresponding to each server, the peak average processing speed corresponding to each server, and the server corresponding to each tenant. The total number and the maximum set delay time of historical tasks corresponding to each tenant; among them, the maximum total amount of tasks represents the maximum total amount of historical tasks waiting to be processed; the peak average processing speed represents the average value of all peaks of task processing speed;
基于所述每台服务器对应的每个租户对应的最大任务总量、所述每台服务器对应的峰值平均处理速度、所述每个租户对应的服务器的总数和确定出的最大设定延迟时间,确定出每台服务器对应的第一区间。Based on the maximum total amount of tasks corresponding to each tenant corresponding to each server, the peak average processing speed corresponding to each server, the total number of servers corresponding to each tenant, and the determined maximum set delay time, Determine the first interval corresponding to each server.
上述方案中,所述基于所述每台服务器对应的每个租户对应的最大任务总量、所述每台服务器对应的峰值平均处理速度、所述每个租户对应的服务器的总数和确定出的最大设定延迟时间,确定出每台服务器对应的第一区间,包括:In the above solution, the maximum total amount of tasks corresponding to each tenant corresponding to each server, the peak average processing speed corresponding to each server, the total number of servers corresponding to each tenant, and the determined The maximum setting delay time determines the first interval corresponding to each server, including:
基于每个租户对应的服务器的总数和所述每台服务器对应的每个租户对应的最大任务总量,确定出服务器对应的第一区间的第一边界值;Based on the total number of servers corresponding to each tenant and the maximum total amount of tasks corresponding to each tenant corresponding to each server, determine the first boundary value of the first interval corresponding to the server;
基于所述每台服务器对应的峰值平均处理速度和确定出的最大设定延迟时间,确定出服务器对应的第一区间的第二边界值;所述第一边界值小于所述第二边界值。Based on the peak average processing speed corresponding to each server and the determined maximum set delay time, determine a second boundary value of the first section corresponding to the server; the first boundary value is smaller than the second boundary value.
上述方案中,所述第一信息还包括服务器的性能参数;所述方法还包括:In the above solution, the first information also includes performance parameters of the server; the method further includes:
基于所述每个租户对应的服务器的总数、每个租户对应的每台服务器的性能参数和所述每台服务器对应的每个租户对应的最大任务总量,确定出服务器对应的第一区间的第一边界值。Based on the total number of servers corresponding to each tenant, the performance parameters of each server corresponding to each tenant, and the maximum total amount of tasks corresponding to each tenant corresponding to each server, determine the number of the first interval corresponding to the server first boundary value.
上述方案中,所述方法还包括:In the above scheme, the method also includes:
通过执行定时任务,更新每台服务器对应的第一区间。By executing the timed task, the first section corresponding to each server is updated.
上述方案中,所述方法还包括:In the above scheme, the method also includes:
在所述服务器集群中第一服务器对应的待处理任务的总数未处于所述第一服务器对应的第一区间的情况下,输出第一租户对应的待新增的服务器的数量;其中,所述第一租户为所述第一服务器对应的租户。In the case where the total number of tasks to be processed corresponding to the first server in the server cluster is not in the first interval corresponding to the first server, output the number of servers to be added corresponding to the first tenant; wherein, the The first tenant is a tenant corresponding to the first server.
上述方案中,所述方法还包括:In the above scheme, the method also includes:
基于第一参数确定出所述第一租户对应的待新增的服务器的数量;其中,所述第一参数包括:Determine the number of servers to be added corresponding to the first tenant based on the first parameter; wherein the first parameter includes:
所述第一租户对应的每台服务器对应的待处理任务的总数;The total number of tasks to be processed corresponding to each server corresponding to the first tenant;
所述第一租户对应的每台服务器对应的第一区间的至少一个边界值;At least one boundary value of the first interval corresponding to each server corresponding to the first tenant;
所述第一租户对应的服务器的总数。The total number of servers corresponding to the first tenant.
上述方案中,所述第一参数还包括:In the above scheme, the first parameter also includes:
所述第一区间对应的设定冗余值。The set redundancy value corresponding to the first interval.
上述方案中,所述从服务器集群中每台服务器对应的缓存队列中,读取每台服务器对应的待处理任务的总数,包括:In the above solution, reading the total number of pending tasks corresponding to each server from the cache queue corresponding to each server in the server cluster includes:
在检测到服务器集群中至少一台第二服务器存在设定的负载风险,并已降低所述至少一台第二服务器对应的设定并发任务阈值的情况下,获取服务器集群中每台服务器对应的缓存队列中缓存的待处理任务的总数。When it is detected that at least one second server in the server cluster has a set load risk, and the set concurrent task threshold corresponding to the at least one second server has been reduced, obtain the corresponding task threshold of each server in the server cluster The total number of pending tasks cached in the cache queue.
本申请实施例还提供了一种电子设备,包括:The embodiment of the present application also provides an electronic device, including:
获取单元,配置为获取服务器集群中每台服务器对应的缓存队列中缓存的待处理任务的总数;The obtaining unit is configured to obtain the total number of pending tasks cached in the cache queue corresponding to each server in the server cluster;
提示单元,配置为在所述服务器集群中第一服务器对应的待处理任务的总数未处于所述第一服务器对应的第一区间的情况下,输出第一提示信息;其中,The prompt unit is configured to output first prompt information when the total number of tasks to be processed corresponding to the first server in the server cluster is not in the first interval corresponding to the first server; wherein,
所述第一提示信息表征所述第一服务器存在任务延迟风险;所述第一区间表征服务器的缓存队列中允许存在的待处理任务的最大总数的区间;所述第一区间基于所述服务器集群中每台服务器对应的第一信息确定出;所述第一信息表征每个租户对应的服务器在处理历史任务时的数据处理能力。The first prompt information indicates that the first server has a task delay risk; the first interval indicates the interval of the maximum total number of pending tasks allowed to exist in the cache queue of the server; the first interval is based on the server cluster The first information corresponding to each server is determined; the first information represents the data processing capability of the server corresponding to each tenant when processing historical tasks.
本申请实施例还提供了一种电子设备,包括:处理器和配置为存储能够在处理器上运行的计算机程序的存储器,其中,所述处理器配置为运行所述计算机程序时,执行上述任务延迟风险检测方法的步骤。An embodiment of the present application also provides an electronic device, including: a processor and a memory configured to store a computer program that can run on the processor, wherein the processor is configured to perform the above tasks when running the computer program Steps in the delay risk detection method.
本申请实施例还提供了一种存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任务延迟风险检测方法的步骤。The embodiment of the present application also provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method for detecting task delay risks are implemented.
本申请实施例,基于服务器集群中每台服务器对应的第一信息确定出每台服务器对应的第一区间;获取服务器集群中每台服务器对应的缓存队列中缓存的待处理任务的总数;在服务器集群中第一服务器对应的待处理任务的总数未处于第一服务器对应的第一区间的情况下,输出第一提示信息,以提示第一服务器存在任务延迟风险;其中,第一信息表征每个租户对应的服务器在处理历史任务时的数据处理能力;第一区间表征服务器的缓存队列中允许存在的待处理任务的最大总数的区间。上述方案中,基于服务器对历史任务的处理情况确定出对应的第一区间,通过将服务器对应的待处理任务的总数与该服务器对应的第一区间进行比较,可以根据比较结果准确地确定出该服务器是否能够满足计算需求,从而能够准确地确定出服务器是否存在任务延迟风险。In the embodiment of the present application, the first interval corresponding to each server is determined based on the first information corresponding to each server in the server cluster; the total number of cached tasks to be processed in the cache queue corresponding to each server in the server cluster is obtained; When the total number of tasks to be processed corresponding to the first server in the cluster is not in the first interval corresponding to the first server, output first prompt information to prompt the first server that there is a risk of task delay; wherein, the first information represents each The data processing capability of the server corresponding to the tenant when processing historical tasks; the first interval represents the interval of the maximum total number of pending tasks allowed to exist in the cache queue of the server. In the above solution, the corresponding first interval is determined based on the processing of historical tasks by the server, and by comparing the total number of tasks to be processed corresponding to the server with the first interval corresponding to the server, the comparison result can be accurately determined. Whether the server can meet the computing demand can accurately determine whether the server has a task delay risk.
附图说明Description of drawings
图1为本申请实施例提供的任务延迟风险检测方法的实现流程示意图;FIG. 1 is a schematic diagram of the implementation process of the task delay risk detection method provided by the embodiment of the present application;
图2为本申请实施例提供的任务延迟风险检测方法中确定第一区间的实现流程示意图;FIG. 2 is a schematic diagram of the implementation process of determining the first interval in the task delay risk detection method provided by the embodiment of the present application;
图3为本申请实施例提供的电子设备的结构示意图;FIG. 3 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
图4为本申请实施例提供的电子设备的硬件组成结构示意图。FIG. 4 is a schematic diagram of a hardware composition structure of an electronic device provided by an embodiment of the present application.
具体实施方式Detailed ways
针对一个服务器集群,由于服务器集群每秒处理的最大任务数量TPS total相对来说是一个定值,可以对服务器集群中每台服务器每秒处理的最大任务数量进行求和得到,因此,在确定出峰值时间用户提交任务的速度TPS job的情况下,计算出TPS total与TPS job之间的差值,判断该差值是否小于设定阈值,在该差值小于设定阈值的情况下,说明服务器集群处理任务的速度跟大于用户提交任务的速度,服务器集群能够满足租户的计算需求,不存在任务延迟风险;在该差值大于或等于该设定阈值的情况下,说明服务器集群处理任务的速度跟不上用户提交任务的速度,服务器集群不能满足用户的计算需求,存在任务延迟风险。其中,
Figure PCTCN2021136007-appb-000001
TPS job表征用户在峰值时间内每秒提交的任务的数量;JOB g表征一天内用户向服务器集群提交的任务总量;φ%表征在峰值时间内处理的任务与总任务量的百分比;θ%表征峰值时间与总时间的百分比。
For a server cluster, since the maximum number of tasks TPS total processed by the server cluster per second is relatively a fixed value, it can be obtained by summing the maximum number of tasks processed by each server per second in the server cluster. Therefore, after determining In the case of TPS job , the speed at which users submit tasks at the peak time, calculate the difference between TPS total and TPS job , and judge whether the difference is less than the set threshold. If the difference is less than the set threshold, indicate that the server The speed of the cluster processing task is greater than the speed of the user submitting the task, the server cluster can meet the computing needs of the tenants, and there is no risk of task delay; when the difference is greater than or equal to the set threshold, it indicates the speed of the server cluster processing task If it cannot keep up with the speed at which users submit tasks, the server cluster cannot meet the computing needs of users, and there is a risk of task delay. in,
Figure PCTCN2021136007-appb-000001
TPS job represents the number of tasks submitted by the user per second during the peak time; JOB g represents the total amount of tasks submitted by the user to the server cluster in one day; φ% represents the percentage of tasks processed during the peak time and the total task volume; θ% Characterize the percentage of peak time to total time.
针对单个任务响应时间短、单位时间内用户提交的任务数量数大的场景下,采用上述方法可以准确地确定出服务器集群是否能够满足计算需求,但是,服务器集群用于处理大数据批量任务时,用户在单位时间内提交的任务数量有限,且单个任务响应时间较长,采用上述方法无法准确地确定出服务器集群是否能够满足计算需求,进而无法准确地确定是否存在任务延迟风险。For scenarios where the response time of a single task is short and the number of tasks submitted by users per unit time is large, the above method can be used to accurately determine whether the server cluster can meet the computing requirements. However, when the server cluster is used to process large data batch tasks, The number of tasks submitted by users per unit time is limited, and the response time of a single task is long. Using the above method, it is impossible to accurately determine whether the server cluster can meet the computing needs, and thus cannot accurately determine whether there is a risk of task delay.
为了解决上述技术问题,本申请实施例提供了一种任务延迟风险检测方法,基于服务器集群中每台服务器对应的第一信息确定出每台服务器对应的第一区间;获取服务器集群中每台服务器对应的缓存队列中缓存的待处理任务的总数;在服务器集群中第一服务器对应的待处理任务的总数未处于第一服务器对应的第一区间的情况下,输出第一提示信息,以提示第一服务器存在任务延迟风险;其中,第一信息表征每个租户对应的服务器在处理历史任务时的数据处理能力;第一区间表征服务器的缓存队列中允许存在的待处理任务的最大总数的区间。上述方案中,基于服务器对历史任务的处理情况确定出对应的第一区间,通过将服务器对应的待处理任务的总数与该服务器对应的第一区间进行比较,可以根据比较结果准确地确定出该服务器是否能够满足计算需求,从而能够准 确地确定出服务器是否存在任务延迟风险。In order to solve the above technical problems, the embodiment of the present application provides a task delay risk detection method, which determines the first interval corresponding to each server based on the first information corresponding to each server in the server cluster; obtains the first interval corresponding to each server in the server cluster The total number of tasks to be processed cached in the corresponding cache queue; when the total number of tasks to be processed corresponding to the first server in the server cluster is not in the first interval corresponding to the first server, output the first prompt message to prompt the first interval A server has a task delay risk; wherein, the first information represents the data processing capability of the server corresponding to each tenant when processing historical tasks; the first interval represents the interval of the maximum total number of pending tasks allowed to exist in the cache queue of the server. In the above solution, the corresponding first interval is determined based on the processing of historical tasks by the server, and by comparing the total number of tasks to be processed corresponding to the server with the first interval corresponding to the server, the comparison result can be accurately determined. Whether the server can meet the computing demand can accurately determine whether the server has a task delay risk.
图1为本申请实施例提供的任务延迟风险检测方法的实现流程示意图,其中,流程的执行主体为终端或服务器等电子设备。如图1示出的,任务延迟风险检测方法包括:FIG. 1 is a schematic diagram of the implementation process of the task delay risk detection method provided by the embodiment of the present application, wherein the execution subject of the process is an electronic device such as a terminal or a server. As shown in Figure 1, the task delay risk detection method includes:
步骤101:获取服务器集群中每台服务器对应的缓存队列中缓存的待处理任务的总数。Step 101: Obtain the total number of pending tasks cached in the cache queue corresponding to each server in the server cluster.
这里,服务器集群中的每个服务器配置有一个缓存队列,缓存队列用于在服务器没有空闲资源,例如,空闲线程时,将接收到的任务缓存到缓存队列中,以等待资源释放,在释放出空闲资源时,利用释放出的空闲资源处理从缓存队列中取出的任务。Here, each server in the server cluster is configured with a cache queue. The cache queue is used to cache the received tasks into the cache queue when the server has no idle resources, such as idle threads, to wait for the resources to be released. When idle resources are used, the released idle resources are used to process tasks taken out of the cache queue.
电子设备可以向服务器集群中的每台服务器发送获取请求,以请求获取对应服务器对应的缓存队列中缓存的待处理任务的总数;电子设备接收服务器基于获取请求发送的缓存队列中缓存的待处理任务的总数。The electronic device can send an acquisition request to each server in the server cluster to request the total number of cached tasks to be processed in the cache queue corresponding to the corresponding server; the electronic device receives the cached pending tasks in the cache queue sent by the server based on the acquisition request total.
电子设备也可以接收服务器主动上报的缓存队列中缓存的待处理任务的总数。其中,The electronic device may also receive the total number of pending tasks cached in the cache queue actively reported by the server. in,
服务器可以从各自对应的缓存队列中读取待处理任务的总数,并将读取到的待处理任务的总数向电子设备发送;在服务器记录了缓存队列中读取待处理任务的总数的情况下,可以将记录的待处理任务的总数向电子设备发送。The server can read the total number of pending tasks from their corresponding cache queues, and send the read total number of pending tasks to the electronic device; when the server records the total number of read pending tasks in the cache queue , the total number of recorded tasks to be processed may be sent to the electronic device.
在实际应用中,在检测到服务器集群中的服务器存在负载风险的情况下,通常会下调对应服务器对应的设定并发任务阈值,考虑到在服务器集群中的服务器存在负载风险,并已降低对应服务器对应的设定并发任务阈值的情况下,可能引发任务延迟风险,在一些实施例中,所述从服务器集群中每台服务器对应的缓存队列中,读取每台服务器对应的待处理任务的总数,包括:In practical applications, when a server in a server cluster is detected to have a load risk, the set concurrent task threshold corresponding to the corresponding server is usually lowered. Considering that the server in the server cluster has a load risk, the corresponding server has been reduced. In the case of correspondingly setting the concurrent task threshold, the risk of task delay may be caused. In some embodiments, the total number of pending tasks corresponding to each server is read from the cache queue corresponding to each server in the server cluster. ,include:
在检测到服务器集群中至少一台第二服务器存在设定的负载风险,并已降低所述至少一台第二服务器对应的设定并发任务阈值的情况下,获取服务器集群中每台服务器对应的缓存队列中缓存的待处理任务的总数。When it is detected that at least one second server in the server cluster has a set load risk, and the set concurrent task threshold corresponding to the at least one second server has been reduced, obtain the corresponding task threshold of each server in the server cluster The total number of pending tasks cached in the cache queue.
这里,电子设备可以通过运行设定脚本,来检测服务器集群中每台服务器是否存在设定的负载风险;在检测到服务器集群中的至少一台第二服务器存在设定的负载风险的情况下,降低对应的第二服务器对应的设定并发任务阈值;在已降低至少一台第二服务器对应的设定并发任务阈值的情况下,获取服务器集群中每台服务器对应的缓存队列中缓存的待处理任务的总数,以便电子设备能够基于确定出的待处理任务的总数,确定出对应的服务器是否存在任务延迟风险。其中,设定并发任务阈值是指可处理的并发任务的最大数量;设定的负载风险包括以下至少之一:Here, the electronic device can detect whether each server in the server cluster has a set load risk by running the set script; when it is detected that at least one second server in the server cluster has a set load risk, Reduce the set concurrent task threshold corresponding to the corresponding second server; in the case that the set concurrent task threshold corresponding to at least one second server has been reduced, obtain the cached pending tasks in the cache queue corresponding to each server in the server cluster The total number of tasks, so that the electronic device can determine whether the corresponding server has a task delay risk based on the determined total number of tasks to be processed. Wherein, setting the concurrent task threshold refers to the maximum number of concurrent tasks that can be processed; the set load risk includes at least one of the following:
租户对应的任务类型发生变更;The task type corresponding to the tenant changes;
耗时长的任务的数量增加;Increased number of time-consuming tasks;
服务器的负载过高;The server load is too high;
执行任务失败。Failed to execute task.
任务延迟风险包括以下之一:Task delay risks include one of the following:
缓存队列中缓存的待处理任务的总数过大或过小;The total number of pending tasks cached in the cache queue is too large or too small;
任务执行时长超出了允许的设定范围;The task execution time exceeds the allowable setting range;
任务延迟时间大于设定延迟时间。The task delay time is greater than the set delay time.
步骤102:在所述服务器集群中第一服务器对应的待处理任务的总数未处于所述第一服务器对应的第一区间的情况下,输出第一提示信息;其中,所述第一提示信息表征所述第一服务器存在任务延迟风险;所述第一区间表征服务器的缓存队列中允许存在的待处理任务的最大总数的区间;所述第一区间基于所述服务器集群中每台服务器对应的第一信息确定出;所述第一信息表征每个租户对应的服务器在处理历史任务时的数据处理能力。Step 102: When the total number of tasks to be processed corresponding to the first server in the server cluster is not in the first range corresponding to the first server, output first prompt information; wherein, the first prompt information represents The first server has a task delay risk; the first interval represents the interval of the maximum total number of pending tasks allowed to exist in the cache queue of the server; the first interval is based on the first interval corresponding to each server in the server cluster The first information is determined; the first information represents the data processing capability of the server corresponding to each tenant when processing historical tasks.
这里,电子设备将获取到的每台服务器对应的待处理任务的总数与对应服务器对应的第一区间进行比较,得到比较结果。在比较结果表征第一服务器对应的待处理任务的总数未处于第一服务器对应的第一区间的情况下,表征第一服务器存在任务延迟风险,输出第一提示信息。其中,第一服务器是指服务器集群中的任一服务器;第一服务器对应的待处理任务的总数未处于第一服务器对应的第一区间是指,第一服务器对应的待处理任务的总数小于第一服务器对应的第一区间的第一边界值,或者第一服务器对应的待处理任务的总数大于第一服务器对应的第一区间的第一边界值。Here, the electronic device compares the acquired total number of tasks to be processed corresponding to each server with the first interval corresponding to the corresponding server, and obtains a comparison result. If the comparison result indicates that the total number of tasks to be processed corresponding to the first server is not in the first interval corresponding to the first server, it indicates that the first server has a task delay risk, and outputs first prompt information. Wherein, the first server refers to any server in the server cluster; the total number of tasks to be processed corresponding to the first server is not in the first interval corresponding to the first server means that the total number of tasks to be processed corresponding to the first server is less than the first interval corresponding to the first server The first boundary value of the first section corresponding to a server, or the total number of tasks to be processed corresponding to the first server is greater than the first boundary value of the first section corresponding to the first server.
需要说明的是,第一区间是在获取服务器对应的缓存队列中缓存的待处理任务的总数之前确定出的。It should be noted that the first interval is determined before acquiring the total number of tasks to be processed cached in the cache queue corresponding to the server.
实际应用时,第一信息至少包括服务器对应的每个租户的历史任务信息确定出服务器对应的第一区间;第一信息还可以包括服务器的性能参数。In actual application, the first information includes at least the historical task information of each tenant corresponding to the server to determine the first interval corresponding to the server; the first information may also include performance parameters of the server.
本申请实施例中,基于服务器对历史任务的处理情况确定出对应的第一区间,通过将服务器对应的待处理任务的总数与该服务器对应的第一区间进行比较,可以根据比较结果准确地确定出该服务器是否能够满足计算需求,从而能够准确地确定出服务器是否存在任务延迟风险,并在服务器存在任务延迟风险的情况下,输出第一提示信息,对任务延迟风险进行预警,以便运维人员进行处理。In the embodiment of the present application, the corresponding first interval is determined based on the server's processing of historical tasks, and by comparing the total number of tasks to be processed corresponding to the server with the first interval corresponding to the server, it can be accurately determined according to the comparison result Whether the server can meet the computing requirements can accurately determine whether the server has a task delay risk, and if the server has a task delay risk, output the first prompt information to give an early warning of the task delay risk, so that the operation and maintenance personnel to process.
图2示出了本申请实施例提供的任务延迟风险检测方法中确定第一区间的实现流程示意图,在一些实施例中,所述第一信息包括每个租户的历史任务信息,所述方法还包括:Fig. 2 shows a schematic diagram of the implementation process of determining the first interval in the task delay risk detection method provided by the embodiment of the present application. In some embodiments, the first information includes historical task information of each tenant, and the method also includes include:
步骤201:基于服务器集群中每台服务器对应的每个租户的历史任 务信息,确定出每台服务器对应的每个租户的最大任务总量、每台服务器对应的峰值平均处理速度、每个租户对应的服务器的总数和每个租户对应的历史任务的最大设定延迟时间;其中,最大任务总量表征等待处理的历史任务的最大总量;峰值平均处理速度表征任务处理速度的所有峰值的均值。Step 201: Based on the historical task information of each tenant corresponding to each server in the server cluster, determine the maximum total amount of tasks of each tenant corresponding to each server, the peak average processing speed corresponding to each server, and the corresponding The total number of servers and the maximum set delay time of historical tasks corresponding to each tenant; where the maximum total amount of tasks represents the maximum total amount of historical tasks waiting to be processed; the peak average processing speed represents the average of all peaks of task processing speed.
这里,电子设备可以实时或按照设定时间间隔采集服务器集群中每个服务器对应的每个租户对应的历史任务信息。其中,历史任务信息包括服务器对应的每个租户在不同时刻对应的等待处理的历史任务的总量、服务器在不同时刻对应的任务处理速度、以及每个租户对应的每个历史任务对应的最大设定延迟时间;任务处理速度表征每秒处理的历史任务的数量。Here, the electronic device may collect historical task information corresponding to each tenant corresponding to each server in the server cluster in real time or according to a set time interval. Among them, the historical task information includes the total amount of historical tasks waiting to be processed corresponding to each tenant corresponding to the server at different times, the task processing speed corresponding to the server at different times, and the maximum setting value corresponding to each historical task corresponding to each tenant. Delay time; task processing speed represents the number of historical tasks processed per second.
这里,电子设备基于服务器集群中每台服务器对应的每个租户的历史任务信息,确定出服务器与租户之间的对应关系,并基于服务器与租户之间的对应关系,确定出每个租户对应的服务器的总数。Here, the electronic device determines the corresponding relationship between the server and the tenant based on the historical task information of each tenant corresponding to each server in the server cluster, and determines the corresponding relationship between the server and the tenant based on the corresponding relationship between the server and the tenant. Total number of servers.
电子设备从服务器对应的每个租户对应的历史任务信息中,确定出服务器对应的每个租户在不同时刻对应的等待处理的历史任务的总量;从服务器对应的每个租户在不同时刻对应的等待处理的历史任务的总量中,确定出服务器对应的每个租户对应的等待处理的历史任务的最大总量,得到该服务器对应的每个租户的最大任务总量。From the historical task information corresponding to each tenant corresponding to the server, the electronic device determines the total amount of historical tasks corresponding to each tenant corresponding to the server at different moments; Among the total amount of historical tasks waiting to be processed, the maximum total amount of historical tasks corresponding to each tenant corresponding to the server is determined to obtain the maximum total amount of historical tasks corresponding to each tenant of the server.
电子设备从服务器对应的每个租户对应的历史任务信息中,确定出服务器在不同时刻对应的任务处理速度,任务处理速度表征每秒处理的任务的数量;基于服务器在不同时刻对应的任务处理速度,确定出服务器对应的任务处理速度曲线;从服务器对应的任务处理速度曲线中,确定出该服务器对应的任务处理速度的所有峰值;计算该服务器对应的任务处理速度的所有峰值的均值,得到服务器对应的峰值平均处理速度。The electronic device determines the task processing speed corresponding to the server at different times from the historical task information corresponding to each tenant corresponding to the server. The task processing speed represents the number of tasks processed per second; based on the task processing speed corresponding to the server at different times , determine the task processing speed curve corresponding to the server; from the task processing speed curve corresponding to the server, determine all the peak values of the task processing speed corresponding to the server; calculate the mean value of all peak values of the task processing speed corresponding to the server, and obtain the Corresponding peak average processing speed.
历史任务信息包括历史任务对应的最大设定延迟时间,电子设备从服务器对应的每个租户的历史任务信息中,确定出服务器对应的每个租户对应的每个历史任务的最大设定延迟时间。The historical task information includes the maximum set delay time corresponding to the historical task, and the electronic device determines the maximum set delay time of each historical task corresponding to each tenant corresponding to the server from the historical task information of each tenant corresponding to the server.
步骤202:基于所述每台服务器对应的每个租户对应的最大任务总量、所述每台服务器对应的峰值平均处理速度、所述每个租户对应的服务器的总数和确定出的最大设定延迟时间,确定出每台服务器对应的第一区间。Step 202: Based on the maximum total amount of tasks corresponding to each tenant corresponding to each server, the peak average processing speed corresponding to each server, the total number of servers corresponding to each tenant, and the determined maximum setting The delay time determines the first interval corresponding to each server.
需要说明的是,当一台服务器对应的每个租户对应的每个历史任务的最大设定延迟时间中,存在不同的最大设定延迟时间时,将所有历史任务的最大设定延迟时间中的最小值,确定为该台服务器对应的历史任务的最大设定延迟时间。It should be noted that when there are different maximum set delay times in the maximum set delay time of each historical task corresponding to each tenant corresponding to a server, the maximum set delay time of all historical tasks The minimum value is determined as the maximum setting delay time of the historical tasks corresponding to this server.
考虑到实际应用中存在一个租户对应多台服务器的应用场景,以及多个租户对应多台服务器的应用场景,电子设备在确定出每台服务器对 应的每个租户对应的最大任务总量的情况下,基于每个租户对应的服务器,以及基于每台服务器对应的每个租户的最大任务总量,对同一个租户对应的等待处理的历史任务的最大总量进行求和,得到每个租户对应的最大任务积累量。Considering that there are application scenarios in which one tenant corresponds to multiple servers and multiple tenants correspond to multiple servers in actual applications, when the electronic device determines the maximum total amount of tasks corresponding to each tenant corresponding to each server , based on the server corresponding to each tenant, and based on the maximum total amount of tasks of each tenant corresponding to each server, the maximum total amount of historical tasks waiting to be processed corresponding to the same tenant is summed to obtain the corresponding Maximum task accumulation.
电子设备基于每台服务器对应的历史任务的最大设定延迟时间、每个租户对应的最大任务积累量、每个租户对应的服务器的总数以及每台服务器对应的峰值平均处理速度,确定出每台服务器对应的第一区间。Based on the maximum set delay time of historical tasks corresponding to each server, the maximum task accumulation amount corresponding to each tenant, the total number of servers corresponding to each tenant, and the peak average processing speed corresponding to each server, the electronic device determines the The first interval corresponding to the server.
实际应用时,电子设备按天统计每个租户对应的最大任务积累量,基于每个租户每天对应的最大任务积累量,确定出每个租户在设定周期内对应的最大任务积累量,采用每个租户在设定周期内对应的最大任务积累量计算该租户对应的服务器对应的第一区间。其中,设定周期的时长大于一天,例如,设定周期可以以周为最小单位,也可以以月为最小单位。In actual application, the electronic device counts the maximum cumulative amount of tasks corresponding to each tenant on a daily basis. Based on the maximum cumulative amount of tasks corresponding to each tenant per day, the maximum cumulative amount of tasks corresponding to each tenant within the set period is determined. The first interval corresponding to the server corresponding to the tenant is calculated according to the maximum accumulated amount of tasks corresponding to the tenant within the set period. Wherein, the duration of the setting period is longer than one day, for example, the setting period may be set with a minimum unit of week or month.
在本实施例中,电子设备可以基于服务器对应的历史任务信息确定出对应的第一区间,通过基于历史任务信息确定出的第一区间,来检测服务器是否存在任务延迟风险,可以提高任务延迟风险的检测结果的准确度。In this embodiment, the electronic device can determine the corresponding first interval based on the historical task information corresponding to the server, and detect whether the server has a task delay risk through the first interval determined based on the historical task information, which can improve the task delay risk. accuracy of the test results.
在一些实施例中,在步骤202中所述基于所述每台服务器对应的每个租户对应的最大任务总量、所述每台服务器对应的峰值平均处理速度、所述每个租户对应的服务器的总数和确定出的最大设定延迟时间,确定出每台服务器对应的第一区间,包括:In some embodiments, in step 202, based on the maximum total amount of tasks corresponding to each tenant corresponding to each server, the peak average processing speed corresponding to each server, and the server corresponding to each tenant The total number and the determined maximum set delay time determine the first interval corresponding to each server, including:
基于每个租户对应的服务器的总数和所述每台服务器对应的每个租户对应的最大任务总量,确定出服务器对应的第一区间的第一边界值;Based on the total number of servers corresponding to each tenant and the maximum total amount of tasks corresponding to each tenant corresponding to each server, determine the first boundary value of the first interval corresponding to the server;
基于所述每台服务器对应的峰值平均处理速度和确定出的最大设定延迟时间,确定出服务器对应的第一区间的第二边界值;所述第一边界值小于所述第二边界值。Based on the peak average processing speed corresponding to each server and the determined maximum set delay time, determine a second boundary value of the first section corresponding to the server; the first boundary value is smaller than the second boundary value.
这里,电子设备基于每个租户对应的服务器,以及基于每台服务器对应的每个租户的最大任务总量,对同一个租户对应的等待处理的历史任务的最大总量进行求和,得到每个租户对应的最大任务积累量;基于每个租户对应的最大任务积累量和每个租户对应的服务器的总数,计算出每个租户对应的每台服务器平均处理的任务数量,得到该租户对应的每台服务器对应的第一区间的第一边界值,即最小值。Here, based on the server corresponding to each tenant and the maximum total amount of tasks of each tenant corresponding to each server, the electronic device sums the maximum amount of historical tasks waiting to be processed corresponding to the same tenant to obtain each The maximum task accumulation corresponding to the tenant; based on the maximum task accumulation corresponding to each tenant and the total number of servers corresponding to each tenant, the average number of tasks processed by each server corresponding to each tenant is calculated, and the per-tenant corresponding to the tenant The first boundary value of the first interval corresponding to the server, that is, the minimum value.
实际应用时,基于以下公式计算每个租户对应的每台服务器对应的第一区间的第一边界值:
Figure PCTCN2021136007-appb-000002
其中,LB gi表征第g个租户对应的第i台服务器的第一区间的第一边界值;MAX g表征第g个租户对应的最大任务积累量;I g表征第g个租户对应的服务器的总数。
In actual application, the first boundary value of the first interval corresponding to each server corresponding to each tenant is calculated based on the following formula:
Figure PCTCN2021136007-appb-000002
Among them, LB gi represents the first boundary value of the first interval of the i-th server corresponding to the g-th tenant; MAX g represents the maximum task accumulation amount corresponding to the g-th tenant; I g represents the value of the server corresponding to the g-th tenant total.
电子设备将每台服务器对应的所有历史任务的最大设定延迟时间中 的最小值,确定为对应服务器对应的历史任务的最大设定延迟时间;基于每台服务器对应的历史任务的最大设定延迟时间和每台服务器对应的峰值平均处理速度,计算出每台服务器对应的第一区间的第二边界值,即最大值。其中,将同一台服务器对应的历史任务的最大设定延迟时间和峰值平均处理速度之间的乘积,确定为该服务器对应的第一区间的第二边界值。The electronic device determines the minimum value of the maximum set delay time of all historical tasks corresponding to each server as the maximum set delay time of the historical task corresponding to the corresponding server; based on the maximum set delay time of the historical task corresponding to each server Time and the peak average processing speed corresponding to each server, and calculate the second boundary value of the first interval corresponding to each server, that is, the maximum value. Wherein, the product of the maximum set delay time and the peak average processing speed of the historical tasks corresponding to the same server is determined as the second boundary value of the first section corresponding to the server.
实际应用时,基于以下公式计算出每台服务器对应的第一区间的第二边界值:UB gi=TPS gi×T bgi;其中,TPS g表征第g个租户对应的第i台服务器对应的峰值平均处理速度;T bgi表征第g个租户对应的第i台服务器对应的历史任务的最大设定延迟时间。 In actual application, the second boundary value of the first interval corresponding to each server is calculated based on the following formula: UB gi =TPS gi ×T bgi ; where, TPS g represents the peak value corresponding to the i-th server corresponding to the g-th tenant Average processing speed; T bgi represents the maximum set delay time of historical tasks corresponding to the i-th server corresponding to the g-th tenant.
本实施例中,在确定出每台服务器对应的第一区间的过程中,不考虑每台服务器的性能差异,可以简化计算第一区间的计算过程,提高计算第一区间的效率。In this embodiment, in the process of determining the first interval corresponding to each server, the performance difference of each server is not considered, so the calculation process of calculating the first interval can be simplified, and the efficiency of calculating the first interval can be improved.
考虑到服务器集群中每台服务器的性能可能不同,每个租户对应的不同服务器的数据处理能力可能不同,为了更准确地确定出第一区间中的第一边界值,在一些实施例中,所述第一信息还包括服务器的性能参数;所述方法还包括:Considering that the performance of each server in the server cluster may be different, and the data processing capabilities of different servers corresponding to each tenant may be different, in order to more accurately determine the first boundary value in the first interval, in some embodiments, the The first information also includes performance parameters of the server; the method also includes:
基于所述每个租户对应的服务器的总数、每个租户对应的每台服务器的性能参数和所述每台服务器对应的每个租户对应的最大任务总量,确定出服务器对应的第一区间的第一边界值。Based on the total number of servers corresponding to each tenant, the performance parameters of each server corresponding to each tenant, and the maximum total amount of tasks corresponding to each tenant corresponding to each server, determine the number of the first interval corresponding to the server first boundary value.
这里,电子设备基于每个租户对应的每台服务器的性能参数,确定出每个租户对应的每台服务器的性能权重;电子设备基于每个租户对应的服务器,以及基于每台服务器对应的每个租户的最大任务总量,对同一个租户对应的等待处理的历史任务的最大总量进行求和,得到每个租户对应的最大任务积累量;基于每个租户对应的服务器的总数、每个租户对应的最大任务积累量和每个租户对应的每台服务器的性能权重,确定出每个租户对应的每台服务器对应的第一区间的第一边界值。其中,性能参数包括服务器的处理器的参数和/或服务器的内存的参数。Here, the electronic device determines the performance weight of each server corresponding to each tenant based on the performance parameters of each server corresponding to each tenant; the electronic device determines the performance weight of each server corresponding to each tenant; The maximum total amount of tasks of a tenant, sum the maximum total amount of historical tasks waiting to be processed corresponding to the same tenant, and obtain the maximum accumulated amount of tasks corresponding to each tenant; based on the total number of servers corresponding to each tenant, each tenant The corresponding maximum task accumulation amount and the performance weight of each server corresponding to each tenant determine the first boundary value of the first interval corresponding to each server corresponding to each tenant. Wherein, the performance parameter includes a parameter of a processor of the server and/or a parameter of a memory of the server.
在一些实施例中,电子设备可以从每个租户对应的所有服务器中,确定一台基准服务器;基于该租户对应的基准服务器的第一性能参数与非基准服务器的第二性能参数,确定出非基准服务器的性能权重。其中,可以基于第二性能参数与第一性能参数之间的比值,确定出基准服务器的性能权重与非基准服务器的性能权重之间的比值。In some embodiments, the electronic device may determine a reference server from all servers corresponding to each tenant; based on the first performance parameter of the reference server corresponding to the tenant and the second performance parameter of the non-reference server, determine the The performance weight of the benchmark server. Wherein, the ratio between the performance weight of the reference server and the performance weight of the non-reference server may be determined based on the ratio between the second performance parameter and the first performance parameter.
实际应用时,采用以下公式计算出每个租户对应的每台服务器对应的第一区间的第一边界值:
Figure PCTCN2021136007-appb-000003
其中,C gk表征第g个租户对应的第k台服务器的性能权重;C gi表征第g个租户对应的第i台服务 器的性能权重。
In actual application, use the following formula to calculate the first boundary value of the first interval corresponding to each server corresponding to each tenant:
Figure PCTCN2021136007-appb-000003
Among them, C gk represents the performance weight of the k-th server corresponding to the g-th tenant; C gi represents the performance weight of the i-th server corresponding to the g-th tenant.
示例性地,在某个租户对应3台服务器,且服务器1的性能权重为C1,服务器2的性能权重为1.5C1,服务器3的性能权重为C1的情况下,该租户对应的服务器1对应的
Figure PCTCN2021136007-appb-000004
For example, when a tenant corresponds to 3 servers, and the performance weight of server 1 is C1, the performance weight of server 2 is 1.5C1, and the performance weight of server 3 is C1, the server 1 corresponding to the tenant corresponds to
Figure PCTCN2021136007-appb-000004
需要说明的是,不管服务器集群中每台服务器的性能是否相同,计算服务器对应的第一区间的第二边界值的方法不变。也就是说,不管第一信息是否包括服务器的性能参数,计算服务器对应的第一区间的第二边界值的方法相同。It should be noted that, regardless of whether the performance of each server in the server cluster is the same, the method for calculating the second boundary value of the first interval corresponding to the server remains unchanged. That is to say, regardless of whether the first information includes the performance parameter of the server, the method for calculating the second boundary value of the first section corresponding to the server is the same.
考虑到服务器对应的第一区间会随着处理的任务类型和任务数量等因素的变化而变化,为了提高任务延迟风险的检测结果的准确度,在一些实施例中,所述方法还包括:Considering that the first interval corresponding to the server will vary with the type of task being processed, the number of tasks and other factors, in order to improve the accuracy of the detection result of the task delay risk, in some embodiments, the method further includes:
通过执行定时任务,更新每台服务器对应的第一区间。By executing the timed task, the first section corresponding to each server is updated.
这里,定时任务用于触发电子设备定时更新服务器对应的第一区间。Here, the timed task is used to trigger the electronic device to regularly update the first interval corresponding to the server.
在实际应用中,电子设备通过执行定时任务,重新计算每台服务器对应的第一区间的第一边界值和第二边界值;基于重新计算出的第一区间的第一边界值和第二边界值,对对应的服务器当前对应的第一区间进行更新。In practical applications, the electronic device recalculates the first boundary value and the second boundary value of the first interval corresponding to each server by executing the timing task; based on the recalculated first boundary value and the second boundary value of the first interval value, and update the first section currently corresponding to the corresponding server.
本实施例中,定时更新第一区间,可以定时基于服务器最新的任务处理能力来评估服务器是否存在任务延迟风险,可以提高任务延迟风险的检测结果的准确度。In this embodiment, the first interval is regularly updated, and whether the server has a task delay risk can be regularly evaluated based on the latest task processing capability of the server, which can improve the accuracy of the detection result of the task delay risk.
在一些实施例中,所述方法还包括:In some embodiments, the method also includes:
在所述服务器集群中第一服务器对应的待处理任务的总数未处于所述第一服务器对应的第一区间的情况下,输出第一租户对应的待新增的服务器的数量;其中,所述第一租户为所述第一服务器对应的租户。In the case where the total number of tasks to be processed corresponding to the first server in the server cluster is not in the first interval corresponding to the first server, output the number of servers to be added corresponding to the first tenant; wherein, the The first tenant is a tenant corresponding to the first server.
这里,电子设备在检测到第一租户对应的服务器中的第一服务器对应的待处理任务的总数未处于第一服务器对应的第一区间的情况下,确定出在消除任务延迟风险的情况下,第一租户对应的待新增的服务器的数量,并输出第一租户对应的待新增的服务器的数量。Here, when the electronic device detects that the total number of tasks to be processed corresponding to the first server among the servers corresponding to the first tenant is not in the first interval corresponding to the first server, it determines that in the case of eliminating the risk of task delay, The number of servers to be added corresponding to the first tenant, and the number of servers to be added corresponding to the first tenant is output.
本实施例中,电子设备在检测到第一服务器对应的待处理任务的总数未处于第一服务器对应的第一区间的情况下,可以输出消除任务延迟风险时租户对应的需要新增的服务器的数量,以便运维人员对服务器集群进行扩容;相对于运维人员基于个人经验确定需要新增的服务器的数据的方法,可以减少因对服务器集群进行扩容后仍然无法满足计算需求,需要再次进行扩容的情况发生。In this embodiment, when the electronic device detects that the total number of tasks to be processed corresponding to the first server is not in the first interval corresponding to the first server, it may output information about the new server corresponding to the tenant when eliminating the risk of task delay. Quantity, so that the operation and maintenance personnel can expand the server cluster; compared with the method that the operation and maintenance personnel determine the data of the new server based on personal experience, it can reduce the need for re-expansion due to the failure to meet the computing needs after the expansion of the server cluster situation occurs.
为了输出准确的第一租户对应的待新增的服务器的数量,以减少对服务器集群扩容后仍无法满足计算需求而频繁扩容的情况,在一些实施例中,所述方法还包括:In order to output the accurate number of servers to be added corresponding to the first tenant, so as to reduce the frequent expansion of the server cluster that cannot meet the computing requirements after expansion, in some embodiments, the method further includes:
基于第一参数确定出所述第一租户对应的待新增的服务器的数量;其中,所述第一参数包括:Determine the number of servers to be added corresponding to the first tenant based on the first parameter; wherein the first parameter includes:
所述第一租户对应的每台服务器对应的待处理任务的总数;The total number of tasks to be processed corresponding to each server corresponding to the first tenant;
所述第一租户对应的每台服务器对应的第一区间的至少一个边界值;At least one boundary value of the first interval corresponding to each server corresponding to the first tenant;
所述第一租户对应的服务器的总数。The total number of servers corresponding to the first tenant.
为了提高服务器集群的稳定性,为服务器的第一区间设置冗余值Cr;在一些实施例中,所述第一参数还包括:In order to improve the stability of the server cluster, a redundancy value Cr is set for the first section of the server; in some embodiments, the first parameter also includes:
所述第一区间对应的设定冗余值。The set redundancy value corresponding to the first interval.
这里,当服务器的待处理任务的总数小于该服务器对应的第一区间的第一边界值时,会导致峰值时间资源紧张,从而导致任务延迟,甚至出现租户提交的任务被服务器拒绝;当服务器的待处理任务的总数大于该服务器对应的第一区间的第二边界值时,会导致峰值时间缓存队列中的待处理任务过多,对于每个新提交的任务必须等待的时间过长,造成批量延误;故,在服务器的待处理任务的总数未处于该服务器对应的第一区间的情况下,均存在任务延迟风险,需要在服务器集群中增加该服务器对应的租户所对应的服务器的数量,以消除任务延迟风险。Here, when the total number of tasks to be processed by the server is less than the first boundary value of the first interval corresponding to the server, it will lead to peak time resource shortage, resulting in task delays, and even tasks submitted by tenants are rejected by the server; when the server's When the total number of pending tasks is greater than the second boundary value of the first interval corresponding to the server, there will be too many pending tasks in the peak time cache queue, and each newly submitted task must wait for too long, resulting in batch delay; therefore, if the total number of tasks to be processed by the server is not in the first interval corresponding to the server, there is a risk of task delay, and it is necessary to increase the number of servers corresponding to the tenant corresponding to the server in the server cluster to Eliminate the risk of task delays.
实际应用时,在未获取到第一区间对应的设定冗余值的情况下,电子设备在确定出第一服务器存在任务延迟风险的情况下,基于服务器与租户之间的对应关系,确定出第一服务器对应的第一租户,以及确定出第一租户对应的所有服务器;基于第一租户对应的每台服务器对应的待处理任务的总数、第一租户对应的每台服务器对应的第一区间的至少一个边界值、第一租户对应的服务器的总数,确定出第一租户对应的待新增的服务器的数量。In actual application, when the set redundancy value corresponding to the first interval is not obtained, the electronic device determines that the first server has a task delay risk based on the correspondence between the server and the tenant, and determines the The first tenant corresponding to the first server, and all servers corresponding to the first tenant are determined; based on the total number of pending tasks corresponding to each server corresponding to the first tenant, and the first interval corresponding to each server corresponding to the first tenant At least one boundary value of , and the total number of servers corresponding to the first tenant determine the number of servers to be added corresponding to the first tenant.
在获取到第一区间对应的设定冗余值的情况下,电子设备基于服务器对应的第一区间的至少一个边界值、第一区间对应的设定冗余值以及服务器的待处理任务的总数,来确定服务器是否存在任务延迟风险。其中,在服务器的待处理任务的总数小于或等于对应的第一区间的第一边界值与设定冗余值之和的情况下,或者在服务器的待处理任务的总数大于或等于对应的第一区间的第二边界值与设定冗余值之差的情况下,表征该服务器当前存在任务延迟风险。即,When the set redundancy value corresponding to the first interval is obtained, the electronic device based on at least one boundary value of the first interval corresponding to the server, the set redundancy value corresponding to the first interval, and the total number of tasks to be processed by the server , to determine whether the server has a task delay risk. Wherein, when the total number of tasks to be processed by the server is less than or equal to the sum of the first boundary value of the corresponding first interval and the set redundancy value, or when the total number of tasks to be processed by the server is greater than or equal to the corresponding first boundary value If there is a difference between the second boundary value of an interval and the set redundancy value, it indicates that the server currently has a task delay risk. which is,
在C jb≤LB+C r的情况下,或者在C jb≥UB-C r的情况下,服务器存在任务延迟风险。其中,C jb表征服务器的待处理任务的总数;LB表征服务器对应的第一区间的第一边界值;C r表征第一区间的设定冗余值;UB表征服务器对应的第一区间的第二边界值。 In the case of C jb ≤ LB+C r , or in the case of C jb ≥ UB-C r , the server has a task delay risk. Among them, C jb represents the total number of tasks to be processed by the server; LB represents the first boundary value of the first interval corresponding to the server; C r represents the set redundancy value of the first interval; UB represents the first boundary value of the first interval corresponding to the server. Two boundary values.
在实际应用中,针对不同的场景,确定第一租户对应的待新增的服务器的数量的方法不同,下面分别介绍在服务器之间存在性能差异,以及不存在性能差异的情况下,确定第一租户对应的待新增的服务器的数 量的实现过程:In practical applications, for different scenarios, there are different methods for determining the number of servers to be added corresponding to the first tenant. The implementation process of the number of servers to be added corresponding to the tenant:
在服务器对应的第一信息中不包括服务器的性能参数的情况下,不需要考虑服务器之间的性能差异,通过以下方法确定第一租户对应的待新增的服务器的数量:In the case that the first information corresponding to the server does not include the performance parameters of the server, there is no need to consider the performance difference between the servers, and the number of servers to be added corresponding to the first tenant is determined by the following method:
在未设置第一区间的冗余值的情况下,当第一服务器对应的待处理任务的总数小于第一服务器对应的第一区间的第一边界值时,基于第一服务器对应的第一区间的第一边界值、第一租户对应的服务器的总数以及第一服务器对应的待处理任务的总数,确定出第一租户对应的待新增的服务器的数量。实际应用时,电子设备计算第一服务器对应的第一区间的第一边界值与第一服务器对应的待处理任务的总数之间的第一差值,计算该第一差值与第一租户对应的服务器的总数之间的乘积,基于该乘积与第一服务器对应的待处理任务的总数之间的商,确定出第一租户对应的待新增的服务器的数量。即,通过公式
Figure PCTCN2021136007-appb-000005
计算第一租户对应的待新增的服务器的数量;I为第一租户对应的服务器的总数;n表征第一租户对应的待新增的服务器的数量;C jb表征第一服务器对应的待处理任务的总数。
When the redundancy value of the first interval is not set, when the total number of tasks to be processed corresponding to the first server is less than the first boundary value of the first interval corresponding to the first server, based on the first interval corresponding to the first server The first boundary value of , the total number of servers corresponding to the first tenant, and the total number of tasks to be processed corresponding to the first server determine the number of servers to be added corresponding to the first tenant. In actual application, the electronic device calculates a first difference between the first boundary value of the first interval corresponding to the first server and the total number of tasks to be processed corresponding to the first server, and the calculated first difference corresponds to the first tenant. The number of servers to be added corresponding to the first tenant is determined based on the product of the total number of servers of the first tenant and the quotient of the product and the total number of tasks to be processed corresponding to the first server. That is, by the formula
Figure PCTCN2021136007-appb-000005
Calculate the number of servers to be added corresponding to the first tenant; I is the total number of servers corresponding to the first tenant; n represents the number of servers to be added corresponding to the first tenant; C jb represents the number of servers to be processed corresponding to the first server The total number of tasks.
在未设置第一区间的冗余值的情况下,当第一服务器对应的待处理任务的总数大于第一服务器对应的第一区间的第二边界值时,基于第一服务器对应的第一区间的第一边界值和第二边界值,重新计算出第一服务器对应的待处理任务的总数;基于第一服务器对应的第一区间的第一边界值、第一租户对应的服务器的总数以及重新计算出的第一服务器对应的待处理任务的总数,确定出第一租户对应的待新增的服务器的数量。实际应用时,通过公式
Figure PCTCN2021136007-appb-000006
计算第一租户对应的待新增的服务器的数量,其中,
Figure PCTCN2021136007-appb-000007
When the redundancy value of the first interval is not set, when the total number of tasks to be processed corresponding to the first server is greater than the second boundary value of the first interval corresponding to the first server, based on the first interval corresponding to the first server Recalculate the total number of tasks to be processed corresponding to the first server; based on the first boundary value of the first interval corresponding to the first server, the total number of servers corresponding to the first tenant, and recalculate The calculated total number of tasks to be processed corresponding to the first server determines the number of servers to be added corresponding to the first tenant. In practical application, the formula
Figure PCTCN2021136007-appb-000006
Calculate the number of servers to be added corresponding to the first tenant, where,
Figure PCTCN2021136007-appb-000007
在设置了第一区间的冗余值的情况下,当第一服务器的待处理任务的总数小于或等于对应的第一区间的第一边界值与设定冗余值之和时,基于第一服务器对应的第一区间的第一边界值、第一区间对应的设定冗余值、第一租户对应的服务器的总数以及第一服务器对应的待处理任务的总数,确定出第一租户对应的待新增的服务器的数量。实际应用时,电子设备基于公式
Figure PCTCN2021136007-appb-000008
计算第一租户对应的待新增的服务器的数量。
When the redundancy value of the first interval is set, when the total number of tasks to be processed by the first server is less than or equal to the sum of the first boundary value of the corresponding first interval and the set redundancy value, based on the first The first boundary value of the first interval corresponding to the server, the set redundancy value corresponding to the first interval, the total number of servers corresponding to the first tenant, and the total number of tasks to be processed corresponding to the first server determine the corresponding The number of servers to be added. In practice, electronics are based on the formula
Figure PCTCN2021136007-appb-000008
Calculate the number of servers to be added corresponding to the first tenant.
在设置了第一区间的冗余值的情况下,当第一服务器对应的待处理任务的总数大于或等于对应的第一区间的第二边界值与设定冗余值之差时,基于第一服务器对应的第一区间的第一边界值和第二边界值,重新 计算出第一服务器对应的待处理任务的总数;基于第一服务器对应的第一区间的第一边界值、第一区间对应的设定冗余值、第一租户对应的服务器的总数以及重新计算出的第一服务器对应的待处理任务的总数,确定出第一租户对应的待新增的服务器的数量。实际应用时,通过公式
Figure PCTCN2021136007-appb-000009
计算第一租户对应的待新增的服务器的数量;其中,
Figure PCTCN2021136007-appb-000010
When the redundancy value of the first interval is set, when the total number of tasks to be processed corresponding to the first server is greater than or equal to the difference between the second boundary value of the corresponding first interval and the set redundancy value, based on the second Recalculate the total number of tasks to be processed corresponding to the first server based on the first boundary value and the second boundary value of the first interval corresponding to the first server; based on the first boundary value and the first interval of the first interval corresponding to the first server The corresponding set redundancy value, the total number of servers corresponding to the first tenant, and the recalculated total number of pending tasks corresponding to the first server determine the number of servers to be added corresponding to the first tenant. In practical application, the formula
Figure PCTCN2021136007-appb-000009
Calculate the number of servers to be added corresponding to the first tenant; where,
Figure PCTCN2021136007-appb-000010
在服务器对应的第一信息中包括服务器的性能参数的情况下,需要考虑服务器之间的性能差异,通过以下方法确定第一租户对应的待新增的服务器的数量:When the first information corresponding to the server includes the performance parameters of the server, it is necessary to consider the performance difference between the servers, and determine the number of servers to be added corresponding to the first tenant by the following method:
在未设置第一区间的冗余值的情况下,当第一服务器对应的待处理任务的总数小于第一服务器对应的第一区间的第一边界值时,基于第一服务器对应的第一区间的第一边界值和第二边界值、第一租户对应的服务器的总数以及第一租户对应的每台服务器对应的待处理任务的总数,确定出第一租户对应的待新增的服务器的数量。实际应用时,电子设备通过公式(1)和公式(2)确定出第一租户对应的待新增的服务器的数量:When the redundancy value of the first interval is not set, when the total number of tasks to be processed corresponding to the first server is less than the first boundary value of the first interval corresponding to the first server, based on the first interval corresponding to the first server The first boundary value and the second boundary value, the total number of servers corresponding to the first tenant, and the total number of tasks to be processed corresponding to each server corresponding to the first tenant determine the number of servers to be added corresponding to the first tenant . In actual application, the electronic device determines the number of servers to be added corresponding to the first tenant through formula (1) and formula (2):
Figure PCTCN2021136007-appb-000011
Figure PCTCN2021136007-appb-000011
LB k≤C jbk≤UB k            (2) LB k ≤ C jbk ≤ UB k (2)
其中,
Figure PCTCN2021136007-appb-000012
表征扩容后第一租户对应的每台服务器对应的待处理任务的总数之和;
Figure PCTCN2021136007-appb-000013
表征扩容前第一租户对应的每台服务器对应的第一区间的第一边界值与对应的待处理任务的总数之间的差值的总和;C jbi表征扩容前第一租户对应的第i台服务器对应的待处理任务的总数;C jbk表征第k台服务器对应的待处理任务的总数;LB k表征第k台服务器对应的第一区间的第一边界值;UB k表征第k台服务器对应的第一区间的第二边界值。
in,
Figure PCTCN2021136007-appb-000012
Indicates the sum of the total number of pending tasks corresponding to each server corresponding to the first tenant after capacity expansion;
Figure PCTCN2021136007-appb-000013
Represents the sum of the difference between the first boundary value of the first interval corresponding to each server corresponding to the first tenant before capacity expansion and the total number of corresponding tasks to be processed; C jbi represents the i-th server corresponding to the first tenant before capacity expansion The total number of tasks to be processed corresponding to the server; C jbk represents the total number of tasks to be processed corresponding to the kth server; LB k represents the first boundary value of the first interval corresponding to the kth server; UB k represents the kth server corresponding to The second boundary value of the first interval of .
在未设置第一区间的冗余值的情况下,当第一服务器对应的待处理任务的总数大于或等于对应的第一区间的第二边界值与设定冗余值之差时,基于第一租户对应的每台服务器对应的第一区间的第一边界值和第二边界值,重新计算出第一租户对应的每台服务器对应的待处理任务的总数;基于第一租户对应的每台服务器对应的第一区间的第一边界值和第二边界值、第一租户对应的服务器的总数以及重新计算出的第一租户对应的每台服务器对应的待处理任务的总数,确定出第一租户对应的待新增的服务器的数量。实际应用时,电子设备基于以下公式(3)至公式 (5),确定出第一租户对应的待新增的服务器的数量:When the redundancy value of the first interval is not set, when the total number of tasks to be processed corresponding to the first server is greater than or equal to the difference between the second boundary value of the corresponding first interval and the set redundancy value, based on the second Recalculate the total number of tasks to be processed corresponding to each server corresponding to the first tenant based on the first boundary value and the second boundary value of the first interval corresponding to each server corresponding to the first tenant; The first boundary value and the second boundary value of the first interval corresponding to the server, the total number of servers corresponding to the first tenant, and the recalculated total number of tasks to be processed corresponding to each server corresponding to the first tenant determine the first The number of servers to be added corresponding to the tenant. In actual application, the electronic device determines the number of servers to be added corresponding to the first tenant based on the following formulas (3) to (5):
Figure PCTCN2021136007-appb-000014
Figure PCTCN2021136007-appb-000014
LB k≤C jbk≤UB k              (4) LB k ≤ C jbk ≤ UB k (4)
Figure PCTCN2021136007-appb-000015
Figure PCTCN2021136007-appb-000015
在设置了第一区间的冗余值的情况下,当第一服务器的待处理任务的总数小于或等于对应的第一区间的第一边界值与设定冗余值之和时,基于第一服务器对应的第一区间的第一边界值和第二边界值、第一租户对应的服务器的总数、第一租户对应的每台服务器对应第一区间对应的设定冗余值、以及第一租户对应的每台服务器对应的待处理任务的总数,确定出第一租户对应的待新增的服务器的数量。实际应用时,电子设备通过公式(1)′和公式(2)确定出第一租户对应的待新增的服务器的数量,其中,公式(1)′如下:When the redundancy value of the first interval is set, when the total number of tasks to be processed by the first server is less than or equal to the sum of the first boundary value of the corresponding first interval and the set redundancy value, based on the first The first boundary value and the second boundary value of the first interval corresponding to the server, the total number of servers corresponding to the first tenant, each server corresponding to the first tenant corresponds to the set redundancy value corresponding to the first interval, and the first tenant The total number of tasks to be processed corresponding to each server determines the number of servers to be added corresponding to the first tenant. In actual application, the electronic device determines the number of servers to be added corresponding to the first tenant through formula (1)' and formula (2), wherein the formula (1)' is as follows:
Figure PCTCN2021136007-appb-000016
Figure PCTCN2021136007-appb-000016
其中,C ri表征在第i台服务器对应的第一区间的设定冗余值。 Wherein, C ri represents the set redundancy value of the first section corresponding to the i-th server.
在设置了第一区间的冗余值的情况下,当第一服务器对应的待处理任务的总数大于或等于对应的第一区间的第二边界值与设定冗余值之差时,基于第一租户对应的每台服务器对应的第一区间的第一边界值和第二边界值,重新计算出第一租户对应的每台服务器对应的待处理任务的总数;基于第一租户对应的每台服务器对应的第一区间的第一边界值和第二边界值、第一租户对应的每台服务器对应的第一区间对应的设定冗余值、第一租户对应的服务器的总数以及重新计算出的第一租户对应的每台服务器对应的待处理任务的总数,确定出第一租户对应的待新增的服务器的数量。实际应用时,电子设备基于以下公式(3)′、公式(4)和公式(5),确定出第一租户对应的待新增的服务器的数量,其中,公式(3)′如下:When the redundancy value of the first interval is set, when the total number of tasks to be processed corresponding to the first server is greater than or equal to the difference between the second boundary value of the corresponding first interval and the set redundancy value, based on the second Recalculate the total number of tasks to be processed corresponding to each server corresponding to the first tenant based on the first boundary value and the second boundary value of the first interval corresponding to each server corresponding to the first tenant; The first boundary value and the second boundary value of the first interval corresponding to the server, the set redundancy value corresponding to the first interval corresponding to each server corresponding to the first tenant, the total number of servers corresponding to the first tenant, and the recalculated The total number of tasks to be processed corresponding to each server corresponding to the first tenant of the first tenant determines the number of servers to be added corresponding to the first tenant. In actual application, the electronic device determines the number of servers to be added corresponding to the first tenant based on the following formula (3)', formula (4) and formula (5), where the formula (3)' is as follows:
Figure PCTCN2021136007-appb-000017
Figure PCTCN2021136007-appb-000017
为实现本申请实施例的方法,本申请实施例还提供了一种服务器,如图3所示,该电子设备包括:In order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a server, as shown in Figure 3, the electronic device includes:
获取单元31,配置为获取服务器集群中每台服务器对应的缓存队列中缓存的待处理任务的总数;The obtaining unit 31 is configured to obtain the total number of pending tasks cached in the cache queue corresponding to each server in the server cluster;
提示单元32,配置为在所述服务器集群中第一服务器对应的待处理任务的总数未处于所述第一服务器对应的第一区间的情况下,输出第一提示信息;其中,The prompt unit 32 is configured to output first prompt information when the total number of tasks to be processed corresponding to the first server in the server cluster is not in the first interval corresponding to the first server; wherein,
所述第一提示信息表征所述第一服务器存在任务延迟风险;所述第 一区间表征服务器的缓存队列中允许存在的待处理任务的最大总数的区间;所述第一区间基于所述服务器集群中每台服务器对应的第一信息确定出;所述第一信息表征每个租户对应的服务器在处理历史任务时的数据处理能力。The first prompt information indicates that the first server has a task delay risk; the first interval indicates the interval of the maximum total number of pending tasks allowed to exist in the cache queue of the server; the first interval is based on the server cluster The first information corresponding to each server is determined; the first information represents the data processing capability of the server corresponding to each tenant when processing historical tasks.
在一些实施例中,获取单元31具体配置为:In some embodiments, the obtaining unit 31 is specifically configured as:
在检测到服务器集群中至少一台第二服务器存在设定的负载风险,并已降低所述至少一台第二服务器对应的设定并发任务阈值的情况下,获取服务器集群中每台服务器对应的缓存队列中缓存的待处理任务的总数。When it is detected that at least one second server in the server cluster has a set load risk, and the set concurrent task threshold corresponding to the at least one second server has been reduced, obtain the corresponding task threshold of each server in the server cluster The total number of pending tasks cached in the cache queue.
在一些实施例中,所述第一信息包括每个租户的历史任务信息;该电子设备还包括:In some embodiments, the first information includes historical task information of each tenant; the electronic device further includes:
第一确定单元,配置为基于服务器集群中每台服务器对应的每个租户的历史任务信息,确定出每台服务器对应的每个租户的最大任务总量、每台服务器对应的峰值平均处理速度、每个租户对应的服务器的总数和每个租户对应的历史任务的最大设定延迟时间;其中,最大任务总量表征等待处理的历史任务的最大总量;峰值平均处理速度表征任务处理速度的所有峰值的均值;The first determining unit is configured to determine, based on the historical task information of each tenant corresponding to each server in the server cluster, the maximum total amount of tasks of each tenant corresponding to each server, the peak average processing speed corresponding to each server, The total number of servers corresponding to each tenant and the maximum set delay time of historical tasks corresponding to each tenant; where the maximum total amount of tasks represents the maximum total amount of historical tasks waiting to be processed; the peak average processing speed represents all of the task processing speed the mean value of the peak value;
第二确定单元,配置为基于所述每台服务器对应的每个租户对应的最大任务总量、所述每台服务器对应的峰值平均处理速度、所述每个租户对应的服务器的总数和确定出的最大设定延迟时间,确定出每台服务器对应的第一区间。The second determination unit is configured to determine based on the maximum total amount of tasks corresponding to each tenant corresponding to each server, the peak average processing speed corresponding to each server, the total number of servers corresponding to each tenant, and The maximum set delay time for each server is determined to determine the first interval corresponding to each server.
在一些实施例中,所述第二确定单元具体配置为:In some embodiments, the second determination unit is specifically configured to:
基于每个租户对应的服务器的总数和所述每台服务器对应的每个租户对应的最大任务总量,确定出服务器对应的第一区间的第一边界值;Based on the total number of servers corresponding to each tenant and the maximum total amount of tasks corresponding to each tenant corresponding to each server, determine the first boundary value of the first interval corresponding to the server;
基于所述每台服务器对应的峰值平均处理速度和确定出的最大设定延迟时间,确定出服务器对应的第一区间的第二边界值;所述第一边界值小于所述第二边界值。Based on the peak average processing speed corresponding to each server and the determined maximum set delay time, determine a second boundary value of the first section corresponding to the server; the first boundary value is smaller than the second boundary value.
在一些实施例中,所述第一信息还包括服务器的性能参数;所述第二确定单元还配置为:基于所述每个租户对应的服务器的总数、每个租户对应的每台服务器的性能参数和所述每台服务器对应的每个租户对应的最大任务总量,确定出服务器对应的第一区间的第一边界值。In some embodiments, the first information further includes server performance parameters; the second determination unit is further configured to: based on the total number of servers corresponding to each tenant, the performance of each server corresponding to each tenant The parameters and the maximum total amount of tasks corresponding to each tenant corresponding to each server determine the first boundary value of the first interval corresponding to the server.
在一些实施例中,该电子设备还包括:In some embodiments, the electronic device also includes:
更新单元,配置为通过执行定时任务,更新每台服务器对应的第一区间。The update unit is configured to update the first interval corresponding to each server by executing a scheduled task.
在一些实施例中,该电子设备还包括:In some embodiments, the electronic device also includes:
输出单元,配置为在所述服务器集群中第一服务器对应的待处理任务的总数未处于所述第一服务器对应的第一区间的情况下,输出第一租户对应的待新增的服务器的数量;其中,所述第一租户为所述第一服务 器对应的租户。An output unit configured to output the number of servers to be added corresponding to the first tenant when the total number of tasks to be processed corresponding to the first server in the server cluster is not in the first interval corresponding to the first server ; Wherein, the first tenant is the tenant corresponding to the first server.
在一些实施例中,该电子设备还包括:In some embodiments, the electronic device also includes:
第三确定单元,配置为基于第一参数确定出所述第一租户对应的待新增的服务器的数量;其中,The third determining unit is configured to determine the number of servers to be added corresponding to the first tenant based on the first parameter; wherein,
所述第一参数包括:The first parameters include:
所述第一租户对应的每台服务器对应的待处理任务的总数;The total number of tasks to be processed corresponding to each server corresponding to the first tenant;
所述第一租户对应的每台服务器对应的第一区间的至少一个边界值;At least one boundary value of the first interval corresponding to each server corresponding to the first tenant;
所述第一租户对应的服务器的总数。The total number of servers corresponding to the first tenant.
在一些实施例中,所述第一参数还包括:In some embodiments, the first parameter also includes:
所述第一区间对应的设定冗余值。The set redundancy value corresponding to the first interval.
实际应用时,上述各单元可由电子设备中的处理器,比如中央处理器(CPU,Central Processing Unit)、数字信号处理器(DSP,Digital Signal Processor)、微控制单元(MCU,Microcontroller Unit)或可编程门阵列(FPGA,Field-Programmable Gate Array)等实现。当然,处理器需要运行存储器中存储的程序来实现上述各程序模块的功能。In actual application, each of the above units can be composed of a processor in an electronic device, such as a central processing unit (CPU, Central Processing Unit), a digital signal processor (DSP, Digital Signal Processor), a micro control unit (MCU, Microcontroller Unit) or a Programmable Gate Array (FPGA, Field-Programmable Gate Array) and other implementations. Of course, the processor needs to run the programs stored in the memory to realize the functions of the above-mentioned program modules.
需要说明的是:上述实施例提供的电子设备在进行任务延迟风险检测时,仅以上述各程序模块的划分进行举例说明,实际应用中,可以根据需要而将上述处理分配由不同的程序模块完成,即将装置的内部结构划分成不同的程序模块,以完成以上描述的全部或者部分处理。另外,上述实施例提供的电子设备与任务延迟风险检测方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that when the electronic device provided in the above embodiment performs task delay risk detection, it only uses the division of the above-mentioned program modules as an example for illustration. In practical applications, the above-mentioned processing can be assigned by different program modules according to needs. , that is, divide the internal structure of the device into different program modules, so as to complete all or part of the processing described above. In addition, the electronic device provided in the above embodiment and the embodiment of the task delay risk detection method belong to the same concept, and the specific implementation process thereof is detailed in the method embodiment, and will not be repeated here.
基于上述程序模块的硬件实现,且为了实现本申请实施例的方法,本申请实施例还提供了一种电子设备。图4为本申请实施例电子设备的硬件组成结构示意图,如图4所示,电子设备4包括:Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the present application, the embodiment of the present application further provides an electronic device. FIG. 4 is a schematic diagram of the hardware composition structure of the electronic device of the embodiment of the present application. As shown in FIG. 4, the electronic device 4 includes:
通信接口41,能够与其它设备比如网络设备等进行信息交互;Communication interface 41, capable of exchanging information with other devices such as network devices;
处理器42,与所述通信接口41连接,以实现与其它设备进行信息交互,配置为运行计算机程序时,执行上述一个或多个技术方案提供的任务延迟风险检测方法。而所述计算机程序存储在存储器43上。The processor 42 is connected to the communication interface 41 to realize information interaction with other devices, and is configured to execute the task delay risk detection method provided by one or more technical solutions above when running a computer program. Instead, the computer program is stored on the memory 43 .
当然,实际应用时,电子设备4中的各个组件通过总线系统44耦合在一起。可理解,总线系统44配置为实现这些组件之间的连接通信。总线系统44除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图4中将各种总线都标为总线系统44。Of course, in actual application, various components in the electronic device 4 are coupled together through the bus system 44 . It will be appreciated that the bus system 44 is configured to enable connection communication between these components. In addition to the data bus, the bus system 44 also includes a power bus, a control bus and a status signal bus. However, for clarity of illustration, the various buses are labeled as bus system 44 in FIG. 4 .
本申请实施例中的存储器43配置为存储各种类型的数据以支持电子设备4的操作。这些数据的示例包括:用于在电子设备4上操作的任何计算机程序。The memory 43 in the embodiment of the present application is configured to store various types of data to support the operation of the electronic device 4 . Examples of such data include: any computer program for operating on the electronic device 4 .
可以理解,存储器43可以是易失性存储器或非易失性存储器,也可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读 存储器(ROM,Read Only Memory)、可编程只读存储器(PROM,Programmable Read-Only Memory)、可擦除可编程只读存储器(EPROM,Erasable Programmable Read-Only Memory)、电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory)、磁性随机存取存储器(FRAM,ferromagnetic random access memory)、快闪存储器(Flash Memory)、磁表面存储器、光盘、或只读光盘(CD-ROM,Compact Disc Read-Only Memory);磁表面存储器可以是磁盘存储器或磁带存储器。易失性存储器可以是随机存取存储器(RAM,Random Access Memory),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(SRAM,Static Random Access Memory)、同步静态随机存取存储器(SSRAM,Synchronous Static Random Access Memory)、动态随机存取存储器(DRAM,Dynamic Random Access Memory)、同步动态随机存取存储器(SDRAM,Synchronous Dynamic Random Access Memory)、双倍数据速率同步动态随机存取存储器(DDRSDRAM,Double Data Rate Synchronous Dynamic Random Access Memory)、增强型同步动态随机存取存储器(ESDRAM,Enhanced Synchronous Dynamic Random Access Memory)、同步连接动态随机存取存储器(SLDRAM,Sync Link Dynamic Random Access Memory)、直接内存总线随机存取存储器(DRRAM,Direct Rambus Random Access Memory)。本申请实施例描述的存储器43旨在包括但不限于这些和任意其它适合类型的存储器。It can be understood that the memory 43 may be a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. Among them, the non-volatile memory can be read-only memory (ROM, Read Only Memory), programmable read-only memory (PROM, Programmable Read-Only Memory), erasable programmable read-only memory (EPROM, Erasable Programmable Read-Only Memory) Only Memory), Electrically Erasable Programmable Read-Only Memory (EEPROM, Electrically Erasable Programmable Read-Only Memory), Magnetic Random Access Memory (FRAM, ferromagnetic random access memory), Flash Memory (Flash Memory), Magnetic Surface Memory , CD, or CD-ROM (Compact Disc Read-Only Memory); magnetic surface storage can be disk storage or tape storage. The volatile memory may be random access memory (RAM, Random Access Memory), which is used as an external cache. By way of illustration and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM, Static Random Access Memory), Synchronous Static Random Access Memory (SSRAM, Synchronous Static Random Access Memory), Dynamic Random Access Memory Memory (DRAM, Dynamic Random Access Memory), synchronous dynamic random access memory (SDRAM, Synchronous Dynamic Random Access Memory), double data rate synchronous dynamic random access memory (DDRSDRAM, Double Data Rate Synchronous Dynamic Random Access Memory), enhanced Synchronous Dynamic Random Access Memory (ESDRAM, Enhanced Synchronous Dynamic Random Access Memory), Synchronous Link Dynamic Random Access Memory (SLDRAM, Sync Link Dynamic Random Access Memory), Direct Memory Bus Random Access Memory (DRRAM, Direct Rambus Random Access Memory) Memory). The memory 43 described in the embodiment of the present application is intended to include but not limited to these and any other suitable types of memory.
上述本申请实施例揭示的方法可以应用于处理器42中,或者由处理器42实现。处理器42可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器42中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器42可以是通用处理器、DSP,或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。处理器42可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本申请实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器43,处理器42读取存储器43中的程序,结合其硬件完成前述方法的步骤。The methods disclosed in the foregoing embodiments of the present application may be applied to the processor 42 or implemented by the processor 42 . The processor 42 may be an integrated circuit chip with signal processing capability. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor 42 or instructions in the form of software. The aforementioned processor 42 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. The processor 42 may implement or execute various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiments of the present application may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, and the storage medium is located in the memory 43, and the processor 42 reads the program in the memory 43, and completes the steps of the foregoing method in combination with its hardware.
可选地,所述处理器42执行所述程序时实现本申请实施例的各个方法中由终端实现的相应流程,为了简洁,在此不再赘述。Optionally, when the processor 42 executes the program, it implements a corresponding process implemented by the terminal in each method of the embodiment of the present application. For the sake of brevity, details are not repeated here.
在示例性实施例中,本申请实施例还提供了一种存储介质,即计算机存储介质,具体为计算机可读存储介质,例如包括存储计算机程序的第一存储器43,上述计算机程序可由终端的处理器42执行,以完成前述方法所述步骤。计算机可读存储介质可以是FRAM、ROM、PROM、 EPROM、EEPROM、Flash Memory、磁表面存储器、光盘、或CD-ROM等存储器。In an exemplary embodiment, the embodiment of the present application also provides a storage medium, that is, a computer storage medium, specifically a computer-readable storage medium, for example, including a first memory 43 storing a computer program, and the above-mentioned computer program can be processed by the terminal The device 42 is executed to complete the steps described in the foregoing method. The computer-readable storage medium can be memories such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disk, or CD-ROM.
在本申请所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in this application, it should be understood that the disclosed devices and methods may be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components can be combined, or May be integrated into another system, or some features may be ignored, or not implemented. In addition, the coupling, or direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be electrical, mechanical or other forms of.
上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元,即可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units; Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本申请各实施例中的各功能单元可以全部集成在一个处理模块中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application can be integrated into one processing module, or each unit can be used as a single unit, or two or more units can be integrated into one unit; the above-mentioned integration The unit can be realized in the form of hardware or in the form of hardware plus software functional unit.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps for realizing the above-mentioned method embodiments can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the Including the steps of the foregoing method embodiments; and the foregoing storage medium includes: a removable storage device, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, etc. A medium on which program code can be stored.
需要说明的是:“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that: "first", "second", etc. are used to distinguish similar objects, and not necessarily used to describe a specific order or sequence.
需要说明的是,本申请实施例所记载的技术方案之间,在不冲突的情况下,可以任意组合。It should be noted that the technical solutions described in the embodiments of the present application may be combined arbitrarily if there is no conflict.
需要说明的是,本申请实施例中的术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多个中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。It should be noted that the term "and/or" in the embodiment of the present application is only a kind of association relationship describing associated objects, which means that there may be three kinds of relationships, for example, A and/or B, which can mean: A alone exists , both A and B exist, and B exists alone. In addition, the term "at least one" herein means any combination of any one or more of at least two of a plurality, for example, including at least one of A, B, and C, which may mean including from A, Any one or more elements selected from the set formed by B and C.
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above is only a specific implementation of the application, but the scope of protection of the application is not limited thereto. Anyone familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the application. Should be covered within the protection scope of this application. Therefore, the protection scope of the present application should be determined by the protection scope of the claims.

Claims (20)

  1. 一种任务延迟风险检测方法,包括:A task delay risk detection method, comprising:
    获取服务器集群中每台服务器对应的缓存队列中缓存的待处理任务的总数;Obtain the total number of pending tasks cached in the cache queue corresponding to each server in the server cluster;
    在所述服务器集群中第一服务器对应的待处理任务的总数未处于所述第一服务器对应的第一区间的情况下,输出第一提示信息;其中,When the total number of tasks to be processed corresponding to the first server in the server cluster is not in the first interval corresponding to the first server, output first prompt information; wherein,
    所述第一提示信息表征所述第一服务器存在任务延迟风险;所述第一区间表征服务器的缓存队列中允许存在的待处理任务的最大总数的区间;所述第一区间基于所述服务器集群中每台服务器对应的第一信息确定出;所述第一信息表征每个租户对应的服务器在处理历史任务时的数据处理能力。The first prompt information indicates that the first server has a task delay risk; the first interval indicates the interval of the maximum total number of pending tasks allowed to exist in the cache queue of the server; the first interval is based on the server cluster The first information corresponding to each server is determined; the first information represents the data processing capability of the server corresponding to each tenant when processing historical tasks.
  2. 根据权利要求1所述的方法,其中,所述第一信息包括每个租户的历史任务信息;所述方法还包括:The method according to claim 1, wherein the first information includes historical task information of each tenant; the method further comprises:
    基于服务器集群中每台服务器对应的每个租户的历史任务信息,确定出每台服务器对应的每个租户的最大任务总量、每台服务器对应的峰值平均处理速度、每个租户对应的服务器的总数和每个租户对应的历史任务的最大设定延迟时间;其中,最大任务总量表征等待处理的历史任务的最大总量;峰值平均处理速度表征任务处理速度的所有峰值的均值;Based on the historical task information of each tenant corresponding to each server in the server cluster, determine the maximum total amount of tasks for each tenant corresponding to each server, the peak average processing speed corresponding to each server, and the server corresponding to each tenant. The total number and the maximum set delay time of historical tasks corresponding to each tenant; among them, the maximum total amount of tasks represents the maximum total amount of historical tasks waiting to be processed; the peak average processing speed represents the average value of all peaks of task processing speed;
    基于所述每台服务器对应的每个租户对应的最大任务总量、所述每台服务器对应的峰值平均处理速度、所述每个租户对应的服务器的总数和确定出的最大设定延迟时间,确定出每台服务器对应的第一区间。Based on the maximum total amount of tasks corresponding to each tenant corresponding to each server, the peak average processing speed corresponding to each server, the total number of servers corresponding to each tenant, and the determined maximum set delay time, Determine the first interval corresponding to each server.
  3. 根据权利要求2所述的方法,其中,所述基于所述每台服务器对应的每个租户对应的最大任务总量、所述每台服务器对应的峰值平均处理速度、所述每个租户对应的服务器的总数和确定出的最大设定延迟时间,确定出每台服务器对应的第一区间,包括:The method according to claim 2, wherein the maximum amount of tasks corresponding to each tenant corresponding to each server, the peak average processing speed corresponding to each server, and the corresponding The total number of servers and the determined maximum set delay time determine the first interval corresponding to each server, including:
    基于每个租户对应的服务器的总数和所述每台服务器对应的每个租户对应的最大任务总量,确定出服务器对应的第一区间的第一边界值;Based on the total number of servers corresponding to each tenant and the maximum total amount of tasks corresponding to each tenant corresponding to each server, determine the first boundary value of the first interval corresponding to the server;
    基于所述每台服务器对应的峰值平均处理速度和确定出的最大设定延迟时间,确定出服务器对应的第一区间的第二边界值;所述第一边界值小于所述第二边界值。Based on the peak average processing speed corresponding to each server and the determined maximum set delay time, determine a second boundary value of the first section corresponding to the server; the first boundary value is smaller than the second boundary value.
  4. 根据权利要求3所述的方法,其中,所述第一信息还包括服务器的性能参数;所述方法还包括:The method according to claim 3, wherein the first information also includes performance parameters of the server; the method further includes:
    基于所述每个租户对应的服务器的总数、每个租户对应的每台服务器的性能参数和所述每台服务器对应的每个租户对应的最大任务总量,确定出服务器对应的第一区间的第一边界值。Based on the total number of servers corresponding to each tenant, the performance parameters of each server corresponding to each tenant, and the maximum total amount of tasks corresponding to each tenant corresponding to each server, determine the number of the first interval corresponding to the server first boundary value.
  5. 根据权利要求1至4任一项所述的方法,其中,所述方法还包括:The method according to any one of claims 1 to 4, wherein the method further comprises:
    通过执行定时任务,更新每台服务器对应的第一区间。By executing the timed task, the first section corresponding to each server is updated.
  6. 根据权利要求1所述的方法,其中,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    在所述服务器集群中第一服务器对应的待处理任务的总数未处于所述第一服务器对应的第一区间的情况下,输出第一租户对应的待新增的服务器的数量;其中,所述第一租户为所述第一服务器对应的租户。In the case where the total number of tasks to be processed corresponding to the first server in the server cluster is not in the first interval corresponding to the first server, output the number of servers to be added corresponding to the first tenant; wherein, the The first tenant is a tenant corresponding to the first server.
  7. 根据权利要求6所述的方法,其中,所述方法还包括:The method according to claim 6, wherein the method further comprises:
    基于第一参数确定出所述第一租户对应的待新增的服务器的数量;其中,Determine the number of servers to be added corresponding to the first tenant based on the first parameter; wherein,
    所述第一参数包括:The first parameters include:
    所述第一租户对应的每台服务器对应的待处理任务的总数;The total number of tasks to be processed corresponding to each server corresponding to the first tenant;
    所述第一租户对应的每台服务器对应的第一区间的至少一个边界值;At least one boundary value of the first interval corresponding to each server corresponding to the first tenant;
    所述第一租户对应的服务器的总数。The total number of servers corresponding to the first tenant.
  8. 根据权利要求7所述的方法,其中,所述第一参数还包括:The method according to claim 7, wherein the first parameter further comprises:
    所述第一区间对应的设定冗余值。The set redundancy value corresponding to the first interval.
  9. 根据权利要求1至4任一项所述的方法,其中,所述从服务器集群中每台服务器对应的缓存队列中,读取每台服务器对应的待处理任务的总数,包括:The method according to any one of claims 1 to 4, wherein reading the total number of pending tasks corresponding to each server from the cache queue corresponding to each server in the server cluster includes:
    在检测到服务器集群中至少一台第二服务器存在设定的负载风险,并已降低所述至少一台第二服务器对应的设定并发任务阈值的情况下,获取服务器集群中每台服务器对应的缓存队列中缓存的待处理任务的总数。When it is detected that at least one second server in the server cluster has a set load risk, and the set concurrent task threshold corresponding to the at least one second server has been reduced, obtain the corresponding task threshold of each server in the server cluster The total number of pending tasks cached in the cache queue.
  10. 一种电子设备,包括:An electronic device comprising:
    获取单元,配置为获取服务器集群中每台服务器对应的缓存队列中缓存的待处理任务的总数;The obtaining unit is configured to obtain the total number of pending tasks cached in the cache queue corresponding to each server in the server cluster;
    提示单元,配置为在所述服务器集群中第一服务器对应的待处理任务的总数未处于所述第一服务器对应的第一区间的情况下,输出第一提示信息;其中,The prompt unit is configured to output first prompt information when the total number of tasks to be processed corresponding to the first server in the server cluster is not in the first interval corresponding to the first server; wherein,
    所述第一提示信息表征所述第一服务器存在任务延迟风险;所述第一区间表征服务器的缓存队列中允许存在的待处理任务的最大总数的区间;所述第一区间基于所述服务器集群中每台服务器对应的第一信息确定出;所述第一信息表征每个租户对应的服务器在处理历史任务时的数据处理能力。The first prompt information indicates that the first server has a task delay risk; the first interval indicates the interval of the maximum total number of pending tasks allowed to exist in the cache queue of the server; the first interval is based on the server cluster The first information corresponding to each server is determined; the first information represents the data processing capability of the server corresponding to each tenant when processing historical tasks.
  11. 根据权利要求10所述的电子设备,其中,所述第一信息包括每个租户的历史任务信息;所述电子设备还包括:The electronic device according to claim 10, wherein the first information includes historical task information of each tenant; the electronic device further includes:
    第一确定单元,配置为基于服务器集群中每台服务器对应的每个租 户的历史任务信息,确定出每台服务器对应的每个租户的最大任务总量、每台服务器对应的峰值平均处理速度、每个租户对应的服务器的总数和每个租户对应的历史任务的最大设定延迟时间;其中,最大任务总量表征等待处理的历史任务的最大总量;峰值平均处理速度表征任务处理速度的所有峰值的均值;The first determining unit is configured to determine, based on the historical task information of each tenant corresponding to each server in the server cluster, the maximum total amount of tasks of each tenant corresponding to each server, the peak average processing speed corresponding to each server, The total number of servers corresponding to each tenant and the maximum set delay time of historical tasks corresponding to each tenant; where the maximum total amount of tasks represents the maximum total amount of historical tasks waiting to be processed; the peak average processing speed represents all of the task processing speed the mean value of the peak value;
    第二确定单元,配置为基于所述每台服务器对应的每个租户对应的最大任务总量、所述每台服务器对应的峰值平均处理速度、所述每个租户对应的服务器的总数和确定出的最大设定延迟时间,确定出每台服务器对应的第一区间。The second determination unit is configured to determine based on the maximum total amount of tasks corresponding to each tenant corresponding to each server, the peak average processing speed corresponding to each server, the total number of servers corresponding to each tenant, and The maximum set delay time for each server is determined to determine the first interval corresponding to each server.
  12. 根据权利要求11所述的电子设备,其中,所述第二确定单元具体配置为:The electronic device according to claim 11, wherein the second determining unit is specifically configured as:
    基于每个租户对应的服务器的总数和所述每台服务器对应的每个租户对应的最大任务总量,确定出服务器对应的第一区间的第一边界值;Based on the total number of servers corresponding to each tenant and the maximum total amount of tasks corresponding to each tenant corresponding to each server, determine the first boundary value of the first interval corresponding to the server;
    基于所述每台服务器对应的峰值平均处理速度和确定出的最大设定延迟时间,确定出服务器对应的第一区间的第二边界值;所述第一边界值小于所述第二边界值。Based on the peak average processing speed corresponding to each server and the determined maximum set delay time, determine a second boundary value of the first section corresponding to the server; the first boundary value is smaller than the second boundary value.
  13. 根据权利要求12所述的电子设备,其中,所述第一信息还包括服务器的性能参数;所述第二确定单元还配置为:The electronic device according to claim 12, wherein the first information further includes performance parameters of the server; the second determining unit is further configured to:
    基于所述每个租户对应的服务器的总数、每个租户对应的每台服务器的性能参数和所述每台服务器对应的每个租户对应的最大任务总量,确定出服务器对应的第一区间的第一边界值。Based on the total number of servers corresponding to each tenant, the performance parameters of each server corresponding to each tenant, and the maximum total amount of tasks corresponding to each tenant corresponding to each server, determine the number of the first interval corresponding to the server first boundary value.
  14. 根据权利要求10至13任一项所述的电子设备,其中,所述电子设备还包括:The electronic device according to any one of claims 10 to 13, wherein the electronic device further comprises:
    更新单元,配置为通过执行定时任务,更新每台服务器对应的第一区间。The update unit is configured to update the first interval corresponding to each server by executing a scheduled task.
  15. 根据权利要求10所述的电子设备,其中,所述电子设备还包括:The electronic device according to claim 10, wherein the electronic device further comprises:
    输出单元,配置为在所述服务器集群中第一服务器对应的待处理任务的总数未处于所述第一服务器对应的第一区间的情况下,输出第一租户对应的待新增的服务器的数量;其中,所述第一租户为所述第一服务器对应的租户。An output unit configured to output the number of servers to be added corresponding to the first tenant when the total number of tasks to be processed corresponding to the first server in the server cluster is not in the first interval corresponding to the first server ; Wherein, the first tenant is the tenant corresponding to the first server.
  16. 根据权利要求15所述的电子设备,其中,所述电子设备还包括:The electronic device according to claim 15, wherein the electronic device further comprises:
    第三确定单元,配置为基于第一参数确定出所述第一租户对应的待新增的服务器的数量;其中,The third determining unit is configured to determine the number of servers to be added corresponding to the first tenant based on the first parameter; wherein,
    所述第一参数包括:The first parameters include:
    所述第一租户对应的每台服务器对应的待处理任务的总数;The total number of tasks to be processed corresponding to each server corresponding to the first tenant;
    所述第一租户对应的每台服务器对应的第一区间的至少一个边界 值;At least one boundary value of the first interval corresponding to each server corresponding to the first tenant;
    所述第一租户对应的服务器的总数。The total number of servers corresponding to the first tenant.
  17. 根据权利要求16所述的电子设备,其中,所述第一参数还包括:The electronic device according to claim 16, wherein the first parameter further comprises:
    所述第一区间对应的设定冗余值。The set redundancy value corresponding to the first interval.
  18. 根据权利要求10至13任一项所述的电子设备,其中,所述获取单元具体配置为:The electronic device according to any one of claims 10 to 13, wherein the acquiring unit is specifically configured as:
    在检测到服务器集群中至少一台第二服务器存在设定的负载风险,并已降低所述至少一台第二服务器对应的设定并发任务阈值的情况下,获取服务器集群中每台服务器对应的缓存队列中缓存的待处理任务的总数。When it is detected that at least one second server in the server cluster has a set load risk, and the set concurrent task threshold corresponding to the at least one second server has been reduced, obtain the corresponding task threshold of each server in the server cluster The total number of pending tasks cached in the cache queue.
  19. 一种电子设备,包括:处理器和用于存储能够在处理器上运行的计算机程序的存储器,An electronic device comprising: a processor and a memory for storing a computer program capable of running on the processor,
    其中,所述处理器用于运行所述计算机程序时,执行以下权利要求1至9所述的方法的步骤。Wherein, when the processor is used to run the computer program, it executes the steps of the method described in claims 1 to 9 below.
  20. 一种存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至9任一项所述的方法的步骤。A storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are realized.
PCT/CN2021/136007 2021-06-09 2021-12-07 Task delay risk detection method, electronic device and storage medium WO2022257389A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110644030.6A CN113326170B (en) 2021-06-09 2021-06-09 Task delay risk detection method, electronic equipment and storage medium
CN202110644030.6 2021-06-09

Publications (1)

Publication Number Publication Date
WO2022257389A1 true WO2022257389A1 (en) 2022-12-15

Family

ID=77420339

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/136007 WO2022257389A1 (en) 2021-06-09 2021-12-07 Task delay risk detection method, electronic device and storage medium

Country Status (2)

Country Link
CN (1) CN113326170B (en)
WO (1) WO2022257389A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113326170B (en) * 2021-06-09 2023-06-09 深圳前海微众银行股份有限公司 Task delay risk detection method, electronic equipment and storage medium
CN113868053A (en) * 2021-09-26 2021-12-31 海光信息技术股份有限公司 Task delay determination method, device and system and related equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954184A (en) * 2015-06-15 2015-09-30 四川长虹电器股份有限公司 Monitoring and alarming method and system for cloud background server cluster
CN109800975A (en) * 2018-12-29 2019-05-24 亚信科技(中国)有限公司 A kind of stock assessment method, apparatus, computer equipment and storage medium
CN110554916A (en) * 2019-07-31 2019-12-10 苏宁云计算有限公司 Distributed cluster-based risk index calculation method and device
US20200396309A1 (en) * 2019-06-17 2020-12-17 Beijing Didi Infinity Technology And Development Co., Ltd. Systems and methods for data processing
CN113326170A (en) * 2021-06-09 2021-08-31 深圳前海微众银行股份有限公司 Task delay risk detection method, electronic device and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0969367A3 (en) * 1998-05-28 2001-07-11 Compaq Computer Corporation System and method used in a computer system for distributing tasks between multiprocessing I/O subsystems
CN1214666C (en) * 2003-04-07 2005-08-10 华为技术有限公司 Method for limiting position information request flow rate in position service
CN104252347A (en) * 2013-06-27 2014-12-31 鸿富锦精密工业(深圳)有限公司 Task waiting-time processing system and method
CN109032779B (en) * 2018-07-09 2020-11-24 广州酷狗计算机科技有限公司 Task processing method and device, computer equipment and readable storage medium
CN109343941B (en) * 2018-08-14 2023-02-21 创新先进技术有限公司 Task processing method and device, electronic equipment and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104954184A (en) * 2015-06-15 2015-09-30 四川长虹电器股份有限公司 Monitoring and alarming method and system for cloud background server cluster
CN109800975A (en) * 2018-12-29 2019-05-24 亚信科技(中国)有限公司 A kind of stock assessment method, apparatus, computer equipment and storage medium
US20200396309A1 (en) * 2019-06-17 2020-12-17 Beijing Didi Infinity Technology And Development Co., Ltd. Systems and methods for data processing
CN110554916A (en) * 2019-07-31 2019-12-10 苏宁云计算有限公司 Distributed cluster-based risk index calculation method and device
CN113326170A (en) * 2021-06-09 2021-08-31 深圳前海微众银行股份有限公司 Task delay risk detection method, electronic device and storage medium

Also Published As

Publication number Publication date
CN113326170B (en) 2023-06-09
CN113326170A (en) 2021-08-31

Similar Documents

Publication Publication Date Title
WO2022257389A1 (en) Task delay risk detection method, electronic device and storage medium
WO2021008285A1 (en) Data synchronization method and apparatus for distributed system, medium, and electronic device
EP2437168B1 (en) Method and device for balancing load of multiprocessor system
US8286177B2 (en) Technique for conserving software application resources
CN110196767A (en) Service resource control method, device, equipment and storage medium
CN104504147B (en) A kind of resource coordination method of data-base cluster, apparatus and system
CN110162270B (en) Data storage method, storage node and medium based on distributed storage system
WO2018113317A1 (en) Data migration method, apparatus, and system
CN104462432A (en) Self-adaptive distributed computing method
CN107329881B (en) Application system performance test method and device, computer equipment and storage medium
US20120290789A1 (en) Preferentially accelerating applications in a multi-tenant storage system via utility driven data caching
CN110543355A (en) method for automatically balancing cloud platform resources
CN114143327B (en) Cluster resource quota allocation method and device and electronic equipment
CN109522273B (en) Method and device for realizing data writing
CN110750498B (en) Object access method, device and storage medium
WO2024114728A1 (en) Heterogeneous processor and related scheduling method
CN116610547A (en) Server performance evaluation method, device, computer equipment and storage medium
CN111831389A (en) Data processing method and device and storage medium
WO2022021858A1 (en) Method and system for achieving high service availability in high-load scene in distributed system
WO2020140623A1 (en) Electronic device, metadata processing method and computer readable storage medium
CN111459738B (en) Fault diagnosis method and system for parallel storage system based on fail-slow model
CN104881271B (en) Cloud dynamic management approach and device
CN112231156B (en) SPEC CPU2017 test result estimation method, system, device and medium
EP4050480A1 (en) Controlling system load based on memory bandwidth
TWI808367B (en) Blockchain intermediary system and method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21944885

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21944885

Country of ref document: EP

Kind code of ref document: A1