A song lyrics translation method based on rhythm unit and syllable distribution constraints and related device

By dividing the lyrics text into rhythmic units and establishing syllable distribution constraints, candidate translations are generated and filtered, solving the problems of rhythm matching and consistency of repetitive expression in lyrics translation, and realizing controllable lyrics translation without melody input.

CN123180183APending Publication Date: 2026-11-27CHINA TELECOM ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611347753.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-01
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing lyric translation technologies struggle to achieve rhythmic matching between translated lyrics and the original melody without relying on melody or sheet music information, and lack consistent control over repetitive expressions.

Method used

The lyrics text is divided into the smallest singable rhythmic units, syllable distribution constraints are established, multiple candidate translations are generated and filtered and merged, and global consistency modeling is performed based on repetition and core expression in the original text.

Benefits of technology

The lyric translation process is controllable, the result structure is stable, and the overall style is consistent. It is applicable to the fields of natural language processing, music information processing, and intelligent translation technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123180183A_ABST
    Figure CN123180183A_ABST
Patent Text Reader

Abstract

The application discloses a song lyrics translation method based on rhythm unit and syllable distribution constraints and related equipment, including obtaining a to-be-translated lyrics text, decomposing the to-be-translated lyrics text into a plurality of target rhythm units, determining the syllable distribution of any target rhythm unit, generating at least one candidate translation corresponding to the target rhythm unit according to the syllable distribution of the target rhythm unit, performing global consistency analysis on all candidate translations, and generating a translated lyrics text, and the like. The song lyrics translation method based on rhythm unit and syllable distribution constraints can perceive rhythm, constrain syllables and generate singable translated lyrics for the to-be-translated lyrics without relying on melody or music score information, thereby being applicable to the technical fields of natural language processing, music information processing and intelligent translation. The application is applied to the technical field of text processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of text processing technology, and in particular to a method and related equipment for lyric translation based on rhythm units and syllable distribution constraints. Background Technology

[0002] Lyrics translation refers to the process of converting song lyrics between different languages. It involves obtaining lyrics in the target language (e.g., English) when the source language (e.g., Chinese) lyrics are already available. Lyrics translation typically requires that the translated lyrics maintain semantic consistency with the original lyrics and match the original melody in terms of syllable count, rhythmic structure, and repetition patterns to ensure the translated lyrics can be sung naturally. Compared to ordinary text translation, lyrics translation places higher demands on the structural controllability of the translated text.

[0003] Current lyric translation technologies often focus on semantic equivalence or literary expression, typically translating lyrics as a whole or line by line, which leads to the following problems: ① Because the rhythm and syllable structure of the lyrics were not modeled, the translated lyrics were difficult to match the original melody; ②Due to its reliance on melody, sheet music, or manual meter markings, its versatility and scalability are poor; ③ The repetitions or core expressions commonly found in the lyrics lack consistent control in the translation; ④ The translation process is usually generated in one go, making it difficult to gradually constrain and correct it in dimensions such as syllables, rhythm, and semantics.

[0004] Therefore, there is an urgent need for a lyrics translation technology that can achieve rhythmic control and consistent expression based solely on the lyrics text without requiring melody input. Summary of the Invention

[0005] To address at least one of the aforementioned technical problems, the present invention aims to provide a lyrics translation method and related equipment based on rhythm units and syllable distribution constraints.

[0006] On one hand, embodiments of the present invention include a lyrics translation method based on rhythm units and syllable distribution constraints, wherein the lyrics translation method based on rhythm units and syllable distribution constraints includes: Get the lyrics text to be translated; The lyrics text to be translated is decomposed into multiple target rhythm units; For any of the target rhythm units, determine the syllable distribution of the target rhythm unit; For any target rhythm unit, at least one candidate translation corresponding to the target rhythm unit is generated based on the syllable distribution of the target rhythm unit; A global consistency analysis is performed on all the candidate translations to generate the translated lyrics text.

[0007] Furthermore, obtaining the lyrics text to be translated includes: Obtain plain text lyrics data represented in the source language; The plain text lyrics data is processed by line splitting and text normalization to obtain the lyrics text to be translated.

[0008] Furthermore, the step of decomposing the lyrics text to be translated into multiple target rhythmic units includes: Multiple generation strategies are set; each generation strategy has a corresponding partitioning orientation, which is any one of semantic dependency, rhythm priority and lyric repetition sensitivity. For any of the generation strategies, the generation strategy is executed to divide the lines in the lyrics text to be translated, so that each line forms or is merged to form a corresponding candidate rhythm unit, thereby obtaining a set of candidate rhythm units corresponding to the generation strategy; the set of candidate rhythm units includes at least one of the candidate rhythm units. For any of the candidate rhythm unit sets, the candidate rhythm unit sets are evaluated in multiple dimensions to obtain the score values ​​corresponding to each of the multiple scoring dimensions. The score values ​​are then weighted and summed to obtain the comprehensive score corresponding to the candidate rhythm unit set. Select the candidate rhythm unit set with the highest comprehensive score, and determine each candidate rhythm unit in the selected candidate rhythm unit set as the target rhythm unit.

[0009] Further, determining the syllable distribution of the target rhythmic unit includes: Identify pause points in the target rhythm unit; After removing punctuation marks from the target rhythm unit, the target rhythm unit is decomposed into multiple first sub-rhythm segments based on the pause points. Count the number of syllables in each of the first sub-rhythm segments; Based on the number of syllables corresponding to each of the first sub-rhythm segments and their positional distribution within the target rhythm unit, a first syllable distribution vector corresponding to the target rhythm unit is generated.

[0010] Further, generating at least one candidate translation corresponding to the target rhythmic unit based on the syllable distribution of the target rhythmic unit includes: Multiple translation paths are set up; each translation path has a corresponding translation mode, which is any one of syllable priority, semantic priority, and syllable-semantic balance. For any of the translation paths, execute the translation path to translate the target rhythm unit into the target language and obtain the candidate translation corresponding to the translation path; The candidate translations are subjected to rhythm verification. The candidate translations that fail the verification are removed, and the candidate translations that pass the verification are retained and output.

[0011] Furthermore, the rhythm check of the candidate translation includes: For any of the target rhythm units, the syllable constraint method of the target rhythm unit is set according to the length and structure of the target rhythm unit; the syllable constraint method is any one of strict distribution constraint, weak distribution constraint and overall backtracking constraint; For any candidate translation, the candidate translation is decomposed into multiple second sub-rhythm segments in the same way as the target rhythm unit corresponding to the candidate translation; the number of syllables is counted for each second sub-rhythm segment, and a second syllable distribution vector corresponding to the candidate translation is generated based on the number of syllables corresponding to each second sub-rhythm segment and its position distribution in the candidate translation; For any candidate translation, the second syllable distribution vector of the candidate translation is compared with the first syllable distribution vector of the target rhythm unit corresponding to the candidate translation. If the comparison result satisfies the syllable constraint method of the target rhythm unit, the candidate translation is determined to pass the verification. If the comparison result does not satisfy the syllable constraint method of the target rhythm unit, the candidate translation is determined to fail the verification.

[0012] Furthermore, the step of performing a global consistency analysis on all candidate translations to generate translated lyrics text includes: An expression consistency model is performed on the lyrics to be translated, and an expression consistency mapping table is constructed. For any of the candidate translations, the candidate translations are evaluated according to the expression consistency mapping table to determine whether the candidate translation passes or fails the evaluation; For any candidate translation that fails the evaluation, the candidate translation is rewritten according to the expression consistency mapping table; The translated lyrics text is composed of all the candidate translations that passed the evaluation and the rewritten candidate translations.

