Animation File Simplification Method, Device, Equipment and Storage Medium

Through the simplified method of animation files, including opening the animation file, acquiring and replacing the accuracy of numerical data, the problem of reducing application memory consumption without affecting the image quality performance is solved, and the reduction of animation file size and application performance is achieved.

CN114399569BActive Publication Date: 2025-07-01ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111509792.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-10
Publication Date
2025-07-01
Estimated Expiration
2041-12-10

AI Technical Summary

Technical Problem

How to reduce the memory consumption of applications without affecting the image quality performance, especially in games and applications that integrate a large number of high-definition resources.

Method used

The simplified method of animation file includes opening the animation file in text according to the animation file management type, obtaining numerical data based on preset matching rules, and determining and replacing the accuracy of the numerical data to reduce the size of the animation file.

Benefits of technology

Without affecting the image quality performance, the original size of the animation file is effectively reduced, thereby reducing the memory consumption of the application during runtime and improving the application's performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114399569B_ABST
    Figure CN114399569B_ABST
Patent Text Reader

Abstract

The present invention provides an animation file simplification method, apparatus, device, and storage medium. The method includes: opening the animation file in a corresponding text manner according to the animation file management type and obtaining a corresponding preset matching rule; obtaining numerical data in the animation file based on the preset matching rule; determining a first value with a preset precision corresponding to the numerical data; replacing the numerical data in the animation file with the first value, and saving the animation file. By setting the precision of the numerical data in the animation file, the present invention can effectively reduce the original size of the animation file, so that applications such as games containing the animation file consume less memory during operation and improve the performance of the application operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of file management, and in particular, to a method, device, equipment and storage medium for simplifying animation files. Background Art

[0002] Currently, with the development of hardware technologies such as graphics cards, the picture clarity and resolution of application programs such as games have also increased. Integrating a large number of high-definition resources in application programs such as games makes the installation package of the application program too large. At the same time, various realistic actions in the application program also increase the memory consumption.

[0003] Currently, some mainstream methods for saving memory consumption are: compressing the resource texture format and reducing the number of model faces. However, this method will more or less affect the picture quality performance. Therefore, how to reduce the memory consumption of the application program without affecting the picture quality performance has become an important issue. Summary of the Invention

[0004] The present invention aims to solve at least one of the technical problems existing in the prior art. For this reason, an embodiment of the present invention provides a method for simplifying animation files, aiming to effectively reduce the memory consumption of the application program without affecting the picture quality performance.

[0005] In a first aspect, an embodiment of the present invention provides a method for simplifying animation files, including the steps of:

[0006] Open the animation file in a corresponding text manner according to the animation file management type;

[0007] Obtain the numerical data in the animation file based on a preset matching rule;

[0008] Determine a first value with a preset precision corresponding to the numerical data;

[0009] Replace the numerical data in the animation file with the first value and save the animation file.

[0010] According to the method for simplifying animation files of the embodiment of the present invention, it has at least the following beneficial effects: opening the animation file in a text manner according to the animation file management type, setting the precision of the numerical data in the animation file, and effectively reducing the original size of the animation file without affecting the picture quality performance, so that application programs such as games reduce memory consumption during operation and improve the performance of the application program.

[0011] According to some embodiments of the present invention, opening an animation file in a corresponding text manner according to the animation file management type includes: if the animation file management type is the first type, determining a first animation file directory through directory retrieval based on a first suffix name, and opening the animation file corresponding to the first animation file directory through a file stream; and determining the preset matching rule through the first suffix. Different suffix names correspond to different files, and their numerical types or matching rules may be different, and the corresponding numerical processing may have different processing methods. Therefore, determining the animation file through the suffix name facilitates processing all files corresponding to the animation file, preventing omission. In addition, it will not wrongly open files corresponding to other suffix names, avoiding deviation of results due to different processing methods of different files.

[0012] According to some embodiments of the present invention, opening an animation file in a corresponding text manner according to the animation file management type and obtaining a corresponding preset matching rule includes: if the animation file management type is the second type, determining a second animation file directory through a first interface, and opening the animation file corresponding to the second animation file directory through a second interface. Determining the second animation file directory through the first interface facilitates unified processing of all animation files, preventing omission.

