Task process control method and device, electronic equipment and storage medium

By building a task tree and utilizing a master-slave relationship task system, the problems of high cost and low efficiency of complex task process control in the existing technology are solved, and efficient task execution and complex process management are achieved.

CN120132333APending Publication Date: 2025-06-13TENCENT TECH SHANGHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311710970.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2025-06-13

Smart Images

  • Figure CN120132333A_ABST
    Figure CN120132333A_ABST
Patent Text Reader

Abstract

The invention provides a task process control method and device, electronic equipment and a storage medium. The method comprises the following steps: in response to a task execution request, obtaining a task execution logic of a to-be-executed task and a plurality of task action contents corresponding to the task execution logic; defining a plurality of process control nodes according to the task execution logic, and defining a plurality of task nodes according to the task execution logic and the plurality of task action contents; constructing a task tree based on the master-slave relationship between the root node and the flow control node and the task node; and from a root node of the task tree, according to a master-slave relationship between the process control nodes and the task nodes in the task tree and node states of each process control node and each task node, sequentially calling each node in the process control nodes and the task nodes to perform task execution, the task action content is executed until the task action content in each task node in the plurality of task nodes is executed. According to the invention, complex task process control can be realized based on the task tree.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technologies, and in particular, to a task process control method, apparatus, electronic device, and storage medium. Background Art

[0002] The concept of a task originated from management science. It aims to break down work into multiple independent modules, and each module is further refined into multiple tasks, which serve as the smallest execution units. Assigning tasks to people and coordinating the relationships between tasks is considered successful management. Later, the concept of tasks extended to the gaming industry, where it is used to guide and motivate players and to better elaborate the story world constructed by game planners. It can be said that "tasks" are an essential part of games, and a good task system helps manage and coordinate the entire game process and rhythm.

[0003] In related technologies, a generally common task system usually regards a task as a smallest unit structure, equipped with information such as a unique number, type, status, etc. These information are organized in a linear linked list structure or a hash, and are set through a form configuration method. Some advanced task systems also use a tree structure for management, but usually only for task management in simple dialogue designs. For relatively complex task processes such as task plot advancement (e.g., the plot advancement of large-scale games), a large amount of human and computing power costs are required in related technologies to implement the construction and maintenance of complex task processes, and moreover, it will also result in low task execution efficiency. Summary of the Invention

[0004] Embodiments of this application provide a task process control method, apparatus, electronic device, and storage medium, which can construct a task tree based on the master-slave relationship between predefined process control nodes and task nodes, thereby implementing complex task process control through the task tree, greatly saving the control cost of complex task processes, and improving the task execution efficiency.

[0005] The technical solution of the embodiments of this application is implemented as follows:

[0006] An embodiment of the present application provides a task process control method, and the method includes: in response to a task execution request, obtaining a task execution logic of a to-be-executed task and a plurality of task action contents corresponding to the task execution logic; defining a plurality of process control nodes according to the task execution logic, and defining a plurality of task nodes according to the task execution logic and the plurality of task action contents; one root node is included in the plurality of process control nodes, and a master-slave relationship exists between the process control nodes and the task nodes; constructing a task tree based on the root node and the master-slave relationship between the process control nodes and the task nodes; wherein, the process control nodes and the task nodes in the task tree have a node state of unidirectional linear flow; starting from the root node of the task tree, according to the master-slave relationship between the process control nodes and the task nodes in the task tree, and the node state of each process control node and task node, sequentially calling each node in the process control nodes and the task nodes to execute the task until the task action content in each task node among the plurality of task nodes is executed completely.

[0007] An embodiment of the present application provides a task process control device, including: an obtaining module, configured to obtain a task execution logic of a to-be-executed task and a plurality of task action contents corresponding to the task execution logic in response to a task execution request; a defining module, configured to define a plurality of process control nodes according to the task execution logic, and define a plurality of task nodes according to the task execution logic and the plurality of task action contents; one root node is included in the plurality of process control nodes, and a master-slave relationship exists between the process control nodes and the task nodes; a constructing module, configured to construct a task tree based on the root node and the master-slave relationship between the process control nodes and the task nodes; wherein, the process control nodes and the task nodes in the task tree have a node state of unidirectional linear flow; an execution module, configured to start from the root node of the task tree, and according to the master-slave relationship between the process control nodes and the task nodes in the task tree, and the node state of each process control node and task node, sequentially call each node in the process control nodes and the task nodes to execute until the task action content in each task node among the plurality of task nodes is executed completely.

[0008] In some embodiments, the constructing module is further configured to: based on the master-slave relationship, establish master-slave relationship pairs between each level in the task tree; the master-slave relationship pair includes two process control nodes with a master-slave relationship to each other, or, the master-slave relationship pair includes one process control node and one task node with a master-slave relationship to each other; starting from the master-slave relationship pair corresponding to the root node, sequentially connecting the process control nodes and task nodes in each master-slave relationship pair to form the task tree.

[0009] In some embodiments, the building block is further configured to: starting from the master-slave relationship pair corresponding to the root node, determine the parent node and the child node in the master-slave relationship pair; for the master-slave relationship pair at the first level, use the root node in the master-slave relationship pair as the parent node and use the other node in the master-slave relationship pair except the root node as the child node, and connect the parent node at the first level and the child node at the first level; for the master-slave relationship pair at the Nth level, use the child node in the master-slave relationship pair at the N-1th level as the parent node at the Nth level, and use the other node in the master-slave relationship pair at the Nth level except the parent node at the Nth level as the child node at the Nth level, and connect the parent node at the Nth level and the child node at the Nth level to form the task tree; N is an integer greater than 1.

[0010] In some embodiments, each of the process control nodes has at least one child node; the apparatus further includes a control module, and the control module is configured to: determine the node type of the corresponding process control node based on the task execution logic of each process control node; based on the node type of each process control node, control the task execution order of at least one child node of the corresponding process control node.

[0011] In some embodiments, the number of the task execution logics is multiple; each task execution logic is used to define the task execution order and task execution manner of at least one node in the task tree; the apparatus further includes a determination module, and the determination module is configured to: obtain a target task execution logic for defining the task execution order and task execution manner of all nodes in the task tree; determine a target process control node defined based on the target task execution logic; and determine the target process control node as the root node.

[0012] In some embodiments, the execution module is further configured to: according to the master-slave relationship pairs at each level in the task tree, determine at least one parent node in each level and at least one child node of each parent node; obtain the node states of the parent node and the child node; starting from the parent node at the first level, in accordance with the task execution logic of the parent node and the child node having the master-slave relationship with the parent node in each level, sequentially call each parent node and each child node in each level to perform tasks, and according to the state execution function in the task execution logic, update the node states of each parent node and each child node in each level in a one-way linear flow update manner; when the task action content in all task nodes in the task tree is executed and the node state of the parent node at the first level is updated to the completed state, the task tree is executed.

[0013] In some embodiments, the device further includes a response module, which is configured to: when the node state of any child node at any level in the task tree is updated to the completed state, feed back the node state of the child node to the parent node of the child node; in response to the node state of the child node being the completed state, according to the task execution logic of the parent node, call the remaining child nodes in the level except the child node, or update the node state of the parent node to the completed state.

[0014] In some embodiments, the node state of each node in the task tree includes an unlocked state, an unlocked state, a running state, and a completed state; the state execution functions include an unlocking execution function and a running execution function; the execution module is further configured to: for any current node among each parent node and each child node in each level, obtain the current node state of the current node; when the current node state is the unlocked state, perform an unlocking operation on the current node based on the unlocking execution function, and after completing the unlocking operation, switch the current node state from the unlocked state to the unlocked state; when the current node state is the unlocked state, perform a task execution operation on the current node based on the running execution function, and when starting to perform the task execution operation, switch the current node state from the unlocked state to the running state; when the task execution operation is completed, switch the current node state from the running state to the completed state.

[0015] In some embodiments, the node state further includes a rewarded state, and the state execution function further includes a reward execution function; the device further includes a reward module, which is configured to: when the node state of the task node is updated to the completed state, obtain the task execution result of the task node; when the task execution result meets the preset reward condition, perform a reward operation on the task node based on the reward execution function, and after completing the reward operation, switch the node state of the task node from the completed state to the rewarded state.

[0016] In some embodiments, the device further includes a reset module, which is configured to: receive a node state reset operation for the current node; in response to the node state reset operation, obtain the current node state of the current node; when the current node state is the unlocked state, prohibit state switching of the current node state; when the current node state is not the unlocked state, switch the current node state to the unlocked state.

[0017] In some embodiments, before constructing the task tree, the device further includes a branch determination module, and the overall determination module is configured to: obtain a preset task process library, where the task process library includes task trees corresponding to multiple different task execution logics; compare the task execution logic of the to-be-executed task with the task execution logic of each task tree in the task process library to obtain a logic comparison result; in the case that the logic comparison result indicates that there is an identical task tree in the task process library that has the same task execution logic as the to-be-executed task, determine the identical task tree as the task tree of the to-be-executed task.

[0018] In some embodiments, the to-be-executed task includes multiple subtasks, and each subtask corresponds to a branch task tree in the task tree; before constructing the task tree, the device further includes a branch determination module, and the reset module is configured to: obtain a preset task process library, where the task process library includes task trees corresponding to multiple different task execution logics; each task tree corresponding to the task execution logic includes branch task trees corresponding to multiple subtask execution logics; compare each subtask execution logic in the task execution logic of the to-be-executed task with the subtask execution logic of each task tree in the task process library to obtain a sub-logic comparison result; in the case that the sub-logic comparison result indicates that there is a branch task tree in the task process library that has the same subtask execution logic as any subtask of the to-be-executed task, determine the branch task tree in the task process library of the same subtask execution logic as the branch task tree of the to-be-executed task.

