CN110851250A - Task distribution method and device for raspberry group and storage medium - Google Patents

Task distribution method and device for raspberry group and storage medium Download PDF

Info

Publication number
CN110851250A
CN110851250A CN201910991017.0A CN201910991017A CN110851250A CN 110851250 A CN110851250 A CN 110851250A CN 201910991017 A CN201910991017 A CN 201910991017A CN 110851250 A CN110851250 A CN 110851250A
Authority
CN
China
Prior art keywords
dispatching
raspberry
tasks
task
group
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.)
Withdrawn
Application number
CN201910991017.0A
Other languages
Chinese (zh)
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.)
Shanghai Yidianshikong Network Co Ltd
Original Assignee
Shanghai Yidianshikong Network 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 Shanghai Yidianshikong Network Co Ltd filed Critical Shanghai Yidianshikong Network Co Ltd
Priority to CN201910991017.0A priority Critical patent/CN110851250A/en
Publication of CN110851250A publication Critical patent/CN110851250A/en
Withdrawn legal-status Critical Current

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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • 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/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Abstract

The application discloses a task dispatching method and device for a raspberry group and a storage medium. The method comprises the steps that an Nth batch of tasks are dispatched to a raspberry dispatching cluster through a service program background according to preset weight; acquiring the execution success rate of each raspberry group to the Nth batch of tasks in the raspberry group cluster; adjusting a first preset weight of a task to be dispatched to the raspberry dispatching cluster according to the execution success rate to obtain a second preset weight; and dispatching the (N + 1) th batch of tasks to the raspberry dispatching cluster according to a second preset weight through the background of the service program, and simultaneously adjusting the quantity of dispatching tasks corresponding to different weights. The method and the device solve the technical problem that a task dispatching method for raspberry dispatching is poor in processing effect. By the method and the device, more execution tasks are obtained in the raspberry group with the largest effective public network IP and high task execution success rate in the raspberry group.

Description

