Game task processing method and device, electronic equipment and storage medium

By dynamically generating game content using a stateful execution graph, the problem of high workload and high resource consumption in existing game development technologies is solved, achieving efficient game content generation and personalized player experience.

CN121911085APending Publication Date: 2026-04-24GUANGZHOU BOGUAN TELECOMM TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU BOGUAN TELECOMM TECH LTD
Filing Date
2026-01-04
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Current game development requires the pre-design of a massive number of game tasks, resulting in a large workload, high resource consumption, and negative impacts on game performance and player experience.

Method used

By describing and executing game tasks using a stateful execution graph, game content is created in real time. The structure of the stateful execution graph is used to obtain game parameters and sub-task components, and game content is dynamically generated.

Benefits of technology

It reduces the workload of game development, decreases resource consumption, improves game performance and player experience, and enhances the game's personalization and interaction efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121911085A_ABST
    Figure CN121911085A_ABST
Patent Text Reader

Abstract

The invention discloses a game task processing method and device, electronic equipment and a storage medium, game parameters corresponding to a target game task and a stateful execution graph corresponding to the target game task can be obtained, and the game task is described and executed through the structure of the stateful execution graph to generate corresponding game content. The game task is created in real time and the corresponding game content is generated according to the actual demand of the user, the development of the game content does not need to be performed by designing massive game tasks in advance, the workload of game development is effectively reduced, the game content generation process of game development is simplified, resource occupation during game running is effectively reduced, and the user experience is improved. The operation effect of the game is improved, and the game experience of players is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of game technology, and specifically to a method, apparatus, electronic device, and storage medium for processing game tasks. Background Technology

[0002] To satisfy people's pursuit of spiritual life, entertainment games that can be played on terminals have emerged, such as multiplayer online action games, tactical competitive games, or role-playing games (RPGs) developed based on client or server architecture.

[0003] In existing games, to provide players with a richer and more engaging gaming experience, game development teams undertake tasks such as building the game world, designing game quest lines, and writing character behaviors to generate game content. This makes the game content more diverse and enhances its playability. Currently, game developers typically pre-develop various game elements, and then, based on player actions, select the appropriate content from this pre-generated pool for display. However, the current method of game content development requires the pre-design of a massive number of game tasks to cover all possible content. This significantly increases the workload and complexity of game development, leading to excessive resource consumption during gameplay, impacting game performance, and ultimately resulting in a poor player experience. Summary of the Invention

[0004] This application provides a method, apparatus, electronic device, and storage medium for processing game tasks. It can obtain game parameters corresponding to the target game task and a stateful execution graph corresponding to the target game task. The game task is described and executed through the structure of the stateful execution graph to generate corresponding game content. This enables the creation of game tasks and the generation of corresponding game content in real time according to the user's actual needs. It eliminates the need to pre-design a large number of game tasks for game content development, effectively reducing the workload of game development, simplifying the game content generation process, effectively reducing the resource consumption during game runtime, improving the game's performance, and enhancing the player's gaming experience.

[0005] Providing customized settings for function entry points can effectively enhance the personalization of the game, improve the efficiency of player interaction, and enhance the player's gaming experience.

[0006] In a first aspect, embodiments of this application provide a method for processing game tasks, the method comprising: In response to a task triggering event for a target game task, the system obtains the game parameters corresponding to the target game task and the target stateful execution graph corresponding to the target game task. The target stateful execution graph includes processing nodes and connecting edges. Each processing node is configured with a corresponding game subtask and the subtask components required to complete the game subtask. The connecting edges are used to indicate the subtask dependencies between connected processing nodes. The target stateful execution graph is configured with processing state information, which is used to record the game content generated by each processing node. Using the entry processing node of the target stateful execution graph as the current processing node, the game parameters are input into the subtask component corresponding to the current processing node to execute the corresponding game subtask, thereby obtaining the first game content, and the first game content is recorded in the processing state information; A new current processing node is determined based on the subtask dependencies indicated by at least one connection edge of the current processing node; Obtain the input information of the new current processing node from the processing status information; The input information is input into the subtask component corresponding to the current processing node to execute the corresponding game subtask, resulting in new first game content. The new first game content is then recorded in the processing status information. Continue executing the subtask dependency relationship indicated by at least one connection edge of the current processing node, and determine a new current processing node until there is no new current processing node, so as to generate the second game content of the target game task based on the first game content that has been obtained.

[0007] Secondly, embodiments of this application provide a game task processing apparatus, comprising: A response unit is configured to respond to a task triggering event for a target game task, and to obtain game parameters corresponding to the target game task and a target stateful execution graph corresponding to the target game task; wherein, the target stateful execution graph includes processing nodes and connecting edges, each processing node is configured with a corresponding game subtask and subtask components required to complete the game subtask, and the connecting edges are used to indicate the subtask dependencies between connected processing nodes; the target stateful execution graph is configured with processing state information, and the processing state information is used to record the game content generated by each processing node. The processing unit is configured to take the entry processing node of the target stateful execution graph as the current processing node, input the game parameters into the subtask component corresponding to the current processing node to execute the corresponding game subtask, obtain the first game content, and record the first game content into the processing state information; The determining unit is configured to determine a new current processing node based on the subtask dependency relationship indicated by at least one connection edge of the current processing node; The acquisition unit is used to acquire the input information of the new current processing node from the processing status information; The recording unit is used to input the input information into the subtask component corresponding to the current processing node to execute the corresponding game subtask, obtain new first game content, and record the new first game content into the processing status information; An execution unit is configured to continue executing the subtask dependency relationship indicated by at least one connection edge of the current processing node, and to determine a new current processing node, until there is no new current processing node, so as to generate the second game content of the target game task based on the first game content already obtained.

[0008] Thirdly, embodiments of this application also provide an electronic device, including a memory storing multiple instructions; a processor loading instructions from the memory to execute the steps of any of the game task processing methods provided in embodiments of this application.

[0009] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute the steps of any of the game task processing methods provided in embodiments of this application.

[0010] Fifthly, embodiments of this application also provide a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps in any of the game task processing methods provided in embodiments of this application.

