Game task automatic test method, device and equipment and storage medium

By generating prompt words and using a large language model to generate action decision information, the problem of high training time and cost of reinforcement learning models in game testing is solved, and efficient and accurate automated testing of game tasks is achieved.

CN119971509BActive Publication Date: 2025-12-05NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510067810.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-12-05
Estimated Expiration
2045-01-15

AI Technical Summary

Technical Problem

In existing technologies, reinforcement learning models need to be retrained to adapt to new test tasks in game testing, which increases time and computational costs and prolongs the testing cycle.

Method used

By acquiring the state information of the game task, generating prompts and using a pre-set large language model to generate action decision information, the system controls the virtual character to execute action sequences, avoiding model retraining and only requiring updates to the prompts to adapt to task changes.

Benefits of technology

It achieves efficient and accurate game decision-making, reduces training time and computational costs, and can adapt to changes in testing tasks without retraining the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119971509B_ABST
    Figure CN119971509B_ABST
Patent Text Reader

Abstract

The application provides a game task automatic test method and device, equipment and a storage medium, and relates to the technical field of game testing. The method comprises the following steps: obtaining state information of a game task to be tested; generating a first prompt word according to the state information of the game task to be tested; generating action decision information of the game task to be tested by using a preset large language model according to the first prompt word; and sending information of a target action execution sequence corresponding to the action decision information to a game client device according to the action decision information. According to the method, the large language model can generate the action decision information through the first prompt word, and the model does not need to be additionally trained when a new test task is introduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of game testing technology, and more specifically, to a method, apparatus, device, and storage medium for automated testing of game tasks. Background Technology

[0002] In game testing scenarios, reinforcement learning models can simulate player behavior by analyzing the game state, continuously trying various executable actions, and receiving feedback through a reward mechanism. After sufficient training, the model can output the optimal action given a game state, thus intelligently determining the game task.

[0003] However, whenever a new test task is introduced, the model needs to be retrained. In addition, reinforcement learning algorithms usually require a large amount of training data to converge to an effective policy, which not only increases time and computational costs but may also lead to a longer testing cycle. Summary of the Invention

[0004] This application addresses the shortcomings of the prior art by providing a method, apparatus, device, and storage medium for automated testing of game tasks, thereby resolving the problems existing in the prior art.

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

[0006] In a first aspect, embodiments of this application provide an automated testing method for game tasks, including:

[0007] Obtain the status information of the game task to be tested;

[0008] Based on the status information of the game task to be tested, a first prompt word is generated;

[0009] Based on the first prompt word, a preset large language model is used to generate action decision information for the game task to be tested;

[0010] Based on the action decision information, the game client device sends information about the target action execution sequence corresponding to the action decision information to the game client device, so that the game client device controls the controlled virtual character to execute the target action execution sequence under the game task to be tested.

[0011] Secondly, embodiments of this application provide an automated testing device for game tasks, comprising:

[0012] The acquisition module is used to acquire the status information of the game task to be tested;

[0013] The first generation module is used to generate a first prompt word based on the status information of the game task to be tested;

[0014] The second generation module is used to generate action decision information for the game task to be tested based on the first prompt word and using a preset large language model.

[0015] The sending module is used to send information about the target action execution sequence corresponding to the action decision information to the game client device according to the action decision information, so that the game client device can control the controlled virtual character to execute the target action execution sequence under the game task to be tested.

[0016] Thirdly, embodiments of this application provide an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores program instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to implement the game task automated testing method described in the above embodiments.

[0017] Fourthly, embodiments of this application provide a readable storage medium storing program instructions, which, when executed by a processor, implement the game task automated testing method described in the above embodiments.

[0018] The beneficial effects of this application are as follows: This application provides an automated testing method for game tasks, which can generate a first prompt word based on the state information of the game task to be tested, and then generate action decision information for the game task to be tested using a preset large language model based on the first prompt word. This method achieves efficient and accurate game decision-making. Furthermore, when the test task changes, there is no need to retrain the model; only the first prompt word needs to be updated to generate new action decision information corresponding to the new test task. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 One of the flowcharts of the game task automated testing method provided in the embodiments of this application;

[0021] Figure 2 A second flowchart illustrating the automated testing method for game tasks provided in this application embodiment;