Task distribution method and device for raspberry group and storage medium
Technical Field
The application relates to the field of business processing, in particular to a task dispatching method and device for raspberry dispatching and a storage medium.
Background
For the raspberry group, the distribution weight needs to be adjusted according to the comprehensive environment of a single raspberry group, and more tasks are distributed in the raspberry group with high task execution success rate.
The inventor finds that the total successful execution rate of the dispatched business task is not ideal, and the total successful execution rate of the background dispatching task on the raspberry dispatching is to be submitted.
Aiming at the problem that the task dispatching method for raspberry dispatching in the related technology is poor in processing effect, an effective solution is not provided at present.
Disclosure of Invention
The application mainly aims to provide a task dispatching method and device for a raspberry group and a storage medium, so as to solve the problem that the task dispatching method for the raspberry group is poor in processing effect.
In order to achieve the above object, according to an aspect of the present application, a task dispatching method and apparatus for a raspberry group, and a storage medium are provided.
The task dispatching method for raspberry dispatching comprises the following steps: dispatching the Nth batch of tasks to the raspberry dispatching cluster according to the preset weight through the background of the service program; acquiring the execution success rate of each raspberry group to the Nth batch of tasks in the raspberry group cluster; adjusting a first preset weight of a task to be dispatched to the raspberry dispatching cluster according to the execution success rate to obtain a second preset weight; and dispatching the (N + 1) th batch of tasks to the raspberry dispatching cluster according to a second preset weight through the background of the service program, and simultaneously adjusting the quantity of dispatching tasks corresponding to different weights.
Further, dispatching the Nth batch of tasks to the raspberry dispatching cluster according to the first preset weight through the service program background comprises the following steps:
detecting whether the IP address in the raspberry group to be issued is effective and not repeated;
and if so, dispatching the Nth batch of tasks to the raspberry dispatching cluster through the background of the service program according to a first preset weight which occupies a smaller total task.
Further, adjusting a first preset weight of the task of dispatching the raspberry dispatching cluster according to the execution success rate to obtain a second preset weight comprises:
and determining the dispatching weight value of each raspberry dispatch when the (N + 1) th dispatching task is dispatched according to the execution success rate of the (N) th dispatching task on each raspberry dispatch.
Further, dispatching the (N + 1) th batch of tasks to the raspberry dispatching cluster according to a second preset weight through the background of the service program, and adjusting the quantity of dispatching tasks corresponding to different weights simultaneously comprises:
grading the success rate of receiving the Nth batch of dispatching tasks and executing the tasks in the raspberry group cluster;
and dispatching the (N + 1) th batch of tasks to the raspberry dispatching group according to a second preset weight through the background of the service program, and adding the quantity of task dispatching requests reduced due to weight adjustment to the raspberry dispatching group with a high grade.
Further, adjusting a first preset weight of the task of dispatching the raspberry dispatching cluster according to the execution success rate to obtain a second preset weight comprises:
adjusting second preset weights of different times according to the execution success rate;
distributing the (N + 1) th batch of tasks to the raspberry distributing cluster according to a second preset weight through a service program background, wherein the step of adjusting the number of distributed tasks corresponding to different weights comprises the following steps:
and dispatching the (N + 1) th batch of tasks to the raspberry dispatching cluster according to a second preset weight which accounts for the larger total task through the background of the service program, and simultaneously adjusting the number of dispatching tasks with different weights and the like.
To achieve the above object, according to another aspect of the present application, there is provided a task serving apparatus for raspberry serving.
The task dispatching device for raspberry dispatching comprises: the first processing module is used for dispatching the Nth batch of tasks to the raspberry dispatching cluster according to a first preset weight through the background of the service program; the acquisition module is used for acquiring the execution success rate of each raspberry group to the Nth batch of tasks in the raspberry group; the adjusting module is used for adjusting a first preset weight of the task of dispatching the raspberry dispatching cluster according to the execution success rate to obtain a second preset weight; and the second processing module is used for dispatching the (N + 1) th batch of tasks to the raspberry dispatching cluster according to a second preset weight through the background of the service program, and simultaneously adjusting the quantity of dispatching tasks corresponding to different weights.
Further, the first processing module is used for
Detecting whether the IP address in the raspberry group to be issued is effective and not repeated;
and if so, dispatching the Nth batch of tasks to the raspberry dispatching cluster through the background of the service program according to a first preset weight which occupies a smaller total task.
Further, the adjusting module is used for
And determining the dispatching weight value of each raspberry dispatch when the (N + 1) th dispatching task is dispatched according to the execution success rate of the (N) th dispatching task on each raspberry dispatch.
Further, the second processing module is used for
Grading the success rate of receiving the Nth batch of dispatching tasks and executing the tasks in the raspberry group cluster;
and dispatching the (N + 1) th batch of tasks to the raspberry dispatching group according to a second preset weight through the background of the service program, and adding the quantity of task dispatching requests reduced due to weight adjustment to the raspberry dispatching group with a high grade.
In order to achieve the above object, according to yet another aspect of the present application, there is provided a computer readable storage medium having stored thereon a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the task dispatching method for raspberry dispatching.
In the method and the device for dispatching tasks for raspberry dispatching and the storage medium in the embodiment of the application, by acquiring the execution success rate of each raspberry in the raspberry dispatching cluster for the nth batch of tasks in a mode of dispatching the nth batch of tasks to the raspberry dispatching cluster through a service program background according to the preset weight, the purpose of adjusting the first preset weight of the tasks dispatched to the raspberry dispatching cluster according to the execution success rate to obtain a second preset weight is achieved; the N +1 th batch of tasks are dispatched to the raspberry dispatching cluster according to the second preset weight through the service program background, and the number of the dispatched tasks corresponding to different weights is adjusted, so that the technical effect of improving the total execution times and success rate of the service program tasks is achieved, and the technical problem that the processing effect of the task dispatching method for raspberry dispatching is poor is solved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, serve to provide a further understanding of the application and to enable other features, objects, and advantages of the application to be more apparent. The drawings and their description illustrate the embodiments of the invention and do not limit it. In the drawings:
FIG. 1 is a flow chart of a task dispatching method for raspberry dispatching according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a task dispatching method for raspberry dispatching according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating a task dispatching method for raspberry dispatching according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a task dispatching device for raspberry dispatching according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It should be understood that the data so used may be interchanged under appropriate circumstances such that embodiments of the application described herein may be used. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In this application, the terms "upper", "lower", "left", "right", "front", "rear", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal", and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings. These terms are used primarily to better describe the present application and its embodiments, and are not used to limit the indicated devices, elements or components to a particular orientation or to be constructed and operated in a particular orientation.
Moreover, some of the above terms may be used to indicate other meanings besides the orientation or positional relationship, for example, the term "on" may also be used to indicate some kind of attachment or connection relationship in some cases. The specific meaning of these terms in this application will be understood by those of ordinary skill in the art as appropriate.
Furthermore, the terms "mounted," "disposed," "provided," "connected," and "sleeved" are to be construed broadly. For example, it may be a fixed connection, a removable connection, or a unitary construction; can be a mechanical connection, or an electrical connection; may be directly connected, or indirectly connected through intervening media, or may be in internal communication between two devices, elements or components. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
The method comprises the steps of selecting a raspberry group of a specific effective public network IP (Internet protocol) by brushing, grading the success rate of receiving and executing tasks of each raspberry group in the effective group in an equal time, classifying the high, medium, low and extremely low classes in the equal time, adjusting the weight of each raspberry group receiving task according to the high and low classes in the equal time under the condition that the raspberry group is not completely eliminated, proportionally reducing the execution times of the low and extremely low raspberry group tasks according to the weight adjustment, uniformly distributing the reduced times to the high and high raspberry group groups, and finally realizing the maximum effective public network IP in the raspberry group. In addition, more execution tasks are obtained from the raspberry group with high task execution success rate, and the total execution times and success rate of the business program tasks are finally improved; twice, and the optimization is realized.
As shown in fig. 1, the method includes steps S101 to S104 as follows:
step S101, dispatching the Nth batch of tasks to a raspberry dispatching cluster according to preset weight through a service program background;
specifically, the total execution tasks of the background of the service program are divided into two batches of dispatching execution, the first batch accounts for only 10%, and the raspberry dispatching group with the effective and unrepeated public network IP in the raspberry dispatching group to be issued is detected.
Step S102, obtaining the execution success rate of each raspberry in the raspberry group to the Nth batch of tasks;
specifically, the nth task is dispatched to the group by the background of the service program according to the weight of each task and 100, and the success rate of dispatching the service program to each raspberry in the cluster is obtained.
Step S103, adjusting a first preset weight of a task of dispatching the raspberry dispatching cluster according to the execution success rate to obtain a second preset weight;
specifically, according to the execution success rate of the Nth batch of tasks in each raspberry group in the cluster, the equal-time information of the execution success rate of the service program on the raspberry group is formulated: high, medium, low, and extremely low. And adjusting the weight of the raspberry group with low grade and extremely low grade to reduce, wherein the weight of the raspberry group with low grade is adjusted from the original 100 to 70, and the weight of the raspberry group with extremely low grade is adjusted from the original 100 to 40.
And step S104, dispatching the (N + 1) th batch of tasks to the raspberry dispatching cluster according to a second preset weight through the background of the service program, and simultaneously adjusting the quantity of dispatching tasks corresponding to different weights.
Specifically, the raspberry group is distributed according to the same weight of 100, the (N + 1) th task (accounting for 90%) is calculated, and the number of times of tasks needing to be executed is obtained by a single raspberry group and is used as the number of times of single basic execution of each raspberry group in the (N + 1) th tasks. Then, the group with low information and extremely low information in the raspberry group of the group is multiplied by the adjusted weight value of each raspberry group in the group according to the single basic execution times to obtain the adjusted new task execution times of each raspberry group with low information and extremely low information in the raspberry group, and the execution times are used as the times of the tasks to be distributed by the raspberry group when a second batch of tasks is distributed. And finally, the total times of tasks which are reduced and distributed due to weight adjustment of the raspberry groups with medium-order information and extremely low-order information in the raspberry groups are equally distributed and increased to the raspberry group groups of the groups with high-order information.
According to the method, through the brushing selection of the raspberry sending group of the specific effective public network IP, the success rate of receiving and executing the tasks of each raspberry sending in the effective group is graded in an equal time, the types of the tasks with the equal time of high, medium, low and extremely low are classified, under the condition that the raspberry sending group is not completely eliminated, the weight of the receiving tasks of each raspberry sending is adjusted according to the equal time of low, the executing times of the tasks with the equal time of low and extremely low are reduced according to the weight adjusting proportion, and the reduced times are evenly added to the raspberry sending group with the equal time of high.
From the above description, it can be seen that the following technical effects are achieved by the present application:
in the embodiment of the application, by adopting a mode of dispatching the Nth batch of tasks to the raspberry dispatching cluster according to the preset weight through a service program background and acquiring the execution success rate of each raspberry dispatching to the Nth batch of tasks in the raspberry dispatching cluster, the purpose of adjusting the first preset weight of the tasks dispatched to the raspberry dispatching cluster according to the execution success rate to obtain a second preset weight is achieved; the N +1 th batch of tasks are dispatched to the raspberry dispatching cluster according to the second preset weight through the service program background, and the number of the dispatched tasks corresponding to different weights is adjusted, so that the technical effect of improving the total execution times and success rate of the service program tasks is achieved, and the technical problem that the processing effect of the task dispatching method for raspberry dispatching is poor is solved.
According to the embodiment of the present application, as shown in fig. 2, as a preferred option in the embodiment, dispatching the nth batch of tasks to the raspberry dispatching cluster according to the first preset weight by the service program background includes:
step 201, detecting whether an IP address in a raspberry group to be issued is valid and not repeated;
and 202, if yes, dispatching the Nth batch of tasks to the raspberry dispatching cluster through the background of the service program according to a first preset weight which occupies a smaller total task.
Specifically, a raspberry group with valid and non-repeating public network IPs in the raspberry group to be issued is detected: A1. and dispatching the first tasks to the A1 group by the background of the service program according to the same weight of each task as 100, and acquiring the success rate of dispatching the service program to each raspberry in the A1 for execution.
According to the embodiment of the present application, as an optimization in the embodiment, the obtaining a second preset weight after adjusting the first preset weight of the task of dispatching the raspberry group according to the execution success rate includes:
and determining the dispatching weight value of each raspberry dispatch when the (N + 1) th dispatching task is dispatched according to the execution success rate of the (N) th dispatching task on each raspberry dispatch.
Specifically, according to the success rate of the execution of the first tasks in each raspberry group of a1, the equal-order information of the execution success rate of the service program on the raspberry group is formulated: high, medium, low, extremely low; the weights of the raspberry group with low grade and extremely low grade are adjusted and reduced, the weight of the raspberry group with low grade is adjusted from 100 to 70, and the weight of the raspberry group with extremely low grade is adjusted from 100 to 40.
According to the embodiment of the present application, as shown in fig. 3, as a preferred embodiment, the dispatching the (N + 1) th batch of tasks to the raspberry dispatching cluster according to a second preset weight by the background of the service program, and adjusting the number of the dispatched tasks corresponding to different weights includes:
step 301, in the raspberry group, performing grade classification on the success rate of receiving and executing the Nth batch of dispatching tasks by each raspberry group;
and 302, dispatching the (N + 1) th batch of tasks to the raspberry dispatching group according to a second preset weight through the background of the service program, and adding the quantity of the task dispatching requests reduced due to weight adjustment to the raspberry dispatching group with a high grade.
Specifically, the tasks are distributed according to the same weight of 100 in the A1 raspberry group, a second batch of tasks (accounting for 90%) is calculated, and the times of the tasks needing to be executed by the single raspberry group are obtained and used as the times of the single basic execution of each raspberry group in the A1 in the second batch of tasks.
According to the embodiment of the present application, as an optimization in the embodiment, the obtaining a second preset weight after adjusting the first preset weight of the task of dispatching the raspberry group according to the execution success rate includes: adjusting second preset weights of different times according to the execution success rate; distributing the (N + 1) th batch of tasks to the raspberry distributing cluster according to a second preset weight through a service program background, wherein the step of adjusting the number of distributed tasks corresponding to different weights comprises the following steps: and dispatching the (N + 1) th batch of tasks to the raspberry dispatching cluster according to a second preset weight which accounts for the larger total task through the background of the service program, and simultaneously adjusting the number of dispatching tasks with different weights and the like.
Preferably, the calculation is performed in the following manner:
multiplying the low-information and extremely low-information groups in the raspberry group A1 by the adjusted weight values of the raspberry groups in the groups according to the single basic execution times to obtain the new task execution times of each adjusted raspberry group in the raspberry group with low-information and extremely low-information, and taking the execution times as the task times of the raspberry group to be dispatched when a second batch of tasks are dispatched; the total times of tasks which are sent in a raspberry sending way and have low and extremely low medium information in the raspberry sending way and are reduced due to weight adjustment are evenly distributed and increased to a raspberry sending group A1 with high medium information.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowcharts, in some cases, the steps illustrated or described may be performed in an order different than presented herein.
According to an embodiment of the present application, there is also provided a task dispatching device for raspberry dispatching for implementing the above method, as shown in fig. 4, the device includes: the first processing module 10 is configured to dispatch, by using the service program background, the nth batch of tasks to the raspberry dispatching cluster according to the first preset weight; an obtaining module 11, configured to obtain an execution success rate of each raspberry group for the nth batch of tasks in the raspberry group; the adjusting module 12 is configured to adjust a first preset weight of a task to be dispatched to the raspberry dispatching cluster according to the execution success rate to obtain a second preset weight; and the second processing module 13 is configured to dispatch the (N + 1) th batch of tasks to the raspberry dispatching cluster according to a second preset weight through the service program background, and adjust the number of dispatching tasks corresponding to different weights at the same time.
In the first processing module 10 of the embodiment of the present application, specifically, two batches of dispatching execution are performed on the total execution task of the background of the service program, and the first batch accounts for only 10%, and a raspberry dispatching group with an effective and unrepeated public network IP in the raspberry dispatching group to be issued is detected.
In the obtaining module 11 of the embodiment of the present application, specifically, the nth batch of tasks are dispatched to the group by the service program background according to the same 100 weights for each batch of tasks, and the success rate of dispatching the service program to each raspberry in the cluster is obtained.
In the adjusting module 12 of the embodiment of the present application, specifically, according to the success rate of the nth task executed in each raspberry group in the cluster, the ranking information of the execution success rate of the service program on the raspberry group is formulated: high, medium, low, and extremely low. And adjusting the weight of the raspberry group with low grade and extremely low grade to reduce, wherein the weight of the raspberry group with low grade is adjusted from the original 100 to 70, and the weight of the raspberry group with extremely low grade is adjusted from the original 100 to 40.
In the second processing module 13 of the embodiment of the application, specifically, the raspberry group is distributed according to the same weight as 100, the (N + 1) th task (accounting for 90%) is calculated, and a single raspberry group obtains the number of times of tasks to be executed, and the number of times of basic execution of each raspberry group in the group is used as the N +1 number of tasks. Then, the group with low information and extremely low information in the raspberry group of the group is multiplied by the adjusted weight value of each raspberry group in the group according to the single basic execution times to obtain the adjusted new task execution times of each raspberry group with low information and extremely low information in the raspberry group, and the execution times are used as the times of the tasks to be distributed by the raspberry group when a second batch of tasks is distributed. And finally, the total times of tasks which are reduced and distributed due to weight adjustment of the raspberry groups with medium-order information and extremely low-order information in the raspberry groups are equally distributed and increased to the raspberry group groups of the groups with high-order information.
The module selects the raspberry sending group of the specific effective public network IP by swiping, classifies the success rate of receiving and executing the tasks of each raspberry sending in the effective group in an equal-time grading manner, classifies several types of the tasks with equal-time height, middle, low and extremely low, adjusts the weight of each raspberry sending receiving task according to the equal-time height under the condition of ensuring that the raspberry sending group is not completely eliminated, reduces the executing times of the tasks with equal-time height and extremely low according to the weight adjusting proportion, and increases the reduced times to the raspberry sending group with equal-time height in an equal-time sharing manner.
According to the embodiment of the present application, as a preferred choice in the embodiment, the first processing module 10 is configured to detect whether an IP address in a raspberry group to be issued is valid and not repeated; and if so, dispatching the Nth batch of tasks to the raspberry dispatching cluster through the background of the service program according to a first preset weight which occupies a smaller total task.
Specifically, a raspberry group with valid and non-repeating public network IPs in the raspberry group to be issued is detected: A1. and dispatching the first tasks to the A1 group by the background of the service program according to the same weight of each task as 100, and acquiring the success rate of dispatching the service program to each raspberry in the A1 for execution.
According to the embodiment of the present application, as a preferred choice in the embodiment, the adjusting module 12 is configured to determine a dispatching weight value of each raspberry group when the (N + 1) th task is dispatched according to a success rate of the nth task executed on each raspberry group.
Specifically, according to the success rate of the execution of the first tasks in each raspberry group of a1, the equal-order information of the execution success rate of the service program on the raspberry group is formulated: high, medium, low, extremely low; the weights of the raspberry group with low grade and extremely low grade are adjusted and reduced, the weight of the raspberry group with low grade is adjusted from 100 to 70, and the weight of the raspberry group with extremely low grade is adjusted from 100 to 40.
According to the embodiment of the present application, as an optimization in the embodiment, the second processing module 13 is configured to grade success rates of receiving and executing the nth batch of dispatching tasks by each raspberry in the raspberry group; and dispatching the (N + 1) th batch of tasks to the raspberry dispatching group according to a second preset weight through the background of the service program, and adding the quantity of task dispatching requests reduced due to weight adjustment to the raspberry dispatching group with a high grade.
Specifically, the tasks are distributed according to the same weight of 100 in the A1 raspberry group, a second batch of tasks (accounting for 90%) is calculated, and the times of the tasks needing to be executed by the single raspberry group are obtained and used as the times of the single basic execution of each raspberry group in the A1 in the second batch of tasks.
Taking the time as: in 2019, 9 months 209: 00-9:30, the total number of tasks to be dispatched of the service program background management system is 100 ten thousand, and the implementation principle of the application corresponding to 300 dispatched raspberries is as follows:
firstly, formulating a dispatching rule, for example, dispatching a total task twice; the first batch served 10% of the total tasks, i.e. 10 ten thousand; the second batch dispatches the remaining tasks, 90% of the total tasks, i.e. 90 ten thousand;
secondly, detecting effective IP acquisition aiming at 300 raspberry groups, and acquiring a raspberry group of the effective IP, wherein the number of the raspberry groups which are online and have effective public network IP is 200, and the number is marked as A1;
setting the initial dispatching weight of the 200 raspberry groups to be 100, dispatching the first 10 ten thousand tasks to the 200 raspberry groups according to the weight of the raspberry groups through a service program background management system, wherein the dispatching task which can be obtained by each raspberry group is as follows:
dispatch tasks (single raspberry weight/a 1 100) 10 ten thousand (100/200 100) 500 tasks.
TABLE 1
Figure BDA0002237802210000111
And step four, recording the execution success rate of the task dispatched by each raspberry and calculating the execution success rate of the first dispatch after the first task is dispatched.
TABLE 2
Figure BDA0002237802210000121
Step five, determining the dispatching weight value of each raspberry group when the second dispatching task is performed according to the success rate of the first dispatching task executed on each raspberry group, wherein the algorithm is as follows:
the execution success rate of the first task dispatching to each raspberry group is divided into four equal times, namely high, medium, low and extremely low, and the specific range is as follows: high > 90%, medium > 70%, low > 40%, and very low > 0%, and the weights are adjusted according to the levels such that the serving raspberry weights of high and medium times are kept constant at 100, the serving raspberry weights of low and medium times are adjusted from 100 to 70, and the serving raspberry weights of very low times are adjusted from 100 to 40.
TABLE 3
Figure BDA0002237802210000122
Figure BDA0002237802210000131
Step six, adding the reduction amount of the dispatching request caused by the weight adjustment to the raspberry dispatching group with high grade, wherein the specific algorithm is as follows:
(1) the number of basic tasks to be executed by each raspberry group when the weight of each raspberry group of the second dispatching task is not adjusted is as follows: 4500 pieces/station, 900000 pieces/200 stations
(2) The number of tasks reduced by the weight adjustment of the next lowest and lowest raspberry pips is calculated with reference to the base task number (4500/station): 1350+2700+1350 ═ 6750
TABLE 4
Figure BDA0002237802210000132
(3) The total task number of the raspberry group groups with the lower and lower grades and reduced assignment due to weight adjustment is evenly added to the raspberry group with the higher grade, if the number of the raspberry group with the higher grade is 5, the request number is evenly distributed: 6750/5, 1350.
TABLE 5
Figure BDA0002237802210000141
(4) Final second batch of tasks to final number of dispatched tasks for each raspberry pi on each raspberry pi
TABLE 6
Figure BDA0002237802210000142
It will be apparent to those skilled in the art that the modules or steps of the present application described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and they may alternatively be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, or fabricated separately as individual integrated circuit modules, or fabricated as a single integrated circuit module from multiple modules or steps. Thus, the present application is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A task dispatching method for raspberry dispatching is characterized by comprising the following steps:
dispatching the Nth batch of tasks to the raspberry dispatching cluster according to the preset weight through the background of the service program;
acquiring the execution success rate of each raspberry group to the Nth batch of tasks in the raspberry group cluster;
adjusting a first preset weight of a task to be dispatched to the raspberry dispatching cluster according to the execution success rate to obtain a second preset weight;
and dispatching the (N + 1) th batch of tasks to the raspberry dispatching cluster according to a second preset weight through the background of the service program, and simultaneously adjusting the quantity of dispatching tasks corresponding to different weights.
2. The method of claim 1, wherein dispatching the Nth batch of tasks to the raspberry group by the business program background according to the first preset weight comprises:
detecting whether the IP address in the raspberry group to be issued is effective and not repeated;
and if so, dispatching the Nth batch of tasks to the raspberry dispatching cluster through the background of the service program according to a first preset weight which occupies a smaller total task.
3. The task dispatching method for the raspberry dispatching of claim 1, wherein the adjusting a first preset weight for dispatching tasks to the raspberry dispatching cluster according to the execution success rate to obtain a second preset weight comprises:
and determining the dispatching weight value of each raspberry dispatch when the (N + 1) th dispatching task is dispatched according to the execution success rate of the (N) th dispatching task on each raspberry dispatch.
4. The task serving method for the raspberry group of claim 1, wherein the (N + 1) th batch of tasks are served to the raspberry group by the service program background according to a second preset weight, and adjusting the number of served tasks corresponding to different weights simultaneously comprises:
grading the success rate of receiving the Nth batch of dispatching tasks and executing the tasks in the raspberry group cluster;
and dispatching the (N + 1) th batch of tasks to the raspberry dispatching group according to a second preset weight through the background of the service program, and adding the quantity of task dispatching requests reduced due to weight adjustment to the raspberry dispatching group with a high grade.
5. The task serving method for a raspberry serve as recited in claim 1,
the step of adjusting a first preset weight of the task of dispatching the raspberry group to obtain a second preset weight according to the execution success rate comprises the following steps:
adjusting second preset weights of different times according to the execution success rate;
distributing the (N + 1) th batch of tasks to the raspberry distributing cluster according to a second preset weight through a service program background, wherein the step of adjusting the number of distributed tasks corresponding to different weights comprises the following steps:
and dispatching the (N + 1) th batch of tasks to the raspberry dispatching cluster according to a second preset weight which accounts for the larger total task through the background of the service program, and simultaneously adjusting the number of dispatching tasks with different weights and the like.
6. A task serving apparatus for raspberry serving, comprising:
the first processing module is used for dispatching the Nth batch of tasks to the raspberry dispatching cluster according to a first preset weight through the background of the service program;
the acquisition module is used for acquiring the execution success rate of each raspberry group to the Nth batch of tasks in the raspberry group;
the adjusting module is used for adjusting a first preset weight of the task of dispatching the raspberry dispatching cluster according to the execution success rate to obtain a second preset weight;
and the second processing module is used for dispatching the (N + 1) th batch of tasks to the raspberry dispatching cluster according to a second preset weight through the background of the service program, and simultaneously adjusting the quantity of dispatching tasks corresponding to different weights.
7. The task serving apparatus for raspberry pi of claim 6, wherein said first processing module is configured to
Detecting whether the IP address in the raspberry group to be issued is effective and not repeated;
and if so, dispatching the Nth batch of tasks to the raspberry dispatching cluster through the background of the service program according to a first preset weight which occupies a smaller total task.
8. The task serving device for a raspberry pi of claim 6, wherein said adjusting module is configured to
And determining the dispatching weight value of each raspberry dispatch when the (N + 1) th dispatching task is dispatched according to the execution success rate of the (N) th dispatching task on each raspberry dispatch.
9. The task dispatching device for raspberry dispatching of claim 6, wherein said second processing module is configured to
Grading the success rate of receiving the Nth batch of dispatching tasks and executing the tasks in the raspberry group cluster;
and dispatching the (N + 1) th batch of tasks to the raspberry dispatching group according to a second preset weight through the background of the service program, and adding the quantity of task dispatching requests reduced due to weight adjustment to the raspberry dispatching group with a high grade.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the task serving method for raspberry serving of any of claims 1 to 5.
CN201910991017.0A 2019-10-17 2019-10-17 Task distribution method and device for raspberry group and storage medium Withdrawn CN110851250A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910991017.0A CN110851250A (en) 2019-10-17 2019-10-17 Task distribution method and device for raspberry group and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910991017.0A CN110851250A (en) 2019-10-17 2019-10-17 Task distribution method and device for raspberry group and storage medium

