Game flow optimization method, device and electronic equipment
Patent Information
- Application Number
- CN202611270345.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-20
- Publication Date
- 2026-10-30
AI Technical Summary
[0003]然而,当前的流程化控制方法在某些方面仍然存在局限性,例如,基于当前的流程化控制方法所设计的初始的游戏流程,在游戏实际运行过程中,可能会产生某些流程问题,例如,由于游戏逻辑错误而导致特定事件未能成功触发、特定事件的触发频率异常或者游戏运行时出现异常掉帧、卡顿等问题
[0014]第四方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的方法。
Smart Images

Figure CN122998746A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computers, and more particularly to a method, apparatus, and electronic device for optimizing game flow. Background Technology
[0002] In game engine development, flow control is a common technique used to manage game logic and improve development efficiency. Current flow control methods, such as using state machines, behavior trees, or custom scripts, play a vital role in game development. These methods allow developers to break down game logic into a series of ordered steps and define the transition conditions between those steps.
[0003] However, current process-based control methods still have limitations in some aspects. For example, the initial game flow designed based on current process-based control methods may encounter certain flow problems during actual game operation. These problems may include specific events failing to trigger successfully due to game logic errors, abnormal triggering frequency of specific events, or abnormal frame drops and stuttering during game execution. To solve these problems, the initial game flow needs to be optimized. However, optimizing game flows based on game engines often requires a lot of manual intervention, resulting in relatively low efficiency. Summary of the Invention
[0004] This application provides a game flow optimization method, apparatus, electronic device, and readable storage medium. By automatically adjusting the flow operation parameters of the game engine, the target game runs under the adjusted flow operation parameters. Based on the difference between the flow state data generated by the target game during operation and before and after the adjustment, the flow operation parameters of the game engine are automatically corrected, thereby efficiently correcting the operation flow of the target game and improving the flow optimization efficiency.
[0005] In a first aspect, embodiments of this application provide a game flow optimization method, the method comprising: Acquire the first process state data generated during the operation of the target game, and generate initial adjustment instructions based on the first process state data; The game engine's process operation parameters are adjusted based on the initial adjustment instructions, and the second process state data generated by the target game running under the adjusted process operation parameters is obtained. Based on the difference information between the second process status data and the first process status data, the initial adjustment instruction is corrected to obtain a correction instruction, and the process operation parameters of the game engine are corrected based on the correction instruction.
[0006] Optionally, the game engine includes an animation manager and an event manager; the initial adjustment instruction includes a first sub-instruction and a second sub-instruction; the process running parameters include the process animation playback speed and the process event triggering frequency; The adjustment of the game engine's process operation parameters based on the initial adjustment instructions includes: The target animation playback speed is determined based on the first sub-instruction, and the animation manager is controlled to play the animation at the target animation playback speed. The target process event triggering frequency is determined based on the second sub-instruction, and the event manager is controlled to trigger process events according to the target process event triggering frequency.
[0007] Optionally, the game engine further includes a unified component, which establishes a first data communication interface with the animation manager and a second data communication interface with the event manager; The control of the animation manager to play the process animation according to the target process animation playback speed includes: Through the first data communication interface, the target process animation playback speed is encapsulated into a speed attribute configuration item of the animation manager, and the speed attribute configuration item is sent to the animation manager to control the animation manager to play the process animation according to the sent speed attribute configuration item; The target process event triggering frequency is encapsulated into a frequency attribute configuration item of the event manager through the second data communication interface, and the frequency attribute configuration item is sent to the event manager to control the event manager to trigger process events according to the sent frequency attribute configuration item.
[0008] Optionally, the first process status data includes game performance data and player experience data; the game performance data includes frame rate data, memory usage rate and / or CPU usage rate within a unit time window; the player experience data includes player operation interruption rate and / or level retry count within the same unit time window; The step of generating the initial adjustment instruction based on the first process status data includes: The game performance data and the player experience data are normalized respectively to obtain the normalization result; The normalization result is then concatenated into vectors to obtain the concatenated vector result. An initial adjustment instruction is generated based on the vector concatenation result.
[0009] Optionally, the step of correcting the initial adjustment instruction based on the difference information between the second process status data and the first process status data to obtain a correction instruction includes: The reward value is determined based on the difference between the second process status data and the first process status data. If the reward value is positive, the initial adjustment instruction is positively corrected to obtain a positive correction instruction; If the reward value is negative, the initial adjustment instruction is negatively corrected to obtain a negative correction instruction.
[0010] Optionally, before acquiring the first flow state data generated by the target game during its operation, the method further includes: Obtain information about the target game's genre, game objectives, and historical user behavior data; The initial process design information of the target game is determined based on the game type information, the game objective information, and the historical user behavior data; Obtain the game resource information of the target game and extract the resource features of the game resource information; Based on the resource characteristics, trigger event identifiers, animation names, and animation configuration parameters are configured for each process node in the initial process design information to obtain the target process design information. The target process design information is deployed to the game engine.
[0011] Optionally, the method further includes: Obtain the game logs generated during the operation of the target game; The abnormal information in the game log is extracted according to the abnormality detection algorithm. The abnormal information includes the timestamp of the abnormality, the process node to which the abnormality belongs, and the abnormality type. Based on the timestamp of the occurrence of the anomaly, the process node to which the anomaly belongs, and the anomaly type, anomaly cause information of the process node is generated, and the solution information corresponding to the anomaly cause information is determined by querying the pre-built solution information database. The error cause information and the solution information are output to the game engine's debugging interface.
[0012] Secondly, embodiments of this application provide a game flow optimization device, the device comprising: The first acquisition unit is used to acquire the first process state data generated by the target game during its operation. The generation unit is used to generate an initial adjustment instruction based on the first process status data; An adjustment unit is used to adjust the process operation parameters of the game engine based on the initial adjustment instructions; The second acquisition unit is used to acquire the second process status data generated by the target game running under the adjusted process running parameters; The correction unit is used to correct the initial adjustment instruction based on the difference information between the second process status data and the first process status data to obtain a correction instruction, and to correct the process operation parameters of the game engine based on the correction instruction.
[0013] Thirdly, embodiments of this application provide an electronic device, which includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the method described in the first aspect.
[0014] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the method described in the first aspect.
[0015] In this embodiment of the application, an initial adjustment instruction is generated based on the first process state data generated by the target game during its operation. The process operation parameters of the game engine are adjusted based on the generated initial adjustment instruction so that the target game runs under the adjusted process operation parameters. The second process state data generated during the operation is also obtained. Based on the difference information between the second process state data and the first process state data, the generated initial adjustment instruction is corrected to obtain a correction instruction. The process operation parameters of the game engine are then corrected based on the correction instruction.
[0016] By automatically adjusting the game engine's process parameters, the target game runs under the adjusted parameters. Based on the differences in process status data generated by the target game during operation before and after the adjustment, the game engine's process parameters are automatically corrected, thereby efficiently correcting the target game's operation process and improving process optimization efficiency. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of a game flow optimization scenario in related technologies; Figure 2 This is a flowchart illustrating a game flow optimization method according to an embodiment of this application; Figure 3 A flowchart illustrating a specific implementation process for generating initial adjustment instructions, provided in an embodiment of this application; Figure 4 A flowchart illustrating a specific implementation process for adjusting process operating parameters provided in this application embodiment; Figure 5 A flowchart illustrating a specific implementation process for obtaining a modification instruction, provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a game flow optimization device according to an embodiment of this application; Figure 7 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0019] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0020] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0021] The game flow optimization method, apparatus, electronic device, and readable storage medium provided in this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.
[0022] Please see Figure 1 First, we will introduce an example of a game flow optimization scenario in the relevant technology: like Figure 1 As shown, Figure 1This is a schematic diagram of a game flow optimization scenario in related technologies. In game engine development (the game engine referred to in this application embodiment can be an open-source, free, lightweight, high-performance cross-platform digital content development solution, whose core goal can be to provide developers with an efficient and easy-to-use toolchain for creating 2D and 3D games and interactive applications), flow control is a common technique used to manage game logic and improve development efficiency. Current flow control methods, such as using state machines, behavior trees, or custom scripts, play an important role in game development. These flow control methods allow developers to decompose game logic into a series of ordered steps and define the transition conditions between steps.
[0023] However, current process-based control methods still have limitations in some aspects. For example, the initial game flow designed based on current process-based control methods may encounter certain flow problems during actual game operation. These problems might include specific events failing to trigger successfully due to game logic errors, abnormal triggering frequency of specific events, or abnormal frame drops and stuttering during game execution. To solve these problems, the initial game flow needs to be optimized. However, optimizing game flows based on game engines often requires a lot of manual intervention. For example, when frame drops and stuttering occur, optimization often relies on the developer's personal experience to guess the location of the frame rate bottleneck, then manually adjust parameters, and repeatedly compile and run to verify, resulting in relatively low efficiency in process optimization.
[0024] It is worth noting that the above description of game flow optimization scenarios in related technologies is only an illustrative example. In actual applications, other types of game flow optimization scenarios may exist, and no specific limitations are made for them.
[0025] To address the aforementioned issues, this application provides a game flow optimization method that can efficiently modify the target game's execution flow and improve optimization efficiency. For example... Figure 2 As shown, Figure 2 This is a flowchart illustrating a game flow optimization method according to an embodiment of this application. The method includes the following steps: S201. Obtain the first process state data generated during the operation of the target game, and generate initial adjustment instructions based on the first process state data.
[0026] The target game can refer to a game project instance developed based on a game engine (such as the Cocos engine). Taking the Cocos engine as an example, it can be a software application built in the Cocos Creator editor and executed in the Cocos runtime environment. It can contain complete game resources (such as scenes, animations, scripts, UI, etc.) and logical processes (such as character control, level progression, event response, etc.).
[0027] The first process state data can refer to a multi-dimensional runtime dataset used to characterize the health of the current process execution, collected through the built-in interfaces and event tracking modules of the game engine (such as the Cocos engine) during the operation of the target game. In some embodiments, the first process state data can refer to game performance data and player experience data. Game performance data includes frame rate data, memory usage and / or CPU usage within a unit time window, and player experience data includes player operation interruption rate and / or level retry count within the same unit time window.
[0028] Initial adjustment instructions can refer to the set of action instructions generated by an AI decision module (such as a reinforcement learning policy network) to change the process operation parameters of the game engine. It is the first round of decision output for process optimization actions and will be verified and corrected in subsequent steps.
[0029] Optionally, the method of obtaining the first process state data generated by the target game during its operation may include: in the lifecycle hook of the tick callback of the main loop of the target game's corresponding game engine (such as the Cocos engine), start the collection task according to a preset unit time window (e.g., every 5 seconds) to collect the first process state data generated by the target game during its operation.
[0030] In some embodiments, taking the first process state data as including game performance data and player experience data as an example, the game performance data includes frame rate data, memory usage rate, and / or CPU usage rate within a unit time window, and the player experience data includes the player operation interruption rate and / or level retry count within the same unit time window. In other embodiments, when the first process state data includes the aforementioned frame rate data, memory usage rate, CPU usage rate, player operation interruption rate, and level retry count, the method of starting a collection task according to a preset unit time window to collect the first process state data generated by the target game during operation may include: The game engine's built-in frame rate acquisition interface records frame rate data in real time within a unit time window. Simultaneously, it calls the relevant memory data statistics interface to obtain memory usage and uses platform native APIs (such as the performance object on the web or the system interface on the native side) to collect CPU usage. Using pre-installed embedded scripts on the scene root node and key UI interaction buttons, the corresponding counters are incremented when the player triggers an exit event, a forced close event, and / or a level reload event. At the end of the unit time window, the ratio of the number of exits to the total number of starts is calculated as the operation interruption rate, and the average of the number of level reloads and the number of level entries is accumulated as the number of level retries.
[0031] In one embodiment, a specific implementation process for generating initial adjustment instructions based on first process state data is described. Please refer to [reference needed]. Figure 3 , Figure 3 This is a flowchart illustrating a specific implementation process for generating initial adjustment instructions, as provided in an embodiment of this application. Figure 3 As shown, the specific implementation steps for generating the initial adjustment command are as follows: S2011. Normalize the game performance data and player experience data respectively to obtain the normalization result.
[0032] The first process status data includes game performance data and player experience data.
[0033] Game performance data can refer to frame rate, memory usage, and / or CPU usage within a unit time window.
[0034] Player experience data can refer to the player operation interruption rate and / or the number of level retryes within the same unit time window as game performance data.
[0035] A unit time window refers to a preset time interval of fixed duration, which can be used to limit the time range of data collection, so that process status data collected at different times are comparable in time.
[0036] Frame rate data can refer to the statistical characteristic value of the number of frames rendered per second in the main loop of the game engine within a unit time window. In some embodiments, frame rate data may include instantaneous frame rate fluctuation values (i.e., the difference between the maximum and minimum frame rate within a unit time window).
[0037] Memory utilization rate refers to the net increase in heap memory during the target game's operation within the aforementioned unit time window, rather than an absolute value. In some embodiments, heap memory utilization can be recorded at the start and end times of the unit time window, and the difference between the heap memory utilization at the start and end times can be calculated to obtain the heap memory increment value as the memory utilization rate. The reason for using the increment is that the absolute value is greatly affected by the total amount of game resources (different games are not comparable), while the increment value better reflects the memory allocation pressure within the current window, such as whether frequent object creation and failure to reclaim memory occur. If the increment value remains high, it may indicate risks such as memory leaks in the process.
[0038] CPU utilization rate refers to the peak CPU resource utilization rate of the target game process within the aforementioned unit time window (i.e., the highest value among all sampling points within the unit time window). It should be noted that the peak value is taken because the average CPU utilization rate may mask instantaneous computation peaks, while the peak value can accurately identify whether there are computationally intensive operations (such as complex physics calculations) in the process, which are often the direct cause of frame drops.
[0039] Player interruption rate refers to the ratio of the number of times a player actively quits or forcibly closes the target game within the aforementioned unit time window to the total number of game launches within the same unit time window. Player interruption rate can be used to quantify the degree of negative player experience.
[0040] The level retry count refers to the average number of times the same game level is reloaded by the player within the aforementioned time window. Level retry counts can be used to quantify whether there are bottlenecks in the game flow.
[0041] Normalization results refer to dimensionless data obtained by transforming the raw collected values of game performance data and player experience data into a uniform numerical range (such as [0, 1] or [-1, 1]) through a preset mapping function. Normalization results can eliminate the order-of-magnitude differences between different physical dimensions.
[0042] Optionally, the game performance data and player experience data can be normalized separately to obtain the normalization results. This can be done by extracting the game performance data and player experience data collected from the game engine at the end of each preset time window (e.g., 5 seconds), and then processing the game performance data and player experience data independently using the Min-Max Normalization method to obtain the normalization results.
[0043] In some embodiments, when game performance data includes frame rate, memory usage, and CPU usage within a unit time window, and player experience data includes player operation interruption rate and level retry count within the same unit time window as game performance data, the method of processing game performance data and player experience data independently using the Min-Max Normalization method can include: at the end of each preset unit time window (e.g., 5 seconds), the original five-dimensional data collected from the game engine, namely frame rate, memory usage, CPU usage, player operation interruption rate, and level retry count, are extracted respectively, and each dimension is processed independently using the Min-Max Normalization method. That is, the original value of each dimension is first subtracted from the preset minimum value of that dimension based on historical data statistics, and then divided by the difference between the preset maximum value and the preset minimum value of that dimension, thereby mapping the original values of each dimension to a unified [0,1] value range to obtain five dimensionless normalized values. This process eliminates the order-of-magnitude differences between different physical dimensions.
[0044] S2012. Perform vector concatenation on the normalization result to obtain the vector concatenation result.
[0045] The vector concatenation result refers to a multidimensional numerical array (i.e., a vector) formed by combining five single values obtained after normalizing the data for the five dimensions mentioned above, according to a preset fixed dimensional order. The vector concatenation result can be used as the input feature vector for a reinforcement learning policy network.
[0046] Optionally, the normalization result can be vector concatenated to obtain the vector concatenation result. This can be done by arranging the data of each dimension in the normalization result in a preset fixed dimension order and combining them into a one-dimensional feature array with a fixed dimension. This array is the multi-dimensional joint state vector (i.e., the vector concatenation result).
[0047] In some embodiments, taking the five single values obtained after normalizing the data containing the above five dimensions as an example, the preset fixed dimension order may include: the first dimension is the normalized frame rate data, the second dimension is the normalized memory usage rate, the third dimension is the normalized CPU usage rate, the fourth dimension is the normalized player operation interruption rate, and the fifth dimension is the normalized level retry count. In other embodiments, the method of combining them into a one-dimensional feature array with a fixed dimension may include: arranging the above five normalized scalar values in the above fixed dimension order to form a one-dimensional feature array with a fixed dimension of 5, which is the five-dimensional joint state vector (i.e., the vector concatenation result).
[0048] S2013. Generate initial adjustment instructions based on vector concatenation results.
[0049] Optionally, the method for generating the initial adjustment instruction based on the vector concatenation result may include: passing the vector concatenation result as input data to a pre-trained reinforcement learning policy network, which generates two continuous action values in the range [-1,1] based on the input data through its multi-layer fully connected hidden layers, namely the first continuous action value and the second continuous action value; for the first continuous action value, it is linearly scaled by multiplying it by a preset rate adjustment upper limit (such as the maximum allowable adjustment multiplier) to obtain an animation playback speed adjustment coefficient with clear upper and lower limits; for the second continuous action value, it is determined by comparison which of the preset multiple continuous numerical intervals it falls into, and it is converted into the corresponding event trigger cycle level (one of multiple discrete levels); based on the animation playback speed adjustment coefficient and the event trigger cycle level, an initial adjustment instruction containing the animation speed adjustment coefficient (carried in the first sub-instruction) and the event trigger cycle level (carried in the second sub-instruction) is generated.
[0050] S202. Adjust the process operation parameters of the game engine based on the initial adjustment instructions, and obtain the second process state data generated by the target game running under the adjusted process operation parameters.
[0051] Among them, process execution parameters refer to adjustable configuration attributes in the game engine runtime environment that are directly related to the execution efficiency of the target game process. Changes in the values of the process execution parameters will directly affect the behavior and performance of core processes such as animation rendering and event response.
[0052] The second process status data refers to the multi-dimensional runtime dataset that is re-collected within the next unit time window after the initial adjustment command is issued to the game engine and takes effect. This dataset characterizes the health of the game process after the process execution parameters have been adjusted. The second process status data can serve as the basis for evaluating the adjustment effect and calculating correction commands.
[0053] In one embodiment, a specific implementation process for adjusting the game engine's process parameters based on initial adjustment instructions is described. Please refer to [reference needed]. Figure 4 , Figure 4 This is a flowchart illustrating a specific implementation process for adjusting process operating parameters, as provided in an embodiment of this application. Figure 4 As shown, the specific steps for adjusting the process running parameters are as follows: S2021. Determine the target flow animation playback speed based on the first sub-instruction, and control the animation manager to play the flow animation according to the target flow animation playback speed.
[0054] The game engine includes an animation manager and an event manager; the initial adjustment instructions include a first sub-instruction and a second sub-instruction; and the process running parameters include the process animation playback speed and the process event triggering frequency.
[0055] The first sub-instruction may refer to the action instruction in the initial adjustment instruction specifically used to adjust the playback speed of the animation flow. In some embodiments, the data carrier of the first sub-instruction may be a numerical parameter (i.e., the animation playback speed adjustment coefficient mentioned above).
[0056] An animation manager can refer to a system module in the underlying architecture of a game engine that is responsible for managing the loading, playback, pause, stop, and state switching of animation clips. In this embodiment of the application, it can serve as the execution carrier for animation playback speed adjustment instructions.
[0057] The playback speed of a flow animation can refer to the rate at which the playback progress of a flow animation clip proceeds per unit of time. Its value can be a specific instance of the animation playback speed adjustment coefficient, used to control the speed of the animation.
[0058] Flow animation refers to animated clips played under the control of an animation manager within the flow of a target game, used to represent visual feedback at key points in the game's progression. Flow animation is the concrete visual representation of changes in the game's state.
[0059] Optionally, the method for determining the target animation playback speed based on the first sub-instruction may include: after generating a first continuous action value in the range [-1,1] through the Tanh activation function in the output layer of the reinforcement learning policy network, multiplying the first continuous action value by a preset rate adjustment upper limit value and linearly scaling it to obtain an animation playback speed adjustment coefficient with upper and lower limits; then using the animation playback speed adjustment coefficient as the first sub-instruction, multiplying the original playback speed of the current animation by the adjustment coefficient, and the result is the target animation playback speed.
[0060] Optionally, the method of controlling the animation manager to play the flow animation according to the target flow animation playback speed may include: if the game engine also includes a unified component, and the unified component establishes a first data communication interface with the animation manager, the target flow animation playback speed is encapsulated into a speed attribute configuration item of the animation manager through the first data communication interface between the unified component and the animation manager, and the speed attribute configuration item is sent to the animation manager to control the animation manager to play the flow animation according to the sent speed attribute configuration item.
[0061] In this context, the unified component refers to a centralized process control component specifically built upon the component-based development architecture of a game engine. The unified component can serve as a data transfer and instruction distribution module between the AI decision-making module and the engine's underlying execution module.
[0062] The first data communication interface can refer to the pre-established data transfer channel between the unified component and the animation manager, which can be used to transfer the encapsulated speed attribute configuration items from the unified component to the animation manager.
[0063] The speed attribute configuration item refers to the configuration data unit generated by the unified component after encapsulating the playback speed of the target flow animation, which can be recognized and executed by the animation manager.
[0064] In some embodiments, the method of encapsulating the target flow animation playback speed into a speed attribute configuration item of the animation manager through the first data communication interface may include: the unified component encapsulates the target flow animation playback speed according to the speed attribute name (such as speed or playbackSpeed) exposed by the animation manager in its custom script update loop or through a dedicated configuration receiving method, and generates a key-value pair format configuration data containing attribute name and attribute value, i.e., speed attribute configuration item.
[0065] In some embodiments, the method of sending speed attribute configuration items to the animation manager to control the animation manager to play the flow animation according to the sent speed attribute configuration items may include: after the unified component of the game engine obtains the encapsulated speed attribute configuration items, it obtains the Animation component instance mounted on the current node; then, in the Animation component instance, it obtains the corresponding AnimationState object according to the animation state name of the current flow animation (such as the "death" state corresponding to the character's death animation); finally, it directly assigns the value in the speed attribute configuration items (i.e., the target flow animation playback speed) to the speed property of the AnimationState object; this assignment operation will take effect immediately, so that the animation manager will render and play the animation frames according to the target flow animation playback speed in the subsequent frame loop.
[0066] S2022. Determine the target process event triggering frequency based on the second sub-instruction, and control the event manager to trigger process events according to the target process event triggering frequency.
[0067] In this context, the event manager can refer to the core system module in the game engine's underlying architecture responsible for listening to, dispatching, and processing various events (such as user input events and game logic events). In this embodiment, the event manager can serve as the execution carrier for event triggering frequency adjustment instructions.
[0068] The second sub-instruction can refer to the action instruction in the initial adjustment instruction mentioned above that is specifically used to adjust the triggering frequency of process events. Its data carrier can be discrete gear parameters (i.e., event triggering cycle levels).
[0069] Process event triggering frequency can refer to the density of the number of process-related events that the event manager listens for and responds to per unit of time.
[0070] A process event can refer to a signal that is listened to and dispatched by the event manager in the process of the target game to drive process state transitions or trigger the execution of process nodes.
[0071] Optionally, the method for determining the target process event triggering frequency based on the second sub-instruction may include: after the second continuous action value in the interval [-1, 1] is generated by the Tanh activation function in the output layer of the above reinforcement learning policy network, the second continuous action value is compared with a number of preset continuous numerical intervals, such as three preset intervals [-1.0, -0.33), [-0.33, 0.33] and (0.33, 1.0], which correspond to three discrete levels: low, medium and high, respectively. The second continuous action value is converted into the corresponding event triggering cycle level (one of a number of discrete levels, such as 100ms, 200ms and 500ms) according to the interval into which it falls. The discrete level value corresponding to the event triggering cycle level is used as the target process event triggering frequency determined based on the second sub-instruction.
[0072] Optionally, the method of controlling the event manager to trigger process events according to the target process event triggering frequency may include: when the unified component of the game engine and the event manager have established a second data communication interface, the target process event triggering frequency is encapsulated into a frequency attribute configuration item of the event manager through the second data communication interface between the unified component and the event manager, and the frequency attribute configuration item is sent to the event manager to control the event manager to trigger process events according to the sent frequency attribute configuration item.
[0073] The second data communication interface can refer to the pre-established data transmission channel between the unified component and the event manager, which can be used to transmit the encapsulated frequency attribute configuration items from the unified component to the event manager.
[0074] The frequency attribute configuration item can refer to the configuration data unit generated by the unified component after encapsulating the trigger frequency of the target process event, which can be recognized and executed by the event manager.
[0075] In some embodiments, the method of encapsulating the target process event triggering frequency into a frequency attribute configuration item of the event manager through the second data communication interface may include: encapsulating the target process event triggering frequency according to the frequency attribute name (such as pollingInterval or eventCheckPeriod) exposed by the event manager through the second data communication interface between the unified component and the event manager, generating key-value pair format configuration data containing attribute name and attribute value, i.e., frequency attribute configuration item.
[0076] In some embodiments, the method of sending frequency attribute configuration items to the event manager to control the event manager to trigger process events according to the sent frequency attribute configuration items may include: the unified component obtains an event manager instance through the global event management interface of the game engine (such as the Cocos engine), or obtains an event listener instance mounted through a node path, and directly assigns the value in the frequency attribute configuration item to the public attribute field corresponding to the event manager instance. This assignment operation completes the sending of the frequency attribute configuration item; after the assignment takes effect, the interruption detection period of the event manager's internal timer is updated from the original value to the new value, and the event manager stops using the original process event triggering frequency and instead triggers process events according to the newly set target process event triggering frequency.
[0077] Optionally, the method for obtaining the second process state data generated by the target game running under the adjusted process parameters may include: after the speed attribute configuration item and the frequency attribute configuration item are respectively sent to the animation manager and the event manager, the next unit time window (whose duration can be the same as when collecting the first process state data, such as 5 seconds) is automatically triggered after the current unit time window ends naturally; within this new window (the next unit time window), data is collected in the same way as when collecting the first process state data to collect the second process state data generated by the target game running under the adjusted process parameters. In some embodiments, taking the second process state data including game performance data and player experience data as an example, and taking the game performance data including frame rate data, memory usage rate and CPU usage rate within the unit time window, and the player experience data including player operation interruption rate and level retry count within the same unit time window as an example, the collection task is started in the lifecycle hook of the tick callback in the main loop of the game engine (such as the Cocos engine) according to the new unit time window to collect the above frame rate data, memory usage rate, CPU usage rate, player operation interruption rate and level retry count.
[0078] S203. Based on the difference information between the second process state data and the first process state data, the initial adjustment instruction is corrected to obtain a correction instruction, and the process running parameters of the game engine are corrected based on the correction instruction.
[0079] Here, difference information refers to the quantified change obtained by comparing the second process state data with the first process state data on the same dimension. Difference information can be used to characterize the actual direction and magnitude of change in the health of the game process execution after the initial adjustment command is issued and takes effect.
[0080] The correction instruction can refer to the new set of action instructions that the reinforcement learning policy network regenerates in the next iteration after updating the weight parameters of the reinforcement learning policy network through gradient backpropagation based on the comprehensive reward value calculated based on the difference information, and is used to replace or fine-tune the initial adjustment instruction.
[0081] In one embodiment, a specific implementation process is described for correcting an initial adjustment instruction based on the difference information between the second process status data and the first process status data to obtain a corrected instruction. Please refer to [reference needed]. Figure 5 , Figure 5 This is a flowchart illustrating a specific implementation process for obtaining a modification instruction, as provided in an embodiment of this application. Figure 5 As shown, the specific implementation steps for obtaining the correction instruction are as follows: S2031. Determine the reward value based on the difference information between the second process status data and the first process status data.
[0082] The reward value can refer to a scalar value calculated based on the difference between the second process state data and the first process state data. The reward value can be used to quantitatively evaluate whether the actual effect of the initial adjustment command on the game process performance is positive (improvement) or negative (deterioration) and its degree. It can be a core feedback signal in reinforcement learning algorithms, directly driving the update direction and magnitude of the reinforcement learning policy network weights.
[0083] Optionally, the method for determining the reward value based on the difference information between the second process status data and the first process status data may include: calculating the difference between the second process status data and the first process status data on the same data dimension to obtain the change in each data dimension, and then weighting and summing the change in each data dimension according to a preset weight coefficient to calculate the reward value.
[0084] S2032. When the reward value is positive, the initial adjustment instruction is positively corrected to obtain a positive correction instruction.
[0085] A positive reward value means that the calculated reward value is greater than zero. A reward value greater than zero indicates that the initial adjustment command has a net positive effect on the performance of the game process. That is, the overall health of the process is improved after the adjustment compared to before the adjustment (such as more stable frame rate, reduced memory pressure, and reduced user operation interruption rate, etc., which are better than the deterioration effect).
[0086] A positive correction instruction can refer to a new set of action instructions generated by the updated reinforcement learning policy network after updating the weights of the network based on the gradient ascent direction when the reward value is positive. This new set of instructions maintains or further strengthens the initial adjustment instruction intent in the numerical direction. In some embodiments, a positive correction instruction can manifest as the animation playback speed adjustment coefficient and / or the event triggering frequency moving further in the same adjustment direction based on the initial value (e.g., if the initial value is acceleration, then further acceleration or maintaining the acceleration direction; if the initial value is a decrease in frequency, then further decrease or maintaining the decrease direction).
[0087] S2033. When the reward value is negative, the initial adjustment instruction is negatively corrected to obtain a negative correction instruction.
[0088] A negative reward value can mean that the calculated reward value is less than zero. A reward value less than zero indicates that the initial adjustment command had a net negative effect on the game process performance. That is, the overall process health deteriorated after the adjustment compared to before the adjustment (such as increased frame rate fluctuations, increased interruption rate, increased number of level retries, etc., the deterioration effect outweighed the improvement effect).
[0089] A negative correction instruction can refer to a new set of action instructions that reverses the initial adjustment instruction intent in the numerical direction, generated by the updated reinforcement learning policy network after updating the weights of the network based on the gradient descent direction when the reward value is negative. In some embodiments, a negative correction instruction can manifest as the animation playback speed adjustment coefficient and / or the event triggering frequency moving in the opposite direction from the initial value (e.g., if the initial value is acceleration, it is changed to deceleration or restoration to the default value; if the initial value is a decrease in triggering frequency, it is changed to an increase in triggering frequency or restoration to the default value).
[0090] Optionally, the method of modifying the game engine's process operation parameters based on the modification instructions may include: after the reinforcement learning policy network completes the weight parameter update based on the comprehensive reward value, the updated policy network re-infers and generates modification instructions, which are completely consistent with the initial adjustment instructions in terms of data format (i.e., the modification instructions include the modified first sub-instruction and the modified second sub-instruction); the modified process animation playback speed is determined based on the modified first sub-instruction, and the animation manager is controlled to play the process animation at the modified process animation playback speed; the modified process event triggering frequency is determined based on the modified second sub-instruction, and the event manager is controlled to trigger process events at the modified process event triggering frequency.
[0091] In some embodiments, before obtaining the first process state data generated by the target game during its operation, the game type information, game objective information, and historical user behavior data of the target game can be obtained; the initial process design information of the target game can be determined based on the game type information, game objective information, and historical user behavior data; the game resource information of the target game can be obtained, and the resource characteristics of the game resource information can be extracted; based on the resource characteristics, trigger event identifiers, animation names, and animation configuration parameters can be configured for each process node in the initial process design information to obtain the target process design information; and the target process design information can be deployed to the game engine.
[0092] Among them, game type information can refer to the category identifier to which the target game belongs, which is used to characterize the core gameplay features and interaction modes of the game.
[0093] Game objective information can refer to the specific functional or gameplay objectives that need to be achieved in the design of the game flow, and is used to describe "what this flow needs to accomplish".
[0094] Historical user behavior data refers to player operation records and interaction logs accumulated during the previous operation phase of the target game or during the operation of similar games, which are used to explore player behavior patterns and preferences.
[0095] The initial flow design information of the target game can refer to the baseline flow scheme that the developer pre-configures for the target game based on human experience or existing design.
[0096] The game resource information of the target game can refer to all reusable digital assets in the target game project, including visual resources, auditory resources, and interface resources, which is the basis for parameter recommendation.
[0097] Resource characteristics can refer to the tagged information extracted from the structured analysis of game resource information, which is used to identify resource attributes and usage methods.
[0098] A process node can refer to the smallest execution unit in a process design scheme. It represents a step or state that can be independently configured and triggered, and is a basic component of the process.
[0099] An event identifier can be a string name used to uniquely identify a triggering event. It is used to bind a process node to a specific trigger signal, so that the node is activated and executed when the corresponding event occurs.
[0100] An animation name can refer to a unique identifier string in the game engine's resource system for the animation clip bound to a flow node, which is used to indicate which animation the animation manager should play when the flow node is triggered.
[0101] Animation configuration parameters refer to a set of adjustable attributes used to control the animation playback behavior in process nodes, such as animation playback speed, loop mode, playback delay, transition effects, etc.
[0102] Optionally, the methods for obtaining game type information, game objective information, and historical user behavior data of the target game may include: for game type information, the game type information of the target game can be obtained from the game's startup entry point (such as the onLoad method) by loading a dedicated JSON or Excel configuration table; for game objective information, the game objective information can be read from the configuration table of the target game's project or static constants in the script, such as the process identifier corresponding to specific functional objectives such as "character death" or "opening the store interface"; for historical user behavior data, historical user behavior data can be obtained through client-side instrumentation and log reporting.
[0103] Optionally, the method for determining the initial process design information of the target game based on game type information, game objective information, and historical user behavior data may include: concatenating the game type information, game objective information, and historical user behavior data into the input sequence of the model; passing the concatenated input sequence to a pre-trained sequence generation model based on the Transformer architecture, which extracts semantic features and understands the context of the input sequence through an encoder, and then generates process optimization suggestions and process expansion schemes word by word or symbol by symbol through a decoder in an autoregressive manner, and then determines the initial process design information of the target game based on the generated process optimization suggestions and process expansion schemes.
[0104] Optionally, the methods for obtaining game resource information of the target game may include: in the game engine, by using a custom script or editor extension plugin mounted on the root node of the scene, using the engine's interface to traverse the project resource library, filtering all resources under the assets directory by type, and obtaining animation resources, sound effects resources, and UI interface resources respectively. The animation resources, sound effects resources, and UI interface resources constitute the game resource information of the target game.
[0105] Optionally, the methods for extracting resource features from game resource information may include: obtaining naming convention features by parsing the resource file paths and file names in the game resource information (such as identifying animations containing semantic keywords such as "Death" or "Open", and interfaces containing keywords such as "UI" or "Panel"); obtaining resource type identifiers by reading the constructor or getType methods in the game resource information; obtaining dependency relationship features by analyzing the reference relationships of game resource information in the scene or prefab; and finally integrating the naming convention features, resource type identifiers, and dependency relationship features into the resource features of each game resource information.
[0106] Optionally, based on resource features, trigger event identifiers, animation names, and animation configuration parameters are configured for each process node in the initial process design information. The method to obtain the target process design information may include: extracting each process node in the initial process design information one by one, performing cosine similarity matching between the extracted current node's functional description (such as "character death judgment" or "open store interface") and each resource feature to match the corresponding resource feature for each process node, and matching the corresponding trigger event identifier, animation name, and animation configuration parameters for each process node based on the corresponding resource feature. After the matching is completed, these matched configuration parameters are written into the corresponding process node attribute field of the unified component and saved as a process configuration file (such as JSON format) that conforms to the game engine's data structure. This obtains the target process design information and completes the automated parameter configuration from the initial process design information to the complete executable process.
[0107] Optionally, the deployment of the target process design information to the game engine can include: loading the target process design information into the game runtime memory through the game engine's resource loading interface; parsing the process node data (including node identifier, event identifier, animation name, animation configuration parameters, and connection relationships between nodes) from the target process design information in the game runtime memory; subsequently, writing the parsed process node data one by one into the process configuration attribute table of the unified component mounted on the game engine scene root node according to the node identifier; the unified component calling the game engine's event management interface to register a corresponding event manager for each process node according to the event identifier in the process node data, so that the event manager can activate the corresponding process node when it detects the corresponding event at runtime; at the same time, the unified component preloads the corresponding animation clip resources according to the animation name and animation configuration parameters in the process node data, and generates an animation state mapping table that the animation manager can recognize, so as to ensure that the animation manager can call the corresponding animation for playback in time when the process is triggered. At this point, the deployment of the target process design information is completed.
[0108] In some embodiments, game logs generated during the operation of the target game can be obtained; abnormal information in the game logs can be extracted according to the abnormality detection algorithm; abnormal cause information of the process node can be generated based on the timestamp of the abnormality, the process node to which the abnormality belongs, and the abnormality type; and the solution information corresponding to the abnormal cause information can be determined by querying the pre-built solution information library; and the abnormal cause information and solution information can be output to the debugging interface of the game engine.
[0109] Game logs refer to runtime information automatically generated by the game engine and business logic and recorded in chronological order during the operation of the target game. They can include error logs and warning logs.
[0110] Anomaly detection algorithms can refer to AI algorithms (such as isolated forests, autoencoders, or rule-based detection engines) used to automatically identify and extract abnormal patterns from game logs, and their output can be structured anomaly information.
[0111] Exception information can include the timestamp of the exception, the process node to which the exception belongs, and the exception type.
[0112] The timestamp of an anomaly can refer to the time point when the anomaly event is detected, which is used to locate the time location of the problem and reconstruct the context sequence.
[0113] Anomaly type can refer to the classification and identification of detected abnormal events according to their performance characteristics and causes (such as performance anomaly, logic anomaly, resource anomaly, user behavior anomaly, etc.).
[0114] Abnormal cause information can refer to the qualitative description and root cause analysis results of the cause of the abnormality output by the fault diagnosis model after comprehensive analysis of abnormal information.
[0115] A solution information database can refer to a pre-built structured knowledge database that stores the mapping relationship between anomaly types or causes and corresponding solutions, and is used to retrieve and recommend solutions based on anomaly cause information.
[0116] The debugging interface of a game engine can refer to the developer tool interface provided by the game engine (such as the console, profiler panel, or custom debugging UI), which can be used to display information on the cause of the exception and the solution information for developers to refer to.
[0117] Optionally, the methods for obtaining game logs generated during the operation of the target game may include: when the target game starts, initializing a global log collection module through the debugging system of the game engine (such as the Cocos engine): on the one hand, by rewriting or listening to the standard output interface of the game engine, automatically capturing all game logs output by the underlying layer of the game engine, including information such as resource loading, scene switching, and script execution exceptions.
[0118] Optionally, the method for extracting abnormal information from game logs based on anomaly detection algorithms may include: firstly, performing structured parsing of the game logs using anomaly detection algorithms, converting each unstructured text game log into a formatted data structure containing timestamps, log levels, log source modules, and specific message content through regular expressions and pattern matching in the anomaly detection algorithm; then, inputting the game log data converted into structured data structures into an anomaly detection model for hierarchical detection, so as to output abnormal information from the game logs through the anomaly detection model.
[0119] Optionally, the method for generating exception cause information for a process node based on the timestamp of the exception occurrence, the process node to which the exception belongs, and the exception type may include: First, retrieving the configuration status and context information of the process node before and after the timestamp of the exception occurrence from the process configuration attribute table of the unified component according to the identifier of the process node to which the exception belongs (e.g., the triggering conditions, expected execution logic, dependent resource list, and predecessor and successor node information of the node); then, using the timestamp of the exception occurrence as the anchor point, tracing back the game logs within a preset time window (e.g., 5 seconds before the exception), extracting all log entries related to the process node within the preset time window (e.g., node entry / exit logs, event trigger logs, resource loading logs, and performance sampling data), and then, based on the... All log entries related to the process node are used to establish a time-series context chain. Then, the exception type, configuration status, context information, key events in the time-series context chain (such as resource loading failure, event listener not triggered, frame rate drop, etc.) and performance data at the same timestamp (such as current frame rate, memory usage) are input into a pre-trained fault causal reasoning model for comprehensive diagnosis. This fault causal reasoning model identifies the most likely root cause from multiple potential causes through pattern matching and rule reasoning (e.g., if the exception type is "resource loading exception" and a resource loading failure log is matched in the context chain, it is inferred that "the animation resource has not been preloaded when the process starts, causing playback failure"), and outputs the diagnostic result, i.e., the exception cause information, based on the most likely root cause.
[0120] Optionally, the method of querying and determining the solution information corresponding to the anomaly cause information in the pre-built solution information database may include: using the anomaly cause information as the query condition, constructing a multi-dimensional query vector containing root cause description keywords (such as "resource loading failure"), anomaly type tags (such as "resource anomaly"), and related process node identifiers; inputting the query vector into the pre-built solution information database to perform a matching retrieval, so as to match the query results with a similarity greater than or equal to a preset threshold, and using them as the solution information corresponding to the anomaly cause information.
[0121] Optionally, the method for outputting the exception cause information and solution information to the game engine's debugging interface may include: after obtaining the exception cause information and the corresponding solution information, firstly encapsulating the exception cause information and solution information into a debug message object according to a unified data structure. The debug message object includes the timestamp of the exception occurrence, the name of the process node to which the exception belongs, the exception type, the root cause description text, the solution description text, and the severity label (such as "high / medium / low"); then outputting the encapsulated debug message object to the debugging interface through the game engine's debug output interface.
[0122] In this embodiment of the application, an initial adjustment instruction is generated based on the first process state data generated by the target game during its operation. The process operation parameters of the game engine are adjusted based on the generated initial adjustment instruction so that the target game runs under the adjusted process operation parameters. The second process state data generated during the operation is also obtained. Based on the difference information between the second process state data and the first process state data, the generated initial adjustment instruction is corrected to obtain a correction instruction. The process operation parameters of the game engine are then corrected based on the correction instruction.
[0123] By automatically adjusting the game engine's process parameters, the target game runs under the adjusted parameters. Based on the differences in process status data generated by the target game during operation before and after the adjustment, the game engine's process parameters are automatically corrected, thereby efficiently correcting the target game's operation process and improving process optimization efficiency.
[0124] Corresponding to the above method embodiments, this application also provides a game flow optimization device, such as... Figure 6 As shown, Figure 6 This is a schematic diagram of a game flow optimization device according to an embodiment of this application. The device includes: The first acquisition unit 601 is used to acquire the first process state data generated by the target game during its operation. Generation unit 602 is used to generate initial adjustment instructions based on the first process status data; Adjustment unit 603 is used to adjust the process operation parameters of the game engine based on the initial adjustment instructions; The second acquisition unit 604 is used to acquire the second process status data generated by the target game running under the adjusted process running parameters; The correction unit 605 is used to correct the initial adjustment instruction based on the difference information between the second process state data and the first process state data to obtain a correction instruction, and to correct the process running parameters of the game engine based on the correction instruction.
[0125] Optionally, the game engine includes an animation manager and an event manager; the initial adjustment instructions include a first sub-instruction and a second sub-instruction; the process running parameters include the process animation playback speed and the process event triggering frequency; the adjustment unit 603 is specifically used to determine the target process animation playback speed based on the first sub-instruction, and control the animation manager to play the process animation according to the target process animation playback speed; and to determine the target process event triggering frequency based on the second sub-instruction, and control the event manager to trigger process events according to the target process event triggering frequency.
[0126] Optionally, the game engine also includes a unified component, which establishes a first data communication interface with the animation manager and a second data communication interface with the event manager. The adjustment unit 603 is specifically used to encapsulate the target flow animation playback speed into a speed attribute configuration item of the animation manager through the first data communication interface, and send the speed attribute configuration item to the animation manager to control the animation manager to play the flow animation according to the sent speed attribute configuration item; and to encapsulate the target flow event trigger frequency into a frequency attribute configuration item of the event manager through the second data communication interface, and send the frequency attribute configuration item to the event manager to control the event manager to trigger flow events according to the sent frequency attribute configuration item.
[0127] Optionally, the first process state data includes game performance data and player experience data; the game performance data includes frame rate data, memory usage rate, and / or CPU usage rate within a unit time window; the player experience data includes player operation interruption rate and / or level retry count within the same unit time window; the generation unit 602 is specifically used to normalize the game performance data and player experience data respectively to obtain normalization results; to perform vector concatenation on the normalization results to obtain vector concatenation results; and to generate initial adjustment instructions based on the vector concatenation results.
[0128] Optionally, the correction unit 605 is specifically used to determine the reward value based on the difference information between the second process status data and the first process status data; when the reward value is positive, the initial adjustment instruction is positively corrected to obtain a positive correction instruction; when the reward value is negative, the initial adjustment instruction is negatively corrected to obtain a negative correction instruction.
[0129] Optionally, the device also includes: The third acquisition unit is used to acquire information about the target game's game type, game objectives, and historical user behavior data. The determination unit is used to determine the initial process design information of the target game based on game type information, game objective information, and historical user behavior data. The first extraction unit is used to acquire game resource information of the target game and extract the resource features of the game resource information; The configuration unit is used to configure trigger event identifiers, animation names, and animation configuration parameters for each process node in the initial process design information based on resource characteristics, so as to obtain the target process design information. The deployment unit is used to deploy the target process design information to the game engine.
[0130] Optionally, the device also includes: The fourth acquisition unit is used to acquire game logs generated by the target game during its operation; The second extraction unit is used to extract abnormal information from the game log according to the abnormality detection algorithm. The abnormal information includes the timestamp of the abnormality, the process node to which the abnormality belongs, and the type of abnormality. The query unit is used to generate the cause information of the process node based on the timestamp of the exception, the process node to which the exception belongs, and the exception type, and to query the solution information corresponding to the cause information of the exception in the pre-built solution information database. The output unit is used to output information about the cause of the error and the solution to the game engine's debugging interface.
[0131] like Figure 7 As shown, this application embodiment also provides an electronic device, including a processor 701, a memory 702, and a program or instructions stored in the memory 702 and executable on the processor 701. When the program or instructions are executed by the processor 701, they implement the various processes of the above-described game flow optimization method embodiment and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0132] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described game flow optimization method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0133] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0134] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0135] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0136] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
[0137] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the claims.
Claims
1. A method for optimizing game flow, characterized in that, include: Acquire the first process state data generated by the target game during its operation, and generate initial adjustment instructions based on the first process state data; The game engine's process operation parameters are adjusted based on the initial adjustment instructions, and the second process state data generated by the target game running under the adjusted process operation parameters is obtained. Based on the difference information between the second process status data and the first process status data, the initial adjustment instruction is corrected to obtain a correction instruction, and the process operation parameters of the game engine are corrected based on the correction instruction.
2. The method according to claim 1, characterized in that, The game engine includes an animation manager and an event manager; the initial adjustment command includes a first sub-command and a second sub-command; the process running parameters include the process animation playback speed and the process event triggering frequency. The adjustment of the game engine's process operation parameters based on the initial adjustment instructions includes: The target animation playback speed is determined based on the first sub-instruction, and the animation manager is controlled to play the animation at the target animation playback speed. The target process event triggering frequency is determined based on the second sub-instruction, and the event manager is controlled to trigger process events according to the target process event triggering frequency.
3. The method according to claim 2, characterized in that, The game engine also includes a unified component, which establishes a first data communication interface with the animation manager and a second data communication interface with the event manager; The control of the animation manager to play the process animation according to the target process animation playback speed includes: Through the first data communication interface, the target process animation playback speed is encapsulated into a speed attribute configuration item of the animation manager, and the speed attribute configuration item is sent to the animation manager to control the animation manager to play the process animation according to the sent speed attribute configuration item; The target process event triggering frequency is encapsulated into a frequency attribute configuration item of the event manager through the second data communication interface, and the frequency attribute configuration item is sent to the event manager to control the event manager to trigger process events according to the sent frequency attribute configuration item.
4. The method according to claim 1, characterized in that, The first process status data includes game performance data and player experience data; the game performance data includes frame rate data, memory usage rate and / or CPU usage rate within a unit time window; the player experience data includes player operation interruption rate and / or level retry count within the same unit time window; The step of generating the initial adjustment instruction based on the first process status data includes: The game performance data and the player experience data are normalized respectively to obtain the normalization result; The normalization result is then concatenated into vectors to obtain the concatenated vector result. An initial adjustment instruction is generated based on the vector concatenation result.
5. The method according to claim 1, characterized in that, The step of correcting the initial adjustment instruction based on the difference information between the second process status data and the first process status data to obtain a correction instruction includes: The reward value is determined based on the difference between the second process status data and the first process status data. If the reward value is positive, the initial adjustment instruction is positively corrected to obtain a positive correction instruction; If the reward value is negative, the initial adjustment instruction is negatively corrected to obtain a negative correction instruction.
6. The method according to claim 1, characterized in that, Before acquiring the first flow state data generated by the target game during its operation, the method further includes: Obtain information about the target game's genre, game objectives, and historical user behavior data; The initial process design information of the target game is determined based on the game type information, the game objective information, and the historical user behavior data; Obtain the game resource information of the target game and extract the resource features of the game resource information; Based on the resource characteristics, trigger event identifiers, animation names, and animation configuration parameters are configured for each process node in the initial process design information to obtain the target process design information. The target process design information is deployed to the game engine.
7. The method according to claim 1, characterized in that, The method further includes: Obtain the game logs generated during the operation of the target game; The abnormal information in the game log is extracted according to the abnormality detection algorithm. The abnormal information includes the timestamp of the abnormality, the process node to which the abnormality belongs, and the abnormality type. Based on the timestamp of the occurrence of the anomaly, the process node to which the anomaly belongs, and the anomaly type, anomaly cause information of the process node is generated, and the solution information corresponding to the anomaly cause information is determined by querying the pre-built solution information database. The error cause information and the solution information are output to the game engine's debugging interface.
8. A game flow optimization device, characterized in that, The device includes: The first acquisition unit is used to acquire the first process state data generated by the target game during its operation. The generation unit is used to generate an initial adjustment instruction based on the first process status data; An adjustment unit is used to adjust the process operation parameters of the game engine based on the initial adjustment instructions; The second acquisition unit is used to acquire the second process status data generated by the target game running under the adjusted process running parameters; The correction unit is used to correct the initial adjustment instruction based on the difference information between the second process status data and the first process status data to obtain a correction instruction, and to correct the process operation parameters of the game engine based on the correction instruction.
9. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the game flow optimization method as described in any one of claims 1-7.
10. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the game flow optimization method as described in any one of claims 1-7.