[0013] Furthermore, the step of performing expression consistency modeling on the lyrics to be translated and constructing an expression consistency mapping table includes: The lyrics to be translated were analyzed, and at least one repeated expression was identified. For any of the repeated expressions, the repeated expressions are translated into the target language to obtain a unified translated expression, and a mapping relationship between the repeated expressions and the translated expressions is established; The expression consistency mapping table is formed by combining all the repeated expressions and the corresponding mapping relationships.

[0014] On the other hand, embodiments of the present invention also include a computer device, including a memory and a processor, the memory for storing at least one program, and the processor for loading at least one program to execute the lyrics translation method based on rhythm units and syllable distribution constraints in the embodiments.

[0015] On the other hand, embodiments of the present invention also include a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to perform the lyrics translation method based on rhythm units and syllable distribution constraints in the embodiments.

[0016] The beneficial effects of the present invention are: the lyrics translation method based on rhythm units and syllable distribution constraints in the embodiments can perform rhythm perception and syllable constraints on the lyrics to be translated and generate singable translated lyrics without relying on melody or musical score information, thus it can be applied to the fields of natural language processing, music information processing and intelligent translation technology. Attached Figure Description

[0017] Figure 1 This is a schematic diagram illustrating the steps of the lyrics translation method based on rhythm units and syllable distribution constraints in the embodiment. Figure 2 This is a schematic diagram illustrating the principle of the lyrics translation method based on rhythm units and syllable distribution constraints in the embodiment. Figure 3 This is a flowchart illustrating steps S001-S002 in the embodiment; Figure 4 This is a flowchart illustrating steps S101-S104 in the embodiment. Figure 5 This is a flowchart illustrating steps S201-S204 in the embodiment; Figure 6 This is a flowchart illustrating steps S301-S303 in the embodiment; Figure 7 This is a flowchart illustrating steps S401-S404 in the embodiment. Detailed Implementation

[0018] Terminology Explanation: Rhythm Unit: The smallest independently singable segment of lyrics, defined based on the semantic structure and pause patterns of the lyrics text, without relying on melody or musical notation. It serves as the basic unit of translation generation. Each rhythm unit consists of one or more lines of lyrics, with its boundaries determined by semantic dependencies and vocal continuity. Syllable Distribution Constraint: A syllable quantity control target established for each rhythmic unit, including three levels: sub-rhythm boundary identification, syllable distribution statistics, and constraint expression selection, used to guide the matching of corresponding syllable structures in the target language during translation generation; Consistency Mapping Table: A unified translation mapping table established for repeated or core expressions in the original text. It is used for global consistency analysis and constraint rewriting to ensure that the same original expressions are always translated in the translation. Multi-path Candidate Generation: Under syllable and semantic constraints, candidate translations are generated through three paths: syllable priority, semantic priority, and compromise. After rhythm verification and merging, a final candidate set is formed.

[0019] To achieve consistency in semantic accuracy, rhythmic singability, and repetitive expression between translated and untranslated lyrics without requiring melody or sheet music input, the following technical approaches are considered to address the existing problems and underlying principles of current lyric translation technologies: ① Divide the lyrics into the smallest singable rhythmic units as the basic unit of translation generation; ② Establish explicit syllable distribution constraints for each rhythmic unit to guide translation generation; ③ Generate multiple candidate translations under syllable and semantic constraints, and then filter and merge them; ④ Based on the repetition and core expression of the original text, a global consistency model is constructed, and the translation is rewritten in a unified manner.

[0020] Through the above steps, we can achieve lyrics translation with a controllable generation process, stable result structure, and consistent overall style.

[0021] Based on the above principles, this embodiment provides a lyrics translation method based on rhythmic units and syllable distribution constraints. (Refer to...) Figure 1 The lyrics translation method based on rhythm units and syllable distribution constraints includes the following steps: S0. Obtain the lyrics text to be translated; S1. Decompose the lyrics to be translated into multiple target rhythm units; S2. For any target rhythmic unit, determine the syllable distribution of the target rhythmic unit; S3. For any target rhythmic unit, generate at least one candidate translation corresponding to the target rhythmic unit based on the syllable distribution of the target rhythmic unit; S4. Perform a global consistency analysis on all candidate translations to generate the translated lyrics text.

[0022] The principle of steps S0-S4 is as follows: Figure 2 As shown.

[0023] In this embodiment, when performing step S0, which is the step of obtaining the lyrics text to be translated, refer to Figure 3 Specifically, the following steps can be performed: S001. Obtain plain text lyrics data represented in the source language; S002. Perform line breaks and text normalization on the plain text lyrics data to obtain the lyrics text to be translated.

[0024] In step S001, the plain text lyrics data are lyrics represented in the source language, such as the complete Chinese lyrics of the song "You Look So Beautiful When You Smile". Let the set of text data for the entire lyric segment be denoted as . ,common Lyrics.

[0025] In step S002, the plain text lyrics data obtained in step S001 is preprocessed as follows: redundant spaces and illegal characters are removed; the original line break structure is preserved; and melody, rhythm, or musical score information is not introduced. In this embodiment, step S002 is implemented using regular expressions.

[0026] By executing steps S001-S002, the lyrics text to be translated is obtained, including the content: "Your smile is so beautiful\nlike a spring flower\nblowing away all your troubles and worries\nYour smile is so beautiful". Here, \n represents a newline character.

[0027] The target rhythmic unit to be obtained in step S1 is to identify the smallest rhythmic unit in the lyrics that is suitable for independent singing without relying on melody information, and use it as the basic unit for subsequent syllable constraints and translation generation.

[0028] In this embodiment, when performing step S1, which is to decompose the lyrics text to be translated into multiple target rhythm units, refer to Figure 4 The specific steps can be performed as follows: S101. Set multiple generation strategies; S102. For any generation strategy, execute the generation strategy to divide the lines in the lyrics text to be translated, so that each line forms or merges to form a corresponding candidate rhythm unit, and obtain the candidate rhythm unit set corresponding to the generation strategy; the candidate rhythm unit set includes at least one candidate rhythm unit. S103. For any candidate rhythm unit set, perform multi-dimensional evaluation on the candidate rhythm unit set to obtain the score values ​​corresponding to each of the multiple scoring dimensions, and perform weighted summation of the score values ​​to obtain the comprehensive score corresponding to the candidate rhythm unit set. S104. Select the candidate rhythm unit set with the highest comprehensive score, and determine each candidate rhythm unit in the selected candidate rhythm unit set as the target rhythm unit.

[0029] In this embodiment, for the lyrics text to be translated obtained by executing steps S001-S002, the following line-level lyrics structure parsing can be performed: Preliminary structure parsing is performed on each line of lyrics in the lyrics text D to be translated, resulting in a set of line-level lyrics units:

[0030] Where li represents the lyrics text of the i-th line. For example, for the lyrics text to be translated, which reads "You look so beautiful when you smile\nlike spring flowers\nblowing away all your troubles and worries\nyou look so beautiful when you smile", we can obtain a set of line-level lyrics units: L = {l1: Your smile is so beautiful, l2: Like a spring flower, l3: It blows away all your worries and sorrows, l4: It blows them all away, l5: Your smile is so beautiful} For the above set of line-level lyric units L, the determination can be made based on the semantics and the interline relationship of singing pauses: for adjacent lyric lines and This can be used to determine whether two elements are suitable to be merged into the same rhythmic unit. The criteria for judgment include: ① whether there is a strong semantic dependency; ② whether they are typically sung consecutively in natural singing; and ③ whether they constitute an exposition-supplementary relationship. The judgment result is expressed as:

