Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the present application will be described in further detail with reference to the accompanying drawings, and the described embodiments should not be construed as limiting the present application, and all other embodiments obtained by those skilled in the art without making any inventive effort are within the scope of the present application.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is to be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with one another without conflict. Unless defined otherwise, all technical and scientific terms used in the embodiments of the present application have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of the present application belong. The terminology used in the embodiments of the present application is for the purpose of describing the embodiments of the present application only and is not intended to be limiting of the present application.
Before further describing embodiments of the present application in detail, the terms and expressions that are referred to in the embodiments of the present application are described, and are suitable for the following explanation.
1) And (3) a control node: is a process located on a terminal device, wherein the control node is a central node of a service process, and is unique when implementing the current service process. The control node may send tasks to be performed to the distributed nodes in a broadcast manner, e.g., the control node may send tasks to the distributed nodes through triggers in the control node.
2) Distributed node: is a process across physical machines across services across internet protocol addresses (Internet Protocol, IP) compared to the control node. The number of distributed nodes is not unique, there may be multiple distributed nodes, and the function of each distributed node is asymmetric. Each distributed node is provided with a receiver, and is used for receiving the task sent by the control node, and the distributed node comprises an instruction list corresponding to the task. After any distributed node receives the task broadcast by the control node, the corresponding operation instruction is searched in the instruction list and executed, so that the execution of the task sent by the control node is completed.
3) A trigger: the control node is located on the control node and forms the control node together with the task list. The trigger is used for sending broadcast signals to the receivers in the distributed nodes to realize the task broadcasting to the distributed nodes.
4) A receiver: the distributed nodes are located on the distributed nodes and form the distributed nodes together with an instruction list. The receiver is used for receiving the broadcast signals sent by the trigger and searching the corresponding operation instructions in the instruction list.
In order to better understand the task scheduling method provided in the embodiment of the present application, first, a task scheduling method in the related art is described in an analysis.
In the related art, when task scheduling is performed, a two-dimensional matrix state table is generally set, and table 1 below, in which current states (for example, s0 state, s1 state, and s2 state) are recorded on a horizontal line; recording in Zong Lie events that trigger a change in state (e.g., e0 event, e1 event, and e2 event); "-" indicates null (no action is performed nor state transition is performed); "an/sn" means that action an is performed while the state jumps to sn.
The state jump procedure shown in table 1 may be: in the s0 state, if an e0 event occurs, then executing an a0 action, keeping the state unchanged, and maintaining the s0 state; if an e1 event occurs, then performing an a1 action and jumping the state to an s1 state; if an e2 event occurs, then an a2 action is performed and the state jumps to the s2 state. In the s1 state, if an e2 event occurs, then performing an a2 action and jumping the state to the s2 state; in the s2 state, if an e0 event occurs, then an a0 action is performed and the state is skipped to the s0 state.
TABLE 1 two-dimensional matrix State Table
In the related art, the validity of the skip among the state machines can be identified through the two-dimensional matrix state table, so that the recursion skip among the states is realized, and the task of each state is executed. Under the condition of limited states, the jump realization can be realized quickly and effectively. Each time a state is entered, a series of tasks corresponding to the state is executed. The related technology is characterized by flexible state jump and capability of carrying out unordered scheduling on tasks in time.
However, the state jump process based on the two-dimensional matrix state table in the related art needs to maintain the context of each state, that is, the previous history state of explicitly jumping to the current state, the event occurring to jump to the current state, and the action performed to jump to the current state. Obviously, the relationship between each state is deterministic and not modifiable. Then, when a state changes, such as adding or deleting a state, it is necessary to clarify the relationship between the added or deleted state and other states, i.e., to clarify the context logic between the added or deleted state and other states. That is, for the changed states, the reconstruction is required to ensure the validity of the mutual jump between all other states and other remaining states after the new state or the deleted state, obviously, the cost of maintaining the context logic between the states and the validity of the jump between the states in the related art is extremely high, and the efficiency is low in maintenance due to the need of the reconstruction between the states.
Based on at least one of the above problems in the related art, embodiments of the present application provide a task scheduling method, device, apparatus, and storage medium, which can improve the context maintenance efficiency of task scheduling and reduce the maintenance cost.
The following describes exemplary applications of the task scheduling device provided in the embodiments of the present application, where the device provided in the embodiments of the present application may be implemented as various types of user terminals such as a notebook computer, a tablet computer, a desktop computer, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable game device), and so on. In the following, an exemplary application when the device is implemented as a terminal will be described.
Referring to fig. 1A, fig. 1A is a schematic diagram of an alternative architecture of a task scheduling system 10 provided in an embodiment of the present application, in order to implement scheduling supporting a task between a control node and a distributed node, a terminal 100 (a terminal 100-1 and a terminal 100-2 are exemplarily shown) is connected to a server 300 through a network 200, where the network 200 may be a wide area network or a local area network, or a combination of the two.
Terminal 100 displays the current interface of an Application (APP), which may be a game APP, for example, on a task presentation page 110 (task presentation page 110-1 and task presentation page 110-2 are exemplarily shown). The process of the control node 120 is running in the terminal 100-1, so that the function of the control node of the application can be realized, and the process of the distributed node 130 is running in the terminal 100-2, so that the function of the distributed node of the application can be realized. Of course, the control node and the distributed node may also operate on the same terminal, or multiple distributed nodes may operate on the same terminal. When the state of the control node 120 on the terminal 100-1 changes, the control node 120 acquires a task to be executed from the server 300 through the network 200, and determines a task set to be executed corresponding to the changed state; then sequencing the tasks to be executed according to the task starting time of each task to be executed in the task set to be executed to obtain a task sequence to be executed; finally, each task to be executed is distributed to the distributed node 130 on the terminal 100-2 through the network 200 in turn according to the task sequence to be executed, so as to realize the scheduling of the task to be executed to the distributed node 130 on the terminal 100-2. After the distributed node 130 completes the task, an acknowledge completion signal is returned to the control node 120 over the network 200.
The task scheduling system 10 according to the embodiment of the present application may also be a distributed system formed by connecting a client (e.g., a client of a game APP) and a plurality of nodes (any form of computing devices in an access network, such as servers and user terminals) through a network communication.
Taking the distributed system as an example of a blockchain system, referring To fig. 1B, fig. 1B is an optional structural schematic diagram of an application of the distributed system 101 provided in the embodiment of the present application To the blockchain system, where the structure is formed by a plurality of nodes 102 (any type of computing devices in an access network, such as servers and user terminals) and clients 103, and a Peer-To-Peer (P2P) network is formed between the nodes, and the P2P protocol is an application layer protocol running on top of a transmission control protocol (Transmission Control Protocol, TCP) protocol. In a distributed system, any machine, such as a server, a terminal, may join to become a node, including a hardware layer, an intermediate layer, an operating system layer, and an application layer.
Referring to the functionality of each node in the blockchain system shown in fig. 1B, the functions involved include:
1) The routing, the node has basic functions for supporting communication between nodes.
Besides the routing function, the node can also have the following functions:
2) The application is used for being deployed in a block chain to realize specific service according to actual service requirements, recording data related to the realization function to form recorded data, carrying a digital signature in the recorded data to represent the source of task data, sending the recorded data to other nodes in the block chain system, and adding the recorded data into a temporary block when the source and the integrity of the recorded data are verified by the other nodes.
For example, the services implemented by the application include:
2.1 Wallet for providing electronic money transactions, including initiating a transaction (i.e., sending a transaction record of the current transaction to other nodes in the blockchain system, the other nodes, after verification, storing record data of the transaction in a temporary block of the blockchain in response to acknowledging that the transaction is valid; of course, the wallet also supports inquiry of electronic money remaining in the electronic money address.
2.2 The shared account book is used for providing the functions of storing, inquiring, modifying and the like of account data, sending record data of the operation on the account data to other nodes in the blockchain system, and after the other nodes verify to be effective, storing the record data into a temporary block as a response for acknowledging that the account data is effective, and also sending confirmation to the node initiating the operation.
2.3 A computerized agreement that can execute the terms of a contract, implemented by code deployed on a shared ledger for execution when certain conditions are met, for completing automated transactions based on actual business demand codes, such as querying the physical distribution status of the goods purchased by the buyer, transferring the electronic money of the buyer to the merchant's address after the buyer signs for the goods; of course, the smart contract is not limited to executing the contract for the transaction, and may execute a contract that processes the received information.
3) The blockchain comprises a series of blocks (blocks) which are connected with each other according to the generated sequence time, the new blocks are not removed once being added into the blockchain, and record data submitted by nodes in the blockchain system are recorded in the blocks.
4) Consensus (Consensus), a process in a blockchain network for agreeing on transactions in blocks among the involved nodes, the agreed blocks will be appended to the tail of the blockchain, and mechanisms for implementing Consensus include Proof of Work (PoW), proof of equity (PoS), proof of equity (DPoS), proof of elapsed time (Proof of Elapsed Time, poET), and the like.
Referring to fig. 1C, fig. 1C is an optional schematic diagram of a Block Structure (Block Structure) provided in an embodiment of the present application, where each Block includes a hash value of a transaction record stored in the Block (hash value of the Block) and a hash value of a previous Block, and the blocks are connected by the hash values to form a blockchain. In addition, the block may include information such as a time stamp at the time of block generation. The Blockchain (Blockchain), which is essentially a de-centralized database, is a string of data blocks that are generated in association using cryptographic methods, each of which contains associated information that is used to verify the validity (anti-counterfeiting) of its information and to generate the next block.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a terminal 100 provided in an embodiment of the present application, and the terminal 100 shown in fig. 2 includes: at least one processor 210, a memory 250, at least one network interface 220, and a user interface 230. The various components in terminal 100 are coupled together by bus system 240. It is understood that the bus system 240 is used to enable connected communications between these components. The bus system 240 includes a power bus, a control bus, and a status signal bus in addition to the data bus. But for clarity of illustration the various buses are labeled as bus system 240 in fig. 2.
The processor 210 may be an integrated circuit chip with signal processing capabilities such as a general purpose processor, such as a microprocessor or any conventional processor, a digital signal processor (Digital Signal Processor, DSP), or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like.
The user interface 230 includes one or more output devices 231, including one or more speakers and/or one or more visual displays, that enable presentation of media content. The user interface 230 also includes one or more input devices 232, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The memory 250 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard drives, optical drives, and the like. Memory 250 optionally includes one or more storage devices physically located remote from processor 210. Memory 250 includes volatile memory or nonvolatile memory, and may also include both volatile and nonvolatile memory. The nonvolatile Memory may be a Read Only Memory (ROM), and the volatile Memory may be a random access Memory (Random Access Memory, RAM). The memory 250 described in embodiments of the present application is intended to comprise any suitable type of memory. In some embodiments, memory 250 is capable of storing data to support various operations, examples of which include programs, modules and data structures, or subsets or supersets thereof, as exemplified below.
An operating system 251 including system programs for handling various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and handling hardware-based tasks;
network communication module 252 for reaching other computing devices via one or more (wired or wireless) network interfaces 220, exemplary network interfaces 220 include: bluetooth, wireless compatibility authentication (WiFi), and universal serial bus (Universal Serial Bus, USB), etc.;
an input processing module 253 for detecting one or more user inputs or interactions from one of the one or more input devices 232 and translating the detected inputs or interactions.
In some embodiments, the apparatus provided in the embodiments of the present application may be implemented in a software manner, and fig. 2 shows a task scheduling device 254 stored in a memory 250, where the task scheduling device 254 may be a task scheduling device in a terminal 100-1 including a control node, and may be software in the form of a program and a plug-in, and includes the following software modules: the determination module 2541, the ordering module 2542 and the distribution module 2543 are logical, so that any combination or further splitting may be performed according to the implemented functions. The functions of the respective modules will be described hereinafter.
Of course, in other embodiments, the task scheduling device may also be a task scheduling device (not shown in the figure) in the terminal 100-2 including the distributed node, and may also be software in the form of a program, a plug-in, or the like, including the following software modules: a receiving module and an executing module.
In other embodiments, the apparatus provided by the embodiments of the present application may be implemented in hardware, and by way of example, the apparatus provided by the embodiments of the present application may be a processor in the form of a hardware decoding processor that is programmed to perform the task scheduling method provided by the embodiments of the present application, e.g., the processor in the form of a hardware decoding processor may employ one or more application specific integrated circuits (Application Specific Integrated Circuit, ASIC), DSPs, programmable logic devices (Programmable Logic Device, PLD), complex programmable logic devices (Complex Programmable Logic Device, CPLD), field-programmable gate arrays (Field-Programmable Gate Array, FPGA), or other electronic components.
The task scheduling method provided by the embodiment of the present application will be described below in connection with exemplary applications and implementations of the terminal provided by the embodiment of the present application.
Referring to fig. 3, fig. 3 is an optional flowchart of a task scheduling method according to an embodiment of the present application, and will be described with reference to the steps shown in fig. 3.
In step S301, when the state of the control node changes, the control node determines a task set to be executed corresponding to the changed state.
Here, the control node may be one node in a blockchain system. Before the state of the control node changes, the control node is in a historical state, and when the control node is in the historical state, at least one historical task to be executed is corresponding. When the state of the control node changes, the state of the control node changes from a historical state to a current state, and the current state corresponds to at least one task to be executed, wherein the at least one task to be executed can comprise all the historical tasks to be executed, can also comprise part of the historical tasks to be executed, and can also not comprise the historical tasks to be executed.
In this embodiment of the present application, the at least one task to be executed forms the task set to be executed.
Step S302, sorting the tasks to be executed according to the task start time of each task to be executed in the task set to obtain a task sequence to be executed.
Here, each task to be executed has attribute information, which may include at least one of: task start time, task end time, task Identification (ID), trigger time period, repeated execution interval, whether blocking and execution duration, etc. of the task to be executed.
When the current time reaches the task starting time, the task is sent to the distributed nodes through the trigger of the control node so as to realize the execution of the task; the task end time refers to marking that the task is completed when the current time exceeds the task end time, and not scheduling the task to the distributed node; the triggering time period is a time period in which the starting time is the task starting time and the ending time is the task ending time; the repeated execution interval refers to that when the currently executed task is a blocking task, for the non-executed blocking task, the distributed node is repeatedly triggered to execute the non-executed blocking task according to the repeated execution interval in a triggering time period until the task execution is completed; whether the task to be executed is a blocking task or a non-blocking task is judged; the execution duration refers to the duration between the task being sent to the distributed node and the distributed node returning an execution completion signal.
In the embodiment of the present application, all tasks to be executed in a task set to be executed are ordered according to the time sequence of the task start time of each task to be executed, so as to form the task sequence to be executed, in the task sequence to be executed, the tasks to be executed are arranged according to the time sequence of the task start time, and the task to be executed with the front task start time is located at the uppermost part of the task sequence to be executed.
According to the method and the device for processing the task sequence to be executed, the task starting time of the task to be executed is only concerned with the task sequence to be executed formed after the task sequence is ordered, and other context information such as trigger events for jumping to the corresponding state of the current task and actions executed by jumping to the corresponding state of the current task are not needed to be concerned any more, so that the content to be maintained of the task sequence to be executed is less.
In some embodiments, the attribute information for the task to be performed and each task to be performed may be stored in the blockchain.
Step S303, distributing each task to be executed to at least one distributed node in turn according to the task sequence to be executed, so as to implement scheduling of the task to be executed.
Here, after the task sequence to be executed is determined, the tasks to be executed are sequentially sent to the distributed nodes according to the arrangement sequence of all the tasks to be executed in the task sequence to be executed, starting from the task to be executed closest to the current time at the task starting time.
It should be noted that the distributed node may also be a node in a blockchain system. The distributed nodes may be one or more, when the distributed nodes are one, the control node sends a task to be executed to a certain distributed node, when the distributed nodes are a plurality of distributed nodes, the control node sends the task to be executed to a plurality of distributed nodes at the same time, for example, the control node may broadcast the task to be executed to a plurality of distributed nodes in a broadcast mode.
In this embodiment of the present application, it may be that a trigger in the control node broadcasts a task to be executed to a distributed node, and a receiver in the distributed node receives the task to be executed broadcast by the control node.
After the receiver of the distributed node receives the task to be executed, the receiver analyzes the task to be executed, matches an operation instruction corresponding to the task to be executed in an instruction list of the distributed node, and executes the operation instruction. That is, in the embodiment of the present application, the distributed node may execute the task to be executed by executing an operation instruction corresponding to the task to be executed.
In the embodiment of the application, the control node sequentially sends the tasks to be executed in the task sequence to the distributed node, so that the task to be executed is scheduled to the distributed node.
According to the task scheduling method provided by the embodiment of the application, when the state of the control node changes, the control node determines a task set to be executed corresponding to the changed state; and sequencing the tasks to be executed according to the task starting time of each task to be executed in the task set to obtain a task sequence to be executed, so as to schedule the tasks according to the task sequence to be executed. In this way, the tasks to be executed after the state change are ordered, so that a task sequence to be executed with the ordering according to the task starting time can be formed, and when the tasks are scheduled, the tasks to be executed can be distributed to the distributed nodes in sequence according to the task sequence to be executed, and the context logic of the task scheduling is not required to be maintained, so that the context maintenance efficiency of the task scheduling can be improved.
In some embodiments, the state of the control node may be changed by adding a new state or states to the control node, and then referring to fig. 4A, fig. 4A is a schematic flowchart of an alternative task scheduling method provided in an embodiment of the present application, and fig. 4A shows that step S301 in fig. 3 may be implemented by the following steps:
in step S401, when the control node adds a new state, the control node determines a task to be executed corresponding to the new state.
Step S402, forming the task set to be executed through the task to be executed corresponding to the new state and the historical task to be executed before adding the new state.
In the embodiment of the present application, when a new state is added, a task to be executed corresponding to the new state is determined, and according to the task to be executed corresponding to the new state and the historical task to be executed, any set to be executed is determined, that is, the new task to be executed corresponding to the new state is added to the historical task set to be executed.
For example, the states of the control node include a state a, a state B, and a state C, where the tasks to be performed corresponding to the state a include tasks A1 and A2, the tasks to be performed corresponding to the state B include tasks B1 and B2, and the tasks to be performed corresponding to the state C include tasks C1 and C2. The state D is added to the control node, and the tasks to be executed corresponding to the state D comprise tasks D1 and D2, so that the historical tasks to be executed are tasks A1, A2, B1, B2, C1 and C2, and the new tasks to be executed are tasks D1 and D2, and therefore the formed task set to be executed comprises tasks A1, A2, B1, B2, C1, C2, D1 and D2.
In some embodiments, the change of the state of the control node may be that one or more states of the control node are deleted, and then referring to fig. 4B, fig. 4B is a schematic flowchart of an alternative task scheduling method provided in an embodiment of the present application, and fig. 4B shows that step S301 in fig. 3 may be further implemented by the following steps: in step S411, when the control node deletes the state, the control node determines that the remaining tasks to be executed corresponding to the states remaining after the state is deleted. Step S412, forming the task set to be executed by the remaining tasks to be executed.
In the embodiment of the application, when deleting a state, determining a remaining task to be executed corresponding to a state remaining after deleting the state, and determining any set to be executed according to the remaining task to be executed, namely deleting the task to be executed corresponding to the deleted state, and reserving the remaining task to be executed corresponding to the remaining state.
For example, the states of the control node include a state a, a state B, and a state C, where the tasks to be performed corresponding to the state a include tasks A1 and A2, the tasks to be performed corresponding to the state B include tasks B1 and B2, and the tasks to be performed corresponding to the state C include tasks C1 and C2. The state C is now deleted for the control node, and the remaining states comprise states a and B, and the remaining tasks to be performed comprise tasks A1, A2, B1 and B2, and thus tasks A1, A2, B1 and B2 are included in the resulting set of tasks to be performed.
In some embodiments, the change in the state of the control node may also be an update of the state of the control node, where the update refers to updating any one state of the control node to another state.
For example, the states of the control node include a state a, a state B, and a state C, where the tasks to be performed corresponding to the state a include tasks A1 and A2, the tasks to be performed corresponding to the state B include tasks B1 and B2, and the tasks to be performed corresponding to the state C include tasks C1 and C2. The state of the control node is updated, the state C is updated to be the state D, tasks to be executed corresponding to the state D comprise tasks D1 and D2, the current state of the control node comprises states A, B and D, and the formed set of tasks to be executed comprises tasks A1, A2, B1, B2, D1 and D2.
In some embodiments, referring to fig. 5, fig. 5 is a schematic flow chart of an alternative task scheduling method provided in the embodiments of the present application, and fig. 5 shows that step S303 in fig. 3 may be implemented by the following steps:
step S501 is to determine a trigger period of each of the tasks to be performed in the task sequence to be performed. Here, the starting time of the trigger period is a task starting time of the task to be executed, and the ending time of the trigger period is a task ending time of the task to be executed. And in the trigger time period, the task to be executed can be sent to the distributed node.
Step S502, determining the task to be executed including the current time in the triggering time period as a target task to be executed.
Here, the trigger period includes a task to be executed at the current time, which means that the current time is within the trigger period of the task to be executed, for example, the trigger period of a certain task to be executed K0 is 8:00 to 9:00, and the current time is 8:30, so the task to be executed K0 can be determined as the target task to be executed. In some embodiments, the target task to be performed may also be stored in the blockchain.
In some embodiments, step S502 may also be implemented using the following steps:
step S5021, determining the task to be executed which is not executed by any distributed node and is included in the trigger period of time as the target task to be executed.
Here, when determining the target task to be performed, the task to be performed, which is not performed by the distributed node in the task sequence to be performed, may be first determined, and then the target task to be performed may be determined among the tasks to be performed which are not performed.
Step S503, distributing the target task to be executed and other tasks to be executed located after the target task to be executed in the task sequence to at least one distributed node in turn, so as to implement scheduling of the task to be executed to each distributed node.
Here, after determining the target task to be executed, the target task to be executed is a task to be executed currently sent to the distributed node, and for other tasks to be executed after the target task to be executed, the target task to be executed and other tasks to be executed after the target task to be executed are sequentially sent to the distributed node, so that the target task to be executed and the other tasks to be executed after the target task to be executed in the task sequence to be executed are sequentially distributed to at least one distributed node.
According to the task scheduling method provided by the embodiment of the application, the trigger time period comprises the current time and the tasks to be executed which are not executed by any distributed node are determined to be the target tasks to be executed, and the target tasks to be executed and other tasks to be executed after the target tasks to be executed are sequentially sent to the distributed node. Therefore, the tasks to be executed, which are sent to the distributed nodes, can be guaranteed to be effective tasks, the ordered sending of the tasks to be executed is guaranteed, and overtime tasks or overdue tasks are prevented from being sent to the distributed nodes.
In some embodiments, the task to be performed comprises a blocking task; by a blocked task is meant that all tasks subsequent to the blocked task cannot be performed without completing the blocked task. Referring to fig. 6A, fig. 6A is a schematic flowchart of an alternative task scheduling method provided in an embodiment of the present application, and fig. 6A illustrates that step S303 in fig. 3 may be implemented by:
And step S601, when the task to be executed sent to the at least one distributed node is the blocking task, waiting to receive an execution completion signal corresponding to the blocking task returned by each distributed node.
Here, when the distributed node completes the task to be executed, the execution completion signal is returned to inform the control node of completing the task to be executed.
Step S602, after receiving the execution completion signal returned by each distributed node, sequentially distributing the tasks to be executed after the blocking task in the task sequence to be executed to the at least one distributed node.
Here, when receiving the execution completion signal returned by each distributed node, it indicates that the blocking task broadcasted by the control node has been executed by all the distributed nodes, so that the next task to be executed may be sent, and if the next task to be executed is also a blocking task, it is required to wait for the distributed nodes to return the execution completion signal corresponding to the next task to be executed, and then send the next task to be executed; if the next task to be executed is not the blocking task, the waiting distributed node is not required to return an execution completion signal corresponding to the next task to be executed, and the waiting distributed node can send the execution completion signal to the task to be executed only if the task starting time of the next task to be executed is reached.
Step S603, when the execution completion signal corresponding to the blocking task returned by any one of the distributed nodes is not received after the preset time period has elapsed, retransmitting the blocking task to the at least one distributed node.
Here, in order to avoid that the blocked task is not effectively executed, if the execution completion signal is thrown not to be received after the preset time period, it is possible that the distributed node does not normally receive the blocked task or the distributed node does not normally execute the blocked task, and thus, the blocked task is re-transmitted to the distributed node to ensure that the blocked task can be effectively executed.
According to the task scheduling method provided by the embodiment of the application, for the blocking task, the subsequent task to be executed can be sent and executed only after the blocking task is executed, and under the condition that the blocking task is not completed, all subsequent tasks of the blocking task can not be executed, so that the accurate and effective execution completion of the critical task can be ensured, and the omission or abnormal execution of the critical task is avoided.
In some embodiments, the task to be performed comprises a non-blocking task; the non-blocking task refers to the execution of all tasks subsequent to the non-blocking task, and the execution of all tasks is independent of the state of the non-blocking task. Referring to fig. 6B, fig. 6B is a schematic flow chart of an alternative task scheduling method provided in the embodiment of the present application, and fig. 6B illustrates a step of distributing each task to be performed to at least one distributed node in sequence according to the task to be performed in step S303 in fig. 3, where the step may be implemented by:
Step S611, when the task to be executed sent to the at least one distributed node is the non-blocking task, sending the non-blocking task to the at least one distributed node at a task start time of each non-blocking task.
In the embodiment of the application, if the task to be executed is a non-blocking task, the control node does not need to wait for the execution completion of the current task to be executed, namely, does not need to wait for the control node to receive an execution completion signal, and only if the task starting time of the next task to be executed arrives, namely, the next task to be executed is normally sent to the distributed node, so that the non-blocking task can be timely sent to the distributed node.
Referring to fig. 7, fig. 7 is a schematic flowchart of an alternative task scheduling method according to an embodiment of the present application, and will be described with reference to the steps shown in fig. 7.
In step S701, when the state of the control node changes, the control node determines a task set to be executed corresponding to the changed state.
Step S702, sorting the tasks to be executed according to the task start time of each task to be executed in the task set to obtain a task sequence to be executed.
And step 703, distributing each task to be executed to a distributed node in turn according to the task sequence to be executed so as to realize the dispatching of the task to be executed to the distributed node. The steps S701 to S703 are the same as the steps S301 to S303, and the embodiments of the present application will not be repeated.
In step S704, the distributed node determines at least one operation instruction corresponding to the task to be executed in a preset operation instruction library according to the identifier of the task to be executed.
Here, after the distributed node receives the task to be executed sent by the control node, the task to be executed is executed. The task to be executed corresponds to at least one operation instruction, and the operation instruction is used for indicating an operation action to be executed by the distributed node. In some embodiments, the identification of the task to be performed and the operation instruction corresponding to the task to be performed may also be stored in the blockchain.
In this embodiment of the present application, the distributed node includes a receiver configured to receive the task to be executed and a preset operation instruction library (i.e., an instruction list), where the preset operation instruction library includes at least one operation instruction. When the distributed node receives the identification of the task to be executed, analyzing the task to be executed, determining the identification of the task to be executed, searching an operation instruction corresponding to the identification in the preset operation instruction library according to the identification, and obtaining the searched operation instruction as the operation instruction corresponding to the task to be executed.
Step S705, the distributed node executes the at least one operation instruction corresponding to the task to be executed.
Here, after the operation instruction corresponding to the task to be executed is found, the distributed node executes the at least one operation instruction.
In step S706, when each operation instruction corresponding to the task to be executed is executed, the distributed node returns an execution completion signal of the corresponding operation instruction to the control node.
Here, after completion of one operation instruction per execution, an execution completion signal of the operation instruction is returned to the control node. For example, when the distributed node finds that the operation instruction corresponding to the task E currently received is E1 and E2, the distributed node first executes the operation instruction E1, and returns an E1 execution completion signal to the control node after executing the operation instruction E1; and executing the operation instruction E2 again, and returning an E2 execution completion signal to the control node after the operation instruction E2 is executed.
It should be noted that, since the control node may broadcast the task to be performed to the plurality of distributed nodes, each of the distributed nodes performs steps S704 to S706 after receiving the task to be performed.
In some embodiments, the task to be performed comprises a blocking task; correspondingly, the method further comprises:
and step S710, when the task to be executed received by the distributed node is the blocking task, executing the blocking task and returning an execution completion signal to the control node.
Here, when the distributed node completes the task to be executed, the execution completion signal is returned to inform the control node of completing the task to be executed.
Step S711, after returning the execution completion signal, receives a task to be executed after the blocking task in the task sequence to be executed sent by the control node.
Here, since the task to be executed is a blocking task, the control node continues to send the next task to be executed to the distributed node only after the blocking task is executed, and therefore, when the distributed node returns an execution completion signal of the blocking task, the task to be executed after the blocking task in the task sequence to be executed sent by the control node can be received.
In some embodiments, the task to be performed comprises a non-blocking task; correspondingly, the method further comprises:
Step S712, when the task to be executed received by the distributed node is the non-blocking task, receiving the non-blocking task at a task start time of each non-blocking task and executing the non-blocking task.
In this embodiment of the present application, when the task to be executed is a non-blocking task, it is not necessary to wait for the execution of the current task to be executed to complete, that is, it is not necessary to wait for the distributed node to send an execution completion signal, and as long as the task start time of the next task to be executed arrives, the distributed node normally receives the next task to be executed sent by the control node, so as to ensure that the non-blocking task can be received in time.
In the following, an exemplary application of the embodiments of the present application in a practical application scenario will be described.
According to the task scheduling method, tasks to be executed in all states are serialized, task scheduling is conducted according to time sequence, and each task is set to be a blocking task or a non-blocking task. The execution of each task depends on time, and whether the blocking task of the last step is completed or not is detected. If the blocking task is not completed, the blocking task of the last step is repeatedly scheduled at set intervals until the blocking task of the last step is completed, or the blocking task is released only when the blocking task of the last step is overtime.
The task scheduling method of the embodiment of the application is characterized by stable and reliable state, fault tolerance of task execution and ordered time. For the addition and deletion of the tasks, only the context of the current task is required to be maintained, and the context relation among all the tasks is not required to be maintained.
In the embodiment of the application, a distributed scheduling mode is adopted, a trigger and a receiver are used as middleware, a global control node invokes the trigger for tasks, the tasks are transmitted to the receivers of the distributed nodes through a network, and the receivers receive task instructions and execute respective tasks.
The task scheduling method provided by the embodiment of the application can be at least used in the following Internet scenes based on the design requirement of time fixation:
first kind: dynamic creation of network game copies. Most of the servers of the current online games are distributed deployment schemes, and a series of state change requirements are involved in the process of copy activity, so that the following flows can be realized by the method of the embodiment of the application: data migration and rollback of roles; role transport control protocol (Transmission Control Protocol, TCP) connection migration and rollback; switching the distributed service state; dynamic calculation and creation of the number of replica servers.
Second kind: dynamic creation of large internet marketing campaigns. For online relay activities, such as torch delivery, marketing activities generate fires based on user behavior, deliver within a specific time, reach a specific time node, generate marketing rewards, and such relay activities may be implemented by methods of embodiments of the present application.
Third kind: distributed computing. In some scenarios of the internet, a large amount of computing requirements are encountered, and compared with single-core computing, or single-server computing, the distributed computing needs to consume more computing elements, such as a central processing unit (Central Processing Unit, CPU), a server, and other computing elements.
Fig. 8A is an alternative interaction diagram of the trigger and the receiver provided in the embodiment of the present application, as shown in fig. 8A, where the trigger 81 and the receiver 82 are a pair of co-operating components, the trigger 81 sends a task signal 811 including a task to be performed to the receiver 82, and after the receiver 82 receives the signal, the receiver reversely sends an acknowledgement signal 821 to the trigger 81, indicating that the task signal 811 has been received.
Fig. 8B is an alternative interaction schematic diagram of a trigger and a receiver provided in this embodiment of the present application, as shown in fig. 8B, where tasks and instructions are objects of working services of the trigger 81, when a certain task is executed, a service process where the trigger is located sends a specified signal to the trigger 81, and the trigger 81 notifies all the receivers 82 in a broadcast manner to execute an instruction corresponding to the task, such as a broadcast signal 813 in fig. 8B. The task may be any task located in the task list 812, as shown in fig. 8B, where task list 812 includes task 1 and task 2 … … task N.
After receiving the instruction, the receiver 82 finds the instruction corresponding to the task in the operation instruction list 822 (corresponding to the preset operation instruction library), and executes the instruction, as shown in fig. 8B, where the operation instruction list 822 includes an instruction 1 and an instruction 2 and … …. After execution is complete, an acknowledge complete signal 823 is sent back by the receiver 82 to the trigger 81 indicating that the task has been completed.
Fig. 9 is a schematic structural diagram of a control node provided in the embodiment of the present application, and as shown in fig. 9, a control node 90 includes the aforementioned trigger 81 and a task list 812.
The control node 90 is a central node for task scheduling, and the main working principles include the following aspects:
First aspect: a task list is maintained.
Here, the main maintenance contents are: task ID, task name, task start time, task end time, task execution time, whether it is a blocking task, and the repetition interval of the task.
Here, the task start time refers to when the current time reaches the task start time, the task is executed through the trigger; the task ending time is that when the current time exceeds the task ending time, the task is marked to be completed, and the task is not triggered to be executed any more; the task execution time refers to recording the task execution time when the receiver reversely sends the completion of the task execution, and the task execution time is represented to be completed.
Whether or not the task is a blocked task, wherein the blocked task must be executed, and the non-executed blocked task is repeatedly executed at execution intervals within an executable time period until the task execution is completed or the ending time is exceeded. And, during this executable period, none of the subsequent tasks will be performed. Non-blocking tasks are repeatedly executed at execution intervals within an executable time period, the execution time is not recorded, and subsequent tasks can be executed.
Second aspect: the tasks are scheduled in a time sequence. The task scheduling of the control node is to traverse the task list once with a fixed clock period (e.g., 5 seconds), and each task node performs the logic process as shown in fig. 10, starting from the first task node in the list.
As shown in fig. 10, for each task node, the following logical processing steps are performed:
in step S1001, the task from the current task in the task list to the task list end position is traversed.
Step S1002, it is determined whether the current task is a blocking task. If the determination result is yes, step S1003 is performed; if the determination result is no, step S1007 is performed.
In step S1003, it is determined whether the current task has been executed to completion. If yes, returning to execute step S1001; if the determination result is negative, step S1004 is performed.
Step S1004, determining whether the current time is within the triggerable time period of the current task.
If yes, executing step S1005; if the judgment result is negative, the traversal is ended.
Step S1005, triggering the current task.
Step S1006, it is determined whether the triggered task is a blocking task. If the judgment result is yes, finishing the traversal; if the determination result is negative, the execution returns to step S1001.
Step S1007, judging whether the current time is within the triggerable time period of the current task. If yes, go to step S1008; if the determination result is negative, the execution returns to step S1001.
Step S1008, determining whether the trigger interval is exceeded. If yes, executing step S1005; if the determination result is negative, the execution returns to step S1001.
Third aspect: blocked tasks and iterative attempts.
For a blocking task, after triggering once, if the trigger does not receive a reverse acknowledgement completion signal of the receiver, the trigger will trigger a second time when the next trigger time arrives, and so on until the reverse acknowledgement completion signal is received to indicate that the task is completed.
In this embodiment, the distributed node is an actual executor of the task, and includes a receiver and an operation instruction list, where the operation instruction list uses a signal ID of the task signal as an index.
The working principle of the distributed node comprises: acquiring the signal ID by a receiver; executing a corresponding operation instruction according to the signal ID; after execution is complete, the call receiver notifies the completion of instruction execution in reverse.
In the embodiment of the application, the distributed node supports role extension and parallel extension.
The principle of role extension is as follows: for the same task signal, each role (i.e. distributed node) may execute different instructions, as shown in fig. 11, when the same task signal S1 is triggered from the control node 90, the task signal S1 is broadcast to each distributed node (e.g. distributed node A, B, C), where the receiver 82 corresponding to the distributed node A, B, C is the receiver 82A, 82B, 82C, respectively), and the receiver 82A, 82B, 82C receives the task signal S1 at the same time, and finds the corresponding operation instruction according to the task signal S1 to execute, and after completing, the receiver reversely sends a message to the trigger 81 of the control node. For example, the control node broadcasts a message "flag-raising ceremony start", the distributed node a is a whole class of primary school students, and the corresponding operation is "wearing green scarf". The distributed node B is a pupil with more than three grades overall, and the corresponding operation is wearing red scarf. The distributed node C is a student in the population and the corresponding operation is "standing".
The above illustrates a role-based extension operation, and the following examples will describe a parallel extension operation, where the distributed node C is subdivided into "to-the-middle school", "double-denier attached to the middle school", "build on the middle school", etc., and each middle school student, after receiving the instruction, performs the operation of "singing national song" at the same time. With continued reference to fig. 11, distributed nodes B and C may be two role extension nodes of distributed node a. The distributed node a represents the first-class pupil exemplified above, B represents the pupil of three or more classes, and C represents the middle school student as a whole.
FIG. 12 is a diagram that simplifies the internal architecture of a distributed node, depicting the logical structure of parallel expansion nodes. Wherein the distributed nodes A2 and A3 are parallel expansion nodes of A1; the distributed nodes B2 and B3 are parallel expansion nodes of B1; the distributed nodes C2, C3 are parallel expansion nodes of C1. For example, C1 represents middle school students to Ming and Zhu, C2 represents middle school students in double denier appendages, and C3 represents middle school students in Jian Ping.
In the embodiment of the application, the flow design of the task scheduling method comprises the following aspects: setting a task list; a time-ordered task scheduling method; distinguishing between blocked tasks and non-blocked tasks; and (5) triggering repeatedly.
When setting up the task list, the task list is written in time order, the start time must be arranged in time ascending order, and the repetition interval may be filled for non-blocking tasks. Here, the task list is exemplified by a flag-raising ceremony, see the task list of table 2.
TABLE 2 task List
Task ID
|
Name of the name
|
Start time
|
End time
|
Whether or not to block
|
Repetition interval
|
1
|
Students enter playground
|
1 point
|
2 points
|
Whether or not
|
For 5 minutes
|
2
|
Flag raising ceremony preparation
|
2 points
|
3 points
|
Whether or not
|
For 5 minutes
|
3
|
Flag-raising ceremony
|
3 points
|
4 points
|
Is that
|
Without any means for
|
4
|
Early gym
|
3 points
|
4 points
|
Is that
|
Without any means for
|
5
|
Flag-raising ceremony ending
|
3 points
|
4 points
|
Is that
|
For 5 minutes |
In other embodiments, when the instruction list is set, the instruction list maintains the instruction operation corresponding to the task ID, as shown in the following table 3, and when the task signal is received, the corresponding operation instruction may be executed according to the task ID.
TABLE 3 instruction list
In this embodiment of the present application, in the task scheduling method with ordered time, the tasks are executed according to the sequence of time, as shown in table 2, if the current time reaches the start time of task execution, the signal of the task is started to be triggered; for tasks that do not arrive at the current time, the task is not performed. If the time periods of the plurality of tasks are configured to overlap, it is necessary to determine whether or not the execution is possible based on the blocking state of the tasks.
Where blocking is when a given task is set to blocking mode, all subsequent tasks cannot be performed without completing the task, e.g., flag-raising and early-handling in table 2 set to blocking mode, indicating that the two tasks are critical tasks, cannot be skipped, and if the task is not completed, all the following tasks cannot be performed. Non-blocking is the state in which all subsequent tasks are executed independent of the task after a given task is set to non-blocking mode. For example, the task "flag-raising ceremony" in table 2 is performed independently of the completion status of "student entering playground", "flag-raising ceremony preparation".
The task of repeated triggering works in two cases:
case one: in the case where the task is set to "non-blocking mode", for example, the task of "student enters the playground" in table 2, the trigger may be repeated every 5 minutes, so that it can be ensured that all students can enter the playground step by step in a period of 1 hour until the current time reaches the end time.
And a second case: in the case of a task set to "blocking mode", such as the "singing national song" task in table 2, it takes 10 minutes to complete once triggered, then the control node will not immediately receive the reverse signal from the receiver when the task is triggered, so the trigger task signal will be repeated at 5 minute intervals until the trigger is stopped after the instruction is completed, indicating that the task is completed, and enter the "early operation" phase.
In the following, an exemplary application of the embodiments of the present application in another practical application scenario will be described, where the method of the embodiments of the present application may also be applied to dynamically creating a game copy, and since the main core of the game copy is the concept of having a scenario, for example, a character may be from a normal playing scenario to a smaller game copy scenario, then a small portion of the characters may be gathered into the copy scenario. Wherein the game copy scene is isolated from the normal scene and is therefore referred to as a copy.
The copy belongs to an extension of the resource on the architecture of the server (corresponding to the control node), and is an extension of the server resource, for example, may be an extension of a process or may also be an extension of a memory. The primary core of the copy is that it is isolated from existing resources, which need to be created, and is otherwise scheduled across processes (i.e., multiple distributed nodes).
In addition, when creating a copy of a game, the life cycle of the copy needs to be considered, the copy is created when needed, and the copy is recovered after being used up. For example, a game copy is created, a new server (i.e. a distributed node) independent of the currently used server is needed, a new game process is deployed on the new server, a certain shared memory is opened, when a character enters a scene corresponding to the game copy, the game operation under the scene can be realized, when the character returns to a normal scene after the game is finished, the progress of the game copy is brushed off or the shared memory is recovered.
It should be noted that the states of the copies are mutually exclusive, and the states of each copy are inconsistent. Therefore, when the method of the embodiment of the application dynamically creates the game copy, when the current copy is switched to the game scene corresponding to the new copy, the state corresponding to the copy changes at this time, so that a plurality of game tasks to be executed (corresponding to the tasks to be executed) corresponding to the new copy are determined, for example, the game tasks to be executed may include: selecting prop tasks, selecting equipment tasks, executing specific tasks, performing attacks and other tasks in the game copy. Then determining the starting time of each game task, and sequencing all the game tasks to be executed according to the starting time of each game task to obtain a game task sequence (corresponding to the task sequence to be executed); and finally distributing the game tasks to the distributed nodes in sequence according to the game task sequence, wherein the distributed nodes can be terminals running the game copies, namely the distributed nodes can be terminals used by users playing games, and the users execute the game tasks through the terminals by sending the game tasks to the users playing games, so that the users can finish scheduling the game tasks in the game task sequence. And for multiple copies in the game, the task scheduling method is adopted circularly to schedule the tasks, so that multiple copies of the game process can be scheduled, and multiple task mechanisms can be realized.
According to the task scheduling method provided by the embodiment of the application, for the orderly and reliable checking mechanism of the states of all nodes in the distributed system, the time point for completing the specific task can be definitely designated, and the context logic of task scheduling can be ensured due to the extremely strong fault tolerance in combination with the setting of the blocking type. And deleting and adding tasks in the task list, only checking the front task and the subsequent task of the current task, and determining whether the tasks are arranged in ascending order in time, thereby effectively reducing the checking workload and improving the task scheduling efficiency.
Continuing with the description below of an exemplary architecture implemented as a software module for the task scheduler 254 provided in embodiments of the present application, in some embodiments, as shown in fig. 2, the software modules stored in the task scheduler 254 of the memory 250 may include:
a determining module 2541, configured to determine, when a state of the control node changes, a task set to be executed corresponding to the changed state;
the ordering module 2542 is configured to order the tasks to be executed according to a task start time of each task to be executed in the task set to obtain a task sequence to be executed;
and the distribution module 2543 is configured to distribute each task to be executed to at least one distributed node in turn according to the task sequence to be executed, so as to implement scheduling of the task to be executed to each distributed node.
In some embodiments, the determining module is further to: when the control node adds a new state, the control node determines a task to be executed corresponding to the new state; and forming the task set to be executed through the task to be executed corresponding to the new state and the historical task to be executed before adding the new state.
In some embodiments, the determining module is further to: when the control node deletes the state, the control node determines the residual tasks to be executed corresponding to the states which remain after deleting the state; and forming the task set to be executed through the residual tasks to be executed.
In some embodiments, the distribution module is further to: determining a trigger time period of each task to be executed in the task sequence to be executed, wherein the starting time of the trigger time period is the task starting time of the task to be executed, and the ending time of the trigger time period is the task ending time of the task to be executed; determining the task to be executed, which contains the current moment, in the triggering time period as a target task to be executed; and distributing the target task to be executed and other tasks to be executed, which are positioned behind the target task to be executed, in the task sequence to be executed to at least one distributed node in sequence.
In some embodiments, the distribution module is further to: and determining the task to be executed which is not executed by any distributed node and contains the current moment in the triggering time period as the target task to be executed.
In some embodiments, the apparatus further comprises: the adding module is used for adding an execution completion identification for the task to be executed when receiving an execution completion signal of a corresponding task to be executed returned by any one of the distributed nodes; and the prohibition module is used for prohibiting the task with the execution completion identification from being sent to the distributed node.
In some embodiments, the task to be performed comprises a blocking task; correspondingly, the distribution module is further configured to: when the task to be executed sent to the at least one distributed node is the blocking task, waiting to receive an execution completion signal corresponding to the blocking task returned by each distributed node; and after receiving the execution completion signal returned by each distributed node, distributing tasks to be executed after the blocking tasks in the task sequence to be executed to the at least one distributed node in sequence.
In some embodiments, the apparatus further comprises: and the sending module is used for sending the blocking task to the at least one distributed node again when the execution completion signal, corresponding to the blocking task, returned by any distributed node is not received after the preset time length is passed.
In some embodiments, the task to be performed comprises a non-blocking task; correspondingly, the distribution module is further configured to: and when the task to be executed, which is sent to the at least one distributed node, is the non-blocking task, sending the non-blocking task to the at least one distributed node at the task starting time of each non-blocking task.
In other embodiments, the task scheduling device may also be a task scheduling device in the terminal 100-2 including the distributed node in fig. 1, and may also be software in the form of a program, a plug-in, or the like, including the following software modules:
the receiving module is used for receiving tasks to be executed, which are sequentially sent by the control node according to a task sequence to be executed, wherein the task sequence to be executed is obtained by sequencing the tasks to be executed according to the task starting time of each task to be executed in a task set corresponding to the changed state when the state of the control node is changed; and the execution module is used for executing the task to be executed.
In some embodiments, the apparatus further comprises: the operation instruction determining module is used for determining at least one operation instruction corresponding to the task to be executed in a preset operation instruction library according to the identification of the task to be executed; correspondingly, the execution module is further configured to: and executing the at least one operation instruction corresponding to the task to be executed.
In some embodiments, the apparatus further comprises: and the execution completion signal return module is used for returning an execution completion signal of the corresponding operation instruction to the control node when each operation instruction corresponding to the task to be executed is executed.
In some embodiments, the task to be performed comprises a blocking task; correspondingly, the device further comprises: the first processing module is used for executing the blocking task when the task to be executed received by the distributed node is the blocking task, and returning an execution completion signal to the control node; and after the execution completion signal is returned, receiving a task to be executed after the blocking task in the task sequence to be executed, which is sent by the control node.
In some embodiments, the task to be performed comprises a non-blocking task; correspondingly, the device further comprises: and the second processing module is used for receiving and executing the non-blocking task at the task starting moment of each non-blocking task when the task to be executed received by the distributed node is the non-blocking task.
It should be noted that, the description of the apparatus in the embodiment of the present application is similar to the description of the embodiment of the method described above, and has similar beneficial effects as the embodiment of the method, so that a detailed description is omitted. For technical details not disclosed in the embodiments of the present apparatus, please refer to the description of the embodiments of the method of the present application for understanding.
The present embodiments provide a storage medium having stored therein executable instructions that, when executed by a processor, cause the processor to perform a method provided by the embodiments of the present application, for example, as shown in fig. 3.
In some embodiments, the storage medium may be a ferroelectric Memory (Ferromagnetic Random Ac cess Memory, FRAM), read Only Memory (ROM), programmable Read Only Memory (Programmable Read Only Memory, PROM), erasable programmable Read Only Memory (Erasable Programmable Read Only Memory, EPROM), charged erasable programmable Read Only Memory (Electrically Erasable Programmable Read Only Memory, EEP ROM), flash Memory, magnetic surface Memory, optical Disk, or Compact Disk-Read Only Memory (CD-ROM), among others; but may be a variety of devices including one or any combination of the above memories.
In some embodiments, the executable instructions may be in the form of programs, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and they may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
As an example, the executable instructions may, but need not, correspond to files in a file system, may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a hypertext markup language (Hyper Text Markup Language, HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code). As an example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices located at one site or, alternatively, distributed across multiple sites and interconnected by a communication network.
The foregoing is merely exemplary embodiments of the present application and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. that are within the spirit and scope of the present application are intended to be included within the scope of the present application.