[0022] Figure 3 The third flowchart illustrating the automated testing method for game tasks provided in this application embodiment;

[0023] Figure 4 The fourth flowchart illustrating the automated testing method for game tasks provided in this application embodiment;

[0024] Figure 5 The fifth flowchart illustrating the automated testing method for game tasks provided in this application embodiment;

[0025] Figure 6 A flowchart illustrating the automated testing method for game tasks provided in this application embodiment is shown in Figure 6.

[0026] Figure 7 This is a schematic diagram of the structure of the automated game task testing device provided in the embodiments of this application;

[0027] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this application, but not all embodiments.

[0029] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0030] Furthermore, the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0031] It should be noted that, where there is no conflict, the features in the embodiments of this application can be combined with each other.

[0032] This application provides an automated testing method for game tasks. This method can be generated by any electronic device with computing and processing capabilities. The electronic device can be, for example, a terminal-facing computer device or a backend server.

[0033] The following examples, in conjunction with the accompanying drawings, provide specific illustrations of the game task automation testing method provided in this application.

[0034] Figure 1 This is one of the flowcharts illustrating the automated testing method for game tasks provided in this application embodiment, such as... Figure 1 As shown, the method includes:

[0035] S101. Obtain the status information of the game task to be tested.

[0036] Game tasks awaiting testing refer to various game tasks designed during game development but not yet fully tested. These tasks may include main quests, side quests, daily quests, etc. For example, in a role-playing game, a side quest where players need to find a mysterious treasure is a game task awaiting testing before testing is completed.

[0037] The status information of the game task to be tested may include, for example, specific environmental information and task description information.

[0038] S102. Generate the first prompt word based on the status information of the game task to be tested.

[0039] After obtaining the status information of the game task to be tested, input this information into the prompt template to generate the first prompt word. The prompt template is a pre-configured general template based on the game to be tested. Multiple game tasks within the test game can use this template, which may include areas for filling in environmental information and task description information.

[0040] S103. Based on the first prompt word, use a preset large language model to generate action decision information for the game task to be tested.

[0041] The first prompt word is input into a pre-defined large language model, which then generates action decision information for the game task to be tested. This pre-defined large language model can be, for example, GPT-4o, which can output action decision information corresponding to the game task based on the input prompt word.

[0042] S104. Based on the action decision information, send the target action execution sequence information corresponding to the action decision information to the game client device.

[0043] After obtaining the action decision information of the game task to be tested, the system sends the target action execution sequence information corresponding to the action decision information to the game client device, so that the game client device can control the controlled virtual character to execute the target action execution sequence under the game task to be tested.

[0044] For example, if the action decision information for the game task to be tested is "talk to the target NPC", then the target action execution sequence corresponding to this action decision information is "determine the movement path between the controlled virtual character and the target NPC", "track the movement path and make the controlled virtual character move to the vicinity of the target NPC", and "after the controlled virtual character moves to the vicinity of the target NPC, talk to the target NPC".

[0045] In summary, the embodiments of this application provide an automated testing method for game tasks, which can generate action decision information for the game task to be tested using a preset large language model based on the first prompt word, achieving efficient and accurate game decision-making. Furthermore, when the test task changes, there is no need to retrain the model; only the first prompt word needs to be updated to generate new action decision information corresponding to the new test task.

[0046] Figure 2 This is a second flowchart illustrating the automated testing method for game tasks provided in this application embodiment. Figure 2 As shown, in one embodiment, S101, obtaining the status information of the game task to be tested, includes:

[0047] S201. Obtain game running status data sent by the game client device.

[0048] Games typically run on game client devices and feature player-controlled virtual characters. During gameplay, games continuously generate game status data, which the electronic device executing this method can obtain. It's important to note that this game status data is transmitted to the electronic device via a specific communication protocol. Using this protocol ensures the stability and accuracy of data transmission.

[0049] S202. Extract the status information of the game task to be tested from the game running status data.

[0050] After obtaining the game's running status data, removing information irrelevant to the game task under test will extract the task's status information. For example, if there are 30 data entries in the obtained game running status data, and only 10 are relevant to the game task under test, then the extra 20 data entries are filtered out, leaving only these 10 data entries as the game task's status information.

