A testing method and related device for special effects animation

Through the mapping relationship between the animation test file and the test verification file, the characteristic values ​​are compared frame by frame, which solves the problem in the existing technology that the special effects animation test cannot cover all application scenarios, and realizes the function guarantee and operation of the special effects animation in various scenarios. Easy.

CN113012267BActive Publication Date: 2024-10-22TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911223341.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-03
Publication Date
2024-10-22
Estimated Expiration
2039-12-12

AI Technical Summary

Technical Problem

The existing special effects animation testing method is based on API granularity and is difficult to cover all application scenarios. As a result, special effects animation cannot effectively realize its functions in various application scenarios.

Method used

Using the mapping relationship between the animation test file and the test verification file, by calculating the characteristic value of each frame of image data in the animation test file and comparing it with the expected characteristic value, it can determine whether the animation effect meets expectations frame by frame, thus covering various application scenarios and Ensure the function of special effects animation is realized.

Benefits of technology

It realizes the function guarantee of special effects animation in various application scenarios. It is simple to operate. There is no need to change the code when adding or updating animation test files, which significantly improves the test coverage and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113012267B_ABST
    Figure CN113012267B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a test method for special effects animation, in which an animation test file and a test verification file are pre-set, and the test verification file includes a characteristic value, and the characteristic value has a mapping relationship with each frame of image data in the animation test file. Each animation test file is run in sequence, and in the process of running to the target animation test file, the first characteristic value corresponding to each frame of image data in the target animation test file is calculated, and the second characteristic value corresponding to each frame of image data in the target animation test file is obtained according to the mapping relationship. It is judged frame by frame whether the first characteristic value and the second characteristic value are consistent. If they are consistent, the target animation test file passes the test. Since the animation test file is configured according to the functions implemented in various application scenarios, the animation test file can cover various application scenarios. At the same time, when it is necessary to add or update the animation test file, only the relevant files need to be added or updated, and there is no need to change the code, which is simple and convenient to operate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a testing method and related devices. Background Art

[0002] With the popularization of online social networking, video has become a commonly used online social media. Users can record their daily lives, opinions, specialties, etc. into videos, and upload the recorded videos to the Internet or send them to friends to communicate through video.

[0003] In order to make their videos more popular, users can not only conceive the content of the video, but also add special effects animations to the video, which can not only show the author's personality, but also make the video more lively. Among them, text special effects animations, sticker animations, etc. are special effects animations commonly found in video processing software.

[0004] In order to ensure the realization of special effects animation functions, it is often necessary to test the special effects animation. The current special effects animation testing method is mainly based on the test of the Application Programming Interface (API) granularity. However, this method has the problem of difficulty in covering some application scenarios during the testing process, making it difficult to ensure that the special effects animation can realize its functions in various application scenarios. Summary of the invention

[0005] In order to solve the above technical problems, the present application provides a testing method and related devices for special effects animation, which can cover various application scenarios, thereby ensuring that the special effects animation can realize its functions in various application scenarios. At the same time, when it is necessary to add or update animation test files, only the animation test files and test verification files need to be added or updated, without changing the code, and the operation is simple and convenient.

[0006] The embodiments of the present application disclose the following technical solutions:

[0007] In a first aspect, an embodiment of the present application provides a method for testing a special effects animation, the method comprising:

[0008] An animation test file and a test verification file are pre-set, wherein the test verification file includes a characteristic value, and the characteristic value has a mapping relationship with each frame of image data in the animation test file. The method includes:

[0009] Run each animation test file in turn to render special effects animation;

[0010] In the process of running to the target animation test file, a first characteristic value corresponding to each frame of image data of the target animation test file is calculated; the first characteristic value reflects the actual animation effect of the target animation test file;

[0011] According to the mapping relationship, a second eigenvalue corresponding to each frame of image data in the target animation test file is obtained from the test verification file; the second eigenvalue reflects the expected animation effect of the target animation test file;

[0012] If the first feature value is consistent with the second feature value, the target animation test file passes the test.

[0013] In a second aspect, an embodiment of the present application provides a testing device for special effects animation, the device comprising a configuration module, a rendering module and a verification module:

[0014] The configuration module is used to pre-set an animation test file and a test verification file, wherein the test verification file includes a characteristic value, and the characteristic value has a mapping relationship with each frame of image data in the animation test file;

[0015] The rendering module is used to run each animation test file in sequence;