[0031] Specifically, if the first line of the lyric unit set L is... Line and number If at least one of the above criteria ①-③ is met between rows +1, then... =1, otherwise It is 0.

[0032] For example, for the above set L of line-level lyrics units, the judgment result is: = 1, ) = 0, = 1, = 0.

[0033] Based on the above principles, in step S101, the following three generation strategies can be set to generate three candidate rhythm unit partitioning results: Generation Strategy A (Conservative Strategy): Merge rows only when there is a strong semantic dependency; Generation Strategy B (Rhythm Priority Strategy): Prioritizes the generation of long rhythm units suitable for one breath; Generation Strategy C (Repetition Sensitive Strategy): Treat repeated lyrics lines as separate units.

[0034] The three generation strategies described above each have their own segmentation orientation. Specifically, generation strategy A selects to divide adjacent lines with strong semantic dependencies into the same candidate rhythmic unit; that is, if a line does not have a strong semantic dependency with its adjacent lines, then this line forms a separate candidate rhythmic unit. Generation strategy B selects to divide adjacent lines that can fit into one breath into the same candidate rhythmic unit; that is, if the combination of a line and its adjacent lines does not fit into one breath, then this line forms a separate candidate rhythmic unit. Generation strategy C selects to form a separate candidate rhythmic unit for each repeated line of lyrics.

[0035] In step S102, all generation strategies are traversed. For any generation strategy, the generation strategy is executed to divide each line in the lyrics text to be translated, so that each line forms or merges to form a corresponding candidate rhythm unit, thereby obtaining the candidate rhythm unit set corresponding to the generation strategy.

[0036] For example, applying generation strategy A to the line-level lyric unit set L yields a candidate rhythm unit set U_A = [u1: Your smile is so beautiful\nlike a spring flower, u2: blow away all your troubles and worries\n, u3: Your smile is so beautiful], where the candidate rhythm units u1, u2, u3, etc., contained in the candidate rhythm unit set U_A correspond to generation strategy A; applying generation strategy B to the line-level lyric unit set L yields a candidate rhythm unit set U_B = [u1: Your smile is so beautiful\nlike a spring flower\n blow away all your troubles and worries, u2: blow away all your worries and worries, u3: Your smile is so beautiful], where the candidate rhythm unit set U_B contains candidate rhythm units u1, u2, u3, etc., corresponding to generation strategy B; applying generation strategy C to the line-level lyric unit set L yields a candidate rhythm unit set U_C ... [u1: Your smile is so beautiful; u2: Like spring flowers, u3: Blowing away all the troubles and worries, u4: Your smile is so beautiful], the candidate rhythm unit set U_C contains the candidate rhythm units u1, u2, u3, u4 and other candidate rhythm units corresponding to the generation strategy C.

[0037] By executing step S102, the candidate rhythm unit sets for each of the generation strategies can be obtained. , , The set

[0038] In step S103, the entire set of candidate rhythm units is traversed. , , For any set of candidate rhythm units, the set of candidate rhythm units is evaluated in multiple dimensions to obtain the score values ​​corresponding to each of the multiple scoring dimensions. The score values ​​are then weighted and summed to obtain the comprehensive score corresponding to the set of candidate rhythm units.

[0039] For example, in this embodiment, the evaluation dimensions include the following three items: (1) Variance of the number of syllables within a unit: Calculate the variance of the total number of syllables in the candidate rhythm units. The smaller the variance, the more balanced the load of the candidate rhythm units. var(U) = Var(len(u1), len(u2), ..., len(um)) Where len(ui) is the total number of syllables in the candidate rhythm unit ui. A division with lower variance means that the singing duration of the candidate rhythm units is more uniform and the structure is more stable. (2) Consistency of syllable distribution across units: For repeated lyric lines in the original text (such as "You look so beautiful when you smile" appearing in u1 and u3), check whether they are classified into rhythmic units with the same structure in different candidate divisions. If the syllable distribution of repeated lines is consistent in different units, the candidate division will score higher in this dimension. consis_score(U) = |{duplicate row pairs(ui, uj) : dist(ui) = dist(uj)}| / |total number of duplicate row pairs| Where dist(ui) is the syllable distribution vector of candidate rhythm unit ui. The higher the consistency score of this item, the more aligned the repeated lines are in structure, which is more conducive to subsequent consistent translation.

[0040] (3) Performance Appropriateness Scoring: Performance appropriateness is evaluated for each candidate partition based on the Large Language Model (LLM). The evaluation criteria include: ① whether the pauses between units are natural; ② whether the unit length is suitable for singing in one breath; ③ whether semantic integrity is satisfied. The LLM outputs a performance appropriateness score of 1-5: score_sing(U) = LLM_singability_eval(U) After obtaining the score values var(U), consis_score(U), and score_sing(U) of each evaluation dimension of a candidate rhythm unit, through the formula total(U) = w1×(1 / (1 + var(U))) + w2×consis_score(U) + w3×score_sing(U) Perform weighted summation on each score value to obtain the comprehensive score total(U) corresponding to the candidate rhythm unit set. Wherein w1, w2, w3 are weight coefficients, with default values w1=0.3, w2=0.4, w3=0.3.

[0041] In step S104, select the candidate rhythm unit set with the corresponding highest comprehensive score, and determine each candidate rhythm unit in the selected candidate rhythm unit set as the target rhythm unit = { }.

[0042] For example, for the candidate rhythm unit set , , Execute step S103, determine that the syllable counts of each unit of U_A are [14, 16, 7], with small variance; in U_A, "你笑起来真好看" appears as an independent line in both u1 and u3, with consistent syllable distribution; the units of U_A have moderate length and complete semantics. After comprehensive evaluation in step S104, select U_A as the target rhythm unit set, that is, U = U_A = [u1: 你笑起来真好看\n像春天的花一样,u2: 把所有的烦恼所有的忧愁\n统统都吹散,u3: 你笑起来真好看], wherein [u1: 你笑起来真好看\n像春天的花一样,u2: 把所有的烦恼所有的忧愁\n统统都吹散,u3: 你笑起来真好看] are the respective target rhythm units obtained by executing step S1.

[0043] In this embodiment, steps S101-S104 can be implemented using an open-source large model based on the chain of thought, and the corresponding prompts designed in this embodiment are: "You are a lyrics rhythm and structure analysis assistant."

[0044] Please perform rhythm unit recognition on the input lyrics text D without relying on any melody or musical score information. The specific requirements are as follows: 1. Line-level parsing: First, parse the lyrics into a set of line-level lyric units according to the original line structure. L = {l1, l2, …, ln}, where li is the lyrics text of the i-th line; 2. Line Relationship Determination: For adjacent lines li and l(i+1), determine whether they should be merged into the same rhythm unit. The criteria for judgment include: (a) Does a strong semantic dependency exist? (b) Whether the singing is usually continuous in natural singing; (c) Whether it constitutes a descriptive-supplementary relationship; And give the judgment result of merge(li, l(i+1)) ∈ {0,1}; 3. Multi-strategy rhythm unit generation: Based on the above judgment results, the following three rhythm unit division methods are generated simultaneously. case: - Strategy A (conservative strategy): merge rows only when there is a strong semantic dependency; - Strategy B (Rhythm Priority Strategy): Prioritize generating longer rhythmic units suitable for a single natural breath; - Strategy C (Repetition-sensitive strategy): Divide repeated lyric lines into separate rhythm units; The candidate rhythm unit set U_candidate = {U_A, U_B, U_C} is obtained; 4. Rhythm Unit Decision: A comprehensive comparison of the structural stability and performance rationality of the three candidate division results. Select one set as the final rhythm unit set. U = {u1, u2, …, um}.