[0051] It should be noted that different filtering algorithms and extraction rules can be used for the information filtering and extraction steps. For example, filtering can be based on the importance of the information, or extraction can be based on specific keywords.

[0052] In one embodiment, the step of extracting the status information of the game task to be tested from the game running status data in step S202 may include: extracting specific environmental information and task description information of the game task to be tested from the game running status data. That is, the status information of the game task to be tested includes specific environmental information and task description information of the game task to be tested.

[0053] Specifically, the game running status data sent by the game client device includes at least character status data, environment status data, and task status data. The location information of the controlled virtual character and its surrounding environment can be extracted from the character status data and environment status data as specific environmental information. Similarly, the attribute description information and progress description information of the game task under test can be extracted from the task status data as task description information. In other words, the specific environmental information includes the location information of the controlled virtual character and its surrounding environment, while the task description information includes the attribute description information and progress description information of the game task under test.

[0054] Among them, the location information of the controlled virtual character can be the current coordinates of the controlled virtual character, the surrounding environment information of the controlled virtual character can be the name information of the surrounding NPCs, the attribute description information of the game task to be tested can be, for example, the name of the game task to be tested, and the progress description information of the game task to be tested can be, for example, the completion progress of the game task to be tested.

[0055] Figure 3 The third flowchart illustrates the automated testing method for game tasks provided in this application. Figure 3 As shown, before performing S102, the method of this application may further include:

[0056] S301. Based on the status information of the game task to be tested, obtain the information of the preceding tasks associated with the game task to be tested from the preset task knowledge base.

[0057] The preset task knowledge base contains pre-stored information on the preceding and following tasks related to the game task to be tested. The preceding task information is the information corresponding to the preceding game tasks that need to be completed before executing the game task to be tested, and the following task information is the information corresponding to the following game tasks that need to be executed after completing the game task to be tested.

[0058] Before executing step S102, the information of the preceding tasks associated with the game task to be tested can be obtained from the preset task knowledge base based on the status information of the game task to be tested. That is, the information related to the game task to be tested can be obtained.

[0059] Then, step S102, generating the first prompt word based on the state information of the game task to be tested, includes:

[0060] S302. Generate the first prompt word based on the status information and prerequisite task information of the game task to be tested.

[0061] After obtaining the prerequisite task information, the status information of the game task to be tested and the prerequisite task information are input into the prompt template to generate the first prompt word. This method of generating the first prompt word based on the status information of the game task to be tested and the prerequisite task information can better adapt to different game tasks and scene changes, so that the large language model can understand the task scene more accurately.

[0062] Large language models can comprehensively consider various state details of the game task under test, such as task progress, completed sub-tasks, current difficulties, and information about related tasks, such as the order and dependencies between tasks. This allows for a more comprehensive and accurate understanding of the context of the game task under test. For example, in a large-scale multiplayer online role-playing game, a main quest may have multiple branch tasks associated with it. By inputting the state and related information of these tasks, large language models can better grasp the task's overall structure within the game, providing a more realistic basis for subsequent analysis and suggestions. This leads to more targeted strategies and recommendations, and also enhances the coherence and consistency of the task.

[0063] In one embodiment, before performing step S104, the method of this application further includes: mapping the action decision information into the execution instructions of the target action execution sequence according to the preset decision action mapping rules of the game task to be tested, that is, the information of the target action execution sequence includes the execution instructions of the target action execution sequence.

[0064] By sending the execution instructions of the target action execution sequence to the game client device, the game client device can control the controlled virtual character to perform the game actions corresponding to the execution instructions of the target action execution sequence under the game task to be tested.

[0065] The purpose of the preset decision-action mapping rules is to map the action decision information of the game task to be tested into execution instructions for the target action execution sequence, ensuring that the controlled virtual character can accurately perform the corresponding actual actions in the game. For example, a large language model may generate "pathfinding" action decision information. Through the preset decision-action mapping rules, this "pathfinding" action decision information can be mapped into specific action instructions for the controlled virtual character to find a certain NPC or coordinates. Then, the action instructions are sent to the game client device, and the controlled virtual character can execute the corresponding actions.

[0066] In this embodiment, mapping is performed using preset decision-making action mapping rules for the game task to be tested. This ensures that the controlled virtual character executes actions according to predetermined logic and order, thereby accurately completing various complex game tasks. It also provides the controlled virtual character with diverse action execution sequences, making its behavior more varied and rich.