[0019] In some embodiments, the construction module is further configured to: construct the task tree of the to-be-executed task based on the master-slave relationship between the root node, the process control node, and the task node, and the branch task tree.

[0020] An embodiment of the present application provides an electronic device, including: a memory for storing computer-executable instructions; a processor for implementing the task process control method provided by the embodiment of the present application when executing the computer-executable instructions stored in the memory.

[0021] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for implementing the task process control method provided by the embodiment of the present application when being executed by a processor.

[0022] An embodiment of the present application provides a computer program product, which includes executable instructions stored in a computer-readable storage medium; wherein, when a processor of an electronic device reads the executable instructions from the computer-readable storage medium and executes the executable instructions, the task process control method provided by the embodiment of the present application is implemented.

[0023] The embodiments of the present application have the following beneficial effects:

[0024] In response to a task execution request, a plurality of process control nodes are defined through the task execution logic of the to-be-executed task obtained, and a plurality of task nodes are defined through the obtained task execution logic and the corresponding plurality of task action contents of the task execution logic. Moreover, the root node is one of the plurality of process control nodes, and there is a master-slave relationship between the process control node and the task node. In this way, the root node is a process control node, and through the root node, the task process control of the overall task can be realized.

[0025] A task tree is constructed by using the master-slave relationship between the process control node and the task node, and the process control node and the task node in the task tree have a node state of unidirectional linear flow. Each node in the process control node and the task node in the task tree is sequentially called for task execution until the task action content in each task node among the plurality of task nodes is executed. In this way, based on the unidirectional linear flow node state in the task book tree, when each node in the task tree is called for task execution, after the node state of the node completes unidirectional linear flow, the node cannot be repeatedly called for task execution. Therefore, during the task execution process, each node in the task tree can only be called once. The flow of the task in the task tree is based on the node state and the connection position in the task tree, supporting complex task process design, realizing complex task process control, and having strong reusability and expandability; at the same time, realizing complex task process control through the task tree can also greatly save the control cost of complex task processes and improve the execution efficiency of tasks. Description of the Drawings

[0026] Figure 1 is a schematic structural diagram of the task process control system architecture provided by the embodiments of the present application;

[0027] Figure 2 is a schematic structural diagram of the task process control device provided by the embodiments of the present application;

[0028] Figure 3 is an optional process schematic diagram of the task process control method provided by the embodiments of the present application;

[0029] Figure 4 is a schematic structural diagram of the task tree in the application scenario provided by the embodiments of the present application;

[0030] Figure 5 is another optional process schematic diagram of the task process control method provided by the embodiments of the present application;

[0031] Figure 6 is a process schematic diagram of the task tree hierarchy provided by the embodiments of the present application;

[0032] Figure 7 is a schematic flowchart of the state transition sequence provided by an embodiment of the present application;

[0033] Figure 8 is a schematic flowchart of task completion provided by an embodiment of the present application;

[0034] Figure 9 is a schematic diagram of the plug-in interface provided by an embodiment of the present application;

[0035] Figure 10 is a schematic diagram of the structure of the visual task tree provided by an embodiment of the present application;

[0036] Figure 11 is a schematic diagram of the configuration of the node provided by an embodiment of the present application;

[0037] Figure 12 is a schematic diagram of the execution of the task tree provided by an embodiment of the present application;

[0038] Figure 13 is a schematic flowchart of the application of the task tree provided by an embodiment of the present application;

[0039] Figure 14 is a schematic diagram of the node relationship class provided by an embodiment of the present application;

[0040] Figure 15 is a schematic diagram of the task tree system class provided by an embodiment of the present application;

[0041] Figure 16 is a schematic flowchart of the task unlocking provided by an embodiment of the present application;

[0042] Figure 17 is a schematic diagram of the structure of task tree A provided by an embodiment of the present application;

[0043] Figure 18 is a schematic diagram of the execution result of task tree A provided by an embodiment of the present application;

[0044] Figure 19 is a schematic diagram of the structure of task tree B provided by an embodiment of the present application;

[0045] Figure 20 is a schematic diagram of the execution result of task tree B provided by an embodiment of the present application;

[0046] Figure 21 is a schematic diagram of the structure of task tree C provided by an embodiment of the present application;

[0047] Figure 22 is a schematic diagram of the execution result of task tree C provided by an embodiment of the present application;

[0048] Figure 23It is a schematic diagram for configuring the parameters of a task tree node provided by an embodiment of the present application. Detailed implementation manners

[0049] To make the objectives, technical solutions, and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be construed as limitations on the present application. All other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.

[0050] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments. However, it can be understood that "some embodiments" can be the same subset or different subsets of all possible embodiments and can be combined with each other without conflict.

[0051] In the embodiments of the present application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be fully or partially implemented by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, one processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an overall module or unit that includes the function of the module or unit.

[0052] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0053] Before further elaborating on the embodiments of the present application, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following explanations.

[0054] 1) Node: It is a graph theory concept, representing a connection point in a graph, an area where lines intersect or branch, and also representing the endpoints of lines. Nodes and their connecting lines together constitute a graph structure.

[0055] 2) Parent node and child node: Starting from one node and connecting to another node, the former is called the parent node of the latter, and the latter is the child node of the former. In a tree structure, the child nodes of each node can also be called the branch nodes of that node.

[0056] 3) Tree Structure: It is a type of graph structure. It has exactly one node as the root node. Starting from the root node, each node can be connected to several branch nodes. The overall structure resembles a "tree" and gets its name from this. It has a hierarchical structure of "general - specific" and is suitable for systems for branch management and control.

[0057] 4) Root Node: It is the only node in the tree structure that has no parent node, and the remaining nodes have exactly one parent node.

[0058] 5) Leaf Node: It refers to a node in the tree structure that has no child nodes.

[0059] 6) State: It defines the set of variable values or information contained in an object. When we say that an object is in a certain state, it means that the current values of the variables or information contained in the object are consistent with those defined by this state.

[0060] 7) Quest: It represents a complete set of actions carried out to achieve a certain goal or obtain certain specific rewards.

[0061] 8) Quest System: It is a system used to manage a series of quests, defines the current states of each quest, and determines the order in which quests are executed.

[0062] For the quest system, quests are abstracted as individual nodes and organized in a tree structure. The flow of quests is based on the states of their nodes and their connection positions in the tree. And such a quest system organized by a tree structure is defined as a quest tree. In traditional industries such as trade and logistics, some workflow engines (such as Activiti) are used to design and draw business flowcharts to achieve automated execution management of business processes. These drawn flowcharts are based on "Business Process Model And Notation" (BPMN), imply the tree structure theory, and provide various types of nodes such as tasks and process controls.

[0063] Similarly, in related technologies, the game quest system uses behavior trees for quest management. Although it is also based on the tree structure, consists of control nodes and execution nodes, and supports designing complex decision - making behaviors of intelligent characters, it is not used for process control. And a core feature of the behavior tree is that specific nodes or branches may take a lot of in - game time to complete. In the basic implementation of the behavior tree, for each single frame, the system traverses the entire tree downward from the root node, checks which nodes are in an active state, and then checks the nodes on the path again until it reaches the currently active node and executes the current node again.

[0064] Based on at least one of the above problems existing in the related art, an embodiment of the present application proposes a task process control method based on a task tree. The task tree includes two types of nodes: process control nodes and task nodes. The former is used for complex process logic control, and the latter is used for specific task execution. Based on the tree structure, a task system is built by combining process control nodes and task nodes, which can clearly connect complex process designs in series, support complex logic control and parameter configuration, and has strong reusability and scalability. And the task tree only needs to be traversed once during the entire task execution process, supports the automatic execution of the entire process task, and is convenient for quickly browsing the overall task design effect.

[0065] The following describes an exemplary application of the task process control device (i.e., an electronic device) provided in an embodiment of the present application. The device provided in the embodiment of the present application can be implemented as various types of user terminals capable of data processing or task process control, such as a notebook computer, a tablet computer, a desktop computer, a set-top box, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable game device), a smart phone, a smart speaker, a smart watch, a smart TV, a vehicle terminal, etc., or can be implemented as a server. Hereinafter, an exemplary application will be described when the task process control device is implemented as a server.

[0066] See Figure 1 , Figure 1 is a schematic structural diagram of the architecture of the task process control system 100 provided in an embodiment of the present application. To support a task process control application, the task process control application runs on the terminal 400. The terminal 400 is connected to the server 200 through the network 300. The network 300 can be a wide area network, a local area network, or a combination of the two.

[0067] The terminal 400 is used to send a task execution request to the server 200. The server 200 constitutes the task process control device in the embodiment of the present application. The server 200 is used to respond to the task execution request, obtain the task execution logic of the task to be executed and a plurality of task action contents corresponding to the task execution logic; define a plurality of process control nodes according to the task execution logic, and define a plurality of task nodes according to the task execution logic and the plurality of task action contents; construct a task tree based on the root node and the master-slave relationship between the process control nodes and the task nodes; starting from the root node of the task tree, according to the master-slave relationship between the process control nodes and the task nodes in the task tree, and the node states of each process control node and task node, sequentially call each node in the process control nodes and the task nodes to execute the task until the task action contents in each task node among the plurality of task nodes are all executed. After the task tree execution is completed, the server 200 obtains the task execution result and returns the task execution result to the terminal 400 to output the task execution result on the terminal 400.

