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

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

Info

Publication number
CN113407329A
CN113407329A CN202110803831.2A CN202110803831A CN113407329A CN 113407329 A CN113407329 A CN 113407329A CN 202110803831 A CN202110803831 A CN 202110803831A CN 113407329 A CN113407329 A CN 113407329A
Authority
CN
China
Prior art keywords
task
executed
screen
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.)
Granted
Application number
CN202110803831.2A
Other languages
Chinese (zh)
Other versions
CN113407329B (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

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/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 task execution device, a task execution 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 screen-opening 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 technology, and more particularly, to the field of client technology.
Background
An open screen task is a task that an Application (APP) performs from start-up to entry into the main interface. With the rapid development of the mobile internet and the rapid improvement of the wireless communication network speed, the service functions carried by the application program are more and more rich and complex. Accordingly, the number and complexity of screen-opening tasks required to be executed when the application program is started are also increased sharply.
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 screen-opening 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 apparatus including: the device comprises a setting module, a display module and a display module, wherein the setting module is used for 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; 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 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 method of the embodiments of the present disclosure.
According to another aspect of the disclosed embodiments, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method shown in the disclosed embodiments.
According to another aspect of the embodiments of the present disclosure, there is provided a computer program product, a computer program, which when executed by a processor implements the method shown in the embodiments of the present disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide 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 to which the task execution methods and apparatus may be applied, according to an embodiment of the present disclosure;
FIG. 2 schematically shows a flow chart of a task execution method according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow diagram for performing each of the on-screen tasks 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 shows 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 can be used to implement embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those 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 to which the task execution method and apparatus may be applied, 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 the embodiments of the present disclosure may be applied to help those skilled in the art understand the technical content of the present disclosure, and does not mean that the embodiments of the present disclosure may not be applied to other devices, systems, environments or scenarios.
As shown in fig. 1, the system architecture 100 according to this embodiment may include a terminal device 101 and a server 102.
Illustratively, the terminal device 101 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. Various applications may be installed on terminal device 101, such as a shopping-like application, a web browser application, a search-like application, an instant messaging tool, a mailbox client, social platform software, etc. (by way of example only). The terminal apparatus 101 can establish a communication link with the server 102 through a network, for example, to receive or transmit data or the like.
Illustratively, the server 102 may be a server that provides various services, such as a background management server that provides support for applications in the terminal device 101. The Server 102 may be a cloud Server, which is 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 high management difficulty and weak service extensibility in a conventional physical host and a VPS service (Virtual Private Server, or VPS for short). The server may also be a server of a distributed system, or a server incorporating a blockchain.
According to the embodiment of the disclosure, when an application program in the terminal device 101 is started, the screen-opening task parameter may be acquired from a local storage space of the terminal device 101, and/or the screen-opening task parameter configured for the application program in the server 102 may be acquired through a backend interface. And 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 screen-opening task is a task executed between the starting of the application program and the entering of the main interface, such as advertising, rewarding, reminding and the like. The screen-opening task parameters may include, for example, parameters used to create and execute the screen-opening task, including, for example, task identification, task type, and the like. And then adding the set screen opening task into 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, the server 102 may send the push task parameter to the terminal device 101 during the process of executing the screen-opening task. Under the condition that the terminal device 101 receives the push task parameter sent by the server 102, the push task can be created according to the push task parameter, the attribute is set for the push task, and then the push task is added to the task queue, so that the dynamic insertion of the screen-opening task is realized. Similar to the open 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 embodiment 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 shows 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 by the terminal device shown above, for example.
In operation S210, at least one screen opening task is created according to at least one screen opening task parameter of the application program, and an attribute of each screen opening task in the at least one screen opening task is set.
Then, at least one screen-open task is added to the task queue in operation S220.
In operation S230, each of the screen-opening tasks in the task queue is executed according to the attribute of each of the screen-opening tasks in the task queue.
According to the embodiment of the disclosure, at least one screen-opening task parameter can be acquired in at least one of the following ways: the method comprises the steps of obtaining screen opening task parameters from a local storage space, obtaining the screen opening task parameters through a rear-end interface, and receiving the screen opening task parameters pushed by a server.
According to the embodiment of the disclosure, the screen-opening task parameters of the application program can be stored in the local storage space. Based on the method, the screen-opening task parameters of the application program can be acquired from the local storage space.
According to another embodiment of the present disclosure, the screen-opening task parameters of the application program can also be configured in the server located at the back end. Based on the method, the screen-opening task parameters configured for the application program in the server can be obtained through the backend interface. The later expandability of the product can be increased by acquiring the screen-opening task parameters through the back-end interface. For example, in a scene that an instantaneity task needs to be newly added when an application program is started, only the configuration of the screen-opening task parameters needs to be performed at the back end, and the terminal device does not need to be changed.
According to another embodiment of the disclosure, in the process of executing the screen-opening task, the server located remotely may send the push task parameter to the terminal device. The terminal device can create a push task according to the push task parameter and set an attribute for the push task. It will be appreciated that the push task is also a screen-open task. And then inserting the push task into a task queue, thereby avoiding the conflict between the push task and the original screen-opening task.
According to the embodiment of the disclosure, a corresponding task template is configured in advance for the task type of each screen-opening task. The task types may include pop-up window, half screen, full screen, countdown, user interactive, user imperceptible, and the like, for example. The task template comprises attribute parameters of the screen-opening task corresponding to the task type, wherein the attribute parameters comprise an execution time parameter, a blocking parameter, a timing parameter and a timing duration parameter. Based on this, a task template matching the type of the open screen task may be determined for each of the at least one open screen task. And then setting the attribute of the screen opening task according to the task template. The attribute may include, for example, a blocking attribute, an execution time, a timing attribute, a timing duration, and the like. According to the embodiment of the disclosure, the application of the task template can increase the convenience and the universality of the issuing of the screen-opening task and reduce the configuration cost of products and operators. The operator can select the corresponding task template according to the screen opening task to be issued on the back-end configuration page, and can issue a new screen opening task only by configuring a small number of key parameters, so that the uniformity of the screen opening tasks of the same type is ensured, and the working efficiency of product operators is improved.
According to the embodiment of the disclosure, one screen-open task in the task queue can be acquired according to a preset sequence as a task to be executed, 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 blocked 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.
And under the condition that the task to be executed is a blocked task, executing the task to be executed, deleting the task to be executed from the task queue, and after the task to be executed is executed, acquiring another screen-opening task in the task queue as a new task to be executed according to a preset sequence.
FIG. 3 schematically shows a flow diagram 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, an open screen task in the task queue is acquired according to a preset sequence as a task to be executed.
In operation S332, it is determined whether the task to be executed is a blocked task according to the blocking attribute of the task to be executed. If the task to be executed is not the blocking task, operation S333 is performed, and if the task to be executed is the blocking task, operations S334 to S335 are performed.
In operation S333, the to-be-executed task is executed, the to-be-executed task is deleted from the task queue, and then operation S336 is performed.
In operation S334, the to-be-executed task is executed, and the to-be-executed task is deleted from the task queue.
In operation S335, it waits for the task to be executed to be completed. After the execution of the task to be executed is completed, operation S336 is then performed.
In operation S336, it is determined whether the task queue is empty, and in case the task queue is not empty, operation S331 is performed, otherwise operation S337 is performed.
In operation S337, the screen-on task execution ends.
According to the embodiment of the disclosure, the preset sequence can be determined according to the time when each screen-opening task in the task queue is added to the task queue and/or the priority of each screen-opening task. For example, in this embodiment, the higher the priority, the earlier the order added to the task queue becomes, the earlier the order becomes 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 is to block the screen opening task executed by other screen opening tasks, namely the screen opening task cannot 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 the execution of other tasks besides the screen-opening task, such as network request and page rendering of the main interface.
According to still further embodiments of the present disclosure, the attribute may further include an execution time indicating a time when the task starts to execute. And executing the task to be executed at the execution time corresponding to the task to be executed under the condition that the execution time is set for the task to be executed.
According to other embodiments of the present disclosure, the attribute may further include a timing length indicating a duration of the task execution process. The execution duration of the task to be executed can be recorded under the condition that the timing duration is set for the task to be executed, and the task to be executed is ended under the condition that the execution duration reaches the timing duration of the task to be executed.
The task execution method shown above is further explained with reference to fig. 4 in conjunction with a specific embodiment. Those skilled in the art will appreciate that the following example embodiments are only for the understanding of the present disclosure, and the present disclosure is not limited thereto.
Illustratively, in the present embodiment, taking a scenario of the mobile client application as an example, the screen-open task is, for example, screen-open advertisement, reward, reminder, and the like. Different types of screen opening tasks can be acquired according to different requirements.
For example, in this embodiment, a task manager may be created for managing the execution of the on-screen task. There is an empty queue in the task manager for loading tasks. When a screen opening task needs to be added, a corresponding screen opening task is created, the attributes of the screen opening task such as execution time, whether blocking exists, whether timing exists, timing time and the like are set, and the screen opening task is added into a task queue. And traversing the task queue when the screen opening task is executed, and executing each screen opening task according to the attribute of each screen opening task in the task queue.
Fig. 4 schematically shows 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 parameters of an open screen task to be executed in operation S410.
According to the embodiment of the present disclosure, for example, in the embodiment, the screen-opening task parameter stored in the local storage space may be acquired, and the screen-opening task configured by the backend is acquired by requesting the backend interface. In addition, in the task execution process, the screen-on task pushed by the remote notification can 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 an open screen task. The task manager is provided with an empty task queue for loading the screen opening task, and is used for adding the screen opening task created according to the screen opening task parameters acquired from the local server and the back-end server and the screen opening task created according to the screen opening task parameters pushed in the screen opening task execution process.
In operation S430, a screen-open task is created, attributes are set for the screen-open task, and then the screen-open task is added to the task queue.
According to embodiments of the present disclosure, each task template corresponds to a task type, such as pop-up, half-screen, full-screen, countdown, user-interactive, user-unaware, and the like,
according to the embodiment of the disclosure, the corresponding screen opening task can be created according to the acquired screen opening task parameters. Matching a task template of a corresponding task type for the screen-opening task, setting attributes such as corresponding execution time, whether to block, whether to time, time-keeping time and the like according to the task template, and adding the tasks into a task queue of a task manager according to a preset sequence. For example, in this embodiment, the preset sequence may be a time sequence 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 the universality of the issuing of the screen-opening task and reduce the configuration cost of products and operators. The operator can select the corresponding task template according to the screen opening task to be issued on the back-end configuration page, and can issue a push task only by configuring a small number of key parameters, so that the uniformity of the screen opening tasks of the same type is ensured, and the working efficiency of product operators is improved. It should be noted that other parameters besides the task attribute parameter, such as parameters of pop-up window size and version control, may also be carried by different templates.
In operation S440, the screen-open tasks in the task queue are circularly traversed.
According to the embodiment of the disclosure, the first screen-opening task can be read from the task queue as the task to be executed.
In operation S450, the to-be-executed task is executed, and the to-be-executed task is deleted from the task queue.
According to the embodiment of the disclosure, the first screen-opening task in the task queue, namely the task to be executed, is started to be executed, and the screen-opening task is deleted from the task queue.
According to the embodiment of the disclosure, when the task to be executed is executed, the 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 from 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 tasks which are not executed are stored in the task queue, and the tasks which are executed are not stored, so that the tasks are conveniently executed in a circulating traversing manner.
In operation S460, it is determined whether the task to be executed is a blocking task. If the task to be executed is the blocking task, operation S470 is performed, and if not, operation S4100 is performed.
In operation S470, the task to be executed is waited for to be completed. Operation S4100 is then performed.
For example, for a currently executed task a, if a is a blocking task, the blocking task refers to blocking between tasks, that is, the task cannot execute a next task after the task is not executed, but does not affect execution of other non-open-screen APP operations, such as network request and page rendering of a home page. And after the execution of the task A is finished, starting to traverse the task queue again, and starting to execute the first task from the queue, wherein the 1 st task is the task B. And the blocking task can be started to execute the next task only by a clear task execution end mark, if the automatic timing type task informs the task queue to start the next round of task traversal after timing is finished, the user interaction type blocking task completes the task depending on user operation, and the task manager informs the task queue to start the next round of task traversal.
For another example, if the current task a is a non-blocking task, after the task a starts executing, regardless of whether the task a is completely executed, the re-traversal task queue is opened, and the task starts executing from the first task in the queue, where the 1 st task is the task B.
In addition, if there is a temporarily inserted push task parameter while traversing and executing the tasks in the task queue, operations S480 to S490 are performed.
In operation S480, the temporarily inserted push task parameter is received.
In operation S490, a push task is created according to the temporarily inserted push task parameters, a task template is matched to set task attributes, and then the push task is added to a task queue, with a constant task queue traversal rule. The operation S490 may refer to the operation S430 above, and is not described herein again.
According to the embodiment of the disclosure, by supporting the insertion of the push task in the execution process, the flexibility of the task is increased. By receiving the remote pushing task and bringing the pushed task into the screen opening task for execution, the conflict between the pushing 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 task queue traverses and executes the last task, the screen-on task is executed completely, and the task queue is empty and the task manager releases.
In operation S4120, the screen-on task execution ends.
According to the embodiment of the disclosure, only the tasks to be executed are stored in the task queue, and each task is deleted after being executed. The queue is empty, namely the mark of the completion of the execution of the screen-opening task, is concise and clear, and is convenient for task management.
Fig. 5 schematically shows 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 executing module 530.
The setting module 510 may be configured to create at least one screen-opening task according to at least one screen-opening task parameter of the application program, and set an attribute of each screen-opening task in the at least one screen-opening task.
An adding module 520 may be configured to add at least one open screen task to the task queue.
The executing module 530 may be configured to execute each of the screen-opening tasks in the task queue according to the attribute of each of the screen-opening tasks in the task queue.
According to an embodiment of the present disclosure, the setting module may further include a determination submodule and a setting submodule. The determining submodule can be used for determining a task template matched with the type of the screen-opening task for each screen-opening task in the at least one screen-opening task. And the setting submodule 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 submodule can be used for acquiring one screen-open task in the task queue as a task to be executed according to a preset sequence, and repeatedly calling the judging submodule, the first execution module and the second execution module until the task queue is empty. The determining submodule may be configured to determine whether the task to be executed is a blocking task according to the blocking attribute of the task to be executed. The first execution submodule may be configured to execute the to-be-executed task when the to-be-executed task is not a blocked task, delete the to-be-executed task from the task queue, and obtain another screen-open task in the task queue as a new to-be-executed task according to a preset sequence. The second execution submodule may be configured to execute the to-be-executed task when the to-be-executed task is a blocked task, delete the to-be-executed task from the task queue, and obtain, according to a preset sequence, another screen-open task in the task queue as a new to-be-executed task after the to-be-executed task is completely executed.
According to an embodiment of the present disclosure, the preset order may be determined according to a time when each on-screen task in the task queue is added to the task queue and/or a priority of each on-screen task.
According to an embodiment of the present disclosure, the attribute may further include execution time. The first execution submodule and the second execution submodule 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 timing length. The task execution device can also comprise a recording module and an ending module. The recording module may be configured to record an execution duration of the task to be executed. And the ending module can be 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 present disclosure, the task execution device may further include an insertion module, configured to, in a process of executing an open screen task in the task queue, respond to a received 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, which may be 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, which may be configured to obtain the at least one screen-opening task parameter through a backend interface.
It should be noted that, in the technical solution of the present disclosure, the acquisition, storage, application, and the like of the personal information of the related user all conform to the regulations of the relevant laws and regulations, and do not violate the common customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 6 illustrates a schematic block diagram of an example electronic device 600 that can 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 phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples 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, which 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 can also be stored. The calculation unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; 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 the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 601 executes the respective methods and processes described above, such as the task execution method. For example, in some embodiments, the task execution methods may be implemented as a computer software program tangibly embodied in 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 execution 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 circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a 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 that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes 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 codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. 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. A 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 a pointing device (e.g., a mouse or a 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 can 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, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end 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 back-end, 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 clients and servers. A client and server are generally 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 understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (21)

1. A task execution method, 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 screen-opening task to a task queue; and
and executing each screen opening task in the task queue according to the attribute of each screen opening task in the task queue.
2. The method of claim 1, wherein the setting of the attribute of each of the at least one open screen task comprises:
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
and setting the attribute of the screen opening task according to the task template.
3. The method of claim 1, wherein the attribute comprises a blocking attribute; the executing each screen opening task in the task queue according to the attribute of each screen opening task in the task queue comprises the following steps:
acquiring one screen-opening 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 blocked 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; and
and under the condition that the task to be executed is a blocked task, executing the task to be executed, deleting the task to be executed from the task queue, and after the task to be executed is executed, acquiring another screen-opening task in the task queue as a new task to be executed according to a preset sequence.
4. The method according to claim 3, wherein the preset sequence is determined according to the time for each on-screen task in the task queue to be added to the task queue and/or the priority of each on-screen task.
5. The method of claim 3, wherein the attributes further include execution time; the executing the task to be executed comprises:
and executing the task to be executed at the execution time corresponding to the task to be executed.
6. The method of any of claims 3-5, wherein the attributes further include a timing length; the method further comprises the following steps:
recording the execution duration of the task to be executed; and
and under the condition that the execution time length reaches the timing time length of the task to be executed, ending the task to be executed.
7. The method of claim 1, further comprising:
and 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 attributes of the push task, and adding the push task into the task queue.
8. The method of claim 1, further comprising:
and acquiring the at least one screen-opening task parameter from a local storage space.
9. The method of claim 1, further comprising:
and acquiring the at least one screen-opening task parameter through a back-end interface.
10. A task execution device comprising:
the device comprises a setting module, a display module and a display module, wherein the setting module is used for 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;
the adding module is used for adding the at least one screen opening task to a task queue; and
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.
11. The apparatus of claim 10, wherein the setup module comprises:
the determining submodule is used for determining a task template matched with the type of the screen opening task for each screen opening task in the at least one screen opening task; and
and the setting submodule is used for setting the attribute of the screen opening task according to the task template.
12. The apparatus of claim 10, wherein the attribute comprises a blocking attribute; the execution module comprises:
the calling submodule is used for acquiring an open screen task in the task queue as a task to be executed according to a preset sequence, and repeatedly calling the judging submodule, 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 according to the blocking attribute of the task to be executed;
the first execution submodule is used for executing the task to be executed under the condition that the task to be executed is not a blocked 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 submodule is used for executing the task to be executed under the condition that the task to be executed is a blocked 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.
13. The apparatus according to claim 12, wherein the preset order is determined according to a time when each on-screen task in the task queue is added to the task queue and/or a priority of each on-screen task.
14. The apparatus of claim 12, 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.
15. The apparatus of any of claims 12-14, wherein the attributes further comprise a timing duration; the device further comprises:
the recording module is used for recording the execution duration 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 time length reaches the timing time length of the task to be executed.
16. The apparatus of claim 10, further comprising:
and 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.
17. The apparatus of claim 10, further comprising:
and the first acquisition module is used for acquiring the at least one screen-opening task parameter from a local storage space.
18. The apparatus of claim 10, further comprising:
and the second acquisition module is used for acquiring the at least one screen opening task parameter through a rear-end interface.
19. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
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-9.
20. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-9.
21. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-9.
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 true CN113407329A (en) 2021-09-17
CN113407329B 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
PAVEL DOVGALYUK等: "Platform-independent reverse debugging of the virtual machines", 《 IEEE XPLORE》 *
刘新强;曾兵义;: "用线程池解决服务器并发请求的方案设计", 现代电子技术, no. 15 *

Also Published As

Publication number Publication date
CN113407329B (en) 2024-01-30

Similar Documents

Publication Publication Date Title
CN112540806B (en) Method and device for rendering small program page, electronic equipment and storage medium
CN112506581B (en) Method, apparatus, electronic device and readable storage medium for rendering applet
CN109361948B (en) Interface management method, intelligent terminal and readable storage medium
CN113282444B (en) Visualization method and device for debugging business process
CN113760488B (en) Method, apparatus, device and computer readable medium for scheduling tasks
CN111125057A (en) Service request processing method and device and computer system
CN114449327B (en) Video clip sharing method and device, electronic equipment and readable storage medium
CN114035865B (en) Method, device and equipment for starting small program and storage medium
CN113836462A (en) Page description file generation method, device, equipment and storage medium
CN113448570A (en) Data processing method and device, electronic equipment and storage medium
CN113407329B (en) Task execution method, device, equipment and storage medium
WO2017133229A1 (en) Mobile terminal image display method and device
CN114237755A (en) Application running method and device, electronic equipment and storage medium
CN111258902B (en) Performance test method and performance test system based on SockJS server
CN113743630A (en) Method and device for executing intelligent call reservation
CN112947918A (en) Data display method and device
CN113138827B (en) Method, device, electronic equipment and medium for displaying data
CN113835893B (en) Data processing method, device, equipment, storage medium and program product
CN115756235A (en) Node configuration interface display method and device, electronic equipment and readable storage medium
US20240004508A1 (en) Operation monitoring device, operation monitoring method, and operation monitoring program
CN109981554B (en) Information processing method and system and electronic equipment
CN116932131A (en) Service processing method and device
CN116126233A (en) Data processing method, device, equipment and medium
CN114237444A (en) Application program starting method and device, electronic equipment and storage medium
CN116701449A (en) Data processing method, device, electronic equipment and 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