[0067] Figure 4 The fourth flowchart illustrates the automated testing method for game tasks provided in this application. Figure 4 As shown, before performing S102, the method of this application may further include:

[0068] S401. Based on the status information of the game task to be tested, determine whether the action execution sequence of the game task to be tested is cached in the preset task action library.

[0069] This application can also be configured with a preset task action library. The preset task action library is used to cache the action execution sequence corresponding to historical test game tasks. When the status information of a game task to be tested is obtained, it can be determined first whether the preset task action library has cached the action execution sequence of the game task to be tested, that is, to determine whether the game task to be tested has been successfully tested at a historical time.

[0070] S402. If the preset task action library does not cache the action execution sequence of the game task to be tested, then generate the first prompt word based on the status information of the game task to be tested.

[0071] If the action execution sequence of the game task to be tested is not cached in the preset task action library, it means that the game task to be tested is being executed for the first time. The first prompt word needs to be generated based on the state information of the game task to be tested, and the action decision information of the game task to be tested is generated by the large language model.

[0072] S403. If the preset task action library has cached the action execution sequence of the game task to be tested, send the action execution sequence information to the game client device so that the game client device can control the controlled virtual character to execute the action execution sequence under the game task to be tested.

[0073] If the preset task action library has cached the action execution sequence of the game task to be tested, the action execution sequence can be retrieved directly from the preset task action library and sent to the game client device. This allows the game client device to control the controlled virtual character to execute the action execution sequence under the game task to be tested.

[0074] In this embodiment, when the preset task action library contains the action execution sequence of the game task to be tested, the cached action execution sequence in the preset task action library is directly used, which avoids repeated acquisition and processing of information and speeds up the execution of the game task to be tested.

[0075] One embodiment of this application also provides a method for storing information in a preset task action library, such as... Figure 5 As shown:

[0076] S501. Obtain the execution result of the game task to be tested from the game client device.

[0077] After the game client device completes the game task to be tested, the execution result can also be obtained. The execution result is used to indicate whether the game task to be tested was successfully executed. It can be understood that the execution result is used to indicate whether the controlled virtual character successfully executed the target action execution sequence under the game task to be tested.

[0078] S502. If the execution result indicates that the game task to be tested was executed successfully, the information of the target action execution sequence is cached in the preset task action library.

[0079] If the execution result indicates that the game task under test was executed successfully, it means that the information of the target action execution sequence can be successfully executed. Therefore, the information of the target action execution sequence is cached in the preset task action library so that when the same game task under test is encountered in the future, there is no need to use the large language model again. The information of the target action execution sequence can be directly called to control the controlled virtual object, saving game testing time.

[0080] One embodiment of this application also provides a solution for when the game task to be tested fails to execute, such as... Figure 6 As shown:

[0081] S601. If the execution results of the test game task for a consecutive preset number of times indicate that the test game task has failed, then obtain the execution sequence of multiple historical actions of the test game task for a consecutive preset number of times and the corresponding game task information.

[0082] As described in the above embodiments, after the game client device completes the game task to be tested, the execution result can be obtained. If the execution result indicates that the game task to be tested has failed, the steps S101-S103 are re-executed. If the game still fails after re-executing S101-S103, and the number of consecutive failures reaches 3, the execution sequence of multiple historical actions of the game task to be tested during these 3 failures, as well as the corresponding game task information, are obtained.

[0083] S602. Generate a second prompt word based on multiple historical action execution sequences and corresponding game task information.

[0084] Multiple historical action execution sequences and corresponding game task information are integrated and input into a specific correction prompt template to generate a second prompt word. The specific correction prompt template is a pre-configured correction template, which may include areas to be filled, such as multiple historical action execution sequences and corresponding game task information.

[0085] S603. Based on the second prompt word, use a preset large language model to generate action decision correction information for the game task to be tested.

[0086] Then, the second prompt word is input into the preset large language model. Since the second prompt word is generated based on the execution sequence of multiple failed historical actions, inputting the second prompt word into the preset large language model enables the preset large language model to better analyze the reasons for failure and obtain action decision correction information.

