任务处理方法及装置

Method and device for processing tasks

Abstract

The invention provides a method and a device for processing tasks. The method includes acquiring the numbers of recorded currently concurrently processed first tasks when requests for querying first tasks of network resources are received; judging whether the numbers of the first tasks are smaller than preset threshold values or not; enabling the first tasks to asynchronously run if the numbers of the first tasks are smaller than the preset threshold values; storing the first tasks in task queues if the numbers of the first tasks are not smaller than the preset threshold values. The method and the device have the advantages that the problem of low query efficiency due to constraints of search engines on query requests in the prior art can be solved to a certain extent by the aid of the method for controlling the numbers of the concurrent tasks, and accordingly effects of improving the query efficiency can be realized.
本发明提供了一种任务处理方法及装置。该方法包括:在接收到请求查询网络资源的第一任务之后,获取记录的当前并发处理的第一任务数;判断第一任务数是否小于预设阈值;若第一任务数小于预设阈值,则异步运行第一任务;若第一任务数不小于预设阈值,则将第一任务保存入任务队列中。通过控制并发任务数的方法,在一定程度上解决了现有技术中搜索引擎对查询请求的限制而导致查询效率低的问题,达到了提高查询效率的效果。

Claims

Description

Topics

Download Full PDF Version (Non-Commercial Use)

Patent Citations (5)

    Publication numberPublication dateAssigneeTitle
    CN-101963922-AFebruary 02, 2011用友软件股份有限公司任务处理方法和装置
    CN-102025782-AApril 20, 2011成都市华为赛门铁克科技有限公司Point-to-point communication method, device and system
    CN-102455940-AMay 16, 2012迈普通信技术股份有限公司一种定时器和异步事件的处理方法及系统
    CN-102542379-AJuly 04, 2012中国移动通信集团公司Method, system and device for processing scheduled tasks
    US-2010333091-A1December 30, 2010Sun Microsystems, Inc.High performance implementation of the openmp tasking feature

NO-Patent Citations (0)

    Title

Cited By (1)

    Publication numberPublication dateAssigneeTitle
    CN-104731663-AJune 24, 2015北京奇艺世纪科技有限公司任务处理方法及系统