[0011] The solution adopted in this application embodiment can obtain the game parameters corresponding to the target game task and the stateful execution graph corresponding to the target game task. The game task is described and executed through the structure of the stateful execution graph to generate the corresponding game content. This realizes the creation of game tasks and the generation of corresponding game content in real time according to the user's actual needs. It eliminates the need to pre-design a large number of game tasks for game content development, effectively reduces the workload of game development, simplifies the game content generation process, effectively reduces the resource consumption during game runtime, improves the game's running effect, and enhances the player's gaming experience. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a schematic diagram of a game task processing system provided in an embodiment of this application; Figure 2 This is a schematic flowchart of one embodiment of the game task processing method provided in this application. Figure 3 This is a schematic diagram of a scenario for a game task processing method provided in an embodiment of this application; Figure 4 This is another scenario illustration of the game task processing method provided in the embodiments of this application; Figure 5 This is another scenario illustration of the game task processing method provided in the embodiments of this application; Figure 6 This is another scenario illustration of the game task processing method provided in the embodiments of this application; Figure 7 This is another scenario illustration of the game task processing method provided in the embodiments of this application; Figure 8 This is another scenario illustration of the game task processing method provided in the embodiments of this application; Figure 9 This is a schematic diagram of the structure of the game task processing device provided in the embodiments of this application; Figure 10 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0014] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application. At the same time, in the description of the embodiments of this application, the terms "first," "second," etc., are only used to distinguish descriptions and should not be construed as indicating or implying relative importance. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0015] This application provides a method, apparatus, electronic device, and computer-readable storage medium for processing game tasks. Specifically, this embodiment will be described from the perspective of a game task processing apparatus, which can be integrated into an electronic device. That is, the game task processing method of this application embodiment can be executed by an electronic device. Optionally, the electronic device may include a terminal device. The terminal device may be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, game console, or personal computer (PC), etc.

[0016] The game task processing method provided in this application can be applied to a game task processing system. This system can include a player terminal device and a server. The terminal can be a device that includes both receiving and transmitting hardware, i.e., a device with receiving and transmitting hardware capable of performing bidirectional communication over a bidirectional communication link. The player terminal device and the server can communicate bidirectionally via a network.

[0017] Optionally, the server can be a standalone server, or a server network or server cluster, including but not limited to computers, network hosts, single network servers, multiple network server sets, or cloud servers composed of multiple servers. Cloud servers consist of a large number of computers or network servers based on cloud computing.

[0018] In one embodiment of this disclosure, the game task processing method can run on a local terminal device or a server. When the game task processing method runs on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0019] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separated. The storage and execution of in-game interaction methods are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, the information processing is performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses game screen data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.

[0020] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface (GUI), i.e., conventionally by downloading, installing, and running the game program via an electronic device. The local terminal device can provide the GUI to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player via holographic projection. For example, the local terminal device can include a display screen for displaying the GUI, which includes game screens, and a processor for running the game, generating the GUI, and controlling the display of the GUI on the display screen.

[0021] Please see Figure 1 , Figure 1 This is a schematic diagram of a game task processing system provided in an embodiment of this application. The system may include at least one terminal, at least one server, at least one database, and a network. A user's terminal can connect to different game servers via the network. The terminal is any device with computing hardware capable of supporting and executing software products corresponding to the game. Furthermore, when the system includes multiple terminals, multiple servers, and multiple networks, different terminals can connect to each other through different networks and servers. The network can be a wireless network or a wired network, such as a wireless local area network (WLAN), local area network (LAN), cellular network, 2G network, 3G network, 4G network, 5G network, etc. Additionally, different terminals can also connect to other terminals or servers using their own Bluetooth networks or hotspot networks. For example, multiple users can connect online through different terminals via appropriate networks and synchronize with each other to support multiplayer games. Furthermore, the system may include multiple databases coupled to different servers, and can continuously store game environment-related information in the databases while different users are playing multiplayer games online.

[0022] This application provides a method for processing game tasks, which can be executed by a terminal or a server. This application example illustrates a method for processing game tasks executed by a terminal. The terminal may include a touchscreen display and a processor (of course, the terminal may also use peripherals such as a mouse or keyboard as input devices; this example only uses a touchscreen display). The touchscreen display is used to present a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. When the user operates the GUI through the touchscreen display, the GUI can control local content on the terminal in response to the received operation commands, or it can control content on a peer server in response to the received operation commands. For example, the operation commands generated by the user interacting with the GUI may include commands to launch a game application. The processor is configured to launch the game application after receiving the user's command to launch the game application. Furthermore, the processor is configured to render and draw the GUI associated with the game on the touchscreen display. The touchscreen display is a multi-touch sensitive screen capable of sensing touch or swipe operations performed simultaneously on multiple points on the screen. Users perform touch operations on the graphical user interface (GUI) using their fingers. When the GUI detects the touch operation, it controls different virtual objects in the game's GUI to perform actions corresponding to the touch operation.

[0023] It should be noted that, Figure 1 The schematic diagram of the game task processing system shown is merely an example. The game task processing system and scenario described in this application embodiment are for the purpose of more clearly illustrating the technical solutions of this application embodiment and do not constitute a limitation on the technical solutions provided in this application embodiment. As those skilled in the art will know, with the emergence of new business scenarios, the technical solutions provided in this application embodiment are also applicable to similar technical problems.

[0024] This application provides a method for processing game tasks. This method can be executed by a terminal or a server. This application uses the example of a game task processing method executed by a terminal to illustrate the method. A graphical user interface can be provided by the terminal device. The graphical user interface displays the game screen. The game screen includes at least a virtual scene and a controlled virtual object (i.e., a virtual character) located in the virtual scene and controlled by the terminal device.

[0025] The following detailed description is provided in conjunction with the accompanying drawings. In this embodiment, the execution subject is a terminal device as an example. It should be noted that the order of description in the following embodiments is not intended to limit the preferred order of the embodiments. Although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in a different order than that shown in the accompanying drawings.

[0026] Please see Figure 2 , Figure 2 This is a flowchart illustrating a game task processing method provided in an embodiment of this application. The specific flow of the game task processing method can be as follows: steps 101 to 106, wherein: Step 101: In response to a task triggering event for a target game task, obtain the game parameters corresponding to the target game task and the target stateful execution graph corresponding to the target game task; wherein, the target stateful execution graph includes processing nodes and connecting edges, each processing node is configured with a corresponding game subtask and the subtask components required to complete the game subtask, and the connecting edges are used to indicate the subtask dependencies between the connected processing nodes; the target stateful execution graph is configured with processing state information, and the processing state information is used to record the game content generated by each processing node.

[0027] The subtask component corresponding to the processing node is one or more of a task processing tool, a game agent, or other stateful execution graph.

[0028] For example, please see Figure 3 This application provides a task processing system, which mainly includes four core layers: definition and configuration layer, orchestration and scheduling core layer, execution and capability layer, and status and history management layer.

