CN115827179B - Calculation power scheduling method, device and equipment of physical machine equipment and storage medium - Google Patents

Calculation power scheduling method, device and equipment of physical machine equipment and storage medium Download PDF

Info

Publication number
CN115827179B
CN115827179B CN202211120450.5A CN202211120450A CN115827179B CN 115827179 B CN115827179 B CN 115827179B CN 202211120450 A CN202211120450 A CN 202211120450A CN 115827179 B CN115827179 B CN 115827179B
Authority
CN
China
Prior art keywords
task
physical machine
running
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.)
Active
Application number
CN202211120450.5A
Other languages
Chinese (zh)
Other versions
CN115827179A (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

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

  • Debugging And Monitoring (AREA)
  • Power Sources (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 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 a task to be executed in a 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, and executing the third task to obtain the running result of the third task.

Description

Calculation power scheduling method, device and equipment of physical machine equipment and storage medium
Technical Field
The present invention relates to the field of cloud computing technologies, and in particular, to a computing power scheduling method, apparatus, device and storage medium for a physical machine device.
Background
The physical machine is a name of a physical computer relative to the virtual machine, the physical machine provides a hardware environment for the virtual machine, sometimes also called a host or a host, through the 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 can be realized among the operating systems, and the reasonable scheduling of algorithms used for different tasks can be realized just like a plurality of computers, so that the tasks can be efficiently completed.
However, the existing physical machine scheduling methods allocate physical machine equipment resources by adopting a manual mode through a calculation unit to finish different tasks, the real-time performance of the method is poor, the adjustment cannot be performed according to the actual operation of the tasks, the scheduling method is low in efficiency, and further the efficiency of finishing the tasks corresponding to the physical machines is reduced, so that a method capable of improving the scheduling rationality of the physical machine equipment is needed.
Disclosure of Invention
The invention provides a power calculation scheduling method, a power calculation scheduling device, power calculation scheduling equipment and a storage medium of physical machine equipment, and mainly aims to improve the scheduling rationality 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 distributes tasks for a charging strategy, the second task generates tasks for the charging strategy, and the number of physical machines for running 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 so as to execute running of the second task, so that a running result is obtained;
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;
And when the first running state is in an idle state and the second running state is in the idle state, determining the priority of the 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 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.
Optionally, the configuring the number of physical machines running the first task and the second task to obtain a first number and a second number includes:
respectively running the first task and the second task;
the task quantity of the first task and the task quantity of the second task are recorded respectively, and a first task quantity and a second task quantity are obtained;
and respectively configuring the physical machine quantity of the first task and the physical machine quantity of the second task according to the first task quantity and the second task quantity to obtain a first quantity and a second quantity.
Optionally, the monitoring, in real time, the operation states when the first task and the second task are operated, to obtain a first operation state and a second operation state, includes:
Acquiring historical operation data in the first task and the second task, and performing fault detection on the historical operation data;
if the fault data exist, repairing the task corresponding to the fault data to obtain a repairing 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;
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;
if no fault data exists, the states of the first task and the second task are directly obtained, and a first running state and a second running state are obtained.
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 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 task;
load data of the first idle physical machine are obtained;
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 simulation distribution on the workload and the load data to obtain an optimal distribution scheme includes:
and carrying out optimal simulation distribution on the workload and the load data by using the following formula:
wherein ,represents the optimal allocation scheme, G represents the total amount of workload and data applied, a represents the initial value of the initial workload and load data, Y () represents the simulated allocation function, ρ represents the allocation coefficient, ω j Representing an allocated 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 the priority interpolation of the task to be executed by using 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 of a physical machine device, the apparatus including:
the task acquisition module is used for acquiring a first task and a second task in a task queue, wherein the first task distributes tasks for a charging strategy, the second task generates tasks for the charging strategy, and the number of physical machines for running 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;
the first allocation module is used for calculating a first idle physical machine corresponding to the first task according to the first quantity when the first running state is in an idle state and the second running state is in a non-idle state, and allocating the first idle physical machine to the second task so as to execute running of the second task and obtain a running result;
The second allocation module is used for calculating a second idle physical machine corresponding to the second task according to the second quantity when the first running state is in a non-idle state and the second running state is in an idle state, and allocating the second idle physical machine to the first task so as to execute the running of the first task and obtain a running result of the first task;
the third allocation module is used for determining the priority of the task to be executed in the task queue when the first running state is in the idle state and the second running state is in the idle state, 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 order to solve the above-mentioned problems, the present invention also provides an electronic apparatus including:
at least one processor; the method comprises the steps of,
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 power scheduling method of the physical machine device described above.
In order to solve the above-mentioned problems, the present invention also provides a storage medium having stored therein at least one computer program that is executed by a processor in an electronic device to implement the power scheduling method of a physical machine device described above.
The invention provides preconditions for configuring the number of physical machines for the first task and the second task by acquiring the first task and the second task in the task queue, wherein the first task distributes the task for the charging strategy, the second task generates the task for the charging strategy, the specific content of the first task and the second task can be known, the preconditions are provided for the subsequent configuration of the number of the physical machines for the first task and the second task, the first running state and the second running state are obtained by monitoring the running states of the first task and the second task in real time, the running states of the first task and the second task can be known according to the first running state and the second running state, whether faults exist or not is known, and the like; in addition, when the first running state is in a non-idle state and the second running state is in an idle state, according to the second quantity, calculating a second idle physical machine corresponding to the second task, when the first running state is in a non-idle state and the second running state is in an idle state, the first task is processed, the second task is completed, and further, the idle physical machine of the second task can be configured to the first task so as to improve the completion efficiency of the first task. Therefore, the method, the device, the equipment and the storage medium for power calculation scheduling of the physical machine equipment can improve the scheduling rationality of the physical machine equipment.
Drawings
Fig. 1 is a flow chart of a computing power scheduling method of a physical machine device according to an embodiment of the present application;
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 application;
fig. 3 is a schematic structural diagram of an electronic device for implementing the power calculation scheduling method of the physical machine device according to an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
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.
The embodiment of the application provides a calculation power scheduling method of physical machine equipment. In the embodiment of the present application, the execution body of the computing power scheduling method of the physical machine device includes, but is not limited to, at least one of a server, a terminal, and the like, which can be configured to execute the electronic device of the method provided in the embodiment of the present application. In other words, the computational power scheduling method of the physical machine device may be performed by software or hardware installed in a terminal device or a server device, and the software may be a blockchain platform. The service end 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 cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Referring to fig. 1, a flow chart of a power scheduling method of a physical machine device according to an embodiment of the present invention is shown. In this embodiment, the computing power scheduling method of the physical machine device includes steps S1 to S5:
s1, acquiring a first task and a second task in a task queue, wherein the first task is a task allocated to a charging strategy, the second task is a task generated by the charging strategy, and the number of physical machines running 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 for allocating the physical machine quantity to the first task and the second task, the first task and the second task in the task queue are obtained, wherein the first task is a task allocated for a charging strategy, the second task is a task generated by the charging strategy, the specific contents of the first task and the second task can be known, and preconditions are provided for the subsequent allocation of the physical machine quantity to the first task and the second task.
The task queue is a queue formed by sequencing tasks according to a corresponding sequence, the charging strategy distribution task is a task for distributing charging according to a strategy, the charging strategy generation task is a corresponding task generated 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 number and the second number are obtained by respectively configuring the number of physical machines for running the first task and the second task, and the corresponding number of physical machines is obtained by running the first task and the second task, so that the task allocation of the physical machines is facilitated.
The physical machines are references to physical computers relative to virtual machines, the physical machines are provided for corresponding hardware environments of the virtual machines, sometimes referred to as "hosts" or "hosts", the first number is a corresponding number of physical machines configured according to requirements when the first task is executed, and the second number is a corresponding number of physical machines configured 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 to obtain the first number and the second number includes: and respectively running the first task and the second task, respectively recording the number of the tasks running by the first task and the second task to obtain a first task amount and a second task amount, 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.
The first task amount is the number of tasks in the first task operation, and the second task amount is the number of tasks in the second task operation.
Further, the first task and the second task can be executed by a task executor, the task numbers of the first task and the second task can be obtained by a task counter, the task counter is compiled by a script language, and the physical machine numbers of the first task and the second task can 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.
The invention obtains the first running state and the second running state by monitoring the running states of the first task and the second task in real time, and can know whether the running conditions of the first task and the second task exist or not 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, in real time, the operation states when the first task and the second task are executed, to obtain a first operation state and a second operation state, includes: acquiring historical operation data in the first task and the second task, performing fault detection on the historical operation data, repairing the task corresponding to the fault data if the fault data exists, obtaining a repairing task, performing task updating on the first task and the second task according to the repairing task, obtaining a first updating task and a second updating task, obtaining the current operation states of the first updating task and the second updating task, obtaining a first operation state and a second operation state, and directly obtaining the states of the first task and the second task if the fault data does not exist, and obtaining the first operation state and the second operation state.
The historical operation data are data records operated before the first task and the second task, the fault data are data corresponding to tasks with faults in the first task and the second task, the repairing task is a task obtained after repairing the tasks corresponding to the fault data, the first updating task and the second updating task are tasks obtained after repairing the fault tasks in the first task and the second task, further, the historical operation data in the first task and the second task can be obtained through task managers in the first task and the second task, fault detection can be carried out on the historical operation data through a fault detector, a task repairing tool can be utilized for repairing the tasks corresponding to the fault data, the task repairing tool is compiled by Java language, and the current operation states of the first updating task and the second updating task can be obtained through a WGCLUOD tool.
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 so as to execute running of the second task, so that a running result is obtained.
According to the invention, when the first running state is in the idle state and the second running state is in the unoccupied state, the first idle physical machine corresponding to the first task is calculated according to the first quantity, and when the first running state is in the idle state and the second running state is in the unoccupied state, the first task is finished, the second task is being processed, and further, the guarantee is provided for the subsequent physical machine configuration of the second task, wherein the first idle physical machine is the quantity of the physical machines corresponding to the first task in the idle state.
As one embodiment of the present invention, the calculating, according to the first number, a first idle physical machine corresponding to the first task includes: and 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 tasks, calculating the difference value 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.
The total number of tasks is the total number of tasks in the first task in the first running state, the number of physical machines is the total number of physical machines to be configured for the first task, the total number corresponds to the total number of tasks, the first idle physical machine is the physical machine in the first task in an idle state, and further, the total number of tasks of the first task corresponding to the first running state can be obtained through the task counter.
According to the invention, the first idle physical machine is distributed to the second task to execute the operation of the second task to obtain the operation result, and the first idle physical machine is distributed to the second task to shorten the completion time of the second task so as to improve the completion efficiency of the second task, wherein the operation result is the data obtained after the second task is operated.
As one embodiment of the present invention, the assigning the first idle physical machine to the second task includes: and calculating the workload of each task in the second task, acquiring the 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.
The work load is the operation energy required by each task in the second task, the load data is the energy generated when the first idle physical machine operates normally, the optimal allocation scheme is that the work load and the load data are combined together to obtain a best allocation result, further, the work load of each task in the second task can be calculated through a work load method, and the load data can be obtained through inquiring parameters of the first idle physical machine.
As an optional embodiment of the present invention, the performing optimal simulation distribution on the workload and the load data to obtain an optimal distribution scheme may be implemented by the following formula:
wherein ,represents the optimal allocation scheme, G represents the total amount of workload and data applied, a represents the initial value of the initial workload and load data, Y () represents the simulated allocation function, ρ represents the allocation coefficient, ω j Representing an allocated set of workload and load data.
S4, calculating a second idle physical machine corresponding to the second task according to the second quantity when the first running state is in a non-idle state and the second running state is in an idle state, and distributing the second idle physical machine to the first task to execute running of the first task so as to obtain a running result of the first task.
According to the invention, when the first running state is in the unoccupied state and the second running state is in the unoccupied state, the second idle physical machine corresponding to the second task is calculated according to the second quantity, and when the first running state is in the unoccupied state and the second running state is in the unoccupied state, the first task is processed, the second task is completed, and then the idle physical machine of the second task can be configured to the first task, so that the completion efficiency of the first task is improved, wherein the second idle physical machine is the quantity of physical machines corresponding to the second task in the unoccupied state.
Further, the method for calculating the number of the second idle physical machines corresponding to the second task is the same as the principle of calculating the first idle physical machine, and the method for distributing the second idle physical machine to the first task is the same as the principle of the first idle physical machine distribution method, and is not repeated herein.
S5, when the first running state is in an idle state and the second running state is in the 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.
The method comprises the steps of determining the priority of a task to be executed in a task queue when the first running state is in an idle state and the second running state is in the idle state, acquiring a third task in the task queue according to the priority, and acquiring the third task from the queue according to the priority when the first running state and the second running state are in the idle state, wherein the priority is the importance of the task to be executed in the task queue.
As one embodiment of the present invention, the determining the priority of the task to be executed in the task queue includes: obtaining a waiting period of the task to be executed in the task queue, carrying out attribute analysis on the task to be executed to obtain a task attribute, calculating priority interpolation of the task to be executed by using 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.
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:
wherein P (u) represents priority interpolation, a represents a start value of task attribute and waiting time, x represents a stop value of task attribute and waiting time, t i Representing the linear value, s, corresponding to the ith latency i Representing the linear value corresponding to the ith task attribute, Z (t i s i ) A linear function representing task attributes and latency.
According to the method, the third idle physical machine corresponding to the first task and the fourth idle physical machine corresponding to the second task are calculated according to the first number and the second number, 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 facilitate subsequent execution of the third task, wherein when the third idle physical machine and the fourth idle physical machine are in an idle state in the first running state and in an idle state in the second running state, the physical machines corresponding to the first task and the second task respectively, 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 redundant description is omitted.
According to the invention, the third task is executed based on the third idle physical machine and the fourth idle physical machine to obtain the operation result of the third task, 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 invention provides preconditions for configuring the number of physical machines for the first task and the second task by acquiring the first task and the second task in the task queue, wherein the first task distributes the task for the charging strategy, the second task generates the task for the charging strategy, the specific content of the first task and the second task can be known, the preconditions are provided for the subsequent configuration of the number of the physical machines for the first task and the second task, the first running state and the second running state are obtained by monitoring the running states of the first task and the second task in real time, the running states of the first task and the second task can be known according to the first running state and the second running state, whether faults exist or not is known, and the like; in addition, when the first running state is in a non-idle state and the second running state is in an idle state, according to the second quantity, calculating a second idle physical machine corresponding to the second task, when the first running state is in a non-idle state and the second running state is in an idle state, the first task is processed, the second task is completed, and further, the idle physical machine of the second task can be configured to the first task so as to improve the completion efficiency of the first task. Therefore, the power-saving scheduling method for the physical machine equipment provided by the embodiment of the invention can be used for improving the scheduling rationality of the physical machine equipment.
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.
The computing power dispatching device 100 of the physical machine equipment can be installed in electronic equipment. Depending on the implemented functions, the computing power scheduling apparatus 100 of the physical machine device may include a task acquisition module 101, an operation state monitoring module 102, a first allocation module 103, a second allocation module 104, and a third allocation module 105. The module of the invention, which may also be referred to as a unit, refers to a series of computer program segments, which are stored in the memory of the electronic device, capable of being executed by the processor of the electronic device and of performing a fixed function.
In the present embodiment, the functions concerning 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 task allocated to a charging policy, and the second task is a task generated by the charging policy, and configure the number of physical machines running the first task and the second task respectively, so as to obtain a first number and a second number;
the running state monitoring module 102 is configured to monitor, in real time, running states when the first task and the second task are running, and obtain a first running state and a second running state;
The first allocation module 103 is configured to calculate, according to the first number, a first idle physical machine corresponding to the first task when the first running state is in an idle state and the second running state is in a non-idle state, and allocate the first idle physical machine to the second task, so as to execute running of the second task, and obtain a running result;
the second allocation module 104 is configured to calculate, according to the second number, a second idle physical machine corresponding to the second task when the first running state is in a non-idle state and the second running state is in an idle state, and allocate the second idle physical machine to the first task to execute running of the first task, so as to obtain a running result of the first task;
the third allocation module 105 is configured to determine a priority of a task 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, obtain a third task in the task queue according to the priority, respectively 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 number and the second number, and execute 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 detail, each module in the power computing scheduling apparatus 100 of the physical machine device in the embodiment of the present application adopts the same technical means as the power computing scheduling method of the physical machine device described in fig. 1, and can produce the same technical effects, which are not described herein.
Fig. 3 is a schematic structural diagram of an electronic device 1 for implementing a computing power scheduling method of a physical machine device according to an embodiment of the present application.
The electronic device 1 may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program stored in the memory 11 and executable on the processor 10, such as a computer program of a physical machine device.
The processor 10 may be formed by an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be formed by a plurality of integrated circuits packaged with the same function or different functions, including one or more central processing units (Central Processing Unit, CPU), a microprocessor, a digital processing chip, a graphics processor, a combination of various control chips, and so on. The processor 10 is a Control Unit (Control Unit) of the electronic device 1, connects respective parts of the entire electronic device using various interfaces and lines, executes programs or modules stored in the memory 11 (for example, executes a power scheduling method program of a physical machine device, etc.), and invokes data stored in the memory 11 to perform various functions of the electronic device and process data.
The memory 11 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, such as a mobile hard disk of the electronic device. The memory 11 may in other embodiments also be an external storage device of the electronic device, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or 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 for storing application software installed in an electronic device and various types of data, such as codes of a computing power scheduling method program of a physical machine device, but also for temporarily storing data that has been output or is to be output.
The communication bus 12 may be a peripheral component interconnect standard (Peripheral ComponentInterconnect, PCI) bus, or an extended industry standard architecture (Extended Industry StandardArchitecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
The communication interface 13 is used for communication between the electronic device 1 and other devices, including 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.), 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), or alternatively 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, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the electronic device and for displaying a visual user interface.
Fig. 3 shows only an electronic device with components, it being understood by a person 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 shown, or may combine certain components, or may be arranged in different components.
For example, although not shown, the electronic device 1 may further include a power source (such as a battery) for supplying power to each component, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, and the like are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The electronic device 1 may further include various sensors, bluetooth modules, wi-Fi modules, etc., which will not be described herein.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The power scheduling method program of the physical machine device stored in the memory 11 in the electronic device 1 is a combination of a plurality of instructions, and when running in the processor 10, it can be implemented:
acquiring a first task and a second task in a task queue, wherein the first task distributes tasks for a charging strategy, the second task generates tasks for the charging strategy, and the number of physical machines for running 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 so as to execute running of the second task, so that a running result is obtained;
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;
and when the first running state is in an idle state and the second running state is in the idle state, determining the priority of the 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 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.
In particular, the specific implementation method of the above instructions by the processor 10 may refer to the description of the relevant steps in the corresponding embodiment of the drawings, which is not repeated herein.
Further, the modules/units integrated in the electronic device 1 may be stored in a storage medium if implemented in the form of software functional units and sold or used as separate products. The storage medium may be volatile or nonvolatile. For example, the medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
The present invention also provides a storage medium storing a computer program which, 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 distributes tasks for a charging strategy, the second task generates tasks for the charging strategy, and the number of physical machines for running 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 so as to execute running of the second task, so that a running result is obtained;
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;
and when the first running state is in an idle state and the second running state is in the idle state, determining the priority of the 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 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.
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 merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
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 characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the application 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 the related data based on the artificial intelligence technology. Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present application and not for limiting the same, and although the present application has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present application without departing from the spirit and scope of the technical solution of the present application.

Claims (6)

1. A method for power-calculation scheduling of physical machine equipment, the method comprising:
acquiring a first task and a second task in a task queue, wherein the first task distributes tasks for a charging strategy, the second task generates tasks for the charging strategy, and the number of physical machines for running 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; comprising the following steps: acquiring historical operation data in the first task and the second task, and performing fault detection on the historical operation data; if the fault data exist, repairing the task corresponding to the fault data to obtain a repairing 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; 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; if no fault data exists, directly acquiring states of the first task and the second task 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 so as to execute running of the second task, so that a running result is obtained; the assigning the first idle physical machine to the second task includes: calculating the workload of each task in the second task; load data of the first idle physical machine are obtained; performing optimal simulation distribution on the workload and the load data to obtain an optimal distribution scheme; according to the optimal allocation scheme, the first idle physical machine is allocated to the second task; the optimal simulation distribution is carried out on the workload and the load data to obtain an optimal distribution scheme, which comprises the following steps: and carrying out optimal simulation distribution on the workload and the load data by using the following formula:
wherein ,represents an optimal allocation scheme, G represents the total amount of workload and load data, a represents the initial values of the initial workload and load data, Y () represents a simulated allocation function, ρ represents an allocation coefficient, ω a Representing an allocation set of workload and load data;
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 the 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 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; the determining the priority of the task to be executed in the task queue comprises the following steps: acquiring a waiting period of the task to be executed in the task queue, wherein the waiting period is waiting time of the task to be executed in the task queue; performing attribute analysis on the task to be executed to obtain task attributes; calculating the priority interpolation of the task to be executed by using a preset priority algorithm according to the waiting time and the task attribute; determining the priority of the task to be executed according to the priority interpolation; the preset priority algorithm comprises the following steps:
Wherein P (u) represents priority interpolation, a represents a start value of task attribute and waiting time, x represents a stop value of task attribute and waiting time, t i Representing the linear value, s, corresponding to the ith latency i Representing the linear value corresponding to the ith task attribute, Z (t i s i ) A linear function representing task attributes and latency.
2. The computing power scheduling method of the physical machine device according to claim 1, wherein the configuring the number of physical machines running the first task and the second task to obtain the first number and the second number includes:
respectively running the first task and the second task;
the task quantity of the first task and the task quantity of the second task are recorded respectively, and a first task quantity and a second task quantity are obtained;
and respectively configuring the physical machine quantity of the first task and the physical machine quantity of the second task according to the first task quantity and the second task quantity to obtain a first quantity and a second quantity.
3. The computing power scheduling method of the 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 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 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.
4. A computing power scheduling apparatus for a physical machine device, the apparatus comprising:
the task acquisition module is used for acquiring a first task and a second task in a task queue, wherein the first task distributes tasks for a charging strategy, the second task generates tasks for the charging strategy, and the number of physical machines for running 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; comprising the following steps: acquiring historical operation data in the first task and the second task, and performing fault detection on the historical operation data; if the fault data exist, repairing the task corresponding to the fault data to obtain a repairing 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; 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; if no fault data exists, directly acquiring states of the first task and the second task to obtain a first running state and a second running state;
The first allocation module is used for calculating a first idle physical machine corresponding to the first task according to the first quantity when the first running state is in an idle state and the second running state is in a non-idle state, and allocating the first idle physical machine to the second task so as to execute running of the second task and obtain a running result; the assigning the first idle physical machine to the second task includes: calculating the workload of each task in the second task; load data of the first idle physical machine are obtained; performing optimal simulation distribution on the workload and the load data to obtain an optimal distribution scheme; according to the optimal allocation scheme, the first idle physical machine is allocated to the second task; the optimal simulation distribution is carried out on the workload and the load data to obtain an optimal distribution scheme, which comprises the following steps: and carrying out optimal simulation distribution on the workload and the load data by using the following formula:
wherein ,represents an optimal allocation scheme, G represents the total amount of workload and load data, a represents the initial values of the initial workload and load data, Y () represents a simulated allocation function, ρ represents an allocation coefficient, ω a Representing an allocation set of workload and load data;
the second allocation module is used for calculating a second idle physical machine corresponding to the second task according to the second quantity when the first running state is in a non-idle state and the second running state is in an idle state, and allocating the second idle physical machine to the first task so as to execute the running of the first task and obtain a running result of the first task;
the third allocation module is used for determining the priority of the task to be executed in the task queue when the first running state is in the idle state and the second running state is in the idle state, 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; the determining the priority of the task to be executed in the task queue comprises the following steps: acquiring a waiting period of the task to be executed in the task queue, wherein the waiting period is waiting time of the task to be executed in the task queue; performing attribute analysis on the task to be executed to obtain task attributes; calculating the priority interpolation of the task to be executed by using a preset priority algorithm according to the waiting time and the task attribute; determining the priority of the task to be executed according to the priority interpolation; the preset priority algorithm comprises the following steps:
Wherein P (u) represents priority interpolation, a represents a start value of task attribute and waiting time, x represents a stop value of task attribute and waiting time, t i Representing the linear value, s, corresponding to the ith latency i Representing the linear value corresponding to the ith task attribute, Z (t i s i ) A linear function representing task attributes and latency.
5. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
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 power scheduling method of the physical machine device of any one of claims 1 to 3.
6. A storage medium storing a computer program which, when executed by a processor, implements a method of computational power scheduling of a physical machine device as claimed in any one of claims 1 to 3.
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 CN115827179A (en) 2023-03-21
CN115827179B true 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)

