CN115827179A - Computing power scheduling method, device, equipment and storage medium for physical machine equipment - Google Patents

Computing power scheduling method, device, equipment and storage medium for physical machine equipment Download PDF

Info

Publication number
CN115827179A
CN115827179A CN202211120450.5A CN202211120450A CN115827179A CN 115827179 A CN115827179 A CN 115827179A CN 202211120450 A CN202211120450 A CN 202211120450A CN 115827179 A CN115827179 A CN 115827179A
Authority
CN
China
Prior art keywords
task
physical machine
idle
running
state
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.)
Granted
Application number
CN202211120450.5A
Other languages
Chinese (zh)
Other versions
CN115827179B (en
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.)
Jiangxi Fenghuo New Energy Technology Co ltd
Original Assignee
Jiangxi Fenghuo New Energy Technology 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 Jiangxi Fenghuo New Energy Technology Co ltd filed Critical Jiangxi Fenghuo New Energy Technology Co ltd
Priority to CN202211120450.5A priority Critical patent/CN115827179B/en
Publication of CN115827179A publication Critical patent/CN115827179A/en
Application granted granted Critical
Publication of CN115827179B publication Critical patent/CN115827179B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Power Sources (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention relates to a cloud computing technology, and discloses a computing power scheduling method of physical machine equipment, which comprises the following steps: acquiring a first task and a second task in a task queue, and respectively configuring the number of physical machines for running the first task and the second task to obtain a first number and a second number; monitoring the running states of the first task and the second task in real time to obtain a first running state and a second running state; when the first running state is in an idle state and the second running state is in a non-idle state, calculating a first idle physical machine corresponding to the first task, and distributing the first idle physical machine to the second task to execute the running of the second task to obtain a running result; when the first running state is in a non-idle state and the second running state is in an idle state, calculating a second idle physical machine corresponding to the second task, and distributing the second idle physical machine to the first task to execute the running of the first task to obtain a running result of the first task; when the first running state is in an idle state and the second running state is in an idle state, determining the priority of the tasks to be executed in the task queue, acquiring a third task in the task queue, respectively calculating a third idle physical machine corresponding to the first task and a fourth idle physical machine corresponding to the second task, executing the operation of the third task, and acquiring the operation result of the third task.

Description

Computing power scheduling method, device, equipment and storage medium for physical machine equipment
Technical Field
The invention relates to the technical field of cloud computing, in particular to a computing power scheduling method, a computing power scheduling device, computing power scheduling equipment and a storage medium of physical machine equipment.
Background
The physical machine is a name for a physical computer relative to a virtual machine, the physical machine provides a hardware environment for the virtual machine, sometimes called as a "host" or a "host", through cooperation of the physical machine and the virtual machine, a plurality of operating systems (an external operating system and a plurality of operating systems in the virtual machine) can be installed on one computer, communication among the operating systems can be realized, and like a plurality of computers, reasonable scheduling of algorithms used by different tasks can be realized, so that the tasks can be efficiently completed.
However, the existing scheduling methods for physical machines allocate resources of the physical machines manually through a computing unit to complete different tasks, and the scheduling methods are poor in real-time performance, cannot be adjusted according to actual operation of the tasks, are low in efficiency, and further reduce efficiency of task completion corresponding to the physical machines, so that a method capable of improving rationality of scheduling of the physical machines is needed.
Disclosure of Invention
The invention provides a computing power scheduling method, a computing power scheduling device, computing power scheduling equipment and a storage medium of physical machine equipment, and mainly aims to improve the scheduling reasonability of the physical machine equipment.
In order to achieve the above object, the present invention provides a computing power scheduling method for a physical machine device, including:
acquiring a first task and a second task in a task queue, wherein the first task is a charging strategy distribution task, the second task is a charging strategy generation task, and the number of physical machines for operating the first task and the second task is respectively configured to obtain a first number and a second number;
monitoring the running states of the first task and the second task in real time to obtain a first running state and a second running state;
when the first running state is in an idle state and the second running state is in a non-idle state, calculating a first idle physical machine corresponding to the first task according to the first quantity, and distributing the first idle physical machine to the second task to execute the running of the second task to obtain a running result;
when the first running state is in a non-idle state and the second running state is in an idle state, calculating a second idle physical machine corresponding to the second task according to the second quantity, and distributing the second idle physical machine to the first task to execute the running of the first task to obtain a running result of the first task;
when the first running state is in an idle state and the second running state is in an idle state, determining the priority of a task to be executed in the task queue, acquiring a third task in the task queue according to the priority, respectively calculating a third idle physical machine corresponding to the first task and a fourth idle physical machine corresponding to the second task according to the first quantity and the second quantity, and executing the running of the third task based on the third idle physical machine and the fourth idle physical machine to obtain a running result of the third task.
Optionally, the respectively configuring the number of physical machines running the first task and the second task to obtain a first number and a second number includes:
running the first task and the second task respectively;
respectively recording the running task quantities of the first task and the second task to obtain a first task quantity and a second task quantity;
and respectively configuring the number of physical machines of the first task and the second task according to the first task amount and the second task amount to obtain a first number and a second number.
Optionally, the monitoring, in real time, the running states of the first task and the second task when running to obtain a first running state and a second running state includes:
historical operating data in the first task and the second task are obtained, and fault detection is carried out on the historical operating data;
if the fault data exist, repairing the task corresponding to the fault data to obtain a repair task;
performing task updating on the first task and the second task according to the repair task to obtain a first updating task and a second updating task;
acquiring current running states of the first updating task and the second updating task to obtain a first running state and a second running state;
and if no fault data exists, directly acquiring the states of the first task and the second task to obtain a first running state and a second running state.
Optionally, the calculating, according to the first number, a first idle physical machine corresponding to the first task includes:
acquiring the total number of tasks of the first task corresponding to the first running state;
obtaining the number of physical machines configured by the first task according to the total number of the tasks;
calculating a difference between the first number and the number of physical machines;
and obtaining a first idle physical machine corresponding to the first task according to the difference value.
Optionally, the allocating the first idle physical machine to the second task includes:
calculating the workload of each task in the second tasks;
acquiring load data of the first idle physical machine;
performing optimal simulation distribution on the workload and the load data to obtain an optimal distribution scheme;
and distributing the first idle physical machine to the second task according to the optimal distribution scheme.
Optionally, the performing optimal simulated distribution on the workload and the load data to obtain an optimal distribution scheme includes:
performing an optimal simulated distribution of the workload and the load data using the following formula:
Figure SMS_1
wherein ,
Figure SMS_2
represents an optimal distribution scheme, G represents the total amount of workload and application data, a represents the initial value of the initial workload and load data, Y () represents an analog distribution function, ρ represents a distribution coefficient, ω is j Representing an assigned set of workload and load data.
Optionally, the determining the priority of the task to be executed in the task queue includes:
acquiring a waiting period of the task to be executed in the task queue;
performing attribute analysis on the task to be executed to obtain task attributes;
calculating priority interpolation of the task to be executed by utilizing a preset priority algorithm according to the waiting time and the task attribute;
and determining the priority of the task to be executed according to the priority interpolation.
In order to solve the above problem, the present invention further provides a computing power scheduling apparatus for a physical machine device, including:
the task obtaining module is used for obtaining a first task and a second task in a task queue, wherein the first task is a charging strategy distribution task, the second task is a charging strategy generation task, and the number of physical machines for operating the first task and the second task is respectively configured to obtain a first number and a second number;
the running state monitoring module is used for monitoring the running states of the first task and the second task in real time to obtain a first running state and a second running state;
a first allocation module, configured to calculate, according to the first quantity, a first idle physical machine corresponding to the first task when the first operating state is in an idle state and the second operating state is in a non-idle state, and allocate the first idle physical machine to the second task to execute operation on the second task, so as to obtain an operation result;
a second allocating module, configured to calculate, according to the second quantity, a second idle physical machine corresponding to the second task when the first operating state is in a non-idle state and the second operating state is in an idle state, and allocate the second idle physical machine to the first task to execute the operation on the first task, so as to obtain an operation result of the first task;
and the third allocation module is used for determining the priority of the tasks to be executed in the task queue when the first running state is in an idle state and the second running state is in an idle state, acquiring the third tasks in the task queue according to the priority, respectively calculating a third idle physical machine corresponding to the first task and a fourth idle physical machine corresponding to the second task according to the first quantity and the second quantity, and executing the operation of the third task based on the third idle physical machine and the fourth idle physical machine to obtain the operation result of the third task.
In order to solve the above problem, the present invention also provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the computational scheduling method of the physical machine device described above.
In order to solve the above problem, the present invention further provides a storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the computational power scheduling method of a physical machine device described above.
The method comprises the steps of acquiring a first task and a second task in a task queue, wherein the first task is a charging strategy distribution task, the second task is a charging strategy generation task, specific contents of the first task and the second task can be known, and a precondition guarantee is provided for subsequently configuring the number of physical machines for the first task and the second task; in addition, according to the present invention, when the first operating state is in an unoccupied state and the second operating state is in an idle state, the second idle physical machines corresponding to the second tasks are calculated according to the second number, and when the first operating state is in the unoccupied state and the second operating state is in the idle state, the first task is being processed, the second task is completed, and then the idle physical machines of the second task can be configured to the first task, so as to improve the completion efficiency of the first task. Therefore, the computing power scheduling method, device, equipment and storage medium for the physical machine equipment provided by the embodiments of the present invention can improve the rationality of the scheduling of the physical machine equipment.
Drawings
Fig. 1 is a schematic flowchart of a computing power scheduling method for a physical machine device according to an embodiment of the present invention;
fig. 2 is a functional block diagram of a computing power scheduling apparatus of a physical machine device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device for implementing the computational power scheduling method of the physical machine device according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
The embodiment of the application provides a computing power scheduling method for physical machine equipment. In this embodiment of the present application, an execution subject of the computing power scheduling method of the physical machine device includes, but is not limited to, at least one of electronic devices that can be configured to execute the method provided in this embodiment of the present application, such as a server and a terminal. In other words, the computational scheduling method of the physical machine device may be performed by software or hardware installed in the terminal device or the server device, and the software may be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Fig. 1 is a schematic flowchart of a computing power scheduling method for a physical machine device according to an embodiment of the present invention. In this embodiment, the computing power scheduling method for the physical machine device includes steps S1 to S5:
the method includes the steps of S1, obtaining a first task and a second task in a task queue, wherein the first task is a charging strategy distribution task, the second task is a charging strategy generation task, and the number of physical machines for operating the first task and the second task is respectively configured to obtain a first number and a second number.
According to the method and the device, the first task and the second task in the task queue are obtained, wherein the first task is a charging strategy distribution task, and the second task is a charging strategy generation task, so that specific contents of the first task and the second task can be known, and a precondition guarantee is provided for subsequently configuring the number of physical machines for the first task and the second task.
The task queue is a queue generated by tasks according to corresponding sequence sequencing, the charging strategy distribution task is a task for distributing charging according to a strategy, the charging strategy generation task is a task for generating corresponding tasks according to a charging strategy, and further the first task and the second task can be obtained through a task management tool.
According to the invention, the first quantity and the second quantity are obtained by respectively configuring the quantity of the physical machines for operating the first task and the second task, and the corresponding quantity of the physical machines is obtained by operating the first task and the second task, so that the task allocation to the physical machines is convenient subsequently.
The physical machines are names of physical computers relative to the virtual machines, the physical machines are provided for corresponding hardware environments of the virtual machines, sometimes called as "hosts" or "hosts", the first number is the corresponding number of the physical machines obtained by configuration according to requirements when the first task is executed, and the second number is the corresponding number of the physical machines obtained by configuration according to requirements when the second task is executed.
As an embodiment of the present invention, the configuring the number of physical machines running the first task and the second task, respectively, to obtain a first number and a second number includes: the method comprises the steps of running the first task and the second task respectively, recording the running task quantity of the first task and the running task quantity of the second task respectively to obtain a first task quantity and a second task quantity, and configuring the physical machine quantity of the first task and the second task respectively according to the first task quantity and the second task quantity to obtain a first quantity and a second quantity.
The first task amount is the number of tasks in the first task running, and the second task amount is the number of tasks in the second task running.
Further, the running of the first task and the second task may be performed by a task runner, the number of tasks of the first task and the second task may be obtained by a task counter, the task counter is compiled by a scripting language, and the number of physical machines of the first task and the second task may be configured by a physical machine server.
S2, monitoring the running states of the first task and the second task in real time to obtain a first running state and a second running state.
According to the method and the device, the running states of the first task and the second task are monitored in real time to obtain the first running state and the second running state, and the running conditions of the first task and the second task, whether faults exist and the like can be known according to the first running state and the second running state, wherein the first running state is the running condition corresponding to the first task, and the second running state is the running condition corresponding to the second task.
As an embodiment of the present invention, the monitoring the running states of the first task and the second task in real time to obtain a first running state and a second running state includes: obtaining historical operating data in the first task and the second task, performing fault detection on the historical operating data, if fault data exists, repairing the task corresponding to the fault data to obtain a repair task, performing task update on the first task and the second task according to the repair task to obtain a first update task and a second update task, obtaining current operating states of the first update task and the second update task to obtain a first operating state and a second operating state, and if fault data does not exist, directly obtaining states of the first task and the second task to obtain a first operating state and a second operating state.
The historical operating data is a data record which is operated before the first task and the second task, the fault data is data corresponding to a task with a fault in the first task and the second task, the repair task is a task which is obtained after the task corresponding to the fault data is repaired, the first update task and the second update task are obtained after the fault task in the first task and the second task is repaired, further, the historical operating data in the first task and the second task can be obtained through a task manager in the first task and the second task, fault detection can be carried out on the historical operating data through a fault detector, the task corresponding to the fault data can be repaired through a task repair tool, the task repair tool is compiled by Java language, and the current operating states of the first update task and the second update task can be obtained through a CLWGUOD tool.
And S3, when the first running state is in an idle state and the second running state is in a non-idle state, calculating a first idle physical machine corresponding to the first task according to the first quantity, and distributing the first idle physical machine to the second task to execute the running of the second task to obtain a running result.
According to the method, when the first running state is in an idle state and the second running state is in a non-idle state, the first idle physical machine corresponding to the first task is calculated according to the first number, when the first running state is in the idle state and the second running state is in the non-idle state, the first task is completed, the second task is being processed, and then the follow-up physical configuration of the second task is guaranteed, wherein the first idle physical machine is the number of the physical machines corresponding to the first task in the idle state.
As an embodiment of the present invention, the calculating, according to the first number, a first idle physical machine corresponding to the first task includes: acquiring the total number of tasks of the first task corresponding to the first running state, acquiring the number of physical machines configured for the first task according to the total number of tasks, calculating the difference value between the first number and the number of physical machines, and acquiring a first idle physical machine corresponding to the first task according to the difference value.
The task total number is a total number of tasks in the first task in the first operating state, the number of physical machines is a total number of physical machines that the first task needs to configure, and corresponds to the task total number, the first idle physical machine is a physical machine in an idle state in the first task, and further, the task total number of the first task corresponding to the first operating state may be obtained by the task counter.
According to the method and the device, the first idle physical machine is allocated to the second task to execute the operation of the second task to obtain an operation result, the completion time of the second task can be shortened by allocating the first idle physical machine to the second task to improve the completion efficiency of the second task, and the operation result is data obtained after the second task operates.
As an embodiment of the present invention, the allocating the first idle physical machine to the second task includes: and calculating the workload of each task in the second task, acquiring load data of the first idle physical machine, performing optimal simulated distribution on the workload and the load data to obtain an optimal distribution scheme, and distributing the first idle physical machine to the second task according to the optimal distribution scheme.
The workload is operation energy required for ensuring to complete each task in the second task, the load data is energy generated when the first idle physical machine operates normally, the optimal allocation scheme is that the workload and the load data are combined together to obtain a best allocation result, further, the workload of each task in the second task can be calculated by a workload method, and the load data can be obtained by inquiring parameters of the first idle physical machine.
As an optional embodiment of the present invention, the optimal simulated distribution of the workload and the load data to obtain an optimal distribution scheme may be implemented by the following formula:
Figure SMS_3
wherein ,
Figure SMS_4
represents an optimal distribution scheme, G represents the total amount of workload and application data, a represents the initial value of the initial workload and load data, Y () represents an analog distribution function, ρ represents a distribution coefficient, ω is j Representing an assigned set of workload and load data.
And S4, when the first running state is in a non-idle state and the second running state is in an idle state, calculating a second idle physical machine corresponding to the second task according to the second quantity, and distributing the second idle physical machine to the first task to execute the running of the first task to obtain a running result of the first task.
According to the method, when the first running state is in an unoccupied state and the second running state is in an idle state, the second idle physical machines corresponding to the second tasks are calculated according to the second quantity, when the first running state is in the unoccupied state and the second running state is in the idle state, the first tasks are processed, the second tasks are completed, and then the idle physical machines of the second tasks can be configured for the first tasks, so that the completion efficiency of the first tasks is improved, wherein the second idle physical machines are the quantity of the physical machines corresponding to the second tasks in the idle state.
Further, a method for calculating the number of second idle physical machines corresponding to the second task is the same as the principle for calculating the first idle physical machine, and a method for allocating the second idle physical machines to the first task is the same as the principle for allocating the first idle physical machines, which is not described herein in detail.
S5, when the first running state is in an idle state and the second running state is in an idle state, determining the priority of tasks to be executed in the task queue, acquiring third tasks in the task queue according to the priority, respectively calculating a third idle physical machine corresponding to the first task and a fourth idle physical machine corresponding to the second task according to the first quantity and the second quantity, and executing the operation of the third task based on the third idle physical machine and the fourth idle physical machine to obtain an operation result of the third task.
According to the invention, when the first running state is in an idle state and the second running state is in an idle state, the priority of the task to be executed in the task queue is determined, the third task in the task queue is obtained according to the priority, when the first running state and the second running state are both in the idle state, the first task and the second task are both in a completion state, and then the third task is obtained from the queue according to the priority so as to complete the task with high priority first, wherein the task to be executed is the task waiting to be executed in the task queue, and the priority is the importance degree of the task to be executed.
As an embodiment of the present invention, the determining the priority of the task to be executed in the task queue includes: acquiring a waiting period of the task to be executed in the task queue, performing attribute analysis on the task to be executed to obtain task attributes, calculating priority interpolation of the task to be executed by using a preset priority algorithm according to the waiting period and the task attributes, and determining the priority of the task to be executed according to the priority interpolation.
The waiting period is waiting time of the task to be executed in the task queue, the task attribute is task property of the task to be executed, the priority interpolation is a numerical expression form for judging priority of the task to be executed, further, the waiting period can be obtained through a timer in the task queue, and attribute analysis can be performed on the task to be executed through an attribute analysis method.
Further, as an optional embodiment of the present invention, the preset priority algorithm includes:
Figure SMS_5
where P (u) denotes priority interpolation, a denotes start values of task attributes and latency, x denotes end values of task attributes and latency, t denotes priority interpolation i Linear value, s, corresponding to the i-th waiting time i Represents the linear value corresponding to the ith task attribute, Z (t) i s i ) A linear function representing task properties and latency.
According to the present invention, a third idle physical machine corresponding to the first task and a fourth idle physical machine corresponding to the second task are respectively calculated according to the first quantity and the second quantity, and the third idle physical machine and the fourth idle physical machine can be scheduled to the third task according to the third idle physical machine and the fourth idle physical machine, so as to subsequently execute the third task, wherein the third idle physical machine and the fourth idle physical machine are physical machines corresponding to the first task and the second task respectively when the first operating state is in an idle state and the second operating state is in an idle state, and further, the calculation method of the third idle physical machine and the fourth idle physical machine is the same as the principle of calculating the first idle physical machine, and no redundant description is provided herein.
According to the invention, the third task is executed based on the third idle physical machine and the fourth idle physical machine, so that the running result of the third task is obtained, the idle physical machines corresponding to the first task and the second task can be distributed to the third task, the physical machines are reasonably scheduled, and the task processing efficiency is improved.
The method comprises the steps of acquiring a first task and a second task in a task queue, wherein the first task is a charging strategy distribution task, the second task is a charging strategy generation task, specific contents of the first task and the second task can be known, and a precondition guarantee is provided for subsequently configuring the number of physical machines for the first task and the second task; in addition, when the first running state is in a non-idle state and the second running state is in an idle state, the second idle physical machines corresponding to the second tasks are calculated according to the second quantity, when the first running state is in the non-idle state and the second running state is in the idle state, the first tasks are processed, the second tasks are completed, and then the idle physical machines of the second tasks can be configured for the first tasks, so that the completion efficiency of the first tasks is improved. Therefore, the computing power scheduling method for the physical machine equipment provided by the embodiment of the invention can improve the rationality of scheduling the physical machine equipment.
Fig. 2 is a functional block diagram of a computational power scheduling apparatus of a physical machine device according to an embodiment of the present invention.
The computing power scheduling apparatus 100 of the physical machine device according to the present invention may be installed in an electronic device. According to the implemented functions, the computing power scheduling apparatus 100 of the physical machine device may include a task obtaining module 101, an operation state monitoring module 102, a first allocating module 103, a second allocating module 104, and a third allocating module 105. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the task obtaining module 101 is configured to obtain a first task and a second task in a task queue, where the first task is a charging policy allocation task, the second task is a charging policy generation task, and the number of physical machines running the first task and the second task is configured to obtain a first number and a second number, respectively;
the running state monitoring module 102 is configured to monitor a running state when the first task and the second task are running in real time, so as to obtain a first running state and a second running state;
the first allocating module 103 is configured to, when the first operating state is in an idle state and the second operating state is in a non-idle state, calculate a first idle physical machine corresponding to the first task according to the first quantity, and allocate the first idle physical machine to the second task to execute the operation on the second task, so as to obtain an operation result;
the second allocating module 104 is configured to, when the first operating state is in a non-idle state and the second operating state is in an idle state, calculate a second idle physical machine corresponding to the second task according to the second quantity, and allocate the second idle physical machine to the first task to execute the operation on the first task, so as to obtain an operation result of the first task;
the third allocating module 105 is configured to, when the first operating state is in an idle state and the second operating state is in an idle state, determine a priority of a task to be executed in the task queue, obtain a third task in the task queue according to the priority, calculate a third idle physical machine corresponding to the first task and a fourth idle physical machine corresponding to the second task according to the first quantity and the second quantity, and execute operation on the third task based on the third idle physical machine and the fourth idle physical machine to obtain an operation result of the third task.
In detail, in the embodiment of the present application, each module in the power calculating and scheduling apparatus 100 for a physical machine device adopts the same technical means as the power calculating and scheduling method for a physical machine device described in fig. 1, and can produce the same technical effect, and is not described again here.
Fig. 3 is a schematic structural diagram of an electronic device 1 for implementing a computational power scheduling method for a physical machine device according to an embodiment of the present invention.
The electronic device 1 may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further include a computer program stored in the memory 11 and executable on the processor 10, such as a computer power scheduling method program of a physical machine device.
In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, and includes one or more Central Processing Units (CPUs), a microprocessor, a digital Processing chip, a graphics processor, a combination of various control chips, and the like. The processor 10 is a Control Unit (Control Unit) of the electronic device 1, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules (for example, a program for executing a computer-aided scheduling method of a physical machine device, and the like) stored in the memory 11 and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used not only to store application software installed in the electronic device and various types of data, such as codes of a computer scheduling method program of a physical machine device, but also to temporarily store data that has been output or will be output.
The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
The communication interface 13 is used for communication between the electronic device 1 and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are typically used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
Fig. 3 shows only an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the described embodiments are for purposes of illustration only and that the scope of the appended claims is not limited to such structures.
The computational power scheduling method program of the physical machine device stored in the memory 11 of the electronic device 1 is a combination of a plurality of instructions, and when running in the processor 10, can realize:
acquiring a first task and a second task in a task queue, wherein the first task is a charging strategy distribution task, the second task is a charging strategy generation task, and the number of physical machines for operating the first task and the second task is respectively configured to obtain a first number and a second number;
monitoring the running states of the first task and the second task in real time to obtain a first running state and a second running state;
when the first running state is in an idle state and the second running state is in a non-idle state, calculating a first idle physical machine corresponding to the first task according to the first quantity, and distributing the first idle physical machine to the second task to execute the running of the second task to obtain a running result;
when the first running state is in a non-idle state and the second running state is in an idle state, calculating a second idle physical machine corresponding to the second task according to the second quantity, and distributing the second idle physical machine to the first task to execute the running of the first task to obtain a running result of the first task;
when the first running state is in an idle state and the second running state is in an idle state, determining the priority of a task to be executed in the task queue, acquiring a third task in the task queue according to the priority, respectively calculating a third idle physical machine corresponding to the first task and a fourth idle physical machine corresponding to the second task according to the first quantity and the second quantity, and executing the running of the third task based on the third idle physical machine and the fourth idle physical machine to obtain a running result of the third task.
Specifically, the specific implementation method of the instruction by the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to the drawings, which is not described herein again.
Further, the integrated modules/units of the electronic device 1 may be stored in a storage medium if they are implemented in the form of software functional units and sold or used as separate products. The storage medium may be volatile or non-volatile. For example, the media may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM).
The present invention also provides a storage medium, which is readable and stores a computer program that, when executed by a processor of an electronic device, can implement:
acquiring a first task and a second task in a task queue, wherein the first task is a charging strategy distribution task, the second task is a charging strategy generation task, and the number of physical machines for operating the first task and the second task is respectively configured to obtain a first number and a second number;
monitoring the running states of the first task and the second task in real time to obtain a first running state and a second running state;
when the first running state is in an idle state and the second running state is in a non-idle state, calculating a first idle physical machine corresponding to the first task according to the first quantity, and distributing the first idle physical machine to the second task to execute the running of the second task to obtain a running result;
when the first running state is in a non-idle state and the second running state is in an idle state, calculating a second idle physical machine corresponding to the second task according to the second quantity, and distributing the second idle physical machine to the first task to execute the running of the first task to obtain a running result of the first task;
when the first running state is in an idle state and the second running state is in an idle state, determining the priority of a task to be executed in the task queue, acquiring a third task in the task queue according to the priority, respectively calculating a third idle physical machine corresponding to the first task and a fourth idle physical machine corresponding to the second task according to the first quantity and the second quantity, and executing the running of the third task based on the third idle physical machine and the fourth idle physical machine to obtain a running result of the third task.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (10)

