CN111538577A - Program execution control device and method, terminal and storage medium - Google Patents

Program execution control device and method, terminal and storage medium Download PDF

Info

Publication number
CN111538577A
CN111538577A CN202010315723.6A CN202010315723A CN111538577A CN 111538577 A CN111538577 A CN 111538577A CN 202010315723 A CN202010315723 A CN 202010315723A CN 111538577 A CN111538577 A CN 111538577A
Authority
CN
China
Prior art keywords
task
backward
antecedent
executed
execution
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.)
Pending
Application number
CN202010315723.6A
Other languages
Chinese (zh)
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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010315723.6A priority Critical patent/CN111538577A/en
Publication of CN111538577A publication Critical patent/CN111538577A/en
Pending legal-status Critical Current

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
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Abstract

The present disclosure provides an apparatus and method for program execution control, a terminal, and a storage medium. Wherein, the device includes: the system comprises a task execution module, a task hooking module and a task execution detection module. The method comprises the following steps: acquiring a task to be executed; when the task is the antecedent task, executing the antecedent task, and after the antecedent task is executed, checking whether a backward task associated with the antecedent task is obtained, if so, executing the backward task, and if not, recording the antecedent task until the backward task is obtained; and when the task is a backward task, checking whether the execution of the forward task associated with the backward task is finished, if so, executing the backward task, otherwise, hooking the backward task until the execution of the forward task is finished, and then executing the backward task. The program execution control scheme can solve the problem of execution sequencing among associated tasks and ensures that a preceding task is executed before a following task.

Description