[0068] In some embodiments, the server 200 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. The terminal 400 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, etc., but is not limited thereto. The terminal and the server may be directly or indirectly connected through wired or wireless communication means, which is not limited in the embodiments of the present application.

[0069] See Figure 2 , Figure 2 is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Figure 2 The electronic device shown may be a task flow control device, and the task flow control device includes: at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. Each component in the task flow control device is coupled together through a bus system 440. It can be understood that the bus system 440 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in Figure 2 all kinds of buses are labeled as the bus system 440.

[0070] The processor 410 may be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a Digital Signal Processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or any conventional processor, etc.

[0071] The user interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and / or one or more visual display screens. The user interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as keyboards, mice, microphones, touch screen displays, cameras, and other input buttons and controls.

[0072] The memory 450 can be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disc drives, etc. The memory 450 optionally includes one or more storage devices that are physically remote from the processor 410.

[0073] The memory 450 includes volatile memory or non-volatile memory, and may also include both volatile and non-volatile memory. The non-volatile memory can be Read Only Memory (ROM), and the volatile memory can be Random Access Memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0074] In some embodiments, the memory 450 is capable of storing data to support various operations. Examples of such data include programs, modules, and data structures, or subsets or supersets thereof, which are illustrated below.

[0075] The operating system 451 includes system programs for processing various basic system services and performing hardware-related tasks, such as the framework layer, the core library layer, the driver layer, etc., for implementing various basic services and processing hardware-based tasks;

[0076] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420. Exemplary network interfaces 420 include: Bluetooth, Wireless Fidelity (WiFi), and Universal Serial Bus (USB), etc.; The presentation module 453 is used to enable the presentation of information (such as a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 associated with the user interface 430 (such as a display screen, a speaker, etc.); The input processing module 454 is used to detect and translate one or more user inputs or interactions from one of one or more input devices 432.

[0077] In some embodiments, the device provided by the embodiments of the present application can be implemented in software. Figure 2 Shown is a task flow control device 455 stored in the memory 450, which can be software in the form of programs and plugins, etc., including the following software modules: an acquisition module 4551, a definition module 4552, a construction module 4553, and an execution module 4554. These modules are logical, and thus can be arbitrarily combined or further split according to the functions to be implemented. The functions of each module will be described below.

[0078] In some other embodiments, the device provided by the embodiments of the present application can be implemented in a hardware manner. As an example, the device provided by the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the task flow control method provided by the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs) or other electronic components.

[0079] In some embodiments, the terminal or the server can implement the task flow control method provided by the embodiments of the present application by running various computer-executable instructions or computer programs. For example, the computer-executable instructions can be commands at the microprogram level, machine instructions or software instructions. The computer program can be a native program or a software module in the operating system; it can be a native application (APP), that is, a program that needs to be installed in the operating system to run, or it can be a small program that can be embedded in any APP, that is, a program that only needs to be downloaded to the browser environment to run. In short, the above computer-executable instructions can be instructions in any form, and the above computer programs can be application programs, modules or plug-ins in any form.

[0080] The task flow control method provided by each embodiment of the present application can be executed by an electronic device, where the electronic device can be a server or a terminal, that is, the task flow control method of each embodiment of the present application can be executed by the server, or can be executed by the terminal, or can also be executed through the interaction between the server and the terminal.

[0081] See Figure 3 , Figure 3 is an optional flowchart of the task flow control method provided by the embodiments of the present application, and will be described in combination with Figure 3 the steps shown. Taking the execution subject of the task flow control method as the server as an example, the method includes the following steps S101 to step S105:

[0082] Step S101: In response to a task execution request, obtain the task execution logic of the task to be executed and multiple task action contents corresponding to the task execution logic.

[0083] In the embodiments of the present application, the task to be executed is a task that needs to be executed in the task process control service. Each task that needs to use a task tree for task execution can be used as the task to be executed. The task to be executed may include multiple subtasks. For example, in a game application, the task to be executed may be how many levels a player reaches, how many monsters are defeated, or how many card draws are made, etc. The task execution logic includes the task execution order and the task execution method. The task execution order refers to the execution sequence determined according to the priorities of the subtasks in the task to be executed. The task execution method is used to specify the execution method of the subtasks in the task to be executed. For example, sequential execution or loop execution. The task action content refers to the task actions that the subtasks in the task to be executed finally need to complete. For example, the dialogue task action or the pickup task action in a game task.

[0084] For each task to be executed, it is first necessary to obtain the task execution logic of the task to be executed and multiple task action contents corresponding to the task execution logic, so as to subsequently define the nodes in the task tree according to the task execution logic and the task action contents, and complete the construction of the task tree.

[0085] Step S102: Define multiple process control nodes according to the task execution logic, and define multiple task nodes according to the task execution logic and multiple task action contents.

[0086] In the embodiments of the present application, the process control nodes are used for complex process logic control in the tree structure. The next node to be executed in the tree structure can be determined through the process control nodes. Multiple process control nodes can be defined according to the task execution logic. The task nodes are used to implement specific task execution according to the task execution logic and multiple task action contents. Multiple task nodes can be defined according to the task execution logic and multiple task action contents.

[0087] In addition, one of the multiple process control nodes is a root node, that is, one of the process control nodes is the only node in the tree structure that has no parent node. There is a master-slave relationship between the process control nodes and the task nodes. For example, process control node A can be the parent node of task node A. Process control node A can also be the parent node or child node of process control node B. However, in the tree structure, there is no situation where a task node is the parent node of a process control node, and task node A cannot be the parent node or child node of task node B either.

[0088] In some embodiments, each process control node has at least one child node. The node type of the corresponding process control node is determined based on the task execution logic of each process control node. Based on the node type of each process control node, the task execution order of at least one child node of the corresponding process control node is controlled. The task execution logic of the process control node includes the task execution priorities of the child nodes of the process control node. The node type of the process control node is determined according to the task execution priorities of the child nodes of the process control node. The node types of the process control node include sequential execution control nodes, execute N times in a loop control nodes, random order execution control nodes, parallel execution control nodes, execute successfully any M times control nodes, etc. Among them, the execute successfully any M times control node means that when any M child nodes of this process control node execute successfully, the node returns an execution success result. That is, when any M child nodes corresponding to the execute successfully any M times control node execute successfully, the execute successfully any M times control node will return an execution success result. The node type of the process control node can be set according to actual needs and is not limited here. Different task execution logics in the process control node correspond to different node types. Based on the node type of each process control node, the task execution priorities of at least one child node of the corresponding process control node are controlled, that is, the task execution order.

[0089] For example, the child nodes of one of the process control nodes are node A, node B, and node C. The child node can be any one of the process control node and the task node except the root node. If the node type of this process control node is a sequential execution control node, the task execution order of the child nodes is node A, node B, and node C. If the node type of this process control node is a parallel execution control node, the task execution order of the child nodes is to execute node A, node B, and node C in parallel.

[0090] Here, the subtasks are abstracted as individual nodes. The nodes include process control nodes and task nodes. By defining multiple process control nodes and multiple task nodes, it is convenient to organize each node in the multiple process control nodes and multiple task nodes in a tree structure later, so as to form a task tree.

[0091] Step S103, construct a task tree based on the master-slave relationship between the root node, the process control node, and the task node.

[0092] In the embodiments of the present application, based on the master-slave relationship between the root node, multiple process control nodes, and multiple task nodes, the multiple child nodes corresponding to the multiple parent nodes in the tree structure are determined, and the parent nodes and the child nodes are connected in series to complete the construction of the task tree.

[0093] In some embodiments, before constructing a task tree, a preset task process library is obtained. The task process library includes task trees corresponding to multiple different task execution logics. The task execution logic of the task to be executed is compared with the task execution logic of each task tree in the task process library to obtain a logic comparison result. When the logic comparison result indicates that there is an identical task tree in the task process library that has the same task execution logic as the task to be executed, the identical task tree is determined as the task tree of the task to be executed.

[0094] For example, assume that the preset task process library includes task tree A and task tree B. The task execution logic of the task to be executed is compared with the task execution logic of task tree A and the task execution logic of task tree B respectively. If it is found through comparison that the task execution logic of task tree A is the same as that of the task to be executed, while task tree B does not have the same task execution logic as the task to be executed, then task tree A is determined as the task tree of the task to be executed, and task tree B cannot be the task tree of the task to be executed.

[0095] Here, the "grafting" between task trees is achieved through the comparison of task execution logics, that is, the execution sequence logic defined by another task tree is reused on the new task tree, making the task tree have strong reusability.

[0096] In some embodiments, the task to be executed includes multiple subtasks, and each subtask corresponds to a branch task tree in the task tree. Before constructing the task tree, a preset task process library is obtained. The task process library includes task trees corresponding to multiple different task execution logics. Each task tree corresponding to a task execution logic includes branch task trees corresponding to multiple subtask execution logics. Each subtask execution logic in the task execution logic of the task to be executed is compared with the subtask execution logic of each task tree in the task process library to obtain a sub-logic comparison result. When the sub-logic comparison result indicates that there is a branch task tree in the task process library that has the same subtask execution logic as any subtask of the task to be executed, the branch task tree in the task process library with the same subtask execution logic is determined as the branch task tree of the task to be executed. Based on the master-slave relationship between the root node, the process control node, and the task node, and the branch task tree, the task tree of the task to be executed is constructed.

