CN117950833A - Task scheduling method, device, computer equipment and storage medium - Google Patents

Task scheduling method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN117950833A
CN117950833A CN202410054626.4A CN202410054626A CN117950833A CN 117950833 A CN117950833 A CN 117950833A CN 202410054626 A CN202410054626 A CN 202410054626A CN 117950833 A CN117950833 A CN 117950833A
Authority
CN
China
Prior art keywords
task
data analysis
utilization rate
resource utilization
server
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202410054626.4A
Other languages
Chinese (zh)
Inventor
何宇斌
彭超逸
聂涌泉
马光
张伊宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Southern Power Grid Co Ltd
Original Assignee
China Southern Power Grid Co Ltd
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 China Southern Power Grid Co Ltd filed Critical China Southern Power Grid Co Ltd
Priority to CN202410054626.4A priority Critical patent/CN117950833A/en
Publication of CN117950833A publication Critical patent/CN117950833A/en
Pending legal-status Critical Current

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application relates to a task scheduling method, a task scheduling device, computer equipment, a storage medium and a computer program product, and relates to the technical field of power automation. The method comprises the following steps: acquiring a data analysis task issued by a virtual power plant unit; matching at least two servers to be selected corresponding to the task types of the data analysis task in the edge cluster; calculating the average resource utilization rate of the available servers in each server to be selected based on a preset resource utilization rate calculation index; and determining a target server from the available servers according to the average resource utilization rate, and distributing the data analysis task to the target server. By adopting the method, the resource utilization rate of the data analysis task scheduling process can be improved.

Description