[0029] Specifically, the definition and configuration layer is the entry point for user interaction with the system. Developers define the workflow blueprint at this layer using a graphical user interface (UI) or code (SDK). Graph Definition: Defines the basic structure of the graph, including nodes and edges. Node Configuration: Configures the specific function of each node. A node can call a tool, execute code, delegate to an AI agent, or nest another sub-graph. State Schema: Defines the data structure of the state throughout the entire graph execution process. JSON Schema or similar specifications are typically used to constrain the state format and ensure type safety. Entrypoint & Parameters: Defines the workflow's entry point and the initial parameters required. Orchestration & Scheduling Core: This is the system's "brain," responsible for parsing the graph definition and driving the entire workflow execution based on real-time states. Graph Parser: Reads the graph definition and constructs an executable graph instance in memory. State Manager: Responsible for maintaining the real-time state of the current workflow. It is the Single Source of Truth for all decisions. Scheduler: The core component. It continuously checks the current state and, based on the logic defined in the graph (especially edge conditions), determines which node should be executed next. The scheduler supports concurrent execution of nodes, setting priorities, and handling timeouts. Router: When the next node to be executed has multiple choices (e.g., the logic of a conditional edge satisfies multiple branches simultaneously), the router selects one or more paths to execute based on preset strategies (such as priority, round-robin, or invoking a decision model). Execution & Capability Layer: This is the system's "arm," responsible for actually executing the tasks dispatched by the scheduler. Executor: Receives instructions from the scheduler and invokes the corresponding functional unit. Agent Pool: Manages a group of available AI agents. Each agent can have different roles and capabilities (e.g., "copywriter," "scene designer," "code generator"). Toolsets: These provide a range of atomic capabilities, such as calling external APIs, reading and writing databases, file operations, and performing mathematical calculations. AI agents use these tools to complete tasks.Sub-Graph Engine: Recursively executes nested subgraphs, enabling modularity and reusability of workflows. State & History Management Layer: This is the system's "memory," responsible for persistently storing all state information to ensure system reliability and traceability. StatePersistence: Periodically or after each update, stores the in-memory state of the core state manager into a database (such as Redis or PostgreSQL) to prevent state loss due to system crashes. History Logger: Records every state change, node inputs and outputs, scheduling decisions, and all other critical events, forming an immutable operation log. Checkpoint Manager: Allows setting checkpoints on any node in the graph. When a task recovers from a failure, it can directly load the state from the most recent successful checkpoint without starting from scratch. Debugger & Replayer: Based on the history, developers can replay the entire task execution process like playing a video, or "pause" at any historical point to examine the state at that time for debugging and analysis. This application embodiment constructs a powerful and robust complex task orchestration and scheduling system through the collaborative work of these four levels.

[0030] In this embodiment, each stateful execution graph may include an entry node. The entry node is the starting point of a stateful execution graph. It can be a grand beginning, such as "the start of a new game," or a micro-event, such as the "villagers' plea for help" quest triggered when a player enters a village. The entry node is the source of everything. The initial information provided to the entry node when it is started can be game parameters. For "the start of a new game," game parameters might be the player's chosen race (elf / dwarf), class (mage / warrior), initial talent point allocation, etc. For "villagers' plea for help," game parameters might be the player's level, reputation, and current in-game time (day / night) when the quest is triggered.

[0031] Furthermore, after the game parameters are input into the entry node and executed, two core results will be obtained: 1) Generation and presentation of initial game content: The primary task of the entry node is to "create the world." It will generate the first batch of content that players can see and interact with based on the input parameters. 2) Macro level (new game): If the entry node is "the beginning of a new game" and the input parameter is "elf mage," then the execution result will be: in an area called "Silvermoon Forest" in the game world, a player character who fits the identity of an elf mage will be generated. There may be ancient magic towers and talking tree NPCs around, and a basic fireball spellbook in the player's inventory. Micro level (dynamic task): If the entry node is "a villager's plea for help" and the input parameters are "low player level, nighttime," the execution result may be: an anxious mother NPC appears in the village. She will tell the player that her child is lost in the "Dark Forest" outside the village. Because it is nighttime, the forest is dangerous, so the task reward will be higher. If the parameters are "high player level, daytime," then the NPC might change to a village guard who would request powerful players to help clear out a group of goblins lurking in a nearby mine, as they are more active during the day. In summary, the first result of the entry node is to transform abstract game parameters into concrete, personalized game experiences.