[0097] For example, the task to be executed includes subtask A and subtask B, and each subtask corresponds to branch task tree A and branch task tree B in the task tree. Suppose the preset task flow library includes task tree C and task tree D. Task tree C includes subtask C and subtask D, and the corresponding branch task trees C and D respectively; task tree D includes subtask E and subtask F, and the corresponding branch task trees E and F respectively. Compare the task execution logics of subtask A and subtask B in the task to be executed with the task execution logics of subtask C and subtask D in task tree C and the task execution logics of subtask E and subtask F in task tree D. If it is found through comparison that the task execution logic of subtask E in task tree D is the same as the task execution logic of subtask B in the task to be executed, while the other subtasks do not have the same task execution logic as any subtask in the task to be executed, then determine the branch task tree E corresponding to subtask E in task tree D as the branch task tree of the task to be executed. Based on the master-slave relationship between the root node, the process control node and the task node, and the branch task tree E, construct the task tree of the task to be executed.

[0098] Here, the "grafting" between branch task trees is achieved by comparing the subtask execution logics, that is, reusing the execution order logic defined by the branch task tree on the new branch task tree, so that the task tree has strong scalability.

[0099] The differences between the task tree and the behavior tree are described here: A core feature of the behavior tree is that it may take a lot of in-game time to complete a specific node or branch. In the basic implementation of the behavior tree, for each single frame, the system traverses the entire tree downward from the root node, checks which nodes are active, and then checks the nodes on the path again until it reaches the currently active node and executes the current node again. That is to say, in terms of time, the behavior decision of the behavior tree is to traverse the entire behavior tree every frame or every call. For example, when a non-player character in the game sees the player and needs to chase the player, if the distance between him and the player exceeds the chase threshold, he will not chase. Whether to chase the player or not, the behavior tree will make multiple behavior decisions, and each behavior decision will start from the root node of the behavior tree to traverse the behavior tree to judge. While the task tree only needs to call another node according to the node state of the node and the position of the node in the task tree, in the order of task execution, when the current node call is completed, without repeating the traversal of the task tree because of multiple subtasks. For example, for a game process where each subtask is executed sequentially, due to the task process control function of the task tree, the player needs to execute subtask one in sequence, then execute subtask two, and finally execute subtask three. At this time, through the node state in the task tree, it can be known that subtask one can be executed. If the player goes to execute subtask two or subtask three, since subtask two or subtask three is not unlocked, subtask two or subtask three cannot be executed. Only after subtask one is executed can subtask two be executed, and only after subtask two is executed can task three be executed.

[0100] Step S104, starting from the root node of the task tree, according to the master-slave relationship between the process control nodes and the task nodes in the task tree, and the node states of each process control node and task node, sequentially call each node in the process control nodes and task nodes to execute the task until the task action content in each task node among the multiple task nodes is executed.

[0101] In the embodiments of the present application, the node state is used to represent the task execution situation of each node in the task tree, and the node state may include an unlocked state, an unlocked state, a running state, a completed state, etc.

[0102] Here, starting from the root node of the task tree, according to the task execution logic in the process control nodes in the task tree, the task execution order of each child node in the task tree is determined. And according to the master-slave relationship between the process control nodes and the task nodes in the task tree, each node in the process control nodes and the task nodes is called in sequence to execute the task, and the node states of each process control node and task node are updated. Until the task action content in each task node among multiple task nodes is executed completely, and the node state of the root node is updated to the completed state, it indicates that all tasks in the task tree are executed completely.

[0103] The task process control method provided by the embodiment of the present application, in response to a task execution request, defines multiple process control nodes by obtaining the task execution logic of the to-be-executed task, defines multiple task nodes by obtaining the task execution logic and the multiple task action contents corresponding to the task execution logic, and the root node is one of the multiple process control nodes, and there is a master-slave relationship between the process control nodes and the task nodes. In this way, the root node is a process control node, and through the root node, the task process control of the overall task can be realized. In addition, a task tree is constructed by using the master-slave relationship between the process control nodes and the task nodes, and the process control nodes and task nodes in the task tree have a unidirectional linear flow node state, and each node in the process control nodes and the task nodes in the task tree is called in sequence to execute the task until the task action content in each task node among multiple task nodes is executed completely. In this way, based on the unidirectional linear flow node state in the task book tree, when each node in the task tree is called to execute the task, after the node state of the node completes the unidirectional linear flow, the node cannot be called repeatedly to execute the task. Therefore, during the task execution process, each node in the task tree can only be called once. The flow of the task in the task tree is based on the node state and the connection position in the task tree, supports complex task process design, realizes complex task process control, and has strong reusability and scalability.

[0104] For example, the task flow control method provided by the embodiments of the present application can be applied to the following scenario: In a game application, assume that the task to be executed is for an enemy to find the player and pursue the player, and after completing the pursuit, multiple item packages are cyclically received on the reward page. The number of times to receive the item package can be set to two. Therefore, the task to be executed includes three subtasks, namely finding the player, pursuing the player, and receiving the item package. Three process control nodes need to be defined according to the task execution logic of the task to be executed. The root node 401 is a sequential execution control node, and the other two process control nodes 402 and 403 are a sequential execution control node and a loop execution control node respectively. Three task nodes are defined according to the task execution logic of the task to be executed and the content of multiple task actions (i.e., finding the player, pursuing the player, and receiving the item package), corresponding to task node A, task node B, and task node C respectively. There is a master-slave relationship between these process control nodes and task nodes, that is, the sequential execution control node and the loop execution control node are the child nodes of the root node, task node A and task node B are the child nodes of the sequential execution control node, and task node C is the child node of the loop execution control node. A task tree such as Figure 4 is constructed based on the master-slave relationship between the root node and the process control nodes and task nodes. Starting from the root node 401 of the task tree, according to the master-slave relationship between the process control nodes and task nodes in the task tree, as well as the node states of each process control node and task node, each node in the process control nodes and task nodes is sequentially called for task execution. When each node is called, the node state is updated from the unlocked state to the unlocked state, and the node state is updated in a unidirectional linear transfer update manner. The task execution order of the task nodes is task node A, task node B, task node C, task node C, until the task action content in task node C is executed completely and the node state of the root node is updated to the completed state.

[0105] Next, the task flow control method in the embodiments of the present application will be described in combination with the interaction between the terminal and the server in the task flow control system. It should be noted that the task flow control method here is a task flow control method implemented through the interaction between the terminal and the server, which is substantially the same as the task flow control method executed by the server in the above embodiments. The only difference is that the actions performed by the terminal during the execution of the task flow control method are also described in the embodiments of the present application. And some steps can be executed by either the terminal or the server. Therefore, for the steps that are the same as those in the above embodiments but with different execution entities in this embodiment, this embodiment is only an exemplary description. During implementation, it can be executed by any one of the execution entities, and the embodiments of the present application do not make any limitations in this regard.

[0106] Figure 5It is another optional process schematic diagram of the task process control method provided by the embodiments of the present application. As Figure 5 shown, the method includes the following steps S201 to step S213:

[0107] Step S201, the terminal receives a task execution operation input by the user.

[0108] In the embodiments of the present application, the user can input a task execution operation on the client side of the task process control application. In the task process control application, a task execution function can be provided. The user (who can be a game developer or a task process control application designer) can input a task execution operation on the task execution function page to trigger a task execution request.

[0109] In some embodiments, when inputting a task execution operation, the user can also input a task to be executed at the same time. Or, in other embodiments, when inputting a task execution operation, the user can correspondingly input the task execution logic of the task to be executed and multiple task action contents corresponding to the task execution logic at the same time.

[0110] Step S202, the terminal generates a task execution request in response to the task execution operation.

[0111] In the embodiments of the present application, the data input by the user can be encapsulated into the task execution request. For example, the task to be executed input by the user can be encapsulated into the task execution request, or the task execution logic of the task to be executed input by the user and multiple task action contents corresponding to the task execution logic can be encapsulated into the task execution request.

[0112] Step S203, the terminal sends the task execution request to the server.

[0113] Step S204, the server obtains the task execution logic of the task to be executed and multiple task action contents corresponding to the task execution logic in response to the task execution request.

[0114] In the embodiments of the present application, if the task to be executed is encapsulated in the task execution request, the task to be executed can be directly parsed and the subsequent task execution process can be carried out based on the task to be executed; if the task execution logic of the task to be executed and multiple task action contents corresponding to the task execution logic are encapsulated in the task execution request, the task execution request can be parsed to obtain the task execution logic of the task to be executed and multiple task action contents corresponding to the task execution logic, that is, the task execution logic of the task to be executed and multiple task action contents corresponding to the task execution logic can be obtained.

[0115] Step S205: The server defines multiple process control nodes according to the task execution logic, and defines multiple task nodes according to the task execution logic and the contents of multiple task actions.

[0116] In the embodiments of the present application, one of the multiple process control nodes is a root node, that is, the root node of the task tree must be one of the multiple process control nodes. The specific method for determining the root node is as follows: Obtain the target task execution logic for defining the task execution order and task execution mode of all nodes in the task tree; determine the target process control node defined based on the target task execution logic; and determine the target process control node as the root node. That is to say, the target task execution logic is the overall task execution logic of the task to be executed, and the target task execution logic includes the task execution order and task execution mode of all nodes in the task tree. During the process of defining nodes, the target process control node defined according to the target task execution logic is the root node of the task tree, so that starting from the root node, the task tree can control the task process of the overall task tree based on the target execution logic.

[0117] In some embodiments, there is a master-slave relationship between the process control node and the task node. The master-slave relationship is used to represent the subordinate relationship between the process control node and the task node. Each subordinate relationship includes a parent node and a child node. Based on the master-slave relationship between the process control node and the task node, multiple parent nodes and multiple child nodes with a master-slave relationship in the task tree can be determined, which is convenient for the subsequent construction of the task tree.

