Lyric motion effect display method, system, device, storage medium and program product
By combining the basic parameter τ and the correction parameter c, the problem of uneven display of lyrics animation and disconnection from the music rhythm is solved, realizing uniform and smooth display of lyrics animation and visual optimization, adapting to various animation combinations and real-time synchronization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN G WORLD TECH INC CO
- Filing Date
- 2026-02-11
- Publication Date
- 2026-07-14
AI Technical Summary
In existing technologies, the lyrics animation display is uneven and out of sync with the music rhythm, making it impossible to display all lyrics completely within the total time, resulting in visual abruptness or overlapping phenomena.
By introducing the basic parameter τ and the correction parameter c, and combining the formula to calculate the animation display time of each line of lyrics or each character, the animation density is adaptively adjusted and the display time is precisely controlled, supporting multiple animation combinations and real-time synchronization with the music rhythm.
It achieves uniform and smooth display of lyrics animation effects, avoids the end lyrics from displaying too quickly or overlapping, enhances visual optimization and musical expressiveness, and adapts to different languages and device variations.
Smart Images

Figure CN121681868B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of multimedia display technology, specifically to a method, system, device, storage medium, and program product for displaying lyrics animation effects. Background Technology
[0002] In existing technologies, lyrics animation display typically employs fixed time intervals or simple linear algorithms, resulting in uneven animation display, disconnection from the music rhythm, or inability to display all lyrics completely within the total time. This invention solves these problems by introducing parameters τ and c, combined with formulaic calculations, achieving synchronized animation display and visual optimization. Summary of the Invention
[0003] To address the mismatch between lyrics display and animation effects in existing technologies, this invention provides a method, system, device, storage medium, and program product for displaying lyrics animation effects. This method enables synchronization and visual optimization of animation effect display.
[0004] To this end, the first aspect of the present invention provides a method for displaying lyrics animation, comprising the following steps: obtaining a total time parameter required to display a song or a line of lyrics, the total time parameter including a basic parameter τ and a correction parameter c, wherein τ+c is the total time to display the song or a line of lyrics; obtaining the total number of lines of lyrics M or the total number of characters in each line of lyrics M; calculating the animation display completion time t0 for each line of lyrics or each character in a line of lyrics, wherein t0=τ / M+c; calculating the time interval t1 between two adjacent lines of lyrics or between two adjacent characters in a line of lyrics to start displaying the animation, wherein t1=τ / M; for the m-th line of lyrics or the m-th character in a line of lyrics, calculating the time point T at which the animation starts to be displayed, wherein T=(m-1)×t1; and starting to display the animation of the m-th line of lyrics or the m-th character at time point T, wherein m is a positive integer and 1≤m≤M.
[0005] This invention solves the core problems of uneven animation display and disconnection from musical rhythm in traditional lyrics animation display by innovatively separating the basic parameter τ and the correction parameter c. Specifically, the basic parameter τ reflects the basic time component of the animation and is proportional to the total number of lyric units M, ensuring that the animation density adaptively adjusts with the length of the lyrics; the correction parameter c, as a fixed time offset, effectively solves the visual abruptness caused by the premature end of the animation display. This method achieves precise time control of the animation display, ensuring that all lyrics animations are displayed evenly and smoothly within the total time, avoiding the phenomenon of the ending lyrics being displayed too quickly or overlapping.
[0006] In addition, in the lyrics animation display method according to the first aspect of the present invention, the total time may optionally be in units of seconds, milliseconds, microseconds or minutes.
[0007] In addition, in the lyrics animation display method according to the first aspect of the present invention, optionally, when applying character animation display to a line of lyrics, M is the total number of characters in the line of lyrics, t0 represents the animation display completion time of each character, and t1 represents the time interval between the start of animation display of adjacent characters.
[0008] In addition, in the lyrics animation display method according to the first aspect of the present invention, optionally, when applied to the lyrics animation display of a song, M is the total number of lyrics, t0 represents the animation display completion time of each line of lyrics, and t1 represents the time interval between the start of animation display of adjacent lines of lyrics.
[0009] Furthermore, in the lyrics animation display method according to the first aspect of the present invention, the animation effect may optionally include one or more combinations of color gradient, size change, position movement, or transparency change. In this case, by supporting the combined application of multiple animation effects, the visual expressiveness is enriched, while ensuring the coordination and consistency of multiple animation effects, thus solving the problem of insufficient expressiveness of a single animation effect.
[0010] Furthermore, in the lyrics animation display method according to the first aspect of the present invention, optionally, the step of obtaining the total time parameter required to display a song or a line of lyrics includes: extracting the song duration from the metadata of the audio file as the value of τ+c. In this case, the total time parameter is automatically obtained, solving the synchronization error problem caused by manual setting and ensuring accurate matching between the lyrics animation and music playback.
[0011] Furthermore, in the lyrics animation display method according to the first aspect of the present invention, optionally, the step of obtaining the total number of lines M of lyrics or the total number of characters M per line of lyrics includes: performing word segmentation on the lyrics text and including punctuation marks and spaces in the total number of characters. In this case, accurate counting of lyrics units can be achieved, solving the problem of animation time calculation deviation caused by ignoring punctuation and spaces in multilingual lyrics, and making the animation display of lyrics in different languages more natural and smooth.
[0012] Furthermore, in the lyrics animation display method according to the first aspect of the present invention, optionally, it further includes: dynamically adjusting the value of τ according to the audio playback progress, so that the animation display is synchronized with the music rhythm. In this case, real-time dynamic synchronization between the lyrics animation and the music rhythm can be achieved, solving the problem of the animation being out of sync with the music due to a fixed time interval, especially in music segments with obvious rhythm changes.
[0013] Furthermore, in the lyrics animation display method according to the first aspect of the present invention, optionally, the step of dynamically adjusting the value of τ includes: detecting the measure change point of the current music, and adjusting τ at the measure change point to match the rhythm change. In this case, precise alignment between the lyrics animation and the structural nodes of the music can be achieved, solving the problem of frequent jitter caused by beat-level adjustment, and improving the musical expressiveness and user emotional resonance.
[0014] Furthermore, in the lyrics animation display method according to the first aspect of the present invention, optionally, when m=M, the time point at which the display of the Mth line of lyrics or the Mth character is completed is equal to τ+c. In this case, the mathematical completeness and boundary condition accuracy of the animation display can be ensured, solving the problem of premature disappearance or residue of the ending lyrics in traditional methods, and achieving perfect synchronization between the animation and the end of the music.
[0015] Furthermore, in the lyrics animation display method according to the first aspect of the present invention, the method may optionally include: receiving a user-inputted animation duration preference value, and adjusting the value of the correction parameter c according to the preference value. In this case, personalized customization of the correction parameter c can be achieved, solving the problem of experience differences caused by a "one-size-fits-all" parameter setting, and is particularly suitable for user groups with different reading habits or special needs (such as reading disability assistance).
[0016] Furthermore, in the lyrics animation display method according to the first aspect of the present invention, optionally, the method further includes: when a change in the screen size of the lyrics display device is detected, recalculating the total number of lyrics units M and updating the animation display parameters. In this case, seamless switching of animations in responsive design can be achieved, solving the problem of animation interruption caused by changes in screen size, and providing a continuous and consistent user experience.
[0017] A second aspect of the present invention provides a lyrics animation display system, comprising: a lyrics parsing module, used to obtain the total time parameter required to display a song or a line of lyrics, and the total number of lines of lyrics M or the total number of characters M in each line of lyrics, wherein the total time parameter includes a basic parameter τ and a correction parameter c, wherein τ+c is the total time to display the song or a line of lyrics; a parameter calculation module, used to calculate the animation display parameters according to the formulas t0=τ / M+c, t1=τ / M and T=(m-1)×t1, wherein the animation display parameters include the animation display completion time t0, the time interval t1, and the time point T at which the animation starts to be displayed; and an animation rendering module, used to start displaying the animation of the m-th line of lyrics or the m-th character at time point T.
[0018] In addition, the lyrics animation display system according to the second aspect of the present invention may optionally include: a rhythm analysis module, used to analyze the rhythm characteristics of the audio signal and dynamically adjust the values of the basic parameter τ and the correction parameter c according to the rhythm characteristics.
[0019] A third aspect of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the lyric animation display method as described in the first aspect is implemented.
[0020] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the lyrics animation display method as described in the first aspect.
[0021] The fifth aspect of the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the lyrics animation display method as described in the first aspect.
[0022] According to the present invention, precise timing control of the animation display can be achieved, ensuring that all lyrics animation displays are completed evenly and smoothly within the total time, avoiding the phenomenon of the ending lyrics being displayed too quickly or overlapping. Attached Figure Description
[0023] The invention will now be explained in further detail by way of example only with reference to the accompanying drawings.
[0024] Figure 1 This is a flowchart illustrating a method for displaying animated lyrics according to an example of the present invention.
[0025] Figure 2 This is a functional block diagram illustrating the lyrics animation display system involved in the example of the present invention. Detailed Implementation
[0026] Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description, the same reference numerals are used for the same parts, and repeated descriptions are omitted. Furthermore, the drawings are merely schematic diagrams, and the proportions of the parts or the shapes of the parts may differ from the actual figures.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish different objects, not to describe a specific order. The terms "comprising" and "having," and any variations thereof, referring to a process, method, system, product, or apparatus that includes or has a series of steps or units, are not necessarily limited to those explicitly listed, but may include or have other steps or units not explicitly listed or inherent to these processes, methods, products, or apparatuses. All methods described in this invention can be performed in any suitable order unless otherwise indicated herein or clearly contradicted by the context.
[0028] Furthermore, the subheadings and similar terms used in the following description of this invention are not intended to limit the content or scope of this invention; they are merely for reading guidance. Such subheadings should not be construed as dividing the content of the article, nor should the content under a subheading be limited to the scope of that subheading.
[0029] Figure 1 This is a flowchart illustrating a method for displaying animated lyrics according to an example of the present invention.
[0030] Reference Figure 1 The first aspect of this invention provides a method for displaying lyrics animation effects, which may sometimes be referred to as a dynamic time allocation algorithm for lyrics units, a parameterized lyrics time axis control method, an adaptive lyrics animation time calculation method, etc., and is hereinafter sometimes simply referred to as this display method, this method, etc. A lyrics unit is the total number of lines of lyrics or the total number of characters per line of lyrics.
[0031] In some examples, the display method may include step S100, obtaining the total time parameter required to display a song or a line of lyrics. The total time parameter may include a base parameter τ and a correction parameter c, where τ+c is the total time required to display a song or a line of lyrics.
[0032] In some examples, the display method may include step S200, obtaining the total number of lines of lyrics M or the total number of characters M per line of lyrics.
[0033] In some examples, the display method may include step S300, calculating the animation display completion time t0 for each line of lyrics or each character in a line of lyrics, where t0 = τ / M + c.
[0034] In some examples, the display method may include step S400, calculating the time interval t1 between two adjacent lines of lyrics or between two adjacent characters in a line of lyrics at which the animation effect begins to be displayed, where t1 = τ / M.
[0035] In some examples, the display method may include step S500, calculating the time point T at which the animation effect begins to be displayed for the m-th line of lyrics or the m-th character of a line of lyrics, where T = (m-1) × t1.
[0036] In some examples, the display method may include step S600, displaying the animation of the m-th line of lyrics or the m-th character at time point T, where m is a positive integer and 1≤m≤M.
[0037] In some examples, the base parameter τ represents the basic time portion of the lyrics animation display, i.e., the core time required for the animation itself, excluding fixed offsets. For example, in the total time τ+c, τ is proportional to the total number of lyrics units M, reflecting the "dynamic" component of the animation.
[0038] In some examples, the correction parameter 'c' represents a fixed time offset, used to adjust the start or end point of the animation display to ensure precise control of the total time. When 'c' > 0, it can prevent the animation display from ending too early, improving visual smoothness.
[0039] In some examples, M represents the total number of lyric units. When applied to lyric line display, M is the total number of lyric lines for a song; when applied to character display, M is the total number of characters in a single lyric line. In some examples, the character count may include spaces and punctuation.
[0040] In some examples, t0 represents the completion time or duration of the animation for each line of lyrics or each character, that is, the time required from the start of display to the full rendering of the animation. For example, t0 = 0.8 seconds means that the highlighting effect of a character takes 0.8 seconds to complete.
[0041] In some examples, t1 represents the time interval between the start of animation for adjacent lyric units, that is, the difference between the start time of the next unit and the start time of the previous unit. For example, t1 = 0.3 seconds means that the animation for a new character starts every 0.3 seconds.
[0042] In some examples, T represents the absolute time point at which the animation begins to appear in the m-th lyric unit (line or character), based on the playback start time of 0 seconds.
[0043] In the above embodiment, firstly, the system obtains the basic parameter τ and the correction parameter c, as well as the total number of lines of lyrics M or the total number of characters M per line of lyrics. The animation display completion time t0 (i.e., animation duration) for each lyric unit is calculated using the formula t0 = τ / M + c: τ / M reflects the "density" of the animation (the more lyric units, the shorter the duration of a single animation), and the correction parameter c serves as a fixed offset to ensure accurate total time. The formula t1 = τ / M calculates the start interval between lyric units. This interval depends only on the basic parameter τ and the total number of lyric units M, and is independent of the correction parameter c, ensuring a uniform animation start rhythm. The time point T = (m-1) × t1 ensures that the m-th lyric unit starts at the correct time (when m=1, T=0, i.e., the first lyric unit starts immediately). Finally, the animation display is triggered at time T. The key innovation of this method lies in separating the basic parameter τ and the correction parameter c: the basic parameter τ controls the animation density, and the correction parameter c handles the fixed delay, avoiding the uneven display caused by ignoring the animation duration in traditional methods. For example, when the total number of lyric units M is large, the time interval t1 becomes smaller and the animation starts more frequently, but the animation display completion time t0 is slightly longer due to "+c", ensuring that each unit has enough display time and the whole process is completed within τ+c.
[0044] In this context, by innovatively separating the basic parameter τ and the correction parameter c, the core problems of uneven animation display and disconnection from the musical rhythm in traditional lyrics animation display are solved. Specifically, the basic parameter τ reflects the basic time component of the animation and is proportional to the total number of lyric units M, ensuring that the animation density adaptively adjusts with the length of the lyrics; the correction parameter c, as a fixed time offset, effectively solves the visual abruptness caused by the premature end of the animation display. This method achieves precise time control of the animation display, ensuring that all lyrics animations are displayed evenly and smoothly within the total time, avoiding the phenomenon of the ending lyrics being displayed too quickly or overlapping.
[0045] In some examples, the total time is expressed in seconds, milliseconds, microseconds, or minutes.
[0046] In some examples, when character animations are applied to a line of lyrics, M is the total number of characters in that line of lyrics, t0 represents the animation completion time for each character, and t1 represents the time interval between the start of animations for adjacent characters.
[0047] In some examples, when applied to the display of lyrics animations for a song, M is the total number of lines of lyrics, t0 represents the completion time of the animation display for each line of lyrics, and t1 represents the time interval between the start of the animation display for adjacent lines of lyrics.
[0048] The following examples illustrate in detail the execution process of the method of the present invention:
[0049] Total time calculation: τ+c=1.5+0.5=2.0 seconds, meaning all lyrics animations must be completed within 2 seconds.
[0050] The animation display completion time t0 is calculated as follows: t0 = τ / M + c = 1.5 / 5 + 0.5 = 0.3 + 0.5 = 0.8 seconds. This means that the animation for each line of lyrics or each character takes 0.8 seconds to complete (for example, it takes 0.8 seconds for a character to transition from gray to highlight).
[0051] The time interval t1 is calculated as follows: t1 = τ / M = 1.5 / 5 = 0.3 seconds. This indicates that the interval between the start of adjacent lyric units is 0.3 seconds.
[0052] Calculation of the time point T at which the animation begins to appear:
[0053] m=1:T=(1-1)×0.3=0 seconds (first line / first character starts immediately);
[0054] m=2:T=(2-1)×0.3=0.3 seconds;
[0055] m=3:T=(3-1)×0.3=0.6 seconds;
[0056] m=4:T=(4-1)×0.3=0.9 seconds;
[0057] m=5:T=(5-1)×0.3=1.2 seconds.
[0058] Animation display process:
[0059] Lyrics Unit 1: Starts at 0 seconds and finishes at 0.8 seconds (display time: 0.0-0.8 seconds);
[0060] Second lyric unit: Starts at 0.3 seconds and finishes at 1.1 seconds (display time: 0.3-1.1 seconds);
[0061] The third lyric unit: starts at 0.6 seconds and ends at 1.4 seconds (display time: 0.6-1.4 seconds).
[0062] Lyrics Unit 4: Starts at 0.9 seconds and finishes at 1.7 seconds (display time: 0.9-1.7 seconds);
[0063] Lyrics Unit 5: Starts at 1.2 seconds and finishes at 2.0 seconds (display time: 1.2-2.0 seconds).
[0064] All lyric units are completed in 2.0 seconds or less with no display gaps, achieving uniform display.
[0065] In some examples, if the total number of lyric units M=10 (e.g., long lyric lines), τ=2.0, c=0.5 (total time 2.5 seconds), then t1=0.2 seconds, t0=0.2+0.5=0.7 seconds. As the T value increases from 0 seconds to 1.8 seconds, the completion time for the 10th lyric unit is 1.8+0.7=2.5 seconds. This scenario verifies the adaptability of the method as the total number of lyric units M increases: a smaller time interval t1 causes the animation to start more frequently, but the animation completion time t0 is maintained at a reasonable duration due to "+c", avoiding excessively fast display. Conversely, if the parameter c=0 (no offset), then t0=t1, and the animation start and completion times coincide, resulting in visual abruptness; this invention solves this problem by correcting the parameter c>0.
[0066] In some examples, τ:c = 4:1. In other words, when setting these two values, the base parameter τ can account for 80%, and the modifier parameter c can account for 20%.
[0067] In some examples, the animation includes one or more combinations of color gradients, size changes, position shifts, or transparency changes.
[0068] In some examples, character colors can smoothly transition from an initial color (such as gray) to a target color (such as red), typically achieved using HSV or RGB color space interpolation.
[0069] In some examples, the character size can be enlarged from a reduced state (e.g., 80%) to a normal state (100%), or vice versa.
[0070] In some examples, characters can be moved horizontally / vertically on the screen (such as sliding in from the left) or bouncing up and down word by word.
[0071] In some examples, characters can achieve a gradient from semi-transparent to opaque.
[0072] In some examples, the animation's completion time t0 determines its duration. For instance, a color gradient transitions from gray to red within t0 = 0.8 seconds.
[0073] In some examples, multiple animation effects can be combined, and the system can overlay multiple animation effects (such as simultaneous color gradient and size change), but the total duration is still constrained by the animation display completion time t0.
[0074] In some examples, in terms of hardware adaptation, animations are automatically simplified for low-performance devices (e.g., using only transparency changes), while complex combinations are enabled for high-performance devices.
[0075] In some examples, the steps to obtain the total time parameter required to display a song or a line of lyrics include: extracting the song duration from the metadata of the audio file as the value of τ+c.
[0076] In some examples, metadata can be additional information in an audio file besides the audio data, such as ID3 tags (MP3 files), Vorbis annotations (OGG files), etc., which typically include information such as song duration, artist, album, etc.
[0077] In some examples, the metadata of an audio file may include dedicated association data related to the lyrics. This dedicated association data may record the total duration of the song and the duration of each line of lyrics.
[0078] In some examples, song duration can be the total playback time of the audio file, usually stored in metadata in seconds, such as "3:45" which means 225 seconds.
[0079] In this scenario, traditional methods require manually setting τ+c, while this solution directly extracts the song duration from the audio file's metadata as the total time, ensuring perfect synchronization between lyrics animations and music playback. For example, the ID3v2 tag of an MP3 file contains "TDRC" (Recording Time) and "TRCK" (Track Duration) fields; the program parses these fields to obtain the precise song duration. This method solves the synchronization error problem caused by manually setting the total time: when the user switches to songs of different lengths, the system automatically adapts the total time without reconfiguration. The key technology lies in the accuracy of metadata parsing—for streaming audio, the system may need to obtain duration information through APIs (such as the Spotify Web API).
[0080] In some examples, the steps to obtain the total number of lines M of lyrics or the total number of characters M per line of lyrics include: segmenting the lyrics text into words and including punctuation marks and spaces in the total number of characters.
[0081] In some examples, word segmentation can be the process of dividing text into basic display units. For English, this is done on a word-by-word basis; for Chinese, on a character-by-character basis; and for mixed languages, language recognition is required followed by separate processing.
[0082] In some examples, punctuation marks (such as commas and periods) and spaces are treated as independent characters and counted in the M value. For example, "Hello,world!" has an M value of 13 (including commas, spaces, and exclamation marks). It should be noted that spaces may not participate in the animation and may simply be counted as a single character.
[0083] In this case, the problem of calculating the M value for multilingual lyrics can be solved. Traditional methods often ignore punctuation and spaces, resulting in deviations in the calculation of the animation time (for example, English lyrics have many spaces, and the actual number of characters is much larger than the visible number of characters). This solution ensures that the M value accurately reflects the number of display units through word segmentation: For Chinese: Each Chinese character and punctuation mark is an independent unit (for example, the M value of "你好!" is 3). For English: Each letter, punctuation mark, and space is a unit (for example, the M value of "Hi there!" is 9). For mixed languages: First, perform language detection (such as using the CLD3 library), and then apply the corresponding rules separately.
[0084] The following are detailed examples for illustration:
[0085] Take the Chinese-English mixed lyrics line "Let's go! 出发吧!" as an example:
[0086] Word segmentation processing:
[0087] English part: "Let's go!" → Split into L, e, t, ', s, , g, o,!, a total of 9 characters (including one space);
[0088] Chinese part: "出发吧!" → Split into 出, 发, 吧, !, a total of 4 characters; <{
[0089] The total number of characters M = 9 + 4 = 13.
[0090] Parameter calculation (assuming τ = 1.3 seconds, c = 0.2 seconds):
[0091] t1 = τ / M = 1.3 / 13 = 0.1 second;
[0092] t0 = τ / M + c = 0.1 + 0.2 = 0.3 second.
[0093] Animation process:
[0094] The first character 'L': Starts at T = 0 seconds and finishes at T = 0.3 seconds;
[0095] The second character 'e': Starts at T = 0.1 seconds and finishes at T = 0.4 seconds; ...
[0096] The 13th character '!': Starts at T = 1.2 seconds and finishes at T = 1.5 seconds (τ + c = 1.5 seconds). <{
[0097] In some other examples, in the Japanese lyrics "こんにちは、世界!", the system can call the MeCab word segmentation library for recognition:
[0098] Word segmentation result: こ, ん, に, ち, は, 、, 世, 界, ! (M = 9).
[0099] If τ = 0.9 seconds and c = 0.1 seconds, then t1 = 0.1 seconds and t0 = 0.2 seconds.
[0100] The fifth character, "は", starts at T=0.4 seconds and finishes at 0.6 seconds, maintaining a consistent rhythm with the other characters. Comparative experiments show that the scheme incorporating punctuation / spaces significantly improves the perceived smoothness of the animation in 100 multilingual songs, especially in fast-paced songs, avoiding the "sticking" of characters.
[0101] In some examples, the lyrics animation display method may also include dynamically adjusting the value of the basic parameter τ according to the audio playback progress, so that the animation display is synchronized with the music rhythm.
[0102] In some examples, dynamic adjustment can be achieved by modifying the value of the underlying parameter τ in real time during playback, rather than keeping it fixed.
[0103] In some examples, the music rhythm can be synchronized with the start / end of the motion effects to align with the music beat and bars, enhancing audiovisual consistency.
[0104] In some examples, the audio playback progress can typically be provided by the audio engine.
[0105] In this case, the lyrics animation can be dynamically linked with the music rhythm, solving the problem of "mechanical uniformity of animation" in traditional methods.
[0106] The core mechanism is: Rhythm detection: It analyzes and identifies the strength and density of beats through audio features such as MFCC and spectral centroid. The basic parameter τ is adjusted according to the following rules: When a strong beat is detected, the basic parameter τ is temporarily increased (extending the motion effect interval); when a weak / dense beat is detected, the basic parameter τ is decreased (shortening the motion effect interval). For example: For regular rhythm sections: τ = baseline value (e.g., 1.5 seconds); For strong beat sections such as chorus climaxes: τ = baseline value × 1.2 (motion effects slow down to highlight the lyrics and the texture of the strong beat); For fast-paced sections with dense drumbeats and weak / dense beats: τ = baseline value × 0.8 (motion effects are accelerated to match the fast tempo of the audio); Smooth transition: The adjustment of τ uses an exponential moving average (EMA) algorithm to avoid abrupt or jarring motion effect jumps caused by sudden parameter changes.
[0107] The key technology lies in real-time performance; the system can complete rhythm analysis and parameter adjustments within 50ms, ensuring smooth animation. This solution upgrades lyric animation from "passively following" to "actively responding" to musical emotions.
[0108] In some examples, the steps for dynamically adjusting the value of the base parameter τ include: detecting the measure change points of the current music, and adjusting the base parameter τ at the measure change points to match the rhythm changes.
[0109] In some examples, the measure change point is the position where the strong beat begins in the music, usually corresponding to the first beat of 4 / 4 time, and is a structural node of the rhythm. The rhythm change is usually a change in beat speed (BPM) or strong / weak pattern, such as the rhythm transition from verse to chorus.
[0110] In some examples, the base parameter τ value can be adjusted synchronously at the measure change points to align the lyrics animation with the musical structure.
[0111] In this case, the change point in the measure is the "natural break" in the music, and adjusting the basic parameter τ at this point can avoid abrupt changes in the motion effect.
[0112] In some examples, measure detection can be performed by identifying measure boundaries using beat tracking algorithms such as Dynamic Programming BeatTracking.
[0113] In some examples, in regular sections without strong beats, if the BPM of the new measure is greater than that of the old measure (tempo speed-up), then the basic parameter τnew = τold × (new BPM / old BPM) × k (k is an empirical coefficient for rhythm adaptation, ranging from 0.8 to 1.0; the larger the BPM difference, the smaller the value of k); if the new measure is a chorus (strong beat) section, τnew = τold × 1.2 (extending the animation interval to highlight the lyrics); if the new measure simultaneously satisfies "BPM speed-up + chorus", the chorus τ value adjustment rule is applied first.
[0114] In this scenario, updating τ only at measure changes while keeping τ constant in the middle beats ensures the continuity of the animation. The key technical aspect lies in the accuracy of measure detection; the system needs to distinguish between genuine measure changes and temporary rhythmic fluctuations. This solution deeply integrates lyric animation with the musical structure, for example, simultaneously activating an "explosive" animation for all lyric lines at the start of the chorus.
[0115] In some examples, when m = M, the time point at which the Mth line of lyrics or the Mth character is displayed is equal to τ + c.
[0116] In this case, when m=M, the completion time = (M-1)×t1+t0=(M-1)×(τ / M)+(τ / M+c)=τ+c, which is strictly equal to the total time. The mathematical completeness condition of this method is defined to ensure that all lyric units are completed precisely within the total time.
[0117] In some examples, the display method may also include: receiving a user-inputted animation duration preference value, and adjusting the value of the correction parameter c according to the preference value.
[0118] In some examples, the animation duration preference value can be a user-specified animation "slow / medium / fast" or a specific time value (such as "0.5 seconds per character").
[0119] In some examples, user preferences can be mapped to a modifier parameter c, such as a preference for "slow" with c = 0.2 seconds.
[0120] In some examples, the method of obtaining the correction parameter c may include explicit input (e.g., the user slider setting "motion speed" (0-100)) and implicit learning (e.g., inferring preferences based on the user's skip / replay behavior).
[0121] In some examples, the formula for adjusting the parameter c is: c = c_base + k × (preference - 50). Where c_base = baseline value (e.g., 0.5 seconds), k = sensitivity coefficient (e.g., 0.01 seconds / unit), preference = 50 indicates medium speed, less than 50 indicates fast speed, and greater than 50 indicates slow speed.
[0122] In some examples, boundary protection can be provided, such as c_min = 0.1 seconds (to avoid excessively fast animation) and c_max = τ × 0.5 (to prevent τ + c from exceeding the total time). The key technical point is to balance user control with algorithm stability. Over-adjusting the correction parameter c may violate the total time constraint of τ + c. Therefore, the system can simultaneously fine-tune τ (keeping τ + c constant).
[0123] In this context, user customization capabilities can be introduced to address the experience differences caused by "one-size-fits-all" parameters.
[0124] In some examples, the display method may also include: recalculating the value of M and updating the animation display parameters when a change in the screen size of the lyrics display device is detected.
[0125] In some examples, screen size changes can be device rotation (landscape / portrait), window resizing, or split-screen mode switching.
[0126] In some examples, changes in screen width alter the number of characters that can be displayed per line, necessitating re-segmentation and recalculation of the total character count M. Based on the new M value, the animation completion time t0, time interval t1, and the start time T of the animation are recalculated to ensure the animation adapts to the new layout.
[0127] Figure 2 This is a functional block diagram illustrating the lyrics animation display system involved in the example of the present invention.
[0128] Reference Figure 2 The second aspect of the present invention provides a lyrics animation display system 1, which is sometimes referred to as the display system.
[0129] In some examples, the display system may include a lyrics parsing module 10 for obtaining the total time parameter required to display a song or a line of lyrics, and the total number of lines of lyrics M or the total number of characters M per line of lyrics. The total time parameter may include a base parameter τ and a correction parameter c, where τ+c is the total time required to display the song or a line of lyrics.
[0130] In some examples, the display system may include a parameter calculation module 20 for calculating motion effect display parameters based on the formulas t0=τ / M+c, t1=τ / M, and T=(m-1)×t1. In some examples, the display system may include a motion effect rendering module 30 for displaying the motion effect of the m-th line of lyrics or the m-th character starting at time point T.
[0131] In some examples, animation display parameters may include animation completion time t0, time interval t1, and the start time T of the animation display.
[0132] In some examples, the lyrics parsing module can be responsible for reading lyrics files (such as LRC and SRT formats), extracting the text content, and calculating the M value.
[0133] In some examples, the parameter calculation module 20 can perform formula calculations in the display method of the present invention and output arrays t0, t1, and T.
[0134] In some examples, the motion rendering module 30 can call graphics APIs (such as OpenGL and Skia) to implement motion rendering and precisely control the triggering of the lyrics unit at time T.
[0135] In some examples, the display system may also include a rhythm analysis module 40. The rhythm analysis module 40 can be used to analyze the rhythmic characteristics of the audio signal and dynamically adjust the values of the basic parameter τ and the correction parameter c based on the rhythmic characteristics.
[0136] In some examples, rhythmic features may include beat position, BPM (beats per minute), beat intensity (energy value), measure structure, etc.
[0137] In some examples, the values of the base parameter τ and the correction parameter c can be updated based on real-time rhythm changes.
[0138] In some examples, the audio signal can be raw PCM data or a frequency domain representation (such as an FFT result).
[0139] A third aspect of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the lyrics animation display method of the first aspect can be implemented.
[0140] In some examples, the terminal device refers to the hardware device that performs the lyrics animation display, including but not limited to digital photo frames, smartphones, tablets, in-vehicle entertainment systems, smart TVs, or music players. The device may integrate a display module (such as an LCD / OLED screen) and an audio module (for synchronized music).
[0141] In some examples, the processor can be a central processing unit (CPU) or a graphics processing unit (GPU), responsible for performing motion calculations and rendering. In real-time scenes, the GPU can accelerate motion rendering.
[0142] In some examples, the memory may include RAM (runtime storage) and ROM / flash memory (stored program) to store parameters such as basic parameter τ, correction parameter c, total number of lyric units M, and lyric data.
[0143] In some examples, the computer program is a software module for implementing the display method of the present invention. The computer program may include a parameter acquisition unit, a formula calculation unit, and an animation triggering unit.
[0144] In the above embodiments, the device pre-stores a computer program in its memory, which is then loaded by the processor during runtime. First, the parameter acquisition unit can obtain the basic parameter τ, the correction parameter c, and the total number of lyrics units M from user input or a configuration file. Second, the formula calculation unit is invoked to perform formula calculations for the animation display completion time t0, the time interval t1, and the start time T of the animation display. Finally, the animation triggering unit can activate the display module at a precise time T (e.g., using Android's Handler or iOS's CADisplayLink to achieve millisecond-level timing). A key point is that the device must support high-precision timing (e.g., using the system clock API) to ensure the accuracy of T. For example, on a mobile device, the processor can dynamically adjust the basic parameter τ based on the audio playback progress (according to the current music rhythm) to achieve real-time synchronization between the animation and the music. Compared to a pure software solution, this device reduces latency and improves the user experience through hardware acceleration (e.g., GPU processing of animation rendering).
[0145] In some examples, the processor can monitor the audio playback position and dynamically adjust the basic parameter τ if the music rhythm changes (such as an increase in BPM), recalculating the animation display completion time t0 and the time interval t1 to ensure that the animation is not disjointed.
[0146] In some examples, the terminal device may also include an audio analysis unit. The audio analysis unit can be used to analyze the played audio signal in real time and extract rhythm information.
[0147] In some examples, the terminal device may also include a parameter adjustment unit. This unit can be used to dynamically adjust the values of the base parameter τ and the correction parameter c based on the rhythm information.
[0148] In some examples, the audio analysis unit can be a hardware or software module, performing operations such as FFT and envelope detection, and outputting beat position, BPM, etc. The audio analysis unit can use a dedicated DSP (Digital Signal Processor) core to reduce CPU load.
[0149] In some examples, rhythmic information may include structured data such as instantaneous BPM, beat intensity, and measure boundaries.
[0150] In some examples, the parameter adjustment unit can receive rhythm information, calculate new values for the base parameter τ and the correction parameter c according to rules, and notify the motion engine. The parameter adjustment unit communicates with the GPU driver to ensure that the motion parameters take effect immediately.
[0151] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the lyrics animation display method of the first aspect.
[0152] In some examples, computer-readable storage media can refer to non-transitory physical storage media, including optical discs (CD / DVD), hard disks (HDD), solid-state storage (SSD / USB), cloud storage, or embedded chips (such as SIM cards). The media must be able to persistently store program code.
[0153] In some examples, the computer program may be a set of instructions stored in binary or script form, containing the complete logic of the method of the present invention, and may be deployed independently of hardware.
[0154] In some examples, the program is loaded into the runtime environment and then parsed and executed by the CPU / GPU.
[0155] In the above embodiments, the program stored in the medium includes core modules: a parameter parsing module (reading the basic parameter τ, the correction parameter c, and the total number of lyric units M), a time calculation module (implementing formulas related to the animation display completion time t0, the time interval t1, and the start time T of the animation display), and an animation scheduling module (managing the triggering at time T). The program can be designed to be cross-platform compatible (such as Java bytecode or Python scripts) and can run on different devices. The key innovation lies in the program encapsulating the formulas into configurable functions, allowing external input of the basic parameter τ, the correction parameter c, and the total number of lyric units M (e.g., read from the lyric file metadata). When the program executes, it does not depend on specific hardware, only requiring a general-purpose processor that supports floating-point operations (handling division such as τ / M). Compared with traditional storage media, this program avoids hard-coding time through dynamic calculation, adapting to different lyric lengths and total time requirements.
[0156] The fifth aspect of the present invention provides a computer program product, including a computer program that, when executed by a processor, implements the lyrics animation display method of the first aspect.
[0157] In some examples, a computer program product can refer to a distributable software entity, including standalone applications, library files (such as .so / .dll), or services (such as API microservices). Products are distributed through app stores, web downloads, or embedded systems.
[0158] In some examples, the product not only includes the core algorithm but also integrates user interaction modules (such as sliders for setting the basic parameter τ and the correction parameter c) and an adaptation layer (to handle different operating systems). Its core is encapsulating the aforementioned display methods into reusable components. As an independent service, it receives lyrics data via a REST API and returns a timeline array T. The product's advantage lies in decoupling the algorithm from business logic: the basic parameter τ and the correction parameter c can be dynamically optimized by AI (e.g., adjusting the value of the correction parameter c based on song genre) without modifying the underlying code.
[0159] In some examples, the present invention also provides a method for displaying lyrics animation effects.
[0160] In some examples, the method may include: obtaining the rhythm information of the song.
[0161] In some examples, the method may include: determining the value of the basic parameter τ based on the rhythm information.
[0162] In some examples, the method may include: obtaining the total number of lines of lyrics M or the total number of characters in each line of lyrics M.
[0163] In some examples, the method may include: calculating the animation display completion time t0 and the time interval t1 according to the formulas t0=τ / M+c and t1=τ / M.
[0164] In some examples, the method may include: for the m-th line of lyrics or the m-th character of a line of lyrics, calculating the time point T according to the formula T=(m-1)×t1.
[0165] The animation for the m-th line of lyrics or the m-th character is displayed starting at time point T.
[0166] The correction parameter c can be a fixed value determined based on user preferences or device status.
[0167] In some examples, rhythm information can be temporal features such as BPM, beat position, and musical structure (verse / chorus).
[0168] In this embodiment, the basic parameter τ is no longer fixed, but is dynamically calculated from the rhythm information. For example, τ = measure length × 0.7. The correction parameter c can be determined by external factors (such as user settings or settings based on device type), but remains unchanged during the calculation process.
[0169] In this frame, the traditional method uses a preset constant as the basic parameter τ; the current method uses τ = f (rhythm information) = k × measure length (k is an empirical coefficient, which can be 0.6-0.8). Example: 4 / 4 time signature BPM = 120, measure length = 2.0 seconds, τ = 1.4 seconds (k = 0.7).
[0170] This embodiment redefines the method flow, using rhythm information as the core input of the basic parameter τ to achieve more intelligent motion control.
[0171] While the invention has been specifically described above in conjunction with the accompanying drawings and examples, it is to be understood that the above description does not limit the invention in any way. Those skilled in the art can make modifications and variations to the invention as needed without departing from its essential spirit and scope, and all such modifications and variations fall within the scope of the invention.
Claims
1. A method for displaying lyrics animation effects, characterized in that, Includes the following steps: The total time parameter required to display a song or a line of lyrics is obtained. The total time parameter includes a base parameter τ and a correction parameter c, where τ + c is the total time to display the song or line of lyrics, and c > 0. The correction parameter c is adjusted using the formula: c = c_base + k × (preference - 50), where c_base is the base value, k is the sensitivity coefficient, preference = 50 indicates medium speed, less than 50 indicates fast speed, and greater than 50 indicates slow speed. The base parameter τ is also finely adjusted synchronously to keep the value of τ + c constant. Get the total number of lines of lyrics M or the total number of characters in each line of lyrics M; Calculate the animation display completion time t0 for each line of lyrics or each character in a line of lyrics, where t0 = τ / M+c; Calculate the time interval t1 between the start of animation display between two adjacent lines of lyrics or between two adjacent characters in a line of lyrics, where t1 = τ / M; For the m-th line of lyrics or the m-th character of a line of lyrics, calculate the time point T at which the animation effect begins to be displayed, where T = (m-1)×t1; The animation of the m-th line of lyrics or the m-th character is displayed starting at time point T, where m is a positive integer and 1 ≤ m ≤ M.
2. The lyrics animation display method according to claim 1, characterized in that, The total time is expressed in seconds, milliseconds, microseconds, or minutes.
3. The method for displaying lyrics animation effects according to claim 1, characterized in that, The steps for obtaining the total number of lines M of lyrics or the total number of characters M per line of lyrics include: performing word segmentation on the lyrics text and including punctuation marks and spaces in the total number of characters.
4. The lyrics animation display method according to claim 1, characterized in that, Also includes: The value of τ is dynamically adjusted according to the audio playback progress, so that the animation display is synchronized with the music rhythm.
5. The lyrics animation display method according to claim 1, characterized in that, The animation effects include one or more combinations of color gradient, size change, position movement, or transparency change. The character color smoothly transitions from the initial color to the target color using HSV or RGB color space interpolation, or the character size enlarges from a shrunken state to a normal state, or vice versa, or the character moves horizontally / vertically on the screen, or bounces up and down character by character, or the character achieves a gradient from semi-transparent to opaque.
6. The method for displaying lyrics animation effects according to claim 1, characterized in that, The step of obtaining the total time parameter required to display a song or a line of lyrics includes: extracting the song duration from the metadata of the audio file as the value of τ + c.
7. A lyrics animation display system, characterized in that, include: The lyrics parsing module is used to obtain the total time parameter required to display a song or a line of lyrics, as well as the total number of lines of lyrics M or the total number of characters M in each line of lyrics. The total time parameter includes a base parameter τ and a correction parameter c, where τ + c is the total time to display the song or a line of lyrics, and c > 0. The correction parameter c is adjusted using the formula: c = c_base + k × (preference - 50), where c_base is the base value, k is the sensitivity coefficient, preference = 50 indicates medium speed, less than 50 indicates fast speed, and greater than 50 indicates slow speed. The base parameter τ is also finely adjusted synchronously to keep the value of τ + c constant. The parameter calculation module is used to calculate the animation display parameters according to the formulas t0 = τ / M + c, t1 = τ / M, and T = (m-1)×t1. These animation display parameters include the animation display completion time t0, the time interval t1, and the start time T of the animation display. The animation rendering module is used to display the animation of the m-th line of lyrics or the m-th character starting at time point T.
8. A terminal device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and executable on the processor, which, when executed by the processor, implements the lyrics animation display method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The system contains a computer program that, when executed by a processor, implements the lyrics animation display method as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, The system includes a computer program that, when executed by a processor, implements the lyrics animation display method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Image display device, image display method, and image display program
JP2011166386A