[0013] According to some embodiments of the present invention, obtaining numerical data in the animation file based on the matching rule includes: determining the corresponding matching rule according to the type of the counting method of the numerical data; and obtaining the numerical data from the animation file according to the matching rule. By configuring corresponding matching rules according to different types of the counting method of numerical data, numerical data of various calculation method types can be found from the animation file, effectively preventing omission, making the animation file smaller, and thus further reducing the memory consumption during the operation of the application program and improving the performance of the application program.

[0014] According to some embodiments of the present invention, the counting methods of the numerical data include: non-scientific notation and scientific notation. Embodiments of the present invention can not only process numerical data of non-scientific calculation methods such as floating-point numbers, but also process numerical data of scientific notation, comprehensively covering the numerical data in the animation file, effectively preventing omission, making the animation file smaller, and thus further reducing the memory consumption during the operation of application programs such as games and improving the performance of the application program.

[0015] According to some embodiments of the present invention, obtaining the numerical data from the animation file according to the matching rule includes: performing a full-text scan or a line-by-line scan on the animation file, and obtaining the numerical data through the matching rule. Embodiments of the present invention can flexibly scan the animation file to obtain numerical data.

[0016] According to some embodiments of the present invention, the first value for determining the preset precision corresponding to the numerical data includes: retaining a preset number of digits after the decimal point of the numerical data according to a preset rule to obtain the first value. Retaining a preset number of digits after the decimal point of the numerical data in the animation file can reduce the size of the animation file without affecting the image quality performance.

[0017] According to some embodiments of the present invention, the first value for determining the preset precision corresponding to the numerical data further includes: if it is detected that the absolute value of the numerical data is less than a first preset value, determining the first value to be 0. Setting the numerical data in the animation file that approaches 0 to 0 according to the first preset value can reduce the size of the animation file without affecting the image quality performance.

[0018] In a second aspect, an embodiment of the present invention provides an animation file simplification device, including:

[0019] A file opening module, configured to open an animation file in a corresponding text manner according to the animation file management type;

[0020] A numerical data searching module, configured to obtain the numerical data in the animation file based on a preset matching rule;

[0021] A numerical data adjustment module, configured to determine a first value of the preset precision corresponding to the numerical data;

[0022] A file saving module, configured to replace the numerical data in the animation file with the first value and save the animation file.

[0023] The animation file simplification device according to the embodiment of the present invention has at least the following beneficial effects: opening the animation file in a text manner according to the animation file management type, setting the precision of the numerical data in the animation file, and effectively reducing the original size of the animation file without affecting the image quality performance, so that the memory consumption of the application program is reduced during operation, and the performance of the application program operation is improved.

[0024] According to some embodiments of the present invention, it further includes: a rule configuration module, configured to configure the corresponding matching rule according to the type of the counting method of the numerical data. By configuring the corresponding matching rule according to the different types of the counting method of the numerical data, numerical data of various calculation method types can be found from the animation file, effectively preventing omission, making the animation file smaller, and thus further reducing the memory consumption during the operation of the application program and improving the performance of the application program.

[0025] In a third aspect, an embodiment of the present invention provides a device, including a processor and a memory coupled to the processor. The memory stores program instructions executable by the processor. When the processor executes the program instructions stored in the memory, the animation file simplification method described in the first aspect is implemented.

[0026] In a fourth aspect, an embodiment of the present invention provides a storage medium. The storage medium stores program instructions, and when the program instructions are executed by a processor, the animation file simplification method described in the first aspect can be implemented.

[0027] The additional aspects and advantages of the present invention will be partly given in the following description, partly will become obvious from the following description, or be understood through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The above and / or additional aspects and advantages of the present invention will become obvious and easy to understand from the description of the embodiments in conjunction with the following drawings, where:

[0029] Figure 1 is a schematic flowchart of the method according to an embodiment of the present invention.

[0030] Figure 2 is a schematic diagram of one of the processes of opening an animation file in the method according to an embodiment of the present invention.

[0031] Figure 3 is a schematic diagram of another process of opening an animation file in the method according to an embodiment of the present invention.

[0032] Figure 4 is a schematic flowchart of the process of obtaining numerical data from an animation file in the method according to an embodiment of the present invention.