[0118] Step S206: The server establishes master-slave relationship pairs between each level in the task tree based on the master-slave relationship.

[0119] In the embodiments of the present application, the task tree may include different levels. There are multiple master-slave relationship pairs between each level, and each master-slave relationship pair includes two nodes. Based on the master-slave relationship between the process control node and the task node, it can be determined that there can be multiple master-slave relationship pairs between each level in the task tree, and each master-slave relationship pair corresponds to a parent node and a child node. For example, a task tree can be divided into three levels. The first level of the task tree consists of the root node and the child nodes of the root node (process control node a and process control node b). For the first level of the task tree, the root node and process control node a form a master-slave relationship pair, and the root node and process control node b form another master-slave relationship pair. Here, by establishing the master-slave relationship pairs between each level in the task tree, the relationship between each pair of parent nodes and child nodes at each level is clarified, which is convenient for subsequent determination of the parent nodes and child nodes between each level in the task tree based on the master-slave relationship pair.

[0120] Step S207: The server starts from the master-slave relationship pair corresponding to the root node and determines the parent node and the child node in the master-slave relationship pair.

[0121] In the embodiments of the present application, starting from the master-slave relationship pair corresponding to the root node, it is necessary to determine the parent node and the child node in the master-slave relationship pair at each level in the task tree. For example, if the task tree has three levels, first, starting from the master-slave relationship pair corresponding to the root node, it is necessary to determine the parent node and the child node in the master-slave relationship pair at the first level, and then, according to the master-slave relationship pair at the second level, determine the parent node and the child node in the master-slave relationship pair at the second level. By analogy, according to the master-slave relationship pairs between the levels in the task tree, determine the parent node and the child node in each master-slave relationship pair in the task tree, so as to facilitate connecting the parent node and the child node in the task tree according to the parent node and the child node in each master-slave relationship pair later.

[0122] Step S208, for the master-slave relationship pair at the first level, the server uses the root node in the master-slave relationship pair as the parent node and the other node except the root node in the master-slave relationship pair as the child node, and connects the parent node at the first level and the child node at the first level.

[0123] In the embodiments of the present application, for the master-slave relationship pair at the first level, the server uses the root node in the master-slave relationship pair as the parent node and the other node except the root node in the master-slave relationship pair as the child node. For example, if there are master-slave relationship pair 1 and master-slave relationship pair 2 at the first level, master-slave relationship pair 1 contains the root node and node A, and master-slave relationship pair 2 contains the root node and node B, then the root nodes in master-slave relationship pair 1 and master-slave relationship pair 2 are used as the parent nodes in the master-slave relationship pair, and the other nodes except the root nodes in master-slave relationship pair 1 and master-slave relationship pair 2 are used as the child nodes, that is, node A and node B are used as the child nodes at the first level. In the case of determining the parent node and the child node at the first level, connecting the parent node and the child node at the first level can complete the construction of the task tree at the first level.

[0124] Step S209, for the master-slave relationship pair at the Nth level, the server uses the child node in the master-slave relationship pair at the (N - 1)th level as the parent node at the Nth level and the other node except the parent node at the Nth level in the master-slave relationship pair at the Nth level as the child node at the Nth level, and connects the parent node at the Nth level and the child node at the Nth level to form a task tree.

[0125] In the embodiments of the present application, N is an integer greater than 1. The construction idea of the task tree at the Nth level is the same as that at the first level. For the master-slave relationship pair at the Nth level, the parent node in the master-slave relationship pair at the Nth level is the child node in the master-slave relationship pair at the (N - 1)th level, and the other node except the child node in the master-slave relationship pair at the (N - 1)th level in the master-slave relationship pair at the Nth level is the child node in the master-slave relationship pair at the Nth level. As Figure 6As shown, the task tree contains three levels. For the third level, there are three master-slave relationship pairs 601 in the third level. The parent node of the third level is the child node in the master-slave relationship pair of the second level, and the other node in the master-slave relationship pair of the third level except the child node in the master-slave relationship pair of the second level is the child node in the master-slave relationship pair of the third level. When determining the parent node and child node in the Nth level, connecting the parent node and child node in the Nth level can complete the construction of the task tree in the Nth level, and then complete the construction of the overall task tree to form a task tree. Here, through the construction of the task tree, the complex task process design of the tasks to be executed is clearly connected in series, facilitating the browsing of the overall task design.

[0126] Step S210, the server determines at least one parent node in each level and at least one child node of each parent node according to the master-slave relationship pairs in each level of the task tree.

[0127] In the embodiment of the present application, after the task tree is formed, the number of levels included in the task tree is determined. For each level in the task tree, the master-slave relationship pair formed by the parent node of the level and one of the child nodes of the parent node is obtained. Each master-slave relationship pair in each level is merged, and the parent node and child node in each master-slave relationship pair are extracted, that is, at least one parent node in each level and at least one child node of each parent node are determined. By determining the parent node and child node in each level, it is convenient to subsequently obtain the node states of the parent node and child node, and call the nodes to execute tasks according to the node states and the positions of the nodes in the task tree.

[0128] Step S211, the server obtains the node states of the parent node and child node.

[0129] In the embodiment of the present application, when calling each parent node and child node in the task tree to execute tasks, it is first necessary to obtain the node states of the parent node and child node to determine whether the node can be called. Only when the node state of the node is the unlocked state, the node can be called to execute tasks. If the node state of the node is not unlocked or other node states, the node is skipped, and the nodes other than the node and with the node state of the unlocked state are obtained.

[0130] For example, the first level in the task tree contains one parent node and two child nodes (node 1 and node 2). When the node state of node 1 is the completed state, it indicates that node 1 has been called during the task execution process, and the node state of node 2 is the unlocked state. Then, during the task execution process, node 1 will be skipped and node 2 will be called to execute tasks.

[0131] Here, by obtaining the node states of the parent node and child node, the call situation of the nodes in the task tree and the execution situation of the tasks to be executed can be determined.

[0132] In step S212, the server starts from the parent nodes of the first level and, according to the task execution logics of the parent nodes and the child nodes having a master-slave relationship with the parent nodes in each level, sequentially calls each parent node and each child node in each level to execute tasks, and updates the node states of each parent node and each child node in each level according to the status execution function in the task execution logic and in a unidirectional linear flow update manner.

[0133] In the embodiment of the present application, the status execution function is used to perform corresponding status operations on each parent node and each child node in each level, and to realize the switching between node states based on the corresponding status operations. The status execution function includes an unlocking execution function, a running execution function, and a reward execution function. The unidirectional linear flow means that the node states of each parent node and each child node in each level are updated in a unidirectional linear update manner, that is, the nodes will sequentially update their node states in the order of unlocked, unlocked, running, and completed.

[0134] In some embodiments, for any current node among each parent node and each child node in each level, obtain the current node state of the current node; in the case where the current node state is the unlocked state, perform an unlocking operation on the current node based on the unlocking execution function, and after completing the unlocking operation, switch the current node state from the unlocked state to the unlocked state; in the case where the current node state is the unlocked state, perform a task execution operation on the current node based on the running execution function, and when starting to perform the task execution operation, switch the current node state from the unlocked state to the running state; in the case where the task execution operation is completed, switch the current node state from the running state to the completed state.

[0135] Here, the current node is the currently called node when each node in the task tree is sequentially called and executed. During the task execution process, the execution situation of the task can be determined according to the node state of the node. Therefore, first, it is necessary to obtain the node state of the currently called node, and then realize the switching of the node state to prevent the current node from being called again. The unlocking execution function is used to perform an unlocking operation on the current node, and the running execution function is used to perform a task execution operation on the current node. That is to say, during the task execution process, through the execution logic in the status execution function, the switching between the node states of the current node is realized in a unidirectional linear flow update manner. In addition, the switching between node states enables each called and executed node to automatically execute the full-process tasks of the task tree according to its own node state, realizing the process control function of the task tree.

[0136] In some embodiments, the node state further includes a rewarded state, and the state execution function further includes a reward execution function. When the node state of a task node is updated to the completed state, obtain the task execution result of the task node; when the task execution result meets the preset reward condition, perform a reward operation on the task node based on the reward execution function, and after completing the reward operation, switch the node state of the task node from the completed state to the rewarded state.

[0137] Here, the preset reward condition is used to determine whether the task execution result of the task node meets the reward threshold. The reward threshold can also be set to several different threshold levels according to different task execution progress, and different task execution progress corresponds to different levels of task execution results. For example, according to different levels of task execution results, the reward threshold is set to three different threshold levels, namely A, B, and C threshold levels, corresponding to A-level task execution results, B-level task execution results, and C-level task execution results respectively. In addition, the node state of the process control node does not include the rewarded state. Only when the node state of the task node is the completed state and the task execution result of the task node is successful execution, perform a reward operation on the task node based on the reward execution function, and after completing the reward operation, switch the node state of the task node from the completed state to the rewarded state. According to the task execution result of the task node, the call execution situation of the task node can be determined, so as to judge whether the task node is successfully executed, and whether to continue to update the node state can be quickly judged according to the task execution result of the task node, thereby completing the process control of the task node.

[0138] In some embodiments, receive a node state reset operation for the current node; in response to the node state reset operation, obtain the current node state of the current node; when the current node state is the unlocked state, prohibit switching the current node state; when the current node state is not the unlocked state, switch the current node state to the unlocked state.

