CN113407329B - Task execution method, device, equipment and storage medium - Google Patents

Task execution method, device, equipment and storage medium Download PDF

Info

Publication number
CN113407329B
CN113407329B CN202110803831.2A CN202110803831A CN113407329B CN 113407329 B CN113407329 B CN 113407329B CN 202110803831 A CN202110803831 A CN 202110803831A CN 113407329 B CN113407329 B CN 113407329B
Authority
CN
China
Prior art keywords
task
screen
executed
opening
queue
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
CN202110803831.2A
Other languages
Chinese (zh)
Other versions
CN113407329A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110803831.2A priority Critical patent/CN113407329B/en
Publication of CN113407329A publication Critical patent/CN113407329A/en
Application granted granted Critical
Publication of CN113407329B publication Critical patent/CN113407329B/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
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure provides a task execution method, a device, equipment and a storage medium, and relates to the technical field of computers, in particular to the technical field of clients. The specific implementation scheme is as follows: creating at least one screen-opening task according to at least one screen-opening task parameter of the application program, and setting the attribute of each screen-opening task in the at least one screen-opening task; adding at least one on-screen task to a task queue; and executing each screen-opening task in the task queue according to the attribute of each screen-opening task in the task queue.

Description

Task execution method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of client technologies.
Background
An on screen task is a task performed by an Application (APP) from start up to entry into a main interface. With the rapid development of the mobile internet and the rapid improvement of the wireless communication network, service functions carried by application programs are becoming more and more abundant and complex. Accordingly, the number and complexity of the screen-open tasks to be executed when the application program is started are also dramatically increased.
Disclosure of Invention
The disclosure provides a task execution method, a device, equipment and a storage medium.
According to an aspect of the present disclosure, there is provided a task execution method including: creating at least one screen-opening task according to at least one screen-opening task parameter of an application program, and setting the attribute of each screen-opening task in the at least one screen-opening task; adding the at least one open screen task to a task queue; and executing each screen-opening task in the task queue according to the attribute of each screen-opening task in the task queue.
According to another aspect of the present disclosure, there is provided a task performing device including: the setting module is used for creating at least one screen-opening task according to at least one screen-opening task parameter of the application program and setting the attribute of each screen-opening task in the at least one screen-opening task; the adding module is used for adding the at least one screen-opening task to a task queue; and the execution module is used for executing each screen-opening task in the task queue according to the attribute of each screen-opening task in the task queue.
Another aspect of the present disclosure provides a computing device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods shown in the embodiments of the present disclosure.
According to another aspect of the disclosed embodiments, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the methods shown in the disclosed embodiments.
According to another aspect of the disclosed embodiments, there is provided a computer program product, a computer program, which when executed by a processor, implements the method shown in the disclosed embodiments.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 schematically illustrates an exemplary system architecture diagram in which task execution methods and apparatus may be applied, according to embodiments of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a task execution method according to an embodiment of the disclosure;
FIG. 3 schematically illustrates a flow chart of performing each on-screen task in the task queue according to an embodiment of the disclosure;
FIG. 4 schematically illustrates a schematic diagram of a task execution method according to another embodiment of the present disclosure;
FIG. 5 schematically illustrates a block diagram of a task execution device according to an embodiment of the present disclosure; and
FIG. 6 illustrates a schematic block diagram of an example electronic device that may be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
FIG. 1 schematically illustrates an exemplary system architecture diagram in which task execution methods and apparatus may be applied, according to embodiments 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 a terminal device 101 and a server 102.
By way of example, terminal device 101 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. Various applications may be installed on the terminal device 101, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, and the like (by way of example only). The terminal device 101 may establish a communication link with the server 102 through a network, for example, to receive or transmit data or the like.
The server 102 may be, for example, a server providing various services, such as a background management server providing support for applications in the terminal device 101. The server 102 may be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of large management difficulty and weak service expansibility in the traditional physical hosts and VPS service (Virtual Private Server or VPS for short). The server may also be a server of a distributed system or a server that incorporates a blockchain.
According to the embodiment of the present disclosure, when an application in the terminal device 101 is started, the on-screen task parameter may be acquired from the local storage space of the terminal device 101, and/or the on-screen task parameter configured for the application in the server 102 may be acquired through the back-end interface. Then, the terminal device 101 creates a corresponding screen opening task according to each acquired screen opening task parameter, and sets the attribute of the screen opening task. The on-screen tasks are tasks performed by the application program from the start to the entry into the main interface, such as advertising, rewarding, reminding and the like. The on-screen task parameters may include, for example, parameters used to create and execute the on-screen task, including, for example, task identification, task type, and the like. The set on-screen task is then added to the task queue. And then executing each screen-opening task in the task queue according to the attribute of each screen-opening task in the task queue.
In addition, in the process of performing the open screen task, the server 102 may send push task parameters to the terminal device 101. In the case of receiving the push task parameter sent by the server 102, the terminal device 101 may create a push task according to the push task parameter, set an attribute for the push task, and then add the push task to the task queue to implement dynamic insertion of the on-screen task. Similar to the on-screen task parameters, the push task parameters may include, for example, parameters used to create and execute the push task, including, for example, task identification, task type, and the like.
It should be noted that, the task execution method provided by the embodiment of the present disclosure may be generally executed by the terminal device 101. Accordingly, the task execution device provided by the embodiments of the present disclosure may be generally disposed in the terminal device 101.
It should be understood that the number of terminal devices and servers in fig. 1 is merely illustrative. There may be any number of terminal devices and servers, as desired for implementation.
Fig. 2 schematically illustrates a flow chart of a task execution method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S210 to S230. The method may be performed, for example, by the terminal device shown above.
In operation S210, at least one on-screen task is created according to at least one on-screen task parameter of the application program, and an attribute of each of the at least one on-screen task is set.
Then, at least one on-screen task is added to the task queue in operation S220.
In operation S230, each of the on-screen tasks in the task queue is executed according to the attribute of each of the on-screen tasks in the task queue.
According to an embodiment of the present disclosure, the at least one on-screen task parameter may be obtained by at least one of the following means: acquiring the parameters of the screen opening task from the local storage space, acquiring the parameters of the screen opening task through a back-end interface, and receiving the parameters of the screen opening task pushed by the server.
According to embodiments of the present disclosure, the on-screen task parameters of an application may be stored in a local storage space. Based on this, the on-screen task parameters of the application may be obtained from the local storage space.
According to another embodiment of the present disclosure, the on-screen task parameters of the application may also be configured in a server located at the back end. Based on the information, the parameters of the open screen task configured for the application program in the server can be acquired through the back-end interface. The post-expandability of the product can be increased by acquiring the parameters of the screen opening task through the back-end interface. For example, in a scenario where an immediate task is newly added when an application program is started, only the back-end configuration of the parameters of the screen-opening task is needed, and no modification is needed to the terminal device.
According to another embodiment of the present disclosure, in the process of performing the screen-open task, the remotely located server may send push task parameters to the terminal device. The terminal device can create a push task according to the push task parameters and set attributes for the push task. It will be appreciated that the push task is also an open screen task. Then the push task is inserted into the task queue, so that the conflict between the push task and the original screen-opening task can be avoided.
According to the embodiment of the disclosure, a corresponding task template is configured in advance for each task type of the screen-opening task. The task types may include, for example, pop-up window, half-screen, full-screen, countdown, user-interactive, user-unaware, and the like. The task template includes attribute parameters of the on-screen task corresponding to the task type, such as an execution time parameter, a blocking parameter, a timing duration parameter, and the like. Based on this, a task template matching the type of the on-screen task may be determined for each of the at least one on-screen task. And then setting the attribute of the screen opening task according to the task template. The attributes may include, for example, blocking attributes, execution time, timing attributes, timing duration, etc. According to the embodiment of the disclosure, the application of the task template can increase the convenience and universality of the issuing of the screen opening task, and reduce the configuration cost of products and operators. The operator can select a corresponding task template according to the task to be issued at the back end configuration page, and can issue a new task by configuring a small number of key parameters, thereby ensuring the uniformity of the same type of task and improving the working efficiency of product operators.
According to the embodiment of the disclosure, one screen-open task in the task queue can be acquired as a task to be executed according to a preset sequence, and the following operations are repeatedly executed until the task queue is empty:
and determining whether the task to be executed is a blocking task according to the blocking attribute of the task to be executed.
And under the condition that the task to be executed is not a blocking task, executing the task to be executed, deleting the task to be executed from the task queue, and acquiring another screen-opening task in the task queue according to a preset sequence to serve as a new task to be executed.
And under the condition that the task to be executed is a blocking task, the task to be executed is executed, the task to be executed is deleted from the task queue, and after the task to be executed is finished, another screen-opening task in the task queue is acquired according to a preset sequence and is used as a new task to be executed.
FIG. 3 schematically illustrates a flow chart of a method of performing each on-screen task in a task queue according to an embodiment of the disclosure. .
As shown in FIG. 3, the method 330 includes operations S331-S337
In operation S331, a task of opening a screen in the task queue is obtained according to a preset sequence as a task to be executed.
In operation S332, it is determined whether the task to be performed is a blocking task according to the blocking attribute of the task to be performed. If the task to be executed is not a blocking task, operations S333 are executed, and if the task to be executed is a blocking task, operations S334 to S335 are executed.
In operation S333, a task to be executed is executed, the task to be executed is deleted from the task queue, and then operation S336 is executed.
In operation S334, the task to be executed is executed, and the task to be executed is deleted from the task queue.
In operation S335, the execution of the task to be executed is waited for. After the task to be executed is completed, operation S336 is then executed.
In operation S336, it is determined whether the task queue is empty, and if the task queue is not empty, operation S331 is executed, otherwise operation S337 is executed.
In operation S337, the on-screen task execution ends.
According to embodiments of the present disclosure, the preset order may be determined according to the time each on-screen task in the task queue is added to the task queue and/or the priority of each on-screen task. Illustratively, in the present embodiment, the higher the priority order, the earlier the order of adding to the task queue for the on-screen tasks of the same priority.
According to embodiments of the present disclosure, a blocking attribute may be used to indicate whether a task is a blocking task. The blocking task refers to a screen opening task which can block the execution of other screen opening tasks, namely the screen opening task can not execute the next screen opening task after the screen opening task is not executed. It should be noted that, the blocking task does not affect execution of other tasks other than the open screen task, for example, network requests of the main interface, page rendering, and the like.
According to other embodiments of the present disclosure, the attributes may also include execution time, which is used to indicate the time at which the task begins to execute. And under the condition that the execution time is set for the task to be executed, executing the task to be executed at the execution time corresponding to the task to be executed.
According to other embodiments of the present disclosure, the attributes may also include a time duration for representing the duration of the task execution process. When the time duration is set for the task to be executed, the execution duration of the task to be executed can be recorded, and when the execution duration reaches the time duration of the task to be executed, the task to be executed is ended.
The task execution method shown above is further described with reference to fig. 4 in conjunction with the specific embodiment. Those skilled in the art will appreciate that the following example embodiments are merely for the understanding of the present disclosure, and the present disclosure is not limited thereto.
Illustratively, in this embodiment, taking a scenario of a mobile client application as an example, a task of opening a screen, such as an advertisement, a reward, a reminder, etc. Different types of screen opening tasks can be obtained according to different requirements.
Illustratively, in this embodiment, a task manager may be created for managing the execution of the on-screen tasks. The task manager has an empty queue for loading tasks. When the on-screen task needs to be added, a corresponding on-screen task is created, and the attributes of the on-screen task such as execution time, blocking, timing time and the like are set and added into a task queue. When the screen-opening tasks are executed, traversing the task queue, and executing each screen-opening task according to the attribute of each screen-opening task in the task queue.
Fig. 4 schematically illustrates a schematic diagram of a task execution method according to another embodiment of the present disclosure.
As shown in fig. 4, the task execution method 400 includes acquiring the parameters of the on-screen task to be executed in operation S410.
According to an embodiment of the present disclosure, illustratively, in this embodiment, the on-screen task parameters stored in the local storage space may be acquired, and the on-screen task configured by the back end may be acquired through the request back end interface. In addition, in the task execution process, the on-screen task pushed by the remote notification can also be received.
In operation S420, a task manager is created.
According to embodiments of the present disclosure, a task manager may be used to add on-screen tasks. The task manager is provided with an empty task queue for loading the screen-opening tasks, and the empty task queue is used for adding the screen-opening tasks created according to the screen-opening task parameters acquired from the local server and the back-end server and the screen-opening tasks created according to the screen-opening task parameters pushed in the execution process of the screen-opening tasks.
In operation S430, an open screen task is created, an attribute is set for the open screen task, and then the open screen task is added to the task queue.
According to embodiments of the present disclosure, each task template corresponds to a task type, such as popup, half-screen, full-screen, countdown, user-interactive, user-unaware, etc.,
according to the embodiment of the disclosure, the corresponding screen opening task can be created according to the acquired screen opening task parameters. The method comprises the steps of matching task templates of corresponding task types for the on-screen tasks, setting corresponding execution time, blocking, timing time and other attributes according to the task templates, and adding the tasks into a task queue of a task manager according to a preset sequence. For example, in this embodiment, the preset order may be a time order in which the on-screen tasks are added to the task queue.
According to the embodiment of the disclosure, the application of the task template can increase the convenience and universality of the issuing of the screen opening task, and reduce the configuration cost of products and operators. The operator can select a corresponding task template according to the screen opening task to be issued at the back end configuration page, and can issue a pushing task only by configuring a small number of key parameters, so that the uniformity of the screen opening task of the same type is ensured, and the working efficiency of product operators is also improved. It should be noted that, other parameters besides the task attribute parameters, such as the popup window size, version control, etc., may also be carried by different templates.
In operation S440, the on-screen tasks in the task queue are looped through.
According to the embodiment of the disclosure, the first open screen task can be read from the task queue as a task to be executed.
In operation S450, the task to be executed is executed, and the task to be executed is deleted from the task queue.
According to an embodiment of the present disclosure, execution of a first on-screen task, i.e., a task to be executed, in a task queue is started, and the on-screen task is deleted from the task queue.
According to the embodiment of the disclosure, when a task to be executed is executed, a corresponding operation can be executed according to the attribute of the task to be executed.
For example, the task manager traverses the task queue from front to back, starts execution of the first task a in the queue, and deletes the task a from the task queue after the task a starts execution, where the 2 nd task B in the original queue becomes the first task in the task queue. In the task execution process, only the unexecuted task is stored in the task queue, and the executed task is not stored, so that the task can be conveniently circularly and repeatedly executed.
In operation S460, it is determined whether the task to be executed is a blocking task. If the task to be executed is a blocking task, operation S470 is executed, and if not, operation S4100 is executed.
In operation S470, the completion of the execution of the task to be executed is waited. Then, operation S4100 is performed.
For example, if a is a blocking task, the blocking task refers to blocking between tasks, i.e. the task cannot execute the next task without completing execution of the task, but does not affect execution of other non-open screen APP operations, such as network request of the home page and page rendering. After the execution of the task A is finished, starting to re-traverse the task queue, and starting to execute the first task of the queue, wherein the 1 st task is the task B. The blocking task must have a definite mark for ending task execution to start executing the next task, for example, after the automatic timing task is finished, the task queue is notified to start the next task traversal, the user interaction blocking task is dependent on the user operation to complete the task, and the task manager notifies the task queue to start the next task traversal.
For another example, if the current task a is a non-blocking task, after the task a starts to execute, whether the task a is executed or not is started, the task queue is started to be traversed again, and execution is started from the first task of the queue, and at this time, the 1 st task is the task B.
In addition, in the process of traversing the task in the execution task queue, if there is a push task parameter temporarily inserted, operations S480 to S490 are executed.
In operation S480, the temporarily inserted push task parameters are received.
In operation S490, a push task is created according to the temporarily inserted push task parameters, the task attributes are set by matching the task templates, and then the push task is added into a task queue, and the task queue traversal rule is unchanged. The operation S490 may refer to the above operation S430 specifically, and will not be described herein.
According to the embodiment of the disclosure, the flexibility of the task is increased by supporting the insertion of the push task in the execution process. By receiving the remote push task and incorporating the pushed task into the screen-opening task for execution, the conflict between the push task and the original screen-opening task can be avoided.
In operation S4100, it is determined whether the task queue is empty. If the task queue is not empty, the operation S440 is skipped, otherwise, the operation S4110 is performed.
In operation S4110, the task manager is released.
According to the embodiment of the disclosure, after the last task is traversed and executed by the task queue, the on-screen task is completed, and at the moment, the task queue is empty, and the task manager releases the task.
In operation S4120, the on-screen task execution ends.
According to the embodiment of the disclosure, only tasks to be executed are stored in the task queue, and each task is deleted after being executed. The queue is empty, which is a mark for completing the execution of the open screen task, so that the task management is simple and clear.
Fig. 5 schematically illustrates a block diagram of a task performing device according to an embodiment of the present disclosure.
As shown in fig. 5, the task performing device 500 may include a setting module 510, an adding module 520, and an performing module 530.
The setting module 510 may be configured to create at least one on-screen task according to at least one on-screen task parameter of the application program, and set an attribute of each on-screen task in the at least one on-screen task.
The adding module 520 may be configured to add at least one on-screen task to the task queue.
The execution module 530 may be configured to execute each of the on-screen tasks in the task queue according to the attribute of each of the on-screen tasks in the task queue.
According to an embodiment of the present disclosure, the setting module may further include a determination sub-module and a setting sub-module. The determining submodule can be used for determining a task template matched with the type of the screen-opening task aiming at each screen-opening task in the at least one screen-opening task. And the setting sub-module can be used for setting the attribute of the screen opening task according to the task template.
According to an embodiment of the present disclosure, the attribute may include a blocking attribute. The execution module may include a calling sub-module, a judging sub-module, a first execution module, and a second execution module. The calling sub-module can be used for acquiring one screen opening task in the task queue as a task to be executed according to a preset sequence, and repeatedly calling the judging sub-module, the first executing module and the second executing module until the task queue is empty. The judging sub-module can be used for determining whether the task to be executed is a blocking task according to the blocking attribute of the task to be executed. The first execution sub-module may be configured to execute the task to be executed if the task to be executed is not a blocking task, delete the task to be executed from the task queue, and acquire another task to be executed in the task queue as a new task to be executed according to a preset sequence. The second execution sub-module can be used for executing the task to be executed under the condition that the task to be executed is a blocking task, deleting the task to be executed from the task queue, and acquiring another screen-opening task in the task queue as a new task to be executed according to a preset sequence after the task to be executed is executed.
According to an embodiment of the present disclosure, the preset order may be determined according to a time when each of the on-screen tasks in the task queue is added to the task queue and/or a priority of each of the on-screen tasks.
According to an embodiment of the present disclosure, the attribute may further include an execution time. The first execution sub-module and the second execution sub-module may respectively include an execution unit, and may be configured to execute the task to be executed at an execution time corresponding to the task to be executed.
According to an embodiment of the present disclosure, the attribute may further include a time duration. The task execution device may further include a recording module and an ending module. The recording module can be used for recording the execution time of the task to be executed. And the ending module is used for ending the task to be executed under the condition that the execution time length reaches the timing time length of the task to be executed.
According to an embodiment of the disclosure, the task execution device may further include an insertion module, which may be configured to, in a process of executing an on-screen task in the task queue, respond to receiving a push task parameter from a server, create a push task according to the received push task parameter, set an attribute of the push task, and add the push task to the task queue.
According to an embodiment of the present disclosure, the task execution device may further include a first obtaining module, configured to obtain the at least one on-screen task parameter from a local storage space.
According to an embodiment of the present disclosure, the task execution device may further include a second obtaining module, configured to obtain the at least one on-screen task parameter through a backend interface.
It should be noted that, in the technical solution of the present disclosure, the acquisition, storage, application, etc. of the related personal information of the user all conform to the rules of the related laws and regulations, and do not violate the popular regulations of the public order.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 6 illustrates a schematic block diagram of an example electronic device 600 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 may also be stored. The computing unit 601, ROM 602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Various components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the respective methods and processes described above, such as a task execution method. For example, in some embodiments, the task execution method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the task performing method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the task execution method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on 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.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (16)

