CN111736976B - Task processing method, device, computing equipment and medium - Google Patents

Task processing method, device, computing equipment and medium Download PDF

Info

Publication number
CN111736976B
CN111736976B CN202010616431.6A CN202010616431A CN111736976B CN 111736976 B CN111736976 B CN 111736976B CN 202010616431 A CN202010616431 A CN 202010616431A CN 111736976 B CN111736976 B CN 111736976B
Authority
CN
China
Prior art keywords
task
processed
tasks
application program
determining
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
CN202010616431.6A
Other languages
Chinese (zh)
Other versions
CN111736976A (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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202010616431.6A priority Critical patent/CN111736976B/en
Publication of CN111736976A publication Critical patent/CN111736976A/en
Application granted granted Critical
Publication of CN111736976B publication Critical patent/CN111736976B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/48Indexing scheme relating to G06F9/48
    • G06F2209/482Application
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present disclosure provides a task processing method, including: acquiring a plurality of tasks to be processed; determining an application program for processing the task to be processed for each of a plurality of tasks to be processed; when it is determined that at least two tasks to be processed in the plurality of tasks to be processed are processed by the same application program, dividing the plurality of tasks to be processed into a plurality of task queues, so that the tasks to be processed in each task queue in the plurality of task queues are processed by different application programs; and sequentially processing the tasks to be processed in the plurality of task queues. The disclosure also provides a task processing device, a computing device and a medium.

Description

Task processing method, device, computing equipment and medium
Technical Field
The present disclosure relates to the field of computer technology, and in particular, to a task processing method, a task processing device, a computing device, and a computer readable storage medium.
Background
With the rapid development of information technology, service functions of service institutions are also becoming more and more diversified, for example, commercial banks provide diversified services to users through their service systems. In order to ensure proper operation of a business system in a production environment, tasks performed by the business system are typically tested. For example, in a production environment where task a is processed in a first time period and task b is processed in a second time period, executing task a and task b in different time periods of the production environment does not conflict when task a and task b need to be processed using the same application. However, in the test environment, batch testing is generally required for multiple tasks, for example, task a and task b each need to be tested in a third time period, and since task a and task b need to be processed using the same application program, there is an application program call conflict when testing task a and task b, resulting in test failure.
In carrying out the disclosed concept, the inventors found that at least the following problems exist in the related art.
In a test environment, because batch test is required to be carried out on a plurality of tasks, application program calling conflict exists when the plurality of tasks are tested, and the test is carried out again after the test fails, so that the test efficiency is lower.
Disclosure of Invention
In view of this, the present disclosure provides an optimized task processing method, task processing device, computing device, and computer-readable storage medium.
One aspect of the present disclosure provides a task processing method, including: acquiring a plurality of tasks to be processed, determining an application program for processing the tasks to be processed for each task to be processed in the plurality of tasks to be processed, and dividing the tasks to be processed into a plurality of task queues when at least two tasks to be processed in the plurality of tasks to be processed are determined to be processed by the same application program, so that the tasks to be processed in each task queue in the plurality of task queues are processed by different application programs, and sequentially processing the tasks to be processed in the plurality of task queues.
According to an embodiment of the present disclosure, the dividing the plurality of tasks to be processed into a plurality of task queues includes performing acknowledgement processing for each of the plurality of tasks to be processed in sequence: when the current task to be processed is determined not to belong to the task marked in the task list, storing the current task to be processed into a current task queue, when the current task to be processed is determined to belong to the task marked in the task list, adding a new task queue as a new current task queue, and storing the current task to be processed into the new current task queue, thereby obtaining the plurality of task queues, wherein the task marked in the task list needs to be processed by the same application program.
According to an embodiment of the present disclosure, the task list includes a plurality of sub-lists, tasks marked in each of the plurality of sub-lists belong to a same group of tasks, and the same group of tasks need to be processed by a same application program, where when determining whether a current task to be processed belongs to a task marked in the task list, the current task to be processed is sequentially compared with tasks marked in the plurality of sub-lists.
According to an embodiment of the present disclosure, the method further includes: and acquiring the task list. Wherein the plurality of tasks to be processed comprises M tasks to be processed, M is an integer greater than 1; the obtaining the task list includes: determining N application programs for processing the M tasks to be processed, wherein any task to be processed in the M tasks to be processed is processed by at least one application program, N is an integer greater than or equal to 1, determining the task number of the task to be processed by any application program in the N application programs, determining the any application program as a target application program when the task number is greater than 1, so as to obtain P target application programs, P is a positive integer less than or equal to N, and determining the tasks to be processed by the P target application programs as tasks marked in the task list.
According to an embodiment of the present disclosure, the determining the task to be processed by the P target applications as the task marked in the task list includes: and determining a task to be processed by any one target application program as a task marked in one sub-list aiming at any one target application program in the P target application programs so as to obtain the sub-lists.
According to an embodiment of the present disclosure, the method further includes: at least one preset application program is determined, and each preset application program in the at least one preset application program can process a plurality of tasks to be processed simultaneously. Wherein, for any application program in the N application programs, determining the task number of the task to be processed by the any application program includes: determining whether any application program is the preset application program according to any application program in the N application programs, and determining the task number of the any application program for processing the task to be processed when the any application program is determined not to be the preset application program.
Another aspect of the present disclosure provides a task processing device including: the device comprises a first acquisition module, a first determination module, a division module and a processing module. The first acquisition module acquires a plurality of tasks to be processed. The first determining module determines an application program for processing each of the plurality of tasks to be processed. And the dividing module is used for dividing the plurality of tasks to be processed into a plurality of task queues when determining that at least two tasks to be processed in the plurality of tasks to be processed are processed by the same application program, so that the tasks to be processed in each task queue in the plurality of task queues are processed by different application programs. And the processing module is used for sequentially processing the tasks to be processed in the task queues.
According to an embodiment of the present disclosure, the dividing the plurality of tasks to be processed into a plurality of task queues includes performing acknowledgement processing for each of the plurality of tasks to be processed in sequence: when the current task to be processed is determined not to belong to the task marked in the task list, storing the current task to be processed into a current task queue, when the current task to be processed is determined to belong to the task marked in the task list, adding a new task queue as a new current task queue, and storing the current task to be processed into the new current task queue, thereby obtaining the plurality of task queues, wherein the task marked in the task list needs to be processed by the same application program.
According to an embodiment of the present disclosure, the task list includes a plurality of sub-lists, and tasks marked in each of the plurality of sub-lists belong to a same group of tasks, and the same group of tasks are processed by a same application program. And when confirming whether the current task to be processed belongs to the task marked in the task list, comparing the current task to be processed with the tasks marked in the sub-lists in sequence.
According to an embodiment of the present disclosure, the above apparatus further includes: and the second acquisition module acquires the task list. The plurality of tasks to be processed comprises M tasks to be processed, wherein M is an integer greater than 1. The obtaining the task list includes: determining N application programs for processing the M tasks to be processed, wherein any task to be processed in the M tasks to be processed is processed by at least one application program, N is an integer greater than or equal to 1, determining the task number of the task to be processed by any application program in the N application programs, determining the any application program as a target application program when the task number is greater than 1, so as to obtain P target application programs, P is a positive integer less than or equal to N, and determining the tasks to be processed by the P target application programs as tasks marked in the task list.
According to an embodiment of the present disclosure, the determining the task to be processed by the P target applications as the task marked in the task list includes: and determining a task to be processed by any one target application program as a task marked in one sub-list aiming at any one target application program in the P target application programs so as to obtain the sub-lists.
According to an embodiment of the present disclosure, the above apparatus further includes: the second determining module is used for determining at least one preset application program, and each preset application program in the at least one preset application program can process a plurality of tasks to be processed simultaneously. Wherein, for any application program in the N application programs, determining the task number of the task to be processed by the any application program includes: determining whether any application program is the preset application program according to any application program in the N application programs, and determining the task number of the any application program for processing the task to be processed when the any application program is determined not to be the preset application program.
Another aspect of the present disclosure provides a computing device, comprising: one or more processors; and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
Another aspect of the present disclosure provides a non-transitory readable storage medium storing computer executable instructions which, when executed, are configured to implement a method as described above.
Another aspect of the present disclosure provides a computer program comprising computer executable instructions which when executed are for implementing a method as described above.
According to the embodiment of the disclosure, the task processing method can at least partially solve the technical problem that the test efficiency is low due to application program call conflict when a plurality of tasks are tested in the related art. Therefore, the technical effect of improving the test efficiency can be achieved.
Drawings
For a more complete understanding of the present disclosure and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:
FIG. 1 schematically illustrates a system architecture of a task processing method and task processing device according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a task processing method according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart of a task processing method according to another embodiment of the present disclosure;
FIG. 4 schematically illustrates a schematic diagram of a task processing method according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a block diagram of a task processing device according to an embodiment of the disclosure; and
FIG. 6 schematically illustrates a block diagram of a computer system for implementing task processing in accordance with an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Some of the block diagrams and/or flowchart illustrations are shown in the figures. It will be understood that some blocks of the block diagrams and/or flowchart illustrations, or combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable control apparatus, such that the instructions, when executed by the processor, create means for implementing the functions/acts specified in the block diagrams and/or flowchart.
Thus, the techniques of this disclosure may be implemented in hardware and/or software (including firmware, microcode, etc.). Additionally, the techniques of this disclosure may take the form of a computer program product on a computer-readable storage medium having instructions stored thereon, the computer program product being for use by or in connection with an instruction execution system. In the context of this disclosure, a computer-readable storage medium may be any medium that can contain, store, communicate, propagate, or transport the instructions. For example, a computer-readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium. Specific examples of the computer-readable storage medium include the following: magnetic storage devices such as magnetic tape or hard disk (HDD); optical storage devices such as compact discs (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; and/or a wired/wireless communication link.
The embodiment of the disclosure provides a task processing method, which comprises the following steps: and acquiring a plurality of to-be-processed tasks, and determining an application program for processing the to-be-processed tasks aiming at each to-be-processed task in the plurality of to-be-processed tasks. Then, when it is determined that at least two of the plurality of tasks to be processed are processed by the same application program, the plurality of tasks to be processed are divided into a plurality of task queues, so that the tasks to be processed of each of the plurality of task queues are processed by different application programs. Next, tasks to be processed in the plurality of task queues are sequentially processed.
Fig. 1 schematically illustrates a system architecture of a task processing method and a task processing device according to an embodiment of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only) may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that, the task processing method provided by the embodiment of the present disclosure may be generally executed by the server 105. Accordingly, the task processing devices provided by the embodiments of the present disclosure may be generally disposed in the server 105. The task processing method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the task processing device provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
For example, the plurality of tasks to be processed in the embodiment of the present disclosure may be stored in the terminal devices 101, 102, 103, the plurality of tasks to be processed are sent to the server 105 by the terminal devices 101, 102, 103, the server 105 may divide the plurality of tasks to be processed into a plurality of task queues and sequentially process the tasks to be processed in the plurality of task queues, or the terminal devices 101, 102, 103 may directly divide the plurality of tasks to be processed into a plurality of task queues and sequentially process the tasks to be processed in the plurality of task queues. In addition, the plurality of tasks to be processed may also be directly stored in the server 105, and the server 105 may divide the plurality of tasks to be processed into a plurality of task queues directly and process the tasks to be processed in the plurality of task queues sequentially.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically illustrates a flow chart of a task processing method according to an embodiment of the present disclosure.
As shown in fig. 2, the task processing method of the embodiment of the present disclosure may include, for example, the following operations S210 to S240.
Since a test environment includes a plurality of tasks to be processed, the test environment typically completes the test by timing configuration of the plurality of tasks to be processed so that the plurality of tasks to be processed are submitted at fixed times, including, for example, submitting the tasks once a day at the same time, so that there will be a problem in that the same tasks are repeatedly executed. The embodiment of the disclosure closes the timed submitting function of the task after the daily test patch is installed so as to avoid repeated processing of the task caused by timed submitting of a plurality of tasks to be processed in the test environment. After the timed commit function of the task is turned off, the task processing method of the embodiments of the present disclosure may be performed.
In operation S210, a plurality of tasks to be processed are acquired.
According to an embodiment of the present disclosure, the plurality of tasks to be processed may be tasks that need to be tested in a test environment, for example.
In operation S220, an application program for processing the task to be processed is determined for each of the plurality of tasks to be processed.
For example, when performing task testing in a testing environment, batch testing may be performed on multiple tasks to be processed. Each task to be processed needs to be executed by a corresponding application program to realize the test function. The determination result is obtained by confirming the application program for processing each task to be processed, and whether division for a plurality of tasks to be processed is required or not is determined according to the determination result.
In operation S230, when it is determined that at least two of the plurality of tasks to be processed are processed by the same application, the plurality of tasks to be processed are divided into a plurality of task queues such that the tasks to be processed of each of the plurality of task queues are processed by different applications.
In the embodiment of the present disclosure, it is determined whether there is a case where one application is used to process two or more tasks to be processed, based on the application for processing each task to be processed. If there is one application for processing two or more tasks to be processed, the plurality of tasks to be processed may be divided into a plurality of task queues such that all tasks to be processed in each task queue are processed by different applications from each other. That is, for a task queue, an application only processes one task to be processed in the task queue.
Next, in operation S240, the tasks to be processed in the plurality of task queues are sequentially processed.
For example, the plurality of task queues include a task queue 1, a task queue 2, a task queue 3, … …, and sequentially processing the tasks to be processed in the plurality of task queues may be processing the tasks to be processed in the plurality of task queues one by one. For example, the task to be processed in the task queue 1 is processed first. After processing the task to be processed in the task queue 1, the task to be processed in the task queue 2 is processed. After processing the task to be processed in the task queue 2, the task to be processed in the task queue 3, … …, and so on. When processing a plurality of tasks to be processed in one task queue, the tasks to be processed in the one task queue can be processed in parallel, so that the processing efficiency is improved. Because all the tasks to be processed in each task queue are processed by different application programs, when the tasks to be processed in one task queue are processed in parallel, the same application program is not needed to process the tasks to be processed, the problem of calling conflict of the application program is avoided, and the task processing efficiency is improved.
According to an embodiment of the present disclosure, dividing a plurality of tasks to be processed into a plurality of task queues includes the following process.
First a task list is obtained, in which the marked tasks need to be handled by the same application. For example, taking task a and task b as labels in a task list, task a and task b need to be handled by the same application.
Then, confirmation processing is performed for each of the plurality of tasks to be processed.
For example, upon determining that the current task to be processed does not belong to the task marked in the task list, the current task to be processed is stored in the current task queue.
When the current task to be processed is determined to belong to the task marked in the task list, a new task queue is added as a new current task queue, and the current task to be processed is stored in the new current task queue, so that a plurality of task queues are obtained.
For example, when it is determined that a first one of the plurality of tasks to be processed (current task to be processed) does not belong to a task marked in the task list, the first task to be processed is stored in the task queue 1 (current task queue), when it is determined that the first task to be processed (current task to be processed) belongs to a task marked in the task list, the task queue 2 (current task queue) is newly added, and the first task to be processed is stored in the task queue 2.
For a second task to be processed of the plurality of tasks to be processed, for example, the current task queue is taken as the task queue 2. When it is determined that the second task to be processed (current task to be processed) does not belong to the task marked in the task list, the second task to be processed is stored in the task queue 2 (current task queue), when it is determined that the second task to be processed (current task to be processed) belongs to the task marked in the task list, the task queue 3 (current task queue) is newly added, the second task to be processed is stored in the task queue 3, and so on until a plurality of tasks to be processed are divided into the task queues.
According to an embodiment of the present disclosure, the task list may include a plurality of sub-lists, the tasks marked in each of the plurality of sub-lists belonging to the same group of tasks. For example, the plurality of sub-lists includes a first sub-list in which, for example, task a and task b are marked, and a second sub-list in which, for example, task c and task d are marked. For example, task a and task b both need to be processed by application a, then task a and task b belong to a group of tasks. Task c and task d both need to be processed by application B, then task c and task d belong to a group of tasks.
When determining whether the current task to be processed belongs to the task marked in the task list, the current task to be processed can be sequentially compared with the tasks marked in the sub-lists. For example, comparing the currently pending task with the tasks marked in the first sub-list, and if the currently pending prior task is not the tasks marked in the first sub-list, continuing to compare the currently pending task with the tasks marked in the second sub-list.
According to the embodiment of the disclosure, the task is managed in the sub-list mode, so that the task is managed by taking the application program as a dimension, and the task management is facilitated.
The process of creating the task list will be described below.
According to an embodiment of the present disclosure, the plurality of tasks to be processed may include M tasks to be processed, where M is an integer greater than 1. Wherein, obtaining the task list includes:
first, N application programs for processing M tasks to be processed are determined, wherein any task to be processed in the M tasks to be processed is processed by at least one application program, and N is an integer greater than or equal to 1. Wherein, a task to be processed can be processed by a plurality of application programs, and the application programs can process the task to be processed one by one when processing the task to be processed. For example, when the plurality of application programs for processing one task to be processed includes two application programs, the first application program processes the task to be processed, and then the second application program processes the task to be processed.
Then, for any application program in the N application programs, the task number of the task to be processed by any application program is determined. When the number of tasks of processing the tasks to be processed by any application program is greater than 1, the situation that the application program call conflict exists due to the fact that one application program processes a plurality of tasks to be processed in the process of processing M tasks to be processed is indicated. At this time, any application program may be determined as a target application program to obtain P target application programs, where P is a positive integer equal to or less than N.
Next, the tasks to be processed by the P target applications are determined as tasks marked in the task list.
For example, for any one of the P target applications, the task to be processed by any one target application is determined as a task marked in one sub-list, so as to obtain a plurality of sub-lists. For a sub-list, the tasks marked in the sub-list are handled by the same application.
For example, take P target applications as an example, including application a and application B. For example, the task to be processed by the application program a among the plurality of tasks to be processed includes a task to be processed c and a task to be processed d, and the task to be processed by the application program B among the plurality of tasks to be processed includes a task to be processed e and a task to be processed f. The tasks marked in the first sub-list are task c to be processed and task d to be processed, and the tasks marked in the second sub-list are task e and task f to be processed.
For example, a sub-list is created based on application A and application B in turn. For example, first, for application a, it is determined whether there are a task to be processed c and a task to be processed d processed by application a in the existing sub-list. If the existing sub-list does not contain the task c to be processed and the task d to be processed by the application program A, a sub-list is newly built, the task c to be processed and the task d to be processed are used as marked tasks in the newly built sub-list, and the processing for the application program B is continued. If there are a task to be processed c and a task to be processed d processed by the application program a in the existing sub-list, the processing for the application program a is ended and the processing for the application program B is continued.
According to the embodiment of the disclosure, some application programs in the N application programs can be used for processing a plurality of tasks to be processed simultaneously. Thus, at least one preset application program which can be used for simultaneously processing a plurality of tasks to be processed in the N application programs can be determined. That is, each of the at least one preset application may process a plurality of tasks to be processed simultaneously. The task list is facilitated to be established in accordance with at least one preset application.
For example, for any application of the N applications, determining the number of tasks that any application processes the task to be processed includes: determining whether any application program is a preset application program aiming at any application program in the N application programs, and determining the task number of the task to be processed by any application program when the any application program is determined not to be the preset application program.
That is, the embodiment of the present disclosure obtains the remaining application programs by excluding the preset application program from the N application programs. Each of the remaining applications, for example, does not support simultaneous processing of multiple tasks to be processed. Therefore, the application program can be confirmed as the task marked in the task list by determining the number of tasks processed by each application program in the rest application programs and when the number of tasks is greater than 1.
Fig. 3 schematically illustrates a flow chart of a task processing method according to another embodiment of the present disclosure.
As shown in fig. 3, the task processing method of the embodiment of the present disclosure may include, for example, operations S210 to S240 and operations S310 to S320. The operations S210 to S240 are, for example, the same as or similar to the operations described in fig. 2, and are not described herein. Among them, operation S230 includes operations S231 to S232, operation S320 includes operations S321 to S324, and operation S322 includes operations S3221 to S3222.
In operation S231, when it is determined that the current task to be processed does not belong to the task marked in the task list, the current task to be processed is stored in the current task queue.
In operation S232, when it is determined that the current task to be processed belongs to the task marked in the task list, a task queue is newly added as a new current task queue, and the current task to be processed is stored in the new current task queue.
In operation S310, at least one preset application is determined.
In operation S320, a task list is acquired.
In operation S321, N applications for processing M tasks to be processed are determined.
In operation S322, for any application program of the N application programs, the number of tasks that any application program processes the task to be processed is determined.
In operation S3221, for any application of the N applications, it is determined whether any application is a preset application.
In operation S3222, when it is determined that any one of the application programs is not the preset application program, the number of tasks of any one of the application programs to process the task to be processed is determined.
In operation S323, when the number of tasks is greater than 1, any one application is determined as a target application to obtain P target applications.
In operation S324, the task to be processed by the P target applications is determined as the task marked in the task list.
Wherein, each operation of the embodiments of the present disclosure has been described above, and is not described herein.
Fig. 4 schematically illustrates a schematic diagram of a task processing method according to an embodiment of the present disclosure.
As shown in fig. 4, the plurality of tasks to be processed in the embodiment of the present disclosure include, for example, a task to be processed a, a task to be processed b, a task to be processed c, and a task to be processed d. The task list 410 marks the task to be processed a and the task to be processed b to be executed by the same application program. Each of the plurality of tasks to be processed is compared in turn to the tasks marked in the task list 410. For example, the task to be processed a is compared with the task marked in the task list 410, and the task to be processed a is marked in the task list 410 and is divided into the newly added task queue 420. Next, the task b to be processed is compared with the task marked in the task list 410, and the task b to be processed is marked in the task list 410 and is divided into a newly added task queue 430. Then, the task to be processed c is compared with the task marked in the task list 410, and the task to be processed c is not the task marked in the task list 410 and is divided into the task queues 430. The task to be processed d is compared with the task marked in the task list 410, and is not marked in the task list 410, and is divided into the task queue 430.
Then, the task to be processed in the task queue 420 and the task to be processed in the task queue 430 are sequentially processed, that is, the task to be processed in the task queue 420 and the task to be processed in the task queue 430 are processed in series, so that the problem of call conflict to the same application program when the task to be processed a and the task to be processed b are processed simultaneously is avoided. When processing a plurality of tasks to be processed contained in the task queue 430, the plurality of tasks to be processed in the task queue 430 may be processed in parallel, thereby improving processing efficiency. That is, tasks to be processed in different task queues can be processed in series, and a plurality of tasks to be processed in the same task queue can be processed in parallel.
Fig. 5 schematically illustrates a block diagram of a task processing device according to an embodiment of the present disclosure.
As shown in fig. 5, the task processing device 500 may include, for example, a first acquisition module 510, a first determination module 520, a division module 530, and a processing module 540.
The first obtaining module 510 may be configured to obtain a plurality of tasks to be processed. According to an embodiment of the present disclosure, the first obtaining module 510 may perform, for example, operation S210 described above with reference to fig. 2, which is not described herein.
The first determination module 520 may be configured to determine, for each of a plurality of tasks to be processed, an application for processing the task to be processed. According to an embodiment of the present disclosure, the first determining module 520 may perform, for example, the operation S220 described above with reference to fig. 2, which is not described herein.
The partitioning module 530 may be configured to partition the plurality of tasks to a plurality of task queues such that the tasks to be processed in each of the plurality of task queues are processed by different applications when it is determined that at least two of the plurality of tasks to be processed are processed by the same application. The dividing module 530 may perform, for example, operation S230 described above with reference to fig. 2 according to an embodiment of the present disclosure, which is not described herein.
The processing module 540 may be configured to sequentially process the tasks to be processed in the plurality of task queues. The processing module 540 may, for example, perform operation S240 described above with reference to fig. 2 according to an embodiment of the present disclosure, which is not described herein.
According to an embodiment of the present disclosure, dividing the plurality of tasks to be processed into the plurality of task queues includes performing acknowledgement processing for each of the plurality of tasks to be processed in order: when the current task to be processed is determined not to belong to the task marked in the task list, storing the current task to be processed into a current task queue, when the current task to be processed is determined to belong to the task marked in the task list, adding a new task queue as a new current task queue, and storing the current task to be processed into the new current task queue, so that a plurality of task queues are obtained, wherein the tasks marked in the task list need to be processed by the same application program.
According to an embodiment of the present disclosure, the task list includes a plurality of sub-lists, the tasks marked in each of the plurality of sub-lists belonging to a same set of tasks, the same set of tasks being processed by a same application. When confirming whether the current task to be processed belongs to the task marked in the task list, comparing the current task to be processed with the tasks marked in the sub-lists in sequence.
According to an embodiment of the present disclosure, the apparatus 500 may further include: and the second acquisition module acquires the task list. The plurality of tasks to be processed comprises M tasks to be processed, wherein M is an integer greater than 1. The task list acquisition comprises the following steps: determining N application programs for processing M tasks to be processed, wherein any task to be processed in the M tasks to be processed is processed by at least one application program, N is an integer greater than or equal to 1, determining the task number of any application program for processing the tasks to be processed aiming at any application program in the N application programs, determining any application program as a target application program when the task number is greater than 1 so as to obtain P target application programs, P is a positive integer less than or equal to N, and determining the tasks to be processed by the P target application programs as tasks marked in a task list.
According to an embodiment of the present disclosure, determining the tasks to be processed by the P target applications as tasks marked in the task list includes: and determining the task to be processed by any target application program as a task marked in one sub-list aiming at any target application program in the P target application programs so as to obtain a plurality of sub-lists.
According to an embodiment of the present disclosure, the apparatus 500 may further include: the second determining module determines at least one preset application program, and each preset application program in the at least one preset application program can process a plurality of tasks to be processed simultaneously. Wherein, for any application program in the N application programs, determining the task number of any application program for processing the task to be processed includes: determining whether any application program is a preset application program aiming at any application program in the N application programs, and determining the task number of the task to be processed by any application program when the any application program is determined not to be the preset application program.
The present disclosure also provides a computing device that may include: one or more processors and a storage device. The storage device may be used to store one or more programs. Wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the methods illustrated in fig. 2-4.
Any number of modules, sub-modules, units, sub-units, or at least some of the functionality of any number of the sub-units according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented as split into multiple modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in any other reasonable manner of hardware or firmware that integrates or encapsulates the circuit, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be at least partially implemented as computer program modules, which when executed, may perform the corresponding functions.
For example, any of the first acquisition module 510, the first determination module 520, the division module 530, and the processing module 540 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules. Alternatively, at least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. According to embodiments of the present disclosure, at least one of the first acquisition module 510, the first determination module 520, the partitioning module 530, and the processing module 540 may be implemented, at least in part, as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or in hardware or firmware, such as any other reasonable manner of integrating or packaging the circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, at least one of the first acquisition module 510, the first determination module 520, the division module 530, and the processing module 540 may be at least partially implemented as a computer program module, which when executed may perform the respective functions.
FIG. 6 schematically illustrates a block diagram of a computer system for implementing task processing in accordance with an embodiment of the present disclosure. The computer system illustrated in fig. 6 is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present disclosure.
As shown in fig. 6, computer system 600 includes a processor 601, a computer readable storage medium 602. The system 600 may perform a method according to an embodiment of the present disclosure.
In particular, the processor 601 may include, for example, a general purpose microprocessor, an instruction set processor and/or an associated chipset and/or a special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. Processor 601 may also include on-board memory for caching purposes. The processor 601 may be a single processing unit or a plurality of processing units for performing different actions of the method flows according to embodiments of the disclosure.
The computer-readable storage medium 602 may be, for example, any medium that can contain, store, communicate, propagate, or transport the instructions. For example, a readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium. Specific examples of the readable storage medium include: magnetic storage devices such as magnetic tape or hard disk (HDD); optical storage devices such as compact discs (CD-ROMs); a memory, such as a Random Access Memory (RAM) or a flash memory; and/or a wired/wireless communication link.
The computer-readable storage medium 602 may comprise a computer program 603, which computer program 603 may comprise code/computer-executable instructions which, when executed by the processor 601, cause the processor 601 to perform a method according to an embodiment of the present disclosure or any variant thereof.
The computer program 603 may be configured with computer program code comprising computer program modules, for example. For example, in an example embodiment, code in the computer program 603 may include one or more program modules, including for example 603A, module 603B, … …. It should be noted that the division and number of modules is not fixed, and that a person skilled in the art may use suitable program modules or combinations of program modules depending on the actual situation, which when executed by the processor 601, enable the processor 601 to perform the method according to embodiments of the present disclosure or any variations thereof.
According to an embodiment of the present disclosure, at least one of the first acquisition module 510, the first determination module 520, the division module 530, and the processing module 540 may be implemented as computer program modules described with reference to fig. 6, which when executed by the processor 601, may implement the respective operations described above.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs that when executed implement the methods described above.
According to embodiments of the present disclosure, the computer-readable storage medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable storage medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, fiber optic cable, radio frequency signals, or the like, or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
While the present disclosure has been shown and described with reference to certain exemplary embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present disclosure as defined by the appended claims and their equivalents. The scope of the disclosure should, therefore, not be limited to the above-described embodiments, but should be determined not only by the following claims, but also by the equivalents of the following claims.

Claims (12)

1. A task processing method, comprising:
acquiring a plurality of tasks to be processed;
determining an application program for processing each of the plurality of tasks to be processed;
dividing the plurality of tasks to be processed into a plurality of task queues when it is determined that at least two tasks to be processed in the plurality of tasks to be processed are processed by the same application program, so that the tasks to be processed in each task queue in the plurality of task queues are processed by different application programs; and
sequentially processing tasks to be processed in the task queues;
the dividing the plurality of tasks to be processed into a plurality of task queues includes:
Performing confirmation processing on each of the plurality of tasks to be processed according to the sequence:
when the current task to be processed is determined not to belong to the task marked in the task list, storing the current task to be processed into a current task queue;
when determining that the current task to be processed belongs to the task marked in the task list, adding a task queue as a new current task queue, and storing the current task to be processed into the new current task queue so as to obtain a plurality of task queues;
wherein the tasks marked in the task list are processed by the same application program;
the step of sequentially performing confirmation processing on each of the plurality of tasks to be processed includes:
and carrying out serial confirmation processing on the tasks to be processed in different task queues, and carrying out parallel confirmation processing on a plurality of tasks to be processed in the same task queue.
2. The method of claim 1, wherein the task list comprises a plurality of sub-lists, the tasks marked in each of the plurality of sub-lists belonging to a same set of tasks, the same set of tasks being processed by a same application;
And when confirming whether the current task to be processed belongs to the task marked in the task list, comparing the current task to be processed with the tasks marked in the sub-lists in sequence.
3. The method of claim 2, further comprising: acquiring the task list;
wherein the plurality of tasks to be processed comprises M tasks to be processed, M is an integer greater than 1; the obtaining the task list includes:
determining N application programs for processing the M tasks to be processed, wherein any task to be processed in the M tasks to be processed is processed by at least one application program, and N is an integer greater than or equal to 1;
determining the task number of the task to be processed by any application program in the N application programs;
when the number of tasks is greater than 1, determining any application program as a target application program to obtain P target application programs, wherein P is a positive integer less than or equal to N; and
and determining the tasks to be processed by the P target application programs as tasks marked in the task list.
4. A method according to claim 3, wherein said determining the tasks to be processed by the P target applications as tasks marked in the task list comprises:
And determining a task to be processed by any one target application program as a task marked in one sub-list aiming at any one target application program in the P target application programs so as to obtain the sub-lists.
5. The method of claim 3 or 4, further comprising: determining at least one preset application program, wherein each preset application program in the at least one preset application program can process a plurality of tasks to be processed simultaneously;
wherein, for any application program in the N application programs, determining the task number of the task to be processed by the any application program includes:
determining whether any application program is the preset application program or not according to any application program in the N application programs; and
and when the fact that the any application program is not the preset application program is determined, determining the task number of the task to be processed by the any application program.
6. A task processing device comprising:
the first acquisition module acquires a plurality of tasks to be processed;
the first determining module is used for determining an application program for processing each task to be processed in the plurality of tasks to be processed;
The dividing module is used for dividing the plurality of tasks to be processed into a plurality of task queues when determining that at least two tasks to be processed in the plurality of tasks to be processed are processed by the same application program, so that the tasks to be processed in each task queue in the plurality of task queues are processed by different application programs; and
the processing module is used for sequentially processing tasks to be processed in the task queues;
wherein the dividing the plurality of tasks to be processed into a plurality of task queues includes:
performing confirmation processing on each of the plurality of tasks to be processed according to the sequence:
when the current task to be processed is determined not to belong to the task marked in the task list, storing the current task to be processed into a current task queue;
when determining that the current task to be processed belongs to the task marked in the task list, adding a task queue as a new current task queue, and storing the current task to be processed into the new current task queue so as to obtain a plurality of task queues;
wherein the tasks marked in the task list are processed by the same application program;
The step of sequentially performing confirmation processing on each of the plurality of tasks to be processed includes:
and carrying out serial confirmation processing on the tasks to be processed in different task queues, and carrying out parallel confirmation processing on a plurality of tasks to be processed in the same task queue.
7. The apparatus of claim 6, wherein the task list comprises a plurality of sub-lists, the tasks marked in each of the plurality of sub-lists belonging to a same set of tasks, the same set of tasks being processed by a same application;
and when confirming whether the current task to be processed belongs to the task marked in the task list, comparing the current task to be processed with the tasks marked in the sub-lists in sequence.
8. The apparatus of claim 7, further comprising: the second acquisition module acquires the task list;
wherein the plurality of tasks to be processed comprises M tasks to be processed, M is an integer greater than 1; the obtaining the task list includes:
determining N application programs for processing the M tasks to be processed, wherein any task to be processed in the M tasks to be processed is processed by at least one application program, and N is an integer greater than or equal to 1;
Determining the task number of the task to be processed by any application program in the N application programs;
when the number of tasks is greater than 1, determining any application program as a target application program to obtain P target application programs, wherein P is a positive integer less than or equal to N; and
and determining the tasks to be processed by the P target application programs as tasks marked in the task list.
9. The apparatus of claim 8, wherein the determining the task to be processed by the P target applications as the task marked in the task list comprises:
and determining a task to be processed by any one target application program as a task marked in one sub-list aiming at any one target application program in the P target application programs so as to obtain the sub-lists.
10. The apparatus of claim 8 or 9, further comprising: the second determining module is used for determining at least one preset application program, and each preset application program in the at least one preset application program can process a plurality of tasks to be processed simultaneously;
wherein, for any application program in the N application programs, determining the task number of the task to be processed by the any application program includes:
Determining whether any application program is the preset application program or not according to any application program in the N application programs; and
and when the fact that the any application program is not the preset application program is determined, determining the task number of the task to be processed by the any application program.
11. A computing device, comprising:
one or more processors;
storage means for storing one or more programs,
wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-5.
12. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method according to any of claims 1-5.
CN202010616431.6A 2020-06-30 2020-06-30 Task processing method, device, computing equipment and medium Active CN111736976B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010616431.6A CN111736976B (en) 2020-06-30 2020-06-30 Task processing method, device, computing equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010616431.6A CN111736976B (en) 2020-06-30 2020-06-30 Task processing method, device, computing equipment and medium

Publications (2)

Publication Number Publication Date
CN111736976A CN111736976A (en) 2020-10-02
CN111736976B true CN111736976B (en) 2023-08-15

Family

ID=72653923

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010616431.6A Active CN111736976B (en) 2020-06-30 2020-06-30 Task processing method, device, computing equipment and medium

Country Status (1)

Country Link
CN (1) CN111736976B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893126A (en) * 2016-03-29 2016-08-24 华为技术有限公司 Task scheduling method and device
CN107450971A (en) * 2017-06-29 2017-12-08 北京五八信息技术有限公司 Task processing method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105893126A (en) * 2016-03-29 2016-08-24 华为技术有限公司 Task scheduling method and device
CN107450971A (en) * 2017-06-29 2017-12-08 北京五八信息技术有限公司 Task processing method and device

Also Published As

Publication number Publication date
CN111736976A (en) 2020-10-02

Similar Documents

Publication Publication Date Title
CN111818136B (en) Data processing method, device, electronic equipment and computer readable medium
CN104572278B (en) The method, device and equipment of light application calling local side ability
US11314451B2 (en) Method and apparatus for storing data
CN110391938B (en) Method and apparatus for deploying services
CN110781373B (en) List updating method and device, readable medium and electronic equipment
CN110019496B (en) Data reading and writing method and system
CN111125107A (en) Data processing method, device, electronic equipment and medium
CN111597065B (en) Method and device for collecting equipment information
CN113553178A (en) Task processing method and device and electronic equipment
CN107347093B (en) Configuration method and device for distributed server system
CN110968433A (en) Information processing method and system and electronic equipment
CN110708238B (en) Method and apparatus for processing information
CN111324470B (en) Method and device for generating information
CN111736976B (en) Task processing method, device, computing equipment and medium
CN116302271A (en) Page display method and device and electronic equipment
CN110866031A (en) Database access path optimization method and device, computing equipment and medium
CN110278133B (en) Checking method, device, computing equipment and medium executed by server
CN109491830A (en) The method and system in switch data source
CN112825525B (en) Method and apparatus for processing transactions
CN113176937A (en) Task processing method and device and electronic equipment
CN109614137B (en) Software version control method, device, equipment and medium
CN115996179A (en) Service node testing method and device, readable medium and electronic equipment
CN112799863A (en) Method and apparatus for outputting information
CN116319322B (en) Power equipment node communication connection method, device, equipment and computer medium
CN113472565B (en) Method, apparatus, device and computer readable medium for expanding server function

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