[0087] S604. Based on the action decision correction information, correct the action decision information to obtain the target action decision information.

[0088] Based on the action decision correction information, the action decision information is corrected to obtain the target action decision information, which can continuously improve the quality of decision-making and increase the accuracy and success rate of decision-making.

[0089] S605. Based on the target action decision information, send the information of the corrected action execution sequence corresponding to the target action decision information to the game client device, so that the game client device can control the controlled virtual character to execute the corrected action execution sequence under the game task to be tested.

[0090] Finally, the information of the corrected action execution sequence corresponding to the target action decision information is sent to the game client device, which enables the game client device to control the controlled virtual character to execute the corrected action execution sequence under the game task to be tested, thereby successfully executing the game task to be tested.

[0091] The following will continue to explain the apparatus, device and storage medium for implementing the game task automated testing method provided in any of the above embodiments of this application. The specific implementation process and the resulting technical effects are the same as those in the corresponding method embodiments. For the sake of brevity, the parts not mentioned in the following embodiments can be referred to the corresponding content in the method embodiments.

[0092] Figure 7 This is a schematic diagram of the structure of the automated game task testing device provided in the embodiments of this application, such as... Figure 7 As shown, this application also provides an automated testing device for game tasks, comprising:

[0093] Module 10 is used to obtain the status information of the game task to be tested.

[0094] The first generation module 20 is used to generate the first prompt word based on the status information of the game task to be tested.

[0095] The second generation module 30 is used to generate action decision information for the game task to be tested based on the first prompt word and a preset large language model.

[0096] The sending module 40 is used to send the target action execution sequence information corresponding to the action decision information to the game client device according to the action decision information, so that the game client device can control the controlled virtual character to execute the target action execution sequence under the game task to be tested.

[0097] Optionally, the status information of the game task to be tested includes: specific environmental information and task description information of the game task to be tested.

[0098] Optionally, the acquisition module 10 is used to acquire game running status data sent by the game client device; and extract the status information of the game task to be tested from the game running status data.

[0099] Optionally, the game running status data includes at least: character status data, environment status data, and task status data; the acquisition module 10 is used to extract the position information of the controlled virtual character and the surrounding environment information of the controlled virtual character from the character status data and environment status data as specific environment information; and to extract the attribute description information and progress description information of the game task to be tested from the task status data as task description information.

[0100] Optionally, the acquisition module 10 is used to acquire the pre-required task information associated with the game task to be tested from a preset task knowledge base based on the status information of the game task to be tested.

[0101] The first generation module 20 is used to generate the first prompt word based on the status information and the preceding task information of the game task to be tested.

[0102] Optionally, the device further includes a mapping module, used to map action decision information into execution instructions of a target action execution sequence according to a preset decision action mapping rule of the game task to be tested. The information of the target action execution sequence includes: the execution instructions of the target action execution sequence.

[0103] Optionally, the device further includes a judgment module, used to determine whether the action execution sequence of the game task to be tested is cached in the preset task action library based on the state information of the game task to be tested.

[0104] The first generation module 20 is used to generate a first prompt word based on the status information of the game task to be tested if the action execution sequence of the game task to be tested is not cached in the preset task action library.

[0105] Optionally, the sending module 40 is used to send the action execution sequence information to the game client device if the preset task action library has cached the action execution sequence of the game task to be tested, so that the game client device can control the controlled virtual character to execute the action execution sequence under the game task to be tested.

[0106] Optionally, the device also includes a caching module for obtaining the execution result of the game task to be tested from the game client device; if the execution result indicates that the game task to be tested was executed successfully, the information of the target action execution sequence is cached in a preset task action library.

[0107] Optionally, the acquisition module 10 is used to acquire multiple historical action execution sequences of the game task under test and the corresponding game task information if the execution results of the game task under test for a consecutive preset number of times indicate that the game task under test has failed.

[0108] The first generation module 20 is used to generate a second prompt word based on multiple historical action execution sequences and corresponding game task information.

[0109] The second generation module 30 is used to generate action decision correction information for the game task to be tested based on the second prompt word and a preset large language model.

[0110] The device also includes a correction module, which is used to correct the action decision information based on the action decision correction information to obtain the target action decision information.