[0033] Figure 5 is a schematic block diagram of one of the devices according to an embodiment of the present invention.

[0034] Figure 6 is a schematic block diagram of one of the devices according to an embodiment of the present invention.

[0035] Figure 7 is a schematic block diagram of the device according to an embodiment of the present invention.

[0036] Figure 8 is a schematic block diagram of the storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0037] Embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where like or similar reference numerals denote like or similar elements or elements having the same or similar functions throughout. In the following description, suffixes such as "module", "component" or "unit" used to denote elements are only for the convenience of describing the present invention and have no specific meaning in themselves. Therefore, "module", "component" or "unit" can be used interchangeably. "First", "second", etc. are only used to distinguish technical features and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features or implicitly indicating the sequence of the indicated technical features. In the following description, the consecutive numbering of method steps is for the convenience of review and understanding. Considering the overall technical solution of the present invention and the logical relationship between each step, adjusting the execution order between steps will not affect the technical effects achieved by the technical solution of the present invention. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and should not be construed as limiting the present invention.

[0038] Embodiment 1

[0039] Referring to Figure 1 , this embodiment discloses a method for simplifying an animation file, including the following steps S100 to S400.

[0040] Step S100, open the animation file in a corresponding text manner according to the animation file management type.

[0041] Specifically, according to the type of animation file management, call the corresponding interface to open the animation file in a text manner.

[0042] For example, taking a game as an example, the management of animation files is completed through a game engine. For a certain game to be tested, the animation file directory where the animation files of the game are located can be obtained according to the game engine type, and then these animation file directories are traversed to open all the animation files in sequence, and the following steps S200 to S300 are executed for each animation file. It is also possible to obtain the list of animation files changed during this test according to the file update record, and call the corresponding interface to open the animation file in a text manner according to the type of the game engine. In addition, it is also possible to give the path of a specified animation file and open the animation file in a text manner.

[0043] The following will take a game as an example to illustrate how to process all the animation files of a certain game.

[0044] If the type of the game engine is the first type, referring to Figure 2 , includes the following steps:

[0045] Step S111, based on the first suffix name, determine the first animation file directory through directory retrieval;

[0046] Step S112, open the animation file corresponding to the first animation file directory through a file stream.

[0047] Taking the Unity engine (a real-time 3D interactive content creation and operation platform) as an example, the suffix of its animation file is ".anima", which is equivalent to the first suffix ".anima". Retrieve all files with the suffix ".anima" through the directory to obtain the first animation file directory. The first animation file directory includes the path information of at least one animation file. The path information of the at least one animation file, for example, "E:\path\A.anima". The path information can be an absolute path (i.e., a complete path) or a relative path. A relative path is a path starting from a set position. For example, when the set position is "E:", the relative path of the animation file "E:\path\A.anima" is "path\A.anima". Then open the animation file in the form of a file stream through FileStream provided by C# (the scripting language used by Unity).

[0048] If the type of the game engine is the second type, refer to Figure 3 , including the following steps:

[0049] Step S121, determine the second animation file directory through the first interface corresponding to the game engine;

[0050] Step S122, open the animation file corresponding to the second animation file directory through the second interface corresponding to the game engine.

[0051] Taking UE4 (Unreal Engine 4, a game development engine launched by Epic Games) as an example, first, import the following header files for processing files:

[0052] #include "PlatformFilemanager.h"

[0053] #include "FileHelper.h"

[0054] Then, find the corresponding second animation file directory through PlatformFilemanager.GetPlatformFile(). The second animation file directory includes the path addresses of at least one animation file. Then, open the animation file through the corresponding application programming interface (API) in FileHelper. This application programming interface is equivalent to the second interface.

[0055] Step S200: Obtain the numerical data in the animation file based on a preset matching rule.

[0056] Specifically, referring to Figure 4 , it includes the following steps:

[0057] Step S210: Determine the corresponding matching rule according to the type of the counting method of the numerical data.

[0058] Specifically, in the embodiments of the present invention, the counting methods of the numerical data include: non-scientific notation and scientific notation. In scientific notation, in order to simplify the counting formula, it is represented in the format with "E". For example, 1.03 multiplied by 10 to the 8th power can be abbreviated as the form of "1.03E+08", where "E" is the abbreviation of exponent. Sometimes, "E" also appears in the form of lowercase "e".