[0032] Furthermore, after the entry node completes its execution, generates initial content, and establishes an initial state, the system begins searching for the next processing node. The system first checks how many connecting edges originate from the entry node and which subsequent processing nodes these edges point to. Next, the scheduler retrieves the initial state just established by the entry node and evaluates the conditions one by one to find the next processing node that meets the criteria. Assuming the entry node is "Entering a Perilous City," it has three outgoing edges leading to nodes V2, V3, and V4. The conditions for entry → V2 (peaceful entry from the guard) are: player charisma > 15; the conditions for entry → V3 (stealth entry through the sewers) are: player stealth skill > 10 and game time = "night"; the conditions for entry → V4 (forced entry) are: player level > 5. Then, feasible paths are filtered, and the scheduler makes judgments based on the initial state established by the input "game parameters." Scenario A: The player is a high-charisma diplomat (charisma 20) who arrives in the city during the day. The conditions for V2 (Charisma > 15) are met. The condition for V3 (nighttime) is not met. The condition for V4 (Level > 5, assuming the player's level is 6) is met. At this point, two paths (V2 and V4) are feasible. After selecting one or more feasible paths, the system will make a final decision based on preset rules. If only one path is feasible: the system will automatically proceed along this path and execute the next node. For example, if the player is someone who knows nothing but stealth and arrives in the city at night, the system may only trigger the V3 event, directly guiding the player to the sewer entrance. If multiple paths are feasible (as in case A above): the system will usually transform these feasible paths into "choices" that the player can make and present them through the game interface. The player may see options like this: (Persuasion) "Hello, I am an envoy from afar, hoping to enter the city and pay my respects to the city lord." (Corresponds to V2) (Battle) "Those who block my way, please step aside!" (Corresponds to V4); The player's choice will ultimately determine whether the next node to be executed is V2 or V4.

[0033] Optionally, there will be prioritization. In some cases, even if multiple paths are feasible, the system may recommend or even automatically select one based on preset priorities or weights. For example, the designer can set the priority of "peaceful solution" to always be higher than "violent solution," in which case the system may prioritize recommending option V2.

[0034] In summary, every step from the entry node onwards is neither random nor pre-set. It follows a rigorous logical process: input parameters → establish an initial state → evaluate the conditions of all possible paths → select feasible paths that fit the current state → translate feasible paths into player choices or automatic system decisions → execute the next node. This process ensures that every game start and every task trigger is closely aligned with the player's identity, abilities, and environment, providing a personalized and dynamic experience.

[0035] In this embodiment, a stateful graph is a special type of directed graph, which can be called a "stateful graph". It not only defines the computational flow but also incorporates "state" as an intrinsic attribute. A stateful graph G can be defined as a quintuple: G = (V, E, S, f init , Σ) Where V = {v1, v2, ..., vn} is a finite set of nodes in the graph. Each node vi represents a computational unit or task. E V × V is a finite set of edges in the graph. An edge (vi, vj) represents a possible control flow transition from node vi to node vj. Unlike a traditional DAG, this graph allows loops, meaning paths from (vi, ..., vi) are permitted. S is a state space that defines all possible states of the graph during execution. Specifically, a specific state s∈S is typically a JSON object following a predefined schema, such as s = {"key1": value1, "key2": value2, ...}. finit P→S is an initialization function that takes a set of external input parameters p∈P and generates the initial state s0 of the graph. Σ is a set of external events or triggers that can affect the execution flow of the graph.

[0036] Node v∈V is the basic unit of execution in the graph. At the core of each node is a state transition function. Given the current state s, the execution process of a node v can be modeled as follows: S' = Executev(s, σ) Where s is the state before node execution. σ∈Σ is an optional external input or event. Executev is the execution function of node v, which performs a specific task based on the current state and external input. S' is the updated state after node execution. The state update can be incremental or a complete replacement. For example, s' might be the result of merging s with the node output Δs: s' = s⊕Δs. The stateful execution graph provided in this application includes the following node types: Entrypoint Node: vstart, the starting node of the graph, usually only one. Task Node: The node that performs a specific operation, such as calling an AI agent, running a piece of code, or using a tool. Conditional Node / Router Node: This node does not perform a task, but determines the next edge to be activated based on the content of the current state s. Its output is not a state change, but an identifier for the next node. Sub-Graph Node: This node encapsulates another complete stateful graph G'. When execution reaches this node, the current graph's execution is paused, and control and a subset of the state are passed to the sub-graph G'. After the sub-graph completes execution, the results are merged back into the parent graph's state, and execution continues. End Node: vend, marking the successful termination of an execution path in the graph. A graph can have multiple end nodes.

[0037] An edge e = (vi, vj) ∈ E represents the control flow between nodes. In this invention, edges can be conditional. Each edge ek = (vi, vk) originating from node vi is associated with a Boolean predicate function Ck(s).

[0038] Ck(s)→{True,False} After node vi finishes execution and updates its state to s', the scheduler evaluates the condition function Ck(s') of all edges originating from vi. Only when Ck(s') is True will the corresponding edge ek be activated, and its target node vk be added to the execution queue. Unconditional edges: their condition function C(s) is always True. Default edges (FallbackEdge): when all other conditional edges originating from a node are not satisfied, the default edge will be activated. This provides fault tolerance and a default path for the process. This design allows the execution path of the graph to change dynamically and intelligently based on the runtime state.

[0039] The state s∈S is the core of the method provided in this application. It is a globally accessible data structure, typically a JSON object. It carries all context information from the start of graph execution to the current time point. The introduction of the state transforms the graph execution process from a series of stateless function calls into an evolutionary process of a deterministic state machine. Given the same initial state S0 and the same sequence of external events Σ... t The execution path and final result of the graph are completely reproducible.

[0040] Step 102: Using the entry processing node of the target stateful execution graph as the current processing node, input the game parameters into the subtask component corresponding to the current processing node to execute the corresponding game subtask, obtain the first game content, and record the first game content in the processing state information.

[0041] In this embodiment, an initial state s0 is generated through the initialization function finit, and the entry node vstart is placed into the execution queue Q. The scheduler continuously monitors queue Q, and when Q is not empty, the scheduler retrieves a node vi from it according to a predetermined strategy (such as FIFO, priority) and executes it. The executor calls the Executevi function of that node, passing in the current state st, to obtain the updated state st+1, and records it in the processing state information.

[0042] Step 103: Determine a new current processing node based on the subtask dependencies indicated by at least one connection edge of the current processing node.

[0043] This application embodiment can determine a new current processing node based on the status and the latest generated game content. The processing status information also includes the game scene status, the first virtual character status, and the second virtual character status. The game scene status indicates the scene status of the target game scene corresponding to the target game task. The first virtual character status indicates the character status of the target player account that triggered the target game task and the controlling virtual character. The second virtual character status indicates the character status of all other virtual characters in the target game scene. The step "determining a new current processing node based on the subtask dependency relationship indicated by at least one connection edge of the current processing node" includes: Based on the game scene state, the first virtual character state, the second virtual character state, and / or the subtask dependency relationship indicated by at least one connection edge of the current processing node, a new current processing node is determined.

[0044] For example, please refer to the following: Figure 4 and Figure 5The scheduler provided in this embodiment is not based on a fixed schedule or task queue, but is driven by state changes, with a continuously running scheduling loop at its core. An initial state s0 is generated through the initialization function finit, and the entry node vstart is placed into the execution queue Q. The scheduler continuously monitors queue Q. When Q is not empty, the scheduler retrieves a node vi from it according to a predetermined strategy (such as FIFO, priority) and executes it. The executor calls the Executevi function of that node, passing in the current state st, and obtains the updated state st+1. The state manager updates the global state to st+1. Simultaneously, the history recorder persists this transition (vi, st, st+1) as a log entry. The scheduler obtains all outgoing edges {ei,k} of node vi and evaluates the conditional predicate Ck(st+1) associated with each edge using the new state st+1. The target node {vk} pointed to by all edges where Ck(st+1) returns True is added to the execution queue Q. If multiple nodes are added to queue Q simultaneously, the scheduler can launch multiple parallel executors to process them according to the configuration, thereby achieving concurrent execution of tasks. When queue Q is empty and there are no running nodes, the scheduling loop ends, and the entire graph is completed. In this embodiment, the state-driven loop is the core of the system's dynamism. Because the execution result of a node (reflected in its state) directly determines the next step, the workflow can adapt to various changes during runtime.

[0045] Step 104: Obtain the input information of the new current processing node from the processing status information.

[0046] In this embodiment of the application, the input information of the new current processing node is obtained from the processing status information. The step "obtaining the input information of the new current processing node from the processing status information" includes: Based on the game subtask of the new current processing node, the information required to execute the game subtask is determined from the processing status information as input information.

[0047] Step 105: Input the input information into the subtask component corresponding to the current processing node to execute the corresponding game subtask, obtain new first game content, and record the new first game content in the processing status information.

[0048] Step 106: Continue executing the step of determining a new current processing node based on the subtask dependency indicated by at least one connection edge of the current processing node, until there is no new current processing node, so as to generate the second game content of the target game task based on the first game content that has been obtained.

[0049] Based on the above description, the following examples will further illustrate the game task processing method of this application. Specific embodiments of the game task processing method are described below.

[0050] In one embodiment, the method further includes: When multiple new current processing nodes are detected and identified, the corresponding game sub-tasks are executed by each new current processing node in sequence based on the processing priority of each new current processing node.

[0051] In one embodiment, after taking the entry processing node of the target stateful execution graph as the current processing node, inputting the game parameters into the subtask component corresponding to the current processing node to execute the corresponding game subtask, obtaining the first game content, and recording the first game content into the processing state information, the method further includes: First game interactive content is generated based on the first game content, and then displayed through a graphical user interface.

[0052] Specifically, after generating the first game interactive content based on the first game content, the first game interactive content can also be displayed through the graphical user interface provided by the target player's terminal device, so that the player can view the generated first game interactive content in real time.

[0053] In one embodiment, after inputting the input information into the subtask component corresponding to the current processing node to execute the corresponding game subtask and obtain new first game content, the method further includes: If the new game content meets the node addition conditions, the target stateful execution graph is updated based on the new first game content to obtain a new target stateful execution graph.

[0054] In one embodiment, updating the target stateful execution graph based on the new first game content to obtain a new target stateful execution graph includes: Based on the new first game content, at least one new processing node is determined; Based on the first position of the current processing node in the target stateful execution graph, determine at least one new processing node in the second position of the target stateful execution graph; Based on the second position and the subtask dependencies of the new processing node, the new processing node is added to the target stateful execution graph to obtain a new target stateful execution graph.

[0055] In one embodiment, determining at least one new processing node's second position in the target stateful execution graph based on the current processing node's first position in the target stateful execution graph includes: Based on the task type of the game subtask of the new processing node, determine the method for adding the new processing node; Based on the addition method and the first position of the current processing node in the target stateful execution graph, the second position of the new processing node in the target stateful execution graph is determined.

[0056] In one embodiment, adding the new processing node to the target stateful execution graph based on the second position and the subtask dependencies of the new processing node to obtain a new target stateful execution graph includes: Based on the addition method, the second position, and the subtask dependencies of the new processing node, the new processing node is added to the target stateful execution graph to obtain a new target stateful execution graph.

[0057] In this embodiment, the graph is allowed to be dynamically modified during execution. This means that the execution result of a node can not only change its state but also alter the structure of the graph itself. The output of a node's execution function `Executev` can be a composite structure: (Δs, ΔG) = Executev(s) Here, Δs represents the modification amount to the state. ΔG = (ΔV, ΔE) represents the modification to the graph structure. ΔV is a set of nodes to be added, and ΔE is a set of edges to be added. When the scheduler receives an execution result containing ΔG, it performs the following operations: First, the graph is atomically updated: ΔV and ΔE are applied to the current graph G. This operation is atomic to ensure the consistency of the graph structure. Then, the scheduler is updated: new nodes and edges are immediately considered by the scheduler. For example, if ΔE contains a new edge originating from the current node v and its condition is met, then its target node is immediately added to the queue for execution.

[0058] This mechanism grants the system extremely high flexibility. For example, when procedurally generating a dungeon: after a "layout generation" node runs, a new "room content generation" subgraph node is dynamically created for each room based on the number of rooms generated. Simultaneously, edges are dynamically created to connect these new subgraph nodes, forming a dependency chain (e.g., a "treasure room" must be generated before a "treasure chest" can be placed within it). Thus, the graph structure is no longer pre-fixed but grows as the task unfolds.

[0059] In one embodiment, after obtaining the game parameters corresponding to the target game task and the target stateful execution graph corresponding to the target game task in response to a task triggering event for the target game task, the method further includes: Using the supervisor processing node of the target stateful execution graph as the current processing node, the supervisor agent corresponding to the supervisor processing node is controlled to perform task decomposition processing on the target game task to obtain multiple game sub-tasks. Based on the task type of each game sub-task, at least one target agent is selected from a preset agent pool, and a game sub-task matching the target agent is assigned to the target agent. The target intelligent agent controls the sub-task components of the processing node corresponding to the game sub-task, executes the corresponding game sub-task, obtains the first game content, and records the first game content into the processing status information.

[0060] In one embodiment, the method further includes: When the supervisory agent detects that all game sub-tasks have been completed, it generates the second game content for the target game task based on the first game content already obtained.

[0061] In one embodiment, the target stateful execution graph includes processing nodes of a specified type; after inputting the input information into the subtask component corresponding to the current processing node to execute the corresponding game subtask, obtaining new first game content, and recording the new first game content into the processing state information, the method further includes: The processing status information is serialized to obtain the target status data of the processing status information, and the target status data is stored in a preset database. When it is detected that the subtask component of the current processing node of the target stateful execution graph fails to execute the corresponding game subtask, the corresponding target state data is determined from the preset database based on the previous specified type of processing node of the current processing node. Based on the target state data, the subtask component of the current processing node is re-controlled to execute the corresponding game subtask.

[0062] Specifically, in order to support the decomposition and collaboration of complex tasks, this application introduces a collaboration protocol specifically designed for multi-agent systems. The core idea is to assign a portion of the nodes in the graph to a "Supervisor Agent" to coordinate a group of expert agents.

[0063] For example, please see Figure 6 First, roles are defined. Each AI agent is assigned one or more roles, such as game_designer, concept_artist, and level_scripter. A shared state and a private scratchpad are used. All agents share the same global state `s`, but each agent can have a private "scratchpad" within its state object to store intermediate thought processes, memories, or plans. This avoids mutual interference. The specific structure is as follows: s ={. . . ,"agent_scratchpads": {"agent_A":. . . ,"agent_B":. . .}} Supervisor-Expert Model: (1) The scheduler assigns a macro task (such as “generate a new region”) to a supervisor node.

[0064] (2) The supervisor agent bound to the supervisor node receives the task and accesses the shared state to understand the full context.

[0065] (3) The supervisory agent decomposes the macro task into a series of smaller, specific sub-tasks.

[0066] (4) The supervisor agent selects the most suitable expert agent from the agent pool according to the nature of the subtask and the predefined routing rules, and writes the subtask into the temporary storage area of ​​the expert agent or the designated task queue in the form of instructions.

[0067] (5) The expert agent performs its own subtask and writes the results back to the shared state public area.

[0068] (6) The supervisory agent continuously monitors the shared state until all subtasks are completed or a certain termination condition is met, and then notifies the scheduler that the macro task is completed.

[0069] This application provides a communication mechanism in which communication between agents is asynchronous and conducted through states. One agent "sends a message" by modifying its state, and another agent "receives a message" by reading its state. This approach decouples the agents, allowing them to work independently.

[0070] Optionally, embodiments of this application also provide a checkpoint and a complete history tracing mechanism to ensure the reliability of the task, specifically including the following: Immutable History Log: Every state transition (vi, st, st+1, timestamp) is recorded, forming an immutable log chain. This log is the cornerstone of auditing, debugging, and playback.

[0071] Checkpoints: Developers can set "checkpoint" flags on certain key nodes of the graph. When these nodes are reached and the state is successfully updated, the state manager serializes the current complete state and stores it as a version number or timestamp in a dedicated persistent storage (such as object storage or a database).

[0072] Fault Recovery: When a long-running graph is interrupted for any reason (such as node execution failure or system crash), a recovery process can be initiated: Locate the last successful checkpoint record from the historical logs. Load the complete state `scheckpoint` corresponding to that checkpoint from persistent storage. Set the loaded state as the current state. Re-add the interrupted node to the execution queue `Q`. Restart the scheduling loop.

[0073] In this way, tasks can seamlessly continue execution from a previous stable state, avoiding the huge overhead of starting from scratch. At the same time, complete historical logs provide developers with powerful debugging tools, enabling them to accurately reproduce any execution process and pinpoint the root cause of problems.

[0074] Based on the above description, the following examples will further illustrate the game task processing method of this application. For example, please refer to... Figure 7 The specific implementation of the game task processing method is described below. This application embodiment can implement a task chain that dynamically grows based on player behavior and world state. According to the requirements, a task of "finding the missing alchemist" is designed. The task flow needs to dynamically change based on the player's skills (such as "persuasion" and "stealth") and the game time (day / night), ultimately generating at least one game ending.

[0075] Based on the above description, the following examples will further illustrate the game task processing method of this application. For example, please refer to... Figure 8 The specific implementation of the game task processing method is described below. This application can programmatically generate a 1km×1km cyberpunk-style city area, requiring functional zoning, a reasonable road network, diverse building appearances, and street decorations that match the atmosphere.

[0076] In summary, the embodiments of this application provide a method for processing game tasks. This method can obtain game parameters corresponding to a target game task and a stateful execution graph corresponding to the target game task. The stateful execution graph structure is used to describe and execute the game task to generate corresponding game content. This enables the real-time creation of game tasks and the generation of corresponding game content based on the user's actual needs. It eliminates the need for pre-designing a massive number of game tasks for game content development, effectively reducing the workload of game development, simplifying the game content generation process, effectively reducing resource consumption during game runtime, improving game performance, and enhancing the player's gaming experience.

[0077] This embodiment also provides a game task processing device, which can be integrated into a terminal device. For example, such as... Figure 9 As shown, the processing device for this game task may include: The response unit 201 is configured to respond to a task triggering event for a target game task by acquiring game parameters corresponding to the target game task and a target stateful execution graph corresponding to the target game task. The target stateful execution graph includes processing nodes and connecting edges. Each processing node is configured with a corresponding game subtask and subtask components required to complete the game subtask. The connecting edges are used to indicate the subtask dependencies between connected processing nodes. The target stateful execution graph is configured with processing state information, which records the game content generated by each processing node. Processing unit 202 is used to take the entry processing node of the target stateful execution graph as the current processing node, input the game parameters into the subtask component corresponding to the current processing node to execute the corresponding game subtask, obtain the first game content, and record the first game content in the processing state information; The determining unit 203 is used to determine a new current processing node based on the subtask dependency relationship indicated by at least one connection edge of the current processing node; The acquisition unit 204 is used to acquire the input information of the new current processing node from the processing status information; Recording unit 205 is used to input the input information into the subtask component corresponding to the current processing node to execute the corresponding game subtask, obtain new first game content, and record the new first game content into the processing status information; The execution unit 206 is used to continue executing the subtask dependency relationship indicated by at least one connection edge of the current processing node, and to determine a new current processing node, until there is no new current processing node, so as to generate the second game content of the target game task based on the first game content that has been obtained.

[0078] In some embodiments, the processing apparatus for the game task includes a processing subunit for: Based on the game scene state, the first virtual character state, the second virtual character state, and / or the subtask dependency relationship indicated by at least one connection edge of the current processing node, a new current processing node is determined.

[0079] In some embodiments, the processing apparatus for the game task includes a processing subunit for: When multiple new current processing nodes are detected and identified, the corresponding game sub-tasks are executed by each new current processing node in sequence based on the processing priority of each new current processing node.

[0080] In some embodiments, the processing apparatus for the game task includes a processing subunit for: Based on the game subtask of the new current processing node, the information required to execute the game subtask is determined from the processing status information as input information.

[0081] In some embodiments, the processing apparatus for the game task includes a processing subunit for: First game interactive content is generated based on the first game content, and then displayed through a graphical user interface.

[0082] In some embodiments, the processing apparatus for the game task includes a processing subunit for: If the new game content meets the node addition conditions, the target stateful execution graph is updated based on the new first game content to obtain a new target stateful execution graph.

[0083] In some embodiments, the processing apparatus for the game task includes a processing subunit for: Based on the new first game content, at least one new processing node is determined; Based on the first position of the current processing node in the target stateful execution graph, determine at least one new processing node in the second position of the target stateful execution graph; Based on the second position and the subtask dependencies of the new processing node, the new processing node is added to the target stateful execution graph to obtain a new target stateful execution graph.

[0084] In some embodiments, the processing apparatus for the game task includes a processing subunit for: Based on the task type of the game subtask of the new processing node, determine the method for adding the new processing node; Based on the addition method and the first position of the current processing node in the target stateful execution graph, the second position of the new processing node in the target stateful execution graph is determined.

[0085] In some embodiments, the processing apparatus for the game task includes a processing subunit for: Based on the addition method, the second position, and the subtask dependencies of the new processing node, the new processing node is added to the target stateful execution graph to obtain a new target stateful execution graph.

[0086] In one embodiment, the subtask component corresponding to the processing node is one or more of a task processing tool, a game agent, or other stateful execution graph.

[0087] In some embodiments, the processing apparatus for the game task includes a processing subunit for: Using the supervisor processing node of the target stateful execution graph as the current processing node, the supervisor agent corresponding to the supervisor processing node is controlled to perform task decomposition processing on the target game task to obtain multiple game sub-tasks. Based on the task type of each game sub-task, at least one target agent is selected from a preset agent pool, and a game sub-task matching the target agent is assigned to the target agent. The target intelligent agent controls the sub-task components of the processing node corresponding to the game sub-task, executes the corresponding game sub-task, obtains the first game content, and records the first game content into the processing status information.

[0088] In some embodiments, the processing apparatus for the game task includes a processing subunit for: When the supervisory agent detects that all game sub-tasks have been completed, it generates the second game content for the target game task based on the first game content already obtained.

[0089] In some embodiments, the processing apparatus for the game task includes a processing subunit for: The processing status information is serialized to obtain the target status data of the processing status information, and the target status data is stored in a preset database. When it is detected that the subtask component of the current processing node of the target stateful execution graph fails to execute the corresponding game subtask, the corresponding target state data is determined from the preset database based on the previous specified type of processing node of the current processing node. Based on the target state data, the subtask component of the current processing node is re-controlled to execute the corresponding game subtask.

[0090] This application discloses a game scene processing device that can acquire game parameters corresponding to a target game task and a stateful execution graph corresponding to the target game task. The device describes and executes the game task through the structure of the stateful execution graph to generate corresponding game content. This enables the creation of game tasks and the generation of corresponding game content in real time according to the user's actual needs. It eliminates the need to pre-design a large number of game tasks for game content development, effectively reducing the workload of game development, simplifying the game content generation process, effectively reducing the resource consumption during game runtime, improving the game's running effect, and enhancing the player's gaming experience.

[0091] Accordingly, this application also provides an electronic device, which can be a terminal, such as a smartphone, tablet computer, laptop computer, touch screen, game console, personal computer (PC), personal digital assistant (PDA), or other terminal device. Alternatively, the electronic device can be a server.

[0092] like Figure 10 As shown, Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 and the memory 302 are electrically connected. Those skilled in the art will understand that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0093] The processor 301 is the control center of the electronic device 300. It connects various parts of the electronic device 300 via various interfaces and lines. By running or loading software programs and / or units stored in the memory 302, and by calling data stored in the memory 302, it executes various functions and processes data of the electronic device 300, thereby providing overall monitoring of the electronic device 300. The processor 301 can be a central processing unit (CPU), a graphics processing unit (GPU), a network processor (NP), etc., and can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application.