[0016] The verification module is used to calculate the first eigenvalue corresponding to each frame of image data in the target animation test file during the process of running to the target animation test file; the first eigenvalue reflects the actual animation effect of the target animation test file; obtain the second eigenvalue corresponding to each frame of image data in the target animation test file from the test verification file according to the mapping relationship; the second eigenvalue reflects the expected animation effect of the target animation test file; if the first eigenvalue is consistent with the second eigenvalue, the target animation test file passes the test.

[0017] In a third aspect, an embodiment of the present application provides a device for testing special effects animation, the device comprising a processor and a memory:

[0018] The memory is used to store program code and transmit the program code to the processor;

[0019] The processor is configured to execute the method described in the first aspect according to instructions in the program code.

[0020] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and the program code is used to execute the method described in the first aspect.

[0021] It can be seen from the above technical scheme that the present application tests the special effects animation with the animation test file as the granularity. Before the test, the animation test file and the test verification file are pre-set. The test verification file includes the characteristic value, and the characteristic value has a mapping relationship with each frame of image data in the animation test file. Then, each animation test file is run in sequence. In the process of running to the target animation test file, the first characteristic value corresponding to each frame of image data in the target animation test file is calculated, and the second characteristic value corresponding to each frame of image data in the target animation test file is obtained from the test verification file according to the mapping relationship. Since the first characteristic value is generated during the actual operation, it can reflect the actual animation effect of the target animation test file, and the second characteristic value is pre-set, which can reflect the expected animation effect of the target animation test file. Therefore, it can be judged frame by frame whether the first characteristic value and the second characteristic value are consistent. If they are consistent, it means that the animation effect achieved by the target animation test file meets expectations, and the target animation test file passes the test, otherwise, the test fails. Since the animation test file is configured according to the functions implemented in various application scenarios, the animation test file can cover various application scenarios, thereby ensuring that the special effects animation can achieve its functions in various application scenarios. At the same time, when you need to add or update animation test files, you only need to add or update animation test files and test verification files without changing the code. The operation is simple and convenient. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0023] Figure 1 This is an example diagram of a PAG sticker animation application scenario;

[0024] Figure 2 This is the interface diagram of the sticker animation playing in the video;

[0025] Figure 3 A schematic diagram of an application scenario of a testing method for special effects animation provided in an embodiment of the present application;

[0026] Figure 4 A flowchart of a special effects animation testing method provided in an embodiment of the present application;

[0027] Figure 5 A schematic diagram of the hardware architecture of a special effects animation testing method provided in an embodiment of the present application;

[0028] Figure 6A schematic diagram of a mapping relationship construction method provided in an embodiment of the present application;

[0029] Figure 7 A schematic diagram of a display interface of a terminal device during a test provided in an embodiment of the present application;

[0030] Figure 8 A schematic diagram of a display interface of a terminal device that has successfully tested the test provided in an embodiment of the present application;

[0031] Fig. 9 A schematic diagram of a display interface of a test failure terminal device provided in an embodiment of the present application;

[0032] Fig.10 A schematic diagram of the display interface of a terminal device that fails the test when a new animation test file is added according to an embodiment of the present application;

[0033] Fig.11a A structural diagram of a special effects animation testing device provided in an embodiment of the present application;

[0034] Fig.11b A structural diagram of a special effects animation testing device provided in an embodiment of the present application;

[0035] Fig.11c A structural diagram of a special effects animation testing device provided in an embodiment of the present application;

[0036] Fig.11d A structural diagram of a special effects animation testing device provided in an embodiment of the present application;

[0037] Fig.11e A structural diagram of a special effects animation testing device provided in an embodiment of the present application;

[0038] Fig.12 A structural diagram of a device for special effects animation testing provided in an embodiment of the present application;

[0039] Fig.13 A structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] The embodiments of the present application are described below in conjunction with the accompanying drawings.

[0041] In order to make their videos more popular, users often add special effects animations, such as sticker animations, to their videos. In order to ensure the implementation of special effects animation functions, special effects animations often need to be tested. The current API granularity-based testing has the problem of difficulty in covering some application scenarios, making it difficult to ensure that special effects animations can achieve their functions in various application scenarios.

[0042] In order to solve the above technical problems, the embodiment of the present application provides a testing method for special effect animation, which tests the special effect animation with animation test files as the granularity. Since the animation test files are configured according to the functions implemented in various application scenarios, the animation test files can cover various application scenarios, thereby ensuring that the special effect animation can realize its functions in various application scenarios. At the same time, when it is necessary to add or update the animation test files, only the animation test files and test verification files need to be added or updated, and there is no need to change the code, which is simple and convenient to operate.