[0139] Here, the node state reset operation is used to switch the node state of the current node except the unlocked state to the unlocked state. As Figure 7 shown, when the current node state is the unlocked state, the node state reset operation cannot be performed, that is, the current node state cannot be switched. When the current node state is not the unlocked state, that is, the current node state is the unlocked, running, completed, or rewarded state, the current node state can be switched to the unlocked state based on the node state reset operation to implement task tree reset. The reset task tree can be reused for the task execution of the to-be-executed task or for the task execution with the same task execution logic as the to-be-executed task.

[0140] Step S213: When the task action content in all task nodes in the task tree is executed and completed, and the node status of the parent node at the first level is updated to the completed status, the task tree is executed and completed, and the task execution result of the task to be executed is obtained.

[0141] In the embodiments of the present application, when the task action content in all task nodes in the task tree is executed and completed, and the node status of the parent node at the first level is updated to the completed status, the multiple task action contents corresponding to the task execution logic of the task to be executed are executed and completed, the node status of the root node of the task tree corresponding to the task to be executed is updated to the completed status, and all nodes in the task tree are called and completed, then the task tree is executed and completed, and the task execution result of the task to be executed is obtained.

[0142] In some embodiments, when the node status of any child node in any level of the task tree is updated to the completed status, the node status of the child node is fed back to the parent node of the child node; in response to the node status of the child node being the completed status, according to the task execution logic of the parent node, the remaining child nodes in the level except the child node are called, or the node status of the parent node is updated to the completed status. That is to say, when the node status of any child node in any level of the task tree is updated to the completed status, it indicates that the child node has been called during the task execution process. At this time, the node will feed back its own node status, that is, its own call situation, to the parent node of the child node. Through this feedback information, the parent node determines that the child node cannot be called again, and then calls the remaining child nodes in the level except the child node according to the task execution order in the task execution logic of the parent node. If this node is the last child node called in the level, it indicates that all child nodes of the parent node in the level have been called and completed. At this time, the node status of the parent node needs to be updated to the completed status to indicate that the parent node has been called and completed during the task execution process.

[0143] For example, as Figure 8 shown, the child nodes of the parent node in a certain level of the task tree include child node A and child node B. When the node status of child node A is updated to the completed status, that is, child node A has been called and completed, child node A will feed back its own node status to the parent node, notifying the parent node that the call has been completed. At this time, according to the task execution order in the task execution logic of the parent node, after calling child node A, child node B is called. When the node status of child node B is updated to the completed status, child node B will feed back its own node status to the parent node, and all child nodes of the parent node have been called and completed, then the node status of the parent node is updated to the completed status.

[0144] Since the parent node in the Nth level is the child node of the (N-1)th level, when the node state of the parent node in the Nth level is updated to the completed state, the node state of the child node in the (N-1)th level is updated to the completed state, and the node state of the child node in the (N-1)th level is fed back to the parent node in the (N-1)th level, or the node state of the parent node in the (N-1)th level is updated to the completed state. Recursively applying this logic to the first level of the task tree causes the node state of the parent node in the first level of the task tree to be updated to the completed state. At this point, the task tree has been executed to completion, achieving the task process control for the task to be executed.

[0145] Step S214, the server sends the task execution result of the task to be executed to the terminal.

[0146] Step S215, the terminal outputs the task execution result of the task to be executed.

[0147] In the embodiments of the present application, in response to a task execution request, multiple process control nodes are defined through the task execution logic of the task to be executed obtained, multiple task nodes are defined through the obtained task execution logic and the multiple task action contents corresponding to the task execution logic, and the root node is one of the multiple process control nodes. The master-slave relationship pairs between each level are established according to the master-slave relationship between the process control nodes and the task nodes, and the task tree is constructed by connecting the parent node and the child node of each level through the master-slave relationship pairs. During the task execution process, according to the state execution function in the task execution logic, in accordance with the update method of unidirectional linear flow, the node states of each parent node and each child node in each level are updated. When the task action contents in all the task nodes in the task tree have been executed to completion and the node state of the parent node in the first level is updated to the completed state, the task tree has been executed to completion. In this way, with the root node being a process control node, the task process control of the overall task can be achieved through the root node. During the task execution process, after the node state of any node other than the root node is updated in accordance with the update method of unidirectional linear flow, its own node state is fed back to the parent node, and the parent node calls the remaining child nodes for task execution according to the task execution order. When the node state of a node is the completed state, it cannot be called repeatedly. When executing the task action content in each task node, there is no need to repeatedly traverse the task tree. Only according to the node state of the node and the position of the node in the task tree, another node is called according to the task execution order. And based on the task tree, complex process designs can be clearly concatenated in series, supporting complex logic control and parameter configuration, having strong reusability and expandability, supporting the automatic execution of the entire process task, and facilitating the browsing of the overall task design.

[0148] Next, the exemplary application of the embodiments of the present application in an actual application scenario will be described.

[0149] An embodiment of the present application provides a task flow control method, which relates to a task flow control method based on a task tree, wherein the task tree includes two types of nodes: a flow control node and a task node. The flow control node defines the execution order and execution method of the sub-nodes; the task node defines the specific task execution logic and action content. The root node of the task tree must be a flow control node, the leaf node must be a task node, and the task node can only be a leaf node. Each node contains a set of one-way linear flow states, "unlocked-unlocked (i.e., the above unlocking)-in progress (i.e., the above running)-completed-rewarded", and can be executed if and only if the node is in the "unlocked" state.

[0150] The method provided in the embodiment of the present application can be used to connect game tasks in series, so that game planners can quickly build a task execution framework and browse the task design situation. It can be made into a plug-in for a game engine (for example, Unreal Engine) and applied to the internal game development process. Figures 9 to 12 As shown, Figures 9 to 12 For the plug-in interface and usage display, respectively, Figure 9 This is a schematic diagram of the plug-in interface. Figure 10 This is a diagram of the construction of a visual task tree. Figure 11 This is a schematic diagram of the node configuration. Figure 12 This is a schematic diagram of the execution of the task tree.

[0151] The flowchart of the task tree application is as follows: Figure 13 As shown in the figure, the implementation of the entire task flow control is divided into three steps: defining and expanding nodes, building a task tree, and unlocking and executing the task tree. In the node definition and expansion stage, according to the actual needs of the specific project and the classification of task execution logic, several task nodes (ActionNode) are designed, such as: dialogue task node, pick-up task node, etc., and a series of flow control nodes (FlowNode) are provided. Common FlowNode types include: sequential execution control node, loop N execution control node, random sequence execution control node, parallel execution control node, arbitrary N successful execution control node, etc. In addition, the execution logic of each node in different states is implemented in this stage, and the logic of the unlocking order of subnodes in FlowNode is implemented, and the execution logic of each frame when ActionNode is automatically executed and the conditional judgment of completing the task is set.

[0152] Then, in the task tree construction stage, according to the actual needs of the specific project, the process control nodes and task nodes are connected in series, the parent-child relationship between the process control nodes and the task nodes is defined, and the parameters of each node are set starting from the FlowNode type of the root node. Recursively, the child nodes of each node are added according to the parent-child relationship until all leaf nodes are ActionNodes.

[0153] Finally, in the unlocking and task tree execution phase, start unlocking from the process control node at the root node. According to the execution order defined by the process control node, traverse and unlock the child nodes until at least one task node is unlocked. At this time, the task is in an executable state. When a node is completed, update the node status and notify its parent node. The parent node unlocks the next child node according to the defined execution order or changes its own node status to "completed". With this logic, when the status of the root node changes to "completed", it means that all tasks have been executed and completed. In the execution phase, an "auto-execute" switch is also configured for each node, supporting the node to automatically execute the logic until the "completed" state, which is convenient for users to quickly view the overall task design logic.

[0154] For the node relationship diagram in the task tree as Figure 14 shown, each node needs to include: Unique identifier (Tag): The unique identity of this node, which is different from other nodes; State: Defines the current state of this node. The state only supports one-way conversion; Required resource list (Content Keys): Optional content. Defines the resources required to be loaded and used by this node, which are loaded when the task is executable and can be unloaded after the task is completed to reduce memory occupancy;

[0155] The node status flows unidirectionally among "unlocked - unlocked - in progress - completed - rewarded", except that the reset operation can directly set the node status to "unlocked". For each state of the node, there is a state execution function, which is executed when the node enters this state and can have different logic settings according to different node types.

[0156] The process control node is based on the basic node and adds a list of child nodes (Children) and an interface for adding child nodes. The logic of the child node unlocking order is defined by the OnChildCompleted function in the process control node. This function is executed after receiving the "completed" message of the child node and defines the conditions for its own "completed" state and the next unlocked node.

[0157] The task node is based on the basic node, adds an "auto-execute" switch (bAllowTick), and the logic of automatic execution per frame and the condition judgment for execution completion are defined by the StepToTarget and HasMatchedTarget interfaces. At the same time, an AutoOption interface is provided to define the automatic transition between states, such as: switching to in progress after unlocking, switching to completed after entering the task, etc.

[0158] Figure 15 For the schematic diagram of the task tree system, byFigure 15 It can be seen that the method provided by the embodiments of the present application can create nodes and connect the parent-child relationships of the nodes through the CreateTask and AddChildTask interfaces in the task tree. When establishing the parent-child relationship, the parent node connects to the child node and defines the arrangement order of the child nodes (i.e., the above-mentioned task execution order). When executing the task tree, as Figure 16 shown, the UnlockTree interface is called to automatically unlock the root node, and the child nodes of the root node are unlocked in sequence.

