CN113760520A - Task processing method and device - Google Patents

Task processing method and device Download PDF

Info

Publication number
CN113760520A
CN113760520A CN202010656917.2A CN202010656917A CN113760520A CN 113760520 A CN113760520 A CN 113760520A CN 202010656917 A CN202010656917 A CN 202010656917A CN 113760520 A CN113760520 A CN 113760520A
Authority
CN
China
Prior art keywords
processing
task
pool
estimated
amount
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010656917.2A
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.)
Xi'an Jingxundi Supply Chain Technology Co ltd
Original Assignee
Xi'an Jingxundi Supply Chain Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xi'an Jingxundi Supply Chain Technology Co ltd filed Critical Xi'an Jingxundi Supply Chain Technology Co ltd
Priority to CN202010656917.2A priority Critical patent/CN113760520A/en
Publication of CN113760520A publication Critical patent/CN113760520A/en
Pending 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/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06311Scheduling, planning or task assignment for a person or group

Abstract

The application provides a task processing method and a task processing device, wherein the method comprises the following steps: acquiring a newly added task to be processed; in response to the fact that the task quantity stored in the pre-estimation processing pool in the current period is smaller than the total pre-estimation processing quantity, storing the newly-added task to be processed into the pre-estimation processing pool, and waiting for being allocated to the processing terminal for processing; the total estimated processing amount is the sum of the sub estimated processing amounts of the processing terminals of the processing tasks in the current period; and the sub-estimated processing amount of the processing terminal is determined according to the historical task processing amount of the processing terminal. The method can distribute the matched task amount for the processing terminal, and avoid the overstock of the tasks.

Description