1. A method of task execution, comprising:
creating at least one screen-opening task according to at least one screen-opening task parameter of an application program, and setting the attribute of each screen-opening task in the at least one screen-opening task;
adding the at least one open screen task to a task queue; and
executing each screen-opening task in the task queue according to the attribute of each screen-opening task in the task queue;
wherein, the setting the attribute of each of the at least one screen-opening task includes: determining a task template matched with the type of the screen-opening task aiming at each screen-opening task in the at least one screen-opening task; setting the attribute of the screen opening task according to the task template;
wherein the attribute comprises a blocking attribute; and executing each screen-opening task in the task queue according to the attribute of each screen-opening task in the task queue, wherein the executing comprises the following steps:
acquiring an open screen task in the task queue as a task to be executed according to a preset sequence, and repeatedly executing the following operations until the task queue is empty:
determining whether the task to be executed is a blocking task according to the blocking attribute of the task to be executed;
under the condition that the task to be executed is not a blocking task, executing the task to be executed, deleting the task to be executed from the task queue, and acquiring another screen-opening task in the task queue according to a preset sequence to serve as a new task to be executed; and
and under the condition that the task to be executed is a blocking task, executing the task to be executed, deleting the task to be executed from the task queue, and acquiring another screen-opening task in the task queue as a new task to be executed according to a preset sequence after the task to be executed is executed.
2. The method of claim 1, wherein the preset order is determined according to a time each on-screen task in the task queue is added to the task queue and/or a priority of each on-screen task.
3. The method of claim 1, wherein the attributes further comprise execution time; the executing the task to be executed comprises the following steps:
and executing the task to be executed at the execution time corresponding to the task to be executed.
4. The method of any of claims 1-3, wherein the attribute further comprises a time duration; the method further comprises the steps of:
recording the execution time length of the task to be executed; and
and ending the task to be executed under the condition that the execution duration reaches the timing duration of the task to be executed.
5. The method of claim 1, further comprising:
in the process of executing the screen opening task in the task queue, responding to the received push task parameters from the server, creating a push task according to the received push task parameters, setting the attribute of the push task, and adding the push task into the task queue.
6. The method of claim 1, further comprising:
and acquiring the at least one open screen task parameter from the local storage space.
7. The method of claim 1, further comprising:
and acquiring the at least one screen opening task parameter through a back-end interface.
8. A task execution device comprising:
the setting module is used for creating at least one screen-opening task according to at least one screen-opening task parameter of the application program and setting the attribute of each screen-opening task in the at least one screen-opening task;
the adding module is used for adding the at least one screen-opening task to a task queue; and
the execution module is used for executing each screen-opening task in the task queue according to the attribute of each screen-opening task in the task queue;
wherein, the setting module includes:
the determining submodule is used for determining a task template matched with the type of the screen-opening task aiming at each screen-opening task in the at least one screen-opening task; and
the setting sub-module is used for setting the attribute of the screen opening task according to the task template;
wherein the attribute comprises a blocking attribute; the execution module comprises:
the calling sub-module is used for acquiring one screen-opening task in the task queue as a task to be executed according to a preset sequence, and repeatedly calling the judging sub-module, the first executing module and the second executing module until the task queue is empty;
the judging submodule is used for determining whether the task to be executed is a blocking task or not according to the blocking attribute of the task to be executed;
the first execution sub-module is used for executing the task to be executed under the condition that the task to be executed is not a blocking task, deleting the task to be executed from the task queue, and acquiring another screen-opening task in the task queue as a new task to be executed according to a preset sequence; and
and the second execution sub-module is used for executing the task to be executed under the condition that the task to be executed is a blocking task, deleting the task to be executed from the task queue, and acquiring another screen-opening task in the task queue as a new task to be executed according to a preset sequence after the task to be executed is executed.
9. The apparatus of claim 8, wherein the pre-set order is determined based on a time each on-screen task in the task queue is added to the task queue and/or a priority of each on-screen task.
10. The apparatus of claim 8, wherein the attributes further comprise execution time; the first execution submodule and the second execution submodule respectively comprise:
and the execution unit is used for executing the task to be executed at the execution time corresponding to the task to be executed.
11. The apparatus of any of claims 8-10, wherein the attribute further comprises a time duration; the apparatus further comprises:
the recording module is used for recording the execution time of the task to be executed; and
and the ending module is used for ending the task to be executed under the condition that the execution duration reaches the timing duration of the task to be executed.
12. The apparatus of claim 8, further comprising:
the inserting module is used for responding to the received push task parameters from the server in the process of executing the screen opening task in the task queue, creating the push task according to the received push task parameters, setting the attribute of the push task and adding the push task into the task queue.
13. The apparatus of claim 8, further comprising:
the first acquisition module is used for acquiring the at least one open screen task parameter from the local storage space.
14. The apparatus of claim 8, further comprising:
the second acquisition module is used for acquiring the at least one screen opening task parameter through the back end interface.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-7.
CN202110803831.2A 2021-07-15 2021-07-15 Task execution method, device, equipment and storage medium Active CN113407329B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110803831.2A CN113407329B (en) 2021-07-15 2021-07-15 Task execution method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110803831.2A CN113407329B (en) 2021-07-15 2021-07-15 Task execution method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113407329A CN113407329A (en) 2021-09-17
CN113407329B true CN113407329B (en) 2024-01-30