[0043] The method provided in the embodiment of the present application can be applied to special effect animation rendering scenarios, such as PAG sticker animation rendering scenarios, wherein the full name of PAG in English is Portable Animated Graphics, which is a sticker animation component. PAG is an improvement on the Lottie (a special effect animation component name) animation solution, which can significantly reduce development costs while effectively solving problems such as large animation files, limited support for animation features, and low rendering efficiency. In addition, PAG has an editable feature, and the sticker animation it provides can be edited. For example, when adding sticker animation to a video, the text in the sticker animation can be modified according to user needs to meet the user's personalized requirements. See Figure 1 As shown, Figure 1 A PAG sticker animation application scenario is shown. Various sticker animations are provided in the interface, and users can choose their favorite sticker animations. For example, the user selects Figure 1 The sticker animation shown in the dotted box.

[0044] If the user adds a sticker animation to the video when making a video, the sticker animation can be played within a specific duration of the video by adjusting the duration. Figure 2 As shown, Figure 2 An interface diagram showing sticker animation playing in a video.

[0045] Special effects animation rendering is widely used in various video production, image processing (such as photo editing software) and other products, so the method provided in the embodiments of the present application can be applied to the above products.

[0046] It can be understood that the method can be applied to a processing device with special effects animation rendering function, which can be a terminal device, and the terminal device can be, for example, a smart terminal such as a mobile phone, a computer, a personal digital assistant (PDA), a tablet computer and other devices.

[0047] In order to facilitate understanding of the technical solution of the present application, the testing method of the special effects animation provided in the embodiment of the present application is introduced below in combination with actual application scenarios.

[0048] See also Figure 3 , Figure 3 A schematic diagram of an application scenario of a test method for special effects animation provided in an embodiment of the present application. The application scenario includes a terminal device 301, in which an animation test file and a test verification file are pre-set. The animation test file is a file corresponding to the special effects animation to be tested, which can be applied to various scenarios. The test verification file is used to test the animation test file, which includes a feature value, and the feature value has a mapping relationship with each frame of image data in the animation test file.

[0049] In order to ensure that the function of the special effects animation can be implemented normally, the special effects animation needs to be tested. During the test, the terminal device 301 can run each animation test file in turn to render the special effects animation. In the process of running to the target animation test file, the terminal device 301 can calculate the first eigenvalue corresponding to each frame of image data in the target animation test file, and obtain the second eigenvalue corresponding to each frame of image data in the target animation test file from the test verification file according to the mapping relationship.

[0050] Since the first eigenvalue is generated during the actual operation process, it can reflect the actual animation effect of the target animation test file, and the second eigenvalue is pre-set and can reflect the expected animation effect of the target animation test file. Therefore, the terminal device 301 can determine whether the first eigenvalue is consistent with the second eigenvalue frame by frame. If the first eigenvalue is consistent with the second eigenvalue, the target animation test file passes the test, otherwise the test fails.

[0051] Next, the special effects animation testing method provided in the embodiment of the present application will be introduced in detail with reference to the accompanying drawings.

[0052] See also Figure 4 , Figure 4 A flow chart of a special effects animation testing method is shown, the method comprising:

[0053] S401, running each animation test file in sequence to perform special effect animation rendering.

[0054] Before testing the special effects animation, you can pre-set the animation test file and test verification file in the terminal device. Among them, the animation test file covers multiple scenes, and the scenes or boundary conditions that cannot be covered by the API interface test can be covered by the animation test file. If the animation test file is a test file of the PAG sticker animation, the animation test file can be a file in pag format.

[0055] The test verification file includes a characteristic value, which has a mapping relationship with each frame of image data in the animation test file, that is, each frame of image data in the animation test file has a corresponding characteristic value in the test verification file. The test verification file can be a file in JavaScript Object Notation (json) format.

[0056] The pre-set feature value can reflect the expected animation effect of the target animation test file. The feature value is a unique identifier of each frame of image data in the target animation test file, and any identifier that uniquely identifies the image data can be used as a feature value. For example, the feature value can be a message digest algorithm 5 (Message-Digest Algorithm, MD5) value, a hash value, etc.

[0057] It should be noted that the method provided in the embodiment of the present application can be Figure 5 The architecture shown is implemented and deployed on a terminal device. The architecture at least includes a configuration module, a rendering module and a verification module, wherein the animation test file and the test verification file can be set in the configuration module.