[0045] Output only the final result of each step, without providing an explanation. In this embodiment, when performing step S2, which is to determine the syllable distribution of the target rhythm unit, reference is made. Figure 5 Specifically, the following steps can be performed: S201. Identify pauses in the target rhythmic unit; S202. After removing punctuation marks from the target rhythmic unit, the target rhythmic unit is decomposed into multiple first sub-rhythmic segments based on the pause points; S203. Count the number of syllables for each first sub-rhythm segment; S204. Generate the first syllable distribution vector corresponding to the target rhythm unit based on the number of syllables corresponding to each first sub-rhythm segment and their position distribution in the target rhythm unit.

[0046] In step S201, sub-rhythm boundary identification is performed: for each target rhythm unit Identify the natural pauses within it and mark them with "|":

[0047] In step S202, syllable distribution statistics are performed: after removing punctuation marks, the target rhythm unit is decomposed into multiple first sub-rhythm segments based on the pause points.

[0048] For example, for each target rhythm unit obtained by executing step S1 [u1: You look so beautiful when you smile\nlike a spring flower, u2: blow away all your troubles and worries\nall of them, u3: You look so beautiful when you smile], executing steps S201-S202 yields: u1 = Your smile is so beautiful | like a flower in spring; u2 = It blows away all your troubles and worries; u3 = Your smile is so beautiful.

[0049] The phrases "You look so beautiful when you smile," "Like a flower in spring," "Blow away all your troubles and worries," and "You look so beautiful when you smile" are the first sub-rhythm segments.

[0050] In step S203, syllable counts are performed on each first sub-rhythm segment. For example, "You look so beautiful when you smile" contains 7 syllables, "Like flowers in spring" contains 7 syllables, "Blow away all the troubles and worries" contains 11 syllables, "Blow away all the troubles and worries" contains 5 syllables, and "You look so beautiful when you smile" contains 7 syllables.

[0051] In step S204, based on the number of syllables corresponding to each first sub-rhythm segment and their positional distribution within the target rhythm unit, a first syllable distribution vector corresponding to the target rhythm unit is generated:

[0052] For example, by executing step S203, the number of syllables of the first sub-rhythm segments obtained by decomposing each target rhythm unit [u1: You look so beautiful when you smile\n like spring flowers, u2: blow away all the troubles and worries\n, u3: You look so beautiful when you smile] are 7, 7, 11, 5, 7 respectively. Then the first syllable distribution vectors obtained are v1 = [7,7], v2 = [11, 5], v3 = [7].

[0053] After executing step S204, a syllable distribution consistency check is performed: the syllable distribution is checked to determine if the following anomalies exist: ① The number of syllables in sub-rhythms within the same rhythmic unit differs too much (the default threshold is max(ci) / min(ci)>2.5); ② The syllable distribution of repeating rhythmic units is inconsistent (i.e., repeating lines with the same original text have different corresponding syllable distribution vectors). If an anomaly exists, return to S201 to redivide the sub-rhythm boundaries, and set the maximum number of retries to 3. If more than 3 retries are made, the current division is retained and the unit is marked as a "weakly constrained" unit, and subsequent processing is carried out using strategy C (overall backoff constraint).

[0054] In this embodiment, steps S201-S204 can be implemented using an open-source large model based on the thought chain. The corresponding prompt words designed in this embodiment are: "You are a voice and lyrics rhythm analysis assistant."

[0055] Given the obtained rhythmic unit set U = {u1, u2, …, um}, Please establish syllable constraint targets for each rhythmic unit, with the following specific requirements: 1. Sub-rhythm boundary recognition: For each rhythm unit (ui), identify its internal natural singing pauses. And using the "|" symbol, it is represented as: ui = ui,1 | ui,2 | … | ui,k; 2. Syllable distribution statistics: Without punctuation marks Count the number of syllables in each sub-rhythm segment ui,j. Obtain the syllable distribution vector: vi = [ci1, ci2, …, cik]; 3. Syllable distribution consistency check: Check for the following abnormalities: (a) The number of sub-rhythmic syllables within the same rhythmic unit varies too much; (b) The syllable distribution of repeated rhythmic units is inconsistent; If an anomaly is found, the sub-rhythm boundary is adjusted and the statistics are recalculated (maximum of 3 retries). If it occurs more than 3 times, it is marked as a "weakly constrained" cell; 4. Selection of syllable constraint expression methods: Based on the length and structural complexity of the rhythm unit - Strategy A: Strict distribution constraints (segment-by-segment matching); - Strategy B: Weak distribution constraints (allowing local float); - Strategy C: Overall backoff constraint (constrains only the total number of syllables); The syllable constraint expression method of each segment unit is obtained.

[0056] Output only the final result of each step, without providing an explanation. In this embodiment, when performing step S3, which is to generate at least one candidate translation corresponding to the target rhythm unit based on the syllable distribution of the target rhythm unit, refer to Figure 6 Specifically, the following steps can be performed: S301. Set multiple translation paths; S302. For any translation path, execute the translation path, translate the target rhythm unit into the target language, and obtain the candidate translations corresponding to the translation path; S303. Perform rhythm checks on candidate translations, remove candidate translations that fail the checks, and retain and output candidate translations that pass the checks.

[0057] In step S301, the following three translation paths are set: Translation path P1 (syllable priority mode): strictly satisfies syllable distribution; Translation path P2 (semantic priority mode): prioritizes semantic integrity; Translation path P3 (syllable-semantic balance mode): balances syllables and semantics.

[0058] In this embodiment, each translation path has a corresponding translation mode. For example, when translating a target rhythmic unit, translation path P1 translates the first sub-rhythm segment (which can be obtained by executing step S202) in the target rhythmic unit, thereby strictly satisfying the syllable distribution in the target rhythmic unit; when translating a target rhythmic unit, translation path P2 translates the first sub-rhythm segment as a unit if the semantics of the first sub-rhythm segment is complete, and if the semantics of the first sub-rhythm segment is incomplete, multiple consecutive first sub-rhythm segments can be combined to obtain complete semantics before translating the unit composed of multiple first sub-rhythm segments; when translating a target rhythmic unit, translation path P3 can balance syllables and semantics, for example, it can translate the unit composed of two fixed first sub-rhythm segments.

[0059] In step S302, all translation paths are traversed. For any translation path, the translation path is executed, translating the target rhythmic unit into the target language, and obtaining the candidate translations corresponding to the translation path. Each path generates several candidate translations, forming a candidate set:

[0060] For example, for target rhythm unit u1: "You look so beautiful when you smile, like a spring flower," it is translated into the target language through translation paths P1, P2, and P3 respectively, thus obtaining candidate translations (P1), (P2), and (P3) for each translation path, forming the candidate translation set C1 corresponding to target rhythm unit u1: C1 = { (P1) You smile so bright and beautiful | like flowers in the spring, (P2) When you smile, you look so lovely | just like a flower inspringtime, (P3) Your smile looks so beautiful | like spring flowers in bloom} For target rhythm unit u2: "Blow away all your troubles and worries," and u3: "You look so beautiful when you smile," these are translated into the target language through translation paths P1, P2, and P3 respectively, thus obtaining candidate translations (P1), (P2), and (P3) for each translation path, forming the candidate translation set C2 corresponding to target rhythm unit u2. C2 = { (P1) All of the worries and troubles inside | are gently blown away, (P2) Every worry and every sorrow | is carried off and gone, (P3) All my worries and all my sorrows | slowly drift away } For the target rhythm unit u3: "You look so beautiful when you smile," it is translated into the target language through translation paths P1, P2, and P3 respectively, thereby obtaining the candidate translations (P1), (P2), and (P3) corresponding to each translation path, forming the candidate translation set C3 corresponding to the target rhythm unit u3: C3 = { (P1) You smile so bright and beautiful, (P2) When you smile, you look so lovely, (P3) Your smile looks so beautiful } In this embodiment, when performing step S303, which involves performing rhythm verification on the candidate translations, eliminating candidate translations that fail the verification, and retaining and outputting candidate translations that pass the verification, the following steps can be specifically performed: S30301. For any target rhythm unit, set the syllable constraint method of the target rhythm unit according to its length and structure; S30302. For any candidate translation, decompose the candidate translation into multiple second sub-rhythm segments according to the same decomposition method as the target rhythm unit corresponding to the candidate translation; count the number of syllables for each second sub-rhythm segment, and generate the second syllable distribution vector corresponding to the candidate translation based on the number of syllables corresponding to each second sub-rhythm segment and its position distribution in the candidate translation. S30303. For any candidate translation, compare the second syllable distribution vector of the candidate translation with the first syllable distribution vector of the target rhythm unit corresponding to the candidate translation. If the comparison result satisfies the syllable constraint method of the target rhythm unit, the candidate translation is determined to pass the verification. If the comparison result does not satisfy the syllable constraint method of the target rhythm unit, the candidate translation is determined to fail the verification.

[0061] In step S30301, the syllable constraint expression method is selected: based on the length and structure of the target rhythmic unit, the syllable constraint expression method is selected. In this embodiment, the following three syllable constraint methods are included: Syllable constraint method A (strict distribution constraint): requires segment-by-segment matching, suitable for units with a uniform distribution of sub-rhythm syllables and obvious repetitive structures (judgment condition: the maximum difference in the number of syllables between sub-rhythms <= 2 and there are no inconsistencies). Syllable constraint method B (weak distribution constraint): Allows local fluctuation (fluctuation range <= 2 syllables), suitable for units with moderate differences in the number of syllables between sub-rhythms but without affecting the singing rhythm (judgment condition: 2 < maximum difference in the number of syllables between sub-rhythms <= 4). Syllable constraint method C (overall backsliding constraint): Only constrains the total number of syllables, suitable for units with complex structures or unstable sub-rhythm boundaries (judgment condition: the difference in the maximum number of syllables between sub-rhythms is >4 or the consistency check is marked as "weak constraint").

[0062] In step S30302, each candidate translation is converted into a corresponding second syllable distribution vector: For the i-th candidate translation, the candidate translation is decomposed into multiple second sub-rhythm segments in the same way as the i-th target rhythm unit corresponding to the i-th candidate translation (i.e., split according to the sub-rhythm boundary "|" corresponding to the target rhythm unit corresponding to the candidate translation); the number of syllables of each second sub-rhythm segment is counted, and the second syllable distribution vector v'i corresponding to the i-th candidate translation is generated according to the number of syllables corresponding to each second sub-rhythm segment and its position distribution in the candidate translation.

[0063] In step S30303, for the i-th candidate translation, the second syllable distribution vector v'i of the i-th candidate translation is compared with the first syllable distribution vector vi of the i-th target rhythm unit corresponding to the i-th candidate translation. If syllable constraint method A is selected for constraint, the second syllable distribution vector v'i and the first syllable distribution vector vi must be strictly matched segment by segment (the number of syllables in each segment must be completely consistent) to be judged as "passed verification", otherwise it is judged as "failed verification". If syllable constraint method B is selected for constraint, each segment is allowed to fluctuate by no more than 2 syllables, that is, the component corresponding to the second syllable distribution vector v'i and the first syllable distribution vector vi fluctuates by no more than 2 syllables to be judged as "passed verification", otherwise it is judged as "failed verification". If syllable constraint method C is selected for constraint, only the difference in the total number of syllables is checked to be no more than 3, that is, the absolute value of the difference between the total number of syllables of the second syllable distribution vector v'i and the total number of syllables of the first syllable distribution vector vi is checked to be no more than 3 to be judged as "passed verification", otherwise it is judged as "failed verification".