Task processing method and device
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a method and an apparatus for processing a task.
Background
With the development of internet technology, more and more tasks need to be processed, for example, in the process of related business operations such as logistics distribution and the like, the responsibility judgment processing is often required to be performed on business flow abnormity or information abnormity, and with the issuing of package dimensions and the rapid increase of other bills, bills of different responsibility judgment types are gradually increased;
in the process of implementing the present invention, the inventor finds that with the increase of tasks, a large processing pressure is applied to a front-line processing terminal, and the processing cannot be performed in an effective time range in time, so how to match the task amount with the processing capability of the terminal is an urgent problem to be solved.
Disclosure of Invention
In view of this, the present application provides a task processing method and device, which can allocate a matched task amount to a processing terminal, and avoid backlog of tasks.
In order to solve the technical problem, the technical scheme of the application is realized as follows:
in one embodiment, a task processing method is provided, the method comprising:
acquiring a newly added task to be processed;
in response to the fact that the task quantity stored in the pre-estimation processing pool in the current period is smaller than the total pre-estimation processing quantity, storing the newly-added task to be processed into the pre-estimation processing pool, and waiting for being allocated to the processing terminal for processing;
the total estimated processing amount is the sum of the sub estimated processing amounts of the processing terminals of the processing tasks in the current period; and the sub-estimated processing amount of the processing terminal is determined according to the historical task processing amount of the processing terminal.
In another embodiment, there is provided a task processing apparatus including: an acquisition unit and a storage unit;
the acquisition unit is used for acquiring a newly added task to be processed;
the storage unit is used for responding to the fact that the task quantity stored in the pre-estimation processing pool in the current period is smaller than the total pre-estimation processing quantity, storing the newly-added task to be processed into the pre-estimation processing pool, and waiting for being allocated to the processing terminal for processing; the total estimated processing amount is the sum of the sub estimated processing amounts of the processing terminals of the processing tasks in the current period; and the sub-estimated processing amount of the processing terminal is determined according to the historical task processing amount of the processing terminal.
In another embodiment, an electronic device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the task processing method when executing the program.
In another embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the task processing method.
According to the technical scheme, the capacity of the pre-estimated processing pool is determined according to the historical task processing amount of the processing terminal for processing the task, so that the task amount matched with the processing capacity of the processing terminal is distributed, the processing terminal can timely and efficiently process the distributed task amount, the overstock of the task is avoided, namely the matched task amount can be distributed for the processing terminal, and the overstock of the task is avoided.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
FIG. 1 is a schematic diagram illustrating a task processing flow according to an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating the process of determining the total estimated throughput in the embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a task processing flow according to a second embodiment of the present application;
FIG. 4 is a schematic diagram of task processing flow in the third embodiment of the present application;
FIG. 5 is a schematic diagram of task processing flow in the fourth embodiment of the present application;
FIG. 6 is a schematic diagram of task processing flow in the fifth embodiment of the present application;
FIG. 7 is a schematic diagram of an apparatus for implementing the above technique in an embodiment of the present application;
fig. 8 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
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 a part of the embodiments of the present application, and not all of the 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.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, article, or apparatus.
The technical solution of the present invention will be described in detail with specific examples. Several of the following embodiments may be combined with each other and some details of the same or similar concepts or processes may not be repeated in some embodiments.
The embodiment of the application provides a task processing method which is applied to a scene needing to be processed by multiple tasks.
The device for realizing task processing may be referred to as a processing device for short, and may be a PC, a server, or the like when being specifically realized.
In the embodiment of the present application, specific content of the task is not limited, for example, the specific content may be processing of a document for determining responsibility for a business flow exception or an information exception, or may be processing of an order business.
In the embodiment of the present application, three treatment pools are involved, which are respectively: pre-estimating a processing pool, a waiting pool and a backup pool;
the pre-estimated processing pool is used for storing tasks to be issued to the processing terminal in the current period, and the tasks in the waiting pool and the backup pool are stored and deleted according to task priorities;
aiming at a waiting pool, storing tasks which cannot be stored in a pre-estimation processing pool in each period, moving the tasks into the pre-estimation processing pool according to a time sequence when monitoring that the task quantity stored in the pre-estimation processing pool in the current period does not reach the pre-estimation processing quantity, and storing and deleting the tasks with the pre-estimation processing pool and a backup pool according to task priorities;
for the reason that the backup pool is used for storing the tasks with low priority removed from the processing pool and the waiting pool when the backlog task amount in the waiting pool reaches the preset waiting task amount, the tasks in the backup pool may be deleted or reserved as backups for the related managers to check, and the related managers may also perform designated processing under a certain condition, which is not limited in the embodiment of the present application.
The task processing procedure is described in detail below with reference to the accompanying drawings.
Example one
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a task processing flow in a first embodiment of the present application. The method comprises the following specific steps:
and step 101, acquiring a newly added task to be processed.
And 102, responding to the fact that the task quantity stored in the pre-estimation processing pool in the current period is smaller than the total pre-estimation processing quantity, storing the newly added task to be processed into the pre-estimation processing pool, and waiting for being allocated to the processing terminal for processing.
The total estimated processing amount is the sum of the sub estimated processing amounts of the processing terminals of the processing tasks in the current period; and the sub-estimated processing amount of the processing terminal is determined according to the historical task processing amount of the processing terminal.
Referring to fig. 2, fig. 2 is a schematic flow chart of determining the total estimated throughput in the embodiment of the present application. The method comprises the following specific steps:
step 201, determining the sub-estimated processing amount of the processing terminal in the current period according to the historical task processing amount of the processing terminal.
In the embodiment of the present application, when acquiring the sub-estimated processing amount of the processing terminal in the current period, the sub-estimated processing amount is determined according to the historical task processing amount of the processing terminal, specifically, the following two ways are given, but not limited to implementation of the following two ways:
a description of the data used in both modes is given first:
the period is an evaluation unit of the task processing amount, such as one day, one week, one month and the like, is not limited, and can be configured according to actual needs;
the configured pressure value is a dynamically variable value and can be reset for each period; during setting, adjusting the pressure value of the sub-estimated processing amount calculated in the current period according to the task amount in the estimated processing pool and the task amount in the waiting pool when the previous period is finished;
in a specific implementation, a range is set for the configured pressure value, for example, a value between 0.5 and 1.5, that is, when the configured pressure value is adjusted, the adjustment is performed within a certain range.
In a specific implementation, the same configured pressure value may be set for all the processing terminals, or the configured pressure values may be set according to the task processing capability of each processing terminal.
The following respectively gives concrete implementation processes of two implementation modes:
the first method comprises the following steps:
firstly, acquiring historical task processing amount of the processing terminal in a plurality of continuous periods.
If the setting period is 1 day, the historical task processing amount of each processing terminal for 7 days or 1 month can be obtained.
And secondly, determining an average value of a plurality of continuous periodic processing task quantities as a basic task quantity.
The average value of the 7-day or 1-month processing task amount of each processing terminal is calculated as the basic task amount of the processing terminal.
And thirdly, calculating the product of the basic task amount and the configured pressure value to be used as the sub-estimated processing amount of the processing terminal.
And the second method comprises the following steps:
firstly, acquiring historical task processing amount of the processing terminal in a plurality of continuous periods.
If the current period is 1 day, the historical task processing amount of each processing terminal for 7 consecutive days or 1 month can be obtained.
And secondly, determining the task quantity corresponding to the period with the maximum historical task quantity as a basic task quantity.
And respectively determining the task quantity processed on the day with the largest processing task quantity median in 7 days or 1 month as the basic task quantity of each processing terminal.
And thirdly, calculating the product of the basic task amount and the configured pressure value to be used as the sub-estimated processing amount of the processing terminal.
Step 202, determining the total estimated processing amount as the sum of the sub estimated processing amounts of a plurality of processing terminals.
If the three processing terminals exist, the sum of the sub-estimated processing capacities of the three processing terminals is used as the total estimated processing capacity, the total estimated processing capacity is the capacity of an estimated processing pool, and the estimated processing pool is a data set used for distributing tasks.
According to the embodiment of the application, the capacity of the pre-estimated processing pool is determined through the historical task processing capacity of the processing terminal for processing the tasks, so that the task capacity matched with the processing capacity of the processing terminal is distributed, the processing terminal can timely and efficiently process the distributed task capacity, and the overstock of the tasks is avoided.
Example two
Referring to fig. 3, fig. 3 is a schematic diagram of a task processing flow in the second embodiment of the present application. The method comprises the following specific steps:
step 301, acquiring a newly added task to be processed.
Step 302, in response to that the task quantity stored in the pre-estimation processing pool in the current period is smaller than the total pre-estimation processing quantity, storing the newly added task to be processed into the pre-estimation processing pool, and waiting for being allocated to the processing terminal for processing. The flow is ended.
Step 303, in response to that the task amount stored in the pre-estimation processing pool in the current period is not less than the total pre-estimation processing amount, storing the newly added task to be processed into a waiting pool.
The total estimated processing amount is the sum of the sub estimated processing amounts of the processing terminals of the processing tasks in the current period; and the sub-estimated processing amount of the processing terminal is determined according to the historical task processing amount of the processing terminal.
According to the embodiment of the application, the capacity of the pre-estimation processing pool is determined through the historical task processing capacity of the processing terminal for processing the tasks, so that the task capacity matched with the processing capacity of the processing terminal is distributed, and when the capacity of the pre-estimation processing pool is exceeded, the task capacity is temporarily stored in the waiting pool, so that the processing terminal can timely and efficiently process the distributed task capacity, and the overstock of the tasks is avoided.
EXAMPLE III
Referring to fig. 4, fig. 4 is a schematic diagram of a task processing flow in the third embodiment of the present application. The method comprises the following specific steps:
step 401, monitoring the task amount stored in the estimation processing pool in the current period.
Step 402, when it is monitored that the task quantity stored in the pre-estimation processing pool in the current period is smaller than the total pre-estimation processing quantity and the tasks exist in the waiting pool, moving the tasks in the waiting pool into the pre-estimation processing pool according to the sequence stored in the waiting pool; until the total estimated processing capacity of the pool in the estimation pool is reached or no task exists in the waiting pool.
During specific implementation, if the task quantity stored in the estimation processing pool in the current period is 100, the task quantity in the waiting pool is 200;
when the total estimated processing amount obtained by calculation is 250, if the monitored task amount in the estimated processing pool is less than 250, 150 tasks in the waiting pool are moved into the estimated processing pool according to the sequence stored in the waiting pool.
When the total estimated processing amount obtained by calculation is 400, if the monitored task amount in the estimated processing pool is less than 400, 200 tasks in the waiting pool are moved into the estimated processing pool according to the sequence stored in the waiting pool.
When the tasks in the waiting pool are moved into the pre-estimation processing pool, the corresponding time of the tasks is recorded as the time stored in the waiting pool, but not the time moved into the pre-estimation processing pool from the waiting pool.
If the storage time of the task A stored in the waiting pool is T1, and the time for moving the task A from the waiting pool to the estimated processing pool is T1+ T1, the time corresponding to the task A moved into the estimated processing pool is T1, that is, the task A is processed according to the time T1.
In the embodiment of the application, when the task quantity allocated in the pre-estimation processing pool in the current period is insufficient, the tasks which cannot be processed in time in the waiting pool are scheduled to obtain the timely processing of the accumulated data, and the task quantity in the pre-estimation processing pool is matched with the processing quantity of the processing terminal, so that the task processing efficiency is improved.
Example four
Referring to fig. 5, fig. 5 is a schematic diagram of a task processing flow in the fourth embodiment of the present application. The method comprises the following specific steps:
and step 501, when a plurality of processing terminals for processing tasks are provided, sending the tasks in the estimated processing pool to the processing terminals in a polling manner according to the sequence of the storage time.
The time corresponding to the task moved from the waiting pool to the pre-estimated processing pool is the time stored in the waiting pool;
step 502, when polling to the processing terminal, determining whether the task amount issued to the processing terminal in the current period is less than the sub-estimated processing amount of the processing terminal, if so, executing step 503; otherwise, step 504 is performed.
Step 503, issuing the task to the processing terminal, deleting the task successfully issued to the processing terminal from the pre-estimation processing pool, and ending the process.
And step 504, suspending the task issuing to the processing terminal.
The embodiment of the application provides the process of issuing the task to the processing terminal for processing the task, and the task is issued randomly in a polling mode, so that the unfairness phenomenon caused by difficulty of the task is avoided, the processing capacity of each processing terminal is considered during issuing, the task volume issued in the current period reaches the sub-estimated processing volume of the processing terminal, the task issuing by the processing terminal is not like any more, even if the processing terminal processes enough workload, the overstock of the task due to too large pressure is avoided, the planned task distribution is achieved, and the efficiency and the enthusiasm of processing the task are improved.
EXAMPLE five
Referring to fig. 6, fig. 6 is a schematic diagram of a task processing flow in the fourth embodiment of the present application. The method comprises the following specific steps:
step 601, monitoring the task amount in the waiting pool.
Step 602, when it is monitored that the task amount in the waiting pool is greater than a preset waiting task amount, moving the task with the lowest priority in the pre-estimation processing pool into a backup pool, moving the task with the lowest priority in the waiting pool into the backup pool, and moving the task with the highest priority in the waiting pool into the pre-estimation processing pool.
The preset waiting task amount in this step may be a preset value, or may be a multiple of the total estimated throughput according to the current period, for example, 5 times the total estimated throughput.
The priority of the tasks is determined according to the service types corresponding to the tasks.
During specific implementation, the corresponding priority can be pre-allocated to the service type according to the application scenario, and the corresponding priority can also be pre-allocated according to the task characteristics and types.
The specific allocation mode is determined according to the application scenario, and the priorities may be different in the same task or different scenarios for the service type, which is not limited in the embodiment of the present application.
In the embodiment of the application, the tasks with low priority in the pre-estimation processing pool are removed, the tasks with high priority are entered, the pre-estimation processing pool is gradually optimized in an iterative manner, and the tasks with high priority can be processed on the premise of considering time.
Based on the same inventive concept, the embodiment of the application also provides a task processing device. Referring to fig. 7, fig. 7 is a schematic structural diagram of an apparatus applied to the above technology in the embodiment of the present application. The device comprises: an acquisition unit 701 and a storage unit 702;
an obtaining unit 701, configured to obtain a newly added task to be processed;
the storage unit 702 is configured to, in response to that the task amount stored in the pre-estimation processing pool in the current period is smaller than the total pre-estimation processing amount, store the newly added to-be-processed task acquired by the acquisition unit 701 in the pre-estimation processing pool, and wait for allocation to the processing terminal for processing; the total estimated processing amount is the sum of the sub estimated processing amounts of the processing terminals of the processing tasks in the current period; and the sub-estimated processing amount of the processing terminal is determined according to the historical task processing amount of the processing terminal.
Preferably, the apparatus further comprises: a calculation unit 703;
the calculating unit 703, when determining the sub-estimated throughput of the processing terminal of the processing task in the current period, includes: acquiring historical task processing capacity of the processing terminal in a plurality of continuous periods; determining an average value of a plurality of continuous periodic processing task quantities as a basic task quantity; and calculating the product of the basic task quantity and the configured pressure value to be used as the sub-estimated processing quantity of the processing terminal.
Preferably, the apparatus further comprises: a calculation unit 703;
the calculating unit 703 is configured to determine the sub-estimated throughput of the processing terminal of the processing task in the current period, and includes: acquiring historical task processing capacity of the processing terminal in a plurality of continuous periods; determining the task quantity corresponding to the period with the maximum historical task quantity as a basic task quantity; and calculating the product of the basic task quantity and the configured pressure value to be used as the sub-estimated processing quantity of the processing terminal.
Preferably, the apparatus further comprises: a calculation unit 703;
the storage unit 702 is further configured to, in response to that the task amount stored in the pre-estimation processing pool in the current period is not less than the total pre-estimation processing amount, store the newly added task to be processed into the waiting pool;
the calculating unit 703 is configured to adjust the pressure value of the estimated processing amount of the calculating operator in the current period according to the task amount in the estimated processing pool and the task amount in the waiting pool of the storing unit 702 when the previous period ends.
Preferably, the apparatus further comprises: a monitoring unit 704;
a monitoring unit 704, configured to monitor the amount of tasks stored in the pre-estimated processing pool in the current period;
the storage unit 702 is further configured to, when the monitoring unit 704 monitors that the task amount stored in the pre-estimation processing pool in the current period is smaller than the total pre-estimation processing amount and there is a task in the waiting pool, move the tasks in the waiting pool into the pre-estimation processing pool according to the sequence stored in the waiting pool until the total pre-estimation processing amount in the pre-estimation pool is reached or there is no task in the waiting pool.
Preferably, the apparatus further comprises: a monitoring unit 704;
a monitoring unit 704, configured to monitor the task amount in the waiting pool;
the storage unit 702 is further configured to, when the monitoring unit 704 monitors that the task amount in the waiting pool is greater than a preset waiting task amount, move the task with the lowest priority in the pre-estimated processing pool into the backup pool, move the task with the lowest priority in the waiting pool into the backup pool, and move the task with the highest priority in the waiting pool into the pre-estimated processing pool; the priority of the tasks is determined according to the service types corresponding to the tasks.
Preferably, the apparatus further comprises: a distribution unit 705;
the distributing unit 705 is configured to, when a plurality of processing terminals for processing tasks are provided, issue the tasks in the estimated processing pool in the storage unit 702 to the processing terminals in a polling manner according to the sequence of the storage time; the time corresponding to the task moved from the waiting pool to the pre-estimated processing pool is the time stored in the waiting pool; when polling the processing terminal, determining whether the task quantity issued to the processing terminal in the current period is smaller than the sub-estimated processing quantity of the processing terminal, and if so, issuing a task to the processing terminal; otherwise, suspending the task issuing to the processing terminal;
the storage unit 702 is further configured to delete the task successfully issued to the processing terminal by the distribution unit 705 from the pre-estimation processing pool.
The units of the above embodiments may be integrated into one body, or may be separately deployed; may be combined into one unit or further divided into a plurality of sub-units.
In another embodiment, an electronic device is also provided, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the task processing method when executing the program.
In another embodiment, a computer readable storage medium is also provided, on which computer instructions are stored, which when executed by a processor may implement the steps in the task processing method.
Fig. 8 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 8, the electronic device may include: a Processor (Processor)810, a communication Interface 820, a Memory 830 and a communication bus 840, wherein the Processor 810, the communication Interface 820 and the Memory 830 communicate with each other via the communication bus 840. The processor 810 may call logic instructions in the memory 830 to perform the following method:
acquiring a newly added task to be processed;
in response to the fact that the task quantity stored in the pre-estimation processing pool in the current period is smaller than the total pre-estimation processing quantity, storing the newly-added task to be processed into the pre-estimation processing pool, and waiting for being allocated to the processing terminal for processing;
the total estimated processing amount is the sum of the sub estimated processing amounts of the processing terminals of the processing tasks in the current period; and the sub-estimated processing amount of the processing terminal is determined according to the historical task processing amount of the processing terminal.
In addition, the logic instructions in the memory 830 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (11)