Publications (1)

Publication Number Publication Date
CN110851250A true CN110851250A (en) 2020-02-28

Family

ID=69597235

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910991017.0A Withdrawn CN110851250A (en) 2019-10-17 2019-10-17 Task distribution method and device for raspberry group and storage medium

Country Status (1)

Country Link
CN (1) CN110851250A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112270502A (en) * 2020-11-17 2021-01-26 北京三维天地科技股份有限公司 Environment emergency task cooperative disposal platform based on artificial intelligence technology

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103944927A (en) * 2013-01-17 2014-07-23 深圳市腾讯计算机系统有限公司 Server stretching processing method and device
CN110120973A (en) * 2019-04-28 2019-08-13 华为技术有限公司 A kind of request control method, relevant device and computer storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103944927A (en) * 2013-01-17 2014-07-23 深圳市腾讯计算机系统有限公司 Server stretching processing method and device
CN110120973A (en) * 2019-04-28 2019-08-13 华为技术有限公司 A kind of request control method, relevant device and computer storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112270502A (en) * 2020-11-17 2021-01-26 北京三维天地科技股份有限公司 Environment emergency task cooperative disposal platform based on artificial intelligence technology
CN112270502B (en) * 2020-11-17 2021-06-01 北京三维天地科技股份有限公司 Environment emergency task cooperative disposal platform based on artificial intelligence technology

