Game resource data monitoring method, device, computer equipment and storage medium
By using the game engine to read and compare game resource data in game resource data monitoring, the problem of low efficiency of traditional methods is solved, and more efficient game resource data monitoring and project development efficiency is achieved.
Patent Information
- Application Number
- CN202010182076.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-16
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2040-03-16
AI Technical Summary
Traditional game resource data monitoring methods are inefficient and take a long time, making it difficult to accurately monitor the addition, deletion and modification of game resources.
By obtaining game resource data monitoring requests, loading game resources in the target game, using the game engine type of the target game to be tested, reading the game resource data to be tested from the game process, and comparing it with the historical resource data to obtain game resource change data.
It realizes more efficient game resource data monitoring, shortens monitoring time, accurately locates test content, reduces test workload, and improves project development efficiency.
Smart Images

Figure CN111389014B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, computer equipment and storage medium for monitoring game resource data. Background Art
[0002] With the development of computer technology, electronic games have emerged. Electronic games refer to all interactive games that rely on electronic equipment platforms. In electronic game projects, game resources are one of the files with the largest number and the largest space occupation. During the development of the game version, the game resource files will gradually change with the progress of development. In the testing of electronic games, it is necessary to test the game resources during the development process. If the differences in the internal resources of the game can be obtained, such as the modification of map scenes, game characters, props, etc., the test content of each test can be accurately located, the test points can be reduced, the test workload can be reduced, and the project development efficiency can be improved.
[0003] In traditional technology, the solution for game resource data monitoring is generally a static resource precision monitoring solution, which mainly involves writing scripts to sort out the organizational relationship of resource files, find the corresponding static resource files, and analyze the submission logs of static resource files to obtain the addition, deletion, and modification of resource files, thereby achieving the purpose of monitoring. However, this static resource monitoring solution takes too long to complete a resource monitoring, and the efficiency of resource monitoring is low. Summary of the invention
[0004] Based on this, it is necessary to provide a game resource data monitoring method, device, computer equipment and storage medium that can effectively improve the efficiency of game resource data monitoring in response to the above technical problems.
[0005] A method for monitoring game resource data, the method comprising:
[0006] Get game resource data monitoring request;
[0007] Loading game resources in the target game according to the game resource monitoring request;
[0008] When the game resource combination is loaded, the game resource data to be tested corresponding to the game resource is read from the game process of the target game according to the game engine type of the target game;
[0009] Search for historical resource data corresponding to the game resource data to be tested, compare the historical resource data with the game resource data to be tested, and obtain game resource change data.
[0010] A game resource data monitoring device, the device comprising:
[0011] Request acquisition module, used to obtain game resource data monitoring requests;
[0012] A resource loading module, used to load game resources in a target game according to the game resource monitoring request;
[0013] A data reading module, used for reading the game resource data to be tested corresponding to the game resource from the game process of the target game according to the game engine type of the target game when the game resource combination is loaded;
[0014] The data monitoring module is used to search for historical resource data corresponding to the game resource data to be tested, compare the historical resource data with the game resource data to be tested, and obtain game resource change data.
[0015] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0016] Get game resource data monitoring request;
[0017] Loading game resources in the target game according to the game resource monitoring request;
[0018] When the game resource combination is loaded, the game resource data to be tested corresponding to the game resource is read from the game process of the target game according to the game engine type of the target game;
[0019] Search for historical resource data corresponding to the game resource data to be tested, compare the historical resource data with the game resource data to be tested, and obtain game resource change data.
[0020] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0021] Get game resource data monitoring request;
[0022] Loading game resources in the target game according to the game resource monitoring request;
[0023] When the game resource combination is loaded, the game resource data to be tested corresponding to the game resource is read from the game process of the target game according to the game engine type of the target game;
[0024] Search for historical resource data corresponding to the game resource data to be tested, compare the historical resource data with the game resource data to be tested, and obtain game resource change data.
[0025] The above-mentioned game resource data monitoring method, device, computer equipment and storage medium obtain a game resource data monitoring request; load the game resources in the target game according to the game resource monitoring request; when the game resource combination is loaded, read the game resource data to be tested corresponding to the game resources from the game process of the target game according to the game engine type of the target game; find the historical resource data corresponding to the game resource data to be tested, compare the historical resource data and the game resource data to be tested, and obtain the game resource change data. This application reads the game resource data to be tested corresponding to the game resources in the game process according to the game engine type of the target game, and then compares it with the historical resource data of the historical version to achieve the purpose of game resource data monitoring. When the game resource combination is loaded, the game resource data to be tested is obtained, and the complete game resource data can be obtained without sorting out the organizational relationship of the resources, which can achieve more efficient game resource data monitoring. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A diagram showing an application environment of a method for monitoring game resource data in an embodiment;
[0027] Figure 2 A flowchart of a method for monitoring game resource data in one embodiment;
[0028] Figure 3 A schematic diagram of a flow chart of the steps of loading game resources in a target game in one embodiment;
[0029] Figure 4 A schematic flow chart of the steps of loading game resources in a target game in another embodiment;
[0030] Figure 5 A schematic diagram of a flow chart of the steps of reading game resource data to be tested in one embodiment;
[0031] Figure 6 A schematic diagram of a flow chart of the steps of reading game resource data to be tested in another embodiment;
[0032] Figure 7 A flowchart of the steps of converting the data format of the game resource data to be tested into the GLTF format in one embodiment;
[0033] Figure 8 A schematic diagram of the structure of a GLTF format file in one embodiment;
[0034] Fig. 9 It is a schematic diagram of combining a GLTF file, a BIN file and an image file into an improved GLTF format file in one embodiment;
[0035] Fig.10A schematic diagram of a process for obtaining game resource change data in one embodiment;
[0036] Fig.11 is a schematic diagram of game resources in one embodiment;
[0037] Fig.12 A schematic diagram of game resource change data in one embodiment;
[0038] Fig.13 A flowchart of a method for monitoring game resource data of the present application in one embodiment;
[0039] Fig.14 A flowchart of a method for monitoring game resource data in another embodiment;
[0040] Fig.15 is a structural block diagram of a game resource data monitoring device in one embodiment;
[0041] Fig.16 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0043] The game resource data monitoring method provided in this application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the data monitoring server 104 through the network. When the user corresponding to the terminal 102 wants to monitor the game resource data in the target game, the user can send a game resource data monitoring request to the data monitoring server 104 through the terminal 102 to request the data monitoring server 104 to complete the game resource data monitoring of the target game, and the data monitoring server 104 obtains the game resource data monitoring request; loads the game resources in the target game according to the game resource monitoring request; when the game resource combination is loaded, reads the game resource data to be tested corresponding to the game resource from the game process of the target game according to the game engine type of the target game; finds the historical resource data corresponding to the game resource data to be tested, compares the historical resource data and the game resource data to be tested, and obtains the game resource change data. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the data monitoring server 104 can be implemented with an independent server or a server cluster composed of multiple servers.
[0044] In one embodiment, Figure 2 As shown, a method for monitoring game resource data is provided, and the method is applied to Figure 1 The data monitoring server 104 in the example is used as an example to illustrate, and the following steps are included:
[0045] Step 201, obtaining a game resource data monitoring request.
[0046] The game resource data monitoring request is a request sent by the terminal 102 to the data monitoring server 104, and the purpose is to request the data monitoring server 104 to perform a complete monitoring of all game resource data in the target game. Game resource data monitoring refers to sorting out and monitoring the game resource files corresponding to the target game according to the organizational relationship of the resource data itself. When the resource data is modified, the corresponding resource file can be located through a game resource data monitoring.
[0047] Specifically, when the user is developing a new game project, or updating an existing game version, it is necessary to determine where the current game has changed relative to the previous version of the game. At this time, the user can generate a game resource data monitoring request on the terminal 102 side, and the game resource data monitoring request carries the address information corresponding to the target game. In one embodiment, the information also includes the version information of the target game requested to be monitored by the current game resource data monitoring request. The data monitoring server 104 can search for the target game according to the address information according to the game resource data monitoring request, and check the target game at the address based on the version information. When the version check is wrong, the corresponding version error information can be fed back to the terminal. When the version check is successful, the process of game resource data monitoring can be started.
[0048] S203: Loading game resources in the target game according to the game resource monitoring request.
[0049] Among them, the target game refers to the game to be monitored corresponding to the game resource data monitoring request, and the purpose of the game resource data monitoring request is to realize the monitoring of the game resource data corresponding to the target game. Game resources refer to the map scenes, game characters and props inside the game, and the target game can load game resources through the game resource data corresponding to the game resources. Generally, in a game project, game resource data is one of the files with the largest number and the largest space occupation. During the game development process or version update process, if an accurate and effective method can be found to monitor the addition, deletion and modification of game resource data, the resource differences of the game version after a period of development can be found, such as the modification of those map scenes, game characters, props, etc., so as to accurately locate the test content, reduce the test points, reduce the test workload, and improve the project development efficiency. The purpose of the game resource data monitoring of this application is to improve the efficiency of game resource data monitoring, thereby improving the efficiency of game project development.
[0050] Specifically, loading the game resources in the target game according to the game resource monitoring request specifically refers to triggering the game to load the game resources by itself through operation. This process is generally implemented by the game engine that comes with the game. In one embodiment, the game resources in the target game can be loaded in a code-driven manner. For example, the corresponding resource trigger script can be written, and then the resource trigger script is run on the game editor corresponding to the target game, and the corresponding resource loading function is called by the resource trigger script to load the game resources. In another embodiment, the loading of game resources can be realized in an instruction-driven manner, such as the instruction of the player controlling the display of game resources in the game display interface can be simulated by a resource trigger instruction, and then the triggering of the game resources is triggered by loading the resource trigger instruction in the target game process. The game resources in the loaded target game can be some specified game resources, or all game resources in the target game.
[0051] S205, when the game resource combination is loaded, the game resource data to be tested corresponding to the game resources is read from the game process of the target game according to the game engine type of the target game.
[0052] Among them, reading the game resource data to be tested corresponding to the game resources from the game process of the target game can be achieved through the method provided by the game engine corresponding to the target game to access the game resource data stored in the memory. For each game developed by an engine, the engine itself provides a method for accessing the resource data stored in the memory. For example, for the unity engine, the method provided for obtaining the mesh component is gameobject.GetComponent <meshfilter>(), through the methods provided by the engine, the data of all components corresponding to the game resources can be read from the memory. Game resource data corresponds to game resources. For example, when the game resource is a map, the game resource data can be the components of the map, such as the map corresponding to the map. Figure 3 dimensional models, map texture maps, and other data. When the game engine needs to load game resources, it can call the resource components corresponding to the game resources from the game data in the hard disk, and then combine the resource components into game resources through the combination method corresponding to the game resources currently to be loaded. The data file corresponding to the combined components is the game resource data to be tested in this solution.
[0053] Specifically, the data monitoring server 104 can monitor the loading of game resources in the game process of the target game. After the resource data is loaded, the data monitoring server 104 can read the game resource data to be tested corresponding to the loaded game resources in the memory of the host computer running the target game through the resource data access method provided by the game engine corresponding to the target game, and save it. By collecting all the data of the game resources and keeping them when the game is running and loading resources. Compared with the existing game resource data monitoring method, this dynamic game resource data monitoring solution does not need to traverse resources through pre-written scripts, but cleverly uses the game engine that comes with the game to load game resources. When the game engine is loaded, it directly "steals" the required game resource data from the running memory, thereby achieving the purpose of obtaining game resource data. Because it is not necessary to write a script to traverse resources by yourself, but the game engine traverses resources by itself, it can be achieved that resources are guaranteed to be non-missing. In addition, the game engine uses the engine's native function to load resources, and loading resources is extremely efficient (because if the engine cannot be efficient, the player will be very stuck when playing games). This application can set different methods for different game engines to obtain the game resource data to be tested, which is equivalent to developing a software for each engine to specifically monitor the game resource data, thereby greatly improving the efficiency of game resource monitoring.
[0054] S207, searching for historical resource data corresponding to the game resource data to be tested, comparing the historical resource data with the game resource data to be tested, and obtaining game resource change data.
[0055] The historical resource data may be the resource data in the previous version corresponding to the current target game. By comparing the game resource data in the current version with the game resource data in the previous version of the target game, it is possible to determine which game resource data has changed in the version update. Game resource change data refers to the data in the game resource data that has changed.
[0056] Specifically, after obtaining the game resource data to be tested corresponding to the current game resources, the data monitoring server 104 can read the game resource data of the previous version corresponding to the current target game from the preset historical resource database, and then determine which data has changed in the version upgrade by comparing the game resource data of the two versions, so as to accurately locate the test content corresponding to the current version of the game, reduce the test points of the game, reduce the test workload, and improve the efficiency of game project development. In one of the embodiments, after reading and obtaining the game resource data to be tested, it can be saved in the preset historical resource database for the next game resource data monitoring. In one of the embodiments, the game resource comparison process can be completed more efficiently by converting the game resource data to be tested into a file in the GLTF (The GL Transmission Format, Graphics Language Interchange Format) format and comparing it with the historical resource data in the GLTF format.
[0057] The above-mentioned game resource data monitoring method obtains a game resource data monitoring request; loads the game resources in the target game according to the game resource monitoring request; when the game resource combination is loaded, reads the game resource data to be tested corresponding to the game resources from the game process of the target game according to the game engine type of the target game; searches for the historical resource data corresponding to the game resource data to be tested, compares the historical resource data with the game resource data to be tested, and obtains the game resource change data. This application reads the game resource data to be tested corresponding to the game resources in the game process according to the game engine type of the target game, and then compares it with the historical resource data of the historical version to achieve the purpose of game resource data monitoring. When the game resource combination is loaded, the game resource data to be tested is obtained, and the complete game resource data can be obtained without sorting out the organizational relationship of the resources, which can achieve more efficient game resource data monitoring.
[0058] In one embodiment, Figure 3 As shown, step 203 includes:
[0059] Step 302: Call the game editor corresponding to the target game according to the game resource monitoring request.
[0060] Step 304: Call the preset resource loading script through the game editor, execute the preset resource loading script, and load the game resources in the target game.
[0061] The game editor refers to an engine tool provided by the game engine that can run edited scripts. Each game engine has its corresponding game editor. The preset resource loading script refers to a pre-compiled script that can be run in the game editor. In the scheme of the present application, the preset resource loading script is used to call game resources in the game process of the target game started in the game editor, such as calling the map scene, game props and game characters in the game, so that the game engine can load the game resource data corresponding to these game resources into the running memory of the terminal device on the terminal device where the game is running.
[0062] Specifically, the data monitoring server 104 can run a preset resource loading script in the game editor, and call the loading function corresponding to the game resource through the resource loading script to start the game process and load the target game resource corresponding to the game resource data monitoring request in the game process. Because when the game is running, when the game resources need to be loaded, it is necessary to render the picture in the game process at the same time. At this time, the game process will call the native method of the game engine itself to organize the game resource data. When the game engine organizes and saves it to the memory, the present application obtains the game resource data to be tested required for game resource data monitoring by directly obtaining the organized resources and their organizational relationship from the memory, and obtains the game resource data to be tested in a "sit back and enjoy" manner without organizing the organizational relationship of the game resource data, thereby improving the processing efficiency of the game resource monitoring process.
[0063] In one embodiment, Figure 4 As shown, step 203 includes:
[0064] Step 401: Generate a game resource trigger instruction according to a game resource monitoring request.
[0065] Step 403: Send a game resource trigger instruction to the game process of the target game, and load the game resources in the target game through the game process of the target game.
[0066] Among them, the game resource trigger instruction specifically refers to triggering the game resources by simulating human operations. For example, for a target game, it includes a game map. When a player needs to view a certain map, the game map can be triggered by clicking the corresponding interface button. The game process can load and display the game map on the game interface through the player's trigger instruction for the game map. The game map is the game resource referred to in this application, and the game resource trigger instruction can be regarded as the process of simulating the player clicking the interface button corresponding to the game map. Since game resources are data that can be displayed on the game interface by responding to the player's operation, the game resource trigger instruction can be used to simulate the player's command to complete the triggering process of the game resource. The game process loads the corresponding game resources onto the game interface, and the game resource data corresponding to the game resource will also be organized by the game engine and loaded into the memory of the terminal device where the game is located.
[0067] Specifically, the data monitoring server 104 can simulate the triggering process of the game resources by the players during the game process, and abstract it into a game resource triggering instruction, and then trigger the game resources in the game process of the target game through the game resource triggering instruction, so as to perform subsequent game resource reading operations. In this embodiment, the triggering of the game resources is completed through the game resource triggering instruction, which can achieve the purpose of effectively triggering the game resources in the game process of the target game.
[0068] In one embodiment, Figure 5 As shown, step 205 includes:
[0069] Step 502: When the game resource loading is completed, identify the component category of the game resource component corresponding to the game resource data to be tested.
[0070] Step 504: Obtain a memory data calling method corresponding to a component category according to the game engine type of the target game.
[0071] Step 506, reading the game resource component through the memory data calling method;
[0072] Step 508, obtaining the game resource data to be tested according to the game resource component.
[0073] Among them, the component category of the game resource component corresponding to the game resource data specifically refers to the component type data corresponding to the game resource data. The game resource data corresponding to a game resource contains multiple game resource components, and these resource components are combined into a game resource data. In one embodiment, the target game is specifically a game developed by the unity engine, and the data types corresponding to the game resource data specifically include mesh components, effect components, physics components, navigation components, audio components, miscellaneous components, etc. All game engines provide methods for accessing game resources. When developing a game, it is necessary to obtain the game resource object by writing the corresponding game code in order to use the game resources in the game. Therefore, the game engine must provide methods for accessing game resources. Through these methods, the data of the game resources can be easily obtained from the memory. For example, in a specific embodiment, the target game is a game developed by the unity engine, and the calling method for obtaining the game resource data corresponding to the mesh component is gameobject.GetComponent <meshfilter>(). The calling method to obtain the game resource data corresponding to the effect component from the memory is gameobject.GetComponent <particlesystem>().
[0074] Specifically, after the game resources are loaded, the game resource data is stored in the running memory in the form of components. When the game resource data to be tested in the target game needs to be obtained, the game resource data in the memory can be identified first, and then the game resource components can be read by calling the memory data corresponding to these game resource components to access the game resource data to be tested stored in the running memory, and then the game resource data reading and saving process is realized by splicing the game resource components. At the same time, since the game process will call the native method of the game engine itself to organize the game resource data during the loading process of the game resources, when the game engine is organized and saved to the memory, the game resource data in the memory is already the data of the organizational relationship of each game resource component. The present application obtains the game resource data to be tested required for game resource data monitoring by directly obtaining the organized resources and their organizational relationship from the memory, and obtains the game resource data to be tested in a "sit back and enjoy" manner without organizing the organizational relationship of the game resource data, thereby improving the processing efficiency of the game resource monitoring process.
[0075] In one embodiment, Figure 6 As shown, step 508 includes:
[0076] Step 601, obtain the component splicing directory corresponding to the game resources, and splice the game resource components into the game resource data to be tested according to the component splicing directory.
[0077] Step 603: Convert the data format of the game resource data to be tested into GLTF format.
[0078] Among them, the component splicing directory refers to the organization method of each game component stored in the memory, and the game resource data can be obtained by splicing the game resource components in the form of a component splicing directory. The GLTF format is a graphics language exchange format, which is a 3D model format specially designed for transmission. At present, most 3D model formats can be converted to and from the GLTF format. When the solution of the present application is mainly used to realize data monitoring of game resource data in a 3D game, data monitoring can be realized by converting the resource data into the GLTF format. Regardless of the type of game resources, they can be uniformly converted into two files and a bunch of image files, two of which are .gltf files and .bin files. Among them, the .gltf file saves the numerical value of the game resources and the organizational relationship of the game resources, and some binary data (such as mesh models, etc.) are saved as .bin files.
[0079] Specifically, after the game resources are loaded, the data monitoring server 104 can also read the organizational relationship of each game resource component in the memory after obtaining the game resource component, that is, the component splicing directory. Then the server can splice each game resource component according to the component splicing directory to obtain the final game resource data to be tested. At the same time, in order to conveniently save the game resource data and realize the comparison of game resource data under different versions, the obtained game resource data can be converted into a data file in GLTF format. In this embodiment, through the component splicing directory, the purpose of more effectively obtaining the game resource data to be tested can be achieved. At the same time, by converting the data format of the game resource data to be tested into the GLTF format. The preservation of the game resource data to be tested and the comparison of different game resource data to be tested can be achieved more efficiently.
[0080] In one embodiment, Figure 7 As shown, step 603 includes:
[0081] Step 702, convert the game resource data to be tested into an initial GLTF format file, a BIN format file and a resource image file.
[0082] Step 704, converting the BIN format file and the resource image file into an MD5 code file.
[0083] Step 706, obtaining game resource data in GLTF format according to the initial GLTF format file and the MD5 code file.
[0084] Among them, BIN format files refer to binary files, and their use depends on the system or application. Specifically, it refers to files with the suffix ".bin", which just indicates that it is in binary format. For example, virtual CD-ROM files often use ".bin" as the suffix. BIN format files are generally machine code, the result of assembly language compilation. The MD5 code refers to the digital number obtained by the MD5 message digest algorithm. The MD5 message digest algorithm is a widely used cryptographic hash function that can generate a 128-bit (16-byte) hash value (hash value) to ensure that information transmission is complete and consistent. This application obtains the required MD5 code by using the MD5 message digest algorithm on BIN format files and resource image files.
[0085] Specifically, in order to further facilitate the comparison of game resource data to be tested between different versions, the present application can also convert the BIN format file and the resource image file into MD5 code, and then save the MD5 code into a GLTF format file. In this way, for a game resource data to be tested, it corresponds to a GLTF format file, and the comparison of game resource data to be tested between different versions only needs to compare the GLTF format file, which can effectively shorten the process of game resource data comparison. In one embodiment, the data structure of the GLTF format file in the present application is as follows: Figure 8 As shown in the figure, it includes many nodes such as node, camera, mesh, animation, material, accessor, texture, bufferview, sampler, image, buffer, etc. In addition, it also includes the MD5 node corresponding to the image and the MD5 node corresponding to the BIN file. In addition, you can also refer to Fig. 9 , this application generates an improved version of the GLTF format file by combining the initial GLTF format file, BIN file, and image file into one. Among them, the BIN file and the image file are converted into data blocks MD5 and written into the original initial GLTF format file. The comparison of the original three files becomes only the comparison of the GLTF format file, which can obviously effectively shorten the comparison process and improve the efficiency of the comparison. In this embodiment, by improving the GLTF format file, converting the BIN file and the image file into MD5 codes and storing them in the GLTF format file, it is possible to improve the comparison efficiency of the game resource data and shorten the comparison time when comparing different versions of game resource data.
[0086] In one embodiment, Fig.10 As shown, step 207 includes:
[0087] Step 801, searching for historical resource data corresponding to the game resource data to be tested.
[0088] Step 803 , compare the data files at each file node in the GLTF format file corresponding to the game resource data to be tested and the GLTF format file corresponding to the historical resource data.
[0089] Step 805: When the data files are not the same, determine that the game resource data to be tested is game resource change data.
[0090] Among them, each file node refers to the node node in the GLTF format file, camera node, mesh node, animation node, material node, accessor node, texture node, bufferview node, sampler node, image node, buffer node, MD5 node corresponding to the image, MD5 node corresponding to the BIN file, and many other nodes. By comparing the data in the two nodes, it can be determined whether the two GLTF format files are the same, and then it can be determined whether the game resource data to be tested corresponding to the GLTF format file has been changed in the current game version, and then it can be determined whether it should be included in the scope of the game version test.
[0091] Specifically, historical resource data is stored in a preset historical resource database. The game resource data in the previous version of the current target game in the historical resource database can be queried according to the version number of the current target game, and used as historical resource data. The historical resource data found also corresponds to a file in GLTF format, and the comparison of two GLTF format files is essentially the comparison of the corresponding data of each file node in the two GLTF format files. The corresponding data is obtained through the file nodes. When the data at that file node is different, it can be determined that the game resource data corresponding to this GLTF format file has changed, and it should be tested accordingly. In this embodiment, by comparing each file node of the GLTF format file, the game resource change data required for game resource data monitoring can be obtained more efficiently.
[0092] The present application also provides an application scenario, and the application scenario applies the above-mentioned game resource data monitoring method. Specifically, the application of the game resource data monitoring method in the application scenario is as follows:
[0093] In this application scenario, the game resource data monitoring of the present application is specifically used to monitor the game resource data of an FPS (First-person shooting game) mobile game. The development engine of the FPS mobile game is the unity engine. When the FPS mobile game is updating the game version, it is necessary to test the game version. At this time, it is necessary to compare the game resource data in the updated version with the current game version to determine which game resources have changed, and then perform corresponding tests on the changed game resources. A game resource of the FPS mobile game can be specifically referred to Fig.11 In addition, game resources can also be data such as character models and three-dimensional map models. At this time, the game resource data that has changed can be determined through the game resource data monitoring of the present application, and then determine which game resources have changed in the version update. Specifically, the tester can first send a game resource data monitoring request to the data monitoring server 104 used to implement the game resource data monitoring method of the present application. The data monitoring server 104 receives the game resource data monitoring request, and then calls the game editor corresponding to the target game according to the game resource monitoring request; calls the preset resource loading script through the game editor, and executes the preset resource loading script to load the game resources in the target game. When the game resources are loaded, identify the component category of the game resource component corresponding to the game resource data to be tested; obtain the memory data calling method corresponding to the component category; read the game resource component through the memory data calling method; obtain the component splicing directory corresponding to the game resource, and splice the game resource component into the game resource data to be tested according to the component splicing directory; convert the game resource data to be tested into the initial GLTF format file, BIN format file and resource image file; convert the BIN format file and the resource image file into an MD5 code file; obtain the game resource component in GLTF format according to the initial GLTF format file and the MD5 code file. Finally, search for the historical resource data corresponding to the game resource data to be tested; compare the data files at each file node in the GLTF format file corresponding to the game resource data to be tested and the GLTF format file corresponding to the historical resource data; when the data files are different, determine that the game resource data to be tested is game resource change data. Specifically, when the game resource data monitoring method of the present application is used to monitor the props of the FPS game, the obtained complete game resource change data can be referred to Fig.12 .
[0094] The present application also provides an application scenario, which applies the above-mentioned game resource data monitoring method. Specifically, the application of the game resource data monitoring method in this application scenario can refer to Fig.13 as follows:
[0095] like Fig.14 As shown, the game resource data monitoring of the present application is used to monitor the resources of a client game written by the unity engine. The client game can be saved in the computer hard disk. The game consists of client code, and the game resources included are: textures, materials, meshes, etc. When it is necessary to monitor a map resource data in the game, the map resource can be loaded through the unity editor first, and then the native function of the game engine is used to sort out the relationship between the map resources, and the map is combined and saved in the memory, and then the entire map resource is passed to the GPU (Graphics Processing Unit, graphics processor), and then drawn on the computer monitor. In this process, the game client has sorted out the index relationship of the map resource and saved it in the memory. The game resource data monitoring method of the present application cleverly uses the ready-made game resource data, that is, directly "steals" the game resource data from the memory, and saves it in a resource storage format that is easy to save and compare. After saving the resource data, the resource data of the current version is compared with the resource data of the previous version, and the resource difference can be obtained, and finally the difference result is output, thereby realizing accurate resource monitoring.
[0096] It should be understood that although Fig.14 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Fig.14 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0097] In one embodiment, Fig.15 As shown, a game resource data monitoring device is provided, which can adopt a software module or a hardware module, or a combination of the two to become a part of a computer device. The device specifically includes: a request acquisition module, a resource loading module, a data reading module and a data monitoring module, wherein:
[0098] The request acquisition module 902 is used to obtain a game resource data monitoring request.
[0099] The resource loading module 904 is used to load the game resources in the target game according to the game resource monitoring request.
[0100] The data reading module 906 is used to read the game resource data to be tested corresponding to the game resources from the game process of the target game according to the game engine type of the target game when the game resource combination is loaded.
[0101] The data monitoring module 908 is used to search for historical resource data corresponding to the game resource data to be tested, compare the historical resource data with the game resource data to be tested, and obtain game resource change data.
[0102] In one embodiment, the resource loading module 904 is specifically used to: call the game editor corresponding to the target game according to the game resource monitoring request; call the preset resource loading script through the game editor, and execute the preset resource loading script to load the game resources in the target game.
[0103] In one embodiment, the resource loading module 904 is specifically used to: generate a game resource trigger instruction according to a game resource monitoring request; send the game resource trigger instruction to the game process of the target game, and load the game resources in the target game through the game process of the target game.
[0104] In one embodiment, the data reading module 906 is used to: when the game resources are loaded, identify the component category of the game resource component corresponding to the game resource data to be tested; obtain the memory data calling method corresponding to the component category of the game resource component according to the game engine type of the target game; read the game resource component through the memory data calling method; obtain the game resource data to be tested according to the game resource component.
[0105] In one embodiment, the data reading module 906 is further used to: obtain a component splicing directory corresponding to the game resources, splice the game resource components into the game resource data to be tested according to the component splicing directory; and convert the data format of the game resource data to be tested into a GLTF format.
[0106] In one embodiment, the data reading module 906 is also used to: convert the game resource data to be tested into an initial GLTF format file, a BIN format file and a resource image file; convert the BIN format file and the resource image file into an MD5 code file; and obtain the game resource component in GLTF format according to the initial GLTF format file and the MD5 code file.
[0107] In one embodiment, the data monitoring module 908 is specifically used to: search for historical resource data corresponding to the game resource data to be tested; compare the data files at each file node in the GLTF format file corresponding to the game resource data to be tested and the GLTF format file corresponding to the historical resource data; when the data files are different, determine that the game resource data to be tested is game resource change data.
[0108] The specific definition of the game resource data monitoring device can be found in the definition of the game resource data monitoring method above, which will not be repeated here. Each module in the above-mentioned game resource data monitoring device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0109] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.16 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store game resource data monitoring data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a game resource data monitoring method is implemented.
[0110] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.16 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a game resource data monitoring method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0111] Those skilled in the art will understand that Fig.16 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0112] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0113] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0114] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0115] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0116] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.< / particlesystem> < / meshfilter> < / meshfilter>
Claims
1. A method for monitoring game resource data, the method comprising: Get game resource data monitoring request; According to the game resource monitoring request, loading the game resources in the target game in the game process of the target game; When the game resource is loaded, identify the component category of the game resource component corresponding to the game resource data to be tested; According to the game engine type of the target game, obtaining the memory data calling method corresponding to the component category; Read the game resource component through the memory data calling method; Obtain a component splicing directory corresponding to the game resource, and splice the game resource components into the game resource data to be tested according to the component splicing directory, wherein the component splicing directory is data storing the organizational relationship of each game component in the memory; Convert the game resource data to be tested into an initial GLTF format file, a BIN format file and a resource image file; Convert the BIN format file and the resource image file into MD5 code files; According to the initial GLTF format file and the MD5 code file, obtain the game resource data in GLTF format; Search for historical resource data corresponding to the game resource data to be tested, compare the historical resource data with the game resource data to be tested, and obtain game resource change data.
2. The method according to claim 1, characterized in that The step of loading the game resources in the target game in the game process of the target game according to the game resource monitoring request includes: Calling a game editor corresponding to the target game according to the game resource monitoring request; The preset resource loading script is called through the game editor, and the preset resource loading script is executed to load the game resources in the target game during the game process of the target game.
3. The method according to claim 1, characterized in that The step of loading the game resources in the target game in the game process of the target game according to the game resource monitoring request includes: Generate a game resource trigger instruction according to the game resource monitoring request; The game resource trigger instruction is sent to the game process of the target game, and the game resources in the target game are loaded through the game process of the target game.
4. The method according to claim 1, characterized in that The searching for historical resource data corresponding to the game resource data to be tested, comparing the historical resource data with the game resource data to be tested, and obtaining the game resource change data comprises: Searching for historical resource data corresponding to the game resource data to be tested; Compare the data files at each file node in the GLTF format file corresponding to the game resource data to be tested and the GLTF format file corresponding to the historical resource data; When the data files are not the same, it is determined that the game resource data to be tested is game resource change data.
5. A game resource data monitoring device, characterized in that: The device comprises: Request acquisition module, used to obtain game resource data monitoring requests; A resource loading module, used to load game resources in a target game in a game process of the target game according to the game resource monitoring request; A data reading module is used to identify the component category of the game resource component corresponding to the game resource data to be tested when the game resource loading is completed; obtain the memory data calling method corresponding to the component category according to the game engine type of the target game; read the game resource component through the memory data calling method; obtain the component splicing directory corresponding to the game resource, and splice the game resource component into the game resource data to be tested according to the component splicing directory, and the component splicing directory is the data storing the organizational relationship of each game component in the memory; convert the game resource data to be tested into an initial GLTF format file, a BIN format file and a resource image file; convert the BIN format file and the resource image file into an MD5 code file; obtain the game resource data in GLTF format according to the initial GLTF format file and the MD5 code file; The data monitoring module is used to search for historical resource data corresponding to the game resource data to be tested, compare the historical resource data with the game resource data to be tested, and obtain game resource change data.
6. The device according to claim 5, characterized in that The resource loading module is specifically used to: call the game editor corresponding to the target game according to the game resource monitoring request; call a preset resource loading script through the game editor, execute the preset resource loading script, and load the game resources in the target game in the game process of the target game.
7. The device according to claim 5, characterized in that The resource loading module is specifically used to: generate a game resource trigger instruction according to the game resource monitoring request; send the game resource trigger instruction to the game process of the target game, and load the game resources in the target game through the game process of the target game.
8. The device according to claim 5, characterized in that The data monitoring module is specifically used to: search for historical resource data corresponding to the game resource data to be tested; compare the data files at each file node in the GLTF format file corresponding to the game resource data to be tested and the GLTF format file corresponding to the historical resource data; When the data files are not the same, it is determined that the game resource data to be tested is game resource change data.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Game resource file analysis method and device, apparatus and storage medium
CN110262976A