Method and apparatus for converting format of game asset file

By utilizing multi-threaded parallel processing of game asset files on computing devices, the problem of low format conversion efficiency is solved, and an efficient workflow of automated batch conversion and simultaneous development of new asset files is achieved.

CN115607971BActive Publication Date: 2026-05-19BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING ZITIAO NETWORK TECH CO LTD
Filing Date
2022-10-27
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

Existing technologies have low efficiency in converting game asset file formats and cannot process them in batches automatically, requiring developers to operate them one by one, which wastes time.

Method used

By utilizing multiple threads running in the background to perform parallel format conversion on multiple motion model asset files, the number of threads is determined based on the remaining resources of the computing device and the number of motion model files, thus achieving automated batch format conversion.

Benefits of technology

It enables automated batch format conversion of multiple action model asset files, saving developers time and allowing the development of new asset files during the format conversion process, thus improving development efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115607971B_ABST
    Figure CN115607971B_ABST
Patent Text Reader

Abstract

The present disclosure provides a game asset file format conversion method and device, wherein the method comprises: in response to a file export trigger operation, obtaining a plurality of action model asset files of at least one game character completed; determining a second available computing resource amount based on a remaining computing resource amount of a current computing device and a first computing resource amount required by a first thread for producing a subsequent action model asset file; determining a second thread number required for target format conversion of a plurality of action model asset files based on the second available computing resource amount and a total number of the action model asset files; creating a plurality of second threads according to the second thread number, and performing target format conversion in parallel on a plurality of the action model asset files using the plurality of second threads to obtain converted target action model files; and the converted target action model files are used in a game engine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more specifically, to a method and apparatus for converting the format of game asset files. Background Technology

[0002] In the field of 3D modeling, rendering, and animation, it is necessary to create artistic animations for virtual 3D objects such as game characters and scene objects. Developers can use software to perform modeling, model skeleton setup, and motion model development. Game characters usually need to have a variety of complex actions, such as movement, jumping, and combat. As technology continues to advance, users' requirements for the richness of game character actions are also increasing, and the types of actions for game characters are also increasing. A game character usually involves 30 or even more actions, and each action requires an independent asset file.

[0003] Currently, developers have a variety of production software to choose from. The asset files produced by different types of production software are in different formats, which need to be converted before they can run in the game engine. Furthermore, various production software do not provide batch conversion functions for asset files. Developers need to convert asset files one by one manually, which takes up a lot of their time and is inefficient. Summary of the Invention

[0004] This disclosure provides at least one method and apparatus for converting the format of game asset files.

[0005] In a first aspect, embodiments of this disclosure provide a method for format conversion of game asset files, including:

[0006] In response to a file export trigger operation, retrieve multiple motion model asset files for at least one completed game character;

[0007] Based on the remaining computing resources of the current computing device and the first computing resources required by the first thread to create the subsequent action model asset file, determine the second available computing resources.

[0008] Based on the currently available second computing resources and the total number of motion model asset files, determine the number of second threads required to perform target format conversion on multiple motion model asset files;

[0009] According to the second number of threads, multiple second threads are created, and the multiple second threads are used to perform target format conversion in parallel on multiple motion model asset files to obtain converted target motion model files; the converted target motion model files are used in the game engine.

[0010] In one optional implementation, determining the number of second threads required to perform target format conversion on multiple motion model asset files based on the currently available second computing resources and the total number of motion model asset files includes:

[0011] Based on the currently available second computing resources and the third computing resources required by the second thread when performing the target format conversion of the action model asset file, determine the maximum number of second threads that can be created at present;

[0012] Based on the total number of the motion model asset files and the maximum number of second threads, determine the number of second threads required to perform target format conversion on multiple motion model asset files.

[0013] In one optional implementation, the step of utilizing the plurality of second threads to perform target format conversion in parallel on the plurality of action model asset files includes:

[0014] The multiple second threads are controlled to sequentially extract motion model asset files from the asset library, and according to the format conversion rules corresponding to the file type of the extracted motion model asset files, the extracted motion model asset files are converted to the target format in parallel to obtain the target motion model file.

[0015] In one optional implementation, controlling the plurality of second threads to sequentially extract motion model asset files from the asset library includes:

[0016] When the current second thread extracts motion model asset files from the asset library, a thread lock is enabled; the thread lock is used to restrict other second threads besides the current second thread from extracting motion model asset files.

[0017] After the current second thread extracts the action model asset file that is in an optional state, the state of the extracted action model asset file is changed to a non-optional state, and the thread lock is closed.

[0018] In one optional implementation, the step of performing parallel target format conversion on each extracted motion model asset file according to the format conversion rules corresponding to the file type of the extracted motion model asset file includes:

[0019] Based on the data export requirements corresponding to the file type of the motion model asset file, the data to be processed in the motion model asset file that needs to be converted to the target format is determined; the data export requirements are used to indicate the data type to be converted to the target format.

[0020] Based on the format conversion rules corresponding to the file type of the action model asset file, the data to be processed is converted to the target format to obtain the target action model file.

[0021] In one optional implementation, the method further includes:

[0022] If a historical motion model file corresponding to the motion model asset file is detected, it is determined whether there is a difference between the historical motion model file and the target motion model file; the historical motion model file is the motion model file obtained by converting the motion model asset file to a historical target format;

[0023] If there is a discrepancy, obtain the execution log of the second thread corresponding to the generation of the target action model file;

[0024] In response to the operation log indicating an anomaly, an anomaly message is generated and displayed for the target action model file.

[0025] In one optional implementation, before determining the second number of threads, the method further includes:

[0026] Based on the preset asset file naming rules, the names of the acquired action model asset files are detected.

[0027] Upon detecting an action model asset file that does not conform to the asset file naming rules, a name modification prompt message is generated and displayed for the action model asset file that failed the name detection.

[0028] Secondly, this disclosure also provides a format conversion device for game asset files, comprising:

[0029] The acquisition module is used to acquire multiple motion model asset files of at least one completed game character in response to a file export trigger operation.

[0030] The first determining module is used to determine the second available computing resources based on the remaining computing resources of the current computing device and the first computing resources required by the first thread to create the subsequent action model asset file.

[0031] The second determining module is used to determine the number of second threads required to perform target format conversion on multiple action model asset files based on the currently available second computing resources and the total number of action model asset files;

[0032] The conversion module is used to create multiple second threads according to the second thread number, and use the multiple second threads to perform target format conversion in parallel on multiple motion model asset files to obtain the converted target motion model file; the converted target motion model file is used in the game engine.

[0033] In one optional implementation, the second determining module is specifically used for:

[0034] Based on the currently available second computing resources and the third computing resources required by the second thread when performing the target format conversion of the action model asset file, determine the maximum number of second threads that can be created at present;

[0035] Based on the total number of the motion model asset files and the maximum number of second threads, determine the number of second threads required to perform target format conversion on multiple motion model asset files.

[0036] In one optional implementation, when the conversion module performs target format conversion in parallel on multiple action model asset files using the plurality of second threads, it is used to:

[0037] The multiple second threads are controlled to sequentially extract motion model asset files from the asset library, and according to the format conversion rules corresponding to the file type of the extracted motion model asset files, the extracted motion model asset files are converted to the target format in parallel to obtain the target motion model file.

[0038] In one optional implementation, when the conversion module controls the plurality of second threads to sequentially extract motion model asset files from the asset library, it is used to:

[0039] When the current second thread extracts motion model asset files from the asset library, a thread lock is enabled; the thread lock is used to restrict other second threads besides the current second thread from extracting motion model asset files.

[0040] After the current second thread extracts the action model asset file that is in an optional state, the state of the extracted action model asset file is changed to a non-optional state, and the thread lock is closed.

[0041] In one optional implementation, when the conversion module performs parallel target format conversion on the extracted action model asset files according to the format conversion rules corresponding to the file types of the extracted action model asset files, it is used to:

[0042] Based on the data export requirements corresponding to the file type of the motion model asset file, the data to be processed in the motion model asset file that needs to be converted to the target format is determined; the data export requirements are used to indicate the data type to be converted to the target format.

[0043] Based on the format conversion rules corresponding to the file type of the action model asset file, the data to be processed is converted to the target format to obtain the target action model file.

[0044] In one optional implementation, the device further includes a detection module for:

[0045] If a historical motion model file corresponding to the motion model asset file is detected, it is determined whether there is a difference between the historical motion model file and the target motion model file; the historical motion model file is the motion model file obtained by converting the motion model asset file to a historical target format;

[0046] If there is a discrepancy, obtain the execution log of the second thread corresponding to the generation of the target action model file;

[0047] In response to the operation log indicating an anomaly, an anomaly message is generated and displayed for the target action model file.

[0048] In one optional implementation, before determining the second number of threads, the second determining module is further configured to:

[0049] Based on the preset asset file naming rules, the names of the acquired action model asset files are detected.

[0050] Upon detecting an action model asset file that does not conform to the asset file naming rules, a name modification prompt message is generated and displayed for the action model asset file that failed the name detection.

[0051] Thirdly, an optional implementation of this disclosure also provides an electronic device, a processor, and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is configured to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the steps of the first aspect above, or any possible implementation of the first aspect, are performed.

[0052] Fourthly, an optional implementation of this disclosure also provides a computer-readable storage medium storing a computer program that, when run, performs the steps of the first aspect or any possible implementation of the first aspect.

[0053] This embodiment of the disclosure achieves automated batch format conversion of multiple action model asset files by utilizing multiple threads running in the background to perform target format conversion on multiple action model asset files. This eliminates the need for developers to operate each file individually, saving them a significant amount of time. Furthermore, by determining the number of second threads based on the remaining computing resources of the current computing device, the first computing resources required by the first thread to create subsequent action model asset files, and the total number of action model asset files, the second threads created according to the second number of threads can perform target format conversion without affecting the creation of subsequent action model asset files. This allows developers to develop new asset files while performing target format conversion, further improving the efficiency of asset file development.

[0054] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0055] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.

[0056] Figure 1 A flowchart illustrating a method for format conversion of game asset files provided in an embodiment of this disclosure is shown;

[0057] Figure 2 A flowchart illustrating the second thread performing target format conversion according to an embodiment of this disclosure is shown;

[0058] Figure 3 A flowchart of the name detection process provided in an embodiment of this disclosure is shown;

[0059] Figure 4 A flowchart illustrating another method for format conversion of game asset files provided in this disclosure embodiment is shown;

[0060] Figure 5 A flowchart illustrating another method for format conversion of game asset files provided in this disclosure embodiment is shown;

[0061] Figure 6 A schematic diagram of a game asset file format conversion device provided in an embodiment of this disclosure is shown;

[0062] Figure 7 A schematic diagram of a computer device provided in an embodiment of the present disclosure is shown. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.

[0064] To address the technical problem of low efficiency in batch automated format conversion of motion asset files, this disclosure provides a method for converting game asset files to their target format. By utilizing multiple threads running in the background to convert multiple motion model asset files to their target format, automated batch format conversion of multiple motion model asset files is achieved, eliminating the need for developers to operate each file individually, thus saving developers significant time. Furthermore, by determining the number of second threads based on the remaining computing resources of the current computing device, the first computing resources required by the first thread to create subsequent motion model asset files, and the total number of motion model asset files, the second threads created according to the second thread number can perform target format conversion without affecting the creation of subsequent motion model asset files. This allows developers to develop new asset files while performing target format conversion, further improving the efficiency of asset file development.

[0065] The shortcomings of the above solutions are the result of the inventor's practical experience and careful research. Therefore, the discovery process of the above problems and the solutions proposed in this disclosure below should be considered as the inventor's contribution to this disclosure.

[0066] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0067] To facilitate understanding of this embodiment, a method for converting the format of game asset files disclosed in this disclosure will first be described in detail. The execution entity of this method is generally a computer device with a certain computing power. In some possible implementations, this method can be implemented by a processor calling computer-readable instructions stored in memory.

[0068] The following describes the method for converting the format of game asset files provided in this embodiment of the invention, taking a computing device as the executing entity as an example.

[0069] See Figure 1 The diagram shows a flowchart of a method for converting the format of game asset files according to an embodiment of this disclosure. The method includes steps S101 to S103, wherein:

[0070] S101. In response to a file export trigger operation, obtain multiple motion model asset files of at least one completed game character.

[0071] Among them, the file export trigger operation can be triggered by the user. The motion model asset file is a file obtained by the developer through the creation software to create motion models. There can be multiple types of creation software, and the file format of the asset file corresponding to different creation software may be different. It is necessary to convert asset files of various different file formats into a target format that can run in the game engine, such as the common file format of 3D models, FBX.

[0072] For example, developers can set the import path for motion model asset files and trigger a file export operation. The current computing device can then read the motion model asset files located in the import path. To read the data content of each motion model asset file, the corresponding functional module of the creation software can be called to perform the reading operation.

[0073] S102. Based on the remaining computing resources of the current computing device and the first computing resources required by the first thread to create the subsequent action model asset file, determine the second available computing resources.

[0074] The current computing device refers to the computing device currently acquiring motion model asset files and performing target format conversion. This device can also run the software used to create motion model asset files, allowing developers to develop these files. The remaining computing resources of the current computing device represent its available computing resources, determined by the total available resources and currently used resources. The first thread creating subsequent motion model asset files is the thread running the aforementioned creation software. Its initial computing resource requirement can be pre-set by the user or determined based on the resources required during previous motion model asset file development. The total number of motion model asset files represents the number of acquired motion model asset files.

[0075] Specifically, the available second computing resources can be determined based on the remaining computing resources of the current computing device and the first computing resources. For example, the second computing resources can be determined based on the difference between the remaining computing resources and the first computing resources.

[0076] S103. Based on the currently available second computing resources and the total number of motion model asset files, determine the number of second threads required to perform target format conversion on multiple motion model asset files.

[0077] In this step, the maximum number of second threads that can be created can be determined based on the currently available second computing resources and the third computing resources required by the second thread when performing the target format conversion of the action model asset file. The third computing resources can be determined based on the computing resources consumed by the second thread when performing the target format conversion in the past. For example, the second computing resources can be divided by the third computing resources to obtain the quotient between the two, and then the maximum number of second threads can be determined based on the obtained quotient.

[0078] Subsequently, based on the total number of motion model asset files and the maximum number of second threads, the number of second threads required for target format conversion of multiple motion model asset files can be determined. The maximum number of second threads is the maximum number of threads that can be used for target format conversion while ensuring the first thread for creating subsequent motion model asset files can run normally. As long as the number of second threads performing target format conversion is equal to or less than the maximum number of second threads, the current computing device can provide developers with a development environment for subsequent motion asset files while performing target format conversion. Developers can use the current computing device to build and modify motion model asset files simultaneously.

[0079] For example, based on the total number of action model asset files, the predicted time consumption for target format conversion of each action model asset file can be determined under different optional second thread numbers. Then, based on each predicted time consumption, the number of second threads required to perform target format conversion of the multiple action model asset files can be determined from each optional second thread number.

[0080] Specifically, the number of the second threads can be determined based on a preset target consumption time range. The number of second threads whose predicted consumption time is within the target consumption time range can be determined. Then, based on a preset time weight and / or performance weight, the number of second threads required to perform target format conversion on the multiple action model asset files can be determined from the number of second threads whose predicted consumption time is within the target consumption time range.

[0081] S104. According to the second number of threads, create multiple second threads, and use the multiple second threads to perform target format conversion in parallel on multiple motion model asset files to obtain the converted target motion model file; the converted target motion model file is used in the game engine.

[0082] After determining the number of second threads, second threads can be created. The number of second threads is the same as the determined number of second threads. Threads of the second thread number can be requested from the available threads of the current computing device. Then, the created second threads are used to perform target format conversion on multiple motion model asset files in parallel to obtain the converted target motion model files.

[0083] Parallel execution refers to the ability of each second thread to perform target format conversion on different motion model asset files at the same time. The current computing device can control each second thread to extract motion model asset files from the asset library. The asset library is used to store various motion model asset files produced by the game production software during the game production process. The second thread can extract motion model asset files based on the import path of the motion model asset files input by the user and the corresponding asset reading module of the production software.

[0084] In practice, when a second thread extracts motion model asset files, multiple second threads can sequentially extract motion model asset files from the asset library, one file at a time. During the extraction process of the current second thread, a thread lock can be first enabled to restrict other second threads from extracting motion model asset files, thus preventing different second threads from extracting the same file. After enabling the thread lock, a selectable motion model asset file can be extracted, and its status can be changed to non-selectable. Finally, the thread lock can be disabled. This also prevents the status change of the motion model asset file from failing due to other second threads occupying the file.

[0085] After the motion model asset file is extracted in the second thread, the data to be processed in the motion model asset file that needs to be converted to the target format can be determined based on the data export requirements corresponding to the motion model asset file. The data export requirements can indicate the data type to be converted to the target format, which can include skeleton data, model data, camera data, etc. Then, the data to be processed can be converted to the target format according to the format conversion rules corresponding to the file type of the motion model asset file, and finally the target motion model file is obtained.

[0086] Since motion model asset files can be created by different production software, they may exist in multiple file types, i.e., file formats. For motion model asset files of different file types, a format conversion rule matching the file type can be adopted. In this way, the target format conversion of motion model asset files of different file types can be achieved.

[0087] After the second thread completes the target format conversion of the motion model asset file it is processing, it can retrieve a new motion model asset file from the repository and perform target format conversion on the newly retrieved motion model asset file.

[0088] The aforementioned format conversion rules and data export requirements can use preset regular expressions to represent various types of data, and fuzzy matching can be used to identify various data in the motion model asset file. In this case, the name of the motion model asset file needs to match the aforementioned regular expression. Based on this, before determining the second thread number, the current computing device can first perform name detection on the filenames of the acquired motion model asset files to check whether each motion model asset file conforms to the preset asset file naming rules. After detecting that there are motion model asset files that do not conform to the asset file naming rules, a name modification prompt message for the motion model asset files that have failed the name detection can be generated and displayed so that the developers can modify their names to conform to the rules of the regular expression.

[0089] After obtaining the target action model file, if a historical action model file corresponding to the action model asset file is detected, it can be determined whether there is a difference between the historical action model file and the target action model file. If there is no difference, it can be determined that the target action model file is normal. If there is a difference, the running log of the second thread corresponding to the target action model file can be obtained, and it can be determined whether the running log indicates that there is an anomaly in the process of converting the action model asset file.

[0090] For example, the execution log of the thread that generates the historical action model file can be obtained, and then the difference between the execution log of the historical action model file and the execution log of the target action model file can be compared. If there is a difference, it can be determined that the execution log indicates an anomaly. At this time, an anomaly message for the target action model file can be generated and displayed to prompt the developers.

[0091] After obtaining the target motion model file, it can be determined whether the parameter labels corresponding to each type of data in the target motion model file conform to the game engine's recognition rules. If they do not conform, they can be modified so that the game engine can correctly recognize the data in the target motion model file.

[0092] See Figure 2 The diagram shows a flowchart of the second thread performing target format conversion according to an embodiment of this disclosure. The second thread first obtains the preset data export requirements and the format conversion rules matching the file type of the currently processed action model asset file. Then, it uses a fuzzy search method to find the data to be processed that matches the data export requirements from the currently processed action model asset file, and uses the corresponding format conversion rules to convert the data to be processed to obtain the target action model file. Then, it identifies and modifies the parameter labels of various types of data in the target action model file to obtain the modified target action model file. Finally, it judges whether the format conversion is abnormal based on the modified target action model file and the second thread's running log. If there is an abnormality, an error is reported; otherwise, the target action model file and its corresponding running log are output.

[0093] See Figure 3The flowchart shown is a name detection flowchart provided in an embodiment of this disclosure. In this step, the user-defined naming data structure and the system's preset naming structure are first obtained and connected to the database to be processed. The motion model asset files to be processed are read, and a fuzzy matching algorithm is used to compare the matching degree between the names of the motion model asset files and the user-defined naming data structure and the preset naming structure in batches. If the matching degree between the names of the motion model asset files and the user-defined naming data structure and the preset naming structure is successful, the automated batch conversion operation can continue to be performed. If there is no match, the mismatched motion model asset files can be marked so that the user can modify the file name of the mismatched motion model asset files.

[0094] The game asset file format conversion method provided in this disclosure, in response to a file export trigger operation, obtains multiple motion model asset files of at least one completed game character; based on the remaining computing resources of the current computing device, the first computing resources required by the first thread for creating subsequent motion model asset files, and the total number of motion model asset files, determines the number of second threads required to perform target format conversion on the multiple motion model asset files; according to the number of second threads, creates multiple second threads, and uses the multiple second threads to perform target format conversion on the multiple motion model asset files in parallel to obtain the converted target motion model file; the converted target motion model file is used in the game engine. This embodiment of the disclosure achieves automated batch format conversion of multiple action model asset files by utilizing multiple threads running in the background to perform target format conversion on multiple action model asset files. This eliminates the need for developers to operate each file individually, saving them a significant amount of time. Furthermore, by determining the number of second threads based on the remaining computing resources of the current computing device, the first computing resources required by the first thread to create subsequent action model asset files, and the total number of action model asset files, the second threads created according to the second number of threads can perform target format conversion without affecting the creation of subsequent action model asset files. This allows developers to develop new asset files while performing target format conversion, further improving the efficiency of asset file development.

[0095] See Figure 4The diagram shows a flowchart of another method for format conversion of game asset files provided in this embodiment. The method first obtains the total number of motion model asset files to be processed from the data pool to be processed, and obtains the remaining computing resources of the current computing device, such as the usage of memory and central processing unit (CPU). Then, based on the obtained remaining computing resources and the total number of motion model asset files, it determines the total number of threads required, and generates a thread pool according to the required total number of threads. The threads in the thread pool retrieve the data to be converted, i.e., the motion model asset files, from the data pool to be processed. When retrieving data, the current thread needs to first open the thread lock, then retrieve the data, then remove the retrieved data from the data pool to be processed, and finally close the thread lock. Then, the format conversion is performed, and finally the conversion result is returned to the user.

[0096] See Figure 5 The diagram shows a flowchart of another method for converting game asset files according to an embodiment of this disclosure. The method involves creating various asset files, such as .ma and .max files, through art and animation production. Then, the obtained asset files are input into an automated batch conversion tool for FBX. The automated batch conversion tool for FBX has functions such as automatically reading initial files, multi-threaded task processing, file inspection and feedback, background silent file processing, multi-platform compatibility, and automatic feedback for file export. Through the above functions, the FBX file is finally output, which can be used by the game engine.

[0097] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0098] Based on the same inventive concept, this disclosure also provides a game asset file format conversion device corresponding to the game asset file format conversion method. Since the principle of the device in this disclosure for solving the problem is similar to the game asset file format conversion method described above in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0099] Reference Figure 6 The diagram shown is a schematic of a game asset file format conversion device provided in an embodiment of this disclosure. The device includes:

[0100] The acquisition module 610 is used to acquire multiple motion model asset files of at least one completed game character in response to a file export trigger operation.

[0101] The first determining module 620 is used to determine the second available computing resources based on the remaining computing resources of the current computing device and the first computing resources required by the first thread to create the subsequent action model asset file.

[0102] The second determining module 630 is used to determine the number of second threads required to perform target format conversion on multiple action model asset files based on the currently available second computing resources and the total number of action model asset files;

[0103] The conversion module 640 is used to create multiple second threads according to the second thread number, and use the multiple second threads to perform target format conversion in parallel on multiple motion model asset files to obtain the converted target motion model file; the converted target motion model file is used in the game engine.

[0104] In one optional implementation, the second determining module 630 is specifically used for:

[0105] Based on the currently available second computing resources and the third computing resources required by the second thread when performing the target format conversion of the action model asset file, determine the maximum number of second threads that can be created at present;

[0106] Based on the total number of the motion model asset files and the maximum number of second threads, determine the number of second threads required to perform target format conversion on multiple motion model asset files.

[0107] In one optional implementation, when the conversion module 640 performs target format conversion in parallel on multiple action model asset files using the plurality of second threads, it is used to:

[0108] The multiple second threads are controlled to sequentially extract motion model asset files from the asset library, and according to the format conversion rules corresponding to the file type of the extracted motion model asset files, the extracted motion model asset files are converted to the target format in parallel to obtain the target motion model file.

[0109] In one optional implementation, when controlling the plurality of second threads to sequentially extract motion model asset files from the asset library, the conversion module 640 is used to:

[0110] When the current second thread extracts motion model asset files from the asset library, a thread lock is enabled; the thread lock is used to restrict other second threads besides the current second thread from extracting motion model asset files.

[0111] After the current second thread extracts the action model asset file that is in an optional state, the state of the extracted action model asset file is changed to a non-optional state, and the thread lock is closed.

[0112] In one optional implementation, when the conversion module 640 performs parallel target format conversion on the extracted motion model asset files according to the format conversion rules corresponding to the file types of the extracted motion model asset files, it is used to:

[0113] Based on the data export requirements corresponding to the file type of the motion model asset file, the data to be processed in the motion model asset file that needs to be converted to the target format is determined; the data export requirements are used to indicate the data type to be converted to the target format.

[0114] Based on the format conversion rules corresponding to the file type of the action model asset file, the data to be processed is converted to the target format to obtain the target action model file.

[0115] In one optional implementation, the device further includes a detection module for:

[0116] If a historical motion model file corresponding to the motion model asset file is detected, it is determined whether there is a difference between the historical motion model file and the target motion model file; the historical motion model file is the motion model file obtained by converting the motion model asset file to a historical target format;

[0117] If there is a discrepancy, obtain the execution log of the second thread corresponding to the generation of the target action model file;

[0118] In response to the operation log indicating an anomaly, an anomaly message is generated and displayed for the target action model file.

[0119] In one optional implementation, before determining the second number of threads, the second determining module 630 is further configured to:

[0120] Based on the preset asset file naming rules, the names of the acquired action model asset files are detected.

[0121] Upon detecting an action model asset file that does not conform to the asset file naming rules, a name modification prompt message is generated and displayed for the action model asset file that failed the name detection.

[0122] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.

[0123] Corresponding to Figure 1 This disclosure also provides an electronic device 700 for converting the format of game asset files in a given embodiment. Figure 7 The diagram shown is a structural schematic of an electronic device 700 provided in an embodiment of this disclosure, including:

[0124] The system includes a processor 71, a memory 72, and a bus 73. The memory 72 stores execution instructions and includes main memory 721 and external memory 722. The main memory 721, also called internal memory, temporarily stores the computational data in the processor 71, as well as data exchanged with external memory such as a hard disk. The processor 71 exchanges data with the external memory 722 through the main memory 721. When the electronic device 700 is running, the processor 71 communicates with the memory 72 through the bus 73, causing the processor 71 to execute the following instructions:

[0125] In response to a file export trigger operation, retrieve multiple motion model asset files for at least one completed game character;

[0126] Based on the remaining computing resources of the current computing device and the first computing resources required by the first thread to create the subsequent action model asset file, determine the second available computing resources.

[0127] Based on the currently available second computing resources and the total number of motion model asset files, determine the number of second threads required to perform target format conversion on multiple motion model asset files;

[0128] According to the second number of threads, multiple second threads are created, and the multiple second threads are used to perform target format conversion in parallel on multiple motion model asset files to obtain converted target motion model files; the converted target motion model files are used in the game engine.

[0129] In one possible implementation, the instructions executed by processor 71, which determine the number of second threads required to perform target format conversion on multiple motion model asset files based on the currently available second computing resources and the total number of motion model asset files, include:

[0130] Based on the currently available second computing resources and the third computing resources required by the second thread when performing the target format conversion of the action model asset file, determine the maximum number of second threads that can be created at present;

[0131] Based on the total number of the motion model asset files and the maximum number of second threads, determine the number of second threads required to perform target format conversion on multiple motion model asset files.

[0132] In one possible implementation, the instructions executed by processor 71, which involve using the plurality of second threads to perform target format conversion in parallel on the plurality of action model asset files, include:

[0133] The multiple second threads are controlled to sequentially extract motion model asset files from the asset library, and according to the format conversion rules corresponding to the file type of the extracted motion model asset files, the extracted motion model asset files are converted to the target format in parallel to obtain the target motion model file.

[0134] In one possible implementation, the instructions executed by processor 71, which control the plurality of second threads to sequentially extract motion model asset files from the asset library, include:

[0135] When the current second thread extracts motion model asset files from the asset library, a thread lock is enabled; the thread lock is used to restrict other second threads besides the current second thread from extracting motion model asset files.

[0136] After the current second thread extracts the action model asset file that is in an optional state, the state of the extracted action model asset file is changed to a non-optional state, and the thread lock is closed.

[0137] In one possible implementation, the instruction executed by processor 71, which involves performing parallel target format conversion on the extracted action model asset files according to the format conversion rules corresponding to the file types of the extracted action model asset files, includes:

[0138] Based on the data export requirements corresponding to the file type of the motion model asset file, the data to be processed in the motion model asset file that needs to be converted to the target format is determined; the data export requirements are used to indicate the data type to be converted to the target format.

[0139] Based on the format conversion rules corresponding to the file type of the action model asset file, the data to be processed is converted to the target format to obtain the target action model file.

[0140] In one possible implementation, the instructions executed by processor 71 further include:

[0141] If a historical motion model file corresponding to the motion model asset file is detected, it is determined whether there is a difference between the historical motion model file and the target motion model file; the historical motion model file is the motion model file obtained by converting the motion model asset file to a historical target format;

[0142] If there is a discrepancy, obtain the execution log of the second thread corresponding to the generation of the target action model file;

[0143] In response to the operation log indicating an anomaly, an anomaly message is generated and displayed for the target action model file.

[0144] In one optional implementation, one possible implementation, the instructions executed by processor 71, before determining the second number of threads, further include:

[0145] Based on the preset asset file naming rules, the names of the acquired action model asset files are detected.

[0146] Upon detecting an action model asset file that does not conform to the asset file naming rules, a name modification prompt message is generated and displayed for the action model asset file that failed the name detection.

[0147] This disclosure also provides a computer-readable storage medium storing a computer program. When a processor executes the computer program, it performs the steps of the game asset file format conversion method described in the above method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0148] The computer program product of the game asset file format conversion method provided in this disclosure includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the steps of the game asset file format conversion method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.

[0149] This disclosure also provides a computer program that, when executed by a processor, implements any of the methods described in the foregoing embodiments. The computer program product can be implemented specifically through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0150] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

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

[0152] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0153] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0154] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.

Claims

1. A method for converting the format of game asset files, characterized in that, include: In response to a file export trigger operation, retrieve multiple motion model asset files for at least one completed game character; Based on the remaining computing resources of the current computing device and the first computing resources required by the first thread to create the subsequent action model asset file, determine the second available computing resources. Based on the currently available second computing resources and the total number of motion model asset files, determine the number of second threads required to perform target format conversion on multiple motion model asset files; According to the second number of threads, multiple second threads are created, and the multiple second threads are used to perform target format conversion in parallel on multiple motion model asset files to obtain converted target motion model files; the converted target motion model files are used in the game engine; The step of determining the number of second threads required to perform target format conversion on multiple action model asset files based on the currently available second computing resources and the total number of action model asset files includes: determining the maximum number of second threads that can be created based on the currently available second computing resources and the third computing resources required by the second threads when performing target format conversion on the action model asset files; and determining the number of second threads required to perform target format conversion on multiple action model asset files based on the total number of action model asset files and the maximum number of second threads.

2. The method according to claim 1, characterized in that, The method of using the multiple second threads to perform target format conversion in parallel on multiple action model asset files includes: The multiple second threads are controlled to sequentially extract motion model asset files from the asset library, and according to the format conversion rules corresponding to the file type of the extracted motion model asset files, the extracted motion model asset files are converted to the target format in parallel to obtain the target motion model file.

3. The method according to claim 2, characterized in that, The control of the multiple second threads to sequentially extract action model asset files from the asset library includes: When the current second thread extracts motion model asset files from the asset library, a thread lock is enabled; the thread lock is used to restrict other second threads besides the current second thread from extracting motion model asset files. After the current second thread extracts the action model asset file that is in an optional state, the state of the extracted action model asset file is changed to a non-optional state, and the thread lock is closed.

4. The method according to claim 2, characterized in that, The step of performing parallel target format conversion on each extracted action model asset file according to the format conversion rules corresponding to the file type of the extracted action model asset file includes: Based on the data export requirements corresponding to the file type of the motion model asset file, the data to be processed in the motion model asset file that needs to be converted to the target format is determined; the data export requirements are used to indicate the data type to be converted to the target format. Based on the format conversion rules corresponding to the file type of the action model asset file, the data to be processed is converted to the target format to obtain the target action model file.

5. The method according to claim 1, characterized in that, The method further includes: If a historical motion model file corresponding to the motion model asset file is detected, it is determined whether there is a difference between the historical motion model file and the target motion model file; the historical motion model file is the motion model file obtained by converting the motion model asset file to a historical target format; If there is a discrepancy, obtain the execution log of the second thread corresponding to the generation of the target action model file; In response to the operation log indicating an anomaly, an anomaly message is generated and displayed for the target action model file.

6. The method according to claim 1, characterized in that, Before determining the second number of threads, the method further includes: Based on the preset asset file naming rules, the names of the acquired action model asset files are detected. Upon detecting an action model asset file that does not conform to the asset file naming rules, a name modification prompt message is generated and displayed for the action model asset file that failed the name detection.

7. A format conversion device for game asset files, characterized in that, include: The acquisition module is used to acquire multiple motion model asset files of at least one completed game character in response to a file export trigger operation. The first determining module is used to determine the second available computing resources based on the remaining computing resources of the current computing device and the first computing resources required by the first thread to create the subsequent action model asset file. The second determining module is used to determine the number of second threads required to perform target format conversion on multiple action model asset files based on the currently available second computing resources and the total number of action model asset files; The conversion module is used to create multiple second threads according to the second thread number, and use the multiple second threads to perform target format conversion in parallel on multiple motion model asset files to obtain the converted target motion model file; the converted target motion model file is used in the game engine; Specifically, the second determining module is used to determine the maximum number of second threads that can be created at present, based on the currently available second computing resources and the third computing resources required by the second thread when performing the target format conversion of the action model asset file. Based on the total number of the motion model asset files and the maximum number of second threads, determine the number of second threads required to perform target format conversion on multiple motion model asset files.

8. An electronic device, characterized in that, include: The processor and the memory, wherein the memory stores machine-readable instructions executable by the processor, the processor is used to execute the machine-readable instructions stored in the memory, and when the machine-readable instructions are executed by the processor, the processor performs the steps of the game asset file format conversion method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by an electronic device, performs the steps of the game asset file format conversion method as described in any one of claims 1 to 6.