[0111] The sending module 40 is used to send information about the corrected action execution sequence corresponding to the target action decision information to the game client device based on the target action decision information, so that the game client device can control the controlled virtual character to execute the corrected action execution sequence under the game task to be tested.

[0112] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.

[0113] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).

[0114] like Figure 8 As shown, this application also provides an electronic device, including: a processor 100, a storage medium 200, and a bus 300. The storage medium stores program instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions. The method of execution includes:

[0115] Obtain the status information of the game task to be tested;

[0116] Generate the first prompt word based on the status information of the game task to be tested;

[0117] Based on the first prompt word, a pre-set large language model is used to generate action decision information for the game task to be tested.

[0118] Based on the action decision information, the target action execution sequence information corresponding to the action decision information is sent to the game client device, so that the game client device can control the controlled virtual character to execute the target action execution sequence under the game task to be tested.

[0119] Optionally, the status information of the game task to be tested includes: specific environmental information and task description information of the game task to be tested.

[0120] Optionally, obtain the status information of the game task to be tested, including:

[0121] Obtain game running status data sent by the game client device;

[0122] Extract the status information of the game task to be tested from the game's running status data.

[0123] Optionally, the game running status data includes at least: character status data, environment status data, and task status data;

[0124] Extract the status information of the game task to be tested from the game's runtime status data, including:

[0125] Extract the location information of the controlled virtual character and the surrounding environment information of the controlled virtual character from the character status data and environment status data as specific environment information;

[0126] Extract the attribute description information and progress description information of the game task to be tested from the task status data as task description information.

[0127] Optionally, before generating the first prompt based on the state information of the game task to be tested, the method further includes:

[0128] Based on the status information of the game task to be tested, retrieve the information of the preceding tasks associated with the game task to be tested from the preset task knowledge base;

[0129] Based on the status information of the game task to be tested, generate the first prompt word, including:

[0130] Based on the status information of the game task to be tested and the information of the preceding tasks, generate the first prompt word.

[0131] Optionally, before sending the target action execution sequence information corresponding to the action decision information to the game client device based on the action decision information, the method further includes:

[0132] Based on the preset decision-action mapping rules of the game task to be tested, the action decision information is mapped to the execution instructions of the target action execution sequence. The information of the target action execution sequence includes: the execution instructions of the target action execution sequence.

[0133] Optionally, before generating the first prompt based on the state information of the game task to be tested, the method further includes:

[0134] Based on the state information of the game task to be tested, determine whether the action execution sequence of the game task to be tested is cached in the preset task action library;

[0135] Based on the status information of the game task to be tested, generate the first prompt word, including:

[0136] If the preset task action library does not cache the action execution sequence of the game task to be tested, then the first prompt word is generated based on the status information of the game task to be tested.

[0137] Optionally, the method further includes:

[0138] If the preset task action library has cached the action execution sequence of the game task to be tested, the action execution sequence information is sent to the game client device so that the game client device can control the controlled virtual character to execute the action execution sequence under the game task to be tested.

[0139] Optionally, after sending the target action execution sequence information corresponding to the action decision information to the game client device based on the action decision information, the method further includes:

[0140] Obtain the execution results of the game task to be tested from the game client device;

[0141] If the execution result indicates that the game task to be tested was executed successfully, the information of the target action execution sequence will be cached in the preset task action library.

[0142] Optionally, the method further includes:

[0143] If the execution results of the test game task for a consecutive preset number of times indicate that the test game task has failed, then obtain the execution sequence of multiple historical actions of the test game task for a consecutive preset number of times and the corresponding game task information.

[0144] A second prompt word is generated based on multiple historical action execution sequences and corresponding game task information;

[0145] Based on the second prompt word, a pre-set large language model is used to generate action decision correction information for the game task to be tested.

[0146] Based on the action decision correction information, the action decision information is corrected to obtain the target action decision information;

[0147] Based on the target action decision information, the corrected action execution sequence information corresponding to the target action decision information is sent to the game client device, so that the game client device can control the controlled virtual character to execute the corrected action execution sequence under the game task to be tested.

[0148] This application also provides a readable storage medium storing program instructions, which, when executed by a processor, implement methods including:

[0149] Obtain the status information of the game task to be tested;

[0150] Generate the first prompt word based on the status information of the game task to be tested;

