CN113055480B - Scheduling method and device - Google Patents
Scheduling method and device Download PDFInfo
- Publication number
- CN113055480B CN113055480B CN202110284849.6A CN202110284849A CN113055480B CN 113055480 B CN113055480 B CN 113055480B CN 202110284849 A CN202110284849 A CN 202110284849A CN 113055480 B CN113055480 B CN 113055480B
- Authority
- CN
- China
- Prior art keywords
- load
- consumer
- level
- load information
- producer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
A scheduling method and a scheduling device are used for solving the problem that a scheduling system in the prior art cannot effectively schedule data to be processed of a producer to a consumer. In the present application, a scheduling request from a producer is received; responding to the scheduling request, and determining M target weight values of M consumers according to N-level load information of the producer and N-level load information of each consumer in the M consumers, wherein each level of load information comprises one or more load attributes and load parameters corresponding to the load attributes; and determining target consumers from the M consumers according to M target weight values of the M consumers, wherein M and N are integers greater than or equal to 2.
Description
Technical Field
The embodiment of the invention relates to the field of edge calculation, in particular to a scheduling method and device.
Background
The distributed edge computing platform is in butt joint with the most edge equipment of the network, and relates to complex factors such as various equipment types, complex network environments, changeable service types, difficult operation and the like. In response to this complexity, there is a need for a flexible, resilient, easy-to-configure dispatch system for distributed edge computing platforms.
Current scheduling systems schedule according to producer throughput, consumer throughput, based on producer consumer model. In response to complex network systems, the scheduling system cannot efficiently schedule the producer's pending data to the consumer.
Disclosure of Invention
The embodiment of the invention provides a scheduling method and a scheduling device, which are used for solving the problem that a scheduling system in the prior art cannot effectively schedule data to be processed of a producer to a consumer.
In a first aspect, a scheduling method provided by an embodiment of the present invention includes:
receiving a scheduling request from a producer;
responding to the scheduling request, and determining M target weight values of M consumers according to N-level load information of the producer and N-level load information of each consumer in the M consumers, wherein each level of load information comprises one or more load attributes and load parameters corresponding to the load attributes;
and determining target consumers from the M consumers according to M target weight values of the M consumers, wherein M and N are integers greater than or equal to 2.
In an alternative implementation manner, the determining M target weight values of the M consumers according to the N-level load information of the producer and the N-level load information of each consumer of the M consumers includes:
For any one of the M consumers:
determining a K-th level weight value of the consumer according to the K-th level load information of the producer, the K-th level load information of the consumer and the K-1-th level weight value of the consumer, wherein K is an integer which is more than or equal to 2 and less than or equal to N, and the first level weight value of the consumer is determined according to the first level load information of the producer and the first level load information of the consumer;
and determining the target weight value of the consumer according to the first-level weight value to the Nth-level weight value.
In an alternative implementation, the first level weight value of the consumer is determined according to the first level load information of the producer and the first level load information of the consumer, including:
aiming at any load attribute in the first-stage load information, the load attribute is correspondingly provided with a basic weight; determining a section load value corresponding to the load attribute according to a first load parameter and/or a second load parameter, wherein the first load parameter is a load parameter corresponding to the load attribute in first-stage load information of the producer, and the second load parameter is a load parameter corresponding to the load attribute in first-stage load information of the consumer;
And determining the first-stage weight value of the consumer according to the interval load value and the basic weight corresponding to one or more load attributes in the first-stage load information.
In an optional implementation manner, the determining, according to the first load parameter and/or the second load parameter, the interval load value corresponding to the load attribute includes:
determining a target load parameter according to the first load parameter and/or the second load parameter;
and determining a first target interval to which the target load parameter belongs and an interval load value corresponding to the first target interval according to the target load parameter.
In an alternative implementation manner, the first load parameter is a data amount to be processed of the producer, the second load parameter is a data amount of data which has not been processed by the consumer, and the target load parameter is a sum of the data amount to be processed of the producer and the data amount of data which has not been processed by the consumer.
In an alternative implementation, the determining the K-th level weight value of the consumer according to the K-th level load information of the producer, the K-th level load information of the consumer, and the K-1-th level weight value of the consumer includes:
For any load attribute in the K-th level load information, determining an associated load value corresponding to the load attribute according to a third load parameter and/or a fourth load parameter, wherein the third load parameter is a load parameter corresponding to the load attribute in the K-th level load information of the producer, and the fourth load parameter is a load parameter corresponding to the load attribute in the K-th level load information of the consumer;
and determining the K-level weight value of the consumer according to the associated load value corresponding to one or more load attributes in the K-level load information and the interval load value corresponding to the K-1-level weight value.
In an optional implementation manner, the determining, according to the third load parameter and/or the fourth load parameter, an associated load value corresponding to the load attribute includes: determining the association degree according to the third load parameter and/or the fourth load parameter; and determining the association load value according to the association degree.
In an alternative implementation, the first level load information includes any one or more of machine load information, machine configuration information, data volume load information, machine health information, and number load information.
In an alternative implementation, the second level load information includes any one or more of machine room node load information, region load information, and operator load information.
In an alternative implementation manner, after the target consumer is determined from the M consumers, the method further includes:
and sending a scheduling response to the producer, wherein the scheduling response comprises an identification of the target consumer, and the identification of the target consumer is used for indicating the producer to send the data to be processed to the target consumer.
In the above technical solution, when receiving the scheduling request from the producer, the scheduling system does not schedule according to the producer yield and the consumer processing capability, but determines the target weight value corresponding to each consumer in the M consumers according to the N-level load information of the producer and the N-level load information of each consumer in the M consumers, and then determines the target consumer from the M consumers according to the target weight value corresponding to each consumer.
Further, the N-level load information at least includes first-level load information and second-level load information, where the first-level load information includes machine load information, machine configuration information, data volume load information, machine health information, number load information, and the second-level load information includes machine room node load information, regional load information, operator load information, and the like, and the scheduling system determines the target weight value of each consumer according to the load information, so as to help to improve accuracy of the target weight value of each consumer.
In an alternative implementation, the second load information is, for example, machine room node load information, region load information, operator load information, and the like.
(1) For the machine room node load information, the consumer and the producer are located in the same machine room node, the association load value between the machine room node load information of the consumer and the machine room node load information of the producer is minimum, and the dispatching system preferentially dispatches the data to be processed of the producer to the consumer belonging to the same machine room node as the producer.
(2) For the regional load information, the consumer and the producer are in the same region, the association load value between the regional load information of the consumer and the regional load information of the producer is minimum, and the dispatching system dispatches the data to be processed of the producer to the consumer belonging to the same region with the producer preferentially.
(3) For the carrier load information, the consumer and the producer belong to the same carrier, the association load value between the carrier load information of the consumer and the carrier load information of the producer is minimum, and the dispatching system dispatches the data to be processed of the producer to the consumer belonging to the same carrier with the producer preferentially.
(4) For machine load information, the consumer and the producer have the same type of server hardware, the association load value between the machine load information of the consumer and the machine load information of the producer is the smallest, and the dispatching system preferentially dispatches the data to be processed of the producer to the consumer of the producer with the same type of server hardware.
Based on the above, when determining the target consumer, the dispatching system takes the consumer with the same region, the same operator or the same machine room as the producer as the target consumer preferentially, so that the distance between the producer and the consumer is relatively short, namely, the demand of the producer on nearby dispatching is realized.
In a second aspect, an embodiment of the present invention provides a scheduling apparatus, including:
the receiving and transmitting module is used for receiving a scheduling request from a producer;
the processing module is used for responding to the scheduling request, and determining M target weight values of M consumers according to N-level load information of the producer and N-level load information of each consumer in the M consumers, wherein each level of load information comprises one or more load attributes and load parameters corresponding to the load attributes; and determining target consumers from the M consumers according to M target weight values of the M consumers, wherein M and N are integers greater than or equal to 2.
In an alternative implementation manner, the processing module is specifically configured to:
for any one of the M consumers:
determining a K-th level weight value of the consumer according to the K-th level load information of the producer, the K-th level load information of the consumer and the K-1-th level weight value of the consumer, wherein K is an integer which is more than or equal to 2 and less than or equal to N, and the first level weight value of the consumer is determined according to the first level load information of the producer and the first level load information of the consumer;
And determining the target weight value of the consumer according to the first-level weight value to the Nth-level weight value.
In an alternative implementation manner, the processing module is specifically configured to:
aiming at any load attribute in the first-stage load information, the load attribute is correspondingly provided with a basic weight; determining a section load value corresponding to the load attribute according to a first load parameter and/or a second load parameter, wherein the first load parameter is a load parameter corresponding to the load attribute in first-stage load information of the producer, and the second load parameter is a load parameter corresponding to the load attribute in first-stage load information of the consumer;
and determining the first-stage weight value of the consumer according to the interval load value and the basic weight corresponding to one or more load attributes in the first-stage load information.
In an alternative implementation manner, the processing module is specifically configured to:
determining a target load parameter according to the first load parameter and/or the second load parameter; and determining a first target interval to which the target load parameter belongs and an interval load value corresponding to the first target interval according to the target load parameter.
In an alternative implementation manner, the first load parameter is a data amount to be processed of the producer, the second load parameter is a data amount of data which has not been processed by the consumer, and the target load parameter is a sum of the data amount to be processed of the producer and the data amount of data which has not been processed by the consumer.
In an alternative implementation manner, the processing module is specifically configured to:
for any load attribute in the K-th level load information, determining an associated load value corresponding to the load attribute according to a third load parameter and/or a fourth load parameter, wherein the third load parameter is a load parameter corresponding to the load attribute in the K-th level load information of the producer, and the fourth load parameter is a load parameter corresponding to the load attribute in the K-th level load information of the consumer;
and determining the K-level weight value of the consumer according to the associated load value corresponding to one or more load attributes in the K-level load information and the interval load value corresponding to the K-1-level weight value.
In an alternative implementation manner, the processing module is specifically configured to:
determining the association degree according to the third load parameter and/or the fourth load parameter; and determining the association load value according to the association degree.
In an alternative implementation, the first level load information includes any one or more of machine load information, machine configuration information, data volume load information, machine health information, and number load information.
In an alternative implementation, the second level load information includes any one or more of machine room node load information, region load information, and operator load information.
In an alternative implementation, the processing module is further configured to:
and controlling the transceiver module to send a scheduling response to the producer, wherein the scheduling response comprises an identifier of the target consumer, and the identifier of the target consumer is used for indicating the producer to send the data to be processed to the target consumer.
In a third aspect, the present application provides a scheduling system comprising one or more modules or units or means (means) corresponding to the method of the first aspect or any optional implementation manner of the first aspect.
In a fourth aspect, the present application provides a computer readable storage medium having stored therein a computer program or instructions which, when executed by a computing device, cause the computing device to perform the method of the first aspect or any of the alternative implementations of the first aspect.
In a fifth aspect, the present application provides a computer program product comprising a computer program or instructions which, when executed by a computing device, implement the method of the first aspect or any of the alternative implementations of the first aspect.
In a sixth aspect, the present application provides a chip comprising at least one processor and an interface;
the interface is used for providing program instructions or data for the at least one processor;
the at least one processor is configured to execute the program line instructions to implement the method of the first aspect or any optional implementation of the first aspect.
In a seventh aspect, the present application provides a computing device comprising a processor, the processor being connected to a memory for storing a computer program, the processor being for executing the computer program stored in the memory to cause the computing device to perform the method of the first aspect or any alternative implementation of the first aspect.
The technical effects achieved by any one of the second aspect to the seventh aspect may be referred to the description of the beneficial effects in the first aspect, and the detailed description is not repeated here.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 (a) is a schematic diagram of a system architecture according to an embodiment of the present invention;
fig. 1 (b) is a schematic diagram of a system architecture in a specific scenario provided by an embodiment of the present invention;
FIG. 1 (c) is a schematic diagram of a system architecture in another specific scenario provided by an embodiment of the present invention;
fig. 2 is a schematic flow chart of a scheduling method according to an embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for determining a target weight value of a consumer according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for determining an associated load value according to an embodiment of the present invention;
fig. 5 is a flow chart of another scheduling method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a scheduling apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a scheduling apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 (a) exemplarily illustrates a system architecture to which the scheduling method provided by the embodiment of the present invention is applied, where the system architecture may include one or more producers, one or more consumers, and one or more scheduling systems. The number of producers, the number of consumers, and the number of dispatch systems shown in FIG. 1 (a) are exemplary only and not limiting of the present application.
In an alternative implementation, the producer refers to a computing device for generating data to be processed and the consumer refers to a computing device for caching or processing data to be processed. The producer and the consumer do not communicate directly, but communicate through the queue, specifically, the data to be processed produced by the producer is sent to the queue, and the consumer reads the data to be processed from the queue and processes the data. In this way, balancing the processing power of the producer and consumer is facilitated.
In this application, a producer may be understood to be a computing device, computer, server, machine, device, etc. A consumer may be understood to be a computing device, computer, server, machine, device, etc.
For any producer, the producer sends a request to be processed, the producer requests a target consumer path to a dispatching system according to the request data amount in the request to be processed, the dispatching system responds to the request to be processed, the dispatching system determines a target consumer from one or more consumers, and then informs the producer of the identification of the target consumer, such as the IP of the target consumer, so that the producer sends the data to be processed to the target consumer according to the IP, and accordingly, the target consumer processes the data from the producer.
As shown in fig. 1 (b) which is a system architecture diagram of a specific application scenario, an exemplary producer may be a user device, and a consumer may be a cache server. The user equipment may generate cache data, and request the target cache server from the scheduling system according to the cache data. Accordingly, the scheduling system determines a target cache server suitable for the user equipment from the one or more cache servers for caching the data of the user equipment.
As shown in fig. 1 (c) which is a system architecture diagram of another specific application scenario, an exemplary producer may be a cache server, and a consumer may be a log processing server. The cache server may request the target log processing server from the dispatch system based on data in the cache, such as user usage data, link monitoring data, server operation data, and the like. Correspondingly, the scheduling system determines a target log processing server suitable for the cache server from one or more log processing servers, and is used for analyzing and processing data in the cache server, so that tracking and statistics of the running state and the link state of the cache server are realized.
The foregoing are only two application scenarios exemplarily shown in the present application, and the present application may also be applicable to other application scenarios, which are not listed one by one.
In connection with the above description, fig. 2 is an exemplary scheduling method provided herein, which may be specifically implemented by a producer, a scheduling system, and a target consumer, where the producer in the method may be any one of one or more producers as shown in fig. 1 (a), and the target consumer in the method may be any one of one or more consumers as shown in fig. 1 (a).
Step 201, a producer sends a scheduling request to a scheduling system.
And the producer generates data to be processed, and sends a scheduling request to a scheduling system according to the data to be processed, wherein the scheduling request is used for indicating the scheduling system to determine a target consumer from M consumers, and M is an integer greater than or equal to 2.
The scheduling request may include the data amount of the data to be processed of the producer.
In one example, the dispatch system may have M customers connected thereto, M being an integer greater than or equal to 2, from which the dispatch system may determine the target customer.
In another example, the scheduling system may be connected with J (J is an integer greater than M) consumers, where the J consumers include M consumers corresponding to the producer, the scheduling system is configured with identification information of the M consumers, and the scheduling system may determine the target consumer from the M consumers.
In step 202, the scheduling system determines M target weight values of M consumers according to the N-level load information of the producer and the N-level load information of each of the M consumers in response to the scheduling request.
In one alternative, the producer corresponds to N levels of load information, and for any one of the M consumers, the consumer likewise corresponds to N levels of load information, N being an integer greater than or equal to 2.
Each level of load information comprises one or more load information, wherein each load information further comprises a load attribute and a load parameter corresponding to the load attribute. The plurality of load information is used for indicating the load condition of the consumer or the producer, thereby being beneficial to realizing that the scheduling system schedules the pending request of the producer to the consumer with lower load or more matched with the producer.
Taking the producer as an example, a plurality of load information of the producer may be predetermined, where each of the plurality of load information includes a load attribute and a load parameter.
For example, according to the data amount to be processed of the producer, determining data amount load information, wherein the data amount load information comprises data amount attributes and the data amount of the data to be processed;
for another example, according to the machine room node where the producer is located, determining machine room node load information, wherein the machine room node load information comprises machine room node attribute and machine room node identification information;
for another example, the region load information is determined according to the region where the producer is located, wherein the region load information includes region attribute and region identification information.
The consumer's N-level load information is similar and will not be described in detail.
In an alternative way, the first level of load information in the N levels of load information is independent load information, which is interpreted as that there is no correlation between the load information of the producer and the load information of the consumer, corresponding to the same load attribute.
In an alternative manner, the first level load information may include machine load information, machine configuration information, data volume load information, machine health information, number load information, and the like, which are described as follows:
(1) The machine load information may include CPU load information, memory load information, IO corresponding network conditions, and the like.
(2) Machine configuration information such as service configuration parameters of the current machine, such as data filtering parameters, data processing parameters, etc.
(3) The data volume loading information, such as the data volume loading information of the current production data of the producer, or the data volume loading information of the current data to be processed of the consumer, can be understood as machine data digestion information, wherein the machine data digestion information is used for indicating the current capability of the consumer to process the data, or the machine data digestion information is used for indicating the accumulation degree of the current data of the consumer.
(4) Machine health information such as the current machine's heart beat index, restart conditions, system anomalies, etc.
(5) The digital load information is used to indicate the number of producers a consumer can process, or to indicate that the consumer can process data to be processed from several producers.
The data amount load information and the data number load information are described below as examples.
The data volume load information comprises data volume attributes and data volume of data to be processed. The data volume load information of the producer is determined by the data volume of the data to be processed in the producer, the data volume load information of the consumer is determined by the data volume of the data which is not processed in the consumer, and no correlation exists between the data volume load information of the producer and the data volume load information of the consumer. The data volume load information is used to indicate the processing pressure of the consumer to process the producer's data to be processed.
The number load information comprises a number attribute and a number. It is explained that each consumer may be configured with the maximum number of correspondences of producers, which may also be referred to as consumer's number load information, and likewise, each producer may be configured with the maximum number of correspondences of consumers, which may also be referred to as producer's number load information. Wherein the number load information of the consumers and the number load information of the producers are not related. It should be noted that only the consumer's number load information or only the producer's number load information may be provided.
Further, for any load information of the first stage, a plurality of sections corresponding to the load information and section load values corresponding to each section may be preset.
For example, as for the data amount load information, a correspondence relationship as in table 1 may be set, wherein table 1 is only exemplary and is not limiting to the present application.
For example, in table 1, the scheduling system determines the target load parameter based on the producer's data volume load information and the consumer's data volume load information. If the target load parameter is in the interval 1, the interval load value corresponding to the data amount load information (or the target load parameter) is m1.
TABLE 1
Interval of | Interval load value | |
Interval 1 | [T0-T1) | m1 |
Interval 2 | [T1-T2) | m2 |
Interval 3 | [T2-T3) | m3 |
For the load information of the first stage, a basic weight corresponding to each load information may be preset, and for example, the basic weight corresponding to each load information may be shown in table 2, where the basic weight corresponding to each load information may be determined according to experience or requirements, and the values of the basic weights corresponding to each load information may be the same or different. Table 2 is only exemplary and is not limiting of the present application.
For example, load information 1 includes load attribute 1 and load parameter 1, where load attribute 1 corresponds to base weight 1. For another example, load information 2 includes load attribute 2 and load parameter 2, where load attribute 2 corresponds to base weight 2.
TABLE 2
Load information | Load attributes | Load parameter | Basis weight |
Load information 1 | Load attribute 1 | Load parameter 1 | Basis weight 1 |
Load information 2 | Load attribute 1 | Load parameter 1 | Basis weight 2 |
…… | …… | …… | …… |
Load information i | Load attribute i | Load parameter i | Basis weight i |
In an alternative manner, the second level of load information in the N level of load information is associated load information, which is interpreted as that load information corresponding to the same load attribute, and the load information of the producer and the load information of the consumer are associated with each other.
In an alternative manner, the second level load information may include machine room node load information, regional load information, operator load information, and the like. The description is as follows:
the machine room node load information comprises machine room node attributes and machine room node identification information. The producer and the consumer can be disposed in the same machine room node, that is, the machine room node identification information of the producer is the same as the machine room node identification information of the consumer. Or the producer and the consumer may be disposed in different machine room nodes, that is, the machine room node identification information of the producer and the machine room node identification information of the consumer are different.
The region load information includes region attribute and region identification information. The producer and the consumer may be disposed in the same region, i.e., the region identification information of the producer and the region identification information of the consumer are the same. Or the producer and consumer may be disposed in different regions, i.e., the producer's region identification information and the consumer's region identification information are different. The regions are here, for example, different regions according to provincial division, and are, for example, different regions according to urban division.
The carrier load information includes carrier attribute and carrier identification information. The producer and the consumer may belong to the same operator, i.e. the operator identification information of the producer and the operator identification information of the consumer are the same. Or the producer and the consumer belong to different operators, i.e. the operator identification information of the producer and the operator identification information of the consumer are different. The operator identification information here is, for example, an identification corresponding to each operator manufacturer.
In addition, the second level load information may further include machine load information, such as CPU load information, memory load information, IO corresponding network conditions, network load information, disk load information, and the like. The machine load information is used by the dispatch system to determine from one or more consumers that the machine load information can reach a target consumer requested by the producer.
Taking CPU load information as an example, when the producer generates data to be processed, a requirement for the consumer's CPU type may be included in the scheduling request. Accordingly, the scheduling system determines the consumer conforming to the CPU type based on the CPU type in the scheduling request as the target consumer.
In an alternative manner, for any load information of the second level, a plurality of corresponding relations may be preset according to the association degree (or referred to as association degree) between the load information of the producer and the load information of the consumer, and each corresponding relation includes the association degree and an associated load value corresponding to the association degree.
By way of example, the degree of association may include a perfect match, a partial match, and a perfect mismatch, where the perfect match, the partial match, and the perfect mismatch correspond to associated load values n1, n2, and n3, respectively, where n1 is less than n2, and n2 is less than n3. I.e. the more correlated the two, the lower the value of the correlated load between the two. When determining the target consumer, the scheduling system can determine the consumer with lower association load value with the producer as the target consumer.
In an alternative manner, for any load information of the second stage, a plurality of intervals corresponding to the load information and interval load values corresponding to each interval may be preset. Exemplary, as in table 3, wherein table 3 is only exemplary, and not limiting of the present application.
The interval load value is different from an interval load value corresponding to any one of the first-stage load information, wherein the interval load value is determined by a first-stage weight value, and the first-stage weight value can be determined by the scheduling system according to the first-stage load information of the producer and the first-stage load information of the consumer.
For example, if the first level weight value is in interval 4, then the first level weight value corresponds to an interval load value of m4. If the first-stage weight value is in interval 5, the first-stage weight value corresponds to an interval load value of m5.
TABLE 3 Table 3
Interval of | Interval load value | |
Interval 4 | [T4-T5) | m4 |
Interval 5 | [T5-T6) | m5 |
Interval 6 | [T6-T7) | m6 |
For any one of the M consumers, the scheduling system determines a target weight value corresponding to the consumer according to the N-level load information of the producer and the N-level load information of the consumer. Thereby obtaining the target weight values corresponding to the M consumers respectively.
In an alternative manner, when determining the target weight value corresponding to any consumer, the scheduling system may specifically determine the first-level weight value of the consumer according to the first-level load information of the producer and the first-level load information of the consumer. The scheduling system determines the second-level weight value of the consumer according to the second-level load information of the producer, the second-level load information of the consumer and the first-level weight value of the consumer. Similarly, the scheduling system determines the K-th level weight value of the consumer according to the K-th level load information of the producer, the K-th level load information of the consumer and the K-1-th level weight value of the consumer, wherein K is an integer greater than or equal to 2 and less than or equal to N. Until the nth level weight value of the consumer is determined.
The scheduling system then determines the target weight value of the consumer according to the first level weight value, the second level weight value, … …, and the nth level weight value. For example, the product of the first level weight value, the second level weight value, … …, and the nth level weight value may be taken as the target weight value of the consumer.
The implementation of the scheduling system to determine the target weight value for a consumer is described in detail below for that consumer. See in particular the flow chart as exemplarily shown in fig. 3.
In step 301, the scheduling system determines a first level weight value for the consumer.
One or more load information may be included in the first level load information, as described in the following case.
Case one: the first stage load information includes a load information.
The method is equivalent to that the producer corresponds to first-level load information, the consumer corresponds to first-level load information, and the first-level load information corresponding to the producer and the consumer have the same load attribute.
The scheduling system may determine the first level weight value for the consumer based on the first level load information for the producer and the first level load information for the consumer.
In an alternative manner, the first level load information of the producer includes a load attribute of the producer and a load parameter of the producer (referred to as a first load parameter). The first level load information of the consumer includes a load attribute of the consumer and a load parameter of the consumer (referred to as a second load parameter). Wherein the producer's load attribute is the same as the consumer's load attribute. The first-stage load information corresponds to a plurality of intervals and each interval corresponds to a respective interval load value.
The scheduling system determines a target load parameter according to the first load parameter and/or the second load parameter. And then determining a first target interval to which the target load parameter belongs and an interval load value corresponding to the first target interval according to the target load parameter, a plurality of intervals corresponding to the first-stage load information and interval load values corresponding to each interval. Further, the scheduling system may determine a first level weight value of the consumer from the interval load value corresponding to the first target interval.
Taking the data volume loading information as an example, the data volume loading information of the producer includes the data volume attribute of the producer and the data volume (called a first loading parameter) of the data to be processed of the producer. The data volume load information of the consumer includes a data volume attribute of the consumer and a data volume of unprocessed data of the consumer (referred to as a second load parameter).
The scheduling system determines a target load parameter according to the data amount of the data to be processed of the producer and the data amount of the data not yet processed of the consumer, and may, for example, take the sum of the data amount of the data to be processed of the producer and the data amount of the data not yet processed of the consumer as the target load parameter.
Then, the scheduling system determines a first target interval to which the target load parameter belongs, and in combination with table 1, for example, if the target load parameter falls in interval 1, then the scheduling system determines that the first target interval to which the target load parameter belongs is interval 1, and the corresponding interval load value is m1.
In one example, the scheduling system may take the interval load value m1 as the first level weight value of the consumer.
In yet another example, the scheduling system may take the product of the interval load value and the base weight corresponding to the load information as the first level weight value of the consumer.
In yet another example, the scheduling system may take the product of the interval load value, the base weight corresponding to the load information, and the target load parameter as the first level weight value of the consumer.
Here, it is to be added that the scheduling system may obtain the data amount of the data to be processed of the producer from the scheduling request of the producer.
In addition, the scheduling system may further obtain, from each of the M consumers, a data amount of unprocessed data corresponding to the consumer. In an alternative manner, the scheduling system may send, to each of the M consumers, an acquisition request for requesting a data amount of unprocessed data of each consumer in response to a scheduling request of the producer, and in particular, the scheduling system may send the acquisition request to each consumer in a broadcast manner or in a unicast manner. Alternatively, each of the M consumers may send the amount of data that it has not currently processed to the dispatch system at a preset period.
And a second case: the first-stage load information includes a plurality of load information.
The scheduling system can determine the interval load value corresponding to the first-level load information according to each first-level load information. And then the dispatching system determines the first-stage weight value of the consumer according to the interval load value corresponding to each first-stage load information.
In a specific alternative manner, the scheduling system may determine the first-level weight value of the consumer according to the interval load value corresponding to each first-level load information, in combination with the base weight corresponding to each first-level load information (or load attribute).
Illustratively, referring to the example as in Table 2, the first level weight value may be determined based on the following relationship:
(interval load value 1 x base weight 1+ interval load value 2 x base weight 2+ … … interval load value i x base weight i)/(base weight 1+ base weight 2+ … … base weight i).
For example, the first-stage load information includes two load information, namely, a number load information and a data volume load information.
For the interval load value corresponding to the data amount load information, reference is made to the description in the above embodiment.
For the interval load value corresponding to the number load information, the scheduling system can determine the target interval to which the number load information belongs according to the load parameter in the number load information of the consumer, and then determine the interval load value corresponding to the target interval.
The dispatching system determines the first-stage weight value of the consumer according to the basic weight and the interval load value corresponding to the data volume load information and the basic weight and the interval load value corresponding to the data volume load information.
In step 302, the scheduling system determines a second level weight value for the consumer.
Specifically, the scheduling system determines a second-level weight value of the consumer according to the first-level load information of the producer, the first-level load information of the consumer, and the first-level weight value of the consumer.
The second level of load information may include one or more load information therein, as described in the following.
Case 1: the second level of load information includes a load information.
The method is equivalent to that the producer corresponds to second-level load information, the consumer corresponds to second-level load information, and the second-level load information corresponding to the producer and the consumer have the same load attribute.
In an alternative, the second level load information of the producer includes a load attribute of the producer and a load parameter of the producer (referred to as a third load parameter). The second level load information of the consumer includes a load attribute of the consumer and a load parameter of the consumer (referred to as a fourth load parameter). Wherein the producer's load attribute is the same as the consumer's load attribute.
The scheduling system determines the association degree of the third load parameter and the fourth load parameter according to the third load parameter and the fourth load parameter, and then determines the association load value between the third load parameter and the fourth load parameter according to the association degree of the third load parameter and the fourth load parameter.
For example, an association operator may be preset, where the association operator includes three sub-association operators, and the three sub-association operators respectively correspond to complete matching, partial matching, and complete non-matching. The three sub-correlation operators are used to indicate a correlated load value between the third load parameter and the fourth load parameter.
See in particular the flow chart shown in fig. 4:
step 401, the scheduling system inputs the third load parameter and the fourth load parameter as input parameters into the first sub-correlation operator, and if the first sub-correlation operator hits, the first sub-correlation operator outputs as a correlation load value n1; if the first sub-associative operator does not hit, then step 402 is performed;
step 402, the scheduling system inputs the third load parameter and the fourth load parameter as input parameters into the second sub-correlation operator, and if the second sub-correlation operator hits, the second sub-correlation operator outputs as a correlation load value n2; if the second sub-associative operator does not hit, then step 403 is performed;
in step 403, the scheduling system inputs the third load parameter and the fourth load parameter as input parameters to the third sub-association operator, and outputs the third load parameter and the fourth load parameter as an association load value n3.
Further, the scheduling system determines a second target interval to which the first level weight value belongs and an interval load value corresponding to the second target interval according to the first level weight value and combining a plurality of intervals corresponding to the second level load information and interval load values corresponding to each interval. In connection with the example shown in table 3, if the first level weight value is in interval 4, then the first level weight value corresponds to an interval load value m4.
The scheduling system may determine a second level weight value of the second level load information according to the interval load value corresponding to the first level weight value and the associated load value of the second level load information. In the above example, for example, the associated load value of the second-level load information is n1, the first-level weight value corresponds to the interval load value m4, and the scheduling system may determine that the second-level weight value corresponding to the second-level load information is n1×m4.
Case 2: the second level of load information includes a plurality of load information.
The scheduling system can determine the associated load value corresponding to each second-level load information corresponding to the producer and the consumer. And then the scheduling system determines the second-level weight value of the consumer according to the associated load value corresponding to each second-level load information and the interval load value corresponding to the first-level weight value.
In a specific alternative manner, for any second-level load information, the scheduling system may use a product of an associated load value corresponding to the second-level load information and an interval load value corresponding to the first-level weight value as the second-level weight value corresponding to the second-level load information. Thereby obtaining each second-level load information corresponding to a respective second-level weight value. The scheduling system takes the product of the second-level weight values corresponding to each second-level load information as the second-level weight value of the consumer.
Here, it should be noted that the second level load information of the producer, such as the machine room node load information, the regional load information, the operator load information, and the like of the producer, may be preconfigured in the scheduling system. In addition, the producer can also carry the second-level load information in the scheduling request and send the second-level load information to the scheduling system. The present application is not limited. The description is equally applicable to the first-level load information of the producer, such as machine load information, machine configuration information, number load information, and the like.
Similarly, the second level load information of each consumer, such as the machine room node load information, the regional load information, the operator load information, and the like of the consumer, may be preconfigured in the scheduling system. In addition, each consumer may also be sent to the dispatch system in response to an acquisition request from the dispatch system. The present application is not limited. The description is equally applicable to the first level load information of the consumer, such as machine load information, machine configuration information, number load information, and the like.
In step 303, the scheduling system determines the K-th level weight value for the consumer.
Specifically, the scheduling system determines the kth level weight value of the consumer according to the kth-1 level load information of the producer, the kth level load information of the consumer, and the kth level weight value of the consumer, which is described in step 302, and the implementation manner of determining the second level weight value of the consumer by the scheduling system is not repeated here.
In step 304, the scheduling system determines a target weight value for the consumer.
In an alternative manner, the scheduling system determines the target weight value of the consumer according to the first level weight value, the second level weight value, … …, and the nth level weight value.
For example, the product of the first level weight value, the second level weight value, … …, and the nth level weight value may be taken as the target weight value of the consumer. Alternatively, the sum of the first-level weight value, the second-level weight value, … … and the nth-level weight value may be used as the target weight value of the consumer.
In step 203, the scheduling system determines a target consumer from the M consumers according to the M target weight values of the M consumers.
In this implementation, the M consumers and the M target weight values are in a one-to-one correspondence.
The scheduling system may select, from the M consumers, a consumer having a lowest corresponding target weight value as the target consumer according to the M target weight values respectively corresponding to the M consumers.
Or the scheduling system may further select, from the M consumers, a consumer whose corresponding target weight value is smaller than a preset weight value as the target consumer.
At step 204, the dispatch system sends a dispatch response to the producer.
The dispatch response includes an identification of the target consumer, which may be, for example, the IP address of the target consumer.
In step 205, the producer determines a target consumer path according to the identification of the target consumer included in the dispatch response, and sends the data to be processed to the target consumer. Accordingly, the target consumer receives and processes the data to be processed.
Another scheduling method, as exemplarily provided in the present application, may be specifically implemented by a producer, a scheduling system, and a target consumer, where the producer in the method may be any one of the one or more producers shown in fig. 1 (a), and the target consumer in the method may be any one of the one or more consumers shown in fig. 1 (a).
Step 501, a producer requests a target consumer from a dispatch system;
step 502, the scheduling system traverses M consumers, and specifically performs steps 503 to 506 for each of the M consumers.
In step 503, the scheduling system calculates a first level weight value for the consumer.
At step 504, the scheduling system calculates a second level weight value for the consumer.
In step 505, the scheduling system calculates an nth level weight value for the consumer.
In step 506, the scheduling system calculates a target weight value for the consumer.
In step 507, the scheduling system determines, according to the M target weight values of the M consumers, the consumer corresponding to the lowest target weight value as the target consumer.
At step 508, the dispatch system sends the producer an identification of the target consumer.
Step 509, the producer sends the pending data to the target consumer.
The implementation manner of the step 501 to the step 509 may be specifically described in the related method embodiments of fig. 2 to 4, and will not be described herein.
For a better explanation of the embodiments of the present application, an example in one specific scenario is provided below.
The first-stage load information is data volume load information, wherein the data volume of data to be processed of a producer is P1, the data volume of data which is not processed in a consumer is U1, and a scheduling system determines that a target load parameter corresponding to the data volume load information is P1+U1.
Further, the basic weight corresponding to the data amount load information is L1, the interval corresponding to the data amount load information and the interval load value corresponding to the interval are shown in table 1, and the scheduling system determines that the target load parameter falls in the interval 1, and the corresponding interval load value is m1.
The scheduling system further determines that the first-stage weight value is the product of the base weight L1, the interval load value m1, and the target load parameter (p1+u1), which may be expressed as (p1+u1) ×l1×m1.
The second-level load information is regional load information, wherein the regional identification information of the producer is N1, the regional identification information of the consumer is N2, and the scheduling system determines an associated load value L2 between N1 and N2.
Further, the section corresponding to the regional load information and the section load value corresponding to the section are shown in table 3, and the scheduling system determines that the first-level weight value falls in the section 4 shown in table 3, and the corresponding section load value is m4.
The scheduling system further determines that the second level weight value is the product of the associated load value L2 and the interval load value m4, which may be denoted as l2×m4.
The scheduling system determines the target load value of the consumer as the product of the first level weight value and the second level weight value, which may be expressed as [ (p1+u1) ×l1×m1] × [ l2×m4].
It should be added that, in the embodiment of the present application, fault load information of a consumer may also be set, if the consumer is in a normal state, load parameters in the fault load information are set to be smaller, if the consumer is in an abnormal state, load parameters in the fault load information are set to be larger, and when determining a target weight value of each consumer, the scheduling system may exclude the consumer in the abnormal state, so as to avoid scheduling data to be processed of the producer to the consumer in the abnormal state.
In the above technical solution, when receiving the scheduling request from the producer, the scheduling system does not schedule according to the producer yield and the consumer processing capability, but determines the target weight value corresponding to each consumer in the M consumers according to the N-level load information of the producer and the N-level load information of each consumer in the M consumers, and then determines the target consumer from the M consumers according to the target weight value corresponding to each consumer.
Further, the N-level load information at least includes first-level load information and second-level load information, where the first-level load information includes machine load information, machine configuration information, data volume load information, machine health information, number load information, and the second-level load information includes machine room node load information, regional load information, operator load information, and the like, and the scheduling system determines the target weight value of each consumer according to the load information, so as to help to improve accuracy of the target weight value of each consumer.
It should be noted that, in step 302, the second load information is, for example, machine room node load information, regional load information, operator load information, and the like.
(1) For the machine room node load information, the consumer and the producer are located in the same machine room node, the association load value between the machine room node load information of the consumer and the machine room node load information of the producer is minimum, and the dispatching system preferentially dispatches the data to be processed of the producer to the consumer belonging to the same machine room node as the producer.
(2) For the regional load information, the consumer and the producer are in the same region, the association load value between the regional load information of the consumer and the regional load information of the producer is minimum, and the dispatching system dispatches the data to be processed of the producer to the consumer belonging to the same region with the producer preferentially.
(3) For the carrier load information, the consumer and the producer belong to the same carrier, the association load value between the carrier load information of the consumer and the carrier load information of the producer is minimum, and the dispatching system dispatches the data to be processed of the producer to the consumer belonging to the same carrier with the producer preferentially.
(4) For machine load information, the consumer and the producer have the same type of server hardware, the association load value between the machine load information of the consumer and the machine load information of the producer is the smallest, and the dispatching system preferentially dispatches the data to be processed of the producer to the consumer of the producer with the same type of server hardware.
Based on the above, when determining the target consumer, the dispatching system takes the consumer with the same region, the same operator or the same machine room as the producer as the target consumer preferentially, so that the distance between the producer and the consumer is relatively short, namely, the demand of the producer on nearby dispatching is realized.
The various embodiments described herein may be separate solutions or may be combined according to inherent logic, which fall within the scope of the present application.
It will be appreciated that in the various method embodiments described above, the methods and operations implemented by the scheduling system may also be implemented by components (e.g., chips or circuits) available to the scheduling system.
In the embodiments provided in the present application, the methods provided in the embodiments of the present application are described from the perspective of interaction between the respective devices. In order to implement the functions in the method provided in the embodiment of the present application, the scheduling system may include a hardware structure and/or a software module, where the functions are implemented in the form of a hardware structure, a software module, or a hardware structure plus a software module. Some of the functions described above are performed in a hardware configuration, a software module, or a combination of hardware and software modules, depending on the specific application of the solution and design constraints.
The division of the modules in the embodiment of the present application is schematic, which is merely a logic function division, and other division manners may be implemented in practice. In addition, each functional module in the embodiments of the present application may be integrated in one processor, or may exist alone physically, or two or more modules may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules.
Based on the above and the same conception, fig. 6 and 7 are schematic structural diagrams of possible devices provided in the present application. These devices may be used to implement the functions of the scheduling system in the above method embodiments, and thus may also implement the benefits provided by the above method embodiments.
In this application, the apparatus may be a scheduling system as shown in fig. 1 (a) or fig. 1 (b) or fig. 1 (c), and may also be a module (e.g. a chip) applied in the scheduling system.
As shown in fig. 6, the apparatus includes a transceiver module 601 and a processing module 602.
A transceiver module 601, configured to receive a scheduling request from a producer;
the processing module 602 is configured to determine M target weight values of M consumers according to the N-level load information of the producer and the N-level load information of each consumer in the M consumers in response to the scheduling request, where each level of load information includes one or more load attributes and load parameters corresponding to each load attribute; and determining target consumers from the M consumers according to M target weight values of the M consumers, wherein M and N are integers greater than or equal to 2.
In an alternative implementation, the processing module 602 is specifically configured to:
for any one of the M consumers:
determining a K-th level weight value of the consumer according to the K-th level load information of the producer, the K-th level load information of the consumer and the K-1-th level weight value of the consumer, wherein K is an integer which is more than or equal to 2 and less than or equal to N, and the first level weight value of the consumer is determined according to the first level load information of the producer and the first level load information of the consumer;
and determining the target weight value of the consumer according to the first-level weight value to the Nth-level weight value.
In an alternative implementation, the processing module 602 is specifically configured to:
aiming at any load attribute in the first-stage load information, the load attribute is correspondingly provided with a basic weight; determining a section load value corresponding to the load attribute according to a first load parameter and/or a second load parameter, wherein the first load parameter is a load parameter corresponding to the load attribute in first-stage load information of the producer, and the second load parameter is a load parameter corresponding to the load attribute in first-stage load information of the consumer;
And determining the first-stage weight value of the consumer according to the interval load value and the basic weight corresponding to one or more load attributes in the first-stage load information.
In an alternative implementation, the processing module 602 is specifically configured to:
determining a target load parameter according to the first load parameter and/or the second load parameter; and determining a first target interval to which the target load parameter belongs and an interval load value corresponding to the first target interval according to the target load parameter.
In an alternative implementation manner, the first load parameter is a data amount to be processed of the producer, the second load parameter is a data amount of data which has not been processed by the consumer, and the target load parameter is a sum of the data amount to be processed of the producer and the data amount of data which has not been processed by the consumer.
In an alternative implementation, the processing module 602 is specifically configured to:
for any load attribute in the K-th level load information, determining an associated load value corresponding to the load attribute according to a third load parameter and/or a fourth load parameter, wherein the third load parameter is a load parameter corresponding to the load attribute in the K-th level load information of the producer, and the fourth load parameter is a load parameter corresponding to the load attribute in the K-th level load information of the consumer;
And determining the K-level weight value of the consumer according to the associated load value corresponding to one or more load attributes in the K-level load information and the interval load value corresponding to the K-1-level weight value.
In an alternative implementation, the processing module 602 is specifically configured to:
determining the association degree according to the third load parameter and/or the fourth load parameter; and determining the association load value according to the association degree.
In an alternative implementation, the first level load information includes any one or more of machine load information, machine configuration information, data volume load information, machine health information, and number load information.
In an alternative implementation, the second level load information includes any one or more of machine room node load information, region load information, and operator load information.
In an alternative implementation, the processing module 602 is further configured to:
the transceiver module 601 is controlled to send a scheduling response to the producer, wherein the scheduling response comprises an identifier of the target consumer, and the identifier of the target consumer is used for indicating the producer to send data to be processed to the target consumer.
As shown in fig. 7, an apparatus 700 provided in an embodiment of the present application, where the apparatus shown in fig. 7 may be an implementation of a hardware circuit of the apparatus shown in fig. 6. The device can be applied to the flow chart shown above to execute the functions of the scheduling system in the above method embodiment.
For ease of illustration, fig. 7 shows only the main components of the device.
The apparatus 700 shown in fig. 7 comprises a communication interface 710, a processor 720 and a memory 730, wherein the memory 730 is used for storing program instructions and/or data. Processor 720 may operate in conjunction with memory 730. Processor 720 may execute program instructions stored in memory 730. The processor 720 is configured to perform the operations performed by the processing module 602 in the above embodiment, and the communication interface 710 is configured to perform the operations performed by the transceiver module 601 in the above embodiment when the instructions or programs stored in the memory 730 are executed.
In embodiments of the present application, the communication interface may be a transceiver, a circuit, a bus, a module, or other type of communication interface. In the embodiment of the application, when the communication interface is a transceiver, the transceiver may include a stand-alone receiver and a stand-alone transmitter; a transceiver integrating the transceiving function, or a communication interface, is also possible.
The apparatus 700 may also include a communication line 740. Wherein the communication interface 710, the processor 720 and the memory 730 may be connected to each other through a communication line 740; the communication line 740 may be a Peripheral Component Interconnect (PCI) bus, an extended industry standard architecture (extended industry standard architecture, EISA) bus, or the like. The communication lines 740 may be divided into address buses, data buses, control buses, etc. For ease of illustration, only one thick line is shown in fig. 7, but not only one bus or one type of bus.
Based on the foregoing and the same, the present application provides a scheduling system, which includes one or more modules or units or means (means) corresponding to the relevant methods in the above-described method embodiments.
Based on the foregoing and the same, this application provides a computer-readable storage medium having stored therein a computer program or instructions which, when executed by a computing device, cause the computing device to perform the relevant method of the method embodiments described above.
Based on the foregoing and the same, this application provides a computer program product comprising a computer program or instructions which, when executed by a computing device, implement the relevant methods of the method embodiments described above.
Based on the foregoing and the same, the present application provides a chip comprising at least one processor and an interface; the interface is used for providing program instructions or data for the at least one processor; the at least one processor is configured to execute the program line instructions to perform the methods associated with the method embodiments described above.
Based on the foregoing and the same, this application provides a computing device comprising a processor coupled to a memory for storing a computer program, the processor for executing the computer program stored in the memory, to cause the computing device to perform the relevant method of the method embodiments described above.
In the present application, "at least one" means one or more, and "a plurality" means two or more. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b or c may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. In the text description of the present application, the character "/", generally indicates that the associated object is an or relationship; in the formulas of the present application, the character "/" indicates that the front and rear associated objects are a "division" relationship.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
Claims (11)
1. A scheduling method, comprising:
receiving a scheduling request from a producer;
Responding to the scheduling request, and determining M target weight values of M consumers according to N-level load information of the producer and N-level load information of each consumer in the M consumers, wherein each level of load information comprises one or more load attributes and load parameters corresponding to the load attributes;
determining target consumers from the M consumers according to M target weight values of the M consumers, wherein M and N are integers greater than or equal to 2;
the determining M target weight values of the M consumers according to the N-level load information of the producer and the N-level load information of each consumer in the M consumers includes:
for any one of the M consumers:
determining a K-th level weight value of the consumer according to the K-th level load information of the producer, the K-th level load information of the consumer and the K-1-th level weight value of the consumer, wherein K is an integer which is more than or equal to 2 and less than or equal to N, and the first level weight value of the consumer is determined according to the first level load information of the producer and the first level load information of the consumer;
and determining the target weight value of the consumer according to the first-level weight value to the Nth-level weight value.
2. The method of claim 1, wherein the first level weight value of the consumer is determined from first level load information of the producer and first level load information of the consumer, comprising:
aiming at any load attribute in the first-stage load information, the load attribute is correspondingly provided with a basic weight; determining a section load value corresponding to the load attribute according to a first load parameter and/or a second load parameter, wherein the first load parameter is a load parameter corresponding to the load attribute in first-stage load information of the producer, and the second load parameter is a load parameter corresponding to the load attribute in first-stage load information of the consumer;
and determining the first-stage weight value of the consumer according to the interval load value and the basic weight corresponding to one or more load attributes in the first-stage load information.
3. The method according to claim 2, wherein determining the interval load value corresponding to the load attribute according to the first load parameter and/or the second load parameter comprises:
determining a target load parameter according to the first load parameter and/or the second load parameter;
And determining a first target interval to which the target load parameter belongs and an interval load value corresponding to the first target interval according to the target load parameter.
4. A method according to claim 3, wherein the first load parameter is the amount of data to be processed by the producer, the second load parameter is the amount of data not yet processed by the consumer, and the target load parameter is the sum of the amount of data to be processed by the producer and the amount of data not yet processed by the consumer.
5. The method of claim 1, wherein the determining the consumer's kth level weight value based on the producer's kth level load information, the consumer's kth level load information, and the consumer's kth-1 level weight value comprises:
for any load attribute in the K-th level load information, determining an associated load value corresponding to the load attribute according to a third load parameter and/or a fourth load parameter, wherein the third load parameter is a load parameter corresponding to the load attribute in the K-th level load information of the producer, and the fourth load parameter is a load parameter corresponding to the load attribute in the K-th level load information of the consumer;
And determining the K-level weight value of the consumer according to the associated load value corresponding to one or more load attributes in the K-level load information and the interval load value corresponding to the K-1-level weight value.
6. The method of claim 5, wherein determining the associated load value corresponding to the load attribute according to the third load parameter and/or the fourth load parameter comprises:
determining the association degree according to the third load parameter and/or the fourth load parameter;
and determining the association load value according to the association degree.
7. The method of claim 1, wherein the first level load information comprises any one or more of machine load information, machine configuration information, data volume load information, machine health information, number load information; the second level load information comprises any one or more of machine room node load information, regional load information and operator load information.
8. The method of any one of claims 1 to 7, wherein after determining the target consumer from the M consumers, further comprising:
transmitting a scheduling response to the producer;
wherein the dispatch response includes an identification of the target consumer, the identification of the target consumer being used to instruct the producer to send pending data to the target consumer.
9. A scheduling apparatus, comprising:
the receiving and transmitting module is used for receiving a scheduling request from a producer;
the processing module is used for responding to the scheduling request, and determining M target weight values of M consumers according to N-level load information of the producer and N-level load information of each consumer in the M consumers, wherein each level of load information comprises one or more load attributes and load parameters corresponding to the load attributes; determining target consumers from the M consumers according to M target weight values of the M consumers, wherein M and N are integers greater than or equal to 2;
the processing module is specifically configured to:
for any one of the M consumers:
determining a K-th level weight value of the consumer according to the K-th level load information of the producer, the K-th level load information of the consumer and the K-1-th level weight value of the consumer, wherein K is an integer which is more than or equal to 2 and less than or equal to N, and the first level weight value of the consumer is determined according to the first level load information of the producer and the first level load information of the consumer;
and determining the target weight value of the consumer according to the first-level weight value to the Nth-level weight value.
10. A computing device comprising a processor coupled to a memory for storing a computer program, the processor for executing the computer program stored in the memory to cause the computing device to perform the method of any one of claims 1 to 8.
11. A computer readable storage medium, characterized in that it has stored therein a computer program or instructions which, when executed by a computing device, implement the method of any of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110284849.6A CN113055480B (en) | 2021-03-17 | 2021-03-17 | Scheduling method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110284849.6A CN113055480B (en) | 2021-03-17 | 2021-03-17 | Scheduling method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113055480A CN113055480A (en) | 2021-06-29 |
CN113055480B true CN113055480B (en) | 2023-05-23 |
Family
ID=76513099
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110284849.6A Active CN113055480B (en) | 2021-03-17 | 2021-03-17 | Scheduling method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113055480B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116132367A (en) * | 2022-08-17 | 2023-05-16 | 马上消费金融股份有限公司 | Message processing method and device and electronic equipment |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110032459A (en) * | 2019-04-22 | 2019-07-19 | 深圳乐信软件技术有限公司 | Message queue configuration method, device, computer equipment and storage medium |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9667671B2 (en) * | 2013-05-13 | 2017-05-30 | Xerox Corporation | Method and system for facilitating communication between message consumers and message producers |
CN104363300B (en) * | 2014-11-26 | 2018-06-05 | 浙江宇视科技有限公司 | Task distribution formula dispatching device is calculated in a kind of server cluster |
CN105338061B (en) * | 2015-09-29 | 2019-04-23 | 华中科技大学 | A kind of implementation method and system of lightweight messages middleware |
US20200329118A1 (en) * | 2019-04-09 | 2020-10-15 | Wangsu Science & Technology Co., Ltd. | Data transmission scheduling method and system |
CN110062038A (en) * | 2019-04-09 | 2019-07-26 | 网宿科技股份有限公司 | A kind of data transmission scheduling method and system |
CN111506430B (en) * | 2020-04-23 | 2024-04-19 | 上海数禾信息科技有限公司 | Method and device for processing data under multitasking and electronic equipment |
CN112291121B (en) * | 2020-12-30 | 2021-08-03 | 金锐同创(北京)科技股份有限公司 | Data processing method and related equipment |
-
2021
- 2021-03-17 CN CN202110284849.6A patent/CN113055480B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110032459A (en) * | 2019-04-22 | 2019-07-19 | 深圳乐信软件技术有限公司 | Message queue configuration method, device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN113055480A (en) | 2021-06-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111913818B (en) | Method for determining dependency relationship between services and related device | |
CN103929492A (en) | Method, devices and system for load balancing of service chain | |
CN105072139B (en) | Recommend method and apparatus | |
CN113055480B (en) | Scheduling method and device | |
CN112148484A (en) | Micro-service online distribution method and system based on coupling degree | |
CN108718258B (en) | Quality detection method and equipment for inter-board link | |
CN103988179A (en) | Optimization mechanisms for latency reduction and elasticity improvement in geographically distributed datacenters | |
CN111652728B (en) | Transaction processing method and device | |
CN110149377A (en) | A kind of video service node resource allocation methods, system, device and storage medium | |
CN115794423B (en) | Intelligent machine room management method and device, electronic equipment and storage medium | |
CN105099763A (en) | Method and device for reminding lost connection of equipment | |
CN109656783A (en) | System platform monitoring method and device | |
CN105335313A (en) | Basic data transmission method and apparatus | |
CN111008143B (en) | Coverage rate scheduling test method, terminal equipment and computer readable storage medium | |
CN116578911A (en) | Data processing method, device, electronic equipment and computer storage medium | |
CN109409883B (en) | Cooperative processing method based on intelligent contract, household appliance and server | |
CN111431733A (en) | Service alarm coverage information evaluation method and device | |
CN114884915B (en) | Message processing method, device and equipment based on gray release | |
CN109978129B (en) | Scheduling method and related device | |
CN113795032B (en) | Method and device for judging invisible faults of indoor division, storage medium and equipment | |
CN111651316B (en) | Resource monitoring method, system, electronic equipment and storage medium | |
US20130070647A1 (en) | Method of pseudo-dynamic routing in a cluster comprising static communication links and computer program implementing that method | |
CN102377661A (en) | Blade server and method for building shortest blade transmission path in blade server | |
US20140359104A1 (en) | Grouping processing method and system | |
CN110781878A (en) | Target area determination method and device, storage medium and electronic device |
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 |