[0059] For the numerical data counted by non-scientific notation, for example, its matching rule can be set as: (positive or negative sign)+(at least one digit)+(decimal point)+at least one digit; where the parentheses indicate optional items, that is, this item can be present or not. Here, "+" does not mean numerical addition, but represents the relationship of adjacent characters, and the digits in the matching rule represent any one of the 9 digits from "0" to "9". For example, 0.23 is in the form of "one digit+decimal point+two digits".

[0060] For the numerical data counted by scientific notation, for example, its matching rule can be set as: (positive or negative sign)+(at least one digit)+(decimal point)+at least one digit+counting sign+positive or negative sign+at least one digit, where the counting sign is "E" or "e".

[0061] In addition to including regular expressions, the above preset matching rule can also include other rules, such as conditional filtering, etc. This conditional filtering is, for example, filtering with a certain special symbol (such as the decimal point symbol.) as the filtering condition, etc.

[0062] In the embodiments of the present invention, multiple matching rules can also be set. At this time, for example, after finding the numerical data based on one matching rule and processing it, then based on other matching rules, the numerical data can be obtained again for verification or validation to confirm again that all the numerical data will be processed to prevent partial data omission.

[0063] Step S220: Obtain the numerical data from the animation file according to the matching rule.

[0064] The method for obtaining numerical data from an animation file may specifically include directly performing a full text scan on the animation file and obtaining the numerical data by matching rules, or performing a line-by-line scan on the animation file and obtaining the numerical data by matching rules.

[0065] Taking the matching rules corresponding to the above non-scientific notation as an example, the numerical data that can be found are, for example: 123, -1.23, +23.4, etc.

[0066] Taking the matching rules corresponding to the scientific notation of the above numbers as an example, the numerical data that can be found are, for example: -6.36647e-10, 1.03E+08, etc.

[0067] The above matching rules are only illustrative examples and are not limitations of the embodiments of the present invention. For example, in this embodiment, since the step S300 described later is mainly to constrain the precision of decimals, the matching rules can be adjusted in this step S200 to extract only decimals, or only decimals with more than a certain number of digits after the decimal point. For example, taking the matching rules corresponding to the above non-scientific notation as an example, it can be adjusted to: (positive or negative sign) + (at least one digit) + decimal point + at least eight digits.

[0068] In addition, in this step S200, the matching rules corresponding to non-scientific notation and the matching rules corresponding to scientific notation can also be merged into the same rule, for example: (positive or negative sign) + (at least one digit) + decimal point + at least one digit + (counting sign + positive and negative sign + at least one digit); wherein the counting sign is "E" or "e"; brackets indicate optional items, that is, this item may be present or absent.

[0069] This step can conveniently obtain all numerical data in the animation file through matching rules, so as to perform precision constraints in the next step S300.

[0070] Step S300, determining a first numerical value of a preset precision corresponding to the numerical data.

[0071] Specifically, according to the preset rules, the preset digits after the decimal point of the numerical data are retained to obtain a first numerical value. The preset digits after the decimal point are retained, for example, 5 or 6 digits after the decimal point are retained. The above preset rules are methods for handling decimal digits that exceed the preset digits when retaining decimal digits, including: for example, rounding up, truncation and rounding. Taking -0.43142213333 as an example, assuming that the preset digits are 5 digits, if the preset rules are configured as rounding, the corresponding first numerical value is -0.43142; if the preset rules are configured as rounding, the corresponding first numerical value is -0.43143; if the preset rules are configured as truncation, the corresponding first numerical value is -0.43142.

[0072] In addition, if the absolute value of the numerical data is detected to be less than the first preset value, the first numerical value is determined to be 0. For example, for the numerical data -6.36647e-10, since its absolute value is less than 1.0e-8, its corresponding first numerical value is directly set to 0. When the numerical value -6.36647e-10 appears in the key frame information of the animation file, the corresponding animation has no difference to the human naked eye compared with 0 during the picture quality performance. However, its precision is as high as more than a dozen decimal places, which will increase the size of the animation file and consume more memory during operation. Therefore, setting it directly to 0 can effectively reduce the size of the animation file, and further reduce the memory consumption when applications such as games that contain animation files are running.