1. A computational power scheduling method of a physical machine device, the method comprising:
acquiring a first task and a second task in a task queue, wherein the first task is a charging strategy distribution task, the second task is a charging strategy generation task, and the number of physical machines for operating the first task and the second task is respectively configured to obtain a first number and a second number;
monitoring the running states of the first task and the second task in real time to obtain a first running state and a second running state;
when the first running state is in an idle state and the second running state is in a non-idle state, calculating a first idle physical machine corresponding to the first task according to the first quantity, and distributing the first idle physical machine to the second task to execute the running of the second task to obtain a running result;
when the first running state is in a non-idle state and the second running state is in an idle state, calculating a second idle physical machine corresponding to the second task according to the second quantity, and distributing the second idle physical machine to the first task to execute the running of the first task to obtain a running result of the first task;
when the first running state is in an idle state and the second running state is in an idle state, determining the priority of a task to be executed in the task queue, acquiring a third task in the task queue according to the priority, respectively calculating a third idle physical machine corresponding to the first task and a fourth idle physical machine corresponding to the second task according to the first quantity and the second quantity, and executing the running of the third task based on the third idle physical machine and the fourth idle physical machine to obtain a running result of the third task.
2. The method for computationally scheduling physical machine devices of claim 1, wherein the configuring the number of physical machines running the first task and the second task, respectively, to obtain a first number and a second number, comprises:
running the first task and the second task respectively;
respectively recording the number of tasks operated by the first task and the second task to obtain a first task amount and a second task amount;
and respectively configuring the physical machine number of the first task and the physical machine number of the second task according to the first task amount and the second task amount to obtain a first number and a second number.
3. The computing power scheduling method of a physical machine device according to claim 1, wherein the real-time monitoring of the operating state during the operation of the first task and the second task to obtain a first operating state and a second operating state comprises:
historical operating data in the first task and the second task are obtained, and fault detection is carried out on the historical operating data;
if the fault data exist, repairing the task corresponding to the fault data to obtain a repair task;
performing task updating on the first task and the second task according to the repairing task to obtain a first updating task and a second updating task;
acquiring current running states of the first updating task and the second updating task to obtain a first running state and a second running state;
and if no fault data exist, directly acquiring the states of the first task and the second task to obtain a first running state and a second running state.
4. The computing power scheduling method of a physical machine device according to claim 1, wherein the computing a first idle physical machine corresponding to the first task according to the first number comprises:
acquiring the total number of tasks of the first task corresponding to the first running state;
obtaining the number of physical machines configured by the first task according to the total number of the tasks;
calculating a difference between the first number and the number of physical machines;
and obtaining a first idle physical machine corresponding to the first task according to the difference value.
5. The method for computationally scheduling of physical machine devices of claim 1, wherein said assigning the first idle physical machine to the second task comprises:
calculating the workload of each task in the second tasks;
acquiring load data of the first idle physical machine;
performing optimal simulation distribution on the workload and the load data to obtain an optimal distribution scheme;
and distributing the first idle physical machine to the second task according to the optimal distribution scheme.
6. The computational power scheduling method of a physical machine device according to claim 5, wherein the performing optimal simulated distribution on the workload and the load data to obtain an optimal distribution scheme comprises:
performing an optimal simulated distribution of the workload and the load data using the following formula:
Figure FDA0003846480350000021
wherein ,
Figure FDA0003846480350000022
represents an optimal distribution scheme, G represents the total amount of workload and application data, a represents the initial value of the initial workload and load data, Y () represents an analog distribution function, ρ represents a distribution coefficient, ω is j Representing an assigned set of workload and load data.
7. The computational power scheduling method of a physical machine device according to claim 1, wherein the determining the priority of the tasks to be executed in the task queue comprises:
acquiring a waiting period of the task to be executed in the task queue;
performing attribute analysis on the task to be executed to obtain task attributes;
calculating priority interpolation of the task to be executed by utilizing a preset priority algorithm according to the waiting time and the task attribute;
and determining the priority of the task to be executed according to the priority interpolation.
8. A computational power scheduling apparatus of a physical machine device, the apparatus comprising:
the system comprises a task acquisition module, a task management module and a task management module, wherein the task acquisition module is used for acquiring a first task and a second task in a task queue, the first task is a charging strategy distribution task, the second task is a charging strategy generation task, and the number of physical machines for operating the first task and the second task is respectively configured to obtain a first number and a second number;
the running state monitoring module is used for monitoring the running states of the first task and the second task in real time to obtain a first running state and a second running state;
a first allocation module, configured to calculate, according to the first number, a first idle physical machine corresponding to the first task when the first operating state is in an idle state and the second operating state is in a non-idle state, and allocate the first idle physical machine to the second task to execute the operation on the second task, so as to obtain an operation result;
a second allocating module, configured to calculate, according to the second quantity, a second idle physical machine corresponding to the second task when the first operating state is in a non-idle state and the second operating state is in an idle state, and allocate the second idle physical machine to the first task to execute the operation on the first task, so as to obtain an operation result of the first task;
and the third allocation module is used for determining the priority of the tasks to be executed in the task queue when the first running state is in an idle state and the second running state is in an idle state, acquiring the third tasks in the task queue according to the priority, respectively calculating a third idle physical machine corresponding to the first task and a fourth idle physical machine corresponding to the second task according to the first quantity and the second quantity, and executing the operation of the third task based on the third idle physical machine and the fourth idle physical machine to obtain the operation result of the third task.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the computational power scheduling method of a physical machine device according to any one of claims 1 to 7.
10. A storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the computational power scheduling method of a physical machine device according to any one of claims 1 to 7.
CN202211120450.5A 2022-09-15 2022-09-15 Calculation power scheduling method, device and equipment of physical machine equipment and storage medium Active CN115827179B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211120450.5A CN115827179B (en) 2022-09-15 2022-09-15 Calculation power scheduling method, device and equipment of physical machine equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211120450.5A CN115827179B (en) 2022-09-15 2022-09-15 Calculation power scheduling method, device and equipment of physical machine equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115827179A true CN115827179A (en) 2023-03-21
CN115827179B CN115827179B (en) 2023-08-18