Program execution control device and method, terminal and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a device and a method for controlling program execution, a terminal, and a storage medium.
Background
In thread development, multiple tasks may be asynchronously inserted into a main thread for execution, which may cause difficulty in controlling the execution order of the tasks. Therefore, a scheme for controlling the execution sequence of tasks is required.
Disclosure of Invention
To solve the existing problems, the present disclosure provides an apparatus and method for program execution control, a terminal, and a storage medium.
The present disclosure adopts the following technical solutions.
In some embodiments, the present disclosure provides a program execution control apparatus including:
the task execution module is used for executing tasks; wherein the tasks comprise an antecedent task and a consequent task which are related to each other;
the task hooking module is used for hooking the backward task when the preceding task is not completely executed; and
and the task execution checking module is used for checking whether the task is obtained and checking whether the task is executed completely.
In some embodiments, the present disclosure provides a program execution control method, including:
acquiring a task to be executed; wherein the tasks comprise an antecedent task and a consequent task;
when the task is the antecedent task, executing the antecedent task, and after the antecedent task is executed, checking whether a backward task associated with the antecedent task is obtained, if so, executing the backward task, and if not, recording the antecedent task until the backward task is obtained after checking;
and when the task is the backward task, checking whether the execution of the prior task related to the backward task is finished, if so, executing the backward task, otherwise, hooking the backward task until the completion of the execution of the prior task is checked, and then executing the backward task.
In some embodiments, the present disclosure provides a terminal comprising: at least one memory and at least one processor;
wherein the at least one memory is used for storing program codes, and the at least one processor is used for calling the program codes stored in the at least one memory to execute the method.
In some embodiments, the present disclosure provides a storage medium for storing program code for performing the above-described method.
The program execution control scheme provided by the disclosure can solve the problem of execution sequencing among associated tasks, ensures that the antecedent task is executed before the successor task, and greatly reduces the cost for processing the problem.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
Fig. 1 is a schematic structural diagram of a program execution control apparatus according to an embodiment of the present disclosure.
Fig. 2 is a schematic diagram of program execution control of an embodiment of the present disclosure.
Fig. 3 is a schematic structural diagram of a program execution control apparatus according to another embodiment of the present disclosure.
Fig. 4 is a flowchart of a program execution control method of an embodiment of the present disclosure.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that various steps recited in method embodiments of the present disclosure may be performed in parallel and/or in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a" or "an" in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that reference to "one or more" unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
In single-threaded development, it is often necessary to control the execution order of tasks. For example, there may be an open screen advertisement during the application program (App) starting process, while some network requests are made asynchronously and simultaneously during the period of executing the open screen advertisement, the interface is updated after the network request comes back, and in the client programming, the interface must be updated in the main thread. Suppose that the first interface task is executed after the advertisement is opened, and the second interface task is executed after the network request. This time requires that the second interface task must be executed after the first interface task, otherwise an interface exception will occur. If the first interface task and the second interface task are marked, when the second interface task can be executed and the first interface task is not executed or is in execution, the second interface task is set to be in a ready but unexecuted state, and whether the second interface task is called to be executed or not is determined according to the state of the second interface task after the first interface task is executed. However, the above operations may cause complex interaction and dependency between the first interface task and the second interface task. Therefore, the embodiment of the present disclosure provides a technical solution for effectively controlling the task execution sequence, which can reduce the cost of controlling the single-threaded task execution sequence, reduce the dependency among different tasks, and improve the extensibility of the module. The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a device for executing and controlling a program according to an embodiment of the present disclosure. The device 10 includes a task execution module 11, a task hooking module 13, and a task execution detection module 15. Among other things, a task execution module 11, such as a task executor, may be used to execute tasks, such as a look-ahead task and a look-behind task. The preceding task and the following task are, for example, tasks having a time-series relationship. As shown in fig. 2, fig. 2 is a schematic diagram of program execution control of the embodiment of the present disclosure. In fig. 2, the antecedent task must execute earlier than the successor task. When the two tasks are time sequence related tasks, the same related parameter (key) can be respectively allocated to the two tasks to identify matching, and the two tasks can be related by a character string. The task execution module 11 may also include a first interface, such as an external interface, for tasks, such as antecedent and successor tasks, to call. The task hooking module 13, such as a task hooking device, may be used to hook a backward task when a preceding task is not completely executed. As described above, since the preceding task must be executed before the following task, when the following task is acquired first, the following task needs to be hooked to wait for the preceding task to be executed. The task hooking module 13 may include a second interface, and since the antecedent task can be executed without hooking operation, the second interface may be only called by the antecedent task. The task execution checking module 15, such as a task execution checker, may be configured to check the status of the task, including whether the task is obtained and whether the task is executed.
As shown in fig. 3, fig. 3 is a schematic structural diagram of a device for executing and controlling a program according to another embodiment of the present disclosure. Unlike the device 10 in the above-described embodiment, the device 30 in the embodiment of the present disclosure further includes a flag table 37 and a task table 39. Wherein, the mark table 37 can be used to record whether the task is executed completely; the task table 39 may be used to record whether the task is obtained. Specifically, in the embodiment of the present disclosure, the task execution checking module 35 may check the flag table 37 to determine whether the task is executed completely, and check the task table 39 to determine whether the task is obtained. More specifically, when a task such as a precedent task is executed completely, it can be entered into the tag table 37, and thus when the tag table 37 includes the precedent task or a parameter associated with the precedent task, it can be known that the precedent task is executed completely; when a task such as a backward task is obtained, but the backward task still needs to be hooked for waiting because the preceding task is not executed yet, the backward task or the associated parameters of the backward task can be recorded in the task table to indicate that the backward task is in place. Preferably, in the embodiment of the present disclosure, since the antecedent task acquisition can be performed without checking other conditions, the antecedent task does not need to be recorded in the task table; similarly, since all the subsequent tasks are executed after the subsequent tasks have been executed, the flag table 37 does not need to record the state of the subsequent tasks having been executed. In addition, the task execution checking module 39, for example, the task execution checker, may also be configured to clear the tag table 37 and the task table 39, for example, to clear the preceding task and/or its associated parameter recorded in the tag table 37 after the subsequent task is executed, or to clear the subsequent task and/or its associated parameter recorded in the task table 39 after the subsequent task is executed, so as to enter a new execution process. The disclosed embodiments solve the problem of interdependence between tasks by providing devices 10, 30, making the control of the execution order of the preceding and following tasks more efficient.
Referring to fig. 4, fig. 4 is a flowchart of a program execution control method according to an embodiment of the disclosure, including the following steps: acquiring a task to be executed; wherein the tasks comprise an antecedent task and a consequent task; when the task is the antecedent task, executing the antecedent task, and after the antecedent task is executed, checking whether a backward task associated with the antecedent task is obtained, if so, executing the backward task, and if not, recording the antecedent task until the backward task is obtained after checking; and when the task is the backward task, checking whether the execution of the prior task related to the backward task is finished, if so, executing the backward task, otherwise, hooking the backward task until the completion of the execution of the prior task is checked, and then executing the backward task.
Specifically, checking whether to obtain a successor task associated with the predecessor task may include: detecting whether the task table comprises the same associated parameters as the antecedent tasks. Executing the backward task until it is checked to obtain the backward task may include: and executing the backward task until the task table is detected to contain the same associated parameters as the forward task. Recording the look-ahead task may include: adding the associated parameters of the look-ahead task to a tag table. Checking whether the antecedent task associated with the antecedent task is performed may include: and checking whether the mark table contains the same associated parameters as the subsequent task. The checking until the execution of the antecedent task is completed may include: until it is detected that the tag table contains the same associated parameters as the following task.
More specifically, referring to fig. 4, the embodiment of the disclosure may first acquire a task to be executed, and determine whether the task to be executed is a preceding task or a following task. If the task is a preceding task, the preceding task can be directly executed, after the preceding task is executed, whether a subsequent task is obtained or not is checked, for example, whether the subsequent task with the same associated parameters as the preceding task exists in a task table or only the subsequent task is referred to by the same associated parameters is checked, if the subsequent task is obtained, the subsequent task is executed, if the subsequent task is not obtained, the fact that the preceding task is executed is recorded, for example, the associated parameters of the preceding task are recorded in a mark table, and after the associated subsequent task, for example, the subsequent task with the same associated parameters is obtained, the subsequent task is executed; if the preceding task is executed, the following task may be executed, for example, the following task or the related parameters thereof are recorded in the task table to indicate the acquired and to-be-executed state of the following task, and the following task is executed after the preceding task is executed.
In addition, after the preceding task and the following task are completed, the embodiment of the present disclosure may further include a step of clearing the task table and the flag table, and specifically, for example, the task and its associated parameters in the task table and the flag table may be cleared so as to continue to execute the task of the next cycle, and the specific task execution step may refer to the description above and is not repeated here.
The above-described apparatus embodiments are merely illustrative, wherein the modules described as separate modules may or may not be separate. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
In the above, the method and apparatus for controlling execution of a program according to the present disclosure have been described based on the embodiments and application examples. In addition, the present disclosure also provides a terminal and a storage medium, which are described below.
Referring now to fig. 5, a schematic diagram of an electronic device (e.g., a terminal device or server) 800 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 5, the electronic device 800 may include a processing means (e.g., central processing unit, graphics processor, etc.) 801 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)802 or a program loaded from a storage means 808 into a Random Access Memory (RAM) 803. In the RAM803, various programs and data necessary for the operation of the electronic apparatus 800 are also stored. The processing apparatus 801, the ROM 802, and the RAM803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to bus 804.
Generally, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 807 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; storage 808 including, for example, magnetic tape, hard disk, etc.; and a communication device 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 5 illustrates an electronic device 800 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 809, or installed from the storage means 808, or installed from the ROM 802. The computer program, when executed by the processing apparatus 801, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods of the present disclosure as described above.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of an element does not in some cases constitute a limitation on the element itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
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.
According to one or more embodiments of the present disclosure, there is provided an apparatus for program execution control, including:
the task execution module is used for executing tasks; wherein the tasks comprise an antecedent task and a consequent task which are related to each other;
the task hooking module is used for hooking the backward task when the preceding task is not completely executed; and
and the task execution checking module is used for checking whether the task is obtained and checking whether the task is executed completely.
According to one or more embodiments of the present disclosure, there is provided an apparatus, characterized in that the apparatus further comprises:
the marking table is used for recording the task after the task is executed; and
a task table for recording the task when the task acquisition is not performed.
According to one or more embodiments of the present disclosure, an apparatus is provided, wherein the task execution module includes a first interface for the task to call;
the task hooking module comprises a second interface for the backward task to call.
According to one or more embodiments of the present disclosure, there is provided an apparatus, wherein when the antecedent task and the successor task are associated with each other, the antecedent task and the successor task have the same association parameter.
According to one or more embodiments of the present disclosure, there is provided a program execution control method including:
acquiring a task to be executed; wherein the tasks comprise an antecedent task and a consequent task;
when the task is the antecedent task, executing the antecedent task, and after the antecedent task is executed, checking whether a backward task associated with the antecedent task is obtained, if so, executing the backward task, and if not, recording the antecedent task until the backward task is obtained after checking;
and when the task is the backward task, checking whether the execution of the prior task related to the backward task is finished, if so, executing the backward task, otherwise, hooking the backward task until the completion of the execution of the prior task is checked, and then executing the backward task.
According to one or more embodiments of the present disclosure, there is provided a method, wherein the checking whether to obtain a antecedent task associated with the antecedent task includes:
detecting whether a task table comprises the same associated parameters as the antecedent tasks or not;
wherein executing the backward task until the backward task is obtained by checking comprises:
and executing the backward task until the task table is detected to contain the same associated parameters as the forward task.
In accordance with one or more embodiments of the present disclosure, there is provided a method, wherein the recording the look-ahead task comprises:
adding the associated parameters of the look-ahead task to a tag table.
According to one or more embodiments of the present disclosure, there is provided a method, wherein the checking whether an antecedent task associated with the antecedent task is executed includes:
checking whether a mark table contains the same associated parameters as the backward task or not;
wherein the checking that the antecedent task is executed completely comprises:
until it is detected that the tag table contains the same associated parameters as the following task.
According to one or more embodiments of the present disclosure, there is provided a terminal including: at least one memory and at least one processor;
wherein the at least one memory is configured to store program code, and the at least one processor is configured to call the program code stored in the at least one memory to perform the method of any one of the above.
According to one or more embodiments of the present disclosure, there is provided a storage medium for storing program code for performing the above-described method.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. An apparatus for program execution control, comprising:
the task execution module is used for executing tasks; wherein the tasks comprise an antecedent task and a consequent task which are related to each other;
the task hooking module is used for hooking the backward task when the preceding task is not completely executed; and
and the task execution checking module is used for checking whether the task is obtained and checking whether the task is executed completely.
2. The apparatus of claim 1, wherein the apparatus further comprises:
the marking table is used for recording the task after the task is executed; and
a task table for recording the task when the task acquisition is not performed.
3. The apparatus of claim 1, wherein the task execution module comprises a first interface for the task to call;
the task hooking module comprises a second interface for the backward task to call.
4. The apparatus of claim 1, wherein the antecedent task and the successor task have the same association parameters when the antecedent task and the successor task are associated with each other.
5. A method of program execution control, comprising:
acquiring a task to be executed; wherein the tasks comprise an antecedent task and a consequent task;
when the task is the antecedent task, executing the antecedent task, and after the antecedent task is executed, checking whether a backward task associated with the antecedent task is obtained, if so, executing the backward task, and if not, recording the antecedent task until the backward task is obtained after checking;
and when the task is the backward task, checking whether the execution of the prior task related to the backward task is finished, if so, executing the backward task, otherwise, hooking the backward task until the completion of the execution of the prior task is checked, and then executing the backward task.
6. The method of claim 5, wherein the checking whether to obtain a antecedent task associated with the antecedent task comprises:
detecting whether a task table comprises the same associated parameters as the antecedent tasks or not;
wherein executing the backward task until the backward task is obtained by checking comprises:
and executing the backward task until the task table is detected to contain the same associated parameters as the forward task.
7. The method of claim 5, wherein the recording the look-ahead task comprises:
adding the associated parameters of the look-ahead task to a tag table.
8. The method of claim 5, wherein the checking whether the antecedent task associated with the antecedent task performed completely comprises:
checking whether a mark table contains the same associated parameters as the backward task or not;
wherein the checking that the antecedent task is executed completely comprises:
until it is detected that the tag table contains the same associated parameters as the following task.
9. A terminal, comprising:
at least one memory and at least one processor;
wherein the at least one memory is configured to store program code and the at least one processor is configured to invoke the program code stored in the at least one memory to perform the method of any of claims 5 to 8.
10. A storage medium for storing program code for performing the method of any one of claims 5 to 8.
CN202010315723.6A 2020-04-21 2020-04-21 Program execution control device and method, terminal and storage medium Pending CN111538577A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010315723.6A CN111538577A (en) 2020-04-21 2020-04-21 Program execution control device and method, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010315723.6A CN111538577A (en) 2020-04-21 2020-04-21 Program execution control device and method, terminal and storage medium