1. A method for processing a task, the method comprising:
acquiring a newly added task to be processed;
in response to the fact that the task quantity stored in the pre-estimation processing pool in the current period is smaller than the total pre-estimation processing quantity, storing the newly-added task to be processed into the pre-estimation processing pool, and waiting for being allocated to the processing terminal for processing;
the total estimated processing amount is the sum of the sub estimated processing amounts of the processing terminals of the processing tasks in the current period; and the sub-estimated processing amount of the processing terminal is determined according to the historical task processing amount of the processing terminal.
2. The method of claim 1, wherein determining the sub-estimated throughput of the processing terminal of the current-cycle processing task comprises:
acquiring historical task processing capacity of the processing terminal in a plurality of continuous periods;
determining an average value of a plurality of continuous periodic processing task quantities as a basic task quantity;
and calculating the product of the basic task quantity and the configured pressure value to be used as the sub-estimated processing quantity of the processing terminal.
3. The method of claim 1, wherein determining the sub-estimated throughput of the processing terminal of the current-cycle processing task comprises:
acquiring historical task processing capacity of the processing terminal in a plurality of continuous periods;
determining the task quantity corresponding to the period with the maximum historical task quantity as a basic task quantity;
and calculating the product of the basic task quantity and the configured pressure value to be used as the sub-estimated processing quantity of the processing terminal.
4. The method of claim 1, further comprising:
responding to the fact that the task quantity stored in the pre-estimation processing pool in the current period is not smaller than the total pre-estimation processing quantity, and storing the newly-added task to be processed into a waiting pool;
and adjusting the pressure value of the estimated processing amount of the calculation operator in the current period according to the task amount in the estimated processing pool and the task amount in the waiting pool when the previous period is finished.
5. The method of claim 4, further comprising:
monitoring the task quantity stored in the pre-estimation processing pool in the current period;
when the fact that the task quantity stored in the pre-estimation processing pool in the current period is smaller than the total pre-estimation processing quantity and the tasks exist in the waiting pool is monitored, the tasks in the waiting pool are moved into the pre-estimation processing pool according to the sequence stored in the waiting pool until the total pre-estimation processing quantity of the pool in the pre-estimation pool is reached or the tasks do not exist in the waiting pool.
6. The method of claim 4, further comprising:
monitoring the task amount in the waiting pool;
when the monitored task amount in the waiting pool is larger than the preset waiting task amount, moving the task with the lowest priority in the pre-estimation processing pool into a backup pool, moving the task with the lowest priority in the waiting pool into the backup pool, and moving the task with the highest priority in the waiting pool into the pre-estimation processing pool; the priority of the tasks is determined according to the service types corresponding to the tasks.
7. The method of claim 4, wherein issuing the task in the pre-estimation processing pool to the processing terminal comprises:
when a plurality of processing terminals for processing tasks are available, tasks in the pre-estimated processing pool are issued to the processing terminals in a polling mode according to the sequence of the storage time; the time corresponding to the task moved from the waiting pool to the pre-estimated processing pool is the time stored in the waiting pool;
when polling the processing terminal, determining whether the task quantity issued to the processing terminal in the current period is smaller than the sub-estimated processing quantity of the processing terminal, and if so, issuing a task to the processing terminal; otherwise, suspending the task issuing to the processing terminal;
and deleting the task successfully issued to the processing terminal from the pre-estimation processing pool.
8. A task processing apparatus, characterized in that the apparatus comprises: an acquisition unit and a storage unit;
the acquisition unit is used for acquiring a newly added task to be processed;
the storage unit is used for responding to the fact that the task quantity stored in the pre-estimation processing pool in the current period is smaller than the total pre-estimation processing quantity, storing the newly-added task to be processed into the pre-estimation processing pool, and waiting for being allocated to the processing terminal for processing; the total estimated processing amount is the sum of the sub estimated processing amounts of the processing terminals of the processing tasks in the current period; and the sub-estimated processing amount of the processing terminal is determined according to the historical task processing amount of the processing terminal.
9. The apparatus of claim 8, wherein the apparatus further comprises a computing unit;
the storage unit is further used for responding that the task quantity stored in the pre-estimation processing pool in the current period is not less than the total pre-estimation processing quantity, and storing the newly-added task to be processed into a waiting pool;
and the calculating unit is used for adjusting the pressure value of the estimated processing amount of the calculating operator in the current period according to the task amount in the estimated processing pool and the task amount in the waiting pool in the storage unit when the previous period is finished.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-7 when executing the program.
11. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method of any one of claims 1 to 7.
CN202010656917.2A 2020-07-09 2020-07-09 Task processing method and device Pending CN113760520A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010656917.2A CN113760520A (en) 2020-07-09 2020-07-09 Task processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010656917.2A CN113760520A (en) 2020-07-09 2020-07-09 Task processing method and device