[0073] Step S400: Replace the numerical data in the animation file with the first numerical value and save the animation file.

[0074] Specifically, for each numerical data, after obtaining the corresponding first numerical value, replace the first numerical value at the position where the numerical data appears in the animation file, and then save the animation file.

[0075] Through the above method, the embodiments of the present invention can open the animation file in text mode according to the animation file management type, set the precision of the numerical data in the animation file, and effectively reduce the original size of the animation file without affecting the picture quality performance, so that applications such as games that contain animation files reduce the memory consumption during operation and improve the performance of the application.

[0076] The method of the embodiment of the present invention can, in fact, also be applied to computational functions in addition to processing numerical data in animation files. First, for example, the functions in the animation file are screened out through a preset matching rule. Then, the computational functions are screened out by the function name or the type of the return value. After obtaining the computational function or its return value, corresponding code segments can be written to process the computational function or its return value in the above steps S100 to S300, or corresponding interfaces can be called to process the computational function or its return value in the above steps S100 to S300. Then, the corresponding code is used to replace the computational function or added to an appropriate position to achieve the purpose of also simplifying the calculation result of the computational function.

[0077] Embodiment 2

[0078] Referring to Figure 5 and Figure 6 , this embodiment provides a device, including: a file opening module 610, a numerical value searching module 620, a numerical value adjusting module 630, and a file saving module 640.

[0079] The file opening module 610 receives the animation file management type and opens the animation file in a corresponding file manner according to the animation file management type. The data searching module 620 obtains the numerical data in the animation file based on a preset matching rule for the opened animation file, and transmits the obtained numerical data to the numerical adjustment module 630. The numerical adjustment module 630 adjusts the precision of the received numerical data to obtain a first numerical value with a preset precision. The file saving module 640 replaces the numerical data in the animation file with the first numerical value and saves the animation file.

[0080] Refer to Figure 6 , in the device of some embodiments of the present invention, it further includes: a rule configuration module 650. The rule configuration module 650 configures a corresponding matching rule according to the type of the counting method of the numerical data. The configuration method can be to select a set matching rule or to customize a corresponding matching rule.

[0081] It is to be understood that, in order to avoid repetition, the content not covered in this embodiment can be referred to in Embodiment 1.

[0082] Similar to Embodiment 1, the device of this embodiment opens the animation file in text mode according to the animation file management type, sets the precision of the numerical data in the animation file, and can effectively reduce the original size of the animation file without affecting the image quality performance, so that applications containing animation files such as games consume less memory during operation and improve the performance of the application operation.

[0083] Embodiment 3

[0084] Refer to Figure 7, this embodiment provides a device, including a processor 710 and a memory 720 coupled to the processor 710. The memory 720 stores program instructions executable by the processor 710. When the processor 710 executes the program instructions stored in the memory 720, the microcode upgrade method of Embodiment 1 is implemented. Among them, the processor 710 can also be referred to as a CPU (Central Processing Unit, central processing unit). The processor 710 may be an integrated circuit chip with signal processing capabilities. The processor 710 can also be a general-purpose processor, 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, discrete hardware components. The general-purpose processor can be a microprocessor, or the general-purpose processor can also be any conventional processor, etc. The memory 720 may include various components (for example, machine-readable media), including but not limited to random access memory components, read-only components, and any combination thereof. The memory 720 may also include: instructions (for example, software) (for example, stored in one or more machine-readable media); the instructions implement the method of the embodiments of the present invention.

[0085] It is hoped that it can be understood that, in order to avoid repetition, the content not involved in this embodiment can be referred to Embodiment 1.

[0086] The device of this embodiment, similar to Embodiment 1, opens the animation file in text mode according to the animation file management, sets the precision of the numerical data in the animation file, and can effectively reduce the original size of the animation file without affecting the picture quality performance, so that applications including animation files such as games consume less memory during operation and improve the performance of the application operation.

[0087] Embodiment 4

[0088] Please refer to Figure 8 , this embodiment provides a storage medium, which stores program instructions 810. When the program instructions 810 are executed by a processor, the animation file simplification method of Embodiment 1 can be implemented. It is hoped that it can be understood that, in order to avoid repetition, the content not involved in this embodiment can be referred to Embodiment 1.