[0094] In this embodiment, the processor 301 in the electronic device 300 loads the instructions corresponding to the processes of one or more applications into the memory 302 according to the following steps, and the processor 301 runs the applications stored in the memory 302 to realize various functions, such as: In response to a task triggering event for a target game task, the system obtains the game parameters corresponding to the target game task and the target stateful execution graph corresponding to the target game task. The target stateful execution graph includes processing nodes and connecting edges. Each processing node is configured with a corresponding game subtask and the subtask components required to complete the game subtask. The connecting edges are used to indicate the subtask dependencies between connected processing nodes. The target stateful execution graph is configured with processing state information, which is used to record the game content generated by each processing node. Using the entry processing node of the target stateful execution graph as the current processing node, the game parameters are input into the subtask component corresponding to the current processing node to execute the corresponding game subtask, thereby obtaining the first game content, and the first game content is recorded in the processing state information; A new current processing node is determined based on the subtask dependencies indicated by at least one connection edge of the current processing node; Obtain the input information of the new current processing node from the processing status information; The input information is input into the subtask component corresponding to the current processing node to execute the corresponding game subtask, resulting in new first game content. The new first game content is then recorded in the processing status information. Continue executing the subtask dependency relationship indicated by at least one connection edge of the current processing node, and determine a new current processing node until there is no new current processing node, so as to generate the second game content of the target game task based on the first game content that has been obtained.

