Task scheduling method and device
By calculating the adaptability of task requirements and the performance indicators of candidate proxy servers, and automatically selecting the target server to perform tasks, solving the problems of low task scheduling efficiency and waste of resources in financial institutions, and achieving efficient and accurate task allocation.
Patent Information
- Application Number
- CN202510214298.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-06-13
AI Technical Summary
The number of tasks facing financial institutions has increased significantly, and it is difficult for existing technologies to efficiently manage and schedule these tasks, resulting in idle and waste of resources, and manual allocation of proxy servers is time-consuming and error-prone.
By obtaining the task requirements of the task to be scheduled and the performance metrics of multiple candidate proxy servers, calculate the adaptability between the task and the server, and select the most suitable target proxy server to perform the task.
The optimal adaptation between tasks and servers is achieved, the efficiency and quality of task execution is improved, the utilization of server resources is maximized, manual intervention is reduced, and the possibility of human error is reduced.
Smart Images

Figure CN120144249A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular, to a task scheduling method and apparatus. Background Art
[0002] With the continuous development of the financial market and the diversification of financial services, the volume of tasks faced by financial institutions is increasing significantly. These tasks cover multiple aspects, including handling customer transaction requests, conducting risk management assessments, preparing financial reports, and analyzing investment portfolios, etc. Facing the expanding business scale, financial institutions need to adopt more efficient methods to manage and schedule these tasks to ensure the continuity and stability of their business operations. Summary of the Invention
[0003] The present disclosure provides a task scheduling method and apparatus to at least partly solve one of the technical problems in the related art. The technical solutions of the present disclosure are as follows:
[0004] According to a first aspect of an embodiment of the present disclosure, a task scheduling method is provided, including: obtaining a task to be scheduled, and obtaining task requirements associated with the task to be scheduled and a plurality of candidate proxy servers; determining a suitability degree between the task to be scheduled and each of the candidate proxy servers according to the task requirements and performance metrics of each of the candidate proxy servers; determining a target proxy server from the plurality of candidate proxy servers according to a plurality of the suitability degrees; and scheduling the task to be scheduled to the target proxy server to execute the task to be scheduled by using the target proxy server.
[0005] According to a second aspect of an embodiment of the present disclosure, a task scheduling apparatus is provided, including: an obtaining module, configured to obtain a task to be scheduled, and obtain task requirements associated with the task to be scheduled and a plurality of candidate proxy servers; a first determining module, configured to determine a suitability degree between the task to be scheduled and each of the candidate proxy servers according to the task requirements and performance metrics of each of the candidate proxy servers; a second determining module, configured to determine a target proxy server from the plurality of candidate proxy servers according to a plurality of the suitability degrees; and an execution module, configured to schedule the task to be scheduled to the target proxy server to execute the task to be scheduled by using the target proxy server.
[0006] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the task scheduling method as described in the first aspect embodiment of the present disclosure.
[0007] According to a fourth aspect of the embodiments of the present disclosure, there is provided a computer-readable storage medium, which, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to execute the task scheduling method as described in the embodiments of the first aspect of the present disclosure.
[0008] According to a fifth aspect of the embodiments of the present disclosure, there is provided a computer program product, including: a computer program, which, when executed by a processor, implements the task scheduling method as described in the embodiments of the first aspect of the present disclosure.
[0009] The technical solutions provided by the embodiments of the present disclosure at least bring the following beneficial effects:
[0010] In this technical solution, by accurately matching the task requirements of the task to be scheduled with the performance indicators of multiple candidate proxy servers, the best adaptation between the task to be scheduled and the proxy server is achieved. This not only significantly improves the execution efficiency and quality of the task, ensures that the task is processed in a timely manner on the most suitable server, but also maximizes the utilization of server resources and avoids the idle and waste of resources. At the same time, the automatic scheduling of tasks reduces the need for manual intervention, improves the efficiency and accuracy of task allocation, and reduces the possibility of human errors. Among them, when determining the target server adapted to the task to be scheduled from multiple candidate service agents, by matching the requirement indicators of the task requirements with the performance indicators of the candidate proxy servers, calculating the adaptation degree between the indicators, and determining the adaptation degree between the task to be scheduled and the candidate proxy servers according to the adaptation degree between the indicators, it is possible to quickly and accurately identify the most suitable server for executing the task to be scheduled, avoiding misallocating the task to be scheduled to a server with insufficient resources or mismatched performance, and ensuring the efficient execution of the task. In addition, when determining the adaptation degree between the task to be scheduled and any candidate proxy server, based on the set weights of each requirement indicator, the adaptation degrees between each requirement indicator and the matched performance indicators are weighted and summed to obtain the adaptation degree between the task to be scheduled and any candidate proxy server, achieving comprehensive consideration of multiple dimensions of requirement indicators and their corresponding performance indicators, selecting the most suitable proxy server to execute the task, improving the overall service quality and response speed, and reducing latency and error rates.
[0011] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings here are incorporated into the specification and constitute a part of this specification, showing the embodiments in line with the present disclosure, and are used together with the specification to explain the principles of the present disclosure, and do not constitute an improper limitation to the present disclosure.
[0013] Figure 1It is a schematic flowchart of the task scheduling method shown in the first embodiment of the present disclosure;
[0014] Figure 2 It is a schematic flowchart of the task scheduling method shown in the second embodiment of the present disclosure;
[0015] Figure 3 It is a schematic flowchart of the task scheduling method shown in the third embodiment of the present disclosure;
[0016] Figure 4 It is a schematic flowchart of the task scheduling method shown in the fourth embodiment of the present disclosure;
[0017] Figure 5 It is a schematic diagram of the principle of the task scheduling method shown in the embodiments of the present disclosure;
[0018] Figure 6 It is a schematic structural diagram of the task scheduling device shown in the fifth embodiment of the present disclosure;
[0019] Figure 7 It is a schematic structural diagram of an electronic device shown in an exemplary embodiment of the present disclosure. Detailed implementation manners
[0020] In order to enable those of ordinary skill in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0021] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present disclosure described herein can be implemented in an order different from those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0022] It should be noted that in the technical solutions of the present disclosure, the collection, storage, use, processing, transmission, provision, and disclosure of the user's personal information and other processing are all carried out on the premise of obtaining the user's consent, and all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0023] In the field of financial business, the allocation and management of proxy servers is a complex and time-consuming process. In related technologies, manual methods are used to allocate proxy servers. However, when manually allocating proxy servers, various factors such as individual business requirements, proxy server configurations, and availability need to be analyzed one by one. Especially when faced with a large number of task scheduling requests and numerous proxy servers, it may take hours or even days to complete the allocation, resulting in a long time consumption. Additionally, due to the lack of objective data support and analysis, the allocators may make allocations based solely on subjective impressions or experience, leading to resource-intensive tasks being assigned to proxy servers with insufficient resources, while simple tasks are assigned to proxy servers with higher configurations. Moreover, it may also result in some proxy servers being idle for a long time or over-allocated.
[0024] In view of the above problems, the present disclosure proposes a task scheduling method and apparatus.
[0025] The task scheduling method and apparatus according to embodiments of the present disclosure will be described below with reference to the accompanying drawings.
[0026] Figure 1 FIG. is a flowchart of the task scheduling method shown in the first embodiment of the present disclosure. It should be noted that the execution subject of the embodiments of the present disclosure may be a task scheduling apparatus, and this task scheduling apparatus can be applied to any electronic device with computing capabilities, so that the electronic device can perform the task scheduling function.
[0027] As shown in Figure 1 the task scheduling method includes the following steps:
[0028] Step 101, obtain the task to be scheduled, and obtain the task requirements associated with the task to be scheduled and multiple candidate proxy servers.
[0029] To ensure that tasks are correctly and efficiently assigned to appropriate proxy servers, as a possible implementation, obtain the task requirements associated with the task to be scheduled and multiple candidate proxy servers, and based on the task requirements, determine the target server for executing the task to be scheduled from the multiple candidate proxy servers.
[0030] Therefore, in the embodiments of the present disclosure, obtain the task to be scheduled from the task queue, where the task to be scheduled can be submitted by the user, generated by the system, or triggered by other tasks; it should be noted that each task to be scheduled has task requirements, and the task requirements include but are not limited to computing resources (such as central processing unit (CPU for short), memory), storage requirements, network requirements, execution time limits, dependencies (whether it depends on the completion of other tasks), security requirements, etc.; candidate proxy servers include servers or virtual machine instances used to execute tasks.
[0031] Step 102: Determine the fitness between the task to be scheduled and each candidate proxy server according to the task requirements and the performance metrics of each candidate proxy server.
[0032] To achieve the best fit between the task to be scheduled and the proxy server, as a possible implementation, comprehensively consider the task requirements and the performance metrics of the proxy server to determine the fitness between the task to be scheduled and each candidate proxy server.
[0033] To improve the accuracy of the fitness between the task to be scheduled and each candidate proxy server, in the embodiments of the present disclosure, match the task requirements with the performance metrics of the proxy server, and determine the fitness between the task to be scheduled and each candidate proxy server based on the fitness between the requirement metrics of the task requirements and the matched performance metrics; wherein, the fitness is a quantitative value used to represent the degree to which the requirements are met.
[0034] Step 103: Determine the target proxy server from multiple candidate proxy servers according to multiple fitness values.
[0035] To improve the quality and efficiency of task processing, as a possible implementation, based on the fitness between the task to be scheduled and each candidate proxy server, select a target proxy server from multiple candidate proxy servers, wherein the fitness between the target proxy server and the task to be scheduled is greater than that of other candidate proxy servers, and other candidate proxy servers are proxy servers other than the target proxy server among the multiple candidate proxy servers.
[0036] Step 104: Schedule the task to be scheduled to the target proxy server to execute the task to be scheduled using the target proxy server.
[0037] Furthermore, schedule the task to be scheduled to the target proxy server so that the target proxy server executes the task to be scheduled.
[0038] In summary, by precisely matching the task requirements of the task to be scheduled with the performance metrics of multiple candidate proxy servers, the best fit between the task to be scheduled and the proxy server is achieved. This not only significantly improves the execution efficiency and quality of the task, ensures that the task is processed in a timely manner on the most suitable server, but also maximizes the utilization of server resources and avoids the idle and waste of resources. At the same time, the automatic scheduling of tasks reduces the need for manual intervention, improves the efficiency and accuracy of task allocation, and reduces the possibility of human errors.
[0039] To clearly illustrate how the above embodiments determine the fitness between the task to be scheduled and each candidate proxy server according to the task requirements and the performance metrics of each candidate proxy server, the present disclosure proposes another task scheduling method.
[0040] Figure 2 It is a schematic flowchart of the task scheduling method shown in the second embodiment of the present disclosure.
[0041] As Figure 2 shown, the task scheduling method includes the following steps:
[0042] Step 201, obtain the task to be scheduled, and obtain the task requirements and multiple candidate proxy servers associated with the task to be scheduled.
[0043] Step 202, obtain multiple requirement indicators in the task requirements.
[0044] In the embodiments of the present disclosure, the task requirements refer to the requirements that need to be met during the execution of the task to be scheduled. The task requirements include multiple requirement indicators, including but not limited to network bandwidth, latency range, load requirements, etc.
[0045] Step 203, for any requirement indicator, obtain the performance indicator that matches the any requirement indicator from multiple performance indicators of any candidate proxy server.
[0046] In order to achieve the best adaptation between the task to be scheduled and the proxy server, as a possible implementation, by finely calculating the adaptation degree between any requirement indicator and the matching performance indicator, calculate the adaptation degree between the task to be scheduled and any candidate proxy server.
[0047] In the embodiments of the present disclosure, the requirement indicator is the specific requirement of the task to be scheduled for the execution environment; the requirement indicators include computing resources (such as CPU, memory), storage requirements, network bandwidth, latency range, security requirements, task execution time limit, etc.; the performance indicator is the specific characteristic of the execution environment provided by the candidate proxy server; the indicator values of the performance indicators of the candidate proxy service include: the hardware configuration information of the candidate proxy server, the current load information, and the capacity information under the specified resource limit, where the hardware configuration information is the CPU model, the number of cores, the memory capacity, etc., and the current load information is obtained by comprehensively considering multiple indicators such as CPU usage, memory usage, and network bandwidth usage; the capacity information under the specified resource limit refers to the capacity information under the specified resource limit (the maximum number of tasks processed simultaneously, that is, the number of concurrent connections).
[0048] Furthermore, for each requirement indicator, find the performance indicator that matches it from the performance indicators of the candidate proxy server. For example, if the requirement indicator is the network bandwidth requirement when executing the task to be scheduled, the performance indicator that matches this requirement indicator is the network bandwidth of the candidate proxy server; another example is that if the requirement indicator is the latency range for executing the task to be scheduled, the performance indicator that matches this requirement indicator is the average latency of the candidate proxy server.
[0049] Step 204: Determine the fitness between any requirement metric and the matching performance metric according to the value range of the requirement metric and the metric value of the matching performance metric.
[0050] In order to accurately determine the fitness between any requirement metric and the matching performance metric, in the embodiments of the present disclosure, the fitness between any requirement metric and the matching performance metric is determined according to the value range of the requirement metric and the comparison result of the metric value of the matching performance metric.
[0051] For example, if the bandwidth of the proxy server is greater than or equal to the bandwidth required for the task to be scheduled, the bandwidth fitness is 1; otherwise, the bandwidth fitness is the bandwidth of the proxy server divided by the bandwidth required for the task to be scheduled (the value range is between 0 and 1); for another example, if the latency of the proxy server is within the acceptable latency range of the task to be scheduled, the latency fitness is 1; if the latency is lower than the lower limit of the acceptable latency range, the latency fitness can be determined based on a set reward coefficient (such as 1.1) (for example, 1.1); if the latency is higher than the upper limit, the latency fitness is 0; for still another example, the current load of the proxy server is 30%, and the current load fitness = 1 - the current load of the proxy server 30%, then the current load fitness is 0.7.
[0052] Step 205: Determine the fitness between the task to be scheduled and any candidate proxy server according to the fitness between each requirement metric and the matching performance metric.
[0053] In order to improve the accuracy of the fitness between the task to be scheduled and any candidate proxy server, as a possible implementation, the fitness between the task to be scheduled and any candidate proxy server is determined by synthesizing the fitness between each requirement metric and the matching performance metric.
[0054] As an example, obtain the set weights of each requirement metric; based on the set weights of each requirement metric, perform a weighted sum of the fitness between each requirement metric and the matching performance metric to obtain the fitness between the task to be scheduled and any candidate proxy server.
[0055] That is to say, for each requirement metric, obtain the set weight of each requirement metric, where the set weight of each requirement metric is used to indicate the importance of the requirement metric and the degree of influence on task execution; the weight is usually a value between 0 and 1, and the sum of the weights of all requirement metrics should be 1, and the weight can be set based on historical data or expert experience; furthermore, for each requirement metric, multiply the fitness between the requirement metric and the matching performance metric by the weight of the metric. Then, sum up all the weighted fitnesses to obtain the total fitness between the task to be scheduled and the candidate proxy server.
[0056] As another example, add the fitness degrees between each requirement index and the matching performance index. Based on the addition result, determine the average value of the fitness degrees between each requirement index and the matching performance index, and use this average value as the fitness degree between the task to be scheduled and any candidate proxy server.
[0057] Step 206: Determine a target proxy server from multiple candidate proxy servers according to multiple fitness degrees.
[0058] Step 207: Schedule the task to be scheduled to the target proxy server so that the target proxy server executes the task to be scheduled.
[0059] It should be noted that the execution processes of Step 201, Step 206 to 207 can be implemented in any one of the embodiments of the present disclosure respectively. The embodiments of the present disclosure do not make any limitations in this regard and will not be elaborated further.
[0060] In summary, by obtaining multiple requirement indexes in the task requirement; for any requirement index, obtaining the performance index that matches the any requirement index from multiple performance indexes of any candidate proxy server; determining the fitness degree between any requirement index and the matching performance index according to the value range of any requirement index and the index value of the matching performance index; determining the fitness degree between the task to be scheduled and any candidate proxy server according to the fitness degrees between each requirement index and the matching performance index. Thus, by precisely calculating the fitness degree between any requirement index and the matching performance index and calculating the fitness degree between the task to be scheduled and any candidate proxy server, the accuracy of calculating the fitness degree between the task to be scheduled and the candidate proxy server is improved, thereby ensuring that the task to be scheduled is assigned to the proxy server with the highest fitness degree, improving the execution efficiency and quality of the task; at the same time, optimizing resource utilization and avoiding resource waste.
[0061] To clearly illustrate how to determine a target proxy server from multiple candidate proxy servers according to multiple fitness degrees in the above embodiments, the present disclosure proposes another task scheduling method.
[0062] Figure 3 It is a schematic flowchart of the task scheduling method shown in the third embodiment of the present disclosure.
[0063] As Figure 3 shown, the task scheduling method includes the following steps:
[0064] Step 301: Obtain the task to be scheduled, and obtain the task requirement associated with the task to be scheduled and multiple candidate proxy servers.
[0065] Step 302: Determine the fitness between the task to be scheduled and each candidate proxy server according to the task requirements and the performance metrics of each candidate proxy server.
[0066] Step 303: Sort the multiple candidate proxy servers according to the multiple fitness values to obtain a sorted sequence.
[0067] In order to select the proxy server with the highest fitness for the task requirements of the task to be scheduled from multiple candidate proxy servers, in the embodiments of the present disclosure, based on the multiple fitness values, the multiple candidate proxy servers are sorted to obtain a sorted sequence. For example, the multiple candidate proxy servers are sorted in descending order of fitness to obtain a sorted sequence; or for another example, the multiple candidate proxy servers are sorted in ascending order of fitness to obtain a sorted sequence.
[0068] Step 304: Determine the target proxy server from the sorted sequence.
[0069] Among them, the fitness of the target proxy server is greater than that of other proxy servers in the sorted sequence.
[0070] In the embodiments of the present disclosure, if the sorted sequence is arranged in descending order of fitness, the first candidate proxy server in the sorted sequence is selected as the target proxy server; if the sorted sequence is arranged in ascending order of fitness, the last candidate proxy server in the sorted sequence is selected as the target proxy server.
[0071] Step 305: Schedule the task to be scheduled to the target proxy server to execute the task to be scheduled by using the target proxy server.
[0072] It should be noted that the execution processes of steps 301 to 302 and step 305 can be implemented in any one of the embodiments of the present disclosure respectively. The embodiments of the present disclosure do not make any limitations in this regard and will not be elaborated further.
[0073] In summary, according to the multiple fitness values, the multiple candidate proxy servers are sorted to obtain a sorted sequence; the target proxy server is determined from the sorted sequence. Thus, it can be ensured that the most suitable proxy server for processing the task to be scheduled is selected, thereby improving the efficiency and quality of task processing.
[0074] To clearly illustrate how the above embodiments obtain the task to be scheduled, the present disclosure proposes another task scheduling method.
[0075] Figure 4 It is a schematic flowchart of the task scheduling method shown in the fourth embodiment of the present disclosure.
[0076] As Figure 4As shown, the task scheduling method includes the following steps:
[0077] Step 401: Determine the task to be scheduled from at least one scheduling task in the target task queue.
[0078] Among them, the target task queue is generated by the following steps:
[0079] 1. In response to detecting at least one task scheduling request sent by the client, determine the priority of each task scheduling request;
[0080] It should be noted that the priority of the task scheduling request can be set manually in advance or automatically determined according to the type of the task scheduling request and the set business rules.
[0081] As an example, in response to detecting at least one task scheduling request sent by the client, for any task scheduling request, determine whether a priority parameter is carried in the any task scheduling request; among them, the priority parameter is used to indicate the priority of the corresponding task scheduling request; if so, determine the priority of the any task scheduling request according to the parameter value of the priority parameter.
[0082] That is to say, when detecting at least one task scheduling request sent by the client, for any task scheduling request, parse the task scheduling request, and determine whether a priority parameter is carried in the any task scheduling request according to the parsing result, where the priority parameter is used to indicate the priority of the corresponding task scheduling request. If the any task scheduling request carries a priority parameter, then based on the parameter value of the priority parameter, determine the priority of the any task scheduling request, that is, it means that the user has pre-set the priority of the task on the visualization page in advance, and the priority parameter in the task scheduling request is automatically generated according to the priority setting.
[0083] As another example, if not, determine the priority of any task scheduling request according to the request type of the any task scheduling request and the set business rules.
[0084] That is to say, when the priority parameter is not carried in the task scheduling request, determine the request type of the task scheduling request according to the parsing result of the task scheduling request. Among them, different request types can represent different task natures, urgencies or importances. The set business rules are used to guide how to determine the task priority according to the request type. Furthermore, based on the set business rules, evaluate the priority of the task scheduling request of this request type.
[0085] 2. Sort each task scheduling request according to the priority of each task scheduling request, and generate multiple scheduling tasks according to the sorted task scheduling requests;
[0086] In order to ensure that more important or urgent tasks can be processed first, in the embodiments of the present disclosure, the task scheduling requests are sorted according to the priorities of each task scheduling request. Furthermore, according to the sorted task scheduling request list, actual scheduling tasks are generated in sequence. The scheduling tasks may include specific information of the tasks, such as task type, execution time, required resources, etc.
[0087] 3. Write multiple scheduling tasks into the target task queue in sequence.
[0088] In order to ensure that the scheduling tasks are executed according to the priorities, in the embodiments of the present disclosure, each scheduling task is written into the target task queue in sequence according to the sorted order.
[0089] Step 402, obtain the task requirements associated with the task to be scheduled and multiple candidate proxy servers.
[0090] Step 403, determine the fitness between the task to be scheduled and each candidate proxy server according to the task requirements and the performance metrics of each candidate proxy server.
[0091] Step 404, determine the target proxy server from multiple candidate proxy servers according to multiple fitness degrees.
[0092] In order to adapt to the changing environment and requirements, in the embodiments of the present disclosure, when the task requirements change or the candidate proxy servers change, steps 402 to 404 are re-executed to determine the target proxy server.
[0093] As a first possible implementation manner, in response to reaching the first set period and the task requirements being updated, the target proxy server is re-determined from multiple candidate proxy servers according to the updated task requirements and the performance metrics of each candidate proxy server.
[0094] That is to say, when reaching the first set period and the task requirements are updated, steps 402 to 404 are re-executed according to the updated task requirements and the performance metrics of each candidate proxy server to determine the target proxy server from multiple candidate proxy servers.
[0095] As a second possible implementation manner, in response to reaching the first set period and multiple candidate proxy servers being updated, the target proxy server is determined from the updated multiple candidate proxy servers according to the task requirements and the performance metrics of the updated multiple candidate proxy servers.
[0096] That is to say, when the first set period is reached and multiple candidate proxy servers are updated (for example, new proxy servers are added), steps 402 to 404 are re-executed according to the task requirements and the performance metrics of the updated multiple candidate proxy servers to determine the target proxy server from the updated multiple candidate proxy servers.
[0097] It should be noted that the above only takes one possible implementation method as an example. In actual applications, the above two possible implementation methods can be executed simultaneously, and the present disclosure does not limit this.
[0098] Step 405: Schedule the task to be scheduled to the target proxy server so that the target proxy server executes the task to be scheduled.
[0099] In order to facilitate the timely discovery of potential problems of the proxy server, in the embodiments of the present disclosure, there are multiple tasks to be scheduled. In response to reaching the second set period, obtain the proxy service data of the target proxy server corresponding to each task to be scheduled within a set time period; generate a proxy service report according to the proxy service data of each target proxy server; display and send the proxy service report.
[0100] That is to say, when there are multiple tasks to be scheduled and the second set period is reached, automatically collect the proxy service data of the target servers executing each task to be scheduled within the specified time period; among them, the proxy service data includes key information such as the performance performance, service quality, number of requests processed, and success rate of the target proxy server; furthermore, generate a proxy service report according to the proxy service data of each target proxy server, and display the proxy service report so that relevant personnel can view it in a timely manner, and send the proxy service report to relevant personnel so that relevant personnel can understand the operating status of the proxy server in a timely manner and make corresponding decisions or adjustments.
[0101] In summary, by determining the task to be scheduled from at least one scheduling task in the target task queue, it is ensured that tasks are executed in the order of priority, reducing the waiting time for task execution, improving the task execution efficiency, and enhancing the user experience.
[0102] Based on any embodiment of the present disclosure, as Figure 5 shown, the task scheduling method of the embodiments of the present disclosure can also be implemented based on the following steps:
[0103] S1. User requirement collection
[0104] Set a clear priority grading standard for tasks. For example, it can be divided into four levels: urgent, high, medium, and low.
[0105] Among them, the steps for determining the priority of the task are as follows:
[0106] (1) User-specified: Allow users to specify the priority themselves according to their judgment of the urgency of the deployment task. Provide a corresponding priority selection area in the input interface, such as a slider or a drop-down menu for the user to choose;
[0107] (2) Automatic judgment based on rules: Automatically determine the priority according to the request type and relevant business rules;
[0108] S2. Proxy server
[0109] (1) Availability in terms of capacity
[0110] First, determine the maximum number of tasks that each proxy service can handle simultaneously. For example, proxy server C can handle a maximum of 20 customer consultation tasks simultaneously under the current hardware and human resource configuration.
[0111] Furthermore, consider the availability of the proxy service under resource constraints (such as network bandwidth, server resources, etc.). If the network bandwidth of proxy server D can only support a certain number of concurrent connections during peak hours, then record this limitation condition in the database. When allocating tasks, especially those with requirements for network bandwidth, ensure that this limitation is not exceeded;
[0112] (2) Hardware configuration
[0113] First, record the hardware specifications of the server used by the proxy service, including the CPU model, number of cores (such as 8 cores), frequency (such as 3.8 GHz), etc.;
[0114] Secondly, clarify the memory capacity and type of the proxy server; among them, it should be noted that sufficient memory is crucial for proxy services that run multiple tasks or process large datasets, and different types of memory will also affect the data read / write speed and the overall system performance;
[0115] Furthermore, describe the storage device information of the proxy service, including the hard disk type (such as mechanical hard disk HDD or solid-state drive SSD), capacity (such as 1TB SSD), read / write speed, etc. For proxy services that require frequent data read / write (such as file storage services, database proxy services, etc.), the performance of the storage device directly affects the service efficiency.
[0116] (3) Load
[0117] Real-time statistics of the number of tasks being processed by each proxy server. For example, proxy server F is currently processing 5 web proxy requests and 3 file download proxy requests, a total of 8 tasks. Among them, it should be noted that the number of tasks being processed by the proxy server can intuitively reflect the current busy degree of the proxy server.
[0118] Calculate the occupancy ratios of various resources (such as CPU usage, memory usage, network bandwidth usage, etc.) of the computing proxy server when processing the current task. For example, the CPU usage of proxy server G is 30%, the memory usage is 40%, and the network bandwidth usage is 20%. Through these data, the load status of the proxy server can be accurately evaluated to reasonably allocate new tasks.
[0119] S3. Intelligent algorithm matching
[0120] (1) Quantification of proxy service attributes and quantification of task requirements
[0121] For each proxy server in the proxy service pool: Bandwidth: Quantitatively record in Mbps. For example, the bandwidth of proxy server A is 100 Mbps; Latency: Measure and record in milliseconds. For example, the average latency of proxy server B is 50 ms; Current load: Represented as a percentage of usage. For example, the current load of proxy server D is 30%; For each task to be scheduled: Required bandwidth: Specify the minimum bandwidth required for the task. For example, task 1 requires 50 Mbps of bandwidth; Acceptable latency range: Set upper and lower limits. For example, the acceptable latency range for task 1 is [0, 100] ms;
[0122] (2) Set weights for each attribute (performance metric) of the proxy server and each attribute (requirement metric) of the task requirements according to the task requirements to be scheduled.
[0123] For example, for a video stream deployment task with extremely high requirements for network speed, the bandwidth weight may be set to 0.5, the latency weight to 0.3, and the current load weight to 0.2;
[0124] (3) Matching degree calculation
[0125] For each proxy server and each task to be scheduled: Bandwidth matching degree: If the bandwidth of the proxy server is greater than or equal to the required bandwidth of the task to be scheduled, the bandwidth matching degree is 1; otherwise, the bandwidth matching degree is the bandwidth of the proxy server divided by the required bandwidth of the task to be scheduled (the value range is between 0 and 1); Latency matching degree: If the latency of the proxy server is within the acceptable latency range of the task to be scheduled, the latency matching degree is 1; If the latency is lower than the lower limit, a certain reward coefficient (such as 1.1) can be given; If the latency is higher than the upper limit, the latency matching degree is 0; Current load matching degree: The calculation method is (1 - the current load of the proxy server). For example, if the current load is 30%, the current load matching degree is 0.7; Add the above matching degrees according to the set weights to obtain the comprehensive matching degree (that is, the fitness between the proxy server and the task to be scheduled). For example, for proxy server A and task 1, assume the bandwidth matching degree is 1, the latency matching degree is 1, and the current load matching degree is 0.8. According to the previously set weights (bandwidth weight 0.5, latency weight 0.3, current load weight 0.2), the comprehensive matching degree = 1 * 0.5 + 1 * 0.3 + 0.8 * 0.2 = 0.96;
[0126] (4) Proxy service sorting
[0127] Sort the proxy servers in descending order according to the comprehensive matching degree. As shown in Table 1, the proxy server with a higher comprehensive matching degree is ranked higher.
[0128] Table 1 Comprehensive matching degrees of each proxy server
[0129] Proxy server Comprehensive matching degree Proxy server A 1*0.5+1*0.3+0.8*0.2=0.96 Proxy server B 1*0.5+0.7*0.3+0.5*0.2=0.81 Proxy server C 0.8*0.5+1*0.3+0.9*0.2=0.86
[0130] (5) Proxy service allocation
[0131] For each task, allocate a proxy server from the corresponding sorted list of proxy servers until all tasks are allocated or the available proxy servers in the proxy server pool are exhausted. It should be noted that during the allocation process, if it is found that a certain proxy server has already been allocated to other tasks and its remaining resources cannot meet the requirements of the current task (such as insufficient remaining bandwidth), then skip this proxy server and continue to select the next available proxy server.
[0132] (6) Dynamic adjustment
[0133] Recalculate the attributes of the proxy servers and the task requirements regularly (such as at regular time intervals or when a new proxy server joins or there are significant changes in task requirements), and re-execute the above steps to achieve dynamic optimization of proxy service allocation. For example, if the bandwidth of a certain proxy server suddenly drops due to network congestion, by recalculating the matching degree, the tasks originally assigned to this proxy server may be reassigned to other more suitable proxy servers;
[0134] S4. Real-time Monitoring and Feedback
[0135] For each proxy server that is processing tasks, obtain the work progress information in real time through the task management system or the proxy working status feedback mechanism;
[0136] S5. Statistics and Reporting
[0137] (1) Data Aggregation and Sorting
[0138] Aggregate data from the proxy resource database and the real-time monitoring module regularly (such as weekly or monthly); sort out the task data for each proxy service, including the number of processed tasks, average processing time, success rate, etc.;
[0139] (2) Data Analysis and Index Calculation
[0140] Calculate various key indicators, such as the efficiency index of each proxy service (comprehensively considering factors such as the number of processed tasks, average processing time, and success rate);
[0141] (3) Report Generation and Presentation
[0142] Generate a detailed statistical report based on the data analysis results, and distribute the report to relevant departments or personnel for business optimization decisions, etc.
[0143] Corresponding to the task scheduling method provided in the above embodiment, the present disclosure also provides a task scheduling device. Since the task scheduling device provided in the embodiments of the present disclosure corresponds to the task scheduling method provided in the above embodiment, the implementation manners of the task scheduling method are also applicable to the task scheduling device provided in the embodiments of the present disclosure and will not be described in detail in the embodiments of the present disclosure.
[0144] Figure 6 It is a schematic structural diagram of the task scheduling device shown in the fifth embodiment of the present disclosure.
[0145] As Figure 6 shown, the task scheduling device 600 includes: an acquisition module 610, a first determination module 620, a second determination module 630, and an execution module 640.
[0146] Among them, an obtaining module 610 is configured to obtain a task to be scheduled, and obtain task requirements associated with the task to be scheduled and a plurality of candidate proxy servers; a first determination module 620 is configured to determine a matching degree between the task to be scheduled and each candidate proxy server according to the task requirements and performance metrics of each candidate proxy server; a second determination module 630 is configured to determine a target proxy server from the plurality of candidate proxy servers according to the plurality of matching degrees; and an execution module 640 is configured to schedule the task to be scheduled to the target proxy server, so as to execute the task to be scheduled by using the target proxy server.
[0147] As a possible implementation manner of an embodiment of the present disclosure, the first determination module 620 is configured to obtain a plurality of requirement metrics in the task requirements; for any one of the requirement metrics, obtain a performance metric that matches the any one of the requirement metrics from a plurality of performance metrics of any one of the candidate proxy servers; determine a matching degree between the any one of the requirement metrics and the matching performance metric according to a value range of the any one of the requirement metrics and a metric value of the matching performance metric; and determine a matching degree between the task to be scheduled and any one of the candidate proxy servers according to the matching degrees between the respective requirement metrics and the matching performance metrics.
[0148] As a possible implementation manner of an embodiment of the present disclosure, the first determination module 620 is configured to obtain set weights of the respective requirement metrics; and perform weighted summation on the matching degrees between the respective requirement metrics and the matching performance metrics based on the set weights of the respective requirement metrics, so as to obtain a matching degree between the task to be scheduled and any one of the candidate proxy servers.
[0149] As a possible implementation manner of an embodiment of the present disclosure, the task scheduling device 600 further includes: a third determination module.
[0150] Among them, the obtaining module 610 is configured to, for any one of the candidate proxy servers, obtain hardware configuration information, current load information, and capacity information under specified resource constraints of the any one of the candidate proxy servers; and the third determination module is configured to determine a metric value of a performance metric of any one of the candidate proxy servers according to the hardware configuration information, current load information, and capacity information under specified resource constraints of the any one of the candidate proxy servers.
[0151] As a possible implementation manner of an embodiment of the present disclosure, the second determination module 630 is configured to sort the plurality of candidate proxy servers according to the plurality of matching degrees to obtain a sorting sequence; and determine a target proxy server from the sorting sequence; wherein the matching degree of the target proxy server is greater than that of other proxy servers in the sorting sequence.
[0152] As a possible implementation manner of an embodiment of the present disclosure, an obtaining module 610 is configured to determine the to-be-scheduled task from at least one scheduling task in a target task queue; wherein, the target task queue is generated by the following modules: a fourth determination module, a sorting module, and a writing module.
[0153] Among them, the fourth determination module is configured to determine the priority of each task scheduling request in response to monitoring at least one task scheduling request sent by a client; the sorting module is configured to sort each task scheduling request according to the priority of each task scheduling request, and generate a plurality of scheduling tasks according to the sorted task scheduling requests; the writing module is configured to sequentially write the plurality of scheduling tasks into the target task queue.
[0154] As a possible implementation manner of an embodiment of the present disclosure, the fourth determination module is configured to, in response to monitoring at least one task scheduling request sent by a client, for any task scheduling request, determine whether a priority parameter is carried in the any task scheduling request; wherein, the priority parameter is used to indicate the priority of the corresponding task scheduling request; if so, determine the priority of the any task scheduling request according to the parameter value of the priority parameter; if not, determine the priority of the any task scheduling request according to the request type of the any task scheduling request and the set service rules.
[0155] As a possible implementation manner of an embodiment of the present disclosure, the second determination module 630 is further configured to, in response to reaching a first set period and the task requirements being updated, re-determine a target proxy server from a plurality of candidate proxy servers according to the updated task requirements and the performance metrics of each candidate proxy server; and / or, in response to reaching a first set period and a plurality of candidate proxy servers being updated, determine a target proxy server from the updated plurality of candidate proxy servers according to the task requirements and the performance metrics of the updated plurality of candidate proxy servers.
[0156] As a possible implementation manner of an embodiment of the present disclosure, when there are multiple to-be-scheduled tasks, the obtaining module 610 is further configured to, in response to reaching a second set period, obtain the proxy service data of the target proxy server corresponding to each to-be-scheduled task within a set time period; generate a proxy service report according to the proxy service data of each target proxy server; display and send the proxy service report.
[0157] The task scheduling device according to the embodiments of the present disclosure obtains the tasks to be scheduled, and obtains the task requirements associated with the tasks to be scheduled and multiple candidate proxy servers; determines the fitness between the tasks to be scheduled and each candidate proxy server according to the task requirements and the performance metrics of each candidate proxy server; determines the target proxy server from the multiple candidate proxy servers according to the multiple fitness degrees; and schedules the tasks to be scheduled to the target proxy server, so as to use the target proxy server to execute the tasks to be scheduled. Thus, by accurately matching the task requirements of the tasks to be scheduled with the performance metrics of the multiple candidate proxy servers, the best adaptation between the tasks to be scheduled and the proxy servers is achieved, which not only significantly improves the execution efficiency and quality of the tasks, ensures that the tasks are processed in a timely manner on the most suitable server, but also maximizes the utilization of server resources and avoids the idle and waste of resources; at the same time, the automatic scheduling of tasks reduces the need for manual intervention, improves the efficiency and accuracy of task allocation, and reduces the possibility of human errors.
[0158] In an exemplary embodiment, an electronic device is also proposed.
[0159] Wherein, the electronic device includes:
[0160] A processor;
[0161] A memory for storing instructions executable by the processor;
[0162] Wherein, the processor is configured to execute instructions to implement the task scheduling method proposed in any of the foregoing embodiments.
[0163] As an example, Figure 7 is a schematic structural diagram of an electronic device 700 shown in an exemplary embodiment of the present disclosure. As Figure 7 shown, the above-mentioned electronic device 700 may further include:
[0164] A memory 710 and a processor 720, a bus 730 connecting different components (including the memory 710 and the processor 720), and the memory 710 stores a computer program, and when the processor 720 executes the program, the task scheduling method described in the embodiments of the present disclosure is implemented.
[0165] The bus 730 represents one or more of several types of bus structures, including a memory bus or a memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any bus structure in multiple bus structures. For example, these architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
[0166] The electronic device 700 typically includes a variety of electronically readable media. These media can be any available media accessible to the electronic device 700, including volatile and non-volatile media, removable and non-removable media.
[0167] The memory 710 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 740 and / or cache memory 750. The server 700 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 760 can be used for reading and writing on non-removable, non-volatile magnetic media ( Figure 7 not shown, typically referred to as a "hard disk drive"). Although Figure 7 not shown in the figure, a disk drive for reading and writing on a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing on a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM or other optical media) can be provided. In these cases, each drive can be connected to the bus 730 through one or more data media interfaces. The memory 710 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the embodiments of the present disclosure.
[0168] A program / utility 780 having a set (at least one) of program modules 770 can be stored, for example, in the memory 710. Such program modules 770 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment. The program modules 770 generally perform the functions and / or methods in the embodiments described in the present disclosure.
[0169] The electronic device 700 can also communicate with one or more external devices 790 (such as a keyboard, a pointing device, a display 791, etc.), and can also communicate with one or more devices that enable a user to interact with the electronic device 700, and / or communicate with any device that enables the electronic device 700 to communicate with one or more other computing devices (such as a network card, a modem, etc.). Such communication can be carried out through the input / output (I / O) interface 792. Moreover, the electronic device 700 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 793. As shown in the figure, the network adapter 793 communicates with other modules of the electronic device 700 through the bus 730. It should be understood that although not shown in the figure, other hardware and / or software modules can be used in combination with the electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0170] The processor 720 executes various functional applications and data processing by running programs stored in the memory 710.
[0171] It should be noted that for the implementation process and technical principle of the electronic device in this embodiment, refer to the foregoing explanation of the task scheduling method of the embodiments of the present disclosure, and details are not described herein again.
[0172] In an exemplary embodiment, there is also provided a computer-readable storage medium including instructions, such as a memory including instructions, and the above instructions can be executed by the processor of the electronic device to complete the task scheduling method proposed in any of the above embodiments. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0173] In an exemplary embodiment, there is also provided a computer program product including a computer program / instructions, characterized in that when the computer program / instructions are executed by a processor, the task scheduling method proposed in any of the above embodiments is implemented.
[0174] Those skilled in the art will readily think of other implementations of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the following claims.
[0175] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A task scheduling method, characterized in that: include: Obtaining a task to be scheduled, and obtaining a task requirement and a plurality of candidate proxy servers associated with the task to be scheduled; Determining the degree of compatibility between the task to be scheduled and each of the candidate proxy servers according to the task requirements and the performance indicators of each of the candidate proxy servers; Determining a target proxy server from the plurality of candidate proxy servers according to the plurality of fitness degrees; The task to be scheduled is scheduled to the target proxy server, so that the target proxy server is used to execute the task to be scheduled.
2. The method according to claim 1, characterized in that The number of the performance indicators is multiple, and the determination of the degree of compatibility between the task to be scheduled and each of the candidate proxy servers according to the task requirements and the performance indicators of each of the candidate proxy servers includes: Obtaining multiple requirement indicators in the task requirement; For any demand indicator, obtaining a performance indicator matching any demand indicator from multiple performance indicators of any candidate proxy server; Determining the degree of compatibility between any demand indicator and the matching performance indicator according to the value range of any demand indicator and the indicator value of the matching performance indicator; The degree of compatibility between the task to be scheduled and any candidate proxy server is determined according to the degree of compatibility between each of the demand indicators and the matching performance indicators.
3. The method according to claim 2, characterized in that The determining the degree of compatibility between the task to be scheduled and any candidate proxy server according to the degree of compatibility between each of the demand indicators and the matching performance indicators includes: Obtaining the set weights of each of the demand indicators; Based on the set weights of the demand indicators, the fitness between the demand indicators and the matching performance indicators is weighted and summed to obtain the fitness between the task to be scheduled and any candidate proxy server.
4. The method according to claim 2, characterized in that: Before determining the degree of compatibility between any demand indicator and the matching performance indicator according to the value range of any demand indicator and the indicator value of the matching performance indicator, the method further includes: For any candidate proxy server, obtaining hardware configuration information, current load information, and capacity information under specified resource constraints of the any candidate proxy server; The indicator value of the performance indicator of any candidate proxy service is determined according to the hardware configuration information, current load information and capacity information under specified resource constraints of any candidate proxy server.
5. The method according to claim 1, characterized in that The step of determining a target proxy server from the plurality of candidate proxy servers according to the plurality of fitness degrees comprises: Sorting the plurality of candidate proxy servers according to the plurality of fitness degrees to obtain a sorting sequence; The target proxy server is determined from the sorted sequence; wherein the fitness of the target proxy server is greater than that of other proxy servers in the sorted sequence.
6. The method according to claim 1, characterized in that The step of obtaining the task to be scheduled includes: Determine the task to be scheduled from at least one scheduled task in the target task queue; wherein the target task queue is generated by the following steps: In response to monitoring at least one task scheduling request sent by the client, determining the priority of each task scheduling request; Sorting the task scheduling requests according to their priorities, and generating a plurality of scheduling tasks according to the sorted task scheduling requests; The multiple scheduled tasks are written into the target task queue in sequence.
7. The method according to claim 6, characterized in that The step of determining the priority of each of the task scheduling requests in response to monitoring at least one task scheduling request sent by the client includes: In response to monitoring at least one task scheduling request sent by the client, for any task scheduling request, determining whether any task scheduling request carries a priority parameter; wherein the priority parameter is used to indicate the priority of the corresponding task scheduling request; If so, determining the priority of any one of the task scheduling requests according to the parameter value of the priority parameter; If not, the priority of any task scheduling request is determined according to the request type of any task scheduling request and set business rules.
8. The method according to claim 1, characterized in that The method further comprises: In response to reaching the first set period and the task requirement being updated, re-determining a target proxy server from the plurality of candidate proxy servers according to the updated task requirement and the performance indicators of each of the candidate proxy servers; and / or, In response to reaching the first set period and the multiple candidate proxy servers being updated, a target proxy server is determined from the multiple updated candidate proxy servers according to the task requirements and performance indicators of the multiple updated candidate proxy servers.
9. The method according to claim 1, characterized in that: There are multiple tasks to be scheduled, and the method further includes: In response to reaching the second set period, acquiring proxy service data of the target proxy server corresponding to each of the tasks to be scheduled within a set period; Generate a proxy service report based on the proxy service data of each target proxy server; The proxy service report is displayed and sent.
10. A task scheduling device, characterized in that: include: An acquisition module, used for acquiring a task to be scheduled, and acquiring a task requirement and a plurality of candidate proxy servers associated with the task to be scheduled; A first determination module, configured to determine the degree of compatibility between the task to be scheduled and each of the candidate proxy servers according to the task requirements and the performance indicators of each of the candidate proxy servers; A second determination module, configured to determine a target proxy server from the plurality of candidate proxy servers according to the plurality of fitness degrees; The execution module is used to schedule the task to be scheduled to the target proxy server, so as to use the target proxy server to execute the task to be scheduled.
Citation Information
Patent Citations
Task allocation method and system, electronic equipment, storage medium and product
CN119225945A