Game automation script generation method, terminal and computer storage medium

By generating and replacing the database information, function signatures, and coordinates of game scripts, and combining dependency and permission analysis, the problems of high development cost and insufficient stability of game automation scripts are solved, and efficient and stable script generation is achieved.

CN122086758APending Publication Date: 2026-05-26FUJIAN TQ DIGITAL
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
FUJIAN TQ DIGITAL
Filing Date
2025-12-31
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In existing technologies, the development cost of game automation scripts is high and the quality and stability of the scripts are insufficient. In particular, compatibility errors occur frequently when the game version is iterated, which leads to increased development time and increased testing risks.

Method used

The system generates an initial script by receiving game use case descriptions and requirement prompts, performs database information processing, expired function signature replacement, and coordinate replacement, and combines dependency analysis, permission analysis, and simulation performance analysis to generate structured opinions. The initial script is then differentially rewritten to generate an automated game script.

Benefits of technology

It significantly reduces the development cost of game automation scripts, improves script quality and stability, reduces compatibility errors, and enhances script security and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122086758A_ABST
    Figure CN122086758A_ABST
Patent Text Reader

Abstract

The invention discloses a game automation script generation method, a terminal and a computer storage medium, and the method comprises the steps: generating an original script according to a received game use case description and a game demand cue word; performing database game information replacement, expired function signature replacement and coordinate replacement on the original script, and outputting the initial script; simulating the initial script, performing dependency analysis and game permission analysis on the initial script, performing performance analysis on a simulation result, and generating a structured opinion in combination with an analysis result; and rewriting the initial script according to the structured opinion difference to generate a game automation script. In this way, the original script is intelligently generated, the original script is replaced to obtain the initial script, differential optimization is conducted on the initial script to obtain the game automation script, the development cost of the game automation script is remarkably reduced, and the script quality and stability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of script generation technology, and in particular to a method for generating game automation scripts, a terminal, and a computer storage medium. Background Technology

[0002] In massively multiplayer online games (MMOs) and continuously updated single-player games, development teams typically need to write and maintain a large number of automated scripts, covering installation, login, level traversal, economic system verification, packaging and release, and more. The core tasks of these scripts are to simulate player behavior, verify game logic, and conduct data-driven testing. However, the workload of script generation often increases exponentially with game version iterations, leading to a sharp increase in development costs and maintenance time.

[0003] In recent years, Large Language Models (LLMs) have been used to quickly generate scripts, significantly shortening the original coding cycle. However, in practical applications, scripts generated by LLMs often suffer from compatibility errors due to data updates. These incompatibility issues lead to script failures, crashes, and data corruption, wasting a significant amount of time on manual review and introducing unforeseen risks to game launch and testing processes. Summary of the Invention

[0004] The technical problem to be solved by the present invention is to provide a method for generating game automation scripts, a terminal and a computer storage medium, which can reduce the development cost of game automation scripts while improving script quality and stability.