[0159] The system maintains a PendingTasks dictionary, which can quickly query the currently executable tasks. When the SetAutoCompleted interface is called and set to correct (True), the overall process enters the automatic execution state. First, the executable tasks are searched from PendingTasks and executed until the dictionary is empty.

[0160] Taking a simple task of "printing a string of characters to the screen" as an example, a complex task system as Figure 17 shown is quickly built according to this task (i.e., constructing task tree A), and the execution result of the corresponding task tree A is as Figure 18 shown. This task tree provides a series of process control nodes, including but not limited to sequential execution control nodes, random order execution control nodes, parallel execution control nodes, loop N times execution control nodes, any N successful execution control nodes, etc., and supports various task execution order controls. It also supports the "grafting" between task trees, that is, reusing the execution order logic defined by another task tree on the new task tree.

[0161] As Figures 19 to 22 shown, the task process control method provided by the embodiments of the present application supports flexible allocation of the connection order of each node in the task tree, so as to quickly adjust the task execution order. Figure 19 is a schematic structural diagram of task tree B, Figure 20 is a schematic diagram of the execution result of task tree B, Figure 21 is a schematic structural diagram of task tree C formed after allocating the connection order of each node in task tree B, Figure 22 is a schematic diagram of the execution result of task tree C. As Figure 23 shown, the task process control method provided by the embodiments of the present application supports parameterized configuration, flexibly adjusts the task content, abstracts only the execution logic into nodes, and the specific parameters and execution content of each node can be configured, supporting quick modification of the task content by modifying the parameters of the same node.

[0162] In addition to the process control nodes provided in the embodiments of the present application, more types of execution nodes can be designed according to the actual situation of the project to expand the richness of the task flow control methods of the task tree.

[0163] The product implemented based on the task flow control method provided in the embodiments of the present application constructs a task tree in a visual way of node connection. In addition to the visual way of node connection, the task tree can also be constructed by means of a configuration file. Similarly, the traditional way of configuring a task system in the form of a table or text is also applicable to constructing a task tree. It only needs to define the parsing format of the configuration, and define the node type, node parameters, and node connection method through the parsed content.

[0164] In the embodiments of the present application, by providing two types of nodes in the task tree, namely, process control nodes for complex process logic control and task nodes for specific task execution, complex process designs can be clearly connected in series, supporting the automatic execution of the entire process task, facilitating the browsing of the overall task design, and at the same time supporting complex logic control and parameter configuration, with strong reusability and scalability.

[0165] It can be understood that in the embodiments of the present application, for the content related to user information, such as the task execution logic of the task to be executed, the task action content, etc., if it involves data related to user information or enterprise information, when the embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, or these information need to be blurred to eliminate the corresponding relationship between these information and users; and the collection and processing of relevant data should strictly comply with the requirements of relevant national laws and regulations during actual application, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing behaviors within the scope of authorization of laws and regulations and the personal information subject.

[0166] Next, continue to illustrate the exemplary structure of the implementation of the task flow control device 455 provided in the embodiments of the present application as a software module. In some embodiments, such as Figure 2As shown, the software modules stored in the task process control device 455 of the memory 440 may include: an acquisition module 4551, configured to acquire the task execution logic of the task to be executed and a plurality of task action contents corresponding to the task execution logic in response to a task execution request; a definition module 4552, configured to define a plurality of process control nodes according to the task execution logic, and define a plurality of task nodes according to the task execution logic and the plurality of task action contents; one of the plurality of process control nodes is a root node, and there is a master-slave relationship between the process control node and the task node; a construction module 4553, configured to construct a task tree based on the root node and the master-slave relationship between the process control node and the task node; wherein, the process control node and the task node in the task tree have a node state of unidirectional linear flow; an execution module 4554, configured to start from the root node of the task tree, and sequentially call each node in the process control node and the task node for execution according to the master-slave relationship between the process control node and the task node in the task tree, and the node state of each process control node and task node, until the task action content in each task node among the plurality of task nodes is executed.

[0167] In some embodiments, the construction module 4553 is further configured to: based on the master-slave relationship, establish a master-slave relationship pair between each level in the task tree; the master-slave relationship pair includes two process control nodes with a master-slave relationship with each other, or, the master-slave relationship pair includes a process control node and a task node with a master-slave relationship with each other; starting from the master-slave relationship pair corresponding to the root node, sequentially connect the process control node and the task node in each master-slave relationship pair to form the task tree.

[0168] In some embodiments, the construction module 4553 is further configured to: starting from the master-slave relationship pair corresponding to the root node, determine the parent node and the child node in the master-slave relationship pair; for the master-slave relationship pair of the first level, use the root node in the master-slave relationship pair as the parent node, and use the other node in the master-slave relationship pair except the root node as the child node, and connect the parent node of the first level and the child node of the first level; for the master-slave relationship pair of the Nth level, use the child node in the master-slave relationship pair of the N-1th level as the parent node of the Nth level, and use the other node in the master-slave relationship pair of the Nth level except the parent node of the Nth level as the child node of the Nth level, and connect the parent node of the Nth level and the child node of the Nth level to form the task tree; N is an integer greater than 1.

[0169] In some embodiments, each of the process control nodes has at least one child node; the apparatus 455 further includes a control module, and the control module is configured to: determine the node type of the corresponding process control node based on the task execution logic of each process control node; and control the task execution order of at least one child node of the corresponding process control node based on the node type of each process control node.

[0170] In some embodiments, the number of the task execution logics is multiple; each task execution logic is used to define the task execution order and task execution manner of at least one node in the task tree; the apparatus 455 further includes a determination module, and the determination module is configured to: obtain a target task execution logic for defining the task execution order and task execution manner of all nodes in the task tree; determine a target process control node defined based on the target task execution logic; and determine the target process control node as the root node.

[0171] In some embodiments, the execution module 4554 is further configured to: determine at least one parent node in each level and at least one child node of each parent node according to the master-slave relationship pairs in each level of the task tree; obtain the node states of the parent node and the child node; starting from the parent node of the first level, in accordance with the task execution logics of each parent node and each child node having a master-slave relationship with the parent node in each level, sequentially call each parent node and each child node in each level for task execution, and update the node states of each parent node and each child node in each level in a unidirectional linear flow update manner according to the state execution function in the task execution logic; when the task action content in all task nodes in the task tree is executed, and the node state of the parent node of the first level is updated to the completed state, the task tree is executed.

[0172] In some embodiments, the apparatus 455 further includes a response module, and the response module is configured to: when the node state of any child node in any level of the task tree is updated to the completed state, feedback the node state of the child node to the parent node of the child node; in response to the node state of the child node being the completed state, call the remaining child nodes in the level except the child node according to the task execution logic of the parent node, or update the node state of the parent node to the completed state.

[0173] In some embodiments, the node state of each node in the task tree includes an unlocked state, an unlocked state, a running state, and a completed state; the state execution function includes an unlocking execution function and a running execution function; the execution module 4554 is further configured to: for any current node among each parent node and each child node in each level, obtain the current node state of the current node; when the current node state is the unlocked state, perform an unlocking operation on the current node based on the unlocking execution function, and after completing the unlocking operation, switch the current node state from the unlocked state to the unlocked state; when the current node state is the unlocked state, perform a task execution operation on the current node based on the running execution function, and when starting to perform the task execution operation, switch the current node state from the unlocked state to the running state; when the task execution operation is completed, switch the current node state from the running state to the completed state.

[0174] In some embodiments, the node state further includes a rewarded state, and the state execution function further includes a reward execution function; the device 455 further includes a reward module, and the reward module is configured to: when the node state of the task node is updated to the completed state, obtain the task execution result of the task node; when the task execution result meets the preset reward condition, perform a reward operation on the task node based on the reward execution function, and after completing the reward operation, switch the node state of the task node from the completed state to the rewarded state.

[0175] In some embodiments, the device 455 further includes a reset module, and the reset module is configured to: receive a node state reset operation for the current node; in response to the node state reset operation, obtain the current node state of the current node; when the current node state is the unlocked state, prohibit state switching of the current node state; when the current node state is not the unlocked state, switch the current node state to the unlocked state.

[0176] In some embodiments, before constructing the task tree, the device 455 further includes a branch determination module, and the overall determination module is configured to: obtain a preset task process library, where the task process library includes task trees corresponding to multiple different task execution logics; compare the task execution logic of the task to be executed with the task execution logic of each task tree in the task process library to obtain a logic comparison result; when the logic comparison result indicates that there is an identical task tree in the task process library that has the same task execution logic as the task to be executed, determine the identical task tree as the task tree of the task to be executed.

[0177] In some embodiments, the task to be executed includes a plurality of subtasks, and each subtask corresponds to a branch task tree in the task tree; before constructing the task tree, the apparatus 455 further includes a branch determination module, and the reset module is configured to: obtain a preset task process library, where the task process library includes task trees corresponding to a plurality of different task execution logics; each task tree corresponding to a task execution logic includes branch task trees corresponding to a plurality of subtask execution logics; compare each subtask execution logic in the task execution logic of the task to be executed with the subtask execution logics of each task tree in the task process library respectively to obtain a sub-logic comparison result; in the case that the sub-logic comparison result indicates that there is a subtask execution logic in the task process library that is the same as any subtask of the task to be executed, determine the branch task tree in the task process library with the same subtask execution logic as the branch task tree of the task to be executed.

[0178] In some embodiments, the building module 4553 is further configured to: construct the task tree of the task to be executed based on the master-slave relationship between the root node, the process control node and the task node, and the branch task tree.