[0095] The electronic device provided in this application embodiment can obtain game parameters corresponding to the target game task and the stateful execution graph corresponding to the target game task. The game task is described and executed through the structure of the stateful execution graph to generate the corresponding game content. This realizes the creation of game tasks and the generation of corresponding game content in real time according to the user's actual needs. It eliminates the need to pre-design a large number of game tasks for game content development, effectively reduces the workload of game development, simplifies the game content generation process, effectively reduces the resource consumption during game runtime, improves the game's running effect, and enhances the player's gaming experience.

[0096] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0097] Optional, such as Figure 10 As shown, the electronic device 300 also includes: a touch display screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the touch display screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307. Those skilled in the art will understand that... Figure 10 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0098] The touch display screen 303 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 303 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar technologies. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program according to the operation commands. Optionally, the touch panel may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch location and the signal generated by the touch operation, transmitting the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to the processor 301. It can also receive and execute commands from the processor 301. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the touch display screen 303 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 303 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 303 can also be used as part of the input unit 306 to achieve input functions.

[0099] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other electronic devices, and to transmit and receive signals with network devices or other electronic devices.

[0100] Audio circuitry 305 can be used to provide an audio interface between a user and an electronic device via a speaker and a microphone. Audio circuitry 305 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 305, converted back into audio data, and then processed by processor 301 before being transmitted via radio frequency circuitry 304 to, for example, another electronic device, or output to memory 302 for further processing. Audio circuitry 305 may also include an earphone jack to facilitate communication between peripheral headphones and electronic devices.