Families Citing this family (1)

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

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011110026A1 (en) * 2010-10-29 2011-09-15 华为技术有限公司 Method and apparatus for realizing load balance of resources in data center

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Also Published As

Publication number Publication date
CN115827179A (en) 2023-03-21

Similar Documents

Publication Publication Date Title
US10101798B2 (en) Reducing power consumption in a server cluster
CN103473115B (en) virtual machine placement method and device
CN103942034A (en) Task scheduling method and electronic device implementing method
CN113157379A (en) Cluster node resource scheduling method and device
CN113515382B (en) Cloud resource allocation method and device, electronic equipment and storage medium
CN116541134B (en) Method and device for deploying containers in multi-architecture cluster
CN115827179B (en) Calculation power scheduling method, device and equipment of physical machine equipment and storage medium
CN111694844A (en) Enterprise operation data analysis method and device based on configuration algorithm and electronic equipment
CN106293947B (en) GPU-CPU (graphics processing Unit-Central processing Unit) mixed resource allocation system and method in virtualized cloud environment
CN107463357A (en) Task scheduling system, dispatching method, Simulation of Brake system and emulation mode
CN113282795A (en) Data structure chart generating and updating method and device, electronic equipment and storage medium
CN109144846B (en) Test method and device for testing server
CN109840141A (en) Thread control method, device, electronic equipment and storage medium based on cloud monitoring
CN114844844A (en) Delay message processing method, device, equipment and storage medium
CN111415062A (en) Crowdsourcing task allocation method and device, electronic equipment and storage medium
CN115373826B (en) Task scheduling method and device based on cloud computing
CN117331668A (en) Job scheduling method, device, equipment and storage medium
CN103777976B (en) Microcontroller and its online upgrading method and online upgrading device
CN112598135A (en) Model training processing method and device, computer equipment and medium
CN116962532A (en) Cluster task scheduling method and device, computer equipment and storage medium
CN113407322B (en) Multi-terminal task allocation method and device, electronic equipment and readable storage medium
CN113918296A (en) Model training task scheduling execution method and device, electronic equipment and storage medium
CN115952054A (en) Simulation task resource management method, device, equipment and medium
CN114675976A (en) GPU sharing method, device, equipment and medium based on kubernets
CN114625512A (en) Task scheduling method and device, electronic 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
GR01 Patent grant
GR01 Patent grant