Family

ID=85523606

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211120450.5A Active CN115827179B (en) 2022-09-15 2022-09-15 Calculation power scheduling method, device and equipment of physical machine equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115827179B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117891618A (en) * 2024-03-15 2024-04-16 杭州宇泛智能科技有限公司 Resource task processing method and device of artificial intelligent model training platform

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120204176A1 (en) * 2010-10-29 2012-08-09 Huawei Technologies Co., Ltd. Method and device for implementing load balance of data center resources
CN110825494A (en) * 2019-11-01 2020-02-21 北京京东尚科信息技术有限公司 Physical machine scheduling method and device and computer storage medium
CN113553190A (en) * 2021-09-17 2021-10-26 阿里云计算有限公司 Computing cluster system, scheduling method, device and storage medium
CN113687950A (en) * 2021-08-31 2021-11-23 平安医疗健康管理股份有限公司 Priority-based task allocation method, device, equipment and storage medium
CN114168313A (en) * 2021-09-02 2022-03-11 国网北京市电力公司 Computing power dispatching system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120204176A1 (en) * 2010-10-29 2012-08-09 Huawei Technologies Co., Ltd. Method and device for implementing load balance of data center resources
CN110825494A (en) * 2019-11-01 2020-02-21 北京京东尚科信息技术有限公司 Physical machine scheduling method and device and computer storage medium
CN113687950A (en) * 2021-08-31 2021-11-23 平安医疗健康管理股份有限公司 Priority-based task allocation method, device, equipment and storage medium
CN114168313A (en) * 2021-09-02 2022-03-11 国网北京市电力公司 Computing power dispatching system
CN113553190A (en) * 2021-09-17 2021-10-26 阿里云计算有限公司 Computing cluster system, scheduling method, device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117891618A (en) * 2024-03-15 2024-04-16 杭州宇泛智能科技有限公司 Resource task processing method and device of artificial intelligent model training platform
CN117891618B (en) * 2024-03-15 2024-05-24 杭州宇泛智能科技有限公司 Resource task processing method and device of artificial intelligent model training platform