[0101] The input unit 306 can be used to receive input numbers, characters, or user characteristic information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.

[0102] Power supply 307 is used to supply power to various components of electronic device 300. Optionally, power supply 307 can be logically connected to processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 307 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0103] although Figure 10 As not shown in the diagram, the electronic device 300 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.

[0104] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0105] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0106] Therefore, embodiments of this application provide a computer-readable storage medium storing multiple computer programs that can be loaded by a processor to execute any of the game task processing methods provided in embodiments of this application. The computer program can execute the steps of the following game task processing method: In response to a task triggering event for a target game task, the system obtains the game parameters corresponding to the target game task and the target stateful execution graph corresponding to the target game task. The target stateful execution graph includes processing nodes and connecting edges. Each processing node is configured with a corresponding game subtask and the subtask components required to complete the game subtask. The connecting edges are used to indicate the subtask dependencies between connected processing nodes. The target stateful execution graph is configured with processing state information, which is used to record the game content generated by each processing node. Using the entry processing node of the target stateful execution graph as the current processing node, the game parameters are input into the subtask component corresponding to the current processing node to execute the corresponding game subtask, thereby obtaining the first game content, and the first game content is recorded in the processing state information; A new current processing node is determined based on the subtask dependencies indicated by at least one connection edge of the current processing node; Obtain the input information of the new current processing node from the processing status information; The input information is input into the subtask component corresponding to the current processing node to execute the corresponding game subtask, resulting in new first game content. The new first game content is then recorded in the processing status information. Continue executing the subtask dependency relationship indicated by at least one connection edge of the current processing node, and determine a new current processing node until there is no new current processing node, so as to generate the second game content of the target game task based on the first game content that has been obtained.

[0107] Because the computer program stored in this storage medium can obtain the game parameters corresponding to the target game task and the stateful execution graph corresponding to the target game task, the game task can be described and executed through the structure of the stateful execution graph to generate the corresponding game content. This enables the creation of game tasks and the generation of corresponding game content in real time according to the user's actual needs, without the need to pre-design a massive number of game tasks for game content development. This effectively reduces the workload of game development, simplifies the game content generation process, effectively reduces the resource consumption during game runtime, improves the game's performance, and enhances the player's gaming experience.

[0108] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0109] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0110] Since the computer program stored in the computer-readable storage medium can execute any of the game task processing methods provided in the embodiments of this application, the beneficial effects that any of the game task processing methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0111] According to one aspect of this application, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various optional implementations of the above embodiments.

[0112] In the above embodiments of the game task processing apparatus, computer-readable storage medium, electronic device, and computer program product, the descriptions of each embodiment have different focuses. Parts not described in detail in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process and beneficial effects of the game task processing apparatus, computer-readable storage medium, computer program product, electronic device, and their corresponding units described above can be referred to the description of the game task processing method in the above embodiments, and will not be repeated here.