[0058] The rendering module can be used to execute S401. The rendering module needs to traverse the animation test files in the configuration module and run each animation test file to perform special effect animation rendering. Specifically, the animation test file can be run through an API provided by a software development kit (SDK) of the animation test file.

[0059] It is understandable that the terminal device used to run the animation test file may have some differences in rendering results due to different models and system versions. Therefore, one animation test file may correspond to multiple test verification files. In this case, in order to achieve the mapping between the animation test file and the test verification file, the mapping relationship can be set through the mapping file.

[0060] The mapping file is a key-value (KV) storage structure. The key stores the model information and system version information of the terminal device running the animation test file, and the value stores the corresponding test verification file name.

[0061] by Figure 6For example, the animation test file is a plurality of animation test files in pag format (for example, animation test file 1.pag, animation test file 2.pag, ... animation test file n.pag). Due to the mobile phone model and system version, there may be multiple copies of the test verification file, for example, m copies, in different folders (for example, Folder 1, Folder 2, ... Folder m). Each test verification file includes the characteristic value of each frame of image data in the animation test file (for example, Folder1 includes test verification file 1.json, test verification file 2.json, ... test verification file n.json). The model information and system version information are stored in the Key, and the corresponding verification folder name (the name of Folder1, the name of Folder 2, ... the name of Folder m) is stored in the Value. Therefore, according to the model information and system version information of the terminal device, it is determined to use the test verification file in which folder to determine the characteristic value of each image data in the animation test file.

[0062] S402. During the process of running to the target animation test file, calculate the first characteristic value corresponding to each frame of image data of the target animation test file.

[0063] In the process of running the target animation test file, the terminal device can calculate the first characteristic value corresponding to each frame of image data of the target animation test file, wherein the first characteristic value reflects the actual animation effect of the target animation test file. Figure 5 The verification module shown can be used to execute S402 - S404 .

[0064] In the embodiment of the present application, the calculated first eigenvalue is consistent with the representation of the pre-set eigenvalue, that is, if the pre-set eigenvalue is an MD5 value, the first eigenvalue should also be an MD5 value, so as to facilitate subsequent consistency judgment and obtain accurate test results.

[0065] It is understandable that the first eigenvalue can be obtained by encrypting each frame of image data of the target animation test file by the terminal device. In some cases, the image data may have different data formats, and there may be specific format requirements (preset formats) for the image data when calculating the first eigenvalue. For example, image data in some data formats cannot be encrypted using a specific encryption method. Assume that the first eigenvalue is an MD5 value, and the image data is CVPixelBufferRef (CVPixelBufferRef is a pixel image type), the image data cannot be directly encrypted by MD5. In this case, before calculating the first eigenvalue corresponding to each frame of image data of the target animation test file, the terminal device can perform format conversion on each frame of image data of the target animation test file, so that the first eigenvalue can be calculated based on each frame of image data after the format conversion.

[0066] For example, the terminal device converts the CVPixelBufferRef image data into a user interface image (UserInterface, UI Image), and then performs MD5 encryption on the UI Image after the format conversion to obtain a first eigenvalue.

[0067] In the case where the image data needs to be converted, the above architecture deployed on the terminal device may also include a data conversion module, see Figure 5 Shown in the dashed box.

[0068] S403: Acquire a second characteristic value corresponding to each frame of image data in the target animation test file from the test verification file according to the mapping relationship.

[0069] In addition to calculating the first eigenvalue, the terminal device can also obtain the second eigenvalue corresponding to each frame of image data in the target animation test file from the test verification file according to a preset mapping relationship, that is, Figure 5 As shown, the terminal device obtains the second characteristic value from the characteristic value preset in the configuration module through the verification module. The second characteristic value reflects the expected animation effect of the target animation test file.

[0070] S404: If the first feature value is consistent with the second feature value, the target animation test file passes the test.

[0071] Since the first eigenvalue is generated during the actual operation process, it can reflect the actual animation effect of the target animation test file, and the second eigenvalue is pre-set and can reflect the expected animation effect of the target animation test file. Therefore, the terminal device can determine whether the first eigenvalue is consistent with the second eigenvalue frame by frame. If the first eigenvalue is consistent with the second eigenvalue, the target animation test file passes the test; if the first eigenvalue is inconsistent with the second eigenvalue, the target animation test file fails the test.