Publications (1)

Publication Number Publication Date
CN111538577A true CN111538577A (en) 2020-08-14

Family

ID=71976901

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010315723.6A Pending CN111538577A (en) 2020-04-21 2020-04-21 Program execution control device and method, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN111538577A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170031713A1 (en) * 2015-07-29 2017-02-02 Arm Limited Task scheduling
CN110096342A (en) * 2019-05-08 2019-08-06 深圳乐信软件技术有限公司 Task processing method, device, server and storage medium
CN110390493A (en) * 2019-07-31 2019-10-29 北京字节跳动网络技术有限公司 Task management method, device, storage medium and electronic equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170031713A1 (en) * 2015-07-29 2017-02-02 Arm Limited Task scheduling
CN110096342A (en) * 2019-05-08 2019-08-06 深圳乐信软件技术有限公司 Task processing method, device, server and storage medium
CN110390493A (en) * 2019-07-31 2019-10-29 北京字节跳动网络技术有限公司 Task management method, device, storage medium and electronic equipment

Similar Documents

Publication Publication Date Title
CN111475298B (en) Task processing method, device, equipment and storage medium
CN109523187B (en) Task scheduling method, device and equipment
CN113741755A (en) Information processing method and device, terminal and storage medium
CN113741756A (en) Information processing method, device, terminal and storage medium
CN111625422B (en) Thread monitoring method, thread monitoring device, electronic equipment and computer readable storage medium
CN112214408A (en) Dependency conflict detection method and device, electronic equipment and computer readable medium
CN110673986A (en) Memory operation abnormity capturing method, device, terminal and storage medium
CN111240834A (en) Task execution method and device, electronic equipment and storage medium
CN113220281A (en) Information generation method and device, terminal equipment and storage medium
CN110888773B (en) Method, device, medium and electronic equipment for acquiring thread identification
CN110704050B (en) Module initializing method and device, electronic equipment and computer readable storage medium
CN111367783B (en) Application program testing method and device and electronic equipment
CN116302271A (en) Page display method and device and electronic equipment
CN111538577A (en) Program execution control device and method, terminal and storage medium
CN115134254A (en) Network simulation method, device, equipment and storage medium
CN109960659B (en) Method and device for detecting application program
CN113176937A (en) Task processing method and device and electronic equipment
CN110825461B (en) Data processing method and device
CN112015746A (en) Data real-time processing method, device, medium and electronic equipment
CN111209042B (en) Method, device, medium and electronic equipment for establishing function stack
CN114651237A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN115827415B (en) System process performance test method, device, equipment and computer medium
CN111562913B (en) Method, device and equipment for pre-creating view component and computer readable medium
CN111782410B (en) Lock jam monitoring method and device, electronic equipment and computer readable medium
CN111367555B (en) Assertion method, assertion device, electronic equipment and computer readable 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