[0089] The storage medium of this embodiment, similar to Embodiment 1, opens the animation file in text mode according to the animation file management type, sets the precision of the numerical data in the animation file, and can effectively reduce the original size of the animation file without affecting the picture quality performance, so that applications including animation files such as games consume less memory during operation and improve the performance of the application operation.

[0090] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the devices, can be implemented as software, firmware, hardware, and their appropriate combinations.

[0091] In the hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component can have multiple functions, or one function or step can be executed by several physical components in cooperation. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or can be implemented as hardware, or can be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium (referred to as a storage medium), which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer-readable medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cassette, tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, a communication medium typically contains computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium.

[0092] The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, and thus do not limit the scope of the rights of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention shall fall within the scope of the rights of the present invention.

Claims

1. An animation file simplification method, characterized in that, Including the steps: Open the animation file in a corresponding text manner according to the animation file management type, specifically including: if the animation file management type is the first type, based on the first suffix name, determine the first animation file directory through directory retrieval, and open the animation file corresponding to the first animation file directory through the file stream; if the animation file management type is the second type, determine the second animation file directory through the first interface, and open the animation file corresponding to the second animation file directory through the second interface; Obtain the numerical data in the animation file based on a preset matching rule; Determine the first numerical value with a preset precision corresponding to the numerical data, specifically including: retaining the preset number of digits after the decimal point of the numerical data to obtain the first numerical value; Replace the numerical data in the animation file with the first numerical value and save the animation file.

2. The animation file simplification method according to claim 1, characterized in that The step of opening the animation file in a corresponding text manner according to the animation file management type and obtaining the corresponding preset matching rule further includes: Determine the preset matching rule through the first suffix.

3. The method for simplifying an animation file according to claim 1, wherein The step of obtaining the numerical data in the animation file based on the matching rule includes: Determine the corresponding matching rule according to the type of the counting method of the numerical data; Obtain the numerical data from the animation file according to the matching rule.

4. The animation file simplification method according to claim 3, characterized in that The counting methods of the numerical data include: non-scientific notation and scientific notation.

5. The animation file simplification method according to claim 3, characterized in that, The step of obtaining the numerical data from the animation file according to the matching rule includes: Perform a full-text scan or a line-by-line scan on the animation file, and obtain the numerical data through the matching rule.

6. The animation file simplification method according to claim 1, characterized in that The step of determining the first numerical value with a preset precision corresponding to the numerical data includes: According to a preset rule, retain the preset number of digits after the decimal point of the numerical data to obtain the first numerical value.

7. The animation file simplification method according to claim 1, wherein The step of determining the first numerical value with a preset precision corresponding to the numerical data further includes: If it is detected that the absolute value of the numerical data is less than the first preset value, determine that the first numerical value is 0.

8. An animation file simplification device, characterized in that, Including: A file opening module for opening the animation file in a corresponding text manner according to the animation file management type; Specifically including: if the animation file management type is the first type, based on the first suffix name, determine the first animation file directory through directory retrieval, and open the animation file corresponding to the first animation file directory through the file stream; if the animation file management type is the second type, determine the second animation file directory through the first interface, and open the animation file corresponding to the second animation file directory through the second interface; A numerical value searching module for obtaining the numerical data in the animation file based on a preset matching rule; A numerical value adjusting module for determining the first numerical value with a preset precision corresponding to the numerical data, specifically including: retaining the preset number of digits after the decimal point of the numerical data to obtain the first numerical value; A file saving module for replacing the numerical data in the animation file with the first numerical value and saving the animation file.

9. The animation file simplification device according to claim 8, characterized in that, Further including: A rule configuration module for configuring the corresponding matching rule according to the type of the counting method of the numerical data.

10. An apparatus, comprising a processor and a memory coupled to the processor, the memory storing program instructions executable by the processor, characterized in that, When the processor executes the program instructions stored in the memory, the animation file simplification method according to any one of claims 1 to 7 is implemented.

11. A storage medium having program instructions stored therein, and when the program instructions are executed by a processor, the animation file simplification method according to any one of claims 1 to 7 can be implemented.

Citation Information

Patent Citations

  • Display method and device, electronic equipment and storage medium

    CN113342439A

  • Modifying client device game applications

    US20160274887A1