Task scheduling method, device, computer equipment and storage medium
Technical Field
The present application relates to the field of power automation technology, and in particular, to a task scheduling method, apparatus, computer device, storage medium, and computer program product.
Background
The independent cloud platform has large-scale computing and storage resources, but servers of the cloud platform are usually concentrated together, network performance is a key factor for limiting the advantage exertion of the cloud platform in the scene of distributed application, and the transmission cost of data is higher under the background of big data, so that the application and development of the independent cloud platform mode have a great bottleneck in the application scene with higher requirements on the timeliness and reliability of a power system, especially in the current situation of the vigorous development of various distributed new energy sources.
The edge computing is used as a mode for coping with the distributed computing, and computing and storage resources are close to the distributed equipment, so that the localization of partial functions is realized, and therefore, the analysis service with high reliability and high instantaneity is realized. The cloud edge cooperative system provides a wider platform for the development of a power system dispatching system.
The distributed resources have larger randomness and volatility, the concept of the virtual power plant is proposed for ensuring the controllability and reducing the difficulty of power grid regulation, and the integrated management is mainly carried out on the distributed energy sources including new energy sources and energy storage, so that the regulation and control of the power grid are realized. In the current regulation and control process of the power grid, the data analysis tasks issued by the virtual power plants need to be scheduled and processed, however, the current scheduling mode for the data analysis tasks issued by the virtual power plants has the problem of low resource utilization rate.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a task scheduling method, apparatus, computer device, computer readable storage medium, and computer program product that can improve the resource utilization of a data analysis task scheduling process.
In a first aspect, the present application provides a task scheduling method. The method comprises the following steps:
Acquiring a data analysis task issued by a virtual power plant unit; the virtual power plant unit comprises a unit which is deployed at the power plant facility side and used for indicating the power plant to perform resource regulation and control; the data analysis task comprises a task which needs to be subjected to data analysis in the power plant resource regulation and control process;
Matching at least two servers to be selected corresponding to the task types of the data analysis task in the edge cluster; the edge cluster comprises a server cluster which is deployed at a power plant facility side in a cloud-edge cooperative system to process the data analysis task;
calculating the average resource utilization rate of the available servers in the servers to be selected based on a preset resource utilization rate calculation index;
and determining a target server in the available servers according to the average resource utilization rate, and distributing the data analysis task to the target server.
In one embodiment, before the step of matching at least two candidate servers corresponding to the task types of the data analysis task in the edge cluster, the method further includes:
Identifying the task type of the data analysis task;
for each task type, setting a container mirror image in a server of the edge cluster in a container virtualization mode; the container mirror image comprises a mirror image corresponding to a container for regulating and controlling power plant resources in a cloud platform of the cloud edge cooperative system.
In one embodiment, the calculating the average resource utilization of the available servers in each of the candidate servers includes:
acquiring the working state of each server to be selected;
under the condition that the working state is an idle state, determining that the server to be selected is the available server;
and calculating the average resource utilization rate of each available server.
In one embodiment, the resource utilization calculation index includes a processor index, a hard disk index, a memory index, and a container index, and the calculating the average resource utilization of each of the available servers includes:
acquiring the total resource amount and the current resource usage amount corresponding to each resource utilization rate calculation index;
Taking the ratio of the current resource usage amount to the total resource amount as a target resource utilization rate corresponding to each resource utilization rate calculation index;
And calculating the average value of the target resource utilization rate to obtain the average resource utilization rate.
In one embodiment, the determining a target server from the available servers according to the average resource utilization, and distributing the data analysis task to the target server includes:
ranking all the available servers according to the value of the average resource utilization rate to obtain a ranking result;
the available server with the minimum value of the average resource utilization rate in the sequencing result is used as the target server;
And distributing the task with the earliest arrival time in the data analysis tasks to the target server.
In one embodiment, the task types of the data analysis task include a power prediction type, a security analysis type, a power scheduling type and a power resource interaction type; the tasks of the power prediction type are used for predicting the power of the virtual power plant at the hour and day level; the safety analysis type task is used for carrying out safety check on possible accidents of the power grid; the power scheduling type tasks are used for distributing power grid power among the virtual power plants and the new energy aggregation sources; the power resource interaction type is used for providing resource interaction services with resource users for various power resources.
In a second aspect, the application further provides a task scheduling device. The device comprises:
The task acquisition module is used for acquiring a data analysis task issued by the virtual power plant unit; the virtual power plant unit comprises a unit which is deployed at the power plant facility side and used for indicating the power plant to perform resource regulation and control; the data analysis task comprises a task which needs to be subjected to data analysis in the power plant resource regulation and control process;
The server matching module is used for matching at least two servers to be selected corresponding to the task types of the data analysis task in the edge cluster; the edge cluster comprises a server cluster which is deployed at a power plant facility side in a cloud-edge cooperative system to process the data analysis task;
the utilization rate calculation module is used for calculating the average resource utilization rate of the available servers in the servers to be selected based on a preset resource utilization rate calculation index;
And the task allocation module is used for determining a target server in the available servers according to the average resource utilization rate and allocating the data analysis task to the target server.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
Acquiring a data analysis task issued by a virtual power plant unit; the virtual power plant unit comprises a unit which is deployed at the power plant facility side and used for indicating the power plant to perform resource regulation and control; the data analysis task comprises a task which needs to be subjected to data analysis in the power plant resource regulation and control process;
Matching at least two servers to be selected corresponding to the task types of the data analysis task in the edge cluster; the edge cluster comprises a server cluster which is deployed at a power plant facility side in a cloud-edge cooperative system to process the data analysis task;
calculating the average resource utilization rate of the available servers in the servers to be selected based on a preset resource utilization rate calculation index;
and determining a target server in the available servers according to the average resource utilization rate, and distributing the data analysis task to the target server.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
Acquiring a data analysis task issued by a virtual power plant unit; the virtual power plant unit comprises a unit which is deployed at the power plant facility side and used for indicating the power plant to perform resource regulation and control; the data analysis task comprises a task which needs to be subjected to data analysis in the power plant resource regulation and control process;
Matching at least two servers to be selected corresponding to the task types of the data analysis task in the edge cluster; the edge cluster comprises a server cluster which is deployed at a power plant facility side in a cloud-edge cooperative system to process the data analysis task;
calculating the average resource utilization rate of the available servers in the servers to be selected based on a preset resource utilization rate calculation index;
and determining a target server in the available servers according to the average resource utilization rate, and distributing the data analysis task to the target server.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the steps of:
Acquiring a data analysis task issued by a virtual power plant unit; the virtual power plant unit comprises a unit which is deployed at the power plant facility side and used for indicating the power plant to perform resource regulation and control; the data analysis task comprises a task which needs to be subjected to data analysis in the power plant resource regulation and control process;
Matching at least two servers to be selected corresponding to the task types of the data analysis task in the edge cluster; the edge cluster comprises a server cluster which is deployed at a power plant facility side in a cloud-edge cooperative system to process the data analysis task;
calculating the average resource utilization rate of the available servers in the servers to be selected based on a preset resource utilization rate calculation index;
and determining a target server in the available servers according to the average resource utilization rate, and distributing the data analysis task to the target server.
According to the task scheduling method, the device, the computer equipment, the storage medium and the computer program product, firstly, the data analysis task issued by the virtual power plant unit is acquired, then at least two servers to be selected corresponding to the task type of the data analysis task are obtained in a matching mode in the edge cluster, further, the average resource utilization rate of the available servers in the servers to be selected is calculated based on the preset resource utilization rate calculation index, finally, the target server is determined in the available servers according to the average resource utilization rate, the data analysis task is distributed to the target server, the delay of container deployment is reduced through the mode of task classification and container presetting, the reliability of deployment is improved, the scheduling of the task is realized according to the average utilization rate of resources, the large-scale task scheduling under the premise of balancing loads is realized, the efficiency and the reliability of dispatching and running of the data analysis task of the virtual power plant are improved, the safe and stable running of a power grid is ensured, and the resource utilization rate of the data analysis task scheduling process is improved.
Drawings
FIG. 1 is an application environment diagram of a task scheduling method in one embodiment;
FIG. 2 is a flow diagram of a task scheduling method in one embodiment;
FIG. 3 is a flow chart of a task scheduling method according to another embodiment;
FIG. 4 is a scheduling principle flow chart of a task scheduling method in one embodiment;
FIG. 5 is a block diagram of a task scheduler in one embodiment;
FIG. 6 is an internal block diagram of a computer device in one embodiment;
fig. 7 is an internal structural view of a computer device in another embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
The task scheduling method provided by the embodiment of the application can be applied to an application environment shown in figure 1. Wherein the terminal 102 communicates with the server 104 via a network.
The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices, and portable wearable devices, where the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server 104 may be implemented as a stand-alone server or as a server cluster of multiple servers.
In one embodiment, as shown in fig. 2, a task scheduling method is provided, and the method is applied to the terminal 102 in fig. 1 for illustration, and includes the following steps:
S201, acquiring a data analysis task issued by the virtual power plant unit.
Wherein the virtual power plant unit comprises a unit which is deployed at a power plant facility side to instruct a power plant to perform resource regulation; the data analysis task comprises a task which needs to be subjected to data analysis in the power plant resource regulation and control process.
S202, at least two servers to be selected corresponding to the task types of the data analysis task are obtained in the edge cluster in a matching mode.
The edge cluster comprises a server cluster which is deployed on the power plant facility side in a cloud-edge cooperative system to process data analysis tasks.
The server to be selected is a server meeting the requirements of corresponding task types in the edge cluster and is used for processing data analysis tasks meeting the requirements of the task types.
The servers available in the edge cluster are illustratively divided into four classes, corresponding to four different analysis task types respectively, and only corresponding single-type containers are deployed on each class of servers.
S203, calculating the average resource utilization rate of the available servers in the servers to be selected based on the preset resource utilization rate calculation index.
Wherein the available server refers to a server in an idle state among the servers to be selected.
The resource utilization rate calculation index comprises indexes of CPU, hard disk, memory and container resources of an available server.
The average utilization rate of the CPU, the hard disk, the memory and the container of the currently available server is calculated, the average utilization rate of four resources is calculated, and the server with the lowest average utilization rate is determined as the target server.
S204, determining a target server in the available servers according to the average resource utilization rate, and distributing the data analysis task to the target server.
Among the available servers, the target server refers to the server with the lowest average resource utilization.
According to the task scheduling method, the data analysis task issued by the virtual power plant unit is firstly acquired, then at least two to-be-selected servers corresponding to the task type of the data analysis task are obtained in the edge cluster in a matching mode, further, the average resource utilization rate of the available servers in each to-be-selected server is calculated based on the preset resource utilization rate calculation index, finally, a target server is determined in the available servers according to the average resource utilization rate, the data analysis task is distributed to the target server, the delay of container deployment is reduced, the reliability of deployment is improved, the scheduling of the task is realized according to the average utilization rate of the resource, the large-scale task scheduling under the premise of balancing the load is realized, the efficiency and the reliability of the dispatching and running of the data analysis task of the virtual power plant are improved, the safe and stable running of a power grid is guaranteed, and the resource utilization rate of the data analysis task scheduling process is improved.
In one embodiment, before the step of matching at least two servers to be selected corresponding to the task types of the data analysis task in the edge cluster, the method further includes: identifying a task type of the obtained data analysis task; for each task type, a container mirror image is set in the server of the edge cluster by adopting a container virtualization mode.
The task types of the data analysis task comprise a power prediction type, a safety analysis type, a power scheduling type and a power resource interaction type.
The container mirror image comprises a mirror image corresponding to a container for regulating and controlling power plant resources in a cloud platform of the cloud edge cooperative system.
By way of example, a Docker container mode is adopted to set corresponding container mirror images for four analysis tasks in a virtualized application mode of a cloud edge cooperative system.
In this embodiment, the task type of the data analysis task is first identified, then, for each task type, a container mirror image is set in the server of the edge cluster by adopting a container virtualization manner, a preparation condition is provided for the scheduling process of the data analysis task, and the virtualized deployment work is completed.
In one embodiment, calculating the average resource utilization of the available servers in each of the candidate servers includes: acquiring the working state of each server to be selected; under the condition that the working state is an idle state, determining the server to be selected as an available server; an average resource utilization of each available server is calculated.
The working states of the server to be selected include, but are not limited to, an enabling state, a standby state and an idle state.
Illustratively, as many containers as possible are deployed depending on the current computing and storage resources, the deployed containers may be in an active state or may be in a standby or idle state.
In this embodiment, the working state of each server to be selected is obtained first, then the server to be selected is determined to be an available server under the condition that the working state is in an idle state, finally the average resource utilization rate of each available server is calculated, and the available server is obtained through monitoring and judging the working state of each server to be selected, so that preliminary screening is provided for the subsequent determination of the final server, the accuracy of the determination of the target server is improved, and the resource utilization rate of the scheduling process is further improved.
In one embodiment, the resource utilization calculation index includes a processor index, a hard disk index, a memory index, and a container index, and calculating an average resource utilization of each available server includes: acquiring the total resource amount and the current resource usage amount corresponding to each resource utilization rate calculation index; taking the ratio of the current resource usage amount to the total resource amount as a target resource utilization rate corresponding to each resource utilization rate calculation index; and calculating the average value of the utilization rate of each target resource to obtain the average utilization rate of the resource.
The target resource utilization rate refers to the utilization rate corresponding to each index, and the average resource utilization rate may be an arithmetic average value of the utilization rates of the indexes.
Illustratively, in the case where the resource utilization calculation index is a container index, the total amount of resources refers to the total amount of containers deployed on the server, and the current amount of resource usage refers to the amount of capacity on the server in an operational state.
In this embodiment, the total amount of resources and the current amount of resources corresponding to each resource utilization rate calculation index are obtained first, then the ratio of the current amount of resources to the total amount of resources is used as the target resource utilization rate corresponding to each resource utilization rate calculation index, finally the average value of each target resource utilization rate is calculated, the average resource utilization rate is obtained, the accuracy of calculation of the utilization rate is improved through the average calculation of the resource utilization rates under various indexes, the accuracy of determination of a target server is further improved, and the resource utilization rate in the scheduling process is further improved.
In one embodiment, determining a target server among the available servers based on the average resource utilization and assigning data analysis tasks to the target server comprises: sequencing all available servers according to the value of the average resource utilization rate to obtain a sequencing result; the available server with the minimum value of the average resource utilization rate in the sequencing result is used as a target server; and distributing the task with the earliest arrival time in the data analysis tasks to the target server.
Illustratively, the task with the forefront time in the batch of tasks is distributed to the target server; if the task allocation fails, the task is added to the last of the task sequence.
In this embodiment, the available servers are ranked according to the value of the average resource utilization ratio to obtain a ranking result, then the available server with the minimum value of the average resource utilization ratio in the ranking result is used as the target server, and further the task with the earliest arrival time in the data analysis tasks is distributed to the target server, the server with the lower current resource utilization ratio is selected in the ranking form, and the latest arriving task is distributed to the server, so that the resource utilization ratio in the scheduling process is improved.
In one embodiment, the task types of the data analysis task include a power prediction type, a security analysis type, a power scheduling type, and a power resource interaction type; tasks of the power forecast type are used for the power forecast of the virtual power plant at the hour and day level; the safety analysis type task is used for carrying out safety check on possible accidents of the power grid; the power scheduling type tasks are used for distributing power grid power among the virtual power plants and the new energy aggregation sources; the power resource interaction type is used for providing resource interaction services with resource users for each power resource.
The power resource interaction type is also called a power transaction type, the resource use party refers to a client of the power plant, and the resource interaction service refers to a power market function provided by the power plant to the client.
In another embodiment, as shown in fig. 3, there is provided a task scheduling method, including the steps of:
s301, acquiring the working state of each server to be selected.
S302, determining the server to be selected as an available server under the condition that the working state is an idle state.
S303, obtaining the total resource amount and the current resource usage amount corresponding to each resource utilization rate calculation index.
S304, taking the ratio of the current resource usage amount to the total resource amount as the target resource utilization rate corresponding to each resource utilization rate calculation index.
S305, calculating the average value of the utilization rate of each target resource to obtain the average utilization rate of the resource.
S306, sorting all available servers according to the value of the average resource utilization rate to obtain a sorting result.
S307, the available server with the minimum value of the average resource utilization rate in the sequencing result is taken as a target server.
S308, the task with the earliest arrival time in the data analysis tasks is distributed to the target server.
It should be noted that, the specific limitation of the above steps may be referred to the specific limitation of a task scheduling method, which is not described herein.
In one embodiment, task scheduling and virtualization techniques are the core content of edge computing.
Task scheduling refers to assigning tasks to servers (compute nodes) at the edge, and the servers complete the compute tasks and return results. Virtualization is key to edge computing scalability and flexibility implementation. The Docker container is a typical virtualized application mode, has independent and isolated virtual computer environments, and has the main advantages of independent operation and lower workload of release, modification and test of the application. If the current edge device is not sufficiently computationally intensive, tasks need to be distributed to more powerful compute nodes or deferred to execution. Meanwhile, servers of the edge clusters may have differences, and reasonable task scheduling needs to be performed according to task requirements.
Therefore, in edge computing, task scheduling is closely related to and affects each other with application of virtualization technology, and in order to achieve efficient and reliable task processing of the cloud edge collaborative system, it is necessary to study the task scheduling technology based on container deployment to achieve an optimal execution effect and an optimal resource utilization effect.
Based on the above, the application provides a task scheduling method, also called a cloud edge cooperation and preset container-based virtual power plant analysis task scheduling method, which is used for realizing distributed management of virtual power plant units by using an edge cluster for a virtual power plant scheduling system adopting a cloud edge cooperation platform, managing and controlling the edge cluster by a cloud end, and scheduling analysis tasks among servers of the edge cluster. And managing the computing storage resources of the cloud-edge system by adopting a mode of a Docker container. Dividing analysis and calculation tasks into four types of power prediction, safety analysis, power scheduling and power transaction, and respectively setting corresponding container images; dividing servers of the edge cluster into four types, and analyzing and calculating containers corresponding to the four types; deploying as many containers as possible on each server; for each type of computing task, determining the priority of server use by calculating the average utilization rate of a CPU, a hard disk, a memory and a container of the server; distributing the analysis task which comes first at the current moment to a server with the lowest average utilization rate; and after the allocation is completed, calculating the average utilization rate of various resources of the server again, and determining the allocation target of the next analysis task until the analysis task scheduling is finished. The method has the advantages that the analysis tasks are rapidly distributed in a plurality of edge cluster servers, meanwhile, load balancing is achieved, the influence of computing resources and network characteristics on container deployment is reduced, and the running reliability and efficiency of the cloud edge cooperative system are improved.
For ease of understanding by those skilled in the art, FIG. 4 provides a scheduling principle flow chart of a task scheduling method. The task scheduling method is described in detail below in one particular embodiment with reference to fig. 4. It is to be understood that the following description is exemplary only and is not intended to limit the application to the details of construction and the arrangements of the components set forth herein.
The task scheduling method provided by the application comprises the following steps:
1) The virtual power plant dispatching system adopts a cloud edge cooperative platform, and the dispatching control is arranged at the cloud end and controls the edge cluster; the edge cluster is close to the virtual power plant and has the functions of data acquisition, data transmission, analysis and calculation, data storage, virtual power plant unit control and the like.
2) The virtual power plant analysis tasks are divided into four types, namely power prediction, safety analysis, power scheduling and power trading, wherein the power prediction is used for predicting the power of the virtual power plant at the hour and day level, the safety analysis is used for carrying out safety check on the expected accidents possibly happened to the power grid, the power scheduling is used for realizing the distribution of the power grid power among the virtual power plant and the new aggregate energy sources thereof, and the power trading improves the power market function.
3) And setting corresponding container mirror images for four analysis tasks by adopting a Docker container mode to implement a virtualized application mode of the cloud edge cooperative system.
4) The servers available in the edge cluster are divided into four types, the four types correspond to four different analysis task types respectively, only corresponding single types of containers are deployed on each type of server, and as many containers as possible are deployed according to the current computing and storage resources, and the deployed containers can be in an enabling state or in a standby or idle state.
5) The allocation of the current batch analysis tasks of the virtual power plant is as follows:
a) Determining a target server for analyzing task allocation: calculating the average utilization rate of a CPU, a hard disk, a memory and a container of a currently available server, calculating the average utilization rate of four resources, and determining the server with the lowest average utilization rate as a target server; wherein, the calculation formula is as follows:
Wherein Ca is the average utilization rate of resources of the server; ci is the utilization of the ith resource; m 0i is the aggregate of the ith resource, and for a container, refers to the aggregate of the containers deployed on the server; m i is the usage of the ith resource, and for a container, refers to the amount of capacity on the server in the running state.
B) Distributing the task with the forefront time in the batch of tasks to a target server; if the task allocation fails, the task is added to the last of the task sequence.
C) Repeating the step a) and the step b) until the batch analysis task is completely distributed.
According to the task scheduling method provided by the application, aiming at the requirements of the analysis task of the virtual power plant and the characteristics of the cloud edge cooperative system, the virtual management and control of computing resources are realized through the dock container, the delay of container deployment is reduced, the deployment reliability is improved through the way of classifying and presetting the containers, the task scheduling is realized according to the average utilization rate of the resources on the basis, the large-scale task scheduling under the premise of load balancing is realized, the running efficiency and the reliability of the analysis task of the virtual power plant are improved, and the safe and stable running of a power grid is ensured.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a task scheduling device for realizing the task scheduling method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of one or more task scheduling devices provided below may refer to the limitation of the task scheduling method hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 5, there is provided a task scheduling device, including: a task acquisition module 501, a server matching module 502, a utilization calculation module 503, and a task allocation module 504, wherein: the task acquisition module 501 is used for acquiring a data analysis task issued by the virtual power plant unit; the virtual power plant unit comprises a unit which is deployed at the power plant facility side and used for indicating the power plant to perform resource regulation and control; the data analysis task comprises a task which needs to be subjected to data analysis in the power plant resource regulation and control process; the server matching module 502 is configured to match at least two servers to be selected corresponding to task types of the data analysis task in the edge cluster; the edge cluster comprises a server cluster which is deployed at the power plant facility side in the cloud edge cooperative system and is used for processing data analysis tasks; a utilization rate calculating module 503, configured to calculate an average utilization rate of resources of the available servers in each of the servers to be selected based on a preset resource utilization rate calculation index; the task allocation module 504 is configured to determine a target server from the available servers according to the average resource utilization, and allocate the data analysis task to the target server.
In one embodiment, the apparatus is further to: identifying a task type of the obtained data analysis task; setting a container mirror image in a server of the edge cluster by adopting a container virtualization mode aiming at each task type; the container mirror image comprises a mirror image corresponding to a container for regulating and controlling power plant resources in a cloud platform of the cloud edge cooperative system.
In one embodiment, the utilization calculation module is further configured to: acquiring the working state of each server to be selected; under the condition that the working state is an idle state, determining the server to be selected as an available server; an average resource utilization of each available server is calculated.
In one embodiment, the resource utilization calculation metrics include a processor metric, a hard disk metric, a memory metric, and a container metric, and the utilization calculation module is further configured to: acquiring the total resource amount and the current resource usage amount corresponding to each resource utilization rate calculation index; taking the ratio of the current resource usage amount to the total resource amount as a target resource utilization rate corresponding to each resource utilization rate calculation index; and calculating the average value of the utilization rate of each target resource to obtain the average utilization rate of the resource.
In one embodiment, the task allocation module is further to: sequencing all available servers according to the value of the average resource utilization rate to obtain a sequencing result; the available server with the minimum value of the average resource utilization rate in the sequencing result is used as a target server; and distributing the task with the earliest arrival time in the data analysis tasks to the target server.
In one embodiment, the task types of the data analysis task include a power prediction type, a security analysis type, a power scheduling type, and a power resource interaction type; tasks of the power forecast type are used for the power forecast of the virtual power plant at the hour and day level; the safety analysis type task is used for carrying out safety check on possible accidents of the power grid; the power scheduling type tasks are used for distributing power grid power among the virtual power plants and the new energy aggregation sources; the power resource interaction type is used for providing resource interaction services with resource users for each power resource.
The respective modules in the task scheduling device described above may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 6. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is for storing data. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a task scheduling method.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program is executed by a processor to implement a task scheduling method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by persons skilled in the art that the structures shown in fig. 6 and 7 are block diagrams of only portions of structures associated with the present inventive arrangements and are not limiting of the computer device to which the present inventive arrangements are applied, and that a particular computer device may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device includes a memory having a computer program stored therein and a processor that when executing the computer program performs the steps of the method embodiments described above.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magneto-resistive random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (PHASE CHANGE Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), etc. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A method of task scheduling, the method comprising:
Acquiring a data analysis task issued by a virtual power plant unit; the virtual power plant unit comprises a unit which is deployed at the power plant facility side and used for indicating the power plant to perform resource regulation and control; the data analysis task comprises a task which needs to be subjected to data analysis in the power plant resource regulation and control process;
Matching at least two servers to be selected corresponding to the task types of the data analysis task in the edge cluster; the edge cluster comprises a server cluster which is deployed at a power plant facility side in a cloud-edge cooperative system to process the data analysis task;
calculating the average resource utilization rate of the available servers in the servers to be selected based on a preset resource utilization rate calculation index;
and determining a target server in the available servers according to the average resource utilization rate, and distributing the data analysis task to the target server.
2. The method of claim 1, wherein prior to the step of matching at least two candidate servers in an edge cluster corresponding to a task type of the data analysis task, the method further comprises:
Identifying the task type of the data analysis task;
for each task type, setting a container mirror image in a server of the edge cluster in a container virtualization mode; the container mirror image comprises a mirror image corresponding to a container for regulating and controlling power plant resources in a cloud platform of the cloud edge cooperative system.
3. The method of claim 1, wherein said calculating an average resource utilization of available ones of said candidate servers comprises:
acquiring the working state of each server to be selected;
under the condition that the working state is an idle state, determining that the server to be selected is the available server;
and calculating the average resource utilization rate of each available server.
4. The method of claim 3, wherein the resource utilization calculation metrics include a processor metric, a hard disk metric, a memory metric, and a container metric, and wherein calculating the average resource utilization for each of the available servers comprises:
acquiring the total resource amount and the current resource usage amount corresponding to each resource utilization rate calculation index;
Taking the ratio of the current resource usage amount to the total resource amount as a target resource utilization rate corresponding to each resource utilization rate calculation index;
And calculating the average value of the target resource utilization rate to obtain the average resource utilization rate.
5. The method of claim 1, wherein the determining a target server among the available servers based on the average resource utilization and assigning the data analysis task to the target server comprises:
ranking all the available servers according to the value of the average resource utilization rate to obtain a ranking result;
the available server with the minimum value of the average resource utilization rate in the sequencing result is used as the target server;
And distributing the task with the earliest arrival time in the data analysis tasks to the target server.
6. The method of claim 1, wherein the task types of the data analysis tasks include a power prediction type, a security analysis type, a power scheduling type, and a power resource interaction type; the tasks of the power prediction type are used for predicting the power of the virtual power plant at the hour and day level; the safety analysis type task is used for carrying out safety check on possible accidents of the power grid; the power scheduling type tasks are used for distributing power grid power among the virtual power plants and the new energy aggregation sources; the power resource interaction type is used for providing resource interaction services with resource users for various power resources.
7. A task scheduling device, the device comprising:
The task acquisition module is used for acquiring a data analysis task issued by the virtual power plant unit; the virtual power plant unit comprises a unit which is deployed at the power plant facility side and used for indicating the power plant to perform resource regulation and control; the data analysis task comprises a task which needs to be subjected to data analysis in the power plant resource regulation and control process;
The server matching module is used for matching at least two servers to be selected corresponding to the task types of the data analysis task in the edge cluster; the edge cluster comprises a server cluster which is deployed at a power plant facility side in a cloud-edge cooperative system to process the data analysis task;
the utilization rate calculation module is used for calculating the average resource utilization rate of the available servers in the servers to be selected based on a preset resource utilization rate calculation index;
And the task allocation module is used for determining a target server in the available servers according to the average resource utilization rate and allocating the data analysis task to the target server.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202410054626.4A 2024-01-15 2024-01-15 Task scheduling method, device, computer equipment and storage medium Pending CN117950833A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410054626.4A CN117950833A (en) 2024-01-15 2024-01-15 Task scheduling method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410054626.4A CN117950833A (en) 2024-01-15 2024-01-15 Task scheduling method, device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117950833A true CN117950833A (en) 2024-04-30