[0072] During the test, the terminal device can display the status information of the test. Figure 7 If the test passes, the terminal device can display the status information of the test success, see Figure 8 The terminal device can display the status information of the test failure, see Fig. 9 As shown, for example, if the test fails, the target animation test file and each frame of image data in the target animation test file that failed the test are displayed. Of course, in some cases, after the test is completed, there may be multiple frames of image data that fail the test. The terminal device can display the image corresponding to the first frame of image data that failed the test, and display the playback progress of the animation test file corresponding to the image data. For example, Fig. 9 What is displayed is the "0" frame image data, and the playback progress of the corresponding animation test file is 0.

[0073] In this case, the above architecture deployed on the terminal device may also include a display module, see Figure 5 Shown in the dashed box.

[0074] It can be seen from the above technical scheme that the present application tests the special effects animation with the animation test file as the granularity. Before the test, the animation test file and the test verification file are pre-set. The test verification file includes the characteristic value, and the characteristic value has a mapping relationship with each frame of image data in the animation test file. Then, each animation test file is run in sequence. In the process of running to the target animation test file, the first characteristic value corresponding to each frame of image data in the target animation test file is calculated, and the second characteristic value corresponding to each frame of image data in the target animation test file is obtained from the test verification file according to the mapping relationship. Since the first characteristic value is generated during the actual operation, it can reflect the actual animation effect of the target animation test file, and the second characteristic value is pre-set, which can reflect the expected animation effect of the target animation test file. Therefore, it can be judged frame by frame whether the first characteristic value and the second characteristic value are consistent. If they are consistent, it means that the animation effect achieved by the target animation test file meets expectations, and the target animation test file passes the test, otherwise, the test fails. Since the animation test file is configured according to the functions implemented in various application scenarios, the animation test file can cover various application scenarios, thereby ensuring that the special effects animation can achieve its functions in various application scenarios.

[0075] In addition, in some cases, the pre-set animation test file may be added or updated. When a new animation test file needs to be added to the pre-set animation test file, the terminal device can run the new animation test file to test the new animation test file. Since the animation test file is newly added, the corresponding test verification file does not exist in the configuration module of the terminal device. Therefore, after running the new animation test file, it will be displayed that the test failed and the corresponding test verification file cannot be found. See Fig.10 However, during the test of the newly added animation test file, the calculated third eigenvalue of each frame of image data in the newly added animation test file will be recorded in the log information. Therefore, the terminal device can obtain the third eigenvalue of each frame of image data in the newly added animation test file according to the log information generated during the test of the newly added animation test file, and add the third eigenvalue to the test verification file.

[0076] It should be noted that if the terminal device includes different models and system versions, the above steps should be performed separately in the different models and system versions that need to be supported to improve the test verification file.

[0077] When the animation test file needs to be updated in the preset animation test file, the terminal device can run the updated animation test file to test the updated animation test file. Since the animation test file is updated, the characteristic value obtained from the test verification file preset in the configuration module is usually inconsistent with the calculated characteristic value. Therefore, after running the updated animation test file, it will be displayed that the test failed. See Fig. 9 However, during the test of the updated animation test file, the calculated fourth eigenvalue of each frame of image data in the updated animation test file will be recorded in the log information. Therefore, the terminal device can obtain the fourth eigenvalue of each frame of image data in the updated animation test file according to the log information generated during the test of the updated animation test file, and use the fourth eigenvalue to update the eigenvalue corresponding to each frame of image data of the original animation test file in the test verification file. The original animation test file is the animation test file before the update.

[0078] It can be seen that the testing method for special effects animation provided in the embodiment of the present application uses animation test files as the granularity. When it is necessary to add or update animation test files, only the animation test files and test verification files need to be added or updated, without changing the code. The operation is simple and convenient.

[0079] Next, the special effects animation testing method provided by the embodiment of the present application will be introduced in combination with actual application scenarios. In the application scenario, the terminal device is a smart phone, the special effects animation is a sticker animation, and the sticker animation is applied to the short video production software. On this basis, the sticker animation is tested.

[0080] See also Figure 5 As shown, the smart phone includes a configuration module, a rendering module, a data conversion module, a verification module and a display module. The configuration module includes an animation test file, a mapping file and a test verification file. The test verification file includes the MD5 value (characteristic value) corresponding to each frame of image data in the animation test file. The rendering module traverses the animation test files in the configuration module and plays the animation test files. The data conversion module converts the format of each frame of image data obtained in the rendering module, and the image data after the format conversion can be encrypted by MD5. The verification module encrypts the converted image data to obtain the MD5 value (first characteristic value) of each frame of image data, and the verification module can obtain the MD5 value (second characteristic value) of each frame of image data from the configuration module, compares and verifies frame by frame, and returns the comparison result to the display module so that the display module displays the test result.

