Animation processing method and device, equipment, medium and product
Through the method of automatic playback and parameter matching, the problem of tedious animation acceptance operations and high requirements for testers have been solved, and efficient and accurate animation acceptance has been achieved.
Patent Information
- Application Number
- CN202411497129.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-01-28
AI Technical Summary
The prior art is complicated to operate when accepting animations and has high requirements for testers, making it difficult to improve efficiency and accuracy.
By receiving user input, automatically play animation in the target area, and automatically determine the animation parameters. By matching the reference animation parameters, it is determined whether the animation meets the specifications without recording animation videos or frame -by -frame comparison.
Simplified the animation acceptance process, reduced the requirements for testers, and improved the efficiency and accuracy of animation acceptance.
Smart Images

Figure CN119377698A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to an animation processing method, device, equipment, medium and product. Background Art
[0002] In order to improve the user experience of the application, developers usually add animations to the application. After the animation development is completed, it needs to be inspected by testers to determine the accuracy of the animation.
[0003] Currently, when accepting animations, testers usually record the animation video of the application first, and then compare the recorded animation video with the standard animation video frame by frame to determine whether the developed animation meets the animation specifications. This is not only cumbersome, but also places high demands on testers. Summary of the invention
[0004] The purpose of the embodiments of the present application is to provide an animation processing method, device, equipment, medium and product, which can solve the problems of cumbersome operations and high requirements for testers in related technologies when accepting animations.
[0005] In a first aspect, an embodiment of the present application provides an animation processing method, comprising:
[0006] receiving a first input of a target area;
[0007] In response to the first input, playing a first animation in the target area;
[0008] Determining first animation parameters corresponding to the first animation;
[0009] The first animation parameters are matched with the reference animation parameters to obtain a parameter matching result of the first animation, where the reference animation parameters are animation parameters corresponding to the reference animation.
[0010] In a second aspect, an embodiment of the present application provides an animation processing device, including:
[0011] A receiving module, configured to receive a first input of a target area;
[0012] A playing module, configured to play a first animation in a target area in response to a first input;
[0013] A determination module, used to determine a first animation parameter corresponding to the first animation;
[0014] The matching module is used to match the first animation parameters with the reference animation parameters to obtain the parameter matching result of the first animation, and the reference animation parameters are the animation parameters corresponding to the reference animation.
[0015] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0017] In a fifth aspect, an embodiment of the present application provides a chip, the chip including a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the steps of the method described in the first aspect.
[0018] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the method described in the first aspect.
[0019] In an embodiment of the present application, a first input to a target area is received; in response to the first input, a first animation is played in the target area; a first animation parameter corresponding to the first animation is determined; the first animation parameter is matched with a reference animation parameter to obtain a parameter matching result of the first animation, and the reference animation parameter is an animation parameter corresponding to the reference animation. That is, when the embodiment of the present application receives a first input to a target area from a user, the first animation can be automatically played in the target area, and the first animation parameter corresponding to the first animation can be automatically determined. By comparing the first animation parameter with the reference animation parameter of the reference animation, it can be determined whether the first animation played in the target area meets the animation specification, without the need to record the animation video of the target area and compare it frame by frame, and without the need for professional testers, thereby improving the efficiency and accuracy of animation acceptance. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 A flowchart of an animation processing method provided in an embodiment of the present application;
[0021] Figure 2 A schematic diagram of displaying animation parameters provided in an embodiment of the present application;
[0022] Figure 3 A flowchart of another animation processing method provided in an embodiment of the present application;
[0023] Figure 4 A flowchart of another animation processing method provided in an embodiment of the present application;
[0024] Figure 5 A schematic diagram of an animation curve provided in an embodiment of the present application;
[0025] Figure 6 A schematic diagram of a user adjusting an animation curve provided in an embodiment of the present application;
[0026] Figure 7 A schematic diagram of a target area provided in an embodiment of the present application;
[0027] Figure 8 A schematic diagram of the structure of an animation processing device provided in an embodiment of the present application;
[0028] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0029] Fig.10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0031] The terms "first", "second", etc. in the specification of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are usually a class, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0032] When accepting the animation of the target area, the related technology needs to record the animation video of the target area, and then compare the recorded animation video with the standard animation video frame by frame to determine whether the developed animation video of the target area meets the animation specification. Not only is the operation cumbersome, the accuracy of the comparison result is also poor, and the requirements for the acceptance personnel are also relatively high, that is, only personnel who understand animation can accept the animation, which has certain limitations.
[0033] To this end, an embodiment of the present application provides an animation processing method, which does not require recording animation video of the target area, does not require frame-by-frame comparison of the animation video, and does not require professional acceptance personnel, thereby greatly lowering the acceptance threshold of the animation.
[0034] The animation processing method provided in the embodiment of the present application can be applied to electronic devices such as mobile phones, tablets, and laptop computers, and can be applied to scenarios where it is necessary to test whether the animation effects of the target objects developed by developers meet the specifications.
[0035] The following, in conjunction with the accompanying drawings, describes in detail the animation processing method, device, equipment, medium and product provided in the embodiments of the present application through specific embodiments and their application scenarios.
[0036] Figure 1 A flowchart of an animation processing method provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the animation processing method may include the following steps:
[0037] S110: Receive a first input to a target area.
[0038] S120: In response to a first input, play a first animation in a target area.
[0039] S130: Determine a first animation parameter corresponding to the first animation.
[0040] S140: Match the first animation parameters with reference animation parameters to obtain parameter matching results of the first animation, where the reference animation parameters are animation parameters corresponding to the reference animation.
[0041] Upon receiving the first input of the user to the target area, the embodiment of the present application can automatically play in the target area and automatically determine the first animation parameters corresponding to the first animation. By comparing the first animation parameters with the reference animation parameters of the reference animation, it can be determined whether the first animation of the target area meets the animation specifications. There is no need to record the animation video of the target area and compare it frame by frame, and there is no need for professional testers, which improves the efficiency and accuracy of animation acceptance.
[0042] The above steps are described in detail below:
[0043] In S110, the target area may be an area where an animation is set, and the target area may include one or more target objects. For example, the target area may be part or all of the display interface of the electronic device, and the display interface may be the desktop of the electronic device or the interface of an application in the electronic device.
[0044] When the display interface is the desktop of an electronic device, the target object may be at least one application icon on the desktop; when the display interface is the interface of an application in an electronic device, the target object may be a control of the application interface, a title, text or other object of the application interface.
[0045] The first input is used to trigger the target area to play a pre-set animation. Exemplarily, the first input includes but is not limited to: the user's touch input to the target area through a touch device such as a finger or a stylus, or a voice command input by the user, or a specific gesture input by the user, or other feasible inputs. The specific input can be determined according to actual usage requirements and is not limited in the embodiments of the present application. The specific gesture in the embodiments of the present application can be any one of a single-click gesture, a sliding gesture, a drag gesture, a pressure recognition gesture, a long press gesture, an area change gesture, a double-press gesture, and a double-click gesture; the click input in the embodiments of the present application can be a single-click input, a double-click input, or any number of click inputs, etc., and can also be a long press input or a short press input. For example, the first input can be: a double-click input of the target area by the user.
[0046] In S120, the first animation may be an animation pre-set for the target area. The first animation may include one or more animations, that is, the same target area may execute one or more animation effects. When the same target area executes multiple animations, the multiple animations may be executed simultaneously or in a certain sequence. The execution order and number of the animations may be flexibly set according to the scene, requirements, etc.
[0047] When the target area contains multiple target objects, the animations corresponding to the multiple target objects can be the same or different, which can improve the flexibility of the animation.
[0048] In an embodiment of the present application, after the electronic device receives the first input of the user to the target area, it can play the first animation in the target area to provide a basis for subsequently determining the animation parameters of the first animation.
[0049] In S130, the first animation parameter may be a key parameter that can characterize the first animation, for example, may include but is not limited to the animation type of the first animation, change parameters of the target frame picture, etc. The target frame picture may be part of the frame pictures or all the frame pictures of all the frame pictures captured by the electronic device when the first animation is played in the target area.
[0050] The change parameter here may be a change parameter corresponding to the animation type. For example, when the animation type is a transparency animation type, the change parameter of the target frame image may be a transparency change parameter of the target frame image. For another example, when the animation type is a rotation animation type, the change parameter of the target frame image may be an image angle change parameter of the target frame image.
[0051] Exemplarily, when the target area plays the first animation, the electronic device may capture the target frame image, and determine the first animation parameter according to the change parameter of the target frame image.
[0052] Exemplarily, the electronic device may also capture a first picture when the target area starts to change and a second picture when the target area ends to change, and determine the first animation parameter according to the first picture, the second picture and the change duration of the target area.
[0053] Of course, the first animation parameter of the first animation may also be determined by other methods, which are not specifically limited in the embodiment of the present application.
[0054] In some embodiments, after S130, the electronic device may further include the following steps:
[0055] Output the first animation parameter.
[0056] The embodiment of the present application does not limit the output method of the first animation parameter. For example, the electronic device can display the first animation parameter on the display interface where the target area is located, or can output the first animation parameter through voice, email, phone, etc. Outputting the first animation parameter helps the user to have a deeper understanding of the first animation, especially when the first animation does not meet the animation specification or expectation, it is convenient for the user to adjust the first animation.
[0057] Figure 2 A display diagram of an animation parameter is exemplified, wherein the target area 201 is the area where the search box is located on the display interface 200 , and the animation parameters corresponding to the search box can be displayed in area 202 .
[0058] In some embodiments, the reference animation parameters may be displayed in area 203 by default, so that the user can make comparisons by themselves.
[0059] In some embodiments, the user may also perform a fourth input on the target area 201. The fourth input may be a single click, double click, long press, or slide on the target area 201. After receiving the fourth input, the electronic device displays the reference animation parameters in area 203, thereby meeting the user's personalized needs.
[0060] In S140 , the reference animation parameters are animation parameters corresponding to the reference animation. The reference animation may be an animation that complies with a standard. The reference animation may also be called a standard animation.
[0061] After determining the first animation parameters of the first animation played in the target area, the electronic device can match the first animation parameters with reference animation parameters to determine whether the first animation meets the animation specification.
[0062] Exemplarily, when the first animation parameters match the reference animation parameters, it can be determined that the first animation meets the animation specification, that is, the acceptance is successful. When the first animation parameters do not match the reference animation parameters, it can be determined that the first animation does not meet the animation specification, that is, the acceptance fails.
[0063] In some embodiments, the first animation parameter matches the reference animation parameter may be that the first animation parameter is completely identical to the reference animation parameter, and the first animation parameter does not match the reference animation parameter may be that at least one of the first animation parameter and the reference animation parameter is different.
[0064] In some embodiments, the first animation parameter matches the reference animation parameter when the similarity between the first animation parameter and the reference animation parameter is greater than or equal to a similarity threshold, and the first animation parameter does not match the reference animation parameter when the similarity between the first animation parameter and the reference animation parameter is less than the similarity threshold.
[0065] The similarity between the first animation parameter and the reference animation parameter can be determined according to the number of parameters that are the same between the first animation parameter and the reference animation parameter and the total number of parameters included in the reference animation parameter. Exemplarily, the similarity between the first animation parameter and the reference animation parameter = the number of parameters that are the same / the total number of parameters * 100%.
[0066] Figure 3 A flowchart of another animation processing method provided in an embodiment of the present application, Figure 3 and Figure 1 The difference is that Figure 1 The S130 in can be refined into Figure 3 S310-S320 in.
[0067] S310: Capture the first animation according to a preconfigured capture frame rate to obtain at least one captured frame, where the capture frame rate is the same as a page refresh rate of the electronic device.
[0068] The capture frame rate is the frame rate at which the electronic device captures the first animation when the target area plays the first animation, and the page refresh rate of the electronic device is the number of page updates per second. In the embodiment of the present application, the capture frame rate is consistent with the page refresh rate of the electronic device, so that there will be no frame leakage problem during the animation analysis process, thereby affecting the animation analysis effect.
[0069] In some embodiments, when the capture frame rate is inconsistent with the page refresh rate, the electronic device can dynamically adjust the capture frame rate according to the page refresh rate so that the adjusted capture frame rate is consistent with the page refresh rate.
[0070] By capturing the first animation according to the capture frame rate, at least one frame of captured image can be obtained, which provides a more accurate basis for subsequently determining the first animation parameters.
[0071] S320. Determine first animation parameters corresponding to the first animation according to change parameters of each captured image, where the change parameters include at least one of the following: a change type, a change range corresponding to the change type, and a change duration corresponding to the change type.
[0072] The change type may include, but is not limited to, a transparency change type, a displacement change type, a rotation change type, and a size change type.
[0073] The transparency change type is used to characterize the change in transparency of the target area or the target object within the target area, the displacement change type is used to characterize the change in displacement of the target area or the target object within the target area, the rotation change type is used to characterize the change in angle of the target area or the target object within the target area, and the size change type is used to characterize the change in size of the target area or the target object within the target area.
[0074] Taking the change type including the transparency change type as an example, the change range here can be the change range of transparency, such as the transparency changes from opaque to completely transparent, and the change range can be expressed as 1-0, where 1 represents opaque and 0 represents completely transparent. In actual application, the change range of transparency can also be set according to the scene, requirements, etc.
[0075] Taking the change type including the rotation change type as an example, the change range here can be the change range of the image rotation angle. Exemplarily, the change range can be set to 0°-90°, 0° can indicate that the target object is at the initial position, that is, the position before rotation, 90° can indicate that the target area or the target object in the target area is rotated 90° clockwise or counterclockwise from the initial position, that is, the target area or the target object in the target area can rotate between the initial position and a position with an angle of 90° to the initial position.
[0076] Taking the change type including the transparency change type as an example, illustratively, when the transparency of the target area or the target object in the target area changes, the transparency of the first frame of the change and the transparency of the last frame of the change can be identified, and the transparency change range can be obtained according to the difference between the transparency of the first frame of the picture and the transparency of the last frame of the picture. The determination process of the change range corresponding to other change types is similar.
[0077] The change duration is the time required for the target area or the target object in the target area to change. Taking the change of the target object in the target area as an example, when the target object changes, the start time of the change can be recorded, and when the target object changes, the end time of the change can be recorded. The change duration of the target object can be obtained based on the difference between the two times.
[0078] According to one or more of the change type, the change range and the change duration, the animation parameter corresponding to the first animation may be determined.
[0079] Since the change type, change range and change duration do not need to capture all the images, that is, only part of the images need to be captured to determine the change type, change range and change duration of the target area or the target object in the target area. In this way, there is no need to record animation video and compare frame by frame, which simplifies the operation. At the same time, it can also avoid the problem of missing frames and improve the efficiency and accuracy of animation acceptance.
[0080] Figure 4 A flowchart of another animation processing method provided in an embodiment of the present application, Figure 4 Taking the example that the change parameter includes the change type, the change range corresponding to the change type and the change duration corresponding to the change type, Figure 4 and Figure 3 The difference is that Figure 3 The S320 in can be refined into Figure 4 S410-S430 in.
[0081] S410: Determine an animation type of a first animation according to a change type.
[0082] Exemplarily, when the change type is a transparency change type, the animation type of the first animation can be determined as a transparency animation type; when the change type is a displacement change type, the animation type of the first animation can be determined as a displacement animation type; when the change type is a rotation change type, the animation type of the first animation can be determined as a rotation animation type.
[0083] S420: Determine curve parameters of the animation curve corresponding to the first animation according to the change range and the change duration.
[0084] The animation curve here may be a curve that can represent the animation stroke of the first animation, for example, it may be a third-order Bezier curve, and of course it may also be other types of curves.
[0085] The third-order Bezier curve includes two control points, a starting point and an end point. The third-order Bezier curve can be generated according to these four points.
[0086] Exemplarily, the interpolator parameters of the corresponding interpolator can be determined according to the change range and the change duration. The interpolator parameters here are the parameters used to draw the third-order Bezier curve, that is, the parameters corresponding to the above four points.
[0087] Taking the animation type as the transparency animation type, according to the range and duration of the transparency change, the parameters of the transparency animation interpolator can be obtained as (a1, a2, a3, a4), where a1, a2, a3 and a4 represent curve parameters of the third-order Bezier curve. In some embodiments, a1=0.2, a2=0.1, a3=0.2, a4=1.
[0088] Taking the animation type as the rotation animation type, according to the range and duration of the angle change, the parameters of the rotation animation interpolator can be obtained as (b1, b2, b3, b4), where b1, b2, b3 and b4 represent the curve parameters of the third-order Bezier curve respectively. In some embodiments, b1=0.31, b2=0.00, b3=0.46, b4=1.00.
[0089] Taking the animation type as the displacement animation type, according to the displacement change range and change duration, the parameters of the displacement animation interpolator can be obtained as (c1, c2, c3, c4), where c1, c2, c3 and c4 represent curve parameters of the third-order Bezier curve respectively. In some embodiments, c1=0.28, c2=0.00, c3=0.66, c4=1.00.
[0090] S430: Determine the animation type, the variation range corresponding to the animation type, and the curve parameters as first animation parameters.
[0091] Exemplarily, the first animation parameter can be expressed as (animation type, variation range, interpolator parameter). Taking the animation type as a transparency animation type as an example, in some embodiments, the first animation parameter can be expressed as (alpha, (1-0), (0.20, 0.10, 0.20, 1.00)), where alpha represents the transparency animation type, (1-0) represents the variation range of transparency, i.e., from opaque to completely transparent, and (0.20, 0.10, 0.20, 1.00) represents the transparency animation interpolator parameter.
[0092] Taking the rotation animation type as an example, in some embodiments, the first animation parameter can be expressed as (rotation, (0-90°), (0.31, 0.00, 0.46, 1.00)), where rotation represents the rotation animation type, (0-90°) represents the range of angle change, that is, a rotation of 90°, and (0.31, 0.00, 0.46, 1.00) represents the rotation animation interpolator parameter.
[0093] Taking the animation type of displacement animation type as an example, in some embodiments, the first animation parameter can be expressed as (tanslate, (0-130px), (0.28, 0.00, 0.66, 1.00)), tanslate represents the displacement animation type, (0-130px) represents the range of displacement, that is, 130px shifted to the right, and (0.28, 0.00, 0.66, 1.00) represents the displacement animation interpolator parameter.
[0094] In some embodiments, when the target area uses multiple animations, the animation parameters of each animation can be determined according to the process of the above embodiment, and then the animation parameters of the multiple animations can be combined to obtain the final animation parameters.
[0095] Taking the case where both the transparency and size of the target area change as an example, illustratively, the electronic device can identify the first frame where the transparency changes and the last frame where the transparency changes, and obtain the range of transparency changes. Combined with the duration of the transparency change, the parameters of the transparency animation interpolator can be obtained. Similarly, the electronic device can identify the first frame where the size changes and the last frame where the size changes, and obtain the range of size changes, such as (1-0.5), which means that the target area is reduced by 50% during the animation process. Combined with the duration of the size change, the parameters of the scaling type animation interpolator can be obtained. Through the above analysis, we can derive the animation parameters of the superimposed animation: ((alpha,(1-0),(0.20,0.10,0.20,1.00))(scale,1-0.5,(0.20,0.10,0.20,1.00))) means that the effect of this animation is to superimpose the scaling animation while the transparency changes, and the transparency changes from opaque to completely transparent. The animation interpolator parameters of transparency are (0.20,0.10,0.20,1.00). At the same time, the scaling animation is superimposed, and the size of the target object is reduced by 0.5 times. The animation interpolator parameters of the scaling animation are (0.20,0.10,0.20,1.00).
[0096] In some embodiments, the animation parameters may further include animation duration, that is, the change duration in the above embodiments.
[0097] The embodiment of the present application can determine the animation parameters of the animation applied to the target area according to the animation type, change range and change duration of the target area. There is no need to record the animation video of the target area, nor to compare the recorded animation video with the standard video frame by frame. This simplifies the acceptance operation and improves the accuracy of the acceptance results.
[0098] In some embodiments, after S420, the animation processing method may further include the following steps:
[0099] According to the curve parameters, display the animation curve corresponding to the first animation;
[0100] receiving a second input for the animation curve;
[0101] In response to the second input, updating the first animation parameter to obtain a second animation parameter;
[0102] The second animation corresponding to the second animation parameter is played in the target area.
[0103] Exemplarily, an animation curve corresponding to the first animation may be generated according to the curve parameters of the animation curve, and the travel of the first animation may be more intuitively understood through the animation curve.
[0104] Taking the case where the curve parameters include interpolator parameters as an example, illustratively, a corresponding Bezier curve can be generated according to the interpolator parameters. Figure 5 An exemplary schematic diagram of an animation curve is listed, wherein point A is the starting point of the Bezier curve 501, points B and C are the control points of the Bezier curve 501, and point D is the end point of the Bezier curve 501. The values of points A, B, C, and D are the parameter values of the corresponding interpolators in the above embodiment.
[0105] The second input is used to adjust the shape of the animation curve. Exemplarily, the second input may include but is not limited to: the user's touch input of the curve parameters through a touch device such as a finger or a stylus, or a voice command input by the user, or a specific gesture input by the user, or other feasible inputs. The specific input can be determined according to actual usage requirements, and the embodiment of the present application is not limited. The specific gesture in the embodiment of the present application can be any one of a single-click gesture, a sliding gesture, a drag gesture, a pressure recognition gesture, a long press gesture, an area change gesture, a double-press gesture, and a double-click gesture; the click input in the embodiment of the present application can be a single-click input, a double-click input, or any number of click inputs, etc., and can also be a long press input or a short press input. For example, the above-mentioned second input can be: the user's movement input of the curve parameters.
[0106] After receiving the second input, the electronic device may update the first animation parameters and determine the updated first animation parameters as the second animation parameters. At this time, the electronic device may play the second animation corresponding to the second animation parameters in the target area. If the second animation still does not meet the user's expectations, the curve parameters may continue to be adjusted until the updated animation meets the user's expectations.
[0107] For example, when the animation of the target area meets the animation specification but does not meet the user's expectations, the user can synchronously modify the animation effect of the target area by adjusting the curve parameters corresponding to the animation curve.
[0108] Figure 6 A schematic diagram of a user adjusting an animation curve is exemplified. Figure 6 Taking the user adjusting the position of point B as an example, in actual application, the user can also adjust other points according to needs. By adjusting the position of at least one point among point A, point B, point C, and point D, the shape of the animation curve can be changed, thereby changing the animation effect of the target object. That is, the embodiment of the present application can dynamically adjust the animation effect of the target object by adjusting the animation curve without redevelopment.
[0109] The embodiment of the present application can generate an animation curve according to the curve parameters corresponding to the animation, so that the user can understand the animation stroke of the animation more intuitively. At the same time, the animation can be dynamically adjusted by adjusting the animation curve without modifying the underlying code, which simplifies the user's work and improves the animation adjustment efficiency.
[0110] In some embodiments, before S110, the animation processing method may further include the following steps:
[0111] receiving a third input to the display interface;
[0112] In response to the third input, a target area is determined from the display interface, where the target area is a partial area of the display interface.
[0113] The third input is used to select the target area from the display interface. Exemplarily, the third input may include but is not limited to: the user's touch input to the display interface through a touch device such as a finger or a stylus, or a voice command input by the user, or a specific gesture input by the user, or other feasible inputs. The specific input can be determined according to actual usage requirements and is not limited in the embodiments of the present application. The specific gesture in the embodiments of the present application may be any one of a single-click gesture, a sliding gesture, a dragging gesture, a pressure recognition gesture, a long press gesture, an area change gesture, a double-press gesture, and a double-click gesture; the click input in the embodiments of the present application may be a single-click input, a double-click input, or any number of click inputs, etc., and may also be a long press input or a short press input. For example, the third input may be: the user's circle selection input on the display interface.
[0114] Considering that there may be multiple animations on the same page, in order to reduce the interference of other animations, the embodiment of the present application can first select a target area from the display interface and inspect the animation of the target area.
[0115] For example, Figure 7 As shown, the user can perform a circle selection input on the title bar of the display interface 200 and determine the area where the title bar is located as the target area 201. At this time, the target object may be the title bar.
[0116] After receiving the third input from the user, the electronic device may determine the area corresponding to the third input as the target area, and determine the object in the target area as the target object.
[0117] The embodiment of the present application can select an area from the display interface as the target area, and inspect the animation of the target area, thereby reducing the interference of animations in other areas and improving the inspection efficiency of the animation and the accuracy of the inspection results.
[0118] It should be noted that the animation processing method provided in the embodiment of the present application can be executed by an animation processing device or a processing module in the animation processing device for executing the animation processing method. In the embodiment of the present application, the animation processing device provided in the embodiment of the present application is described by taking the animation processing method executed by the animation processing device as an example.
[0119] Figure 8 A schematic diagram of the structure of an animation processing device provided in an embodiment of the present application.
[0120] like Figure 8 As shown, the animation processing device 800 may include:
[0121] The receiving module 801 is used to receive a first input of a target area;
[0122] A playing module 802, for playing a first animation in a target area in response to a first input;
[0123] A determination module 803, used to determine a first animation parameter corresponding to the first animation;
[0124] The matching module 804 is used to match the first animation parameters with the reference animation parameters to obtain the parameter matching result of the first animation, where the reference animation parameters are the animation parameters corresponding to the reference animation.
[0125] Upon receiving a first input from a user on a target area, the embodiment of the present application can automatically play a first animation in the target area and automatically determine first animation parameters corresponding to the first animation. By comparing the first animation parameters with reference animation parameters of a reference animation, it can be determined whether the first animation played in the target area complies with animation specifications. There is no need to record the animation video of the target area and compare it frame by frame, and there is no need for professional testers, which improves the efficiency and accuracy of animation acceptance.
[0126] In some possible implementations of the embodiment of the present application, the determination module 803 includes:
[0127] A capturing unit, configured to capture the first animation at a preconfigured capture frame rate to obtain at least one captured frame, wherein the capture frame rate is the same as a page refresh frame rate of the electronic device;
[0128] The determination unit is used to determine the first animation parameter corresponding to the first animation according to the change parameters of each captured image, where the change parameters include at least one of the following: change type, change range corresponding to the change type, and change duration corresponding to the change type.
[0129] In some possible implementations of the embodiments of the present application, the change parameter includes a change type, a change range corresponding to the change type, and a change duration corresponding to the change type;
[0130] Determine the unit, specifically for:
[0131] Determine the animation type of the first animation according to the change type;
[0132] Determine, according to the variation range and the variation duration, curve parameters of the animation curve corresponding to the first animation;
[0133] The animation type, the variation range corresponding to the animation type, and the curve parameter are determined as first animation parameters.
[0134] In some possible implementations of the embodiments of the present application, the animation processing device 800 may further include:
[0135] A display module, configured to display the animation curve corresponding to the first animation according to the curve parameters after the determination module 803 determines the curve parameters of the animation curve corresponding to the first animation according to the change range and the change duration;
[0136] The receiving module 801 is further used to receive a second input of the animation curve;
[0137] The animation processing device 800 may further include:
[0138] The updating module is further used to update the first animation parameter in response to the second input to obtain the second animation parameter;
[0139] The playing module 802 is used to play the second animation corresponding to the second animation parameter in the target area.
[0140] In some possible implementations of the embodiments of the present application, the receiving module 801 is further configured to receive a third input to the display interface before receiving the first input to the target area;
[0141] The determination module 803 is further configured to determine a target area from the display interface in response to a third input, where the target area is a partial area of the display interface.
[0142] The animation processing device in the embodiment of the present application can be a device, or a component in an electronic device, such as an integrated circuit or a chip. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a user computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application does not make specific limitations.
[0143] The electronic device in the embodiment of the present application may be a terminal with an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0144] The animation processing device provided in the embodiment of the present application can achieve Figures 1 to 4 The various processes in the animation processing method embodiment can achieve the same technical effect. To avoid repetition, they will not be described here.
[0145] like Fig. 9 As shown, an embodiment of the present application also provides an electronic device 900, including a processor 901 and a memory 902, wherein the memory 902 stores programs or instructions that can be executed on the processor 901, and when the program or instructions are executed by the processor 901, the various steps of the above-mentioned animation processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0146] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile terminals and non-mobile terminals.
[0147] Fig.10 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application.
[0148] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.
[0149] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.10 The structure of the electronic device 1000 shown in the figure does not constitute a limitation on the electronic device 1000. The electronic device 1000 may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0150] The user input unit 1007 is used to receive a first input to the target area;
[0151] Processor 1010 is used to play a first animation in a target area in response to a first input; determine first animation parameters corresponding to the first animation; match the first animation parameters with reference animation parameters to obtain parameter matching results of the first animation, where the reference animation parameters are animation parameters corresponding to the reference animation.
[0152] Upon receiving a first input from a user on a target area, the embodiment of the present application can automatically play a first animation in the target area and automatically determine first animation parameters corresponding to the first animation. By comparing the first animation parameters with reference animation parameters of a reference animation, it can be determined whether the first animation played in the target area complies with animation specifications. There is no need to record the animation video of the target area and compare it frame by frame, and there is no need for professional testers, which improves the efficiency and accuracy of animation acceptance.
[0153] In some possible implementations of the embodiments of the present application, the processor 1010 is specifically configured to:
[0154] The first animation is captured according to a preconfigured capture frame rate to obtain at least one captured frame, wherein the capture frame rate is the same as a page refresh rate of the electronic device;
[0155] The first animation parameter corresponding to the first animation is determined according to the change parameter of each captured image, where the change parameter includes at least one of the following: a change type, a change range corresponding to the change type, and a change duration corresponding to the change type.
[0156] In some possible implementations of the embodiments of the present application, the change parameter includes a change type, a change range corresponding to the change type, and a change duration corresponding to the change type;
[0157] The processor 1010 is specifically configured to:
[0158] Determine the animation type of the first animation according to the change type;
[0159] Determine, according to the variation range and the variation duration, curve parameters of the animation curve corresponding to the first animation;
[0160] The animation type, the variation range corresponding to the animation type, and the curve parameter are determined as first animation parameters.
[0161] In some possible implementations of the embodiments of the present application, the processor 1010 is further configured to, after determining the curve parameters of the animation curve corresponding to the first animation according to the change range and the change duration, display the animation curve corresponding to the first animation according to the curve parameters;
[0162] receiving a second input for the animation curve;
[0163] In response to the second input, updating the first animation parameter to obtain a second animation parameter;
[0164] Play the second animation in the target area.
[0165] In some possible implementations of the embodiments of the present application, the user input unit 1007 is further configured to receive a third input to the display interface before receiving the first input to the target area;
[0166] The display unit 1006 is used to determine a target area from the display interface in response to a third input, where the target area is a partial area of the display interface.
[0167] It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0168] The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0169] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.
[0170] The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned animation processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0171] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0172] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned animation processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0173] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0174] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned animation processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0175] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0176] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0177] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An animation processing method, characterized in that: include: receiving a first input of a target area; In response to the first input, playing a first animation in the target area; Determining first animation parameters corresponding to the first animation; The first animation parameters are matched with reference animation parameters to obtain parameter matching results of the first animation, where the reference animation parameters are animation parameters corresponding to the reference animation.
2. The method according to claim 1, characterized in that The determining a first animation parameter corresponding to the first animation includes: The first animation is captured according to a preconfigured capture frame rate to obtain at least one captured frame, wherein the capture frame rate is the same as a page refresh rate of the electronic device; According to the change parameters of each of the captured images, the first animation parameters corresponding to the first animation are determined, and the change parameters include at least one of the following: a change type, a change range corresponding to the change type, and a change duration corresponding to the change type.
3. The method according to claim 2, characterized in that The change parameters include a change type, a change range corresponding to the change type, and a change duration corresponding to the change type; The determining, according to the change parameters of each of the captured images, first animation parameters corresponding to the first animation includes: determining an animation type of the first animation according to the change type; Determining curve parameters of the animation curve corresponding to the first animation according to the change range and the change duration; The animation type, the variation range corresponding to the animation type, and the curve parameters are determined as the first animation parameters.
4. The method according to claim 3, characterized in that After determining the curve parameters of the animation curve corresponding to the first animation according to the variation range and the variation duration, the method further includes: According to the curve parameters, displaying the animation curve corresponding to the first animation; receiving a second input for the animation curve; In response to the second input, updating the first animation parameter to obtain a second animation parameter; A second animation corresponding to the second animation parameter is played in the target area.
5. The method according to any one of claims 1 to 4, characterized in that: Before receiving the first input to the target area, the method further includes: receiving a third input to the display interface; In response to the third input, a target area is determined from the display interface, where the target area is a partial area of the display interface.
6. An animation processing device, characterized in that: include: A receiving module, configured to receive a first input of a target area; A playing module, configured to play a first animation in the target area in response to the first input; A determination module, used to determine a first animation parameter corresponding to the first animation; The matching module is used to match the first animation parameters with reference animation parameters to obtain a parameter matching result of the first animation, wherein the reference animation parameters are animation parameters corresponding to the reference animation.
7. The device according to claim 6, characterized in that The determining module comprises: A capturing unit, configured to capture the first animation at a preconfigured capture frame rate to obtain at least one captured frame, wherein the capture frame rate is the same as a page refresh frame rate of the electronic device; The determination unit is used to determine the first animation parameter corresponding to the first animation according to the change parameter of each captured image, wherein the change parameter includes at least one of the following: the change type, the change range corresponding to the change type, and the change duration corresponding to the change type.
8. The device according to claim 7, characterized in that The change parameters include a change type, a change range corresponding to the change type, and a change duration corresponding to the change type; The determining unit is specifically configured to: determining an animation type of the first animation according to the change type; Determining curve parameters of the animation curve corresponding to the first animation according to the change range and the change duration; The animation type, the variation range corresponding to the animation type, and the curve parameters are determined as the first animation parameters.
9. The device according to claim 8, characterized in that The device also includes: A display module, configured to display the animation curve corresponding to the first animation according to the curve parameters after the determination module determines the curve parameters of the animation curve corresponding to the first animation according to the change range and the change duration; The receiving module is further used to receive a second input of the animation curve; The device also includes: An updating module, further used to update the first animation parameter in response to the second input to obtain a second animation parameter; The playing module is further used to play the second animation corresponding to the second animation parameter in the target area.
10. The device according to any one of claims 6 to 9, characterized in that: The receiving module is further configured to receive a third input to the display interface before receiving the first input to the target area; The determination module is further configured to determine a target area from the display interface in response to the third input, where the target area is a partial area of the display interface.
11. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 5 are implemented.
12. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
13. A computer program product, characterized in that The program product is stored in a storage medium, and the program product is executed by at least one processor to implement the steps of the method according to any one of claims 1 to 5.