Game task automatic testing method and device, equipment and storage medium
By generating the first prompt word and using the large language model to generate action decision information, the problem of retraining the model in the existing technology is solved, and efficient and accurate game decision-making and flexible testing task processing are achieved.
Patent Information
- Application Number
- CN202510067810.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-01-15
AI Technical Summary
The prior art requires retraining of reinforcement learning models when introducing new test tasks, resulting in increased time and computational costs and extended test cycles.
By obtaining the status information of the game task to be tested, a first prompt word is generated, and the action decision information is generated using the preset large language model, and the target action execution sequence is sent to the game client device, so that the controlled virtual character can perform corresponding actions in the game task.
Efficient and accurate game decisions are achieved, and there is no need to retrain the model when testing tasks change. Just update the first prompt word to generate new action decision information.
Smart Images

Figure CN119971509A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of game testing technology, and in particular to a method, device, equipment and storage medium for automated testing of game tasks. Background Art
[0002] In the game testing scenario, the reinforcement learning model can simulate the player's behavior, continuously try various executable actions by analyzing the game state, and obtain feedback through the reward mechanism. After sufficient training, the model can output the best action given the game state, thereby intelligently determining the game task.
[0003] However, every time a new test task is introduced, the model needs to be retrained. At the same time, reinforcement learning algorithms usually require a large amount of training data to converge to an effective strategy, which not only increases time and computing costs, but may also lead to longer testing cycles. Summary of the invention
[0004] In view of the deficiencies in the above-mentioned prior art, the present application provides a game task automated testing method, device, equipment and storage medium to solve the problems existing in the prior art.
[0005] The technical solution adopted in the embodiment of the present application is as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for automated testing of game tasks, comprising:
[0007] Get the status information of the game task to be tested;
[0008] Generate a first prompt word according to the status information of the game task to be tested;
[0009] According to the first prompt word, using a preset large language model, generating action decision information of the game task to be tested;
[0010] According to the action decision information, information of a target action execution sequence corresponding to the action decision information is sent 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] In a second aspect, an embodiment of the present application provides a game task automation testing device, comprising:
[0012] The acquisition module is used to obtain the status information of the game task to be tested;
[0013] A first generating module, used for generating a first prompt word according to the state information of the game task to be tested;
[0014] A second generating module is used to generate action decision information of the game task to be tested according to the first prompt word by using a preset large language model;
[0015] The sending module is used to send information of a 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 controls the controlled virtual character to execute the target action execution sequence under the game task to be tested.
[0016] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and 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 automation testing method described in the above embodiment.
[0017] In a fourth aspect, an embodiment of the present application provides a readable storage medium having program instructions stored thereon, and when the program instructions are executed by a processor, the game task automation testing method described in the above embodiment is implemented.
[0018] The beneficial effect of the present application is as follows: the present application provides a method for automated testing of game tasks, which can generate a first prompt word according to the status information of the game task to be tested, and then generate action decision information of the game task to be tested according to the first prompt word using a preset large language model. The method realizes efficient and accurate game decision-making, and when the test task changes, there is no need to retrain the model, and new action decision information corresponding to the new test task can be generated by simply updating the first prompt word. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 One of the flowcharts of the game task automation testing method provided in the embodiment of the present application;
[0021] Figure 2 The second flowchart of the game task automation testing method provided in the embodiment of the present application;
[0022] Figure 3 The third flowchart of the method for automated testing of game tasks provided in the embodiment of the present application;
[0023] Figure 4 A fourth flowchart of the method for automated testing of gaming tasks provided in an embodiment of the present application;
[0024] Figure 5 A fifth flowchart of the method for automated testing of gaming tasks provided in an embodiment of the present application;
[0025] Figure 6 Flow chart of the method for automated testing of game tasks provided in the embodiment of the present application is as follows;
[0026] Figure 7 A schematic diagram of the structure of a game task automation testing device provided in an embodiment of the present application;
[0027] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.
[0029] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0030] In addition, the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0031] It should be noted that, in the absence of conflict, the features in the embodiments of the present application may be combined with each other.
[0032] An embodiment of the present application provides a method for automated testing of game tasks, which can be generated by any electronic device with computing and processing capabilities. The electronic device can be, for example, a terminal-oriented computer device or a back-end server.
[0033] The following is a specific example description of the game task automation testing method provided by the present application through multiple examples in combination with the accompanying drawings.
[0034] Figure 1 One of the flowcharts of the game task automation testing method provided in the embodiment of the present application is as follows: Figure 1 As shown, the method includes:
[0035] S101, obtaining status information of the game task to be tested.
[0036] Untested game tasks refer to various game tasks that have been designed during the game development process but have not been fully tested. These tasks may include main tasks, side tasks, daily tasks, etc. For example, in a role-playing game, a side task that players need to complete to find a mysterious treasure is an untested game task before the test is completed.
[0037] The status information of the game task to be tested may include, for example, specific environment information and task description information of the game task to be tested.
[0038] S102: Generate a first prompt word according to the status information of the game task to be tested.
[0039] After obtaining the status information of the game task to be tested, the status information of the game task to be tested is input into the prompt template to generate the first prompt word. The prompt template is a general template pre-configured according to the game to be tested, and multiple game tasks to be tested in the game to be tested can use the template. The template may include areas to be filled in, for example, environment information and task description information.
[0040] S103: Generate action decision information of the game task to be tested based on the first prompt word using a preset large language model.
[0041] The first prompt word is input into the preset large language model, and the preset large language model can generate action decision information of the game task to be tested. Among them, the preset large language model can be, for example, GPT-4o, which can output action decision information corresponding to the game task according to the input prompt word.
[0042] S104. According to the action decision information, information of a target action execution sequence corresponding to the action decision information is sent to the game client device.
[0043] After obtaining the action decision information of the game task to be tested, information of the target action execution sequence corresponding to the action decision information is sent to the game client device according to the action decision information, 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.
[0044] For example, if the action decision information of the game task to be tested is "talk with the target NPC", then the target action execution sequence corresponding to the action decision information is "determine the moving path between the controlled virtual character and the target NPC", "track the moving path to move the controlled virtual character to the vicinity of the target NPC", and "after the controlled virtual character moves to the vicinity of the target NPC, talk with the target NPC".
[0045] In summary, the embodiment of the present application provides a method for automated testing of game tasks, which can generate action decision information for the game task to be tested based on a first prompt word using a preset large language model, thereby achieving efficient and accurate game decision-making. Moreover, when the test task changes, there is no need to retrain the model, and only the first prompt word needs to be updated to generate new action decision information corresponding to the new test task.
[0046] Figure 2 The second flowchart of the game task automation testing method provided in the embodiment of the present application is as follows: Figure 2 As shown, in one embodiment, the step of obtaining the status information of the game task to be tested in S101 includes:
[0047] S201. Obtain game running status data sent by a game client device.
[0048] The game is usually run on a game client device, and the game has a controlled virtual character controlled by the player. The game will continuously generate game running status data during the running process. The electronic device executing this method can obtain the game running status data generated by the game. It should be noted that the game running status data is sent to the electronic device through a specific communication protocol. The use of a specific communication protocol can ensure the stability and accuracy of data transmission.
[0049] S202: extracting status information of the game task to be tested from the game running status data.
[0050] After obtaining the game running status data, some information irrelevant to the game task to be tested is removed to extract the status information of the game task to be tested. For example, if there are 30 pieces of data in the obtained game running status data, of which only 10 are related to the game task to be tested, the redundant 20 pieces of data are filtered out, and only these 10 pieces of data are the status information of the game task to be tested.
[0051] It should be noted that different filtering algorithms and extraction rules may be used for the information filtering and extraction steps. For example, information may be filtered according to its importance, or extracted according to specific keywords.
[0052] In one embodiment, the step of extracting status information of the game task to be tested from the game running status data in S202 may include: extracting specific environment information of the game task to be tested and task description information from the game running status data, that is, the status information of the game task to be tested includes the specific environment information of the game task to be tested and the task description information.
[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, and the position information of the controlled virtual character and the surrounding environment information of the controlled virtual character can be extracted from the character status data and the environment status data as the specific environment information, and the attribute description information and progress description information of the game task to be tested can be extracted from the task status data as the task description information. That is, the specific environment information includes the position information of the controlled virtual character and the surrounding environment information of the controlled virtual character, and the task description information includes the attribute description information and progress description information of the game task to be tested.
[0054] Among them, the position information of the controlled virtual character can be the current coordinate information 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 of the game task automation testing method provided in the embodiment of the present application is as follows: Figure 3 As shown, before executing S102, the method of the present application may further include:
[0056] S301. According to the status information of the game task to be tested, obtain the pre-task information associated with the game task to be tested from the preset task knowledge base.
[0057] The preset task knowledge base pre-stores the pre-task information and post-task information related to the game task to be tested. The pre-task information is the information corresponding to the pre-task that needs to be completed before executing the game task to be tested, and the post-task information is the information corresponding to the post-task that needs to be executed after completing the game task to be tested.
[0058] Before executing step S102, the preceding task information associated with the game task to be tested may be obtained from a preset task knowledge base according to the status information of the game task to be tested, that is, information related to the game task to be tested may be obtained.
[0059] Then, the step S102 of generating a first prompt word according to the status information of the game task to be tested includes:
[0060] S302: Generate a first prompt word according to the status information of the game task to be tested and the information of the previous task.
[0061] After obtaining the previous task information, the status information of the game task to be tested and the previous 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 previous 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] The large language model can comprehensively consider various status details of the game task to be tested, such as task progress, completed subtasks, current difficulties, etc., as well as information about related tasks, such as the order of tasks and interdependencies, so as to more comprehensively and accurately understand the context of the game task to be tested. For example, in a massively multiplayer online role-playing game, a main task may have multiple branch tasks associated with it. By inputting the status and related information of these tasks, the large language model can better grasp the task context of the game task to be tested in the entire game, providing a more realistic basis for subsequent analysis and suggestions, thereby providing more targeted strategies and suggestions, and enhancing the coherence and consistency of the tasks.
[0063] In one embodiment, before executing step S104, the method of the present application also includes: mapping the action decision information into 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 action corresponding to the execution instructions of the target action execution sequence under the game task to be tested.
[0065] The role of the preset decision-action mapping rules is to map the action decision information of the game task to be tested into the execution instructions of the target action execution sequence to ensure that the controlled virtual character can accurately perform the corresponding actual actions in the game. For example, the large language model may generate an action decision information of "pathfinding". Through the preset decision-action mapping rules, the "pathfinding" action decision information can be mapped into a specific action instruction for the controlled virtual character to find the path to a certain NPC or a certain coordinate. Then, the action instruction is sent to the game client device, and the controlled virtual character can perform the corresponding action.
[0066] In this embodiment, mapping is performed through preset decision action mapping rules of the game task to be tested, which can ensure that the controlled virtual character performs actions according to the predetermined logic and sequence, thereby accurately completing various complex game tasks, and also provides the controlled virtual character with a variety of action execution sequences, making its behavior more rich and varied.
[0067] Figure 4 The fourth flowchart of the game task automation testing method provided in the embodiment of the present application is as follows: Figure 4 As shown, before executing S102, the method of the present application may further include:
[0068] S401. Determine, based on the status information of the game task to be tested, whether an action execution sequence of the game task to be tested is cached in a preset task action library.
[0069] The present application may also be provided with a preset task action library, which is used to cache the action execution sequences 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 action execution sequence of the game task to be tested is cached in the preset task action library, that is, to determine whether the game task to be tested has been successfully tested at a historical moment.
[0070] S402: If the action execution sequence of the game task to be tested is not cached in the preset task action library, a first prompt word is generated according to 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 executed for the first time. It is necessary to generate the first prompt word based on the status 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 action execution sequence of the game task to be tested is cached in the preset task action library, 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 game task to be tested.
[0073] If the preset task action library caches the action execution sequence of the game task to be tested, the action execution sequence is directly retrieved from the preset task action library, and the information of the action execution sequence 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.
[0074] In this embodiment, when the preset task action library stores the action execution sequence of the game task to be tested, the action execution sequence cached in the preset task action library is directly used, which avoids repeated acquisition and processing of information and speeds up the execution speed of the game task to be tested.
[0075] An embodiment of the present application also provides an implementation 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, it can also obtain the execution result, which is used to indicate whether the game task to be tested is successfully executed. It can be understood that the execution result is used to indicate whether the controlled virtual character has 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 is executed successfully, the information of the target action execution sequence is cached in a preset task action library.
[0079] If the execution result indicates that the game task to be tested is 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 to be tested is encountered in the future, there is no need to use a large language model. The information of the target action execution sequence can be directly called to achieve control of the controlled virtual object, saving game testing time.
[0080] An embodiment of the present application also provides a solution to the failure of executing the game task to be tested, such as Figure 6 As shown:
[0081] S601. If the execution results of the game task to be tested for a preset number of consecutive times indicate that the game task to be tested has failed, a plurality of historical action execution sequences of the game task to be tested for a preset number of consecutive times and corresponding game task information are obtained.
[0082] As described in the above embodiment, after the game client device executes the game task to be tested, the execution result can also be obtained. If the execution result indicates that the game task to be tested has failed, the steps S101-S103 are re-executed. If it still fails after re-executing S101-S103, and the number of consecutive failures reaches 3 times, multiple historical action execution sequences of the game task to be tested in these three failures and the corresponding game task information are obtained.
[0083] S602: Generate a second prompt word according to a plurality of historical action execution sequences and corresponding game task information.
[0084] Integrate multiple historical action execution sequences and corresponding game task information, input them into a specific correction prompt template, and generate a second prompt word. The specific correction prompt template is a pre-configured correction template. The correction prompt template may include, for example, multiple historical action execution sequences and corresponding game task information areas to be filled.
[0085] S603: Generate action decision correction information of the game task to be tested based on the second prompt word using a preset large language model.
[0086] Then the second prompt word is input into the preset large language model. Since the second prompt word is generated based on multiple failed historical action execution sequences, inputting the second prompt word into the preset large language model can enable the preset large language model to better analyze the cause of the failure and obtain action decision correction information.
[0087] S604. Correct the action decision information according to the action decision correction information to obtain target action decision information.
[0088] According to the action decision correction information, the action decision information is corrected to obtain the target action decision information, which can continuously improve the decision quality to improve the accuracy and success rate of the decision.
[0089] S605. According to the target action decision information, information of a modified action execution sequence corresponding to the target action decision information is sent to the game client device, so that the game client device controls the controlled virtual character to execute the modified action execution sequence under the game task to be tested.
[0090] Finally, the information of the modified action execution sequence 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 modified action execution sequence under the game task to be tested, thereby successfully executing the game task to be tested.
[0091] The following is a corresponding explanation of the device, equipment and storage medium for executing the game task automation testing method provided by any of the above embodiments of the present application. Its specific implementation process and the technical effects produced are the same as those of the corresponding method embodiments mentioned above. For the sake of brief description, for the parts not mentioned in the following embodiments, please refer to the corresponding content in the method embodiments.
[0092] Figure 7 A schematic diagram of the structure of the game task automation testing device provided in the embodiment of the present application, such as Figure 7 As shown, the present application also provides a game task automation testing device, comprising:
[0093] The acquisition module 10 is used to obtain the status information of the game task to be tested.
[0094] The first generating module 20 is used to generate a first prompt word according to the status information of the game task to be tested.
[0095] The second generating module 30 is used to generate action decision information of the game task to be tested according to the first prompt word by using a preset large language model.
[0096] The sending module 40 is used to send information of a 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 controls 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 environment information of the game task to be tested and task description information.
[0098] Optionally, the acquisition module 10 is used to acquire game running status data sent by the game client device; and extract 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 the environment status data as specific environment information; and 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-task information associated with the game task to be tested from a preset task knowledge base according to the status information of the game task to be tested.
[0101] The first generating module 20 is used to generate a first prompt word according to the state information of the game task to be tested and the information of the previous task.
[0102] Optionally, the device also includes a mapping module, which is used to map the action decision information into execution instructions of the target action execution sequence according to the preset decision action mapping rules of the game task to be tested, and the information of the target action execution sequence includes: the execution instructions of the target action execution sequence.
[0103] Optionally, the device further comprises a judgment module, which is used to judge whether an action execution sequence of the game task to be tested is cached in the preset task action library according to the status information of the game task to be tested.
[0104] The first generating module 20 is used to generate a first prompt word according to 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 information of the action execution sequence to the game client device if the action execution sequence of the game task to be tested is cached in the preset task action library, so that the game client device controls the controlled virtual character to execute the action execution sequence under the game task to be tested.
[0106] Optionally, the apparatus further comprises a cache 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 is 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 obtain multiple historical action execution sequences of the game task to be tested for a consecutive preset number of times and corresponding game task information if the execution results of the game task to be tested for a consecutive preset number of times indicate that the game task to be tested has all failed to be executed.
[0108] The first generating module 20 is used to generate a second prompt word according to a plurality of historical action execution sequences and corresponding game task information.
[0109] The second generating module 30 is used to generate action decision correction information of the game task to be tested according to the second prompt word by using a preset large language model.
[0110] The device also includes a correction module, which is used to correct the action decision information according to the action decision correction information to obtain the target action decision information.
[0111] The sending module 40 is used to send information of a modified action execution sequence corresponding to the target action decision information to the game client device according to the target action decision information, so that the game client device controls the controlled virtual character to execute the modified action execution sequence under the game task to be tested.
[0112] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0113] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0114] like Figure 8 As shown, the present 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 and the storage medium communicate through the bus, the processor executes the program instructions, and the implementation method includes:
[0115] Get the status information of the game task to be tested;
[0116] Generate a first prompt word according to the status information of the game task to be tested;
[0117] According to the first prompt word, a preset large language model is used to generate action decision information of the game task to be tested;
[0118] According to the action decision information, information of the target action execution sequence corresponding to the action decision information is sent 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.
[0119] Optionally, the status information of the game task to be tested includes: specific environment information of the game task to be tested and task description information.
[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 running status data.
[0123] Optionally, the game running status data at least includes: 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 running status data, including:
[0125] Extracting the position information of the controlled virtual character and the surrounding environment information of the controlled virtual character from the character state data and the environment state data as the specific environment information;
[0126] The attribute description information and progress description information of the game task to be tested are extracted from the task status data as task description information.
[0127] Optionally, before generating the first prompt word according to the status information of the game task to be tested, the method further includes:
[0128] According to the status information of the game task to be tested, the pre-task information associated with the game task to be tested is obtained from the preset task knowledge base;
[0129] Generate a first prompt word according to the status information of the game task to be tested, including:
[0130] A first prompt word is generated according to the status information of the game task to be tested and the information of the preceding task.
[0131] Optionally, before sending information of a target action execution sequence corresponding to the action decision information to the game client device according to the action decision information, the method further includes:
[0132] According to the preset decision action mapping rule of the game task to be tested, the action decision information is mapped into the execution instruction of the target action execution sequence, and the information of the target action execution sequence includes: the execution instruction of the target action execution sequence.
[0133] Optionally, before generating the first prompt word according to the status information of the game task to be tested, the method further includes:
[0134] According to the status information of the game task to be tested, it is determined whether the action execution sequence of the game task to be tested is cached in the preset task action library;
[0135] Generate a first prompt word according to the status information of the game task to be tested, including:
[0136] If the action execution sequence of the game task to be tested is not cached in the preset task action library, a first prompt word is generated according to the status information of the game task to be tested.
[0137] Optionally, the method further comprises:
[0138] If the action execution sequence of the game task to be tested is cached in the preset task action library, 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 game task to be tested.
[0139] Optionally, after sending information of a target action execution sequence corresponding to the action decision information to the game client device according to the action decision information, the method further includes:
[0140] Obtain the execution result 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 is executed successfully, the information of the target action execution sequence is cached in the preset task action library.
[0142] Optionally, the method further comprises:
[0143] If the execution results of the game task to be tested for a preset number of consecutive times indicate that the game task to be tested has failed to be executed, then obtaining a plurality of historical action execution sequences of the game task to be tested for a preset number of consecutive times and corresponding game task information;
[0144] Generate a second prompt word according to the plurality of historical action execution sequences and the corresponding game task information;
[0145] According to the second prompt word, a preset large language model is used to generate action decision correction information for the game task to be tested;
[0146] According to the action decision correction information, the action decision information is corrected to obtain the target action decision information;
[0147] According to the target action decision information, information of the modified action execution sequence corresponding to the target action decision information is sent to the game client device, so that the game client device controls the controlled virtual character to execute the modified action execution sequence under the game task to be tested.
[0148] The present application also provides a readable storage medium, on which program instructions are stored. When the program instructions are executed by a processor, the method implemented includes:
[0149] Get the status information of the game task to be tested;
[0150] Generate a first prompt word according to the status information of the game task to be tested;
[0151] According to the first prompt word, a preset large language model is used to generate action decision information of the game task to be tested;
[0152] According to the action decision information, information of the target action execution sequence corresponding to the action decision information is sent 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.
[0153] Optionally, the status information of the game task to be tested includes: specific environment information of the game task to be tested and task description information.
[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 running status data.
[0157] Optionally, the game running status data at least includes: 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 running status data, including:
[0159] Extracting the position information of the controlled virtual character and the surrounding environment information of the controlled virtual character from the character state data and the environment state data as the specific environment information;
[0160] The attribute description information and progress description information of the game task to be tested are extracted from the task status data as task description information.
[0161] Optionally, before generating the first prompt word according to the status information of the game task to be tested, the method further includes:
[0162] According to the status information of the game task to be tested, the pre-task information associated with the game task to be tested is obtained from the preset task knowledge base;
[0163] Generate a first prompt word according to the status information of the game task to be tested, including:
[0164] A first prompt word is generated according to the status information of the game task to be tested and the information of the preceding task.
[0165] Optionally, before sending information of a target action execution sequence corresponding to the action decision information to the game client device according to the action decision information, the method further includes:
[0166] According to the preset decision action mapping rule of the game task to be tested, the action decision information is mapped into the execution instruction of the target action execution sequence, and the information of the target action execution sequence includes: the execution instruction of the target action execution sequence.
[0167] Optionally, before generating the first prompt word according to the status information of the game task to be tested, the method further includes:
[0168] According to the status information of the game task to be tested, it is determined whether the action execution sequence of the game task to be tested is cached in the preset task action library;
[0169] Generate a first prompt word according to the status information of the game task to be tested, including:
[0170] If the action execution sequence of the game task to be tested is not cached in the preset task action library, a first prompt word is generated according to the status information of the game task to be tested.
[0171] Optionally, the method further comprises:
[0172] If the action execution sequence of the game task to be tested is cached in the preset task action library, 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 game task to be tested.
[0173] Optionally, after sending information of a target action execution sequence corresponding to the action decision information to the game client device according to the action decision information, the method further includes:
[0174] Obtain the execution result 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 is executed successfully, the information of the target action execution sequence is cached in the preset task action library.
[0176] Optionally, the method further comprises:
[0177] If the execution results of the game task to be tested for a preset number of consecutive times indicate that the game task to be tested has failed to be executed, then obtaining a plurality of historical action execution sequences of the game task to be tested for a preset number of consecutive times and corresponding game task information;
[0178] Generate a second prompt word according to the plurality of historical action execution sequences and the corresponding game task information;
[0179] According to the second prompt word, a preset large language model is used to generate action decision correction information for the game task to be tested;
[0180] According to the action decision correction information, the action decision information is corrected to obtain the target action decision information;
[0181] According to the target action decision information, information of the modified action execution sequence corresponding to the target action decision information is sent to the game client device, so that the game client device controls the controlled virtual character to execute the modified action execution sequence under the game task to be tested.
[0182] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0183] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0184] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0185] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.
[0186] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A game task automation testing method, characterized in that: include: Get the status information of the game task to be tested; Generate a first prompt word according to the status information of the game task to be tested; According to the first prompt word, using a preset large language model, generating action decision information of the game task to be tested; According to the action decision information, information of a target action execution sequence corresponding to the action decision information is sent 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.
2. The method according to claim 1, characterized in that The status information of the game task to be tested includes: specific environment information of the game task to be tested and task description information.
3. The method according to claim 2, characterized in that The step of obtaining the status information of the game task to be tested includes: Obtain game running status data sent by the game client device; The status information of the game task to be tested is extracted from the game running status data.
4. The method according to claim 3, characterized in that The game running status data at least includes: character status data, environment status data and task status data; The step of extracting the status information of the game task to be tested from the game running status data includes: Extracting the position information of the controlled virtual character and the surrounding environment information of the controlled virtual character from the character state data and the environment state data as the specific environment information; The attribute description information and progress description information of the game task to be tested are extracted from the task status data as the task description information.
5. The method according to claim 1, characterized in that Before generating the first prompt word according to the status information of the game task to be tested, the method further includes: According to the status information of the game task to be tested, obtaining the pre-task information associated with the game task to be tested from the preset task knowledge base; The step of generating a first prompt word according to the status information of the game task to be tested comprises: The first prompt word is generated according to the status information of the game task to be tested and the preceding task information.
6. The method according to claim 1, characterized in that Before sending information of a target action execution sequence corresponding to the action decision information to the game client device according to the action decision information, the method further includes: According to the preset decision action mapping rule of the game task to be tested, the action decision information is mapped into the execution instruction of the target action execution sequence, and the information of the target action execution sequence includes: the execution instruction of the target action execution sequence.
7. The method according to claim 1, characterized in that Before generating the first prompt word according to the status information of the game task to be tested, the method further includes: According to the state information of the game task to be tested, determining whether the action execution sequence of the game task to be tested is cached in the preset task action library; The step of generating a first prompt word according to the status information of the game task to be tested comprises: If the action execution sequence of the game task to be tested is not cached in the preset task action library, the first prompt word is generated according to the status information of the game task to be tested.
8. The method according to claim 7, characterized in that The method further comprises: If the action execution sequence of the game task to be tested is cached in the preset task action library, 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 perform the action execution sequence under the game task to be tested.
9. The method according to claim 1, characterized in that: After sending information of a target action execution sequence corresponding to the action decision information to the game client device according to the action decision information, the method further includes: 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 is executed successfully, the information of the target action execution sequence is cached in a preset task action library.
10. The method according to claim 9, characterized in that The method further comprises: If the execution results of the game task to be tested for a consecutive preset number of times indicate that the game task to be tested has all failed to be executed, then obtaining a plurality of historical action execution sequences of the game task to be tested for the consecutive preset number of times and corresponding game task information; Generate a second prompt word according to the plurality of historical action execution sequences and corresponding game task information; According to the second prompt word, the preset large language model is used to generate action decision correction information of the game task to be tested; According to the action decision correction information, the action decision information is corrected to obtain target action decision information; According to the target action decision information, information of a modified action execution sequence corresponding to the target action decision information is sent to the game client device, so that the game client device controls the controlled virtual character to execute the modified action execution sequence under the game task to be tested.
11. A game task automation testing device, characterized in that: include: The acquisition module is used to obtain the status information of the game task to be tested; A first generating module, used for generating a first prompt word according to the state information of the game task to be tested; A second generating module is used to generate action decision information of the game task to be tested according to the first prompt word by using a preset large language model; The sending module is used to send information of a 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 controls the controlled virtual character to execute the target action execution sequence under the game task to be tested.
12. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the program instructions to implement the game task automation testing method described in any one of claims 1 to 10.
13. A readable storage medium, characterized in that: The readable storage medium stores program instructions, and when the program instructions are executed by a processor, the game task automation testing method described in any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Program testing method and device, electronic equipment and computer readable storage medium
CN114185773A
Large language model vulnerability testing method and device based on role playing
CN118171285A
Application program testing method and device and medium
CN118445192A
Automatic testing method and device based on large model, and electronic equipment
CN119127686A
Game decision model training method and device, storage medium and electronic equipment
CN119202730A