Also Published As

Publication number Publication date
CN115827179B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
CN113157379A (en) Cluster node resource scheduling method and device
CN104486255A (en) Service resource dispatching method and device
CN108696571B (en) Cloud storage service system and method, cloud service intelligent equipment and electronic device
CN113282795A (en) Data structure chart generating and updating method and device, electronic equipment and storage medium
CN111694844A (en) Enterprise operation data analysis method and device based on configuration algorithm and electronic equipment
CN117193975A (en) Task scheduling method, device, equipment and storage medium
CN114881616A (en) Business process execution method and device, electronic equipment and storage medium
CN113515382A (en) Cloud resource allocation method and device, electronic equipment and program product
CN114240162A (en) Personnel scheduling method, device, equipment and storage medium
CN112445623A (en) Multi-cluster management method and device, electronic equipment and storage medium
CN115827179B (en) Calculation power scheduling method, device and equipment of physical machine equipment and storage medium
CN114844844A (en) Delay message processing method, device, equipment and storage medium
CN111339072A (en) User behavior based change value analysis method and device, electronic device and medium
CN115373826B (en) Task scheduling method and device based on cloud computing
CN115471215B (en) Business process processing method and device
CN113918296B (en) Model training task scheduling execution method and device, electronic equipment and storage medium
CN113407322B (en) Multi-terminal task allocation method and device, electronic equipment and readable storage medium
CN114817408B (en) Scheduling resource identification method and device, electronic equipment and storage medium
CN114896164A (en) Interface optimization method and device, electronic equipment and storage medium
CN114625512A (en) Task scheduling method and device, electronic equipment and storage medium
CN114385453A (en) Database cluster exception handling method, device, equipment and medium
CN114020414A (en) Symbiotic method and device of Android system and bottom layer Linux, electronic equipment and storage medium
CN113076069A (en) Double-cache method and device, electronic equipment and computer readable storage medium
CN112579046A (en) User story analysis method and device, electronic equipment and storage medium
CN113627144B (en) Graph generation method and device based on artificial intelligence, electronic equipment and 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
GR01 Patent grant
GR01 Patent grant