Similar Documents

Publication Publication Date Title
CN104320487B (en) The HTTP scheduling system and method for content distributing network
US20170142177A1 (en) Method and system for network dispatching
CN103338228B (en) Cloud computing load balancing dispatching algorithms based on double weighting Smallest connection algorithms
US20180247265A1 (en) Task grouping method and apparatus, electronic device, and computer storage medium
CN107844882A (en) Dispense task processing method, device and electronic equipment
CN107295048A (en) Load-balancing method and device
US11102143B2 (en) System and method for optimizing resource utilization in a clustered or cloud environment
CN104796422A (en) Online customer service staff equilibrium assignment method and online customer service staff equilibrium assignment device
CN108551474A (en) A kind of load-balancing method of server cluster
CN108055701B (en) Resource scheduling method and base station
KR102175603B1 (en) Method and device for providing location information
CN107317836A (en) One kind mixing cloud environment lower time appreciable request scheduling method
CN103988179A (en) Optimization mechanisms for latency reduction and elasticity improvement in geographically distributed datacenters
CN110851250A (en) Task distribution method and device for raspberry group and storage medium
CN105872082B (en) Fine granularity resource response system based on container cluster load-balancing algorithm
CN110889738A (en) Order distribution method and device
CN107846614B (en) Video traffic scheduling method and device and electronic equipment
CN110992123B (en) Order distribution method and device
CN112967091A (en) Intelligent distribution method, system and storage medium for marketing service event
CN103795788B (en) The load-balancing method and load-balanced server of instant communication server
CN110502339A (en) Data service resource allocation methods, device, system and storage medium
CN103427972A (en) Carrier resource distribution method and device
CN101267269B (en) Load balance implementation method and system in interactive network TV system
CN104270321A (en) Network load balancing method and system
WO2017167129A1 (en) Method and device for distributing data center data to user

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20200228