Family

ID=77686678

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110803831.2A Active CN113407329B (en) 2021-07-15 2021-07-15 Task execution method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113407329B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9436532B1 (en) * 2011-12-20 2016-09-06 Emc Corporation Method and system for implementing independent message queues by specific applications
CN111831420A (en) * 2020-07-20 2020-10-27 北京百度网讯科技有限公司 Method and device for task scheduling, electronic equipment and computer-readable storage medium
CN112052077A (en) * 2019-06-06 2020-12-08 北京字节跳动网络技术有限公司 Method, device, equipment and medium for software task management

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9436532B1 (en) * 2011-12-20 2016-09-06 Emc Corporation Method and system for implementing independent message queues by specific applications
CN112052077A (en) * 2019-06-06 2020-12-08 北京字节跳动网络技术有限公司 Method, device, equipment and medium for software task management
CN111831420A (en) * 2020-07-20 2020-10-27 北京百度网讯科技有限公司 Method and device for task scheduling, electronic equipment and computer-readable storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Platform-independent reverse debugging of the virtual machines;Pavel Dovgalyuk等;《 IEEE Xplore》;全文 *
用线程池解决服务器并发请求的方案设计;刘新强;曾兵义;;现代电子技术(15);全文 *

Also Published As

Publication number Publication date
CN113407329A (en) 2021-09-17