[0081] Based on the test method of the special effects animation provided in the above embodiment, the present application embodiment also provides a test device for special effects animation, see Fig.11a , the device includes a configuration module 1101, a rendering module 1102 and a verification module 1103:

[0082] The configuration module 1101 is used to pre-set an animation test file and a test verification file, wherein the test verification file includes a feature value, and the feature value has a mapping relationship with each frame of image data in the animation test file;

[0083] The rendering module 1102 is used to run each animation test file in sequence;

[0084] The verification module 1103 is used to calculate the first eigenvalue corresponding to each frame of image data in the target animation test file during the process of running to the target animation test file; the first eigenvalue reflects the actual animation effect of the target animation test file; obtain the second eigenvalue corresponding to each frame of image data in the target animation test file from the test verification file according to the mapping relationship; the second eigenvalue reflects the expected animation effect of the target animation test file; if the first eigenvalue is consistent with the second eigenvalue, the target animation test file passes the test.

[0085] In a possible implementation, if the first feature value is inconsistent with the second feature value, the target animation test file fails the test. Fig.11b, the device further includes a display module 1104:

[0086] The display module 1104 is used to display the target animation test file and each frame of image data that fails the test in the target animation test file.

[0087] In one possible implementation, if a new animation test file is added to the pre-set animation test file, see Fig.11c , the device further comprises an adding module 1105:

[0088] The rendering module 1102 is used to run the newly added animation test file and test the newly added animation test file;

[0089] The verification module 1103 is used to obtain the third characteristic value of each frame of image data in the newly added animation test file according to the log information generated during the test of the newly added animation test file;

[0090] The adding module 1105 is used to add the third characteristic value to the test verification file.

[0091] In one possible implementation, if you need to update the preset animation test file, see Fig.11d , the device further includes an updating module 1106:

[0092] The rendering module 1102 is used to run the updated animation test file and test the updated animation test file;

[0093] The verification module 1103 is used to obtain the fourth characteristic value of each frame of image data in the updated animation test file according to the log information generated during the test process of the updated animation test file;

[0094] The updating module 1106 is used to use the fourth characteristic value to update the characteristic value corresponding to each frame of image data of the original animation test file in the test verification file, and the original animation test file is the animation test file before the update.

[0095] In a possible implementation, if one animation test file corresponds to multiple test verification files, the mapping relationship is set through a mapping file.

[0096] In a possible implementation, the mapping file is a key-value storage structure, the key stores the model information and system version information of the terminal device running the animation test file, and the value stores the corresponding test verification file name.

[0097] In a possible implementation, if the image data of the target animation test file does not conform to the preset format, see Fig.11e , the device further includes a data conversion module 1107:

[0098] The data conversion module 1107 is used to convert the format of each frame of image data of the target animation test file;

[0099] The verification module 1103 is specifically configured to calculate the first characteristic value according to each frame of image data after format conversion.

[0100] The embodiment of the present application also provides a device for testing special effect animations. The device for testing special effect animations is introduced below in conjunction with the accompanying drawings. Fig.12 As shown, the embodiment of the present application provides a device 1200 for testing special effect animations. The device 1200 may also be a terminal device. The terminal device may be any intelligent terminal including a mobile phone, a tablet computer, a personal digital assistant (PDA), a point of sales (POS), a vehicle-mounted computer, etc., and the terminal device is a mobile phone as an example:

[0101] Fig.12 FIG. 1 is a block diagram showing a partial structure of a mobile phone related to a terminal device provided in an embodiment of the present application. Fig.12 The mobile phone includes: a radio frequency (RF) circuit 1210, a memory 1220, an input unit 1230, a display unit 1240, a sensor 1250, an audio circuit 1260, a wireless fidelity (WiFi) module 1270, a processor 1280, and a power supply 1290. Those skilled in the art can understand that Fig.12 The mobile phone structure shown in the figure does not constitute a limitation on the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0102] Combine the following Fig.12 A detailed introduction to the various components of the mobile phone:

[0103] The RF circuit 1210 can be used for receiving and sending signals during the process of sending and receiving information or making calls. In particular, after receiving the downlink information of the base station, it is sent to the processor 1280 for processing; in addition, the designed uplink data is sent to the base station. Usually, the RF circuit 1210 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, referred to as LNA), a duplexer, etc. In addition, the RF circuit 1210 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to the Global System of Mobile communication (Global System of Mobile communication, referred to as GSM), General Packet Radio Service (General Packet Radio Service, referred to as GPRS), Code Division Multiple Access (Code Division Multiple Access, referred to as CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, referred to as WCDMA), Long Term Evolution (Long Term Evolution, referred to as LTE), email, Short Messaging Service (SMS), etc.

