CN114090269A - Service scheduling balancing method, device, equipment and storage medium - Google Patents

Service scheduling balancing method, device, equipment and storage medium Download PDF

Info

Publication number
CN114090269A
CN114090269A CN202210069939.8A CN202210069939A CN114090269A CN 114090269 A CN114090269 A CN 114090269A CN 202210069939 A CN202210069939 A CN 202210069939A CN 114090269 A CN114090269 A CN 114090269A
Authority
CN
China
Prior art keywords
target
service
sub
server
material number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210069939.8A
Other languages
Chinese (zh)
Other versions
CN114090269B (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.)
Beijing Aqiu Technology Co ltd
Original Assignee
Beijing Aqiu 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 Beijing Aqiu Technology Co ltd filed Critical Beijing Aqiu Technology Co ltd
Priority to CN202210069939.8A priority Critical patent/CN114090269B/en
Publication of CN114090269A publication Critical patent/CN114090269A/en
Application granted granted Critical
Publication of CN114090269B publication Critical patent/CN114090269B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention belongs to the technical field of computers, and discloses a method, a device, equipment and a storage medium for service scheduling balancing. The method comprises the following steps: acquiring a service scheduling table of each sub-server and a target material number of a target service; and extracting an initial material number and an initial queue length in the service scheduling table. And carrying out service scheduling on the target service according to the initial queue length, the initial material number and the target material number. Through the mode, the target service is subjected to service distribution through the service scheduling table of each sub-server and the target material number, the queue length of each sub-server is considered, the distribution of the material number is also considered, the load of each sub-server is balanced, and meanwhile, the service processing efficiency is improved.

Description