Similar Documents

Publication Publication Date Title
CN112540806B (en) Method and device for rendering small program page, electronic equipment and storage medium
CN109361948B (en) Interface management method, intelligent terminal and readable storage medium
CN112506581A (en) Method and device for rendering small program, electronic equipment and readable storage medium
CN113282444A (en) Visualization method and device for business process debugging
CN114035865B (en) Method, device and equipment for starting small program and storage medium
CN113407329B (en) Task execution method, device, equipment and storage medium
CN116126719A (en) Interface testing method and device, electronic equipment and storage medium
CN114237755A (en) Application running method and device, electronic equipment and storage medium
CN115905322A (en) Service processing method and device, electronic equipment and storage medium
CN112905270B (en) Workflow realization method, device, platform, electronic equipment and storage medium
CN113836462A (en) Page description file generation method, device, equipment and storage medium
CN113743630A (en) Method and device for executing intelligent call reservation
CN113138827B (en) Method, device, electronic equipment and medium for displaying data
CN113835893B (en) Data processing method, device, equipment, storage medium and program product
US20220347566A1 (en) Method and apparatus for pre-starting cloud application, device, storage medium, and program product
CN115756235A (en) Node configuration interface display method and device, electronic equipment and readable storage medium
CN117785413A (en) Task forwarding method, device, equipment and storage medium
CN116341663A (en) Extension method, device, equipment and medium of deep learning reasoning framework
CN116932131A (en) Service processing method and device
CN114564133A (en) Application program display method, device, equipment and medium
CN117806619A (en) Data processing method, device, electronic equipment and medium
CN116126233A (en) Data processing method, device, equipment and medium
CN114237444A (en) Application program starting method and device, electronic equipment and storage medium
CN113934548A (en) Method and device for establishing connection with dependent service
CN116382787A (en) Method and device for loading animation in page, electronic equipment and readable storage medium

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