[0151] Based on the first prompt word, a pre-set large language model is used to generate action decision information for the game task to be tested.

[0152] Based on the action decision information, the target action execution sequence information corresponding to the action decision information is sent to the game client device, so that the game client device can control the controlled virtual character to execute the target action execution sequence under the game task to be tested.

[0153] Optionally, the status information of the game task to be tested includes: specific environmental information and task description information of the game task to be tested.

[0154] Optionally, obtain the status information of the game task to be tested, including:

[0155] Obtain game running status data sent by the game client device;

[0156] Extract the status information of the game task to be tested from the game's running status data.

[0157] Optionally, the game running status data includes at least: character status data, environment status data, and task status data;

[0158] Extract the status information of the game task to be tested from the game's runtime status data, including:

[0159] Extract the location information of the controlled virtual character and the surrounding environment information of the controlled virtual character from the character status data and environment status data as specific environment information;

[0160] Extract the attribute description information and progress description information of the game task to be tested from the task status data as task description information.

[0161] Optionally, before generating the first prompt based on the state information of the game task to be tested, the method further includes:

[0162] Based on the status information of the game task to be tested, retrieve the information of the preceding tasks associated with the game task to be tested from the preset task knowledge base;

[0163] Based on the status information of the game task to be tested, generate the first prompt word, including:

[0164] Based on the status information of the game task to be tested and the information of the preceding tasks, generate the first prompt word.

[0165] Optionally, before sending the target action execution sequence information corresponding to the action decision information to the game client device based on the action decision information, the method further includes:

[0166] Based on the preset decision-action mapping rules of the game task to be tested, the action decision information is mapped to the execution instructions of the target action execution sequence. The information of the target action execution sequence includes: the execution instructions of the target action execution sequence.

[0167] Optionally, before generating the first prompt based on the state information of the game task to be tested, the method further includes:

[0168] Based on the state information of the game task to be tested, determine whether the action execution sequence of the game task to be tested is cached in the preset task action library;

[0169] Based on the status information of the game task to be tested, generate the first prompt word, including:

[0170] If the preset task action library does not cache the action execution sequence of the game task to be tested, then the first prompt word is generated based on the status information of the game task to be tested.

[0171] Optionally, the method further includes:

[0172] If the preset task action library has cached the action execution sequence of the game task to be tested, the action execution sequence information is sent to the game client device so that the game client device can control the controlled virtual character to execute the action execution sequence under the game task to be tested.

[0173] Optionally, after sending the target action execution sequence information corresponding to the action decision information to the game client device based on the action decision information, the method further includes:

[0174] Obtain the execution results of the game task to be tested from the game client device;

[0175] If the execution result indicates that the game task to be tested was executed successfully, the information of the target action execution sequence will be cached in the preset task action library.

[0176] Optionally, the method further includes:

[0177] If the execution results of the test game task for a consecutive preset number of times indicate that the test game task has failed, then obtain the execution sequence of multiple historical actions of the test game task for a consecutive preset number of times and the corresponding game task information.

[0178] A second prompt word is generated based on multiple historical action execution sequences and corresponding game task information;

[0179] Based on the second prompt word, a pre-set large language model is used to generate action decision correction information for the game task to be tested.

[0180] Based on the action decision correction information, the action decision information is corrected to obtain the target action decision information;

[0181] Based on the target action decision information, the corrected action execution sequence information corresponding to the target action decision information is sent to the game client device, so that the game client device can control the controlled virtual character to execute the corrected action execution sequence under the game task to be tested.

[0182] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0183] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0184] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.

[0185] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0186] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for automating testing of a game task, characterized by, The method comprises: acquiring state information of a to-be-tested game task; generating a first prompt word according to the state information of the to-be-tested game task; generating action decision information of the to-be-tested game task by using a preset large language model according to the first prompt word; sending information of a target action execution sequence corresponding to the action decision information to a game client device according to the action decision information, so that the game client device controls a controlled virtual character to execute the target action execution sequence under the to-be-tested game task; Before the step of generating the first prompt word according to the state information of the to-be-tested game task, the method further comprises: acquiring pre-task information associated with the to-be-tested game task from a preset task knowledge base according to the state information of the to-be-tested game task; The step of generating the first prompt word according to the state information of the to-be-tested game task comprises: generating the first prompt word according to the state information of the to-be-tested game task and the pre-task information.