[0179] It should be noted that the description of the apparatus in the embodiments of the present application is similar to the description of the above method embodiments, and has similar beneficial effects to the method embodiments, so details are not described herein. For the technical details not disclosed in the embodiments of the present apparatus, please refer to the description of the method embodiments of the present application for understanding.

[0180] The embodiments of the present application provide a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor will be caused to execute the task process control method provided by the embodiments of the present application. For example, as Figure 3 shown in the task process control method.

[0181] The embodiments of the present application provide a computer program product, which includes computer-executable instructions, and the computer-executable instructions are stored in a computer-readable storage medium. The processor of the electronic device reads the computer-executable instructions from the computer-readable storage medium, and the processor executes the computer-executable instructions, so that the electronic device executes the task process control method described above in the embodiments of the present application.

[0182] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disc, or CD-ROM; or may be various devices including one or any combination of the above memories.

[0183] In some embodiments, the computer-executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including being deployed as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0184] As an example, the computer-executable instructions may or may not correspond to a file 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 Hyper Text Markup Language (HTML) document, stored in a single file dedicated to the program being discussed, or, stored in multiple cooperating files (e.g., files that store one or more modules, subroutines, or portions of code).

[0185] As an example, the computer-executable instructions may be deployed to execute on one electronic device, or on multiple electronic devices located at one site, or, on multiple electronic devices distributed across multiple sites and interconnected via a communication network.

[0186] As described above, the above are only embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and scope of the present application are included in the protection scope of the present application.

Claims

1. A task process control method, characterized in that, the method includes: In response to a task execution request, obtain the task execution logic of the task to be executed and a plurality of task action contents corresponding to the task execution logic; Define a plurality of process control nodes according to the task execution logic, and define a plurality of task nodes according to the task execution logic and the plurality of task action contents; one root node is included in the plurality of process control nodes, and there is a master-slave relationship between the process control nodes and the task nodes; Construct a task tree based on the root node and the master-slave relationship between the process control nodes and the task nodes; wherein, the process control nodes and the task nodes in the task tree have a node state of unidirectional linear flow; Starting from the root node of the task tree, according to the master-slave relationship between the process control nodes and the task nodes in the task tree, and the node states of each process control node and task node, sequentially call each node in the process control nodes and the task nodes to execute the task until the task action content in each task node among the plurality of task nodes is executed.

2. The method according to claim 1, characterized in that, the constructing a task tree based on the root node and the master-slave relationship between the process control nodes and the task nodes includes: Based on the master-slave relationship, establish master-slave relationship pairs between each level in the task tree; the master-slave relationship pair includes two process control nodes with a master-slave relationship to each other, or, the master-slave relationship pair includes a process control node and a task node with a master-slave relationship to each other; Starting from the master-slave relationship pair corresponding to the root node, sequentially connect the process control nodes and task nodes in each master-slave relationship pair to form the task tree.

3. The method according to claim 2, characterized in that, the starting from the master-slave relationship pair corresponding to the root node, sequentially connecting the process control nodes and task nodes in each master-slave relationship pair to form the task tree includes: Starting from the master-slave relationship pair corresponding to the root node, determine the parent node and the child node in the master-slave relationship pair; For the master-slave relationship pair of the first level, use the root node in the master-slave relationship pair as the parent node, and use the other node in the master-slave relationship pair except the root node as the child node, and connect the parent node of the first level and the child node of the first level; For the master-slave relationship pair of the Nth level, use the child node in the master-slave relationship pair of the N - 1th level as the parent node of the Nth level, and use the other node in the master-slave relationship pair of the Nth level except the parent node of the Nth level as the child node of the Nth level, and connect the parent node of the Nth level and the child node of the Nth level to form the task tree; N is an integer greater than 1.

4. The method according to claim 3, characterized in that, each process control node has at least one child node; the method further includes: Determine the node type of the corresponding process control node based on the task execution logic of each process control node; Based on the node type of each of the process control nodes, control the task execution order of at least one child node of the corresponding process control node.

5. The method according to claim 3, wherein, the number of the task execution logics is multiple; each of the task execution logics is used to define the task execution order and task execution manner of at least one node in the task tree; the method further includes: obtaining a target task execution logic for defining the task execution order and task execution manner of all nodes in the task tree; determining a target process control node defined based on the target task execution logic; determining the target process control node as the root node.

6. The method according to claim 3, wherein, starting from the root node of the task tree, according to the master-slave relationship between the process control nodes and task nodes in the task tree, and the node states of each process control node and task node, sequentially call each node in the process control nodes and the task nodes for execution until the task action content in each task node among the multiple task nodes is executed completely, including: determining at least one parent node in each level and at least one child node of each parent node according to the master-slave relationship pairs in each level of the task tree; obtaining the node states of the parent node and the child node; starting from the parent node of the first level, according to the task execution logics of the parent node and the child node having the master-slave relationship with the parent node in each level, sequentially call each parent node and each child node in each level for task execution, and update the node states of each parent node and each child node in each level according to the state execution function in the task execution logic in a unidirectional linear flow update manner; when the task action content in all task nodes in the task tree is executed completely and the node state of the parent node of the first level is updated to the completed state, the task tree is executed completely.

7. The method according to claim 6, wherein, the method further includes: when the node state of any child node in any level of the task tree is updated to the completed state, feedback the node state of the child node to the parent node of the child node; in response to the node state of the child node being the completed state, according to the task execution logic of the parent node, call the remaining child nodes in the level except the child node, or update the node state of the parent node to the completed state.

8. The method according to claim 6, wherein, the node state of each node in the task tree includes an unlocked state, an unlocked state, a running state, and a completed state; the state execution functions include an unlock execution function and a running execution function; updating the node states of each parent node and each child node in each level according to the state execution function in the task execution logic in a unidirectional linear flow update manner includes: For each parent node and any current node among each child node in each of the said levels, obtain the current node state of the current node; In the case where the current node state is the unlocked state, perform an unlocking operation on the current node based on the unlocking execution function, and after completing the unlocking operation, switch the current node state from the unlocked state to the unlocked state; In the case where the current node state is the unlocked state, perform a task execution operation on the current node based on the running execution function, and when starting to perform the task execution operation, switch the current node state from the unlocked state to the running state; In the case where the task execution operation is completed, switch the current node state from the running state to the completed state.

9. The method according to claim 8, wherein, the node state further includes a rewarded state, and the state execution function further includes a reward execution function; the method further includes: In the case where the node state of the task node is updated to the completed state, obtain the task execution result of the task node; In the case where the task execution result meets the preset reward condition, perform a reward operation on the task node based on the reward execution function, and after completing the reward operation, switch the node state of the task node from the completed state to the rewarded state.

10. The method according to claim 9, wherein, the method further includes: Receive a node state reset operation for the current node; In response to the node state reset operation, obtain the current node state of the current node; In the case where the current node state is the unlocked state, prohibit state switching of the current node state; In the case where the current node state is not the unlocked state, switch the current node state to the unlocked state.

11. The method according to any one of claims 1 to 10, wherein, Before constructing the task tree, the method further includes: Obtain a preset task process library, which includes task trees corresponding to multiple different task execution logics; Compare the task execution logic of the to-be-executed task with the task execution logic of each task tree in the task process library to obtain a logic comparison result; In the case where the logic comparison result indicates that there is an identical task tree in the task process library that has the same task execution logic as the to-be-executed task, determine the identical task tree as the task tree of the to-be-executed task.

12. The method according to any one of claims 1 to 10, wherein, the to-be-executed task includes multiple subtasks, and each subtask corresponds to a branch task tree in the task tree; Before constructing the task tree, the method further includes: Obtain a preset task process library, which includes task trees corresponding to multiple different task execution logics; each task tree corresponding to each task execution logic includes branch task trees corresponding to multiple subtask execution logics; Compare each sub - task execution logic in the task execution logic of the to - be - executed task with the sub - task execution logic of each task tree in the task process library to obtain a sub - logic comparison result; When the sub - logic comparison result indicates that there is a task tree in the task process library with the same sub - task execution logic as any sub - task of the to - be - executed task, determine the branch task tree of the to - be - executed task as the branch task tree of the same sub - task execution logic in the task process library; The constructing of the task tree based on the master - slave relationship between the root node and the process control node and the task node includes: Construct the task tree of the to - be - executed task based on the master - slave relationship between the root node, the process control node and the task node, and the branch task tree.

13. A task process control device, Characterized in that, The device includes: An acquisition module, configured to obtain the task execution logic of the to - be - executed task and a plurality of task action contents corresponding to the task execution logic in response to a task execution request; A definition module, configured to define a plurality of process control nodes according to the task execution logic, and define a plurality of task nodes according to the task execution logic and the plurality of task action contents; one of the plurality of process control nodes is a root node, and there is a master - slave relationship between the process control node and the task node; A construction module, configured to construct a task tree based on the master - slave relationship between the root node and the process control node and the task node; wherein, the process control node and the task node in the task tree have a node state of unidirectional linear flow; An execution module, configured to start from the root node of the task tree, and sequentially call each node in the process control node and the task node for execution according to the master - slave relationship between the process control node and the task node in the task tree, and the node state of each process control node and the task node, until the task action content in each task node among the plurality of task nodes is executed completely.

14. An electronic device, Characterized in that, It includes: A memory, configured to store computer - executable instructions; A processor, configured to implement the task process control method according to any one of claims 1 to 12 when executing the computer - executable instructions stored in the memory.

15. A computer - readable storage medium, Characterized in that, It stores computer - executable instructions, and when the computer - executable instructions are executed by a processor, the task process control method according to any one of claims 1 to 12 is implemented.