Publications (1)

Publication Number Publication Date
CN113760520A true CN113760520A (en) 2021-12-07

Family

ID=78785473

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010656917.2A Pending CN113760520A (en) 2020-07-09 2020-07-09 Task processing method and device

Country Status (1)

Country Link
CN (1) CN113760520A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109597685A (en) * 2018-09-30 2019-04-09 阿里巴巴集团控股有限公司 Method for allocating tasks, device and server
CN110113387A (en) * 2019-04-17 2019-08-09 深圳前海微众银行股份有限公司 A kind of processing method based on distributed batch processing system, apparatus and system
WO2019196220A1 (en) * 2018-04-09 2019-10-17 平安科技(深圳)有限公司 Method for monitoring dialing task, electronic device and computer readable storage medium
CN110912958A (en) * 2018-09-18 2020-03-24 中国移动通信集团重庆有限公司 HTTP connection processing method, device, equipment and medium
CN111045825A (en) * 2019-12-12 2020-04-21 深圳前海环融联易信息科技服务有限公司 Batch processing performance optimization method and device, computer equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019196220A1 (en) * 2018-04-09 2019-10-17 平安科技(深圳)有限公司 Method for monitoring dialing task, electronic device and computer readable storage medium
CN110912958A (en) * 2018-09-18 2020-03-24 中国移动通信集团重庆有限公司 HTTP connection processing method, device, equipment and medium
CN109597685A (en) * 2018-09-30 2019-04-09 阿里巴巴集团控股有限公司 Method for allocating tasks, device and server
CN110113387A (en) * 2019-04-17 2019-08-09 深圳前海微众银行股份有限公司 A kind of processing method based on distributed batch processing system, apparatus and system
CN111045825A (en) * 2019-12-12 2020-04-21 深圳前海环融联易信息科技服务有限公司 Batch processing performance optimization method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107832126B (en) Thread adjusting method and terminal thereof
CN106209682B (en) Business scheduling method, device and system
CN108446176B (en) Task allocation method, computer readable storage medium and terminal device
CN108881495B (en) Resource allocation method, device, computer equipment and storage medium
CN102567086B (en) Task scheduling method, equipment and system
EP2372551B1 (en) Real time backup storage node assignment
CN109889999B (en) Flow pool management method, system and terminal of Internet of things card
CN110138883B (en) Hybrid cloud resource allocation method and device
CN105049268A (en) Distributed computing resource allocation system and task processing method
CN111858055B (en) Task processing method, server and storage medium
CN111290917A (en) YARN-based resource monitoring method and device and terminal equipment
CN112579263A (en) Task execution method and device, storage medium and electronic equipment
CN104182282A (en) Overload protection system and method for server
CN104363282A (en) Cloud computing resource scheduling method and device
CN110011843A (en) Alarm information processing method, electronic equipment and storage medium
CN108681481A (en) The processing method and processing device of service request
CN110321364B (en) Transaction data query method, device and terminal of credit card management system
CN107506242A (en) A kind of quota application method and system
CN113760520A (en) Task processing method and device
CN109040491B (en) Hanging-up behavior processing method and device, computer equipment and storage medium
CN116932220A (en) Resource adjustment method and device for service cluster, electronic equipment and storage medium
CN109257256A (en) Apparatus monitoring method, device, computer equipment and storage medium
CN111353712B (en) Distribution task scheduling method and device, server and storage medium
CN108494978B (en) Agent task management method and device, computer equipment and storage medium
CN110955644A (en) IO control method, device, equipment and storage medium of storage system

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