Lyric generation task-oriented high-quality lyric data synthesis method and system
Through the automated annotation and data integration technology of large language models, the high cost and low efficiency of traditional lyric annotation methods are solved, and the efficient synthesis of high-quality lyric data is achieved, ensuring the accuracy and comprehensiveness of the labeling.
Patent Information
- Application Number
- CN202510482266.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-07-29
AI Technical Summary
When building lyrics model training data sets, manual labeling is expensive and inefficient. Rule-based labeling methods have limited coverage and are prone to errors, making it difficult to achieve efficient and accurate lyric labeling.
A large language model is used for automatic annotation, and a label set containing content labels, classification labels and meta tags are generated. The lyric data is integrated with the meta tag set, and noise information is processed through regular expressions and hash deduplication technology, and a unified data format is defined for standardization.
It greatly reduces the cost of lyrics data processing, improves the accuracy and comprehensiveness of labeling, overcomes the limitations of traditional methods, and achieves efficient and accurate lyrics data synthesis.
Smart Images

Figure CN120386891A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of data processing, and particularly to a high-quality lyric data synthesis method and system for lyric generation tasks. Background Art
[0002] Lyric creation has always had relatively high requirements for the literary attainments, musical perception, and innovative thinking of creators. However, with the rapid progress of artificial intelligence technology, especially the rise of large language models in recent years, the entry threshold for this field has begun to decrease. Traditional lyric creation highly depends on the personal experience and creative inspiration of creators, which not only requires a large amount of time investment but also involves relatively high economic costs. In contrast, using large language models for lyric creation can not only significantly lower the creation threshold but also greatly improve the creation efficiency. However, it should be noted that the training of large language models requires sufficient data support. Currently, the following several methods are mainly used to construct a dataset suitable for lyric model training:
[0003] 1) Manual annotation: This method collects, proofreads, classifies, annotates, etc. lyric data manually to ensure the accuracy and consistency of the data.
[0004] 2) Rule-based annotation: This method uses predefined rules and logics to automatically annotate data.
[0005] However, manual annotation is costly and inefficient. At the same time, different annotators may be highly subjective in some annotation tasks (such as style classification and structure division), resulting in inconsistent annotation quality. Rule-based annotation has a limited coverage range, and for complex data beyond the scope of the rules, inaccurate annotation will occur. Summary of the Invention
[0006] Based on this, it is necessary to provide a high-quality lyric data synthesis method and system for lyric generation tasks that can improve the accuracy and efficiency of lyric annotation for the above technical problems.
[0007] In a first aspect, this application provides a high-quality lyric data synthesis method for lyric generation tasks. The method includes:
[0008] Obtain lyric data;
[0009] Use a large language model to generate an annotation set for the lyric data; wherein, the elements of the annotation set include: content tags, classification tags, and meta-tags for dividing lyric paragraphs;
[0010] Integrate the lyric data in combination with the meta-tag set for use in lyric generation tasks.
[0011] In one embodiment, obtaining lyric data includes:
[0012] Obtain the original lyrics;
[0013] Use regular expressions to clean the data of the original lyrics;
[0014] Deduplicate the cleaned original lyrics to obtain the lyric data.
[0015] In one embodiment, deduplicating the cleaned original lyrics includes:
[0016] Construct unique key-value pairs according to the string of lyrics-song names, and deduplicate based on the key-value pairs;
[0017] Perform string hashing deduplication and cosine similarity comparison deduplication on the original lyrics that have completed key-value pair deduplication.
[0018] In one embodiment, using a large language model to generate an annotation set for the lyric data includes:
[0019] Train the large language model respectively for the content label generation task, classification label generation task, and meta label generation task, and preset the corresponding prompt template;
[0020] Input the lyric data into the trained large language model, and output the corresponding content label, classification label, or meta label according to the prompt template;
[0021] Integrate the output of the large language model to obtain the annotation set.
[0022] In one embodiment, the content labels include emotion sub-labels, theme sub-labels, paragraph structure sub-labels, and intention sub-labels;
[0023] The classification labels include style sub-labels.
[0024] In one embodiment, the method further includes:
[0025] Define a unified data format;
[0026] Standardize the lyric data from different sources according to the unified data format.
[0027] In a second aspect, the present application also provides a high-quality lyric data synthesis system for the lyric generation task. The system includes:
[0028] A data preprocessing module for obtaining lyric data;
[0029] A large language model processing module for using a large language model to generate an annotation set for the lyric data; wherein, the elements of the annotation set include: content labels, classification labels, and meta labels for dividing lyric paragraphs;
[0030] A data normalization module for integrating lyric data in combination with a set of meta-tags for use in lyric generation tasks.
[0031] In a third aspect, the present application also provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps in the above-mentioned high-quality lyric data synthesis method for lyric generation tasks are implemented.
[0032] In a fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned high-quality lyric data synthesis method for lyric generation tasks are implemented.
[0033] In a fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned high-quality lyric data synthesis method for lyric generation tasks are implemented.
[0034] The above-mentioned high-quality lyric data synthesis method and system for lyric generation tasks use a large language model to generate an annotation set for lyric data; wherein, the elements of the annotation set include: content tags, classification tags, and meta-tags for dividing lyric paragraphs; the lyric data is integrated in combination with the set of meta-tags for use in lyric generation tasks. The present application uses a large language model to automatically generate an annotation set, which not only greatly improves the efficiency of data processing, but also ensures the accuracy and comprehensiveness of the annotation, overcoming the limitations of traditional lyric annotation methods. Description of the Drawings
[0035] Figure 1 It is a framework diagram of the high-quality lyric data synthesis method for lyric generation tasks in an embodiment. Detailed Embodiments
[0036] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0037] An embodiment of the present application provides a high-quality lyric data synthesis method for lyric generation tasks, as Figure 1 shown, including the following steps:
[0038] Step 102, obtain lyric data.
[0039] Collect a large amount of lyric data from multiple sources such as public music vouchers and social media, and perform operations such as denoising and formatting through a data preprocessing module to ensure the quality of the input data.
[0040] Step 104: Use a large language model to generate an annotation set for the lyric data; among them, the elements of the annotation set include: content tags, classification tags, and meta tags for dividing lyric paragraphs.
[0041] Based on the in-depth analysis results generated by the large language model processing module, dynamically create an annotation set that conforms to each lyric data. This large language model can be a general large model deployed offline or an interface of a large language model called online.
[0042] In this embodiment, the content tags include: emotion sub-tags (such as happy, sad), theme sub-tags (such as love, friendship), paragraph structure sub-tags (such as one-section form, two-section form), and intention sub-tags (such as plum blossom, snowflake).
[0043] The classification tags include style sub-tags (such as rock, pop).
[0044] The meta tag refers to a detailed division of the lyric paragraphs (such as verse, chorus).
[0045] Step 106: Integrate the lyric data in combination with the meta tag set for use in the lyric generation task.
[0046] According to the fields in the lyric data and the meta tag set, integrate the lyric data from different sources, merge them into the same data set, and use it as the training data for the lyric generation task.
[0047] In one embodiment, step 102 includes: obtaining the original lyrics; performing data cleaning on the original lyrics using regular expressions; removing duplicates from the cleaned original lyrics to obtain the lyric data.
[0048] After collecting the original lyrics from different platforms, there may be noise information such as garbled characters, duplicate content, and non-music-related words. In view of these situations, in this embodiment, regular expressions are first used to perform data cleaning on the original lyrics, and then duplicates are removed to obtain valid lyric data.
[0049] Among them, before using regular expressions, it is necessary to clarify the data to be cleaned and the cleaning objectives. For example: removing extra spaces, punctuation marks or special characters; unifying data formats such as dates and times. Before writing regular expressions, it is necessary to have a full understanding of the data to be processed, including the data source, format, and possible abnormal situations. Then, according to the data cleaning objectives and data characteristics, write the corresponding regular expressions. After writing the regular expressions, it is necessary to use some test data to test them to ensure that they can correctly match and process the data. After the test passes, the regular expressions can be applied to the actual data set for cleaning. After the data cleaning is completed, it is necessary to verify the cleaning results to ensure that the data meets the expected requirements. Verification can be carried out by manually checking part of the data, statistical data characteristics, etc.
[0050] The duplicate removal method is as follows: construct unique key-value pairs according to the string of lyrics-song names, and perform duplicate removal based on the key-value pairs; perform string hashing duplicate removal and cosine similarity comparison duplicate removal on the original lyrics after completing the key-value pair duplicate removal. String hashing duplicate removal is a method of using hashing technology to remove duplicates from a set of strings. The hash function can map strings of any length to hash values of a fixed length. When two strings are the same, their hash values are also the same. Based on this feature, duplicate strings can be efficiently found. Cosine similarity comparison duplicate removal is a duplicate removal method based on text semantic similarity. This method judges whether texts are similar by calculating the cosine similarity between text vectors. If the similarity exceeds the set threshold, these texts are considered duplicates.
[0051] In one embodiment, the method adopts a heuristic screening strategy to remove noise information such as non-music-related words, duplicates, and garbled characters from the original lyric data, thereby greatly improving the quality of the lyric data. The heuristic screening strategy is a technology that identifies and filters out unwanted content according to specific behavior patterns or rules. Common application scenarios include blocking advertisements containing specific keywords or invading privacy through pattern recognition and content analysis.
[0052] In one embodiment, step 104 includes: training the large language model for the content label generation task, classification label generation task, and meta-label generation task respectively, and presetting corresponding prompt word templates; inputting the lyric data into the trained large language model, and outputting corresponding content labels, classification labels or meta-labels according to the prompt word templates; integrating the output of the large language model to obtain an annotation set.
[0053] Input the cleaned lyric data into the large language model, and corresponding labels can be generated according to the prompt word templates of different tasks to obtain an annotation set.
[0054] In one embodiment, the method further includes: defining a unified data format; and standardizing the lyric data from different sources according to the unified data format.
[0055] The sources of the original lyrics are diverse, such as online music platforms, open-source lyric data, social media, etc. The data formats of these lyrics are inconsistent, which will affect the training of subsequent lyric generation tasks. Therefore, it is necessary to standardize them. First, use the diverse fields in the lyric data to define a unified data format, and then integrate the lyric data from different sources that have been annotated by the model according to the unified format to obtain the standardized lyric data.
[0056] The present invention aims to solve the related problems existing in the construction of a dataset suitable for lyric model training, and proposes a high-quality lyric data synthesis method for lyric generation tasks. First, a heuristic screening strategy is adopted to accurately identify and remove noise information such as non-music-related words, duplicate content, and garbled codes in the lyric text; secondly, the meta-tag content of the lyric training data is designed, and a large language model is used to complete the automatic annotation, classification, and meta-tag extraction of the lyric data; finally, a standardized data format is constructed to achieve the efficient integration of lyric data from different sources. Compared with the existing lyric model training data construction technologies, although manual annotation can ensure high accuracy, it is time-consuming, laborious, and costly; although the rule-based annotation method can partially achieve automation, due to the limitations of the rules, it cannot flexibly handle complex and variable lyric content and is prone to incorrect annotation; while the present invention uses a large language model for automatic annotation, classification, and meta-tag extraction, which not only greatly reduces the cost of producing training data, improves the efficiency of data processing, but also ensures the accuracy and comprehensiveness of the annotation, overcoming the limitations of traditional methods.
[0057] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise clearly stated in this article, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0058] Based on the same inventive concept, the embodiments of this application also provide a high-quality lyric data synthesis system for the lyric generation task, which is used to implement the high-quality lyric data synthesis method for the lyric generation task involved above. The implementation solutions provided by this system to solve problems are similar to those recorded in the above method. Therefore, the specific limitations in one or more embodiments of the high-quality lyric data synthesis system for the lyric generation task provided below can refer to the limitations on the high-quality lyric data synthesis method for the lyric generation task in the above text, and will not be elaborated here.
[0059] In one embodiment, a high-quality lyric data synthesis system for the lyric generation task is provided, including:
[0060] A data preprocessing module, configured to obtain lyric data;
[0061] A large language model processing module, configured to use a large language model to generate an annotation set for the lyric data; wherein, the elements of the annotation set include: content tags, classification tags, and meta tags for dividing lyric paragraphs;
[0062] A data standardization module, configured to integrate the lyric data in combination with the meta tag set for use in the lyric generation task.
[0063] In one embodiment, the large language model processing module is further configured to obtain the original lyrics; perform data cleaning on the original lyrics using regular expressions; remove duplicates from the cleaned original lyrics to obtain lyric data.
[0064] In one embodiment, the large language model processing module is further configured to construct unique key-value pairs according to the lyric-song name string, remove duplicates based on the key-value pairs; perform string hashing deduplication and cosine similarity comparison deduplication on the original lyrics after key-value pair deduplication.
[0065] In one embodiment, the large language model processing module is further configured to train the large language model respectively for the content tag generation task, classification tag generation task, and meta tag generation task, and preset corresponding prompt word templates; input the lyric data into the trained large language model, and output the corresponding content tags, classification tags, or meta tags according to the prompt word templates; integrate the output of the large language model to obtain the annotation set.
[0066] In one embodiment, the content tags include emotion sub-tags, theme sub-tags, paragraph structure sub-tags, and intention sub-tags; the classification tags include style sub-tags.
[0067] In one embodiment, the data standardization module is further configured to define a unified data format; perform standardization processing on the lyric data from different sources according to the unified data format.
[0068] Each module in the above high-quality lyric data synthesis system for lyric generation tasks can be implemented in whole or in part by software, hardware, or a combination thereof. Each of the above modules can be embedded in the processor of a computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form so that the processor can call and execute the operations corresponding to each of the above modules.
[0069] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in all the above method embodiments are implemented.
[0070] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in all the above method embodiments are implemented.
[0071] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in all the above method embodiments are implemented.
[0072] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.
[0073] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random-access memories (ReRAM), magnetoresistive random-access memories (MRAM), ferroelectric random-access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logics, data processing logics based on quantum computing, etc., without limitation.
[0074] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0075] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.
Claims
1. A high-quality lyric data synthesis method for lyric generation tasks, characterized in that, The method includes: Obtain lyric data; Use a large language model to generate an annotation set for the lyric data; wherein, the elements of the annotation set include: content tags, classification tags, and meta tags for dividing lyric paragraphs; Integrate the lyric data in combination with the meta tag set for use in lyric generation tasks.
2. The method according to claim 1, wherein The obtaining of the lyric data includes: Obtain the original lyrics; Perform data cleaning on the original lyrics using regular expressions; Deduplicate the cleaned original lyrics to obtain the lyric data.
3. The method according to claim 2, wherein The deduplication of the cleaned original lyrics includes: Construct unique key-value pairs according to the string of lyric-song name, and perform deduplication based on the key-value pairs; Perform string hashing deduplication and cosine similarity comparison deduplication on the original lyrics that have completed key-value pair deduplication.
4. The method according to claim 1, characterized in that, The use of a large language model to generate an annotation set for the lyric data includes: Train the large language model respectively for the content tag generation task, classification tag generation task, and meta tag generation task, and preset corresponding prompt templates; Input the lyric data into the trained large language model, and output the corresponding content tags, classification tags, or meta tags according to the prompt templates; Integrate the output of the large language model to obtain the annotation set.
5. The method according to claim 1, characterized in that: The content tags include emotion sub-tags, theme sub-tags, paragraph structure sub-tags, and intention sub-tags; The classification tags include style sub-tags.
6. The method according to claim 1, characterized in that The method further includes: Define a unified data format; Standardize the lyric data from different sources according to the unified data format.
7. A high-quality lyric data synthesis system for lyric generation tasks, characterized in that, The system includes: A data preprocessing module for obtaining lyric data; A large language model processing module for using a large language model to generate an annotation set for the lyric data; wherein, the elements of the annotation set include: content tags, classification tags, and meta tags for dividing lyric paragraphs; A data standardization module for integrating the lyric data in combination with the meta tag set for use in lyric generation tasks.
8. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 6.