[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for generating game automation scripts, comprising the following steps: Generate the original script based on the received game use case description and game requirement prompts; The original script is modified by replacing the game information in the database, replacing expired function signatures, and replacing coordinates, and the initial script is output. The initial script is simulated, and dependency analysis and game permission analysis are performed on the initial script. Performance analysis is performed on the simulation results, and structured opinions are generated based on the analysis results. The initial script is rewritten based on the structured opinion differential to generate a game automation script.

[0006] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: A terminal for generating game automation scripts includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the various steps of the above-described method for generating game automation scripts.

[0007] To solve the above-mentioned technical problems, another technical solution adopted by the present invention is as follows: A computer storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described method for generating an automated game script.

[0008] The beneficial effects of this invention are as follows: Based on the received game use case description and game requirement prompts, a raw script is generated; the raw script undergoes database game information replacement, expired function signature replacement, and coordinate replacement to output an initial script; dependency analysis and game permission analysis are performed on the initial script, the initial script is simulated, performance analysis is conducted on the simulation results, and structured opinions are generated based on the analysis results; the initial script is differentially rewritten based on the structured opinions to generate a game automation script. In this way, by intelligently generating the raw script, replacing the raw script to obtain the initial script, and differentially optimizing the initial script to obtain the game automation script, the development cost of game automation scripts is significantly reduced, and the script quality and stability are improved. Attached Figure Description

[0009] Figure 1 This is a flowchart illustrating a method for generating game automation scripts according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a game automation script generation terminal according to an embodiment of the present invention; Figure 3 This is a flowchart illustrating the specific steps of the game automation script generation method according to an embodiment of the present invention.

[0010] Label Explanation: 1. A terminal for generating game automation scripts; 2. A memory; 3. A processor. Detailed Implementation

[0011] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.

[0012] Before detailing the embodiments of this application, some related concepts will first be explained: (1) Expired function signature: This refers to a function whose interface (including parameter list, return type, and naming) has changed due to a version upgrade. If an older version of the script still calls a function with the old signature, it will throw an error at runtime. Such changes are called "expired" and must be replaced with a new signature through version mapping or automatic replacement.

[0013] (2) UI coordinates: refers to the position and size of user interface elements (buttons, text boxes, images, etc.) relative to the screen or parent container, usually expressed in pixels or proportions. Due to differences in resolution, scaling, and multilingual localization, UI coordinates may drift on different devices or versions.

[0014] (3) Isolated Environment: This is a setup where game scripts are executed in a sandbox or container that is completely isolated from the actual production server. The isolated environment can simulate the database, economic system, network, and UI, and has restricted external access. It is mainly used for security testing, permission verification, and performance evaluation. By running scripts in the isolated environment, the script's access behavior to external resources can be monitored and recorded without affecting the real data.

[0015] In existing technologies, automated scripts are widely used in current game development and operation processes for tasks such as installation, login, level traversal, economic system verification, and cross-platform testing. Traditionally, developers manually write scripts, which are then manually reviewed by a quality audit team to ensure consistency with the game server, engine version, and UI layout. However, with the increasing frequency of game content updates, the complexity of server architectures, and the implementation of multi-resolution and cross-language localization, the cost of manually modifying scripts has risen rapidly. Large Language Models (LLMs) have been introduced to quickly generate scripts, but the output script information often does not match partition SQL, API signatures, or UI coordinates, causing the scripts to fail in actual server environments. Furthermore, the lack of standardized security reviews and performance evaluations for scripts has significantly reduced their reliability. This current technological situation necessitates a solution for high-frequency iterative game projects that can automatically identify volatile segments, uniformly replace them, and implement a multi-level closed-loop review process to reduce script development costs and improve quality and stability.

[0016] To at least solve the above problems, please refer to Figure 1 This invention provides a method for generating game automation scripts, including the following steps: Generate the original script based on the received game use case description and game requirement prompts; The original script is modified by replacing the game information in the database, replacing expired function signatures, and replacing coordinates, and the initial script is output. Dependency analysis and game permission analysis are performed on the initial script, the initial script is simulated, performance analysis is performed on the simulation results, and structured opinions are generated based on the analysis results. The initial script is rewritten based on the structured opinion differential to generate a game automation script.

[0017] As described above, the beneficial effects of this invention are as follows: Based on the received game use case description and game requirement prompts, a raw script is generated; the raw script undergoes database game information replacement, expired function signature replacement, and coordinate replacement to output an initial script; dependency analysis and game permission analysis are performed on the initial script, the initial script is simulated, performance analysis is conducted on the simulation results, and structured opinions are generated based on the analysis results; the initial script is differentially rewritten based on the structured opinions to generate a game automation script. In this way, by intelligently generating the raw script, replacing the raw script to obtain the initial script, and differentially optimizing the initial script to obtain the game automation script, the development cost of the game automation script is significantly reduced, and the script quality and stability are improved.

[0018] Furthermore, the original script is sequentially subjected to database game information replacement, expired function signature replacement, and game coordinate replacement, including: Modify the table prefix and database key name partitioning rules of the database instructions in the original script based on the obtained game server configuration data; Replace the expired function signatures in the original script with a predefined game engine interface mapping table; Based on the obtained device information, the corresponding UI coordinate data is matched from the preset multi-resolution UI resource repository, and the coordinate data in the original script is replaced with the UI coordinate data.

[0019] As described above, by reading the server configuration, game engine interface mapping table, and UI resource repository, the table prefix, function signature, and coordinates in the script can be replaced in a forward manner. This method can save the cost of manual rewriting and reduce the replacement error rate.

[0020] Furthermore, the initial script is simulated, which includes the following steps prior to the simulation: The initial script is subjected to syntax checks and interface compliance verification.

[0021] As described above, by performing syntax tree parsing and interface signature matching on the script for verification, syntax errors and non-compliant interfaces can be detected before simulation, thus avoiding the waste of simulation resources.

[0022] Furthermore, dependency analysis and game permission analysis are performed on the initial script, including: Extract the game operation sequence from the initial script, compare the game operation sequence with the preset game level dependency graph, and obtain the dependency analysis results; The initial script is run in an isolated environment to monitor database access operations during the process. The access operations are detected according to preset access permissions to obtain game permission analysis results.

[0023] As described above, the script is converted into an operation sequence and compared with the preset level dependency graph. Furthermore, access is monitored in an isolated sandbox, and permission checks are performed on access operations. In this way, the logical order of the script is ensured to be consistent with the game level dependencies, and database access is restricted to legal permissions, thereby improving game security.

[0024] Furthermore, performance analysis is performed on the simulation results, including: The execution time of each frame in the simulation is obtained, and the frames that exceed the time threshold are identified and the corresponding code lines of the initial script are located.

[0025] As described above, the simulation collects the time taken for each frame, associates frames that exceed the threshold with the source code line, and directly locates the code line that causes the frame rate drop, optimizes the rendering bottleneck in advance, and ensures the player experience.

[0026] Furthermore, structured opinions are generated based on the analysis results, including: Structured opinions are generated by combining the dependency analysis results, the game permission analysis results, and the code lines of the initial script corresponding to frames that exceed the time threshold; The initial script is rewritten based on the structured opinion difference to generate a game automation script, including: Locate the lines of code in the initial scripts corresponding to the dependency analysis results and the game permission analysis results; Based on the located code line and the code line of the initial script corresponding to the frame that exceeds the time threshold, the context of each code line is captured; Create a search block for the code modification template for each line of code and its context, and create a replacement block for the code modification template based on the analysis results or timeout conditions corresponding to each line of code. The initial script is modified by using the search and replace blocks of the code modification template to obtain the game automation script.

[0027] As described above, by selecting the code lines and their contexts corresponding to each content in the structured opinions, and then generating corresponding search and replacement modules for each code line based on the structured opinions, it can be ensured that only problematic code is modified, thus correcting errors while maintaining the original script's structure and comments.

[0028] Further, generate game automation scripts, which then include: The game automation script is simulated, and the matching degree between the simulated behavior and the expected game behavior is compared. Check the compliance of the game automation scripts; The performance compliance is calculated based on the frame time of the game automation script during the simulation process; The score of the game automation script is calculated by combining the matching degree, the compliance degree, and the performance compliance degree; If the score of the game automation script is lower than the score threshold, the steps of replacing the game information in the database, replacing the expired function signature, and replacing the coordinates of the original script are re-executed.

[0029] As described above, the matching degree, compliance degree, and performance compliance degree are first calculated in the simulation, and then a score is obtained using a product formula. The score is compared with a threshold to determine whether a retry is necessary. In this way, the script can automatically return to the replacement stage by triggering a low-scoring script, thus achieving a self-optimization process.

[0030] Furthermore, re-executing the steps of replacing the game information in the database, replacing the expired function signature, and replacing the coordinates of the original script also includes: Set the maximum number of retries for re-executing the step; The formula for calculating the maximum number of retries, MaxRetry, is as follows: MaxRetry = ceil( log(1 - P_target) / log(1 - Score_avg) ) In the formula, Score_avg represents the average score of the two most recent simulations of the game automation script, P_target represents the expected pass rate, and ceil is the round-up function.

[0031] As described above, giving the maximum number of attempts when returning to the replacement phase ensures both the target success rate and prevents resource waste caused by infinite loops.

[0032] The method for generating game automation scripts, the terminal, and the computer storage medium described above in this invention are further illustrated below through specific embodiments: Please refer to Figure 1 One embodiment of the present invention is as follows: A method for generating game automation scripts, comprising the following steps: Step 1: Generate the original script based on the received game use case description and game requirement prompts.

[0033] Please refer to Figure 3 In this embodiment, an input layer is configured to receive the game use case description and game requirement prompt input by the user, and generate the original script S0 in the M1 module of the input layer.

[0034] Step 2: Replace the game information in the database, replace the expired function signature, and replace the coordinates in the original script, and output the initial script.

[0035] Specifically, the table prefix and database key name partitioning rules of the database instructions in the original script are modified according to the obtained game server configuration data; the expired function signatures in the original script are replaced according to the predefined game engine interface mapping table; the corresponding UI coordinate data is matched from the preset multi-resolution UI resource warehouse according to the obtained device information, and the coordinate data in the original script is replaced with UI coordinate data; and then the initial script is output.

[0036] Please refer to Figure 3 In this embodiment, a replacement processing layer is configured to execute the S110 script replacement pipeline step, specifically as follows: The M2-R_db server configuration replacement module dynamically modifies the table prefix in SQL commands based on the game server configuration, such as replacing "dev_" with "shard_%d", and dynamically modifies the Redis key name partitioning rules based on the game server configuration. The module replaces outdated function signatures by using the M2-R_fn function mapping, and replaces them with a predefined engine API version mapping table, such as replacing "v1.engine.getPos()" with "v2.engine.getPosition()". The M2-R_ui coordinate / XPath replacement module generates absolute coordinates or dynamic XPath expressions adapted to different devices based on a multi-resolution UI resource repository, which are then used to replace the original coordinate information. The initial script S1 is output by segmented replacement.

[0037] Step 3: Perform dependency analysis and game permission analysis on the initial script, simulate the initial script, perform performance analysis on the simulation results, and generate structured opinions based on the analysis results.

[0038] Step 31: Perform syntax checks and interface compliance verification on the initial script, and then simulate the initial script.

[0039] Please refer to Figure 3 In this embodiment, a quality verification layer is configured, which performs verification based on the M3 correction proxy module. The specific verification steps include: syntax verification through static analysis, compliance verification based on the API interface whitelist, and script simulation execution and sandbox testing. After all verifications pass, the S120 script pre-release step is executed.

[0040] Please refer to Figure 3 In this embodiment, an expert review layer is configured, and the script that passes the verification is sent to the M4 expert review module in the expert review layer. The specific review steps include steps 32 to 35.

[0041] Step 32: Extract the game operation sequence from the initial script, compare the game operation sequence with the preset game level dependency graph, and obtain the dependency analysis results.

[0042] The game level dependency graph, in JSON format, stores the level triggering order rules. Specifically, syntax parsing technology is used to convert script S1 into a structured representation (such as an abstract syntax tree), and key operation sequences (such as level ID execution order and event triggering chains) are extracted. These operation sequences are compared and verified against the level dependency graph. When an abnormal operation jump is detected (such as level 102 → level 105), a LevelJumpError record is generated. Example output: {"type": "LevelJumpError", "line": 45, "detail": "Level ID 102→105 violates dependency graph rules"}.

[0043] This method verifies whether the script logic conforms to the process rules set by the game designers.

[0044] Step 33: Run the initial script in the isolated environment, monitor the database access operations during the operation, detect the access operations according to the preset access permissions, and obtain the game permission analysis results.

[0045] The preset access permissions include economic system permission configurations (such as RBAC model permission tables). Specifically, script S1 (such as a containerized sandbox) runs in an isolated environment to monitor all access operations to the database and economic system. It detects high-risk commands based on permission configurations (such as directly modifying coin values ​​via SQL). When an unauthorized operation is detected, a GMCallRisk record is generated. Example output: {"type": "GMCallRisk", "line": 67, "detail": "Disabled command #ADD_GOLD detected"}.

[0046] This method can help identify unauthorized high-risk operations.

[0047] Step 34: Obtain the execution time of each frame in the simulation, identify frames that exceed the time threshold, and locate the corresponding code line in the initial script.

[0048] Specifically, in the game engine simulation environment, script S1 is executed to monitor the execution time of each frame, identify frame times exceeding a threshold (e.g., >16ms), locate the lines of code causing performance bottlenecks, and output an example: {"type": "FrameDropRisk", "line": 89, "detail": "Rendering calls within a loop cause excessive frame latency"}.

[0049] This method helps identify code that may cause performance issues.

[0050] Step 35: Combine the dependency analysis results, the game permission analysis results, and the code lines of the initial script corresponding to frames exceeding the time threshold to generate structured opinions.

[0051] Specifically, the three types of test results are summarized and organized into a JSON array in a unified format. Each entry contains the type, row number, and detailed description. Example of final output: {"expert_notes": [ {"type": "LevelJumpError", "line": 45, "detail": "..."}, {"type": "GMCallRisk", "line": 67, "detail": "..."}, {"type": "FrameDropRisk", "line": 89, "detail": "..."}]} In this way, it can be designed specifically for the characteristics of game scripts (level sequence, economic system, performance requirements); the output structured opinions are logically compliant, secure and authorized, and have good performance. The machine-readable format facilitates subsequent automatic processing, and the detection results directly guide the correction process.

[0052] Please refer to Figure 3 If the review is approved, a structured opinion (i.e., a revision report Rep) is generated, and the M5 differential rewrite module is executed, i.e., step 4 is executed; otherwise, the process returns to step M3.

[0053] Step 4: Rewrite the initial script based on the structured opinion difference to generate the game automation script.

[0054] Step 41: Locate the code line of the initial script corresponding to the dependency analysis result and the game permission analysis result. Specifically, parse each comment in Rep, extract the type and line number, and locate the specific code line in S1.

[0055] Step 42: Based on the located code lines and the code lines in the initial script corresponding to frames exceeding the time threshold, capture the context of each code line. Specifically, expand the capture to include the relevant context (such as comments, adjacent statements) of the specific code line to determine the scope of modification and the operation type (replace / delete / insert).

[0056] Step 43: Create a search block for the code modification template for each line of code and its context, and create a replacement block for the code modification template based on the analysis results or timeout conditions corresponding to each line of code.

[0057] Step 44: Modify the initial script using the search and replace blocks of the code modification template to obtain the game automation script.

[0058] Specifically, in S1, find the code segment that completely matches the search block, replace the matching content with the replacement block, and at the same time ensure that comments and formatting are preserved, only the target line is modified, and unrelated code is not affected. After processing all opinions, generate the game automation script (i.e., the correction script S2).

[0059] In this way, only the issues specified by the Rep are modified, while the original code structure and comments are preserved to the greatest extent possible, meeting the game's specific requirements (server division, API, performance, etc.). It enables modification of only necessary parts, avoiding a complete script rewrite; it prevents accidental modifications through complete code block matching; it employs dedicated correction strategies for different issues; and it provides clear modification traces, facilitating review and verification.

[0060] Further, please refer to Figure 3 In this embodiment, a publishing control layer is configured. The game automation script S2 is input into the M6 ​​scoring module in the publishing control layer. The specific scoring steps include: The game automation script is simulated, and the matching degree (Acc) between the simulated behavior and the expected game behavior is compared; the compliance (Safe) of the game automation script is checked; the performance compliance (Perf) is calculated based on the frame consumption of the game automation script during the simulation process; and the score of the game automation script is calculated by combining the matching degree, the compliance, and the performance compliance. Score = Acc×Safe α ×Perf β .

[0061] In the formula, α and β are smoothing coefficients, with a default value of α = 0.5 and β = 0.3. This parameter combination was optimized using a grid search on 30 PC game test scripts. The safety weight α is 1.67 times the performance weight β, reflecting the game industry's principle of prioritizing safety. The scoring formula amplifies the impact of low-scoring items due to its multiplicative form, better aligning with the actual needs of the game industry where script safety is paramount.

[0062] If the score of the game automation script is less than the score threshold T_all, then the steps of replacing the game information in the database, replacing expired function signatures, and replacing coordinates in the original script are re-executed. If the score is greater than or equal to T_all, then the game automation script is written into the script library V.

[0063] Furthermore, a maximum number of retries is set for re-executing the step. The formula for calculating the maximum number of retries, MaxRetry, is as follows: MaxRetry = ceil( log(1 - P_target) / log(1 - Score_avg) ) In the formula, Score_avg represents the average score of the two most recent simulations of the game automation script, P_target represents the expected pass rate, and ceil is the rounding function. By calculating the maximum number of retries, the number of loops can be limited while ensuring high reliability.

[0064] If the number of re-executions Retry_cnt < MaxRetry, increment the number of re-executions by 1 and return to the replacement processing layer for execution. If the number of re-executions Retry_cnt ≥ MaxRetry, trigger a manual alarm N.

[0065] In the application scenario of this embodiment, such as when using a script for automatic level traversal, this solution can automatically replace the level ID-server mapping table and correct API calls after the script is generated. Through static and simulation verification, the "engine version incompatibility" problem can be discovered in advance, reducing subsequent manual debugging.

[0066] When verifying the game's economic system, the M2-R_db module can dynamically replace the common table names in the SQL with the server-specific table names (e.g., `economy_log` → `shard_42_economy_log`); the M4 expert review module can detect whether there are high-risk GM instructions (e.g., #ADD_GOLD, #SET_LEVEL) in the script and generate structured blocking opinions.

[0067] When performing UI automated regression verification, coordinate replacement uses a multi-resolution UI resource repository; the Perf metric can constrain the frame consumption of the script under 60 FPS simulation and detect the risk of rendering blockage in complex scenes in advance.

[0068] In summary, this embodiment, through a three-segment replacement strategy, can quickly adapt to different server versions, engine versions, and resolutions without modifying the use case description. The correction-expert-rewrite closed loop significantly reduces the manual screening burden for script security and runtime errors. The product scoring and dynamic MaxRetry mechanism provide an adjustable balance between reliability and generation cost. This embodiment's solution is highly compatible with PC game development processes and can be directly integrated into mainstream CI / CD toolchains.

[0069] According to another aspect of the invention, Figure 2This is a schematic diagram illustrating a game automation script generation terminal according to an embodiment of the present invention. It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the various steps of the game automation script generation method described above.

[0070] Another embodiment of the present invention provides a computer storage medium storing a computer program thereon, which, when executed by a processor, implements the various steps of the above-described method for generating an automated game script.

[0071] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for generating a game automation script, characterized by, The method comprises the steps of: According to the received game use case description and game requirement prompt words, an original script is generated; The original script is subjected to database game information replacement, obsolete function signature replacement and coordinate replacement, and an initial script is output; The initial script is subjected to dependency analysis and game permission analysis; and the initial script is simulated, and performance analysis is performed on the simulation result; structured opinions are generated in combination with the analysis results; The initial script is differentially rewritten according to the structured opinions, and a game automation script is generated.

2. The method for generating a game automation script according to claim 1, wherein, The original script is subjected to database game information replacement, obsolete function signature replacement and game coordinate replacement in sequence, comprising: According to the obtained game area server configuration data, the table prefix of the database instruction in the original script and the database key name partition rule are modified; According to the pre-defined game engine interface mapping table, the obsolete function signature in the original script is replaced; According to the obtained device information, the corresponding UI coordinate data is matched from the pre-set multi-resolution UI resource warehouse, and the coordinate data in the original script is replaced with the UI coordinate data.

3. The method for generating a game automation script according to claim 1, wherein, Before simulating the initial script, it also includes: The initial script is subjected to syntax checking and interface compliance verification.

4. The method for generating a game automation script according to claim 1, wherein, The initial script is subjected to dependency analysis and game permission analysis, comprising: The game operation sequence in the initial script is extracted, and the game operation sequence is compared with the pre-set game level dependency graph to obtain a dependency analysis result; The initial script is run in an isolated environment, the access operation to the database in the running process is monitored, the access operation is detected according to the pre-set access permission, and a game permission analysis result is obtained.

5. The method of claim 4, wherein, The performance of the simulation result is analyzed, comprising: The execution time of each frame in the simulation is obtained, the frames exceeding the time threshold are obtained, and the code lines of the corresponding initial script are located.

6. The method of claim 5, wherein, Combined with the analysis results, structured opinions are generated, comprising: Combined with the dependency analysis result, the game permission analysis result and the code lines of the initial script corresponding to the frames exceeding the time threshold, structured opinions are generated; According to the structured opinions, the initial script is differentially rewritten, and a game automation script is generated, comprising: Locate the code lines of the initial script corresponding to the dependency analysis result and the game permission analysis result; Based on the located code lines and the code lines of the initial script corresponding to the frames exceeding the time threshold, the context of each code line is captured; A search block of a code modification template is created for each code line and its context, a replacement block of a code modification template is created according to the analysis result or the timeout condition of each code line; The initial script is modified using the search block and the replacement block of the code modification template, and a game automation script is obtained.

7. The method of claim 1, wherein, After generating the game automation script, it includes: The game automation script is simulated, and the matching degree of the simulation behavior and the expected game behavior is compared; The compliance degree of the game automation script is checked; The performance compliance degree is calculated according to the frame time consumption of the game automation script in the simulation process; The score of the game automation script is calculated in combination with the matching degree, the compliance degree and the performance compliance degree; If the score of the game automation script is lower than a score threshold, re-performing the steps of game information replacement, out-of-date function signature replacement and coordinate replacement on the original script in the database.

8. The method of claim 7, wherein, The re-performing the steps of game information replacement, out-of-date function signature replacement and coordinate replacement on the original script in the database further comprises: setting a maximum retry number for the re-performing step; The maximum retry number MaxRetry is calculated as follows: MaxRetry = ceil( log(1 - P_target) / log(1 - Score_avg) ) wherein Score_avg represents an average score of the game automation script in the last two simulations, P_target represents an expected pass rate, and ceil is a rounding-up function.

9. A game automation script generation terminal comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor implements each step of the game automation script generation method of any one of claims 1 to 8 when executing the computer program.

10. A computer storage medium having stored thereon a computer program, characterized in that The computer program implements each step of the game automation script generation method of any one of claims 1 to 8 when executed by the processor.