Family

ID=90804303

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410054626.4A Pending CN117950833A (en) 2024-01-15 2024-01-15 Task scheduling method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117950833A (en)

Similar Documents

Publication Publication Date Title
CN108776934B (en) Distributed data calculation method and device, computer equipment and readable storage medium
US8631410B2 (en) Scheduling jobs in a cluster having multiple computing nodes by constructing multiple sub-cluster based on entry and exit rules
Gu et al. Greening cloud data centers in an economical way by energy trading with power grid
CN104794194B (en) A kind of distributed heterogeneous concurrent computational system towards large scale multimedia retrieval
CN105471985A (en) Load balance method, cloud platform computing method and cloud platform
CN112596902A (en) Task scheduling method and device based on CPU-GPU cooperative computing
CN114610474B (en) Multi-strategy job scheduling method and system under heterogeneous supercomputing environment
CN109614227A (en) Task resource concocting method, device, electronic equipment and computer-readable medium
CN116263701A (en) Computing power network task scheduling method and device, computer equipment and storage medium
Kwon et al. Dynamic scheduling method for cooperative resource sharing in mobile cloud computing environments
CN114201306B (en) Multi-dimensional geographic space entity distribution method and system based on load balancing technology
CN116402318A (en) Multi-stage computing power resource distribution method and device for power distribution network and network architecture
CN115981843A (en) Task scheduling method and device in cloud-edge cooperative power system and computer equipment
CN117950833A (en) Task scheduling method, device, computer equipment and storage medium
CN115952054A (en) Simulation task resource management method, device, equipment and medium
Guo et al. PARA: Performability‐aware resource allocation on the edges for cloud‐native services
CN115729687A (en) Task scheduling method and device, computer equipment and storage medium
CN114489978A (en) Resource scheduling method, device, equipment and storage medium
CN116795524A (en) Task processing method, device, computer equipment, storage medium and program product
Awasare et al. Survey and comparative study on resource allocation strategies in cloud computing environment
Lin et al. A multi-centric model of resource and capability management in cloud simulation
Sun et al. Power-aware virtual machine placement for mobile edge computing
CN117707797B (en) Task scheduling method and device based on distributed cloud platform and related equipment
CN117453759B (en) Service data processing method, device, computer equipment and storage medium
CN117519996B (en) Data processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination