CN116010091A - Traffic scheduling method, system, device, electronic equipment and storage medium - Google Patents
Traffic scheduling method, system, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116010091A CN116010091A CN202211695802.XA CN202211695802A CN116010091A CN 116010091 A CN116010091 A CN 116010091A CN 202211695802 A CN202211695802 A CN 202211695802A CN 116010091 A CN116010091 A CN 116010091A
- Authority
- CN
- China
- Prior art keywords
- machine room
- machine
- target
- machines
- target machines
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The embodiment of the invention provides a flow scheduling method, a system, a device, electronic equipment and a storage medium, relates to the technical field of computers, and automatically performs internal flow scheduling on a plurality of machine rooms according to different redundancy coefficients when the machine rooms need to perform flow scheduling, so that manual processing is changed into automatic processing, and the defects of labor cost investment and dependence on experience regulation are overcome. And under the condition that the flow scheduling instruction corresponding to the machine room is acquired, scheduling is carried out for a plurality of times according to different redundancy coefficients, and each scheduling uses different calculation modes to determine the number of machines to be reserved in the second machine room, so that more reasonable machine allocation is carried out.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, a system, an apparatus, an electronic device, and a storage medium for traffic scheduling.
Background
When the production environment faces the sudden increase of the flow, service unavailability caused by the sudden increase of the flow exists, and under the condition of multiple machine rooms, the emergency solution adopted when the production environment faces the sudden increase of the flow at present is as follows: manual capacity expansion cannot be performed automatically to schedule internal flow of a plurality of machine rooms at present.
Disclosure of Invention
The embodiment of the invention aims to provide a flow scheduling method, a system, a device, electronic equipment and a storage medium, so as to realize automatic internal flow scheduling of a plurality of machine rooms. The specific technical scheme is as follows:
in a first aspect of the present invention, there is provided a traffic scheduling method, including:
under the condition that a flow scheduling instruction aiming at a first machine room is acquired, calculating the number of machines needing borrowing of the first machine room based on network state parameters of the first machine room to obtain a first number;
calculating the number of first target machines which can be borrowed by each second machine room based on the first redundancy coefficient; wherein the second machine room is other machine rooms except the first machine room; the redundancy coefficient is used for determining the number of machines to be reserved in the second machine room, and comprises the first redundancy coefficient and a second redundancy coefficient which is smaller than the first redundancy coefficient;
determining a machine scheduled to the machine room from the first target machines if the sum of the numbers of the first target machines is not less than the first number;
calculating the number of second target machines which can be borrowed by each second machine room based on the second redundancy coefficient under the condition that the sum of the number of the first target machines is smaller than the first number;
And determining the machine scheduled to the machine room from the second target machines in the condition that the sum of the numbers of the second target machines is not smaller than the first number.
In a possible embodiment, before determining a machine to dispatch to the machine room from the first target machine, the method includes:
determining the priority of a first target machine which can be borrowed by the second machine room based on the region to which the first machine room belongs and the region to which the second machine room belongs, wherein the priority of the first target machine in the machine room which is in the same region as the first machine room is higher than the priority of the first target machine in the machine room which is in a different region from the first machine room;
the determining a machine scheduled to the machine room from the first target machine includes:
and determining the machine scheduled to the machine room from the first target machine according to the order of the priorities from high to low.
In a possible embodiment, the method further comprises:
and generating a reminding message under the condition that the sum of the numbers of the second target machines is not smaller than the first number, so that a user supplements the machines according to the reminding message.
In a possible embodiment, the method further comprises:
Acquiring network state parameters of each machine room aiming at the machine room;
calculating the current state index of the machine room according to the network state parameters of the machine room;
and triggering a flow scheduling instruction under the condition that the current state index is larger than a preset index threshold value.
In a possible embodiment, the calculating based on the first redundancy factor calculates the number of first target machines that can be borrowed by each second machine room based on the first redundancy factor, including:
for each second machine room, acquiring the machine quantity x, the real-time machine peak value y and the historical machine peak value z of the machine room; calculating the number of the first target machines which can be borrowed from the machine room according to the following formula;
N=x-(a×y+b×z)×(1+λ 1 )
wherein a and b are preset weight values, and a+b=1; lambda (lambda) 1 Is a first redundancy coefficient; n is the first target machine with the machine room being adjustableNumber of pieces;
the calculating the number of second target machines that each second machine room can borrow based on the second redundancy coefficient includes:
for each second machine room, acquiring the number x of machines in the machine room and the real-time machine peak value y;
calculating the number of the second target machines which can be borrowed from the machine room according to the following formula;
M=x-y×(1+λ 2 )
wherein lambda is 2 Is a second redundancy factor; m is the number of second target machines that the machine room can borrow.
In a possible embodiment, determining a machine to dispatch to the machine room in the second target machine includes:
obtaining the difference value between the sum of the numbers of the first target machines and the first number to obtain a second number;
determining a second number of third target machines from the second target machines, the third target machines being machines of the second target machines other than the first target machine;
and dispatching the first target machine and the third target machine to the machine room.
In a second aspect of the present invention, there is also provided a traffic scheduling system, the system comprising:
a plurality of machine rooms, a dispatch server;
the scheduling server is used for:
under the condition that a flow scheduling instruction aiming at a first machine room is acquired, calculating the number of machines needing borrowing of the first machine room based on network state parameters of the first machine room to obtain a first number; the first machine room is one of the plurality of machine rooms;
calculating the number of first target machines which can be borrowed by each second machine room based on the first redundancy coefficient; wherein the second machine room is other machine rooms except the first machine room; the redundancy coefficient is used for determining the number of machines to be reserved in the second machine room, and comprises the first redundancy coefficient and a second redundancy coefficient which is smaller than the first redundancy coefficient;
Determining a machine scheduled to the machine room from the first target machines if the sum of the numbers of the first target machines is not less than the first number;
calculating the number of second target machines which can be borrowed by each second machine room based on the second redundancy coefficient under the condition that the sum of the number of the first target machines is smaller than the first number;
and determining the machine scheduled to the machine room from the second target machines in the condition that the sum of the numbers of the second target machines is not smaller than the first number.
In a possible embodiment, the scheduling server is specifically configured to:
before the machine scheduled to the machine room is determined from the first target machines, determining the priority of the first target machines which can be borrowed by the second machine room based on the region to which the first machine room belongs and the region to which the second machine room belongs, wherein the priority of the first target machines in the machine room which is in the same region as the first machine room is higher than the priority of the first target machines in the machine room which is in a different region from the first machine room;
and determining the machine scheduled to the machine room from the first target machine according to the order of the priorities from high to low.
In a possible embodiment, the scheduling server further comprises:
and the auxiliary module is used for generating a reminding message under the condition that the sum of the numbers of the second target machines is not smaller than the first number, so that a user supplements the machines according to the reminding message.
In a possible embodiment, the scheduling server includes:
an index calculation service module;
the machine room is used for sending the network state parameters of the machine room to the index calculation service module;
the index calculation service module is used for acquiring network state parameters of each machine room aiming at the machine room; calculating the current state index of the machine room according to the network state parameters of the machine room; and triggering a flow scheduling instruction under the condition that the current state index is larger than a preset index threshold value.
In a possible embodiment, the scheduling server is specifically configured to:
for each second machine room, acquiring the machine quantity x, the real-time machine peak value y and the historical machine peak value z of the machine room; calculating the number of the first target machines which can be borrowed from the machine room according to the following formula;
N=x-(a×y+b×z)×(1+λ 1 )
wherein a and b are preset weight values, and a+b=1; lambda (lambda) 1 Is a first redundancy coefficient; n is the number of first target machines which can be borrowed by the machine room;
The scheduling server is also specifically configured to:
for each second machine room, acquiring the number x of machines in the machine room and the real-time machine peak value y;
calculating the number of the second target machines which can be borrowed from the machine room according to the following formula;
M=x-y×(1+λ 2 )
wherein lambda is 2 Is a second redundancy factor; m is the number of second target machines that the machine room can borrow.
In a possible embodiment, the scheduling server is specifically configured to:
obtaining the difference value between the sum of the numbers of the first target machines and the first number to obtain a second number;
determining a second number of third target machines from the second target machines, the third target machines being machines of the second target machines other than the first target machine;
and dispatching the first target machine and the third target machine to the machine room.
In still another aspect of the present invention, there is also provided a traffic scheduling apparatus, including:
the first calculation module is used for calculating the number of machines required to be borrowed by the first machine room based on the network state parameters of the first machine room under the condition that the flow scheduling instruction aiming at the first machine room is acquired, so as to obtain a first number;
The second calculation module is used for calculating the number of first target machines which can be borrowed by each second machine room based on the first redundancy coefficient; wherein the second machine room is other machine rooms except the first machine room; the redundancy coefficient is used for determining the number of machines to be reserved in the second machine room, and comprises the first redundancy coefficient and a second redundancy coefficient which is smaller than the first redundancy coefficient;
the first scheduling module is used for determining a machine scheduled to the machine room from the first target machines when the sum of the numbers of the first target machines is not smaller than the first number;
a third calculating module, configured to calculate, based on the second redundancy coefficients, the number of second target machines that are each adjustable in the second machine room, when the sum of the number of first target machines is smaller than the first number;
and the second scheduling module is used for determining the machine scheduled to the machine room from the second target machines under the condition that the sum of the numbers of the second target machines is not smaller than the first number.
In a possible embodiment, the apparatus further comprises:
a priority determining module, configured to determine, before determining, from the first target machines, a priority of a first target machine that is borrowable by the second machine room based on a region to which the first machine room belongs and a region to which the second machine room belongs, where the priority of a first target machine in a machine room that is in a same region as the first machine room is higher than the priority of a first target machine in a machine room that is in a different region from the first machine room;
The first scheduling module is specifically configured to:
and determining the machine scheduled to the machine room from the first target machine according to the order of the priorities from high to low.
In a possible embodiment, the apparatus further comprises:
and the generation module is used for generating a reminding message under the condition that the sum of the numbers of the second target machines is not smaller than the first number, so that a user supplements the machines according to the reminding message.
In a possible embodiment, the apparatus further comprises:
the acquisition module is used for acquiring network state parameters of each machine room aiming at the machine room;
the fourth calculation module is used for calculating the current state index of the machine room according to the network state parameters of the machine room;
and the triggering module is used for triggering the flow scheduling instruction under the condition that the current state index is larger than a preset index threshold value.
In a possible embodiment, the second computing module is specifically configured to:
for each second machine room, acquiring the machine quantity x, the real-time machine peak value y and the historical machine peak value z of the machine room; calculating the number of the first target machines which can be borrowed from the machine room according to the following formula;
N=x-(a×y+b×z)×(1+λ 1 )
wherein a and b are preset weight values, and a+b=1; lambda (lambda) 1 Is a first redundancy coefficient; n is the number of first target machines which can be borrowed by the machine room;
the third computing module is specifically configured to:
for each second machine room, acquiring the number x of machines in the machine room and the real-time machine peak value y;
calculating the number of the second target machines which can be borrowed from the machine room according to the following formula;
M=x-y×(1+λ 2 )
wherein lambda is 2 Is a second redundancy factor; m is the number of second target machines that the machine room can borrow.
In a possible embodiment, the second scheduling module is specifically configured to:
obtaining the difference value between the sum of the numbers of the first target machines and the first number to obtain a second number;
determining a second number of third target machines from the second target machines, the third target machines being machines of the second target machines other than the first target machine;
and dispatching the first target machine and the third target machine to the machine room.
In yet another aspect of the embodiment of the present invention, the embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
The memory is used for storing a computer program;
the processor is configured to implement any one of the traffic scheduling methods described in the first aspect when executing the computer program stored in the memory.
In yet another aspect of the present invention, there is also provided a computer readable storage medium having a computer program stored therein, which when executed by a processor, implements any of the above-described traffic scheduling methods.
In yet another aspect of the present invention, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform any of the above-described traffic scheduling methods.
According to the flow scheduling method, the system, the device, the electronic equipment and the computer storage medium, under the condition that the flow scheduling instruction for the first machine room is acquired, the number of machines needing to be borrowed by the first machine room is calculated based on the network state parameter of the first machine room, the first number is obtained, and the number of first target machines which can be borrowed by other machine rooms except the first machine room is calculated based on the first redundancy coefficient; the redundancy coefficient is used for determining the number of machines to be reserved in each second machine room; the redundancy coefficients comprise a first redundancy coefficient and a second redundancy coefficient, the second redundancy coefficient is smaller than the first redundancy coefficient, the machine scheduled to the machine room is determined from the first target machines under the condition that the sum of the number of the first target machines is not smaller than the first number, and the number of second target machines which can be borrowed by the second machine room is calculated based on the second redundancy coefficient under the condition that the sum of the number of the first target machines is smaller than the first number; in the case that the sum of the numbers of the second target machines is not smaller than the first number, the machine scheduled to the machine room is determined from the second target machines. When the machine room needs to carry out flow scheduling, the invention automatically carries out internal flow scheduling on the plurality of machine rooms according to different redundancy coefficients, thereby changing manual processing into automatic processing and reducing the investment of labor cost and the defect of relying on experience regulation and control. And under the condition that the flow scheduling instruction corresponding to the machine room is acquired, scheduling is carried out for a plurality of times according to different redundancy coefficients, and each scheduling uses different calculation modes to determine the number of machines to be reserved in the second machine room, so that more reasonable machine allocation is carried out.
Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the above advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a first schematic diagram of a traffic scheduling method according to an embodiment of the present invention;
fig. 2 is a second schematic diagram of a flow scheduling method according to an embodiment of the present invention;
fig. 3 is a third schematic diagram of a flow scheduling method according to an embodiment of the present invention;
fig. 4a is a first schematic diagram of a flow scheduling system according to an embodiment of the present invention;
fig. 4b is a second schematic diagram of a flow scheduling system according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a flow scheduling device according to an embodiment of the present invention;
fig. 6 is a schematic diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.
In order to realize automatic internal flow scheduling of multiple machine rooms, embodiments of the present invention provide a flow scheduling method, a system, an apparatus, an electronic device, and a computer storage medium, and in the following, the flow scheduling method provided by the embodiments of the present invention is first described. The method is applied to an electronic device, and the electronic device may be any server that can provide a traffic scheduling service, for example, a computer, a server, a game console, etc., which is not limited in detail herein. The flow scheduling method provided by the embodiment of the invention can be realized by at least one of software, a hardware circuit and a logic circuit arranged in the electronic equipment.
Referring to fig. 1, fig. 1 is a first schematic diagram of a traffic scheduling method according to an embodiment of the present invention, where the method includes:
And step 150, determining the machine scheduled to the machine room from the second target machines when the sum of the numbers of the second target machines is not smaller than the first number.
When the machine room needs to be subjected to flow scheduling, the internal flow scheduling is automatically performed on the multiple machine rooms according to different redundancy coefficients, so that manual processing is changed into automatic processing, and the defects of labor cost investment and dependence on experience regulation are reduced. And under the condition that the flow scheduling instruction corresponding to the machine room is acquired, the machine quantity to be reserved of the second machine room is determined by using different calculation modes in each scheduling through scheduling for a plurality of times according to different redundancy coefficients, so that more reasonable machine allocation is performed, the utilization rate of the whole machine room is improved, and the waste of machines is avoided.
The number of machines in each machine room and the network state which can be borne are rated, each machine room is provided with a corresponding early warning value, and when the network state parameter of the machine room exceeds the early warning value of the machine room, a flow dispatching instruction is triggered, so that machine borrowing is automatically carried out based on the flow dispatching instruction.
The flow scheduling instruction may be generated by the machine room based on the network state parameter thereof, and then sent to the electronic device by the machine room, or may be generated by the electronic device acquiring the network state parameter of the machine room in real time and based on the network state parameter of the machine room acquired in real time, and may be specifically set according to the actual situation, which is not limited herein.
Network state parameters include qps (Query Per Second), response time duration, etc. Under the condition that the electronic equipment acquires the flow scheduling instruction aiming at the first machine room, the number of machines needing borrowing of the first machine room can be calculated based on the network state parameters of the first machine room, and the first number is obtained.
Specifically, a real-time flow peak value, a historical flow peak value, a current machine load and a machine load threshold value of the first machine room are obtained, the flow of the first machine room required to be borrowed is determined based on the real-time flow peak value, the historical flow peak value, the current machine load and the machine load threshold value of the first machine room, then the average loadable load capacity of the first machine room machine is obtained, and the number of machines required to be borrowed of the first machine room is determined based on the average loadable load capacity of the first machine room machine and the flow of the first machine room required to be borrowed. The real-time flow peak value is the maximum value in the real-time flow value, and the historical flow peak value is the maximum value in the historical flow.
For example, there are 5 rooms (room a, room B, room C, room D, room E), and when room a triggers a flow dispatching instruction, the number of machines that room a needs to borrow is calculated.
For example, the flow move qps that the machine room a needs to borrow is calculated by the following formula:
move_qps=(MAX((qps_a-qps_max)/qps_a,(load_a-load_max)/load_a,(avgRt_a-avgRt_max)/avgRt_a))*qps_a
Wherein qps _a = real-time traffic peak 0.7+ historical traffic peak 0.3;
qps _max is qps threshold value for each machine room;
load_a = machine room a current load;
load_max=load threshold for each machine room set;
avgRt_a is the average influence duration of the machine room A;
avgRt_max is the longest average influence duration of the set machine room;
setting the single machine average bearable amount to qps _avg, then: the number of machines that machine room a needs to borrow = (move_ qps/qps _avg) +1.
For example 10 of the number of machines that the machine room a needs to borrow.
And after the first quantity is calculated, scheduling according to different redundancy coefficients, according to the total number of the machine room machines of the second machine room, the real-time machine quantity of the machine room and the offline machine quantity of the machine room. The second machine room is other machine rooms except the first machine room; the redundancy coefficient is used for determining the number of machines to be reserved of each second machine room, and comprises a first redundancy coefficient and a second redundancy coefficient.
Specifically, the number of first target machines which can be borrowed by the second machine room is calculated based on the first redundancy coefficient and on addition of preset weights according to offline data and current real-time data in a preset time period of each machine room. For example, machine borrowing calculation is performed based on preset weight addition according to offline data and current real-time data in each machine room for 30 days.
For example, for each second machine room, the number of first target machines that the machine room can borrow is:
total machine number of machine room- (0.7. Times. Real-time machine number of machine room + 0.3)
X number of machine room offline machine) x (1+30%)
After the number of the first target machines of each second machine room is calculated, determining the sum of the number of the first target machines which can be borrowed by each second machine room, and if the sum of the number of the first target machines is not smaller than the first number, determining the machine which is dispatched to the machine room directly from the first target machines. For the sake of clarity of the solution and clarity of the layout, a detailed description will be given below with reference to another embodiment of how the machine dispatched to the machine room is determined from the first target machines.
Calculating the number of second target machines which can be borrowed by each second machine room based on the second redundancy coefficient under the condition that the sum of the number of the first target machines is smaller than the first number; the second redundancy factor is smaller than the first redundancy factor. For example, based on the second redundancy factor, for each second machine room, the number of machine rooms of the first target machine to which the machine room is borrowed = the total number of machine rooms of the machine room-the number of real-time machine rooms x (1+10%), and in the case where the sum of the numbers of the second target machines is not less than the first number, the machine scheduled to the machine room is determined from the second target machines. For clarity of solution and clarity of layout, a detailed description of how the machine dispatched to the machine room is determined from the second target machine is provided below in connection with another embodiment.
When the machine room needs to be subjected to flow scheduling, the internal flow scheduling is automatically performed on the multiple machine rooms according to different redundancy coefficients, so that manual processing is changed into automatic processing, and the defects of labor cost investment and dependence on experience regulation are reduced. And under the condition that the flow scheduling instruction corresponding to the machine room is acquired, multiple times of scheduling are carried out according to different redundancy coefficients, the number of machines needing to be reserved in the second machine room is determined by using different calculation modes in each scheduling, when the machine is calculated for the first time, the number of machines needing to be reserved in the second machine room is more, if the scheduling requirement of the first machine room is met, the scheduling is directly carried out, if the scheduling requirement of the first machine room is not met, the secondary scheduling is triggered, namely the number of machines needing to be reserved in the second machine room is calculated according to the second redundancy coefficient, so that more reasonable machine allocation is carried out, the utilization rate of the whole machine room is improved, and the waste of machines is avoided.
In a possible embodiment, before determining a machine to dispatch to the machine room from the first target machine, the method includes:
determining a priority of a first target machine which can be borrowed by the second machine room based on a region to which the first machine room belongs and a region to which the second machine room belongs, wherein the priority of the first target machine in the machine room which is in the same region as the first machine room is higher than that of the first target machine in the machine room which is in a different region from the first machine room;
The determining a machine to be dispatched to the machine room from the first target machines includes:
and determining the machine scheduled to the machine room from the first target machine according to the order of the priorities from high to low.
Before determining the machine scheduled to the machine room from the first target machines, the priority of the first target machine that can be borrowed by the second machine room may be determined based on the region to which the first machine room belongs and the region to which the second machine room belongs, where the priority of the first target machine in the machine room in the same region as the first machine room is higher than the priority of the first target machine in the machine room in a different region from the first machine room, and after determining the priority of the first target machine, the machine scheduled to the machine room may be determined from the first target machines in order of higher priority to lower.
For example, there are 5 machines (machine room a, machine room B, machine room C, machine room D, machine room E), where machine room a and machine room B belong to one region, and machine room C, machine room D, machine room E and machine room a belong to different regions, and the priority of the first target machine in machine room B is higher than that of the first target machine in machine room C, machine room D, machine room E. And when the machine dispatched to the machine room A is determined from the first target machines, the first target machines of the machine room B in the same region are automatically and preferentially borrowed.
The priority of the first target machine is determined according to the region, and the priority of the first target machine in the machine room which is in the same region as the first machine room is higher than the priority of the first target machine in the machine room which is in different regions from the first machine room, so that the machines of the machine rooms in the same region are preferentially scheduled during scheduling, and the machine rooms in the same region are short in distance and low in time delay, so that the scheduling efficiency can be improved.
In one possible embodiment, the priority of the first target machine to which the second machine room is borrowable is determined based on the distance between the region to which the machine room belongs and the region to which the second machine room belongs; wherein the shorter the distance, the higher the priority.
The priority of the first target machine is determined according to the regional distance, so that the machine of the machine room with the short distance is preferentially scheduled in scheduling, the time delay is low, and the scheduling efficiency can be improved.
In one possible embodiment, for each first target machine, a priority of the first target machine is determined based on the network state of the machine; wherein, the better the network state, the higher the priority.
The network status of the machine may include qps, response time, and illustratively, the lower the query rate per second, the higher the priority and the shorter the response time, the higher the priority.
The priority of the first target machine is determined according to the network state, so that machines with good network states are scheduled preferentially during scheduling, delay is low, and scheduling efficiency can be improved.
In one possible embodiment, the determining a machine scheduled to the machine room in the second target machine includes:
obtaining a difference value between the sum of the numbers of the first target machines and the first number to obtain a second number;
determining a second number of third target machines from the second target machines, the third target machines being machines of the second target machines other than the first target machine;
and dispatching the first target machine and the third target machine to the machine room.
Under the condition that the sum of the numbers of the first target machines is smaller than the first number, the determined first target machines can be firstly scheduled to the machine room, then the difference value of the sum of the first number and the number of the first target machines is obtained to obtain the second number, the machines except the first target machine in the second number of the second target machines are determined from the second target machines, and the first target machines and the third target machines are scheduled to the machine room, so that the situation that the machine unbalance of the whole machine room is caused by one machine room at one time is avoided.
In a possible embodiment, before determining a machine to dispatch to the machine room from the second target machine, the method includes:
determining the priority of a second target machine which can be borrowed by the second machine room based on the region to which the first machine room belongs and the region to which the second machine room belongs, wherein the priority of the second target machine in the machine room which is in the same region as the first machine room is higher than the priority of the second target machine in the machine room which is in a different region from the first machine room;
the determining the machine to be dispatched to the machine room from the second target machine includes:
and determining the machine scheduled to the machine room from the second target machine according to the order of the priorities from high to low.
Before determining the machine scheduled to the machine room from the second target machines, the priority of the second target machines that can be borrowed by the second machine room may be determined based on the region to which the first machine room belongs and the region to which the second machine room belongs, where the priority of the second target machines in the machine room in the same region as the first machine room is higher than the priority of the second target machines in the machine room in a different region from the first machine room, and after determining the priority of the second target machines, the machines scheduled to the machine room may be determined from the second target machines in order of higher priority to lower.
For example, there are 5 machines (machine room a, machine room B, machine room C, machine room D, machine room E), where machine room a and machine room B belong to one region, and machine room C, machine room D, machine room E and machine room a belong to different regions, and the priority of the second target machine in machine room B is higher than that of the second target machine in machine room C, machine room D, machine room E. And when the machine dispatched to the machine room A is determined from the second target machines, automatically and preferentially borrowing the second target machines of the machine room B in the same region.
The priority of the second target machine is determined according to the region, and the priority of the second target machine in the machine room which is in the same region as the first machine room is higher than the priority of the second target machine in the machine room which is in a different region from the first machine room, so that the machines of the machine rooms in the same region are preferentially scheduled during scheduling, and the machine rooms in the same region are short in distance and low in time delay, so that the scheduling efficiency can be improved.
In one possible embodiment, determining the priority of the second target machine to which the second machine room is borrowable based on the distance between the region to which the machine room belongs and the region to which the second machine room belongs; wherein the shorter the distance, the higher the priority.
The priority of the second target machine is determined according to the regional distance, so that the machine of the machine room with the short distance is preferentially scheduled in the scheduling process, the time delay is low, and the scheduling efficiency can be improved.
In one possible embodiment, for each second target machine, a priority of the second target machine is determined based on the network state of the machine; wherein, the better the network state, the higher the priority.
The network status of the machine may include qps, response time, and illustratively, the lower the query rate per second, the higher the priority and the shorter the response time, the higher the priority.
The priority of the second target machine is determined according to the network state, so that machines with good network states are scheduled preferentially during scheduling, delay is low, and scheduling efficiency can be improved.
In one possible embodiment, the priority corresponding to each machine for each machine room may be pre-specified, then the pre-executed priority is stored in a preset database, and when the priority is needed, the corresponding priority may be read from the preset database based on the identification of each machine.
Further, after the electronic device calculates the priority of each target machine, the first machine room, the first target machine and the priority of the first target machine can be stored, so that when the priority is needed to be used next time, the corresponding priority can be directly read from the database, the calculated amount can be reduced, and the dispatching efficiency can be improved.
In a possible embodiment, determining a second number of third target machines from the second target machines includes:
and determining the priority of the second target machine room, and determining a third target machine from the second target machines according to the order of the priorities from high to low.
The manner of determining the priority of the second target machine room refers to the above embodiment, and is not described herein.
In a possible embodiment, the method further includes:
and generating a reminding message to enable a user to supplement the machine according to the reminding message when the sum of the number of the second target machines is not smaller than the first number.
If the secondary borrowing cannot meet the number of the machines required to be borrowed by the first machine room, a reminding message for reminding the supplementing machine is generated, so that a user is reminded to manually supplement the machine.
In a possible embodiment, the method further includes:
acquiring network state parameters of each machine room aiming at the machine room;
calculating the current state index of the machine room according to the network state parameters of the machine room;
and triggering a flow scheduling instruction under the condition that the current state index is larger than a preset index threshold value.
Network status parameters include qps, duration of response, etc. Aiming at each machine room, the electronic equipment acquires the network state parameters of the machine room, calculates the current state index of the machine room according to the network state parameters of the machine room, and triggers the flow dispatching instruction under the condition that the current state index is larger than the preset index threshold. For example, if the preset index threshold is rated qps, the electronic device obtains the network state parameter of the machine room, calculates the current qps of the machine room, and triggers the flow scheduling instruction if the current qps is greater than rated qps.
In one possible embodiment, the calculating the number of first target machines that can be borrowed by each second machine room based on the first redundancy coefficient includes:
aiming at each second machine room, acquiring the machine quantity x, the real-time machine peak value y and the historical machine peak value z of the machine room; calculating the number of the first target machines which can be borrowed from the machine room according to the following formula;
N=x-(a×y+b×z)×(1+λ 1 )
wherein a and b are preset weight values, and a+b=1; lambda (lambda) 1 Is a first redundancy coefficient; n is the number of first target machines which can be borrowed by the machine room;
the calculating, based on the second redundancy factor, the second target machine that each second machine room can be borrowed includes:
Aiming at each second machine room, acquiring the number x of machines in the machine room and the real-time machine peak value y;
calculating the number of the second target machines which can be borrowed from the machine room according to the following formula;
M=x-y×(1+λ 2 )
wherein lambda is 2 Is a second redundancy factor; m is the number of second target machines that the machine room can borrow.
The peak value of the real-time machine is the maximum value of the number of machines needed in real time by the machine room, and the peak value of the historical machine is the maximum value of the number of machines needed in the history of the machine room; a. b is a preset weight value, and can be set according to actual needs, for example, a=0.7, and b=0.3. The first redundancy coefficient and the second redundancy coefficient may also be set according to actual requirements, for example, the first redundancy coefficient is 0.3, and the second redundancy coefficient is 0.1, which is not limited herein.
Based on the foregoing embodiments, referring to fig. 2, fig. 2 is a second schematic diagram of a flow scheduling method according to an embodiment of the present invention, including:
if the flow scheduling instruction of the machine room A is triggered, calculating the number of machines required to be borrowed by the machine room A to obtain a first number;
calculating the number of first target machines which can be borrowed by each second machine room based on the first redundancy coefficient;
judging whether the sum of the numbers of the first target machines is not smaller than the first number, if so, determining the machine scheduled to the machine room from the first target machines, ending the flow, and if not, calculating the number of second target machines which can be borrowed by each second machine room based on the second redundancy coefficient;
Judging whether the sum of the number of the second target machines is not smaller than the first number, if so, determining the machine scheduled to the machine room from the second target machines and ending the flow, and if not, generating a reminding message so that a user supplements the machine according to the reminding message.
When the machine room needs to be subjected to flow scheduling, the internal flow scheduling is automatically performed on the multiple machine rooms according to different redundancy coefficients, so that manual processing is changed into automatic processing, and the defects of labor cost investment and dependence on experience regulation are reduced. And under the condition that the flow scheduling instruction corresponding to the machine room is acquired, multiple times of scheduling are carried out according to different redundancy coefficients, the number of machines needing to be reserved in the second machine room is determined by using different calculation modes in each scheduling, when the machine is calculated for the first time, the number of machines needing to be reserved in the second machine room is more, if the scheduling requirement of the first machine room is met, the scheduling is directly carried out, if the scheduling requirement of the first machine room is not met, the secondary scheduling is triggered, namely the number of machines needing to be reserved in the second machine room is calculated according to the second redundancy coefficient, so that more reasonable machine allocation is carried out, the utilization rate of the whole machine room is improved, and the waste of machines is avoided.
Based on the foregoing embodiments, referring to fig. 3, fig. 3 is a third schematic diagram of a flow scheduling method according to an embodiment of the present invention, including:
The machine room A is triggered in an early warning mode, namely, a triggered flow dispatching instruction, the number of the machines to be borrowed by the machine room A is calculated to obtain a first number, namely, if 10 machines are needed to be borrowed by the machine room A, 10 machines are needed to be borrowed by the machine room A;
performing first borrowing settlement, specifically, calculating the number of first target machines which can be borrowed by the second machine room according to offline data and current real-time data of each machine room in approximately 30 days;
the number of machines to be reserved in the second machine room is as follows: (machine room real-time machine number x 0.7+ machine room offline machine number x 0.3) × (1+30%);
that is, the number of first target machines that the second machine room can borrow is:
the total machine room machine number- ((the real-time machine room machine number x 0.7+the offline machine room machine number)
×0.3)×(1+30%)
Judging whether borrowing is enough or not, namely judging whether the sum of the numbers of the first target machines is not less than the first number, if so, determining the machine scheduled to the machine room from the first target machines, and ending the flow, wherein the machine scheduled to the machine room is determined to borrow from the first target machines according to the principle of priority with regions, as shown in fig. 3, borrowing downwards if the priority with regions is insufficient, namely borrowing downwards if the priority with regions is insufficient according to the order of priority from high to low, and borrowing the machine from the machine room B if the priority of the machine room B is higher than the priority of the machine room C.
If not, triggering a second borrowing settlement, and specifically, calculating the number of second target machines which can be borrowed by each second machine room based on a second redundancy coefficient;
the number of machines to be reserved in the second machine room is x (1+10%) of the number of real-time machines in the machine room;
that is, the number of machine room-borrowable first target machines = total machine room number-real-time machine room number x (1+10%)
Judging whether the sum of the numbers of the second target machines is not smaller than the first number, if so, determining the machine scheduled to the machine room from the second target machines and ending the flow, wherein the machine scheduled to the machine room is determined to be borrowed from the second target machines according to the principle of priority and region-sharing, and if not, generating a reminding message so as to enable a user to supplement the machine according to the reminding message.
When the machine room needs to be subjected to flow scheduling, the internal flow scheduling is automatically performed on the multiple machine rooms according to different redundancy coefficients, so that manual processing is changed into automatic processing, and the defects of labor cost investment and dependence on experience regulation are reduced. And under the condition that the flow scheduling instruction corresponding to the machine room is acquired, multiple times of scheduling are carried out according to different redundancy coefficients, the number of machines needing to be reserved in the second machine room is determined by using different calculation modes in each scheduling, when the machine is calculated for the first time, the number of machines needing to be reserved in the second machine room is more, if the scheduling requirement of the first machine room is met, the scheduling is directly carried out, if the scheduling requirement of the first machine room is not met, the secondary scheduling is triggered, namely the number of machines needing to be reserved in the second machine room is calculated according to the second redundancy coefficient, so that more reasonable machine allocation is carried out, the utilization rate of the whole machine room is improved, and the waste of machines is avoided.
Based on the foregoing embodiments, the present invention further provides a flow scheduling system, referring to fig. 4a, fig. 4a is a first schematic diagram of the flow scheduling system provided by the embodiment of the present invention, where the system includes:
a plurality of machine rooms 420, a scheduling server 410;
the scheduling server 410 is configured to:
under the condition that a flow scheduling instruction aiming at a first machine room is acquired, calculating the number of machines needing to be borrowed by the first machine room based on network state parameters of the first machine room to obtain a first number; the first machine room is one of the plurality of machine rooms;
calculating the number of first target machines which can be borrowed by each second machine room based on the first redundancy coefficient; wherein the second machine room is other machine rooms except the first machine room; the redundancy coefficient is used for determining the number of machines to be reserved in the second machine room, the redundancy coefficient comprises the first redundancy coefficient and a second redundancy coefficient, and the second redundancy coefficient is smaller than the first redundancy coefficient;
determining a machine scheduled to the machine room from the first target machines if the sum of the numbers of the first target machines is not smaller than the first number;
calculating the number of second target machines which can be borrowed by each second machine room based on the second redundancy coefficient under the condition that the sum of the number of the first target machines is smaller than the first number;
And determining the machine scheduled to the machine room from the second target machines when the sum of the numbers of the second target machines is not smaller than the first number.
In a possible embodiment, the scheduling server 410 is specifically configured to:
before the machine scheduled to the machine room is determined from the first target machines, determining the priority of the first target machines which can be borrowed by the second machine room based on the region to which the first machine room belongs and the region to which the second machine room belongs, wherein the priority of the first target machines in the machine room which is in the same region as the first machine room is higher than the priority of the first target machines in the machine room which is in a different region from the first machine room;
and determining the machine scheduled to the machine room from the first target machine according to the order of the priorities from high to low.
In a possible embodiment, the scheduling server 410 further includes:
and the auxiliary module is used for generating a reminding message when the sum of the numbers of the second target machines is not smaller than the first number, so that a user supplements the machines according to the reminding message.
In a possible embodiment, the scheduling server 410 includes:
An index calculation service module;
the machine room is used for sending the network state parameters of the machine room to the index calculation service module;
the index calculation service module is used for acquiring network state parameters of each machine room aiming at the machine room; calculating the current state index of the machine room according to the network state parameters of the machine room; and triggering a flow scheduling instruction under the condition that the current state index is larger than a preset index threshold value.
In a possible embodiment, the scheduling server 410 is specifically configured to:
aiming at each second machine room, acquiring the machine quantity x, the real-time machine peak value y and the historical machine peak value z of the machine room; calculating the number of the first target machines which can be borrowed from the machine room according to the following formula;
N=x-(a×y+b×z)×(1+λ 1 )
wherein a and b are preset weight values, and a+b=1; lambda (lambda) 1 Is a first redundancy coefficient; n is the number of first target machines which can be borrowed by the machine room;
the scheduling server 410 is specifically further configured to:
aiming at each second machine room, acquiring the number x of machines in the machine room and the real-time machine peak value y;
calculating the number of the second target machines which can be borrowed from the machine room according to the following formula;
M=x-y×(1+λ 2 )
wherein lambda is 2 Is a second redundancy factor; m is the number of second target machines that the machine room can borrow.
In a possible embodiment, the scheduling server 410 is specifically configured to:
obtaining a difference value between the sum of the numbers of the first target machines and the first number to obtain a second number;
determining a second number of third target machines from the second target machines, the third target machines being machines of the second target machines other than the first target machine;
and dispatching the first target machine and the third target machine to the machine room.
Based on the foregoing embodiments, the present invention further provides a flow scheduling system, referring to fig. 4b, fig. 4b is a first schematic diagram of the flow scheduling system provided by the embodiment of the present invention, where the system includes:
the dispatching center comprises a plurality of machine rooms, the dispatching center comprises an index calculation server and an auxiliary server.
The index calculation server comprises an offline calculation center and a real-time calculation center; the borrowing calculation server comprises a first borrowing center and a second borrowing center; the auxiliary server comprises a borrowing machine number early warning center and a borrowing machine number calculation center.
And each machine room reports the data of the machine room to a dispatching center, wherein the data of the machine room comprises QPS, response time length and the like.
The off-line computing center is used for calculating off-line data of each machine room, the real-time computing center is used for calculating real-time flow of each machine room, the borrowing machine number computing center in the auxiliary server determines whether the machine room triggers a flow dispatching instruction or not based on data of the borrowing machine number computing center reported by each machine room, and if the flow dispatching instruction is triggered, the borrowing machine number computing center calculates the number of machines needed to be borrowed by the machine room based on network state parameters of the machine room, and the first number is obtained.
The first borrowing center is used for calculating the number of first target machines which can be borrowed by each second machine room based on first redundancy coefficients, the redundancy coefficients comprise the first redundancy coefficients and second redundancy coefficients, and the second redundancy coefficients are smaller than the first redundancy coefficients; determining a machine scheduled to the machine room from the first target machines if the sum of the numbers of the first target machines is not less than the first number; the second lending center is used for calculating the number of second target machines which can be borrowed by each second machine room based on the second redundancy coefficient under the condition that the sum of the number of the first target machines is smaller than the first number; in the case that the sum of the numbers of the second target machines is not smaller than the first number, the machine scheduled to the machine room is determined from the second target machines.
In addition, the dispatching center further comprises an early warning server, and the early warning server is used for generating a reminding message when the sum of the number of the second target machines is not smaller than the first number, so that a user supplements the machines according to the reminding message.
Based on the above method embodiments, the embodiments of the present invention provide a flow scheduling device, referring to fig. 5, and fig. 5 is a schematic diagram of the flow scheduling device provided by the embodiments of the present invention; the device comprises:
the first calculating module 510 is configured to calculate, based on a network state parameter of the first machine room, a number of machines to be borrowed from the first machine room to obtain a first number when a flow scheduling instruction for the first machine room is acquired;
the second calculating module 520 is configured to calculate the number of first target machines that can be borrowed by each second machine room based on the first redundancy coefficient; wherein the second machine room is other machine rooms except the first machine room; the redundancy coefficient is used for determining the number of machines to be reserved in the second machine room, the redundancy coefficient comprises the first redundancy coefficient and a second redundancy coefficient, and the second redundancy coefficient is smaller than the first redundancy coefficient;
a first scheduling module 530, configured to determine a machine scheduled to the machine room from the first target machines if a sum of the numbers of the first target machines is not less than the first number;
A third calculating module 540, configured to calculate, based on the second redundancy factor, the number of second target machines that are each adjustable in the second machine room, when the sum of the number of first target machines is smaller than the first number;
and a second scheduling module 550, configured to determine a machine scheduled to the machine room from the second target machines if the sum of the numbers of the second target machines is not less than the first number.
In a possible embodiment, the apparatus further comprises:
a priority determining module, configured to determine, before determining a machine scheduled to the machine room from the first target machines, a priority of a first target machine that is adjustable in the second machine room based on a region to which the first machine room belongs and a region to which the second machine room belongs, where the priority of a first target machine in a machine room that is in a same region as the first machine room is higher than the priority of a first target machine in a machine room that is in a different region from the first machine room;
the first scheduling module 530 is specifically configured to:
and determining the machine scheduled to the machine room from the first target machine according to the order of the priorities from high to low.
In a possible embodiment, the apparatus further comprises:
and the generation module is used for generating a reminding message when the sum of the numbers of the second target machines is not smaller than the first number, so that a user supplements the machines according to the reminding message.
In a possible embodiment, the apparatus further comprises:
the acquisition module is used for acquiring network state parameters of each machine room aiming at the machine room;
the fourth calculation module is used for calculating the current state index of the machine room according to the network state parameters of the machine room;
and the triggering module is used for triggering the flow scheduling instruction under the condition that the current state index is larger than a preset index threshold value.
In one possible embodiment, the second computing module 520 is specifically configured to:
aiming at each second machine room, acquiring the machine quantity x, the real-time machine peak value y and the historical machine peak value z of the machine room; calculating the number of the first target machines which can be borrowed from the machine room according to the following formula;
N=x-(a×y+b×z)×(1+λ 1 )
wherein a and b are preset weight values, and a+b=1; lambda (lambda) 1 Is a first redundancy coefficient; n is the number of first target machines which can be borrowed by the machine room;
the third calculation module is specifically configured to:
Aiming at each second machine room, acquiring the number x of machines in the machine room and the real-time machine peak value y;
calculating the number of the second target machines which can be borrowed from the machine room according to the following formula;
M=x-y×(1+λ 2 )
wherein lambda is 2 Is a second redundancy factor; m is the number of second target machines that the machine room can borrow.
In a possible embodiment, the second scheduling module 550 is specifically configured to:
obtaining a difference value between the sum of the numbers of the first target machines and the first number to obtain a second number;
determining a second number of third target machines from the second target machines, the third target machines being machines of the second target machines other than the first target machine;
and dispatching the first target machine and the third target machine to the machine room.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
The embodiment of the invention also provides an electronic device, as shown in fig. 6, which comprises a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602 and the memory 603 complete communication with each other through the communication bus 604,
A memory 603 for storing a computer program;
the processor 601 is configured to execute the program stored in the memory 603, and implement the following steps:
under the condition that a flow scheduling instruction aiming at a first machine room is acquired, calculating the number of machines needing to be borrowed by the first machine room based on network state parameters of the first machine room to obtain a first number;
calculating the number of first target machines which can be borrowed by each second machine room based on the first redundancy coefficient; wherein the second machine room is other machine rooms except the first machine room; the redundancy coefficient is used for determining the number of machines to be reserved in the second machine room, the redundancy coefficient comprises the first redundancy coefficient and a second redundancy coefficient, and the second redundancy coefficient is smaller than the first redundancy coefficient;
determining a machine scheduled to the machine room from the first target machines if the sum of the numbers of the first target machines is not smaller than the first number;
calculating the number of second target machines which can be borrowed by each second machine room based on the second redundancy coefficient under the condition that the sum of the number of the first target machines is smaller than the first number;
and determining the machine scheduled to the machine room from the second target machines when the sum of the numbers of the second target machines is not smaller than the first number.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processor, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment of the present invention, a computer readable storage medium is provided, where a computer program is stored, the computer program, when executed by a processor, implements the traffic scheduling method according to any one of the foregoing embodiments.
In yet another embodiment of the present invention, a computer program product comprising instructions that, when run on a computer, cause the computer to perform the traffic scheduling method of any of the above embodiments is also provided.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), etc.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system, apparatus, electronic device, computer readable storage medium, and computer program product embodiments, the description is relatively simple as it is substantially similar to method embodiments, as relevant points are found in the partial description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims (15)
1. A method for traffic scheduling, the method comprising:
under the condition that a flow scheduling instruction aiming at a first machine room is acquired, calculating the number of machines needing borrowing of the first machine room based on network state parameters of the first machine room to obtain a first number;
calculating the number of first target machines which can be borrowed by each second machine room based on the first redundancy coefficient; wherein the second machine room is other machine rooms except the first machine room; the redundancy coefficient is used for determining the number of machines to be reserved in the second machine room, and comprises the first redundancy coefficient and a second redundancy coefficient which is smaller than the first redundancy coefficient;
determining a machine scheduled to the machine room from the first target machines if the sum of the numbers of the first target machines is not less than the first number;
calculating the number of second target machines which can be borrowed by each second machine room based on the second redundancy coefficient under the condition that the sum of the number of the first target machines is smaller than the first number;
And determining the machine scheduled to the machine room from the second target machines in the condition that the sum of the numbers of the second target machines is not smaller than the first number.
2. The method of claim 1, wherein prior to said determining a machine from said first target machine to dispatch to the machine room, the method comprises:
determining the priority of a first target machine which can be borrowed by the second machine room based on the region to which the first machine room belongs and the region to which the second machine room belongs, wherein the priority of the first target machine in the machine room which is in the same region as the first machine room is higher than the priority of the first target machine in the machine room which is in a different region from the first machine room;
the determining a machine scheduled to the machine room from the first target machine includes:
and determining the machine scheduled to the machine room from the first target machine according to the order of the priorities from high to low.
3. The method according to claim 1, wherein the method further comprises:
and generating a reminding message under the condition that the sum of the numbers of the second target machines is not smaller than the first number, so that a user supplements the machines according to the reminding message.
4. The method according to claim 1, wherein the method further comprises:
acquiring network state parameters of each machine room aiming at the machine room;
calculating the current state index of the machine room according to the network state parameters of the machine room;
and triggering a flow scheduling instruction under the condition that the current state index is larger than a preset index threshold value.
5. The method of claim 1, wherein calculating the number of first target machines that each second machine room can borrow based on the first redundancy factor comprises:
for each second machine room, acquiring the machine quantity x, the real-time machine peak value y and the historical machine peak value z of the machine room; calculating the number of the first target machines which can be borrowed from the machine room according to the following formula;
N=x-(a×y+b×z)×(1+λ 1 )
wherein a and b are preset weight values, and a+b=1; lambda (lambda) 1 Is a first redundancy coefficient; n is the number of first target machines which can be borrowed by the machine room;
the calculating the number of second target machines that each second machine room can borrow based on the second redundancy coefficient includes:
for each second machine room, acquiring the number x of machines in the machine room and the real-time machine peak value y;
calculating the number of the second target machines which can be borrowed from the machine room according to the following formula;
M=x-y×(1+λ 2 )
Wherein lambda is 2 Is a second redundancy factor; m is the number of second target machines that the machine room can borrow.
6. The method of claim 1, wherein determining the machine scheduled to the machine room in the second target machine comprises:
obtaining the difference value between the sum of the numbers of the first target machines and the first number to obtain a second number;
determining a second number of third target machines from the second target machines, the third target machines being machines of the second target machines other than the first target machine;
and dispatching the first target machine and the third target machine to the machine room.
7. A traffic scheduling system, the system comprising:
a plurality of machine rooms, a dispatch server;
the scheduling server is used for:
under the condition that a flow scheduling instruction aiming at a first machine room is acquired, calculating the number of machines needing borrowing of the first machine room based on network state parameters of the first machine room to obtain a first number; the first machine room is one of the plurality of machine rooms;
calculating the number of first target machines which can be borrowed by each second machine room based on the first redundancy coefficient; wherein the second machine room is other machine rooms except the first machine room; the redundancy coefficient is used for determining the number of machines to be reserved in the second machine room, and comprises the first redundancy coefficient and a second redundancy coefficient which is smaller than the first redundancy coefficient;
Determining a machine scheduled to the machine room from the first target machines if the sum of the numbers of the first target machines is not less than the first number;
calculating the number of second target machines which can be borrowed by each second machine room based on the second redundancy coefficient under the condition that the sum of the number of the first target machines is smaller than the first number;
and determining the machine scheduled to the machine room from the second target machines in the condition that the sum of the numbers of the second target machines is not smaller than the first number.
8. The system of claim 7, wherein the scheduling server is configured to:
before the machine scheduled to the machine room is determined from the first target machines, determining the priority of the first target machines which can be borrowed by the second machine room based on the region to which the first machine room belongs and the region to which the second machine room belongs, wherein the priority of the first target machines in the machine room which is in the same region as the first machine room is higher than the priority of the first target machines in the machine room which is in a different region from the first machine room;
and determining the machine scheduled to the machine room from the first target machine according to the order of the priorities from high to low.
9. The system of claim 7, wherein the scheduling server further comprises:
and the auxiliary module is used for generating a reminding message under the condition that the sum of the numbers of the second target machines is not smaller than the first number, so that a user supplements the machines according to the reminding message.
10. The system of claim 7, wherein the scheduling server comprises:
an index calculation service module;
the machine room is used for sending the network state parameters of the machine room to the index calculation service module;
the index calculation service module is used for acquiring network state parameters of each machine room aiming at the machine room; calculating the current state index of the machine room according to the network state parameters of the machine room; and triggering a flow scheduling instruction under the condition that the current state index is larger than a preset index threshold value.
11. The system of claim 7, wherein the scheduling server is configured to:
aiming at each second machine room, acquiring the machine quantity x, the real-time machine peak value y and the historical machine peak value z of the machine room; calculating the number of the first target machines which can be borrowed from the machine room according to the following formula;
N=x-(a×y+b×z)×(1+λ 1 )
Wherein a and b are presetA+b=1; lambda (lambda) 1 Is a first redundancy coefficient; n is the number of first target machines which can be borrowed by the machine room;
the scheduling server is also specifically configured to:
for each second machine room, acquiring the number x of machines in the machine room and the real-time machine peak value y;
calculating the number of the second target machines which can be borrowed from the machine room according to the following formula;
M=x-y×(1+λ 2 )
wherein lambda is 2 Is a second redundancy factor; m is the number of second target machines that the machine room can borrow.
12. The system of claim 7, wherein the scheduling server is configured to:
obtaining the difference value between the sum of the numbers of the first target machines and the first number to obtain a second number;
determining a second number of third target machines from the second target machines, the third target machines being machines of the second target machines other than the first target machine;
and dispatching the first target machine and the third target machine to the machine room.
13. A traffic scheduling device, the device comprising:
the first calculation module is used for calculating the number of machines required to be borrowed by the first machine room based on the network state parameters of the first machine room under the condition that the flow scheduling instruction aiming at the first machine room is acquired, so as to obtain a first number;
The second calculation module is used for calculating the number of first target machines which can be borrowed by each second machine room based on the first redundancy coefficient; wherein the second machine room is other machine rooms except the first machine room; the redundancy coefficient is used for determining the number of machines to be reserved in the second machine room, and comprises the first redundancy coefficient and a second redundancy coefficient which is smaller than the first redundancy coefficient;
the first scheduling module is used for determining a machine scheduled to the machine room from the first target machines when the sum of the numbers of the first target machines is not smaller than the first number;
a third calculating module, configured to calculate, based on the second redundancy coefficients, the number of second target machines that are each adjustable in the second machine room, when the sum of the number of first target machines is smaller than the first number;
and the second scheduling module is used for determining the machine scheduled to the machine room from the second target machines under the condition that the sum of the numbers of the second target machines is not smaller than the first number.
14. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
A memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-6 when executing a program stored on a memory.
15. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211695802.XA CN116010091A (en) | 2022-12-28 | 2022-12-28 | Traffic scheduling method, system, device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211695802.XA CN116010091A (en) | 2022-12-28 | 2022-12-28 | Traffic scheduling method, system, device, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116010091A true CN116010091A (en) | 2023-04-25 |
Family
ID=86020472
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211695802.XA Pending CN116010091A (en) | 2022-12-28 | 2022-12-28 | Traffic scheduling method, system, device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116010091A (en) |
-
2022
- 2022-12-28 CN CN202211695802.XA patent/CN116010091A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111516543B (en) | Charging equipment power distribution method, storage medium and system | |
EP2721706B1 (en) | Method and apparatus for controlling energy services based on market data | |
CN111026550A (en) | Task scheduling method and device under container cloud environment, server and storage device | |
CN104217978B (en) | Semiconductor lot handling system and method | |
CN113031542A (en) | Semiconductor production line dynamic scheduling method based on load balancing | |
CN113342551A (en) | Cross-region service message pushing method of message subscription mechanism | |
CN117485198B (en) | Energy storage sharing and distributing method and system based on vehicle-mounted power battery | |
CN108667135A (en) | The method and apparatus for realizing power scheduling | |
CN112491742B (en) | Method and device for scheduling edge computing terminal resources | |
CN114462784A (en) | Method, device and equipment for scheduling assembly and maintenance personnel | |
CN116010091A (en) | Traffic scheduling method, system, device, electronic equipment and storage medium | |
CN106600088A (en) | System and method for enhancing production capacity | |
CN114979282B (en) | Task scheduling method, device, storage medium and electronic equipment | |
CN116404683A (en) | Energy regulation and control method, device, terminal and medium of flexible-direct interconnection system | |
CN115395664A (en) | Power distribution method and device for energy storage power station | |
CN114626671A (en) | Self-adaptive multi-task scheduling method and system for verification assembly line | |
CN114881465A (en) | Production management method, system, device and storage medium | |
CN107547429A (en) | One kind load determines method, apparatus and electronic equipment | |
CN114444980B (en) | Control method and device for intelligent factory production equipment based on 5G technology | |
CN117236822B (en) | Intelligent goods delivery method, device, equipment and medium | |
CN116968584A (en) | Power distribution method, device, equipment, system and storage medium | |
CN115891866A (en) | Automatic replacement method and system for auxiliary controller and vehicle | |
WO2024119105A1 (en) | Method and system for managing an electrical grid | |
CN117591373A (en) | Zabbix-based server state monitoring system and control method | |
CN117578547A (en) | Power distribution method and device of energy storage system, 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 |