[0104] The memory 1220 can be used to store software programs and modules. The processor 1280 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1220. The memory 1220 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory 1220 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0105] The input unit 1230 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 1230 may include a touch panel 1231 and other input devices 1232. The touch panel 1231, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 1231 or near the touch panel 1231 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 1231 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 1280, and can receive and execute the command sent by the processor 1280. In addition, the touch panel 1231 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 1231, the input unit 1230 may also include other input devices 1232. Specifically, other input devices 1232 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, etc.

[0106] The display unit 1240 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 1240 may include a display panel 1241. Optionally, the display panel 1241 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 1231 may cover the display panel 1241. When the touch panel 1231 detects a touch operation on or near it, it is transmitted to the processor 1280 to determine the type of touch event. Subsequently, the processor 1280 provides a corresponding visual output on the display panel 1241 according to the type of touch event. Although in Fig.12 In the embodiment, the touch panel 1231 and the display panel 1241 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 1231 and the display panel 1241 can be integrated to realize the input and output functions of the mobile phone.

[0107] The mobile phone may also include at least one sensor 1250, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1241 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 1241 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that can be configured in the mobile phone, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be repeated here.

[0108] The audio circuit 1260, the speaker 1261, and the microphone 1262 can provide an audio interface between the user and the mobile phone. The audio circuit 1260 can transmit the received audio data to the speaker 1261 after converting the received audio data into an electrical signal, which is converted into a sound signal for output; on the other hand, the microphone 1262 converts the collected sound signal into an electrical signal, which is received by the audio circuit 1260 and converted into audio data, and then the audio data is output to the processor 1280 for processing, and then sent to another mobile phone through the RF circuit 1210, or the audio data is output to the memory 1220 for further processing.

[0109] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages and access streaming media through the WiFi module 1270. It provides users with wireless broadband Internet access. Fig.12 A WiFi module 1270 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.

[0110] The processor 1280 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory 1220, and calling data stored in the memory 1220. Optionally, the processor 1280 may include one or more processing units; preferably, the processor 1280 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 1280.

[0111] The mobile phone also includes a power supply 1290 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 1280 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption management.

[0112] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.

[0113] In this embodiment, the processor 1280 included in the terminal device also has the following functions:

[0114] An animation test file and a test verification file are pre-set, wherein the test verification file includes a characteristic value, and the characteristic value has a mapping relationship with each frame of image data in the animation test file. The method includes:

[0115] Run each animation test file in turn to render special effects animation;

[0116] In the process of running to the target animation test file, a first characteristic value corresponding to each frame of image data of the target animation test file is calculated; the first characteristic value reflects the actual animation effect of the target animation test file;

[0117] According to the mapping relationship, a second eigenvalue corresponding to each frame of image data in the target animation test file is obtained from the test verification file; the second eigenvalue reflects the expected animation effect of the target animation test file;

[0118] If the first feature value is consistent with the second feature value, the target animation test file passes the test.

[0119] This application embodiment also provides a server, see Fig.13 As shown, Fig.13 The structural diagram of the server 1300 provided in the embodiment of the present application, the server 1300 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1322 (for example, one or more processors) and memory 1332, one or more storage media 1330 (for example, one or more mass storage devices) storing application programs 1342 or data 1344. Among them, the memory 1332 and the storage medium 1330 can be short-term storage or permanent storage. The program stored in the storage medium 1330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 1322 can be configured to communicate with the storage medium 1330 and execute a series of instruction operations in the storage medium 1330 on the server 1300.

[0120] The server 1300 may also include one or more power supplies 1326, one or more wired or wireless network interfaces 1350, one or more input and output interfaces 1358, and / or one or more operating systems 1341, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0121] The steps performed by the server in the above embodiment can be based on the Fig.13 The server structure shown.

[0122] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0123] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0124] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

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