2. The method of claim 1, wherein: the state information of the to-be-tested game task comprises specific environment information and task description information of the to-be-tested game task.

3. The method of claim 2, wherein, The step of acquiring the state information of the to-be-tested game task comprises: acquiring game running state data sent by a game client device; extracting the state information of the to-be-tested game task from the game running state data.

4. The method of claim 3, wherein, The game running state data at least comprises character state data, environment state data and task state data. The step of extracting the state information of the to-be-tested game task from the game running state data comprises: extracting position information of the controlled virtual character and surrounding environment information of the controlled virtual character from the character state data and the environment state data as the specific environment information; extracting attribute description information and progress description information of the to-be-tested game task from the task state data as the task description information.

5. The method of claim 1, wherein, Before the step of sending the information of the target action execution sequence corresponding to the action decision information to the game client device, the method further comprises: mapping the action decision information into an execution instruction of the target action execution sequence according to a preset decision action mapping rule of the to-be-tested game task, wherein the information of the target action execution sequence comprises the execution instruction of the target action execution sequence.

6. The method of claim 1, wherein, Before the step of generating the first prompt word according to the state information of the to-be-tested game task, the method further comprises: determining whether an action execution sequence of the to-be-tested game task is cached in a preset task action library according to the state information of the to-be-tested game task. The step of generating the first prompt word according to the state information of the to-be-tested game task comprises: if the action execution sequence of the to-be-tested game task is not cached in the preset task action library, generating the first prompt word according to the state information of the to-be-tested game task.

7. The method of claim 6, wherein, The method further comprises: If the preset task action library caches the action execution sequence of the to-be-tested game task, information of the action execution sequence is sent to the game client device, so that the game client device controls the controlled virtual character to execute the action execution sequence under the to-be-tested game task.

8. The method of claim 1, wherein, After the game client device is sent information of a target action execution sequence corresponding to the action decision information according to the action decision information, the method further includes: obtaining an execution result of the to-be-tested game task from the game client device; if the execution result indicates that the to-be-tested game task is executed successfully, caching information of the target action execution sequence in a preset task action library.

9. The method of claim 8, wherein, The method further includes: if the execution results of the to-be-tested game task in a continuous preset number of times indicate that the to-be-tested game task fails, obtaining the to-be-tested game task in the continuous preset number of historical action execution sequences and corresponding game task information; generating a second prompt word according to the plurality of historical action execution sequences and corresponding game task information; generating action decision correction information of the to-be-tested game task according to the second prompt word by using the preset large language model; correcting the action decision information according to the action decision correction information to obtain target action decision information; according to the target action decision information, sending information of a corrected action execution sequence corresponding to the target action decision information to the game client device, so that the game client device controls the controlled virtual character to execute the corrected action execution sequence under the to-be-tested game task.

10. A game task automation testing apparatus, characterized by comprising: including: an obtaining module configured to obtain state information of a to-be-tested game task; a first generating module configured to generate a first prompt word according to the state information of the to-be-tested game task; a second generating module configured to generate action decision information of the to-be-tested game task by using a preset large language model according to the first prompt word; a sending module configured to send information of a target action execution sequence corresponding to the action decision information to a game client device according to the action decision information, so that the game client device controls a controlled virtual character to execute the target action execution sequence under the to-be-tested game task; the obtaining module is further configured to obtain pre-task information associated with the to-be-tested game task from a preset task knowledge base according to the state information of the to-be-tested game task; the first generating module is further configured to generate the first prompt word according to the state information of the to-be-tested game task and the pre-task information.

11. An electronic device, comprising: including: a processor, a storage medium and a bus, the storage medium stores program instructions executable by the processor, when the electronic device is running, the processor and the storage medium communicate through the bus, the processor executes the program instructions to implement the game task automatic testing method in any one of claims 1 to 9.

12. A readable storage medium, characterized by, The readable storage medium has program instructions stored thereon, and the program instructions are run by the processor to implement the game task automation test method in any one of claims 1 to 9.

Citation Information

Patent Citations

  • Program testing method and device, electronic equipment and computer readable storage medium

    CN114185773A

  • Game decision model training method and device, storage medium and electronic equipment

    CN119202730A