[0064] By executing steps S30301-S30303, candidate translations that fail the verification are eliminated, while candidate translations that pass the verification are retained and output. For example, in this embodiment, for the candidate translation set corresponding to the target rhythm unit u1 obtained in step S302... C1 = { (P1) You smile so bright and beautiful | like flowers in the spring, (P2) When you smile, you look so lovely | just like a flower inspringtime, (P3) Your smile looks so beautiful | like spring flowers in bloom} Since the difference in the number of sub-rhythmic syllables |7-7|=0<=2, syllable constraint method A (strict distribution constraint) is used for verification during steps S30301-S30303 to eliminate and retain candidate translations, and output the candidate translations. C1' = { You smile so bright and beautiful | like flowers in the spring, Your smile looks so beautiful | like spring flowers in bloom } For the candidate translation set corresponding to the target rhythm unit u2 obtained in step S302 C2 = { (P1) All of the worries and troubles inside | are gently blown away, (P2) Every worry and every sorrow | is carried off and gone, (P3) All my worries and all my sorrows | slowly drift away } Since the syllable count difference between sub-rhythms |11-5|=6>4, but this unit has no consistency anomaly and the sub-rhythms form an elaboration-supplement relationship, when executing steps S30301-S30303, syllable constraint method B (weak distribution constraint) is used for verification, so as to eliminate and retain candidate translations and output candidate translations C2' = { All of the worries and troubles inside | are gently blown away, All my worries and all my sorrows | slowly drift away } For the candidate translation set corresponding to the target rhythm unit u3 obtained in step S302 C3 = { (P1) You smile so bright and beautiful, (P2) When you smile, you look so lovely, (P3) Your smile looks so beautiful } Since u3 is a single sub-rhythm and is a repeated line with "you look so beautiful when you smile" in u1, when executing steps S30301-S30303, syllable constraint method A (strict distribution constraint) is used for verification, so as to eliminate and retain candidate translations and output candidate translations C3' = { You smile so bright and beautiful, Your smile looks so beautiful } After step S3 is completed, candidate translations are merged, combining candidate translations from different generation paths to form a final candidate translation set for subsequent global consistency processing. Specifically, the candidate translations C1', C2', and C3' retained and output in step S3 are combined to output... C = {C1', C2', C3',} = { u1: { You smile so bright and beautiful | like flowers in the spring, Your smile looks so beautiful | like spring flowers in bloom }, u2: { All of the worries and troubles inside | are gently blown away, All my worries and all my sorrows | slowly drift away }, u3: { You smile so bright and beautiful, Your smile looks so beautiful } } The candidate translation set C obtained from steps S301-S303 will be processed in step S4.

[0065] In this embodiment, steps S301-S303 can be implemented using an open-source large model based on the thought chain. The corresponding prompt words designed in this embodiment are: You are a song lyrics translation candidate generation assistant.

[0066] Given a rhythm unit ui and its corresponding syllable constraint vi, Please generate multiple candidate translations of English lyrics based on a temperature sampling mechanism. The results are then organized according to different generation paths, with the following specific requirements: 1. Generation of multi-path candidate translations (S301): For each rhythm unit (ui) and syllable constraint (vi), The following three generation paths are used respectively: - Path P1 (Syllable-first path): Strictly satisfies syllable distribution constraints; - Path P2 (Semantic Priority Path): Prioritizes semantic integrity and naturalness; - Path P3 (Compromise Path): Achieving a balance between syllables and semantics; Each path generates several candidate translations, retaining "|" as the sub-rhythm boundary. Form a candidate set Ci; 2. Candidate Translation Rhythm Check (S302): Reverse syllable statistics are performed on each generated candidate translation. Remove translations that clearly violate the corresponding syllable constraint vi; 3. Merging of candidate translations (S303): The candidate translations that pass the verification will be merged according to rhythmic units. The final set of candidate translations is formed. Used for subsequent global consistency processing.

[0067] Output only the final result of each step, without providing an explanation. In this embodiment, when performing step S4, which involves performing a global consistency analysis on all candidate translations to generate the translated lyrics text, reference is made. Figure 7 Specifically, the following steps can be performed: S401. Perform expression consistency modeling on the lyrics to be translated and construct an expression consistency mapping table; S402. For any candidate translation, evaluate the candidate translation according to the expression consistency mapping table, and determine whether the candidate translation passes or fails the evaluation; S403. For any candidate translation that fails the evaluation, rewrite the candidate translation according to the expression consistency mapping table; S404. Output all candidate translations that passed the evaluation and the rewritten candidate translations to form the translated lyrics text.

[0068] In step S401, the consistency modeling of the original text expression is performed: the lyrics D to be translated are analyzed to identify repeated or core expressions, and an expression consistency mapping table is constructed: M = {Original text expression → Unified translation expression} The identification criteria used in step S401 include: ① identical lyrics lines (e.g., "You look so beautiful when you smile" appears twice in D); ② repetition of semantic core phrases (e.g., "all the troubles" and "all the sorrows" share the "all" core structure). For each type of repeated expression, a unified translation expression is assigned based on the candidate translation with the highest syllable matching degree among all candidate translations output in step S3.

[0069] For example, for the lyrics text to be translated obtained in step S0, the expression consistency mapping table M constructed in step S401 is: M = { "Your smile is so bright and beautiful" } In step S402, a translation consistency assessment is performed: based on the consistency mapping table M, each translation in the candidate translation set C is evaluated to determine whether it meets the consistency requirements. The evaluation rule is as follows: for each candidate translation, check whether it contains a unified translation corresponding to the original text expression in the mapping table M—if the candidate translation uses a unified translation expression, it is marked as passed; if the candidate translation uses different translation expressions, it is marked as inconsistent and needs to proceed to S403 for rewriting.

[0070] Taking S002 as an example: the output of the current step is in the candidate translation u1: "You smile so bright and beautiful | like flowers in the spring" (M) "Your smile looks so beautiful | like spring flowers in bloom" (Not a perfect match) In the candidate translation of u3: “You smile so bright and beautiful” (M) “Your smile looks so beautiful” (Not a perfect match) In step S403, consistency constraint rewriting is performed: Under the premise of satisfying the syllable distribution constraint, based on the consistency mapping table M, candidate translations marked as inconsistent are rewritten or adjusted to generate lyrics translations with a unified style. The rewriting rule is as follows: replace inconsistent translation fragments with the corresponding unified translation expressions in M, and recount the syllable count after replacement. If the number of syllables exceeds the allowable range of the constraint strategy, fine-tuning is performed (adding or deleting function words, adjusting word order) to ensure that the rewritten translation simultaneously satisfies consistency and syllable constraints.

[0071] For example, for candidate rhythm unit u1 in the lyrics text to be translated obtained in step S0, its corresponding candidate translation before rewriting in step S403 is: Your smile looks so beautiful | like spring flowers in bloom After rewriting step S403, the result is: You smile so bright and beautiful | like spring flowers in bloom For candidate rhythm unit u3 in the lyrics text to be translated obtained in step S0, its corresponding candidate translation before rewriting in step S403 is: Your smile looks so beautiful After rewriting step S403, the result is: You smile so bright and beautiful In step S404, all candidate translations that passed the evaluation in step S402, as well as candidate translations that failed the evaluation in step S402 and were rewritten in step S403, are output, thereby outputting the translated lyrics text.

[0072] For example, in this embodiment, step S404 outputs the following translated lyrics text: You smile so bright and beautiful | like flowers in the spring All of the worries and troubles inside | are gently blown away You smile so bright and beautiful The translated lyrics are expressed in the target language and have the same semantics as the lyrics to be translated, which are expressed in the source language. Moreover, they can be matched with the melody of the original song to be translated, namely "You Look So Beautiful When You Smile", so that the translated lyrics can be sung with the melody of "You Look So Beautiful When You Smile".

[0073] In this embodiment, steps S401-S404 can be implemented using an open-source large model based on the thought chain. The corresponding prompt words designed in this embodiment are: "You are a lyrics translation consistency decision-making assistant."

[0074] Given the original lyrics text D, the set of rhythm units U, and the corresponding set of candidate translations C, Please do so without disrupting the rhythmic structure and syllable distribution constraints. Complete the global consistency analysis and final translation generation for the lyrics translation. Specific requirements are as follows: 1. Modeling for consistency of original text expression (S401): Analyze the original lyrics text D, Identify expressions that are repeated or have a core semantic position. And specify a unified English translation for it. Construct an expression consistency mapping table: M = {Original text expression → Unified translation expression}; 2. Candidate Translation Consistency Assessment (S402): Based on the consistency mapping table M, Each candidate translation in the candidate translation set C is evaluated. Determine whether it meets the requirements of expression consistency; 3. Rewrite consistency constraints (S403): Under the premise of satisfying the existing constraints of syllable distribution and rhythmic structure. Based on the consistency mapping table M, Make necessary replacements or minor rewrites to the candidate translations. To generate lyric translations with a consistent style; 4. Output translated lyrics (S404): Output the final full translation of the lyrics in rhythm unit order.

[0075] Output only the final result of each step, without providing an explanation. The lyrics translation method based on rhythm units and syllable distribution constraints in this embodiment applies the following technical principles and achieves the following effects: Technical Principle 1: Establishment of Syllable Constraint Targets This embodiment establishes explicit syllable distribution constraints for each rhythm unit, enabling the translation generation process to have a clear rhythm control objective. The establishment of syllable constraints includes four steps: sub-rhythm boundary identification (S201, marking internal natural pauses with "|"), syllable distribution statistics (S202, counting the number of syllables for each sub-rhythm segment to obtain the distribution vector vi), syllable distribution consistency verification (S203, detecting two types of anomalies: excessive difference in the number of syllables in sub-rhythms and inconsistent distribution of repeated units; if an anomaly occurs, the sub-rhythm boundary is redefined, with a maximum of 3 retries; if more are attempted, the unit is marked as "weakly constrained"), and syllable constraint expression method selection (S204, automatically selecting strategy A (strict distribution constraint), strategy B (weak distribution constraint), or strategy C (overall backsliding constraint) based on the difference in the number of syllables between sub-rhythms and the consistency verification result).

[0076] Beneficial effects: Syllable constraint targets provide a quantitative basis for rhythm control in translation generation. The automatic selection mechanism of three constraint strategies enables the system to adaptively adjust the constraint intensity according to the structural complexity of rhythm units. Simple and uniform units use strict constraints to ensure accurate matching, while complex units use lenient constraints to avoid over-restricting semantic expression. Overall, the system achieves the optimal balance between syllable matching accuracy and semantic quality.

[0077] Technical Principle 2: Dividing into rhythmic units and selecting the most stable rhythmic unit In this embodiment, under conditions of no melody input, the smallest singable rhythmic units are divided based on the semantic structure of the lyrics and the rules of singing pauses. The most stable division scheme is selected through multi-dimensional evaluation. The division process includes four steps: line-level lyric structure analysis (S101), judgment of inter-line relationships based on semantics and singing pauses (S102), multi-strategy rhythmic unit generation (S103, three schemes: conservative strategy, rhythm priority strategy, and repetition sensitive strategy), and rhythmic unit evaluation and decision (S104). In S104, the three candidate divisions are evaluated from multiple dimensions: variance of the number of syllables within the unit (measuring the load balance of each unit), consistency of syllable distribution across units (checking the structural alignment of repeated lines in different units), and singing rationality score (LLM evaluation of pause naturalness, appropriate length, and semantic integrity). The candidate division with the most stable structure is selected as the final set of rhythmic units using a weighted comprehensive score.

[0078] Beneficial effects: Multi-strategy candidate generation avoids the limitations of a single partitioning strategy, and the multi-dimensional evaluation mechanism ensures that the selected rhythm unit partitioning achieves optimal results in three dimensions: structural stability, repetition line alignment, and singing rationality, laying a solid foundation for subsequent syllable constraints and consistent translation.

[0079] Technical Principle 3: Multi-path translation generation and evaluation This embodiment employs three paths—syllable-first, semantic-first, and compromise—to generate candidate translations, which are then filtered and merged after rhythm verification to form the final candidate set. In the generation stage (S301), the three paths generate candidate translations based on different optimization objectives. In the rhythm verification stage (S302), reverse syllable statistics are performed on each candidate translation, and different verification tolerance ranges are set according to the constraint strategies (A / B / C) corresponding to each unit—Strategy A requires strict matching segment by segment, Strategy B allows each segment to fluctuate by no more than 2 syllables, and Strategy C only verifies that the difference in the total number of syllables does not exceed 3; candidates exceeding these ranges are eliminated. In the merging stage (S303), the candidates that pass the verification are merged according to rhythm units.

[0080] Beneficial effects: Multi-path generation ensures translation quality from different dimensions—the syllable-first path ensures rhythmic singability, the semantic-first path ensures semantic integrity, and the compromise path achieves a balance between the two; the constraint strategy-based hierarchical verification mechanism aligns the verification standards with the constraint strength, avoiding over-screening of lenient constraint units that could lead to the wrong removal of valid candidates.

[0081] Technical Principle 4: Specific Implementation Process of Consistency Analysis This embodiment ensures the consistent expression of repeated lyrics in the translation through global consistency analysis. The specific implementation includes four steps: original text expression consistency modeling (S401, identify identical lyrics lines and semantic core phrase repetitions, specify a consistent translation expression based on the candidate translation with the highest syllable matching degree in the candidate set, and construct a consistency mapping table M), candidate translation consistency evaluation (S402, check whether each candidate translation uses the consistent translation expression in M, and mark it as passed or inconsistent), consistency constraint rewriting (S403, replace the non-consistent expressions in inconsistent translations with the consistent expressions in M, re-verify the number of syllables after replacement, and fine-tune the addition or deletion of function words or the word order if it exceeds the constraint tolerance range), and output translated lyrics (S404, output the full text in rhythm unit order).

[0082] Beneficial effects: The specific implementation process of consistency analysis establishes a complete closed loop from "identifying duplication -> specifying a unified expression -> evaluating candidate consistency -> constraint rewriting -> syllable verification", ensuring that the same original expression is always translated in the translation. At the same time, the syllable verification and fine-tuning mechanism after rewriting ensures that consistency adjustment does not destroy the existing syllable constraints, thus achieving the unity of consistency and singability.

[0083] Technical Principle 5: Lyrics Text Preprocessing Technical highlights: S001-S002 complete the input and standardization preprocessing of the lyrics text. S001 receives the source language plain text lyrics data set D; S002 performs text standardization processing on the input lyrics, including removing redundant spaces and illegal characters, preserving the original line break structure, and not introducing melody, rhythm, or musical score information. Preprocessing is implemented using regular expressions.

[0084] Beneficial effects: Text normalization ensures input consistency for subsequent rhythm analysis and translation steps, noise characters are removed to avoid interference with syllable statistics, line breaks are preserved to provide a basis for line-level parsing, and the method's versatility is guaranteed by not relying on melody information.

[0085] Technical Principle 6: Lyric Text Segmentation Key technical points: S101 completes line-level lyric structure parsing, splitting the entire lyric text data set D into a set of line-level lyric units L = {l1, l2, ..., ln} according to the original line structure, where li is the lyric text of the i-th line. Sentence segmentation is based on the original line break structure of the lyrics, without introducing additional semantic punctuation or melodic annotations.

[0086] Beneficial effects: Line-level parsing is the smallest granular structuring of lyrics, providing basic units for subsequent S102 interline relationship judgment, preserving the original line structure and avoiding the introduction of subjective sentence segmentation errors.

[0087] A computer program can be written to execute the lyrics translation method based on rhythm units and syllable distribution constraints described in this embodiment. This computer program can then be written into a computer device or storage medium. When the computer program is read and run, it executes the lyrics translation method based on rhythm units and syllable distribution constraints described in this embodiment, thereby achieving the same technical effect as the lyrics translation method based on rhythm units and syllable distribution constraints described in the embodiment. For example, when the computer program is written into the memory of a computer device, the processor can read the computer program from the memory and execute the lyrics translation method based on rhythm units and syllable distribution constraints described in this embodiment.

[0088] It should be noted that, unless otherwise specified, when a feature is referred to as "fixed" or "connected" to another feature, it can be directly fixed or connected to the other feature, or indirectly fixed or connected to the other feature. Furthermore, the descriptions of "upper," "lower," "left," and "right" used in this disclosure are only relative to the relative positional relationships of the components of this disclosure in the accompanying drawings. The singular forms "a" and "the" used in this disclosure are also intended to include the plural forms, unless the context clearly indicates otherwise. Moreover, unless otherwise defined, all technical and scientific terms used in this embodiment have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this embodiment specification is only for describing particular embodiments and is not intended to limit the invention. The term "and / or" as used in this embodiment includes any combination of one or more of the associated listed items.

[0089] It should be understood that although the terms first, second, third, etc., may be used to describe various elements in this disclosure, these elements should not be limited to these terms. These terms are only used to distinguish elements of the same type from each other. For example, a first element may also be referred to as a second element without departing from the scope of this disclosure, and similarly, a second element may also be referred to as a first element. The use of any and all instances or exemplary language (“e.g.,” “such as,” etc.) provided in this embodiment is intended only to better illustrate embodiments of the invention and, unless otherwise required, does not impose a limitation on the scope of the invention.

[0090] It should be recognized that embodiments of the present invention can be implemented or carried out by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable storage medium. The method can be implemented using standard programming techniques—including a non-transitory computer-readable storage medium configured with a computer program, wherein such a storage medium causes the computer to operate in a specific and predefined manner—according to the methods and drawings described in the specific embodiments. Each program can be implemented in a high-level procedural or object-oriented programming language to communicate with the computer system. However, if desired, the program can be implemented in assembly or machine language. In any case, the language can be a compiled or interpreted language. Furthermore, for this purpose, the program can run on a programmed application-specific integrated circuit (ASIC).

[0091] Furthermore, the procedures described in this embodiment can be performed in any suitable order unless otherwise indicated by this embodiment or clearly contradicted by the context. The procedures (or variations and / or combinations thereof) described in this embodiment can be executed under the control of one or more computer systems configured with executable instructions, and can be implemented by hardware or a combination thereof as code (e.g., executable instructions, one or more computer programs, or one or more applications) that commonly executes on one or more processors. A computer program includes multiple instructions executable by one or more processors.

[0092] Furthermore, the method can be implemented in any suitable type of computing platform, including but not limited to personal computers, minicomputers, mainframes, workstations, networked or distributed computing environments, standalone or integrated computer platforms, or in communication with charged particle tools or other imaging devices, etc. Aspects of the invention can be implemented as machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, optical read and / or write storage medium, RAM, ROM, etc., such that it is readable by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the processes described herein. Furthermore, the machine-readable code, or portions thereof, can be transmitted via wired or wireless networks. The invention of this embodiment includes these and other different types of non-transitory computer-readable storage media when such media comprises instructions or programs that implement the steps above in conjunction with a microprocessor or other data processor. When programmed according to the methods and techniques of the invention, the invention also includes the computer itself.

[0093] A computer program can be applied to input data to perform the functions of this embodiment, thereby transforming the input data to generate output data stored in non-volatile memory. The output information can also be applied to one or more output devices, such as a display. In a preferred embodiment of the invention, the transformed data represents physical and tangible objects, including specific visual depictions of physical and tangible objects generated on the display.

[0094] The above are merely preferred embodiments of the present invention. The present invention is not limited to the above-described embodiments. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention, as long as they achieve the technical effects of the present invention by the same means, should be included within the scope of protection of the present invention. Within the scope of protection of the present invention, the technical solutions and / or implementation methods can have various modifications and variations.

Claims

1. A lyrics translation method based on rhythmic units and syllable distribution constraints, characterized in that, The lyrics translation method based on rhythm units and syllable distribution constraints includes: Get the lyrics text to be translated; The lyrics text to be translated is decomposed into multiple target rhythm units; For any of the target rhythm units, determine the syllable distribution of the target rhythm unit; For any target rhythm unit, at least one candidate translation corresponding to the target rhythm unit is generated based on the syllable distribution of the target rhythm unit; A global consistency analysis is performed on all the candidate translations to generate the translated lyrics text.

2. The lyrics translation method based on rhythm units and syllable distribution constraints according to claim 1, characterized in that, The process of obtaining the lyrics text to be translated includes: Obtain plain text lyrics data represented in the source language; The plain text lyrics data is processed by line splitting and text normalization to obtain the lyrics text to be translated.

3. The lyrics translation method based on rhythm units and syllable distribution constraints according to claim 2, characterized in that, The step of decomposing the lyrics text to be translated into multiple target rhythm units includes: Multiple generation strategies are set; each generation strategy has a corresponding partitioning orientation, which is any one of semantic dependency, rhythm priority and lyric repetition sensitivity. For any of the generation strategies, the generation strategy is executed to divide the lines in the lyrics text to be translated, so that each line forms or is merged to form a corresponding candidate rhythm unit, thereby obtaining a set of candidate rhythm units corresponding to the generation strategy; the set of candidate rhythm units includes at least one of the candidate rhythm units. For any of the candidate rhythm unit sets, the candidate rhythm unit sets are evaluated in multiple dimensions to obtain the score values ​​corresponding to each of the multiple scoring dimensions. The score values ​​are then weighted and summed to obtain the comprehensive score corresponding to the candidate rhythm unit set. Select the candidate rhythm unit set with the highest comprehensive score, and determine each candidate rhythm unit in the selected candidate rhythm unit set as the target rhythm unit.

4. The lyrics translation method based on rhythm units and syllable distribution constraints according to claim 1, characterized in that, Determining the syllable distribution of the target rhythmic unit includes: Identify pause points in the target rhythm unit; After removing punctuation marks from the target rhythm unit, the target rhythm unit is decomposed into multiple first sub-rhythm segments based on the pause points. Count the number of syllables in each of the first sub-rhythm segments; Based on the number of syllables corresponding to each of the first sub-rhythm segments and their positional distribution within the target rhythm unit, a first syllable distribution vector corresponding to the target rhythm unit is generated.

5. The lyrics translation method based on rhythm units and syllable distribution constraints according to claim 4, characterized in that, The step of generating at least one candidate translation corresponding to the target rhythm unit based on the syllable distribution of the target rhythm unit includes: Multiple translation paths are set up; each translation path has a corresponding translation mode, which is any one of syllable priority, semantic priority, and syllable-semantic balance. For any of the translation paths, the translation path is executed to translate the target rhythm unit into the target language, thereby obtaining the candidate translations corresponding to the translation path. The candidate translations are subjected to rhythm verification. The candidate translations that fail the verification are removed, and the candidate translations that pass the verification are retained and output.

6. The lyrics translation method based on rhythm units and syllable distribution constraints according to claim 5, characterized in that, The rhythm check of the candidate translations includes: For any of the target rhythm units, the syllable constraint method of the target rhythm unit is set according to the length and structure of the target rhythm unit; the syllable constraint method is any one of strict distribution constraint, weak distribution constraint and overall backtracking constraint; For any candidate translation, the candidate translation is decomposed into multiple second sub-rhythm segments in the same way as the target rhythm unit corresponding to the candidate translation; the number of syllables is counted for each second sub-rhythm segment, and a second syllable distribution vector corresponding to the candidate translation is generated based on the number of syllables corresponding to each second sub-rhythm segment and its position distribution in the candidate translation; For any candidate translation, the second syllable distribution vector of the candidate translation is compared with the first syllable distribution vector of the target rhythm unit corresponding to the candidate translation. If the comparison result satisfies the syllable constraint method of the target rhythm unit, the candidate translation is determined to pass the verification. If the comparison result does not satisfy the syllable constraint method of the target rhythm unit, the candidate translation is determined to fail the verification.

7. The lyrics translation method based on rhythmic units and syllable distribution constraints according to any one of claims 1-6, characterized in that, The step of performing a global consistency analysis on all candidate translations to generate translated lyrics text includes: An expression consistency model is performed on the lyrics to be translated, and an expression consistency mapping table is constructed. For any of the candidate translations, the candidate translations are evaluated according to the expression consistency mapping table to determine whether the candidate translation passes or fails the evaluation; For any candidate translation that fails the evaluation, the candidate translation is rewritten according to the expression consistency mapping table; The translated lyrics text is composed of all the candidate translations that passed the evaluation and the rewritten candidate translations.

8. The lyrics translation method based on rhythm units and syllable distribution constraints according to claim 7, characterized in that, The process of performing expression consistency modeling on the lyrics to be translated and constructing an expression consistency mapping table includes: The lyrics to be translated were analyzed, and at least one repeated expression was identified. For any of the repeated expressions, the repeated expressions are translated into the target language to obtain a unified translated expression, and a mapping relationship between the repeated expressions and the translated expressions is established; The expression consistency mapping table is formed by combining all the repeated expressions and the corresponding mapping relationships.

9. A computer device, characterized in that, It includes a memory and a processor, the memory being used to store at least one program, and the processor being used to load at least one program to execute the lyrics translation method based on rhythm units and syllable distribution constraints as described in any one of claims 1-8.

10. A computer-readable storage medium storing a processor-executable program, characterized in that, The processor-executable program, when executed by the processor, is used to perform the lyrics translation method based on rhythm units and syllable distribution constraints as described in any one of claims 1-8.