[0126] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0127] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0128] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for testing special effects animation, characterized in that: An animation test file and a test verification file are pre-set, wherein the animation test file is configured according to functions implemented in various application scenarios, and the test verification file includes a characteristic value, and the characteristic value has a mapping relationship with each frame of image data in the animation test file. The method includes: Run each animation test file in turn to render special effects animation; In the process of running to the target animation test file, a first characteristic value corresponding to each frame of image data of the target animation test file is calculated; the first characteristic value reflects the actual animation effect of the target animation test file; According to the mapping relationship, a second eigenvalue corresponding to each frame of image data in the target animation test file is obtained from the test verification file; the second eigenvalue reflects the expected animation effect of the target animation test file; If the first characteristic value is consistent with the second characteristic value, the target animation test file passes the test; If a new animation test file is added to the pre-set animation test file, the new animation test file is run to test the new animation test file; according to the log information generated during the test of the new animation test file, the third eigenvalue of each frame of image data in the new animation test file is obtained; and the third eigenvalue is added to the test verification file; If it is necessary to update the pre-set animation test file, run the updated animation test file and test the updated animation test file; obtain the fourth eigenvalue of each frame of image data in the updated animation test file based on the log information generated during the testing process of the updated animation test file; use the fourth eigenvalue to update the eigenvalues ​​corresponding to each frame of image data of the original animation test file in the test verification file, the original animation test file being the animation test file before the update.

2. The method according to claim 1, characterized in that: If the first feature value is inconsistent with the second feature value, the target animation test file fails the test, and the method further includes: The target animation test file and each frame of image data that failed the test in the target animation test file are displayed.

3. The method according to any one of claims 1 to 2, characterized in that: If one animation test file corresponds to multiple test verification files, the mapping relationship is set through the mapping file.

4. The method according to claim 3, characterized in that The mapping file is a key-value storage structure, in which the key stores the model information and system version information of the terminal device running the animation test file, and the value stores the corresponding test verification file name.

5. The method according to claim 1, characterized in that If the image data of the target animation test file does not conform to a preset format, before calculating the first characteristic value of each frame of image data of the target animation test file, the method further includes: Performing format conversion on each frame of image data of the target animation test file; The calculating the first characteristic value of each frame of image data of the target animation test file comprises: The first characteristic value is calculated based on each frame of image data after format conversion.

6. A testing device for special effects animation, characterized in that: The device includes a configuration module, a rendering module and a verification module: The configuration module is used to pre-set an animation test file and a test verification file, wherein the animation test file is configured according to functions implemented in various application scenarios, and the test verification file includes a feature value, and the feature value has a mapping relationship with each frame of image data in the animation test file; The rendering module is used to run each animation test file in sequence; The verification module is used to calculate the first characteristic value corresponding to each frame of image data of the target animation test file during the process of running to the target animation test file; The first characteristic value reflects the actual animation effect of the target animation test file; the second characteristic value corresponding to each frame of image data in the target animation test file is obtained from the test verification file according to the mapping relationship; The second feature value reflects the expected animation effect of the target animation test file; if the first feature value is consistent with the second feature value, the target animation test file passes the test; If a new animation test file is added to the pre-set animation test file, the device further comprises an adding module; The rendering module is further used to run the newly added animation test file and test the newly added animation test file; The verification module is further used to obtain a third characteristic value of each frame of image data in the newly added animation test file according to log information generated during the test of the newly added animation test file; The adding module is used to add the third characteristic value to the test verification file; If the preset animation test file needs to be updated, the device further includes an updating module; The rendering module is further used to run the updated animation test file and test the updated animation test file; The verification module is further used to obtain a fourth eigenvalue of each frame of image data in the updated animation test file according to log information generated during the test process of the updated animation test file; The updating module is used to use the fourth characteristic value to update the characteristic value corresponding to each frame of image data of the original animation test file in the test verification file, and the original animation test file is the animation test file before the update.

7. The device according to claim 6, characterized in that If the first characteristic value is inconsistent with the second characteristic value, the target animation test file fails the test, and the device further includes: The display module is used to display the target animation test file and each frame of image data that fails the test in the target animation test file.

8. The device according to any one of claims 6 to 7, characterized in that: If one animation test file corresponds to multiple test verification files, the mapping relationship is set through the mapping file.

9. The device according to claim 8, characterized in that The mapping file is a key-value storage structure, in which the key stores the model information and system version information of the terminal device running the animation test file, and the value stores the corresponding test verification file name.

10. The device according to claim 6, characterized in that If the image data of the target animation test file does not conform to the preset format, the device further includes: A data conversion module, used for converting the format of each frame of image data of the target animation test file; The verification module is specifically used to calculate the first characteristic value according to each frame of image data after format conversion.

11. A device for testing special effects animation, characterized in that: The device comprises a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the method according to any one of claims 1 to 5 according to the instructions in the program code.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program codes, and the program codes are used to execute the method according to any one of claims 1 to 5.