Service scheduling balancing method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for balancing service scheduling.
Background
In a Printed Circuit Board (PCB) service, a large amount of CPU, memory and GPU resources are required, and before starting operation, a template picture with a large volume needs to be loaded into the memory and a model needs to be loaded into a video memory of a GPU, which is the most time-consuming process of the whole operation process. When different material numbers are inferred by operation, the template graph and the model are required to be reloaded, if the material numbers are distributed to all the slave servers according to the sequence from beginning to end by the master server, the material numbers to be operated at this time are different from the material numbers to be operated at the last time, the model and the template graph are required to be reloaded each time, and the efficiency is low.
The above is only for the purpose of assisting understanding of the technical aspects of the present invention, and does not represent an admission that the above is prior art.
Disclosure of Invention
The invention mainly aims to provide a method, a device, equipment and a storage medium for balancing service scheduling, and aims to solve the technical problems of unbalanced service scheduling and low efficiency in the prior art.
In order to achieve the above object, the present invention provides a method for balancing service scheduling, comprising the following steps:
acquiring a service scheduling table of each sub-server and a target material number of a target service;
extracting an initial material number and an initial queue length in the service scheduling table;
and carrying out service scheduling on the target service according to the initial queue length, the initial material number and the target material number.
Optionally, the obtaining the service schedule of each sub-server includes:
when a service scheduling request is detected, acquiring a service processing speed in an initial sub-server; determining the working state of the initial sub-server according to the service processing speed;
searching each sub-server with the working state being a preset state, and acquiring service processing data corresponding to each sub-server;
and obtaining the service scheduling table of each sub server according to the service processing data.
Optionally, the performing service scheduling on the target service according to the initial queue length, the initial material number, and the target material number includes:
detecting whether a material number identical to the target material number exists in the initial material number or not;
if the material number identical to the target material number exists in the initial material numbers, acquiring a first queue length corresponding to the material number;
comparing the lengths of the first queues to obtain a comparison result;
and performing service scheduling on the target service according to the comparison result.
Optionally, the performing service scheduling on the target service according to the comparison result includes:
if the lengths of the first queues are different, acquiring a target queue length with the minimum queue length in the lengths of the first queues;
searching a sub server corresponding to the target queue length to obtain a target sub server;
and sending a service processing instruction and the target service to the target sub-server so that the target sub-server processes the target service according to the service processing instruction.
Optionally, the performing service scheduling on the target service according to the comparison result includes:
if the lengths of the first queues are the same, acquiring a preset queue length;
if the preset queue length is the same as the first queue length, acquiring a target queue length with the minimum queue length in the initial queue lengths;
searching a sub server corresponding to the target queue length to obtain a target sub server;
and sending a service processing instruction and the target service to the target sub-server so that the target sub-server processes the target service according to the service processing instruction.
Optionally, after detecting whether a material number identical to the target material number exists in the initial material number, the method further includes:
if the material number which is the same as the target material number does not exist in the initial material numbers, acquiring the target queue length with the minimum queue length in the initial queue lengths;
searching a sub server corresponding to the target queue length to obtain a target sub server;
and sending a service processing instruction and the target service to the target sub-server so that the target sub-server processes the target service according to the service processing instruction.
Optionally, after performing service scheduling on the target service according to the initial queue length, the initial material number, and the target material number, the method further includes:
acquiring the current queue length of the target sub-server;
and updating the service scheduling table corresponding to the target sub-server according to the current queue length and the target material number.
In addition, to achieve the above object, the present invention further provides a service scheduling balancing apparatus, where the service scheduling balancing apparatus includes:
the acquisition module is used for acquiring the service scheduling table of each sub server and the target material number of the target service;
the extracting module is used for extracting the initial material number and the initial queue length in the service scheduling table;
and the scheduling module is used for performing service scheduling on the target service according to the initial queue length, the initial material number and the target material number.
In addition, to achieve the above object, the present invention further provides a service scheduling balancing device, where the service scheduling balancing device includes: the system comprises a memory, a processor and a service scheduling balancing program stored on the memory and capable of running on the processor, wherein the service scheduling balancing program is configured to realize the service scheduling balancing method.
In addition, to achieve the above object, the present invention further provides a storage medium, where the storage medium stores a service scheduling balancing program, and the service scheduling balancing program, when executed by a processor, implements the service scheduling balancing method as described above.
The method comprises the steps of obtaining a service scheduling table of each sub-server and a target material number of a target service; and extracting an initial material number and an initial queue length in the service scheduling table. And carrying out service scheduling on the target service according to the initial queue length, the initial material number and the target material number. Through the mode, the target service is subjected to service distribution through the service scheduling table of each sub-server and the target material number, the queue length of each sub-server is considered, the distribution of the material number is also considered, the load of each sub-server is balanced, and meanwhile, the service processing efficiency is improved.
Drawings
Fig. 1 is a schematic structural diagram of a service scheduling balancing device of a hardware operating environment according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a first embodiment of a method for balancing service scheduling according to the present invention;
fig. 3 is a flowchart illustrating a second embodiment of a method for balancing service scheduling according to the present invention;
fig. 4 is a block diagram of a first embodiment of a service scheduling balancing apparatus according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a service scheduling balancing device in a hardware operating environment according to an embodiment of the present invention.
As shown in fig. 1, the traffic scheduling balancing apparatus may include: a processor 1001, such as a Central Processing Unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a Random Access Memory (RAM) Memory, or may be a Non-Volatile Memory (NVM), such as a disk Memory. The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the architecture shown in fig. 1 does not constitute a limitation of the traffic scheduling balancing apparatus and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a storage medium, may include therein an operating system, a network communication module, a user interface module, and a traffic scheduling balancing program.
In the traffic scheduling balancing apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the service scheduling balancing device of the present invention may be arranged in the service scheduling balancing device, and the service scheduling balancing device calls the service scheduling balancing program stored in the memory 1005 through the processor 1001 and executes the service scheduling balancing method provided by the embodiment of the present invention.
An embodiment of the present invention provides a method for balancing service scheduling, and referring to fig. 2, fig. 2 is a schematic flow diagram of a first embodiment of the method for balancing service scheduling according to the present invention.
In this embodiment, the method for balancing service scheduling includes the following steps:
step S10: and acquiring a service scheduling table of each sub-server and a target material number of a target service.
In the distributed system, a plurality of servers process data or services, and the processing results are stored in a fixed place in a unified manner. In this embodiment, the servers are divided into primary and secondary servers, and the primary server obtains the service scheduling table of the secondary server and the target material number of the target service, extracts the initial queue length of the initial material number in the service scheduling table, and performs service scheduling on the target service according to the initial material number, the initial queue length, and the target material number.
It can be understood that each sub-server corresponds to a service schedule table, the service schedule table refers to service processing data of the sub-server, and the service schedule table includes, but is not limited to, an initial material number processed by the sub-server in history, a corresponding processing number, a corresponding service allocation time, an initial queue length, and a registration time of the sub-server.
In a specific implementation, the main server needs to acquire a target service which needs to be currently subjected to service distribution and is processed by the sub-servers, and identify a material number corresponding to the target service.
It should be noted that, in order to obtain an effective sub-server and obtain an accurate service schedule, further, the obtaining a service schedule of each sub-server includes: when a service scheduling request is detected, acquiring a service processing speed in an initial sub-server; determining the working state of the initial sub-server according to the service processing speed; searching each sub-server with the working state being a preset state, and acquiring service processing data corresponding to each sub-server; and obtaining the service scheduling table of each sub server according to the service processing data.
It can be understood that, when a service scheduling request is detected, the main server needs to acquire all sub servers existing in the distributed system, and all the sub servers are the initial sub servers.
In a specific implementation, the main server obtains a service processing speed of the initial sub-server, and can determine a working state of the initial sub-server according to the service processing speed. For example, if the service processing speed of the initial sub-server 1 is 2/hour, and the service processing speed of the initial sub-server 2 is 0/hour, it means that the operation state of the initial sub-server 1 is a normal operation state, and the operation state of the initial sub-server 2 is a suspended operation state.
It should be noted that the preset state refers to a normal operating state, and the servers with the operating states in the preset state are searched in the initial sub-servers as the sub-servers. For example, the current initial sub-servers are 1, 2, 3, 4, and 5, and the sub-servers in the initial sub-server whose working state is the preset state are 1, 3, 4, and 5.
It can be understood that, the service processing data corresponding to each sub-server is obtained, and the service scheduling table corresponding to each sub-server is obtained according to the service processing data, where the service processing data includes, but is not limited to, the initial material number and the corresponding processing number that have been processed by the sub-server in history, the corresponding service allocation time, and the initial queue length. The current initial sub-servers are 1, 2, 3, 4 and 5, the sub-servers in the initial sub-server with the working states in the preset states are 1, 3, 4 and 5, and the service processing data corresponding to the sub-servers 1, 3, 4 and 5 are obtained, so that the service scheduling tables corresponding to the sub-servers 1, 3, 4 and 5 are obtained.
Step S20: and extracting an initial material number and an initial queue length in the service scheduling table.
It should be noted that, because the service scheduling table has the service processing data and the registration time corresponding to each sub-server, the service scheduling table is parsed, and the initial material number and the initial queue length in the service scheduling table are extracted. The initial material number refers to the material number processed by the sub server in history, and the initial queue length refers to the amount of the service which needs to be processed by the sub server currently.
Step S30: and carrying out service scheduling on the target service according to the initial queue length, the initial material number and the target material number.
It should be noted that after the initial queue length, the initial material number, and the target material number are obtained, service scheduling may be performed on the target service, and the target service is allocated to the corresponding target sub-server, so that the target sub-server processes the target service.
It can be understood that, in order to ensure timeliness and accuracy in subsequent service scheduling and improve efficiency of service processing, further, after performing service scheduling on a target service according to the initial queue length, the initial material number, and the target material number, the method further includes: acquiring the current queue length of the target sub-server; and updating the service scheduling table corresponding to the target sub-server according to the current queue length and the target material number.
In the specific implementation, after the target service is allocated to the target sub-service, the current queue length of the target sub-server is obtained, and the service scheduling table corresponding to the target sub-server is updated according to the current queue length and the target material number. For example, the current queue length of the target sub-server 1 is 5, the target material number is a, and at this time, the service schedule table corresponding to the target sub-server 1 is updated according to the target material number a and the current queue length 5.
In the embodiment, the service scheduling table of each sub-server and the target material number of the target service are obtained; and extracting an initial material number and an initial queue length in the service scheduling table. And carrying out service scheduling on the target service according to the initial queue length, the initial material number and the target material number. Through the mode, the target service is subjected to service distribution through the service scheduling table of each sub-server and the target material number, the queue length of each sub-server is considered, the distribution of the material number is also considered, the load of each sub-server is balanced, and meanwhile, the service processing efficiency is improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a service scheduling balancing method according to a second embodiment of the present invention.
Based on the first embodiment, the step S30 in the service scheduling balancing method of this embodiment includes:
step S31: and detecting whether the material number identical to the target material number exists in the initial material number.
It should be noted that, after the initial material number is obtained, whether a material number identical to the target material number exists in the initial material number is detected.
It can be understood that, in order to ensure normal operation of service scheduling and ensure load balancing of each sub-server, further, after detecting whether a material number identical to the target material number exists in the initial material number, the method further includes: if the material number which is the same as the target material number does not exist in the initial material numbers, acquiring the target queue length with the minimum queue length in the initial queue lengths; searching a sub server corresponding to the target queue length to obtain a target sub server; and sending a service processing instruction and the target service to the target sub-server so that the target sub-server processes the target service according to the service processing instruction.
In a specific implementation, if no material number identical to the target material number exists in the initial material numbers, the minimum queue length in the initial queue lengths is obtained as the target queue length. For example, if the target material number is a, the initial material number corresponding to the sub-server 1 is B, C, the initial material number corresponding to the sub-server 2 is D, and the initial material number corresponding to the sub-server 3 is E, it indicates that the target material number does not exist in the initial material numbers, the initial queue length corresponding to the sub-server 1 is 2, the initial queue length corresponding to the sub-server 2 is 3, and the initial queue length corresponding to the sub-server 3 is 4, and the target queue length is the initial queue length 2 corresponding to the sub-server 1.
It should be noted that after the target queue length is found, the sub-server corresponding to the target queue length is obtained, so as to obtain the target sub-server. And if a plurality of target queue lengths exist, taking the sub-server with the earliest registration time in the sub-servers corresponding to the target queue lengths as the target sub-server. For example, there are 3 target queue lengths 2, and the sub-servers corresponding to the 3 target queue lengths are sub-server 1, sub-server 2, and sub-server 3, where the registration time of sub-server 1 is the earliest, and the target sub-server is sub-server 1.
It can be understood that, after the target sub-server is obtained, the service processing instruction is sent to the target sub-server, so that the target sub-server processes the target service according to the service processing instruction.
Step S32: and if the material number identical to the target material number exists in the initial material numbers, acquiring a first queue length corresponding to the material number.
It should be noted that, if a material number identical to the target material number exists in the initial material number, a first queue length corresponding to the identical material number is obtained. For example, if the target material number is a, the initial material number corresponding to the sub-server 1 is a, the initial material number corresponding to the sub-server 2 is B, and the initial material number corresponding to the sub-server 3 is C, there is a material number identical to the target material number a, and the first queue length corresponding to the material number a of the sub-server 1 is obtained as 5.
Step S33: and comparing the lengths of the first queues to obtain a comparison result.
The comparison results are obtained by comparing the lengths of the first queues. For example, if the initial material numbers corresponding to the sub server 1 and the sub server 2 in the initial material number are the same as the target material number, the first queue length corresponding to the sub server 1 and the first queue length corresponding to the sub server 2 are obtained, and the two are compared to obtain a comparison result.
Step S34: and performing service scheduling on the target service according to the comparison result.
It should be noted that, after the comparison result of the first queue length is obtained, the service scheduling is performed on the target service according to the comparison result.
It can be understood that, in order to ensure load balancing of sub-services and improve service processing efficiency, further, performing service scheduling on the target service according to the comparison result includes: if the lengths of the first queues are different, acquiring a target queue length with the minimum queue length in the lengths of the first queues; searching a sub server corresponding to the target queue length to obtain a target sub server; and sending a service processing instruction and the target service to the target sub-server so that the target sub-server processes the target service according to the service processing instruction.
In a specific implementation, if the comparison result of the lengths of the first queues is that the lengths of the first queues are different, the length of the queue with the minimum length among the lengths of the first queues is obtained as a target queue length. For example, if the first queue length corresponding to the sub server 1 is 2, the first queue length corresponding to the sub server 2 is 3, and the first queue length corresponding to the sub server 3 is 4, the target queue length is the first queue length 2 corresponding to the sub server 1.
It should be noted that after the target queue length is found, the sub-server corresponding to the target queue length is obtained, so as to obtain the target sub-server. And if a plurality of target queue lengths exist, taking the sub-server with the earliest registration time in the sub-servers corresponding to the target queue lengths as the target sub-server. For example, the first queue length corresponding to the sub server 1 is 2, the first queue length corresponding to the sub server 2 is 2, and the first queue length corresponding to the sub server 3 is 3, then the target queue length is the first queue length 2 corresponding to the sub server 1 and the sub server 2, and the registration time of the sub server 1 in the sub server 1 and the sub server 2 is earliest, then the target sub server is the sub server 1.
It can be understood that, after the target sub-server is obtained, the service processing instruction is sent to the target sub-server, so that the target sub-server processes the target service according to the service processing instruction.
In a specific implementation, to ensure normal scheduling of a service, further, the performing service scheduling on the target service according to the comparison result includes: if the lengths of the first queues are the same, acquiring a preset queue length; if the preset queue length is the same as the first queue length, acquiring a target queue length with the minimum queue length in the initial queue lengths; searching a sub server corresponding to the target queue length to obtain a target sub server; and sending a service processing instruction and the target service to the target sub-server so that the target sub-server processes the target service according to the service processing instruction.
It should be noted that the preset queue length refers to the maximum length that each sub-server can perform task processing, if the first queue lengths are the same, the first queue length is compared with the preset queue length, if the first queue length is the same as the preset queue length, it is indicated that all sub-servers corresponding to the first queue length are fully loaded, at this time, the minimum queue length in the initial queue lengths is obtained as a target queue length, and after the target queue length is found, the sub-server corresponding to the target queue length is obtained, so as to obtain the target sub-server. And if a plurality of target queue lengths exist, taking the sub-server with the earliest registration time in the sub-servers corresponding to the target queue lengths as a target sub-server, and sending a service processing instruction to the target sub-server so that the target sub-server processes the target service according to the service processing instruction.
It can be understood that, if the preset queue length is different from the first queue length, it indicates that the sub-server corresponding to the first queue length is not fully loaded, and at this time, the sub-server with the earliest registration time in the sub-servers corresponding to the first queue length is taken as the target sub-server.
In this embodiment, whether a material number identical to the target material number exists in the initial material number is detected; if the material number identical to the target material number exists in the initial material numbers, acquiring a first queue length corresponding to the material number; comparing the lengths of the first queues to obtain a comparison result; and performing service scheduling on the target service according to the comparison result. Whether the material number identical to the target material number exists in the initial material number or not is detected, so that service scheduling is performed on the target service based on the first queue length corresponding to the identical material number, accuracy and timeliness in service scheduling are guaranteed, and meanwhile service scheduling efficiency is improved.
In addition, referring to fig. 4, this embodiment further provides a service scheduling balancing apparatus, where the service scheduling balancing apparatus includes:
the obtaining module 10 is configured to obtain a service schedule of each sub-server and a target material number of a target service.
And the extracting module 20 is configured to extract the initial material number and the initial queue length in the service scheduling table.
And the scheduling module 30 is configured to perform service scheduling on the target service according to the initial queue length, the initial material number, and the target material number.
In the embodiment, the service scheduling table of each sub-server and the target material number of the target service are obtained; and extracting an initial material number and an initial queue length in the service scheduling table. And carrying out service scheduling on the target service according to the initial queue length, the initial material number and the target material number. Through the mode, the target service is subjected to service distribution through the service scheduling table of each sub-server and the target material number, the queue length of each sub-server is considered, the distribution of the material number is also considered, the load of each sub-server is balanced, and meanwhile, the service processing efficiency is improved.
In an embodiment, the obtaining module 10 is further configured to obtain a service processing speed in the initial sub-server when the service scheduling request is detected; determining the working state of the initial sub-server according to the service processing speed;
searching each sub-server with the working state being a preset state, and acquiring service processing data corresponding to each sub-server;
and obtaining the service scheduling table of each sub server according to the service processing data.
In an embodiment, the extracting module 20 is further configured to detect whether a material number identical to the target material number exists in the initial material number;
if the material number identical to the target material number exists in the initial material numbers, acquiring a first queue length corresponding to the material number;
comparing the lengths of the first queues to obtain a comparison result;
and performing service scheduling on the target service according to the comparison result.
In an embodiment, the extracting module 20 is further configured to, if the lengths of the first queues are different, obtain a target queue length with a minimum queue length among the lengths of the first queues;
searching a sub server corresponding to the target queue length to obtain a target sub server;
and sending a service processing instruction and the target service to the target sub-server so that the target sub-server processes the target service according to the service processing instruction.
In an embodiment, the extracting module 20 is further configured to obtain a preset queue length if the lengths of the first queues are the same;
if the preset queue length is the same as the first queue length, acquiring a target queue length with the minimum queue length in the initial queue lengths;
searching a sub server corresponding to the target queue length to obtain a target sub server;
and sending a service processing instruction and the target service to the target sub-server so that the target sub-server processes the target service according to the service processing instruction.
In an embodiment, the extracting module 20 is further configured to obtain a target queue length with a minimum queue length in the initial queue lengths if there is no material number in the initial material numbers that is the same as the target material number;
searching a sub server corresponding to the target queue length to obtain a target sub server;
and sending a service processing instruction and the target service to the target sub-server so that the target sub-server processes the target service according to the service processing instruction.
In an embodiment, the scheduling module 30 is further configured to obtain a current queue length of the target sub-server;
and updating the service scheduling table corresponding to the target sub-server according to the current queue length and the target material number.
Since the present apparatus employs all technical solutions of all the above embodiments, at least all the beneficial effects brought by the technical solutions of the above embodiments are achieved, and are not described in detail herein.
In addition, an embodiment of the present invention further provides a storage medium, where a service scheduling balancing program is stored on the storage medium, and the service scheduling balancing program, when executed by a processor, implements the steps of the service scheduling balancing method described above.
Since the storage medium adopts all technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are achieved, and no further description is given here.
It should be noted that the above-described work flows are only exemplary, and do not limit the scope of the present invention, and in practical applications, a person skilled in the art may select some or all of them to achieve the purpose of the solution of the embodiment according to actual needs, and the present invention is not limited herein.
In addition, the technical details that are not described in detail in this embodiment may refer to the service scheduling balancing method provided in any embodiment of the present invention, and are not described herein again.
Further, it is to be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system 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 system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (e.g. Read Only Memory (ROM)/RAM, magnetic disk, optical disk), and includes several instructions for enabling a terminal device (e.g. a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A service scheduling balancing method is characterized in that the service scheduling balancing method comprises the following steps:
acquiring a service scheduling table of each sub-server and a target material number of a target service;
extracting an initial material number and an initial queue length in the service scheduling table;
and carrying out service scheduling on the target service according to the initial queue length, the initial material number and the target material number.
2. The method for balancing service scheduling according to claim 1, wherein the obtaining the service scheduling table of each sub-server includes:
when a service scheduling request is detected, acquiring a service processing speed in an initial sub-server; determining the working state of the initial sub-server according to the service processing speed;
searching each sub-server with the working state being a preset state, and acquiring service processing data corresponding to each sub-server;
and obtaining the service scheduling table of each sub server according to the service processing data.
3. The method for balancing service scheduling according to claim 1, wherein the performing service scheduling on the target service according to the initial queue length, the initial material number, and the target material number includes:
detecting whether a material number identical to the target material number exists in the initial material number or not;
if the material number identical to the target material number exists in the initial material numbers, acquiring a first queue length corresponding to the material number;
comparing the lengths of the first queues to obtain a comparison result;
and performing service scheduling on the target service according to the comparison result.
4. The method for balancing service scheduling according to claim 3, wherein the performing service scheduling on the target service according to the comparison result includes:
if the lengths of the first queues are different, acquiring a target queue length with the minimum queue length in the lengths of the first queues;
searching a sub server corresponding to the target queue length to obtain a target sub server;
and sending a service processing instruction and the target service to the target sub-server so that the target sub-server processes the target service according to the service processing instruction.
5. The method for balancing service scheduling according to claim 3, wherein the performing service scheduling on the target service according to the comparison result includes:
if the lengths of the first queues are the same, acquiring a preset queue length;
if the preset queue length is the same as the first queue length, acquiring a target queue length with the minimum queue length in the initial queue lengths;
searching a sub server corresponding to the target queue length to obtain a target sub server;
and sending a service processing instruction and the target service to the target sub-server so that the target sub-server processes the target service according to the service processing instruction.
6. The traffic scheduling balancing method according to claim 3, wherein after detecting whether the material number identical to the target material number exists in the initial material number, the method further comprises:
if the material number which is the same as the target material number does not exist in the initial material numbers, acquiring the target queue length with the minimum queue length in the initial queue lengths;
searching a sub server corresponding to the target queue length to obtain a target sub server;
and sending a service processing instruction and the target service to the target sub-server so that the target sub-server processes the target service according to the service processing instruction.
7. The traffic scheduling balancing method according to any one of claims 1 to 6, wherein after the traffic scheduling of the target traffic according to the initial queue length, the initial material number and the target material number, the method further comprises:
acquiring the current queue length of a target sub-server;
and updating the service scheduling table corresponding to the target sub-server according to the current queue length and the target material number.
8. A traffic scheduling balancing apparatus, wherein the traffic scheduling balancing apparatus comprises:
the acquisition module is used for acquiring the service scheduling table of each sub server and the target material number of the target service;
the extracting module is used for extracting the initial material number and the initial queue length in the service scheduling table;
and the scheduling module is used for performing service scheduling on the target service according to the initial queue length, the initial material number and the target material number.
9. A traffic scheduling balancing apparatus, comprising: a memory, a processor, and a traffic scheduling balancing program stored on the memory and executable on the processor, the traffic scheduling balancing program being configured to implement the traffic scheduling balancing method according to any one of claims 1 to 7.
10. A storage medium, characterized in that the storage medium stores thereon a service scheduling balancing program, and the service scheduling balancing program, when executed by a processor, implements the service scheduling balancing method according to any one of claims 1 to 7.
CN202210069939.8A 2022-01-21 2022-01-21 Service scheduling balancing method, device, equipment and storage medium Active CN114090269B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210069939.8A CN114090269B (en) 2022-01-21 2022-01-21 Service scheduling balancing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210069939.8A CN114090269B (en) 2022-01-21 2022-01-21 Service scheduling balancing method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114090269A true CN114090269A (en) 2022-02-25
CN114090269B CN114090269B (en) 2022-04-22

Family

ID=80309064

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210069939.8A Active CN114090269B (en) 2022-01-21 2022-01-21 Service scheduling balancing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114090269B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102217256A (en) * 2011-05-26 2011-10-12 华为技术有限公司 Queue scheduling method and apparatus
WO2019000398A1 (en) * 2017-06-30 2019-01-03 深圳市大疆创新科技有限公司 Method for scheduling transaction, and processor, distributed system, and unmanned aerial vehicle
US20200334078A1 (en) * 2019-04-22 2020-10-22 International Business Machines Corporation Scheduling requests based on resource information
CN112596885A (en) * 2020-12-25 2021-04-02 网易(杭州)网络有限公司 Task scheduling method, device, equipment and storage medium
CN113608854A (en) * 2021-08-09 2021-11-05 深圳华大九天科技有限公司 Task scheduling method and device for layout verification, server and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102217256A (en) * 2011-05-26 2011-10-12 华为技术有限公司 Queue scheduling method and apparatus
WO2019000398A1 (en) * 2017-06-30 2019-01-03 深圳市大疆创新科技有限公司 Method for scheduling transaction, and processor, distributed system, and unmanned aerial vehicle
US20200334078A1 (en) * 2019-04-22 2020-10-22 International Business Machines Corporation Scheduling requests based on resource information
CN112596885A (en) * 2020-12-25 2021-04-02 网易(杭州)网络有限公司 Task scheduling method, device, equipment and storage medium
CN113608854A (en) * 2021-08-09 2021-11-05 深圳华大九天科技有限公司 Task scheduling method and device for layout verification, server and storage medium

Also Published As

Publication number Publication date
CN114090269B (en) 2022-04-22

Similar Documents

Publication Publication Date Title
CN108984388B (en) Method and terminal equipment for generating automatic test case
CN109829287A (en) Api interface permission access method, equipment, storage medium and device
CN110321738A (en) Information processing method and device
CN111953775A (en) Data transmission method and device
CN110069406B (en) Automatic triggering TPC-DS test method and system
CN109582439B (en) DCN deployment method, device, equipment and computer readable storage medium
KR102205686B1 (en) Method and apparatus for ranking candiate character and method and device for inputting character
CN114090269B (en) Service scheduling balancing method, device, equipment and storage medium
CN111061637B (en) Interface testing method, interface testing device and storage medium
CN112423024A (en) Video transcoding method and device, computer equipment and storage medium
CN111736761A (en) Data distribution method, device, storage system and computer readable storage medium
CN110852603A (en) High-throughput wind control data processing method, device, equipment and storage medium
CN108304104B (en) Data acquisition method and equipment, storage medium and terminal thereof
CN113274736B (en) Cloud game resource scheduling method, device, equipment and storage medium
CN111488286B (en) Method and device for independently developing Android modules
CN111030874B (en) Service arranging method, equipment, storage medium and device
CN114385318A (en) Parallel testing method, device and equipment based on kubernets
CN112351420B (en) Networking identity creation method and equipment of terminal equipment and readable storage medium
CN109948114B (en) Arc length curve integral automatic calculation method, equipment, storage medium and device
CN112637254A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN109634827A (en) Method and apparatus for generating information
CN113778673B (en) Data processing method, storage medium and apparatus
CN112559920B (en) Hook method, device and equipment based on jump instruction and storage medium
CN111615124B (en) Service detection method and device, electronic equipment and storage medium
CN115277694B (en) Data acquisition method, device, 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
GR01 Patent grant
GR01 Patent grant