[0113] The foregoing has provided a detailed description of a game task processing method, apparatus, electronic device, computer-readable storage medium, and computer program product provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for processing game tasks, characterized in that, include: In response to a task triggering event for a target game task, the system obtains the game parameters corresponding to the target game task and the target stateful execution graph corresponding to the target game task. The target stateful execution graph includes processing nodes and connecting edges. Each processing node is configured with a corresponding game subtask and the subtask components required to complete the game subtask. The connecting edges are used to indicate the subtask dependencies between connected processing nodes. The target stateful execution graph is configured with processing state information, which is used to record the game content generated by each processing node. Using the entry processing node of the target stateful execution graph as the current processing node, the game parameters are input into the subtask component corresponding to the current processing node to execute the corresponding game subtask, thereby obtaining the first game content, and the first game content is recorded in the processing state information; A new current processing node is determined based on the subtask dependencies indicated by at least one connection edge of the current processing node; Obtain the input information of the new current processing node from the processing status information; The input information is input into the subtask component corresponding to the current processing node to execute the corresponding game subtask, resulting in new first game content. The new first game content is then recorded in the processing status information. Continue executing the subtask dependency relationship indicated by at least one connection edge of the current processing node, and determine a new current processing node until there is no new current processing node, so as to generate the second game content of the target game task based on the first game content that has been obtained.

2. The method according to claim 1, characterized in that, The processing status information also includes game scene status, first virtual character status and second virtual character status. The game scene status is used to indicate the scene status of the target game scene corresponding to the target game task. The first virtual character status is used to indicate the character status of the target player account that triggered the target game task and the controlling virtual character. The second virtual character status is used to indicate the character status of all other virtual characters in the target game scene. The process of determining a new current processing node based on the subtask dependencies indicated by at least one connection edge of the current processing node includes: Based on the game scene state, the first virtual character state, the second virtual character state, and / or the subtask dependency relationship indicated by at least one connection edge of the current processing node, a new current processing node is determined.

3. The method according to claim 2, characterized in that, The method further includes: When multiple new current processing nodes are detected and identified, the corresponding game sub-tasks are executed by each new current processing node in sequence based on the processing priority of each new current processing node.

4. The method according to claim 3, characterized in that, The step of obtaining the input information of the new current processing node from the processing status information includes: Based on the game subtask of the new current processing node, the information required to execute the game subtask is determined from the processing status information as input information.

5. The method according to claim 2, characterized in that, After taking the entry processing node of the target stateful execution graph as the current processing node, inputting the game parameters into the subtask component corresponding to the current processing node to execute the corresponding game subtask, obtaining the first game content, and recording the first game content in the processing state information, the method further includes: First game interactive content is generated based on the first game content, and then displayed through a graphical user interface.

6. The method according to claim 2, characterized in that, After inputting the input information into the subtask component corresponding to the current processing node to execute the corresponding game subtask and obtain new first game content, the method further includes: If the new game content meets the node addition conditions, the target stateful execution graph is updated based on the new first game content to obtain a new target stateful execution graph.

7. The method according to claim 6, characterized in that, The step of updating the target stateful execution graph based on the new first game content to obtain a new target stateful execution graph includes: Based on the new first game content, at least one new processing node is determined; Based on the first position of the current processing node in the target stateful execution graph, determine at least one new processing node in the second position of the target stateful execution graph; Based on the second position and the subtask dependencies of the new processing node, the new processing node is added to the target stateful execution graph to obtain a new target stateful execution graph.

8. The method according to claim 7, characterized in that, Determining at least one new processing node's second position in the target stateful execution graph based on the current processing node's first position in the graph includes: Based on the task type of the game subtask of the new processing node, determine the method for adding the new processing node; Based on the addition method and the first position of the current processing node in the target stateful execution graph, the second position of the new processing node in the target stateful execution graph is determined.

9. The method according to claim 8, characterized in that, The step of adding the new processing node to the target stateful execution graph based on the second position and the subtask dependency relationship of the new processing node to obtain a new target stateful execution graph includes: Based on the addition method, the second position, and the subtask dependencies of the new processing node, the new processing node is added to the target stateful execution graph to obtain a new target stateful execution graph.

10. The method according to claim 1, characterized in that, The subtask component corresponding to the processing node is one or more of the following: task processing tool, game agent, or other stateful execution graph.

11. The method according to any one of claims 1 to 9, characterized in that, After obtaining the game parameters corresponding to the target game task and the target stateful execution graph corresponding to the target game task in response to a task triggering event for the target game task, the method further includes: Using the supervisor processing node of the target stateful execution graph as the current processing node, the supervisor agent corresponding to the supervisor processing node is controlled to perform task decomposition processing on the target game task to obtain multiple game sub-tasks. Based on the task type of each game sub-task, at least one target agent is selected from a preset agent pool, and a game sub-task matching the target agent is assigned to the target agent. The target intelligent agent controls the sub-task components of the processing node corresponding to the game sub-task, executes the corresponding game sub-task, obtains the first game content, and records the first game content into the processing status information.

12. The method according to claim 11, characterized in that, The method further includes: When the supervisory agent detects that all game sub-tasks have been completed, it generates the second game content for the target game task based on the first game content already obtained.

13. The method according to any one of claims 1 to 9, characterized in that, The target stateful execution graph includes processing nodes of a specified type; after inputting the input information into the subtask component corresponding to the current processing node to execute the corresponding game subtask, obtaining new first game content, and recording the new first game content into the processing state information, the method further includes: The processing status information is serialized to obtain the target status data of the processing status information, and the target status data is stored in a preset database. When it is detected that the subtask component of the current processing node of the target stateful execution graph fails to execute the corresponding game subtask, the corresponding target state data is determined from the preset database based on the previous specified type of processing node of the current processing node. Based on the target state data, the subtask component of the current processing node is re-controlled to execute the corresponding game subtask.

14. A device for processing game tasks, characterized in that, include: A response unit is configured to respond to a task triggering event for a target game task, and to obtain game parameters corresponding to the target game task and a target stateful execution graph corresponding to the target game task; wherein, the target stateful execution graph includes processing nodes and connecting edges, each processing node is configured with a corresponding game subtask and subtask components required to complete the game subtask, and the connecting edges are used to indicate the subtask dependencies between connected processing nodes; the target stateful execution graph is configured with processing state information, and the processing state information is used to record the game content generated by each processing node. The processing unit is configured to take the entry processing node of the target stateful execution graph as the current processing node, input the game parameters into the subtask component corresponding to the current processing node to execute the corresponding game subtask, obtain the first game content, and record the first game content into the processing state information; The determining unit is configured to determine a new current processing node based on the subtask dependency relationship indicated by at least one connection edge of the current processing node; The acquisition unit is used to acquire the input information of the new current processing node from the processing status information; The recording unit is used to input the input information into the subtask component corresponding to the current processing node to execute the corresponding game subtask, obtain new first game content, and record the new first game content into the processing status information; An execution unit is configured to continue executing the subtask dependency relationship indicated by at least one connection edge of the current processing node, and to determine a new current processing node, until there is no new current processing node, so as to generate the second game content of the target game task based on the first game content already obtained.

15. An electronic device, characterized in that, The system includes a processor and a memory, the memory storing multiple instructions; the processor loads instructions from the memory to perform the steps of the game task processing method as described in any one of claims 1 to 13.

16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the game task processing method as described in any one of claims 1 to 13.