CN107870822B - Asynchronous task control method and system based on distributed system - Google Patents

Asynchronous task control method and system based on distributed system Download PDF

Info

Publication number
CN107870822B
CN107870822B CN201610854007.9A CN201610854007A CN107870822B CN 107870822 B CN107870822 B CN 107870822B CN 201610854007 A CN201610854007 A CN 201610854007A CN 107870822 B CN107870822 B CN 107870822B
Authority
CN
China
Prior art keywords
asynchronous
tasks
asynchronous task
distributed system
database
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610854007.9A
Other languages
Chinese (zh)
Other versions
CN107870822A (en
Inventor
唐雁斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201610854007.9A priority Critical patent/CN107870822B/en
Publication of CN107870822A publication Critical patent/CN107870822A/en
Application granted granted Critical
Publication of CN107870822B publication Critical patent/CN107870822B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/54Indexing scheme relating to G06F9/54
    • G06F2209/548Queue

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an asynchronous task control method based on a distributed system, which comprises the following steps: the asynchronous task control system establishes an asynchronous task queue for the asynchronous tasks of the corresponding distributed system and monitors the number of the asynchronous tasks in the asynchronous task queue; if the number of the asynchronous tasks is smaller than a preset threshold value, acquiring a database lock from a database system, capturing a preset number of asynchronous tasks for the distributed system, and putting the asynchronous tasks into an asynchronous task queue; and generating corresponding task processing identifiers for the captured asynchronous tasks to prevent the captured asynchronous tasks from being captured by other asynchronous task control systems, and releasing the acquired database locks for the asynchronous task control systems corresponding to the distributed systems to acquire. The invention also discloses an asynchronous task control system based on the distributed system. The invention fully utilizes each distributed system to process the asynchronous task, and effectively improves the asynchronous task processing capability of the whole distributed system.

Description

Asynchronous task control method and system based on distributed system
Technical Field
The invention relates to the technical field of computers, in particular to an asynchronous task control method and system based on a distributed system.
Background
With the advent of the mobile internet, cloud computing and big data era, asynchronous task processing of the existing distributed system can only be processed by a single thread or a designated single server, overload operation of some distributed systems is often easy to occur, and the condition that some distributed systems are in an idle state occurs, so that the performance of the whole distributed system cannot be fully utilized to perform asynchronous task processing, and the task processing efficiency is low.
Disclosure of Invention
The invention mainly aims to provide an asynchronous task control method and an asynchronous task control system based on a distributed system, and aims to improve the asynchronous task processing capacity of the distributed system.
In order to achieve the above object, the present invention provides an asynchronous task control method based on a distributed system, which includes the following steps:
the asynchronous task control system establishes an asynchronous task queue for the asynchronous tasks of the corresponding distributed system and monitors the number of the asynchronous tasks in the asynchronous task queue;
if the number of the asynchronous tasks in the asynchronous task queue is smaller than a preset threshold value, a database lock is obtained from a database system;
if the database lock is successfully acquired from the database system, capturing a preset number of asynchronous tasks for the distributed system, and putting the asynchronous tasks into the asynchronous task queue;
and generating corresponding task processing identifiers for the captured asynchronous tasks to prevent the captured asynchronous tasks from being captured by asynchronous task control systems corresponding to other distributed systems, and releasing the acquired database locks to allow the asynchronous task control systems corresponding to the distributed systems to acquire the acquired asynchronous tasks.
Preferably, the step of grabbing a preset number of asynchronous tasks for the distributed system and placing the asynchronous tasks into the asynchronous task queue if the database lock is successfully acquired from the database system includes:
and if the asynchronous task control system successfully acquires a database lock from the database system and the difference value number between the preset threshold value and the number of the asynchronous tasks in the asynchronous task queue is greater than or equal to a preset fixed number, grabbing the asynchronous tasks with the preset fixed number for the distributed system and putting the asynchronous tasks into the asynchronous task queue for the distributed system to process the asynchronous tasks in the asynchronous task queue.
Preferably, the step of grabbing a preset number of asynchronous tasks for the distributed system and placing the asynchronous tasks into the asynchronous task queue if the database lock is successfully acquired from the database system comprises:
and if the asynchronous task control system successfully acquires a database lock from the database system and the difference value number between the preset threshold value and the number of the asynchronous tasks in the asynchronous task queue is smaller than a preset fixed number, grabbing the asynchronous tasks with the difference value number for the distributed system and putting the asynchronous tasks into the asynchronous task queue for the distributed system to process the asynchronous tasks in the asynchronous task queue.
Preferably, the method further comprises:
and if the number of the asynchronous tasks in the asynchronous task queue is greater than or equal to a preset threshold value, the asynchronous task control system stops acquiring the database lock from the database system.
In addition, to achieve the above object, the present invention further provides an asynchronous task control system based on a distributed system, where the asynchronous task control system includes:
the system comprises an establishing module, a processing module and a processing module, wherein the establishing module is used for establishing an asynchronous task queue for the asynchronous task of a corresponding distributed system and monitoring the number of the asynchronous tasks in the asynchronous task queue;
the acquisition module is used for acquiring a database lock from a database system if the number of the asynchronous tasks in the asynchronous task queue is less than a preset threshold value;
the grabbing module is used for grabbing a preset number of asynchronous tasks for the distributed system and putting the asynchronous tasks into the asynchronous task queue if the database lock is successfully acquired from the database system;
and the identification module is used for generating corresponding task processing identification for each captured asynchronous task so as to prevent each captured asynchronous task from being captured by the asynchronous task control systems corresponding to other distributed systems, and releasing the acquired database lock so as to be acquired by the asynchronous task control systems corresponding to the distributed systems.
Preferably, the grasping module is further configured to:
and if the asynchronous task control system successfully acquires a database lock from the database system and the difference value number between the preset threshold value and the number of the asynchronous tasks in the asynchronous task queue is greater than or equal to a preset fixed number, grabbing the asynchronous tasks with the preset fixed number for the distributed system and putting the asynchronous tasks into the asynchronous task queue for the distributed system to process the asynchronous tasks in the asynchronous task queue.
Preferably, the grasping module is further configured to:
and if the asynchronous task control system successfully acquires a database lock from the database system and the difference value number between the preset threshold value and the number of the asynchronous tasks in the asynchronous task queue is smaller than a preset fixed number, grabbing the asynchronous tasks with the difference value number for the distributed system and putting the asynchronous tasks into the asynchronous task queue for the distributed system to process the asynchronous tasks in the asynchronous task queue.
Preferably, the asynchronous task control system further comprises:
and the stopping module is used for stopping acquiring the database lock from the database system if the number of the asynchronous tasks in the asynchronous task queue is greater than or equal to a preset threshold value.
According to the asynchronous task control method and system based on the distributed system, an asynchronous task queue is established for the asynchronous tasks of the corresponding distributed system through the asynchronous task control system, if the number of the asynchronous tasks in the asynchronous task queue is smaller than a preset threshold value through monitoring, a database lock is obtained from a database system at regular time, and the asynchronous tasks of the preset number are captured for the distributed system and are placed into the asynchronous task queue. When the asynchronous task control system monitors that the number of the current asynchronous tasks of the corresponding distributed system is less, the asynchronous task control system can capture additional asynchronous tasks from the system to the asynchronous task queue of the distributed system for processing by the distributed system, so that each distributed system is fully utilized to process the asynchronous tasks, and the asynchronous task processing capacity of the whole distributed system is effectively improved.
Drawings
FIG. 1 is a schematic flow chart of a first embodiment of an asynchronous task control method based on a distributed system according to the present invention;
FIG. 2 is a flowchart illustrating a second embodiment of the asynchronous task control method based on a distributed system according to the present invention;
FIG. 3 is a functional block diagram of a first embodiment of an asynchronous task control system according to the present invention;
FIG. 4 is a functional block diagram of a second embodiment of an asynchronous task control system according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Distributed systems (distributed systems) are software systems built on top of a network. In a distributed system, a set of independent computers appear to the user as a unified whole, as if it were a system. The system has various general physical and logical resources, can dynamically allocate tasks, and realizes information exchange by the dispersed physical and logical resources through a computer network. There is a distributed operating system in the system that manages computer resources in a global manner. Typically, a distributed system has only one model or paradigm for users, and there is a layer of software middleware (middleware) above the operating system that is responsible for implementing this model. The invention provides an asynchronous task control method based on a distributed system.
Referring to fig. 1, fig. 1 is a schematic flow chart of a first embodiment of an asynchronous task control method based on a distributed system according to the present invention.
In a first embodiment, the asynchronous task control method based on the distributed system comprises the following steps:
step S10, the asynchronous task control system establishes an asynchronous task queue for the asynchronous tasks of the corresponding distributed system and monitors the number of the asynchronous tasks in the asynchronous task queue;
in this embodiment, each distributed system corresponds to one asynchronous task control system, and the asynchronous task control system manages and controls the asynchronous tasks of the corresponding distributed system. For example, the asynchronous task control system collects all asynchronous tasks of the corresponding distributed system, establishes an asynchronous task queue for all asynchronous tasks of the distributed system, and monitors the number of the asynchronous tasks in the established asynchronous task queue, so that the current task burden of the distributed system can be grasped in real time.
Step S20, if the number of asynchronous tasks in the asynchronous task queue is less than a preset threshold value, a database lock is obtained from a database system;
step S30, if the database lock is successfully acquired from the database system, a preset number of asynchronous tasks are captured for the distributed system and are placed into the asynchronous task queue;
when the asynchronous task control system monitors that the number of asynchronous tasks in the asynchronous task queue of the corresponding distributed system is smaller than a preset threshold (for example, 20), it indicates that the distributed system currently has fewer asynchronous tasks, that is, the distributed system is currently in a less idle state, and the processing capacity of the distributed system is only used a little. The asynchronous task control system acquires the database lock from the database system in real time or at regular time, and after the database lock is successfully acquired from the database system, a preset number (for example, 3) of additional asynchronous tasks, such as asynchronous tasks that cannot be processed by other distributed systems at present, can be captured for the distributed system. And the captured extra asynchronous tasks are placed into the asynchronous task queue of the distributed system, so that the distributed system can process all the asynchronous tasks of the distributed system and the captured extra asynchronous tasks in the asynchronous task queue, and the asynchronous task processing capacity of the distributed system is fully utilized.
And step S40, generating corresponding task processing identifiers for the captured asynchronous tasks to prevent the captured asynchronous tasks from being captured by asynchronous task control systems corresponding to other distributed systems, and releasing the acquired database locks for the asynchronous task control systems corresponding to the distributed systems to acquire. In this way, each distributed system can control each distributed system to sequentially grab and process additional asynchronous tasks except the own asynchronous task through the database lock in addition to processing the own asynchronous task.
In this embodiment, an asynchronous task queue is established for an asynchronous task of a corresponding distributed system through an asynchronous task control system, and if it is monitored that the number of asynchronous tasks in the asynchronous task queue is less than a preset threshold, a database lock is periodically acquired from a database system, and a preset number of asynchronous tasks are captured for the distributed system and are placed in the asynchronous task queue. When the asynchronous task control system monitors that the number of the current asynchronous tasks of the corresponding distributed system is less, the asynchronous task control system can capture additional asynchronous tasks from the system to the asynchronous task queue of the distributed system for processing by the distributed system, so that each distributed system is fully utilized to process the asynchronous tasks, and the asynchronous task processing capacity of the whole distributed system is effectively improved.
Further, in other embodiments, the step S30 may include:
if the asynchronous task control system successfully acquires a database lock from the database system and the difference value number between the preset threshold value and the number of the asynchronous tasks in the asynchronous task queue is larger than or equal to a preset fixed number, it indicates that the number of the asynchronous tasks of the distributed system is smaller, and the distributed system is in a more idle state, the asynchronous tasks of the preset fixed number are captured for the distributed system and are put into the asynchronous task queue, so that the distributed system can process the asynchronous tasks in the asynchronous task queue.
Further, in other embodiments, the step S30 may include:
if the asynchronous task control system successfully acquires a database lock from the database system and the difference value between the preset threshold and the number of the asynchronous tasks in the asynchronous task queue is smaller than the preset fixed number, it indicates that the current self asynchronous task amount of the distributed system does not reach a saturation state, but the difference value is not much from the set maximum working threshold, so that the asynchronous tasks with the difference value can only be captured for the distributed system and placed into the asynchronous task queue for the distributed system to process the asynchronous tasks in the asynchronous task queue.
As shown in fig. 2, a second embodiment of the present invention provides an asynchronous task control method based on a distributed system, and on the basis of the above embodiments, the method further includes:
step S50, if the number of asynchronous tasks in the asynchronous task queue is greater than or equal to a preset threshold, the asynchronous task control system stops acquiring a database lock from the database system.
In this embodiment, when the asynchronous task control system monitors that the number of asynchronous tasks in the asynchronous task queue of the corresponding distributed system is greater than or equal to a preset threshold (for example, 20), it indicates that the distributed system has more asynchronous tasks, and reaches or approaches to a working saturation state, and cannot process additional asynchronous tasks. The asynchronous task control system stops acquiring the database lock from the database system to stop capturing additional asynchronous tasks for the distributed system to avoid exceeding the asynchronous task processing capacity of the distributed system.
The invention further provides an asynchronous task control system based on the distributed system. Distributed systems (distributed systems) are software systems built on top of a network. In a distributed system, a set of independent computers appear to the user as a unified whole, as if it were a system. The system has various general physical and logical resources, can dynamically allocate tasks, and realizes information exchange by the dispersed physical and logical resources through a computer network. There is a distributed operating system in the system that manages computer resources in a global manner. Typically, a distributed system has only one model or paradigm for users, and there is a layer of software middleware (middleware) above the operating system that is responsible for implementing this model. The invention provides an asynchronous task control method based on a distributed system.
Referring to fig. 3, fig. 3 is a functional module schematic diagram of a first embodiment of the asynchronous task control system based on a distributed system according to the present invention.
In a first embodiment, the distributed system based asynchronous task control system comprises:
the establishing module 01 is used for establishing an asynchronous task queue for the asynchronous tasks of the corresponding distributed system and monitoring the number of the asynchronous tasks in the asynchronous task queue;
in this embodiment, each distributed system corresponds to one asynchronous task control system, and the asynchronous task control system manages and controls the asynchronous tasks of the corresponding distributed system. For example, the asynchronous task control system collects all asynchronous tasks of the corresponding distributed system, establishes an asynchronous task queue for all asynchronous tasks of the distributed system, and monitors the number of the asynchronous tasks in the established asynchronous task queue, so that the current task burden of the distributed system can be grasped in real time.
The obtaining module 02 is configured to obtain a database lock from a database system if the number of asynchronous tasks in the asynchronous task queue is smaller than a preset threshold;
the grabbing module 03 is configured to grab a preset number of asynchronous tasks for the distributed system and place the asynchronous tasks into the asynchronous task queue if the database lock is successfully acquired from the database system;
when the asynchronous task control system monitors that the number of asynchronous tasks in the asynchronous task queue of the corresponding distributed system is smaller than a preset threshold (for example, 20), it indicates that the distributed system currently has fewer asynchronous tasks, that is, the distributed system is currently in a less idle state, and the processing capacity of the distributed system is only used a little. The asynchronous task control system acquires the database lock from the database system in real time or at regular time, and after the database lock is successfully acquired from the database system, a preset number (for example, 3) of additional asynchronous tasks, such as asynchronous tasks that cannot be processed by other distributed systems at present, can be captured for the distributed system. And the captured extra asynchronous tasks are placed into the asynchronous task queue of the distributed system, so that the distributed system can process all the asynchronous tasks of the distributed system and the captured extra asynchronous tasks in the asynchronous task queue, and the asynchronous task processing capacity of the distributed system is fully utilized.
And the identification module 04 is configured to generate a corresponding task processing identification for each captured asynchronous task, so as to prevent each captured asynchronous task from being captured by an asynchronous task control system corresponding to another distributed system, and release the acquired database lock, so that the asynchronous task control system corresponding to each distributed system can acquire the acquired database lock. In this way, each distributed system can control each distributed system to sequentially grab and process additional asynchronous tasks except the own asynchronous task through the database lock in addition to processing the own asynchronous task.
In this embodiment, an asynchronous task queue is established for an asynchronous task of a corresponding distributed system through an asynchronous task control system, and if it is monitored that the number of asynchronous tasks in the asynchronous task queue is less than a preset threshold, a database lock is periodically acquired from a database system, and a preset number of asynchronous tasks are captured for the distributed system and are placed in the asynchronous task queue. When the asynchronous task control system monitors that the number of the current asynchronous tasks of the corresponding distributed system is less, the asynchronous task control system can capture additional asynchronous tasks from the system to the asynchronous task queue of the distributed system for processing by the distributed system, so that each distributed system is fully utilized to process the asynchronous tasks, and the asynchronous task processing capacity of the whole distributed system is effectively improved.
Further, in other embodiments, the grabbing module 03 is further configured to:
if the asynchronous task control system successfully acquires a database lock from the database system and the difference value number between the preset threshold value and the number of the asynchronous tasks in the asynchronous task queue is larger than or equal to a preset fixed number, the current self asynchronous task amount of the distributed system is small, the distributed system is in a relatively idle state, the preset fixed number of asynchronous tasks are captured for the distributed system and are placed into the asynchronous task queue, and the asynchronous tasks in the asynchronous task queue are processed by the distributed system.
Further, in other embodiments, the grabbing module 03 is further configured to:
if the asynchronous task control system successfully acquires a database lock from the database system and the difference value between the preset threshold and the number of the asynchronous tasks in the asynchronous task queue is smaller than the preset fixed number, it indicates that the current self asynchronous task amount of the distributed system does not reach a saturation state but is not much different from the set maximum working threshold, so that the asynchronous tasks with the difference value are captured for the distributed system and are put into the asynchronous task queue so as to be processed by the distributed system on the asynchronous tasks in the asynchronous task queue.
As shown in fig. 2, a second embodiment of the present invention provides an asynchronous task control system based on a distributed system, and on the basis of the above embodiment, the asynchronous task control system further includes:
and the stopping module 05 is configured to stop acquiring the database lock from the database system if the number of the asynchronous tasks in the asynchronous task queue is greater than or equal to a preset threshold.
In this embodiment, when the asynchronous task control system monitors that the number of asynchronous tasks in the asynchronous task queue of the corresponding distributed system is greater than or equal to a preset threshold (for example, 20), it indicates that the distributed system has more asynchronous tasks, and reaches or approaches to a working saturation state, and cannot process additional asynchronous tasks. The asynchronous task control system stops acquiring the database lock from the database system to stop capturing additional asynchronous tasks for the distributed system to avoid exceeding the asynchronous task processing capacity of the distributed system.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments. Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. An asynchronous task control method based on a distributed system is characterized by comprising the following steps:
the method comprises the following steps that an asynchronous task control system establishes an asynchronous task queue for asynchronous tasks of corresponding distributed systems and monitors the number of the asynchronous tasks in the asynchronous task queue, wherein each distributed system corresponds to one asynchronous task control system, and the asynchronous task control systems control the asynchronous tasks of the corresponding distributed systems;
if the number of the asynchronous tasks in the asynchronous task queue is smaller than a preset threshold value, a database lock is obtained from a database system;
if the database lock is successfully acquired from the database system, capturing a preset number of asynchronous tasks for the distributed system, and putting the asynchronous tasks into the asynchronous task queue;
and generating corresponding task processing identifiers for the captured asynchronous tasks to prevent the captured asynchronous tasks from being captured by asynchronous task control systems corresponding to other distributed systems, and releasing the acquired database locks to allow the asynchronous task control systems corresponding to the distributed systems to acquire the acquired asynchronous tasks.
2. The asynchronous task control method based on the distributed system as claimed in claim 1, wherein said step of grabbing a preset number of asynchronous tasks for the distributed system and placing them into the asynchronous task queue if a database lock is successfully acquired from the database system comprises:
and if the asynchronous task control system successfully acquires a database lock from the database system and the difference value number between the preset threshold value and the number of the asynchronous tasks in the asynchronous task queue is greater than or equal to a preset fixed number, grabbing the asynchronous tasks with the preset fixed number for the distributed system and putting the asynchronous tasks into the asynchronous task queue for the distributed system to process the asynchronous tasks in the asynchronous task queue.
3. The asynchronous task control method based on the distributed system according to claim 1 or 2, wherein the step of grabbing a preset number of asynchronous tasks for the distributed system and placing the asynchronous tasks into the asynchronous task queue if the database lock is successfully acquired from the database system comprises:
and if the asynchronous task control system successfully acquires a database lock from the database system and the difference value number between the preset threshold value and the number of the asynchronous tasks in the asynchronous task queue is smaller than a preset fixed number, grabbing the asynchronous tasks with the difference value number for the distributed system and putting the asynchronous tasks into the asynchronous task queue for the distributed system to process the asynchronous tasks in the asynchronous task queue.
4. The distributed system based asynchronous task control method of claim 1, further comprising:
and if the number of the asynchronous tasks in the asynchronous task queue is greater than or equal to a preset threshold value, the asynchronous task control system stops acquiring the database lock from the database system.
5. An asynchronous task control system based on a distributed system, the asynchronous task control system comprising:
the system comprises an establishing module, a monitoring module and a processing module, wherein the establishing module is used for establishing an asynchronous task queue for asynchronous tasks of corresponding distributed systems and monitoring the number of the asynchronous tasks in the asynchronous task queue, each distributed system corresponds to an asynchronous task control system, and the asynchronous task control system controls and controls the asynchronous tasks of the corresponding distributed system;
the acquisition module is used for acquiring a database lock from a database system if the number of the asynchronous tasks in the asynchronous task queue is less than a preset threshold value;
the grabbing module is used for grabbing a preset number of asynchronous tasks for the distributed system and putting the asynchronous tasks into the asynchronous task queue if the database lock is successfully acquired from the database system;
and the identification module is used for generating corresponding task processing identification for each captured asynchronous task so as to prevent each captured asynchronous task from being captured by the asynchronous task control systems corresponding to other distributed systems, and releasing the acquired database lock so as to be acquired by the asynchronous task control systems corresponding to the distributed systems.
6. The distributed system based asynchronous task control system of claim 5, wherein the crawling module is further to:
and if the asynchronous task control system successfully acquires a database lock from the database system and the difference value number between the preset threshold value and the number of the asynchronous tasks in the asynchronous task queue is greater than or equal to a preset fixed number, grabbing the asynchronous tasks with the preset fixed number for the distributed system and putting the asynchronous tasks into the asynchronous task queue for the distributed system to process the asynchronous tasks in the asynchronous task queue.
7. The distributed system based asynchronous task control system of claim 5 or 6, wherein the crawling module is further configured to:
and if the asynchronous task control system successfully acquires a database lock from the database system and the difference value number between the preset threshold value and the number of the asynchronous tasks in the asynchronous task queue is smaller than a preset fixed number, grabbing the asynchronous tasks with the difference value number for the distributed system and putting the asynchronous tasks into the asynchronous task queue for the distributed system to process the asynchronous tasks in the asynchronous task queue.
8. The distributed system based asynchronous task control system of claim 5, further comprising:
and the stopping module is used for stopping acquiring the database lock from the database system if the number of the asynchronous tasks in the asynchronous task queue is greater than or equal to a preset threshold value.
CN201610854007.9A 2016-09-26 2016-09-26 Asynchronous task control method and system based on distributed system Active CN107870822B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610854007.9A CN107870822B (en) 2016-09-26 2016-09-26 Asynchronous task control method and system based on distributed system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610854007.9A CN107870822B (en) 2016-09-26 2016-09-26 Asynchronous task control method and system based on distributed system

Publications (2)

Publication Number Publication Date
CN107870822A CN107870822A (en) 2018-04-03
CN107870822B true CN107870822B (en) 2020-11-24

Family

ID=61752140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610854007.9A Active CN107870822B (en) 2016-09-26 2016-09-26 Asynchronous task control method and system based on distributed system

Country Status (1)

Country Link
CN (1) CN107870822B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109766172B (en) * 2018-12-13 2024-05-14 中国平安财产保险股份有限公司 Asynchronous task scheduling method and device
CN110457126A (en) * 2019-08-13 2019-11-15 杭州有赞科技有限公司 A kind of asynchronous invoking method and system
CN112486654A (en) * 2020-12-08 2021-03-12 浙江诺诺网络科技有限公司 Asynchronous slow task scheduling method, device, equipment and medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1786917A (en) * 2004-12-07 2006-06-14 国际商业机器公司 Borrowing threads as a form of load balancing in a multiprocessor data processing system
US20090288086A1 (en) * 2008-05-16 2009-11-19 Microsoft Corporation Local collections of tasks in a scheduler
CN101715001A (en) * 2009-10-21 2010-05-26 南京邮电大学 Method for controlling execution of grid task
CN104266657A (en) * 2014-09-12 2015-01-07 海华电子企业(中国)有限公司 Shortest path planning parallelization method based on cooperative computing of CPU and MIC

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1786917A (en) * 2004-12-07 2006-06-14 国际商业机器公司 Borrowing threads as a form of load balancing in a multiprocessor data processing system
US20090288086A1 (en) * 2008-05-16 2009-11-19 Microsoft Corporation Local collections of tasks in a scheduler
CN101715001A (en) * 2009-10-21 2010-05-26 南京邮电大学 Method for controlling execution of grid task
CN104266657A (en) * 2014-09-12 2015-01-07 海华电子企业(中国)有限公司 Shortest path planning parallelization method based on cooperative computing of CPU and MIC

Also Published As

Publication number Publication date
CN107870822A (en) 2018-04-03

Similar Documents

Publication Publication Date Title
CN109714192B (en) Monitoring method and system for monitoring cloud platform
US11080090B2 (en) Method and system for scalable job processing
CN110383764B (en) System and method for processing events using historical data in a serverless system
CN108256118B (en) Data processing method, device, system, computing equipment and storage medium
CN110471749B (en) Task processing method, device, computer readable storage medium and computer equipment
CN107870822B (en) Asynchronous task control method and system based on distributed system
CN102385536B (en) Method and system for realization of parallel computing
CN112087520B (en) Data processing method, device, equipment and computer readable storage medium
CN111447102A (en) SDN network device access method and device, computer device and storage medium
CN105162823B (en) A kind of virtual machine management method and device
CN112463290A (en) Method, system, apparatus and storage medium for dynamically adjusting the number of computing containers
CN111200606A (en) Deep learning model task processing method, system, server and storage medium
CN111240864A (en) Asynchronous task processing method, device, equipment and computer readable storage medium
CN113590433B (en) Data management method, data management system, and computer-readable storage medium
WO2022257247A1 (en) Data processing method and apparatus, and computer-readable storage medium
CN109388501B (en) Communication matching method, device, equipment and medium based on face recognition request
CN111597056B (en) Distributed scheduling method, system, storage medium and equipment
CN115981871B (en) GPU resource scheduling method, device, equipment and storage medium
CN111376255B (en) Robot data acquisition method and device and terminal equipment
CN114327846A (en) Cluster capacity expansion method and device, electronic equipment and computer readable storage medium
CN109684274B (en) File archiving method, device and computer readable storage medium
CN114390104A (en) Process forensics system, method, apparatus, computer device and medium
CN111163117B (en) Zookeeper-based peer-to-peer scheduling method and device
CN111176959A (en) Early warning method, system and storage medium for cross-domain application server
CN110955579A (en) Ambari-based large data platform monitoring method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant