Loading method and device of animation resources in game, server and storage medium

By configuring a multilingual directory in the game and using a neural network to generate lip-sync animations, the tedious resource modification problem when adding audio data for different language versions to the game was solved, achieving efficient and reliable animation resource loading and avoiding any impact on the original game logic.

CN115129398BActive Publication Date: 2026-05-29NETEASE (HANGZHOU) NETWORK CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2022-07-27
Publication Date
2026-05-29

Smart Images

  • Figure CN115129398B_ABST
    Figure CN115129398B_ABST
Patent Text Reader

Abstract

The application provides a game animation resource loading method and device, a server and a storage medium, and comprises the following steps: determining a first resource identifier to be played in a game; if a target language subdirectory in a multi-language directory corresponding to the game stores the first resource identifier, determining a target animation resource corresponding to the first resource identifier; wherein a lip sync animation in the target animation resource matches a language version corresponding to the target language subdirectory; and loading the target animation resource into the game. The application can efficiently and reliably load animation resources corresponding to different language versions without modifying original game animation resources, thereby effectively alleviating the impact on original game logic.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of game technology, and in particular to a method, apparatus, server, and storage medium for loading animation resources in games. Background Technology

[0002] Currently, adding audio data in different language versions to a game requires adaptively adding corresponding lip-sync animations. Related technologies propose linking character animations to audio events, then linking these audio events to virtual objects, and finally determining the lip-sync animations to be played in the action mapping table using the virtual objects and audio events. This process requires modifying a large amount of game resources and data, resulting in a cumbersome modification process, a significant workload, and potential disruption to the original game logic. Summary of the Invention

[0003] In view of this, the purpose of the present invention is to provide a method, device, server and storage medium for loading animation resources in a game, which can efficiently and reliably load animation resources corresponding to different language versions without modifying the original game animation resources, thereby effectively mitigating the impact on the original game logic.

[0004] In a first aspect, embodiments of the present invention provide a method for loading animation resources in a game, characterized by comprising: determining a first resource identifier to be played in the game; if the first resource identifier is stored in a target language subdirectory in the multilingual directory corresponding to the game, determining a target animation resource corresponding to the first resource identifier; wherein the target language subdirectory is used to store animation resources, and the lip-sync animation in the target animation resource matches the language version corresponding to the target language subdirectory; and loading the target animation resource into the game.

[0005] In one implementation, before determining the first resource identifier to be played in the game, the method further includes: creating a multilingual directory under the game resource directory corresponding to the game; wherein the multilingual directory includes multiple language subdirectories, and different language subdirectories correspond to different language versions; determining the animation resource to be replaced based on the current animation resource of the game and the audio data to be replaced; saving the second resource identifier of the animation resource to be replaced to the language subdirectory corresponding to the audio data to be replaced; and determining the resource loading path corresponding to the second resource identifier based on the language subdirectory corresponding to the audio data to be replaced.

[0006] In one implementation, the step of determining the animation resource to be replaced based on the game's current animation resources and the audio data to be replaced includes: scanning the game's current animation resources and determining the current audio number bound to the current animation resource; generating a lip-sync animation to be replaced based on the audio data to be replaced corresponding to the current audio number; and determining the animation resource to be replaced based on the current animation resources and the lip-sync animation to be replaced.

[0007] In one embodiment, the step of generating a lip-sync animation based on the audio data to be replaced corresponding to the current audio number includes: reading the audio data to be replaced corresponding to the current audio number; generating lip-sync opening and closing data based on the waveform information of the audio data to be replaced using a pre-trained neural network; and obtaining the lip-sync animation to be replaced corresponding to the lip-sync opening and closing data.

[0008] In one implementation, the step of determining the animation resource to be replaced based on the current animation resource and the lip-sync animation to be replaced includes: assigning the parameter value of the first animation loading information in the current animation resource to the second animation loading information, and generating animation curve information based on the lip-sync action to be replaced; and determining the second animation loading information and the animation curve information as the animation resource to be replaced.

[0009] In one implementation, the step of determining the first resource identifier to be played in the game includes: scanning the animation resource index table in a pre-configured animation data table to obtain the first resource identifier to be played.

[0010] In one implementation, the step of determining the target animation resource corresponding to the first resource identifier if the target language subdirectory in the multilingual directory corresponding to the game stores the first resource identifier includes: determining whether the first resource identifier is bound to an audio identifier according to the animation data table; if so, determining the target language subdirectory from the multilingual directory corresponding to the game according to the resource loading path corresponding to the first resource identifier; and determining the target animation resource corresponding to the first resource identifier if the target language subdirectory stores the first resource identifier.

[0011] Secondly, embodiments of the present invention also provide a device for loading animation resources in a game, comprising: an identifier determination module, configured to determine a first resource identifier to be played in the game; a resource determination module, configured to determine a target animation resource corresponding to the first resource identifier if the target language subdirectory in the multilingual directory corresponding to the game stores the first resource identifier; wherein the target language subdirectory is used to store animation resources, and the lip-sync animation in the target animation resource matches the language version corresponding to the target language subdirectory; and a resource loading module, configured to load the target animation resource into the game.

[0012] Thirdly, embodiments of the present invention also provide a server, including a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method described in any of the first aspects.

[0013] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the method described in any of the first aspects.

[0014] This invention provides a method, apparatus, server, and storage medium for loading animation resources in a game. First, a first resource identifier to be played in the game is determined. If the first resource identifier is stored in the target language subdirectory of the game's multilingual directory, the target animation resource corresponding to the first resource identifier is determined and loaded into the game. The lip-sync animation in this target animation resource matches the language version corresponding to the target language subdirectory. This method optimizes the animation resource loading process by configuring a multilingual directory. If the first resource identifier is stored in the target language subdirectory of the multilingual directory, the corresponding target animation resource can be directly loaded into the game. Compared to existing technologies that require extensive modifications to game resources and data, this invention avoids altering the original game logic and efficiently and reliably loads animation resources corresponding to different language versions, effectively mitigating the impact on the original game logic.

[0015] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.

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

[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0018] Figure 1A schematic diagram illustrating the process of adding traditional lip-syncing actions according to an embodiment of the present invention;

[0019] Figure 2 A flowchart illustrating a method for loading animation resources in a game, provided by an embodiment of the present invention;

[0020] Figure 3 A flowchart illustrating another method for loading animation resources in a game, provided by an embodiment of the present invention;

[0021] Figure 4 A flowchart illustrating another method for loading animation resources in a game, provided by an embodiment of the present invention;

[0022] Figure 5 A schematic diagram of a device for loading animation resources in a game, provided in an embodiment of the present invention;

[0023] Figure 6 This is a schematic diagram of the structure of a server provided in an embodiment of the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0025] Currently, the game can be released on numerous overseas platforms using different languages. However, all the lip-sync animations in the game are designed based on the local language (such as Chinese), which is very unfriendly to players using other languages. Therefore, it is necessary to add lip-sync animations in the corresponding languages ​​to the game. See [link / reference]. Figure 1 The diagram illustrates a traditional process for adding lip-sync animations. First, animation resources are imported; then, game data tables and animation mappings are modified; next, events are added to the animations; and finally, the game is run. This process requires modifying numerous game data tables and art resources, which can easily impact the original game logic and hinder rapid verification. Therefore, this invention provides a method, apparatus, server, and storage medium for loading animation resources in a game. This method efficiently and reliably loads animation resources corresponding to different language versions without modifying the original game animation resources, thus effectively mitigating the impact on the original game logic.

[0026] In one embodiment of this disclosure, the method for loading game animation resources can run on a local terminal device or a server. When the method for loading game animation resources runs on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.

[0027] In an optional implementation, various cloud applications, such as cloud gaming, can run under the cloud interaction system. Taking cloud gaming as an example, cloud gaming refers to a gaming method based on cloud computing. In the cloud gaming operating mode, the game program and the game screen presentation are separated. The loading, storage, and execution of animation resources in the game are completed on the cloud gaming server. The client device is used for data reception, transmission, and game screen presentation. For example, the client device can be a display device with data transmission capabilities located close to the user, such as a mobile terminal, television, computer, or PDA; however, the information processing is performed by the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation commands to the cloud gaming server. The cloud gaming server runs the game according to the operation commands, encodes and compresses game screen data, returns it to the client device via the network, and finally, the client device decodes and outputs the game screen.

[0028] In an optional implementation, taking a game as an example, the local terminal device stores the game program and is used to display the game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, conventionally downloading, installing, and running the game program via an electronic device. The local terminal device can provide the graphical user interface to the player in various ways, such as rendering it on the terminal's display screen or providing it to the player through holographic projection. For example, the local terminal device can include a display screen for displaying the graphical user interface, which includes game screens, and a processor for running the game, generating the graphical user interface, and controlling the display of the graphical user interface on the display screen.

[0029] In one possible implementation, this disclosure provides a method for loading animation resources in a game, which provides a graphical user interface through a terminal device. The terminal device can be either the aforementioned local terminal device or a client device in the aforementioned cloud interaction system.

[0030] The technical solutions of this application will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.

[0031] To facilitate understanding of this embodiment, a method for loading animation resources in a game, as disclosed in this embodiment of the invention, will first be described in detail. (See [link to relevant documentation]). Figure 2 The diagram shows a method for loading animation resources in a game. This method mainly includes the following steps S202 to S206:

[0032] Step S202: Determine the first resource identifier to be played in the game. The resource identifier can be a resource name or a resource ID (Identity document). In one implementation, a pre-configured animation data table (also called a game data table) can be obtained. This game data table contains an animation resource index table, audio trigger IDs, audio names, and hero data (also called virtual object data). By scanning the game data table, the resource identifier bound to the audio trigger ID can be determined from the animation resource index table, and this resource identifier can be used as the first resource identifier to be played.

[0033] Step S204: If the target language subdirectory in the game's multilingual directory stores a first resource identifier, determine the target animation resource corresponding to the first resource identifier. The target language subdirectory stores animation resources. The multilingual directory includes multiple language subdirectories, each corresponding to a different language version. For example, the multilingual directory may include Chinese, Japanese, or English subdirectories. Each language subdirectory includes a resource identifier and the corresponding animation resource. The lip-sync animation in the target animation resource matches the language version corresponding to the target language subdirectory. In one implementation, the target language subdirectory can be determined from the language subdirectory based on the resource loading path corresponding to the first resource identifier. This resource loading path can be pre-configured according to the game's release region. When the target language subdirectory stores a first resource identifier, it indicates that the animation has an animation resource in the language version corresponding to the target language subdirectory. Therefore, the animation resource corresponding to the first resource identifier in the target language subdirectory can be determined as the target animation resource.

[0034] Step S206: Load the target animation resource into the game. In one implementation, the target animation resource can be loaded into the game during gameplay so that it can be played within the game.

[0035] The method for loading animation resources in a game provided by this invention optimizes the loading process by configuring a multi-language directory. When the first resource identifier is stored in the target language subdirectory of the multi-language directory, the corresponding target animation resources can be directly loaded into the game. Compared with the prior art, which requires a lot of modification to game resources and game data, this invention can avoid modifying the original game logic and efficiently and reliably load animation resources corresponding to different language versions, thereby effectively mitigating the impact on the original game logic.

[0036] In one implementation, when determining the identifier of the first resource to be played in the game, the identifier can be obtained by scanning the animation resource index table in a pre-configured animation data table. Optionally, the animation data table can be a pre-configured Excel spreadsheet, which includes the animation resource index table (also known as motion mapping) for each virtual object, audio trigger ID, audio name, and basic data of the virtual object. This data can be used as the basis for subsequent lookup of the corresponding resource, thereby determining the identifier of the first resource to be played based on the animation resource index table.

[0037] Regarding the aforementioned step S104, this embodiment of the invention provides an implementation method for determining the target animation resource. After determining the first resource identifier, it can be determined whether the first resource identifier involves lip-syncing animation. If so, the target animation resource corresponding to the first resource identifier is searched in the target language subdirectory. Specifically: (1) Determine whether the first resource identifier is bound to an audio identifier based on the animation data table. In practical applications, the animation resources can be filtered by whether the first resource identifier is bound to an audio identifier. If the first resource identifier is bound to an audio identifier, it indicates that the animation resource includes lip-sync animation. Conversely, if the first resource identifier is not bound to an audio identifier, it indicates that the animation resource does not include lip-sync animation. (2) If so, determine the target language subdirectory from the multi-language directory corresponding to the game based on the resource loading path corresponding to the first resource identifier. When it is determined that the animation resource includes lip-sync animation, it can be determined that the target animation resource required to replace the animation resource needs to be obtained. At this time, the current language version can be determined based on the pre-configured resource loading path, and the language subdirectory corresponding to the language version can be determined as the target language subdirectory. (3) If the target language subdirectory stores the first resource identifier, determine the target animation resource corresponding to the first resource identifier. Optionally, the target language subdirectory stores the animation resource of the corresponding language version. The animation resource corresponding to the first resource identifier is determined as the target animation resource. The lip-sync animation of the target animation resource matches the current language version.

[0038] To facilitate understanding of the foregoing embodiments, this invention provides an application example of a method for loading animation resources in a game. See [link to relevant documentation]. Figure 3 The diagram shows another method for loading animation resources in a game, which mainly includes the following steps S302 to S306:

[0039] Step S302: Import the animation resources to be replaced into the new language subdirectory.

[0040] Step S304: Re-import the language subdirectory.

[0041] Step S306: Run the game based on the language subdirectory to play the animation resource to be replaced in the game.

[0042] In this embodiment of the invention, a multi-language directory is created under the game's resource directory, and multiple different language subdirectories are set according to the language version, such as LocalizationAnim / JR (Japanese), LocalizationAnim / KR (Korean), LocalizationAnim / US (English), etc. The naming of the language directory is determined according to the voice version of the audio data to be replaced. The loading logic of animation resources is modified. When searching for the corresponding animation resource, it checks whether there is an action resource with the resource identifier in the target language subdirectory. If so, the action resource is used to replace the original animation resource in the game, thereby ensuring that there will be no error in the animation resource index table due to resources with the same name.

[0043] For ease of understanding, this embodiment of the invention also provides an implementation method for configuring multilingual directories and relocating resource loading paths, as shown in steps 1 to 4 below:

[0044] Step 1: Create a multi-language directory within the game's resource directory. This game resource directory includes directories for resources used by the game, such as animations, UI (User Interface Designer), and models. In practice, an additional multi-language directory can be created to store multi-language animations. For example, create a `LocalizationAnim` directory (i.e., the aforementioned multi-language directory), and then create subdirectories for each language within this directory. For instance, the `LocalizationAnim / JR` subdirectory could store Japanese lip-sync animation resources, the `LocalizationAnim / KR` subdirectory could store Korean lip-sync animation resources, and the `LocalizationAnim / US` subdirectory could store English lip-sync animation resources.

[0045] Step 2: Determine the animation resource to be replaced based on the game's current animation resources and the audio data to be replaced. For ease of understanding, this embodiment of the invention provides an implementation method for determining the animation resource to be replaced, see steps a to c below:

[0046] Step a: Scan the game's current animation resources to determine the current audio ID bound to the current animation resource. In practical applications, animation resources are simply animations, which are keyframe curves. Audio events can be added to the animation. For example, if an audio event is added at 1.5 seconds in a 3-second animation, the current audio ID corresponding to the audio event will be found when the animation plays to 1.5 seconds.

[0047] Step b involves generating the lip-sync animation to be replaced based on the audio data to be replaced corresponding to the current audio number. In one specific implementation, see steps b1 to b3 below:

[0048] Step b1: Read the audio data to be replaced corresponding to the current audio number. In one implementation, the corresponding audio name can be found in the audio data table based on the current audio number, and then the audio data to be replaced can be exported from relevant software (such as Wwise software). In addition, audio information (such as duration information) of the audio data to be replaced can be obtained to control the playback duration of the lip-sync animation.

[0049] Step b2 involves generating lip-sync data based on the waveform information of the audio data to be replaced using a pre-trained neural network. In one implementation, the audio data to be replaced can be input into the neural network, which will then generate lip-sync data based on the waveform information. In a specific implementation, the neural network can be pre-trained, for example, by using the original audio data and its corresponding lip-sync data as a training set, thereby training the neural network using the training set.

[0050] Step b3: Obtain the lip-shape animation to be replaced corresponding to the lip-shape opening and closing data. In one implementation, art staff can create the lip-shape animation (also known as lip-shape skeletal animation) in the language version to be replaced based on the lip-shape opening and closing data.

[0051] Step c: Determine the animation resource to be replaced based on the current animation resource and the lip-sync animation to be replaced. In one implementation, the animation resource needs to be preprocessed during import to generate the relevant replacement animation resource that can be loaded by the game. The animation resource includes animation loading information (Importer) and animation curve information (Clip). The Importer is the data imported into the editor, including animation duration, speed, frame rate, and a series of basic information during resource loading and use. The Clip is the curve information of the animation resource, mainly including keyframe data of each model vertex during animation playback.

[0052] In one implementation, parameter values ​​from the first animation loading information in the current animation resource can be assigned to the second animation loading information, and animation curve information can be generated based on the lip-sync action to be replaced. The second animation loading information and the animation curve information are then used to determine the animation resource to be replaced. The first animation loading information can be understood as the Importer of the original animation resource in the game, and the second animation loading information can be understood as the Importer of the animation resource to be replaced. In practical applications, to ensure that the animation settings for other language versions are the same as those for the original language version, and that animation resources for other language versions can play correctly, preprocessing of the animation resource to be replaced is necessary. For example, when the animation resource enters the editor, a Chinese animation resource with the same name is searched for. The data from the original Chinese Importer are set onto the Importer of the animation resource to be replaced, and the Clip data is refreshed to ensure the curve is normal. Simultaneously, an Adapt file with the same name is generated in this directory for use during logic loading. The Adapt file is a necessary basis for loading resources. Associating the Clip with the Adapt file allows the playback of the corresponding language's animation resource when loading the language's Adapt file.

[0053] Step 3: Save the second resource identifier of the animation resource to be replaced to the language subdirectory corresponding to the audio data to be replaced. In one embodiment, the animation resource to be replaced and its resource identifier can be saved to the corresponding language subdirectory.

[0054] Step 4: Based on the language subdirectory corresponding to the audio data to be replaced, determine the resource loading path corresponding to the second resource identifier. In one implementation, the loading logic of the animation resources needs to be modified. Before the final loading process, the resource loading path needs to be repositioned according to the language version, so that the animation resource to be replaced can be loaded according to the resource loading path.

[0055] To facilitate understanding of the foregoing embodiments, the embodiments of the present invention provide, as follows: Figure 4 The diagram shows another method for loading animation resources in a game. This method mainly includes: scanning the game data table to obtain the action mapping, audio trigger ID, audio name, and hero data; scanning the action mapping to obtain resource identifiers; filtering out resource identifiers bound to audio events from the resource identifiers according to the audio trigger ID, and obtaining the corresponding lip-sync data. The lip-sync data is a value of 0-1, representing the amplitude of the lip movement in the current frame; obtaining the audio data to be replaced according to the audio name; and then determining the lip-sync animation to be replaced based on the audio data to be replaced and the lip-sync data.

[0056] In summary, the method for loading animation resources in games provided by this invention solves the problem of needing to modify a large number of resources when adding lip movements in different languages, avoids changes to the original functions of the game, and allows the resources to be used in the game simply by placing them in the directory, making it quick and convenient for verifying effects during development.

[0057] Regarding the game animation resource loading method provided in the foregoing embodiments, this embodiment of the invention provides a game animation resource loading device, see [link to related document]. Figure 5 The diagram shows a structural schematic of a device for loading animation resources in a game. The device mainly includes the following parts:

[0058] The identifier determination module 502 is used to determine the identifier of the first resource to be played in the game;

[0059] The resource determination module 504 is used to determine the target animation resource corresponding to the first resource identifier if the target language subdirectory in the multilingual directory corresponding to the game stores a first resource identifier; wherein, the target language subdirectory is used to store animation resources, and the lip-sync animation in the target animation resource matches the language version corresponding to the target language subdirectory;

[0060] Resource loading module 506 is used to load target animation resources into the game.

[0061] The game animation resource loading device provided in this embodiment of the invention optimizes the animation resource loading process by configuring a multi-language directory. When the first resource identifier is stored in the target language subdirectory of the multi-language directory, the corresponding target animation resource can be directly loaded into the game. Compared with the prior art, which requires a lot of modification to game resources and game data, this embodiment of the invention can avoid modifying the original game logic and efficiently and reliably load animation resources corresponding to different language versions, thereby effectively mitigating the impact on the original game logic.

[0062] In one embodiment, the above-mentioned device further includes a directory configuration module, used to create a multi-language directory under the game resource directory corresponding to the game; wherein, the multi-language directory includes multiple language subdirectories, and different language subdirectories correspond to different language versions; the animation resource to be replaced is determined according to the current animation resource of the game and the audio data to be replaced; the second resource identifier of the animation resource to be replaced is saved to the language subdirectory corresponding to the audio data to be replaced; and the resource loading path corresponding to the second resource identifier is determined based on the language subdirectory corresponding to the audio data to be replaced.

[0063] In one implementation, the directory configuration module is further configured to: scan the current animation resources of the game and determine the current audio number bound to the current animation resource; generate a lip-sync animation to be replaced based on the audio data to be replaced corresponding to the current audio number; and determine the animation resource to be replaced based on the current animation resource and the lip-sync animation to be replaced.

[0064] In one implementation, the directory configuration module is further configured to: read the audio data to be replaced corresponding to the current audio number; generate lip-sync data based on the waveform information of the audio data to be replaced using a pre-trained neural network; and obtain the lip-sync animation to be replaced corresponding to the lip-sync data.

[0065] In one implementation, the directory configuration module is further configured to: assign the parameter value of the first animation loading information in the current animation resource to the second animation loading information, and generate animation curve information based on the lip-sync action to be replaced; and determine the second animation loading information and the animation curve information as the animation resource to be replaced.

[0066] In one implementation, the identifier determination module 502 is further configured to scan the animation resource index table in the pre-configured animation data table to obtain the first resource identifier to be played.

[0067] In one implementation, the resource determination module 504 is further configured to determine whether the first resource identifier is bound to an audio identifier based on the animation data table; if so, to determine the target language subdirectory from the multilingual directory corresponding to the game based on the resource loading path corresponding to the first resource identifier; and if the target language subdirectory stores the first resource identifier, to determine the target animation resource corresponding to the first resource identifier.

[0068] The device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned method embodiment. For the sake of brevity, any parts not mentioned in the device embodiment can be referred to the corresponding content in the aforementioned method embodiment.

[0069] This invention provides a server, specifically, the server includes a processor and a storage device; the storage device stores a computer program, which is executed by the processor:

[0070] A method for loading animation resources in a game includes: determining a first resource identifier to be played in the game; if the first resource identifier is stored in a target language subdirectory of the multilingual directory corresponding to the game, determining a target animation resource corresponding to the first resource identifier; wherein the target language subdirectory is used to store animation resources, and the lip-sync animation in the target animation resource matches the language version corresponding to the target language subdirectory; and loading the target animation resource into the game.

[0071] In one implementation, before determining the first resource identifier to be played in the game, the method further includes: creating a multi-language directory under the game resource directory corresponding to the game; wherein the multi-language directory includes multiple language subdirectories, and different language subdirectories correspond to different language versions; determining the animation resource to be replaced based on the current animation resource of the game and the audio data to be replaced; saving the second resource identifier of the animation resource to be replaced to the language subdirectory corresponding to the audio data to be replaced; and determining the resource loading path corresponding to the second resource identifier based on the language subdirectory corresponding to the audio data to be replaced.

[0072] In one implementation, the step of determining the animation resource to be replaced based on the game's current animation resources and the audio data to be replaced includes: scanning the game's current animation resources to determine the current audio number bound to the current animation resource; generating the lip-sync animation to be replaced based on the audio data to be replaced corresponding to the current audio number; and determining the animation resource to be replaced based on the current animation resources and the lip-sync animation to be replaced.

[0073] In one implementation, the step of generating a lip-sync animation based on the audio data to be replaced corresponding to the current audio number includes: reading the audio data to be replaced corresponding to the current audio number; generating lip-sync opening and closing data based on the waveform information of the audio data to be replaced using a pre-trained neural network; and obtaining the lip-sync animation to be replaced corresponding to the lip-sync opening and closing data.

[0074] In one implementation, the step of determining the animation resource to be replaced based on the current animation resource and the lip-sync animation to be replaced includes: assigning the parameter value of the first animation loading information in the current animation resource to the second animation loading information, and generating animation curve information based on the lip-sync action to be replaced; and determining the second animation loading information and the animation curve information as the animation resource to be replaced.

[0075] In one implementation, the step of determining the first resource identifier to be played in the game includes: scanning the animation resource index table in a pre-configured animation data table to obtain the first resource identifier to be played.

[0076] In one implementation, if the target language subdirectory in the multilingual directory corresponding to the game stores a first resource identifier, the step of determining the target animation resource corresponding to the first resource identifier includes: determining whether the first resource identifier is bound to an audio identifier according to the animation data table; if so, determining the target language subdirectory from the multilingual directory corresponding to the game according to the resource loading path corresponding to the first resource identifier; if the target language subdirectory stores a first resource identifier, determining the target animation resource corresponding to the first resource identifier.

[0077] The server provided in this embodiment of the invention optimizes the loading process of animation resources by configuring a multi-language directory. When the first resource identifier is stored in the target language subdirectory of the multi-language directory, the corresponding target animation resources can be directly loaded into the game. Compared with the prior art, which requires a lot of modification to game resources and game data, this embodiment of the invention can avoid modifying the original game logic and efficiently and reliably load animation resources corresponding to different language versions, thereby effectively mitigating the impact on the original game logic.

[0078] Figure 6 This is a schematic diagram of the structure of a server provided in an embodiment of the present invention. The server 100 includes: a processor 60, a memory 61, a bus 62, and a communication interface 63. The processor 60, the communication interface 63, and the memory 61 are connected through the bus 62. The processor 60 is used to execute executable modules, such as computer programs, stored in the memory 61.

[0079] The memory 61 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 63 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.

[0080] Bus 62 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0081] The memory 61 is used to store programs. After receiving an execution instruction, the processor 60 executes the program. The method executed by the device for defining the flow process disclosed in any of the foregoing embodiments of the present invention can be applied to the processor 60 or implemented by the processor 60.

[0082] Processor 60 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 60 or by instructions in software form. Processor 60 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 61. Processor 60 reads the information in memory 61 and, in conjunction with its hardware, completes the steps of the above method.

[0083] The computer program product of the readable storage medium provided in the embodiments of the present invention includes a computer-readable storage medium storing program code, wherein the program code includes instructions that can be executed:

[0084] A method for loading animation resources in a game includes: determining a first resource identifier to be played in the game; if the first resource identifier is stored in a target language subdirectory of the multilingual directory corresponding to the game, determining a target animation resource corresponding to the first resource identifier; wherein the target language subdirectory is used to store animation resources, and the lip-sync animation in the target animation resource matches the language version corresponding to the target language subdirectory; and loading the target animation resource into the game.

[0085] In one implementation, before determining the first resource identifier to be played in the game, the method further includes: creating a multi-language directory under the game resource directory corresponding to the game; wherein the multi-language directory includes multiple language subdirectories, and different language subdirectories correspond to different language versions; determining the animation resource to be replaced based on the current animation resource of the game and the audio data to be replaced; saving the second resource identifier of the animation resource to be replaced to the language subdirectory corresponding to the audio data to be replaced; and determining the resource loading path corresponding to the second resource identifier based on the language subdirectory corresponding to the audio data to be replaced.

[0086] In one implementation, the step of determining the animation resource to be replaced based on the game's current animation resources and the audio data to be replaced includes: scanning the game's current animation resources to determine the current audio number bound to the current animation resource; generating the lip-sync animation to be replaced based on the audio data to be replaced corresponding to the current audio number; and determining the animation resource to be replaced based on the current animation resources and the lip-sync animation to be replaced.

[0087] In one implementation, the step of generating a lip-sync animation based on the audio data to be replaced corresponding to the current audio number includes: reading the audio data to be replaced corresponding to the current audio number; generating lip-sync opening and closing data based on the waveform information of the audio data to be replaced using a pre-trained neural network; and obtaining the lip-sync animation to be replaced corresponding to the lip-sync opening and closing data.

[0088] In one implementation, the step of determining the animation resource to be replaced based on the current animation resource and the lip-sync animation to be replaced includes: assigning the parameter value of the first animation loading information in the current animation resource to the second animation loading information, and generating animation curve information based on the lip-sync action to be replaced; and determining the second animation loading information and the animation curve information as the animation resource to be replaced.

[0089] In one implementation, the step of determining the first resource identifier to be played in the game includes: scanning the animation resource index table in a pre-configured animation data table to obtain the first resource identifier to be played.

[0090] In one implementation, if the target language subdirectory in the multilingual directory corresponding to the game stores a first resource identifier, the step of determining the target animation resource corresponding to the first resource identifier includes: determining whether the first resource identifier is bound to an audio identifier according to the animation data table; if so, determining the target language subdirectory from the multilingual directory corresponding to the game according to the resource loading path corresponding to the first resource identifier; if the target language subdirectory stores a first resource identifier, determining the target animation resource corresponding to the first resource identifier.

[0091] The readable storage medium provided in this embodiment of the invention optimizes the loading process of animation resources by configuring a multilingual directory. When the first resource identifier is stored in the target language subdirectory of the multilingual directory, the corresponding target animation resources can be directly loaded into the game. Compared with the prior art, which requires a lot of modification to game resources and game data, this embodiment of the invention can avoid modifying the original game logic and efficiently and reliably load animation resources corresponding to different language versions, thereby effectively mitigating the impact on the original game logic.

[0092] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, 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 invention. 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.

[0093] Finally, it should be noted that the above-described embodiments are merely specific implementations of the present invention, used to illustrate the technical solutions of the present invention, and not to limit it. The scope of protection of the present invention is not limited thereto. Although the present invention 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 within the technical scope disclosed in the present invention, or make equivalent substitutions for some of the technical features; and these 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 the present invention, and should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for loading animation resources in a game, characterized in that, include: Determine the identifier of the first resource to be played in the game; If the target language subdirectory in the multilingual directory corresponding to the game stores the first resource identifier, the target animation resource corresponding to the first resource identifier is determined; wherein, the target language subdirectory is used to store animation resources, the multilingual directory includes multiple language subdirectories, different language versions correspond to different language subdirectories, the language subdirectory includes a resource identifier and the animation resource corresponding to the resource identifier, and the lip-sync animation in the target animation resource matches the language version corresponding to the target language subdirectory; The target animation resource is loaded into the game to play the target animation resource in the game; Prior to the step of determining the first resource identifier to be played in the game, the method further includes: Create a multilingual directory under the game resource directory corresponding to the game; The animation resources to be replaced are determined based on the current animation resources and the audio data to be replaced in the game. Save the second resource identifier of the animation resource to be replaced to the language subdirectory corresponding to the audio data to be replaced; Based on the language subdirectory corresponding to the audio data to be replaced, determine the resource loading path corresponding to the second resource identifier; The step of determining the animation resource to be replaced based on the game's current animation resources and the audio data to be replaced includes: Scan the game's current animation resources and determine the current audio ID bound to the current animation resources; Generate a lip-sync animation to be replaced based on the audio data to be replaced corresponding to the current audio number; The animation resource to be replaced is determined based on the current animation resource and the lip-sync animation to be replaced. The step of generating the lip-sync animation to be replaced based on the audio data to be replaced corresponding to the current audio number includes: Read the audio data to be replaced corresponding to the current audio number; Lip-opening and closing data are generated based on the waveform information of the audio data to be replaced using a pre-trained neural network. Obtain the lip-shape animation to be replaced corresponding to the lip-shape opening and closing data.

2. The method according to claim 1, characterized in that, The step of determining the animation resource to be replaced based on the current animation resource and the lip-sync animation to be replaced includes: Assign the parameter value of the first animation loading information in the current animation resource to the second animation loading information, and generate animation curve information based on the lip movement to be replaced; The second animation loading information and the animation curve information are identified as the animation resources to be replaced.

3. The method according to claim 1, characterized in that, The step of determining the identifier of the first resource to be played in the game includes: Scan the animation resource index table in the pre-configured animation data table to obtain the first resource identifier to be played.

4. The method according to claim 3, characterized in that, The step of determining the target animation resource corresponding to the first resource identifier if the target language subdirectory in the multilingual directory corresponding to the game stores the first resource identifier includes: Determine whether the first resource identifier is bound to an audio identifier based on the animation data table; If so, determine the target language subdirectory from the multilingual directory corresponding to the game based on the resource loading path corresponding to the first resource identifier; If the target language subdirectory stores the first resource identifier, determine the target animation resource corresponding to the first resource identifier.

5. A device for loading animation resources in a game, characterized in that, include: The identifier determination module is used to determine the identifier of the first resource to be played in the game; The resource determination module is used to determine the target animation resource corresponding to the first resource identifier if the target language subdirectory in the multilingual directory corresponding to the game stores the first resource identifier; wherein, the target language subdirectory is used to store animation resources, the multilingual directory includes multiple language subdirectories, different language versions correspond to different language subdirectories, the language subdirectory includes a resource identifier and the animation resource corresponding to the resource identifier, and the lip-sync animation in the target animation resource matches the language version corresponding to the target language subdirectory; A resource loading module is used to load the target animation resource into the game so that the target animation resource can be played in the game; Also includes: The directory configuration module is used to create a multi-language directory under the game resource directory corresponding to the game; determine the animation resource to be replaced based on the current animation resource and the audio data to be replaced in the game; save the second resource identifier of the animation resource to be replaced to the language subdirectory corresponding to the audio data to be replaced; and determine the resource loading path corresponding to the second resource identifier based on the language subdirectory corresponding to the audio data to be replaced. The directory configuration module, when used to determine the animation resources to be replaced based on the game's current animation resources and the audio data to be replaced, is specifically used for: Scan the game's current animation resources and determine the current audio ID bound to the current animation resources; Generate a lip-sync animation to be replaced based on the audio data to be replaced corresponding to the current audio number; The animation resource to be replaced is determined based on the current animation resource and the lip-sync animation to be replaced. When the directory configuration module is used to generate the lip-sync animation to be replaced based on the audio data to be replaced corresponding to the current audio number, it is specifically used for: Read the audio data to be replaced corresponding to the current audio number; Lip-opening and closing data are generated based on the waveform information of the audio data to be replaced using a pre-trained neural network. Obtain the lip-shape animation to be replaced corresponding to the lip-shape opening and closing data.

6. A server, characterized in that, The method includes a processor and a memory, the memory storing computer-executable instructions executable by the processor, the processor executing the computer-executable instructions to implement the method of any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when invoked and executed by a processor, cause the processor to perform the method described in any one of claims 1 to 4.