Data processing method and device for lyrics generation
Through the detection and processing model of lyric generation requests and the comprehensive processing of lyrics restriction information, the problems of high lyric generation cost and narrow material sources in the prior art are solved, and efficient and low-cost lyric generation are achieved.
Patent Information
- Application Number
- CN202111638528.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2041-12-29
AI Technical Summary
The lyrics method of generating advertising songs in the prior art requires high singing skills and tone requirements, high threshold, and cannot be generated quickly, resulting in high costs and narrow material sources.
By detecting the lyric generation request, the input words are preprocessed, word generation processing and annotated using the preset processing model to generate lyrics to indicate the application of lyrics, including word participle annotation, part-of-speech vector model and format restriction model.
It broadens the source channels for lyrics generation, improves generation efficiency, and reduces costs.
Smart Images

Figure CN114357238B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data processing method and device for generating lyrics. Background Art
[0002] With the development of advertising media, elevator advertising has rapidly grown as a unique and effective new medium. Due to their advantages in terms of reach and appearance, jingles are well-suited to this new medium, providing passengers with an immersive experience. However, current methods for generating lyrics for jingles require high vocal skills and timbre. Lyrics require professional composers, which is costly and difficult to create quickly. Therefore, it is particularly important to provide a data processing method and device for lyric generation to broaden the source of lyric material, improve lyric generation efficiency, and reduce lyric generation costs. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a data processing method and device for lyric generation, which can obtain lyric restriction information for indicating lyric generation by detecting lyric generation requests and performing comprehensive processing on them using a first processing model, which is conducive to broadening the source channels of materials for generating lyrics, improving the efficiency of lyric generation, and reducing the cost of lyric generation.
[0004] In order to solve the above technical problems, a first aspect of an embodiment of the present invention discloses a data processing method for generating lyrics, the method comprising:
[0005] Detecting whether a lyrics generation request is received and obtaining a detection result; the lyrics generation request includes L input words; L is a positive integer greater than or equal to 1;
[0006] When the detection result is yes, the lyrics generation request is processed using a preset first processing model to obtain first sentence information; the first sentence information includes first sub-sentence information and second sub-sentence information; the second sub-sentence information is inherited from the first sub-sentence information;
[0007] The first word and phrase information is processed to obtain lyrics restriction information; the lyrics restriction information is used to indicate the generation of lyrics.
[0008] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the using of a preset first processing model to process the lyrics generation request to obtain the first phrase information includes:
[0009] Preprocessing the lyrics generation request to obtain a target input word; the target input word is strongly related to the lyrics;
[0010] Performing word generation processing on the target input word to obtain the first sub-word sentence information;
[0011] Perform word generation processing on the first sub-sentence information to obtain the second sub-sentence information.
[0012] As an optional implementation manner, in the first aspect of the embodiment of the present invention, preprocessing the lyrics generation request to obtain the target input word includes:
[0013] The L input words are processed using preset word parameter information to obtain candidate word information; the candidate word information includes M candidate words; M is a positive integer greater than or equal to L; the candidate words are associated with the input words;
[0014] The candidate word information is screened to obtain a target input word.
[0015] As an optional implementation manner, in the first aspect of the embodiment of the present invention, performing word generation processing on the target input word to obtain the first sub-sentence information includes:
[0016] Performing word generation processing on the target input word to obtain first word segment information;
[0017] Determining whether the first word segment information satisfies a word or sentence termination condition, and obtaining a first determination result;
[0018] When the first judgment result is no, performing word generation processing on the first word segment information to obtain second word segment information;
[0019] Using the second word segment information to update the first word segment information, and triggering the determination of whether the first word segment information satisfies a word termination condition, to obtain a first determination result;
[0020] When the first judgment result is yes, the first segment information is determined to be the first sub-sentence information.
[0021] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the processing of the first phrase information to obtain lyrics restriction information includes:
[0022] performing tagging processing on the first word and sentence information to obtain first attribute information; the first attribute information includes first part-of-speech vector information and / or first rhyme information; the first part-of-speech vector information represents the part-of-speech structure of the first word and sentence information;
[0023] Perform format restriction processing on the first attribute information to obtain lyrics restriction information.
[0024] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the tagging of the first word and sentence information to obtain the first attribute information includes:
[0025] Performing word segmentation and tagging processing on the first word and sentence information to obtain first word and sentence sequence information;
[0026] Processing the first sentence sequence information using a preset part-of-speech vector model to obtain the first part-of-speech vector information; and / or,
[0027] The first phrase information is processed using a preset homophonic word table to obtain the first rhyme information; the first rhyme information includes first rhyme information and / or first phrase quantity information; the phrase rhyme information represents the rhyme pattern of the lyrics in the first phrase information.
[0028] As an optional implementation manner, in the first aspect of the embodiment of the present invention, performing format restriction processing on the first attribute information to obtain lyrics restriction information includes:
[0029] Processing the first attribute information using a preset format restriction model to obtain second attribute information;
[0030] The second attribute information is processed using a preset part-of-speech vector model to obtain lyrics restriction information; the lyrics restriction information includes lyrics length information and / or second rhyme information; the second rhyme information is used to constrain the rhyme method of newly generated lyrics.
[0031] A second aspect of an embodiment of the present invention discloses a data processing device for generating lyrics, the device comprising:
[0032] a detection module, configured to detect whether a lyrics generation request is received and obtain a detection result; the lyrics generation request includes L input words; and L is a positive integer greater than or equal to 1;
[0033] a first processing module configured to, when the detection result is yes, process the lyrics generation request using a preset first processing model to obtain first sentence information; the first sentence information includes first sub-sentence information and second sub-sentence information; the second sub-sentence information is inherited from the first sub-sentence information;
[0034] The second processing module is used to process the first word and phrase information to obtain lyrics restriction information; the lyrics restriction information is used to indicate the generation of lyrics.
[0035] As an optional implementation manner, in the second aspect of the embodiment of the present invention, the first processing module includes a first processing submodule, a second processing submodule and a third processing submodule, wherein:
[0036] The first processing submodule is configured to pre-process the lyrics generation request to obtain a target input word; the target input word is strongly correlated with the lyrics;
[0037] The second processing submodule is configured to perform word generation processing on the target input word to obtain the first sub-word sentence information;
[0038] The third processing submodule is configured to perform word generation processing on the first sub-sentence information to obtain the second sub-sentence information.
[0039] As an optional implementation, in the second aspect of the embodiment of the present invention, the first processing submodule pre-processes the lyrics generation request to obtain the target input word in the following manner:
[0040] The L input words are processed using preset word parameter information to obtain candidate word information; the candidate word information includes M candidate words; M is a positive integer greater than or equal to L; the candidate words are associated with the input words;
[0041] The candidate word information is screened to obtain a target input word.
[0042] As an optional implementation manner, in the second aspect of the embodiment of the present invention, the second processing submodule performs word generation processing on the target input word to obtain the first sub-word sentence information in the following specific manner:
[0043] Performing word generation processing on the target input word to obtain first word segment information;
[0044] Determining whether the first word segment information satisfies a word or sentence termination condition, and obtaining a first determination result;
[0045] When the first judgment result is no, performing word generation processing on the first word segment information to obtain second word segment information;
[0046] Using the second word segment information to update the first word segment information, and triggering the determination of whether the first word segment information satisfies a word termination condition, to obtain a first determination result;
[0047] When the first judgment result is yes, the first segment information is determined to be the first sub-sentence information.
[0048] As an optional implementation, in the second aspect of the embodiment of the present invention, the second processing module processes the first word information to obtain the lyrics restriction information in the following manner:
[0049] performing tagging processing on the first word and sentence information to obtain first attribute information; the first attribute information includes first part-of-speech vector information and / or first rhyme information; the first part-of-speech vector information represents the part-of-speech structure of the first word and sentence information;
[0050] Perform format restriction processing on the first attribute information to obtain lyrics restriction information.
[0051] As an optional implementation, in the second aspect of the embodiment of the present invention, the second processing module performs tagging processing on the first word and sentence information to obtain the first attribute information in the following specific manner:
[0052] Performing word segmentation and tagging processing on the first word and sentence information to obtain first word and sentence sequence information;
[0053] Processing the first sentence sequence information using a preset part-of-speech vector model to obtain the first part-of-speech vector information; and / or,
[0054] The first phrase information is processed using a preset homophonic word table to obtain the first rhyme information; the first rhyme information includes first rhyme information and / or first phrase quantity information; the phrase rhyme information represents the rhyme pattern of the lyrics in the first phrase information.
[0055] As an optional implementation, in the second aspect of the embodiment of the present invention, the second processing module performs format restriction processing on the first attribute information to obtain lyrics restriction information in the following manner:
[0056] Processing the first attribute information using a preset format restriction model to obtain second attribute information;
[0057] The second attribute information is processed using a preset part-of-speech vector model to obtain lyrics restriction information; the lyrics restriction information includes lyrics length information and / or second rhyme information; the second rhyme information is used to constrain the rhyme method of newly generated lyrics.
[0058] A third aspect of the present invention discloses another data processing device for generating lyrics, the device comprising:
[0059] a memory storing executable program code;
[0060] a processor coupled to the memory;
[0061] The processor calls the executable program code stored in the memory to execute part or all of the steps in the data processing method for lyrics generation disclosed in the first aspect of the embodiment of the present invention.
[0062] The fourth aspect of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute some or all of the steps in the data processing method for lyrics generation disclosed in the first aspect of the embodiment of the present invention.
[0063] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:
[0064] In an embodiment of the present invention, it is detected whether a lyric generation request is received to obtain a detection result; the lyric generation request includes L input words; L is a positive integer greater than or equal to 1; when the detection result is yes, the lyric generation request is processed using a preset first processing model to obtain first phrase information; the first phrase information includes first sub-phrase information and second sub-phrase information; the second sub-phrase information is inherited from the first sub-phrase information; the first phrase information is processed to obtain lyric restriction information; the lyric restriction information is used to indicate the generation of lyrics. It can be seen that the present invention can obtain lyric restriction information for indicating lyric generation by detecting the lyric generation request and comprehensively processing it using the first processing model, which is beneficial to broaden the source channels for generating lyrics, improve the efficiency of lyric generation, and reduce the cost of lyric generation. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0066] Figure 1 This is a flow chart of a data processing method for generating lyrics disclosed in an embodiment of the present invention;
[0067] Figure 2 This is a flow chart of another data processing method for generating lyrics disclosed in an embodiment of the present invention;
[0068] Figure 3 It is a structural diagram of a data processing device for generating lyrics disclosed in an embodiment of the present invention;
[0069] Figure 4 It is a structural diagram of another data processing device for generating lyrics disclosed in an embodiment of the present invention;
[0070] Figure 5 A schematic structural diagram of another data processing device for generating lyrics disclosed in an embodiment of the present invention. DETAILED DESCRIPTION
[0071] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0072] The terms "first," "second," and so on, in the description and claims of the present invention and the accompanying drawings are used to distinguish between different objects, not to describe a specific order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or device.
[0073] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0074] The present invention discloses a data processing method and device for lyric generation. By detecting lyric generation requests and comprehensively processing them using a first processing model, the method and device can obtain lyric restriction information for instructing lyric generation. This method is beneficial for broadening the source channels for lyric generation, improving lyric generation efficiency, and reducing lyric generation costs. These are described in detail below.
[0075] Example 1
[0076] See also Figure 1 , Figure 1 This is a flow chart of a data processing method for generating lyrics disclosed in an embodiment of the present invention. Figure 1 The data processing method for lyrics generation described is applied to a data processing system, such as a local server or cloud server for data processing management of lyrics generation, etc., which is not limited in the embodiment of the present invention. Figure 1 As shown, the data processing method for generating lyrics may include the following operations:
[0077] 101. Detect whether a lyrics generation request is received and obtain a detection result.
[0078] In the embodiment of the present invention, the lyrics generation request includes L input words.
[0079] In the embodiment of the present invention, the above L is a positive integer greater than or equal to 1.
[0080] 102. When the detection result is yes, the lyrics generation request is processed using a preset first processing model to obtain first phrase information.
[0081] In the embodiment of the present invention, the first sentence information includes first sub-sentence information and second sub-sentence information.
[0082] In the embodiment of the present invention, the second sub-sentence information is inherited from the first sub-sentence information.
[0083] 103. Process the first phrase information to obtain lyrics restriction information.
[0084] In the embodiment of the present invention, the lyrics restriction information is used to instruct the generation of lyrics.
[0085] Optionally, the lyrics restriction information includes M lyrics restriction part-of-speech vectors.
[0086] Optionally, the above M is a positive integer greater than or equal to 2.
[0087] Optionally, the above-mentioned lyrics restricted part-of-speech vector includes lyrics length information, and / or second rhyme information, and / or lyrics part-of-speech sequence information, which is not limited in this embodiment of the present invention.
[0088] Optionally, the order of the elements in the above lyrics restricted part-of-speech vector is lyrics length information, second rhyme information and lyrics part-of-speech sequence information.
[0089] Optionally, the above-mentioned lyrics length information is used to constrain the number of words in each newly generated lyrics.
[0090] Optionally, the above-mentioned lyrics part-of-speech sequence information is used to constrain the part-of-speech of newly generated lyrics.
[0091] Optionally, the above-mentioned part-of-speech situations include the parts of speech of words at different positions in each sentence of the newly generated lyrics.
[0092] In this optional embodiment, as an optional implementation manner, after the first phrase information is processed to obtain lyrics restriction information, the method further includes:
[0093] Processing the first word and sentence information and the lyrics restriction information using the first processing model to obtain second word and sentence information;
[0094] Determine whether the second phrase information satisfies the lyrics generation termination condition, and obtain a generation termination judgment result;
[0095] When the generation termination judgment result is no, the second statement information is processed to obtain the standby restriction information;
[0096] Using the second word and phrase information to update the first word and phrase information;
[0097] The lyrics restriction information is updated using the standby restriction information, and the first processing model is used to process the first word and phrase information and the lyrics restriction information to obtain the second word and phrase information;
[0098] When the generation termination judgment result is yes, the lyrics text information is determined based on the second word and phrase information and the first word and phrase information.
[0099] Optionally, the above lyric text information is used to generate an advertising song.
[0100] Optionally, the above generation termination condition includes the number of words in the text reaching a word count threshold, and / or the number of sentences in the text reaching a sentence count threshold, which is not limited in the embodiment of the present invention.
[0101] Optionally, the above-mentioned word count threshold may be preset or input according to actual needs, which is not limited in the embodiment of the present invention.
[0102] Optionally, the sentence count threshold may be preset or input according to actual needs, which is not limited in the embodiment of the present invention.
[0103] In this optional embodiment, as another optional implementation, before the above-mentioned processing of the lyrics generation request using the preset first processing model to obtain the first phrase information, the method further includes:
[0104] According to the lyrics generation request, a first processing model is screened out from the preset to-be-selected processing models.
[0105] Optionally, the above-mentioned first processing model is a GPT-2-based model.
[0106] Optionally, the above-mentioned processing models to be selected correspond to lyrics of different music styles.
[0107] It can be seen that the data processing method for lyric generation described in the embodiment of the present invention can obtain lyric restriction information for indicating lyric generation by detecting the lyric generation request and comprehensively processing it using the first processing model, which is beneficial to broaden the source channels of materials for generating lyrics, improve the efficiency of lyric generation, and reduce the cost of lyric generation.
[0108] In an optional embodiment, in step 102, the lyrics generation request is processed using a preset first processing model to obtain first phrase information, including:
[0109] Preprocess the lyrics generation request to obtain the target input word; the target input word is strongly related to the lyrics;
[0110] Perform word generation processing on the target input word to obtain the first sub-word sentence information;
[0111] Perform word generation processing on the first sub-sentence information to obtain second sub-sentence information.
[0112] Optionally, the semantics of the second sub-sentence information is continuous with the semantics of the first sub-sentence information.
[0113] Optionally, the second word and sentence information is obtained by processing the first sub-word and sentence information using the first processing model.
[0114] It can be seen that the data processing method for lyric generation described in the embodiment of the present invention can obtain the first sub-sentence information and the second sub-sentence information through comprehensive processing such as preprocessing of lyric generation requests and word generation processing, which is beneficial to broaden the source channels of materials for generating lyrics, improve the efficiency of lyrics generation, and reduce the cost of lyrics generation.
[0115] In another optional embodiment, the above-mentioned pre-processing of the lyrics generation request to obtain the target input word includes:
[0116] L input words are processed using preset word parameter information to obtain candidate word information; the candidate word information includes M candidate words; M is a positive integer greater than or equal to L; the candidate words are associated with the input words;
[0117] The candidate word information is filtered to obtain the target input word.
[0118] Optionally, each of the above input words will generate K candidate words.
[0119] Optionally, the above K is associated with the above word parameter information.
[0120] Optionally, the above-mentioned candidate words are associated with attention scores obtained by attention layer processing in the first processing model.
[0121] It can be seen that the data processing method for lyric generation described in the embodiment of the present invention can use word parameter information to process input words to generate alternative words, and obtain the target input words by screening the alternative words, which is conducive to broadening the source channels of materials for generating lyrics, improving the efficiency of lyrics generation, and reducing the cost of lyrics generation.
[0122] In yet another optional embodiment, the above-mentioned word generation process is performed on the target input word to obtain the first sub-sentence information, including:
[0123] Performing word generation processing on the target input word to obtain first word segment information;
[0124] Determine whether the first segment information satisfies the sentence termination condition, and obtain a first determination result;
[0125] When the first judgment result is no, performing word generation processing on the first word segment information to obtain second word segment information;
[0126] The first segment information is updated using the second segment information, and a first judgment result is obtained by triggering execution to determine whether the first segment information satisfies a sentence termination condition;
[0127] When the first judgment result is yes, the first segment information is determined to be the first sub-sentence information.
[0128] Optionally, the above-mentioned phrase termination condition is related to the number of words in the phrase.
[0129] Optionally, the updating process of the first segment information is to concatenate the second segment information with the first segment information.
[0130] It can be seen that the data processing method for lyric generation described in the embodiment of the present invention can obtain the first sub-sentence information through comprehensive processing such as word generation processing, judgment processing and update processing of the target input word, which is more conducive to broadening the source channels of materials for generating lyrics, improving the efficiency of lyrics generation, and reducing the cost of lyrics generation.
[0131] Example 2
[0132] See also Figure 2 , Figure 2 This is a flow chart of another data processing method for generating lyrics disclosed in an embodiment of the present invention. Figure 2 The data processing method for lyrics generation described is applied to a data processing system, such as a local server or cloud server for data processing management of lyrics generation, etc., which is not limited in the embodiment of the present invention. Figure 2 As shown, the data processing method for generating lyrics may include the following operations:
[0133] 201. Detect whether a lyrics generation request is received and obtain a detection result.
[0134] 202. When the detection result is yes, the lyrics generation request is processed using a preset first processing model to obtain first phrase information.
[0135] 203. Perform tagging processing on the first word and sentence information to obtain first attribute information.
[0136] In an embodiment of the present invention, the first attribute information includes first part-of-speech vector information and / or first rhyme information.
[0137] In the embodiment of the present invention, the first part-of-speech vector information represents the part-of-speech structure of the first word and sentence information.
[0138] 204. Perform format restriction processing on the first attribute information to obtain lyrics restriction information.
[0139] In the embodiment of the present invention, for the specific technical details and technical terminology of steps 201 and 202, reference can be made to the detailed description of steps 101 and 102 in the first embodiment, which will not be repeated in detail in the embodiment of the present invention.
[0140] Optionally, the above-mentioned part-of-speech structure includes part-of-speech property information and / or character position information, which is not limited in the embodiment of the present invention.
[0141] Optionally, the above-mentioned part-of-speech property information includes verb-complement compound words, and / or cardinal numbers, and / or existential sentences, and / or foreign words, and / or prepositions, and / or subordinating conjunctions, and / or adjectives, and / or ordinal numbers, and / or comparative adjectives, and / or higher-level adjectives, and / or list markers, and / or prepositive determiners, and / or possessive markers, and / or personal pronouns, and / or adverbs, and / or comparative adverbs, and / or higher-level adverbs, and / or particles, and / or symbols, and / or infinitive markers, and / or possessive pronouns, which are not limited in this embodiment of the present invention.
[0142] Optionally, each character in the above-mentioned first phrase information corresponds to a part-of-speech property information.
[0143] It can be seen that the data processing method for lyric generation described in the embodiment of the present invention can obtain first phrase information by detecting the lyric generation request and processing it using the first processing model, and then obtain lyric restriction information for indicating lyric generation through comprehensive processing such as annotation processing and format restriction processing. This is conducive to broadening the source channels for generating lyrics, improving the efficiency of lyric generation, and reducing the cost of lyric generation.
[0144] In an optional embodiment, the first word and sentence information is annotated in step 203 to obtain first attribute information, including:
[0145] Performing word segmentation and tagging processing on the first word and sentence information to obtain first word and sentence sequence information;
[0146] Processing the first sentence sequence information using a preset part-of-speech vector model to obtain first part-of-speech vector information; and / or,
[0147] The first phrase information is processed using a preset homophonic word table to obtain first phrase rhyme information; the first phrase rhyme information includes first rhyme information and / or first phrase quantity information; the phrase rhyme information represents the rhyme pattern of the lyrics in the first phrase information.
[0148] Optionally, the first rhyme information includes single rhyme information, and / or double rhyme information, and / or triple rhyme information, and / or rhyme length information, which is not limited in this embodiment of the present invention.
[0149] Optionally, the above-mentioned single rhyme information indicates that the pinyin of the last character in the two phrase information has the same rhyme pattern.
[0150] Optionally, the double rhyme information indicates that the pinyin of the last two characters in the two phrases are consistent in rhyme.
[0151] Optionally, the three-rhyme information indicates that the pinyin of the last three characters in the two phrase information are consistent in rhyme.
[0152] Optionally, the rhyme length information includes the number of characters in each line of lyrics that rhyme in the same way.
[0153] Optionally, the above-mentioned word segmentation tagging of the first word and sentence information is performed using a part-of-speech tagging tool.
[0154] Optionally, the above-mentioned part-of-speech tagging tool includes JIEBA, and / or LAC, and / or THULAC, and / or LTP, which is not limited in this embodiment of the present invention.
[0155] Optionally, the above-mentioned homophonic word list is a domain segmentation word list based on the xpinyin library.
[0156] Optionally, the first phrase quantity information includes first sub-phrase quantity information and / or second sub-phrase quantity information, which is not limited in the embodiment of the present invention.
[0157] Optionally, the first sub-sentence quantity information is used to represent the number of characters in the first sub-sentence information.
[0158] Optionally, the second sub-sentence quantity information is used to represent the number of characters in the second sub-sentence information.
[0159] It can be seen that the data processing method for lyric generation described in the embodiment of the present invention can perform word segmentation and tagging processing on the first word and sentence information, and then obtain the first word rhyme information through further processing of the part-of-speech vector model and the rhyme word table, which is more conducive to broadening the source channels of material for generating lyrics, improving the efficiency of lyrics generation, and reducing the cost of lyrics generation.
[0160] In another optional embodiment, the format restriction processing is performed on the first attribute information to obtain lyrics restriction information, including:
[0161] Processing the first attribute information using a preset format restriction model to obtain second attribute information;
[0162] The second attribute information is processed using a preset part-of-speech vector model to obtain lyrics restriction information; the lyrics restriction information includes lyrics length information and / or second rhyme information; the second rhyme information is used to constrain the rhyme method of the newly generated lyrics.
[0163] Optionally, the above-mentioned first attribute information includes several first word and phrase attribute information.
[0164] Optionally, the first phrase attribute information includes predicted phrase length information, and / or predicted phrase rhyme information, and / or predicted phrase part-of-speech vector information, which is not limited in the embodiment of the present invention.
[0165] In this optional embodiment, as an optional implementation, the specific manner of processing the first attribute information using the preset format restriction model to obtain the second attribute information is as follows:
[0166] Performing splicing and conversion processing on the first attribute information to obtain standby attribute information;
[0167] The above-mentioned attribute information to be used is processed using a preset format restriction model to obtain first phrase attribute information.
[0168] Optionally, the above-mentioned format restriction model includes a neural network model based on LSTM, and / or a neural network model based on GRU, and / or a neural network model based on RNN, and / or a neural network model based on MOGRIFIER LSTM, and / or a neural network model based on Elman Network, which is not limited in the embodiment of the present invention.
[0169] Optionally, the above-mentioned lyrics restriction information includes lyrics length information, and / or second rhyme information, and / or predicted lyrics sub-part-of-speech sequence information, which is not limited in the embodiment of the present invention.
[0170] Optionally, the above-mentioned predicted lyrics sub-part-of-speech sequence information represents the part-of-speech information of each character in each line of lyrics.
[0171] Optionally, the structural order of the data information in the above lyrics restriction information is [lyrics length information, second rhyme information, predicted lyrics sub-part-of-speech sequence information].
[0172] It can be seen that the data processing method for lyric generation described in the embodiment of the present invention can use the format restriction model and the part-of-speech vector model to comprehensively process the first attribute information to obtain lyric restriction information, which is more conducive to broadening the source channels for generating lyrics, improving the efficiency of lyrics generation, and reducing the cost of lyrics generation.
[0173] Example 3
[0174] See also Figure 3 , Figure 3 This is a structural diagram of a data processing device for generating lyrics disclosed in an embodiment of the present invention. Figure 3 The described device can be applied to a data processing system, such as a local server or cloud server for data processing and management of lyrics generation, and the embodiment of the present invention does not limit this. Figure 3 As shown, the device may include:
[0175] The detection module 301 is configured to detect whether a lyrics generation request is received and obtain a detection result; the lyrics generation request includes L input words; L is a positive integer greater than or equal to 1;
[0176] The first processing module 302 is configured to, when the detection result is yes, process the lyrics generation request using a preset first processing model to obtain first sentence information; the first sentence information includes first sub-sentence information and second sub-sentence information; the second sub-sentence information is inherited from the first sub-sentence information;
[0177] The second processing module 303 is used to process the first word and phrase information to obtain lyrics restriction information; the lyrics restriction information is used to indicate the generation of lyrics.
[0178] It can be seen that implementation Figure 3 The data processing device described for lyric generation can obtain lyric restriction information for indicating lyric generation by detecting lyric generation requests and comprehensively processing them using the first processing model, which is conducive to broadening the source channels for generating lyrics, improving the efficiency of lyric generation, and reducing the cost of lyric generation.
[0179] In another optional embodiment, Figure 4 As shown, the first processing module 302 includes a first processing submodule 3021, a second processing submodule 3022 and a third processing submodule 3023, wherein:
[0180] The first processing submodule 3021 is used to pre-process the lyrics generation request to obtain a target input word; the target input word is strongly related to the lyrics;
[0181] The second processing submodule 3022 is used to perform word generation processing on the target input word to obtain first sub-word sentence information;
[0182] The third processing submodule 3023 is configured to perform word generation processing on the first sub-sentence information to obtain second sub-sentence information.
[0183] It can be seen that implementation Figure 4 The described data processing device for lyric generation can obtain the first sub-sentence information and the second sub-sentence information through comprehensive processing such as pre-processing of lyric generation requests and word generation processing, which is conducive to broadening the source channels of materials for generating lyrics, improving the efficiency of lyric generation, and reducing the cost of lyric generation.
[0184] In another optional embodiment, Figure 4 As shown, the first processing submodule 3021 pre-processes the lyrics generation request to obtain the target input word in the following manner:
[0185] L input words are processed using preset word parameter information to obtain candidate word information; the candidate word information includes M candidate words; M is a positive integer greater than or equal to L; the candidate words are associated with the input words;
[0186] The candidate word information is filtered to obtain the target input word.
[0187] It can be seen that implementation Figure 4 The data processing device described for lyric generation can use word parameter information to process input words to generate alternative words, and obtain target input words by screening the alternative words, which is conducive to broadening the source channels of materials for generating lyrics, improving the efficiency of lyrics generation, and reducing the cost of lyrics generation.
[0188] In another optional embodiment, Figure 4 As shown, the second processing submodule 3022 performs word generation processing on the target input word to obtain the first sub-word sentence information in the following manner:
[0189] Performing word generation processing on the target input word to obtain first word segment information;
[0190] Determine whether the first segment information satisfies the sentence termination condition, and obtain a first determination result;
[0191] When the first judgment result is no, performing word generation processing on the first word segment information to obtain second word segment information;
[0192] The first segment information is updated using the second segment information, and a first judgment result is obtained by triggering execution to determine whether the first segment information satisfies a sentence termination condition;
[0193] When the first judgment result is yes, the first segment information is determined to be the first sub-sentence information.
[0194] It can be seen that implementation Figure 4 The described data processing device for lyric generation can obtain the first sub-sentence information through comprehensive processing such as word generation processing, judgment processing and update processing of the target input word, which is more conducive to broadening the source channels of materials for generating lyrics, improving the efficiency of lyrics generation and reducing the cost of lyrics generation.
[0195] In another optional embodiment, Figure 4 As shown, the second processing module 303 processes the first phrase information to obtain lyrics restriction information in the following manner:
[0196] Performing tagging processing on the first word and sentence information to obtain first attribute information; the first attribute information includes first part-of-speech vector information and / or first rhyme information; the first part-of-speech vector information represents the part-of-speech structure of the first word and sentence information;
[0197] Perform format restriction processing on the first attribute information to obtain lyrics restriction information.
[0198] It can be seen that implementation Figure 4 The data processing device described for lyric generation can obtain first phrase information by detecting a lyric generation request and processing it using a first processing model, and then obtain lyric restriction information for indicating lyric generation through comprehensive processing such as annotation processing and format restriction processing. This is conducive to broadening the source channels for generating lyrics, improving the efficiency of lyric generation, and reducing the cost of lyric generation.
[0199] In another optional embodiment, Figure 4 As shown, the second processing module 303 performs tagging processing on the first word and sentence information to obtain the first attribute information in the following manner:
[0200] Performing word segmentation and tagging processing on the first word and sentence information to obtain first word and sentence sequence information;
[0201] Processing the first sentence sequence information using a preset part-of-speech vector model to obtain first part-of-speech vector information; and / or,
[0202] The first phrase information is processed using a preset homophonic word table to obtain first phrase rhyme information; the first phrase rhyme information includes first rhyme information and / or first phrase quantity information; the phrase rhyme information represents the rhyme pattern of the lyrics in the first phrase information.
[0203] It can be seen that implementation Figure 4 The described data processing device for lyric generation can perform word segmentation and tagging on the first word and sentence information, and then obtain the first word rhyme information through further processing of the part-of-speech vector model and the rhyme word table, which is more conducive to broadening the source channels for generating lyrics, improving the efficiency of lyrics generation, and reducing the cost of lyrics generation.
[0204] In another optional embodiment, Figure 4 As shown, the second processing module 303 performs format restriction processing on the first attribute information to obtain lyrics restriction information in the following manner:
[0205] Processing the first attribute information using a preset format restriction model to obtain second attribute information;
[0206] The second attribute information is processed using a preset part-of-speech vector model to obtain lyrics restriction information; the lyrics restriction information includes lyrics length information and / or second rhyme information; the second rhyme information is used to constrain the rhyme method of the newly generated lyrics.
[0207] It can be seen that implementation Figure 4 The described data processing device for lyric generation can use the format restriction model and the part-of-speech vector model to comprehensively process the first attribute information to obtain lyric restriction information, which is more conducive to broadening the source channels for generating lyrics, improving the efficiency of lyric generation, and reducing the cost of lyric generation.
[0208] Example 4
[0209] See also Figure 5 , Figure 5 This is a structural diagram of another data processing device for generating lyrics disclosed in an embodiment of the present invention. Figure 5 The described device can be applied to a data processing system, such as a local server or cloud server for data processing and management of lyrics generation, and the embodiment of the present invention does not limit this. Figure 5 As shown, the device may include:
[0210] A memory 401 storing executable program code;
[0211] a processor 402 coupled to the memory 401;
[0212] The processor 402 calls the executable program code stored in the memory 401 to execute the steps of the data processing method for generating lyrics described in the first or second embodiment.
[0213] Example 5
[0214] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute the steps of the data processing method for generating lyrics described in the first or second embodiment.
[0215] Example 6
[0216] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute the steps of the data processing method for lyric generation described in embodiment 1 or embodiment 2.
[0217] The device embodiments described above are merely illustrative. Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.
[0218] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by means of hardware. Based on this understanding, the above technical solution, in essence, or the portion that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, including a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.
[0219] Finally, it should be noted that the data processing method and device for lyric generation disclosed in the embodiments of the present invention are only preferred embodiments of the present invention, and are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. A data processing method for generating lyrics, characterized in that: The method comprises: Detecting whether a lyrics generation request is received and obtaining a detection result; the lyrics generation request includes L input words; L is a positive integer greater than or equal to 1; When the detection result is yes, the lyrics generation request is processed using a preset first processing model to obtain first sentence information; the first sentence information includes first sub-sentence information and second sub-sentence information; the second sub-sentence information is inherited from the first sub-sentence information; Processing the first word and phrase information to obtain lyrics restriction information; the lyrics restriction information is used to indicate the generation of lyrics; Furthermore, the processing of the first phrase information to obtain lyrics restriction information includes: performing tagging processing on the first word and sentence information to obtain first attribute information; the first attribute information includes first part-of-speech vector information and / or first rhyme information; the first part-of-speech vector information represents the part-of-speech structure of the first word and sentence information; performing format restriction processing on the first attribute information to obtain lyrics restriction information; Furthermore, the tagging process for the first word and sentence information to obtain first attribute information includes: Performing word segmentation and tagging processing on the first word and sentence information to obtain first word and sentence sequence information; Processing the first sentence sequence information using a preset part-of-speech vector model to obtain the first part-of-speech vector information; and / or, The first phrase information is processed using a preset homonymous word table to obtain the first word rhyme information; the first word rhyme information includes first rhyme information and / or first phrase quantity information; the phrase rhyme information represents the rhyme pattern of the lyrics in the first phrase information; the first rhyme information includes one or more of single rhyme information, double rhyme information, triple rhyme information and rhyme length information; the rhyme length information includes the number of characters in each sentence of lyrics that have the same rhyme pattern.
2. The data processing method for lyrics generation according to claim 1, characterized in that: The step of processing the lyrics generation request using a preset first processing model to obtain first phrase information includes: Preprocessing the lyrics generation request to obtain a target input word; the target input word is strongly related to the lyrics; Performing word generation processing on the target input word to obtain the first sub-word sentence information; Perform word generation processing on the first sub-sentence information to obtain the second sub-sentence information.
3. The data processing method for lyrics generation according to claim 2, characterized in that: The pre-processing of the lyrics generation request to obtain target input words includes: The L input words are processed using preset word parameter information to obtain candidate word information; the candidate word information includes M candidate words; M is a positive integer greater than or equal to L; the candidate words are associated with the input words; The candidate word information is screened to obtain a target input word.
4. The data processing method for lyrics generation according to claim 2, characterized in that: The performing word generation processing on the target input word to obtain the first sub-sentence information includes: Performing word generation processing on the target input word to obtain first word segment information; Determining whether the first word segment information satisfies a word or sentence termination condition, and obtaining a first determination result; When the first judgment result is no, performing word generation processing on the first word segment information to obtain second word segment information; Using the second word segment information to update the first word segment information, and triggering the determination of whether the first word segment information satisfies a word termination condition, to obtain a first determination result; When the first judgment result is yes, the first segment information is determined to be the first sub-sentence information.
5. The data processing method for lyrics generation according to claim 1, characterized in that: The performing format restriction processing on the first attribute information to obtain lyrics restriction information includes: Processing the first attribute information using a preset format restriction model to obtain second attribute information; The second attribute information is processed using a preset part-of-speech vector model to obtain lyrics restriction information; the lyrics restriction information includes lyrics length information and / or second rhyme information; the second rhyme information is used to constrain the rhyme method of newly generated lyrics.
6. A data processing device for generating lyrics, characterized in that: The device comprises: a detection module, configured to detect whether a lyrics generation request is received and obtain a detection result; the lyrics generation request includes L input words; and L is a positive integer greater than or equal to 1; a first processing module configured to, when the detection result is yes, process the lyrics generation request using a preset first processing model to obtain first sentence information; the first sentence information includes first sub-sentence information and second sub-sentence information; the second sub-sentence information is inherited from the first sub-sentence information; A second processing module is configured to process the first word and phrase information to obtain lyrics restriction information; the lyrics restriction information is used to indicate the generation of lyrics; Furthermore, the second processing module processes the first phrase information to obtain lyrics restriction information in the following manner: performing tagging processing on the first word and sentence information to obtain first attribute information; the first attribute information includes first part-of-speech vector information and / or first rhyme information; the first part-of-speech vector information represents the part-of-speech structure of the first word and sentence information; performing format restriction processing on the first attribute information to obtain lyrics restriction information; Furthermore, the second processing module performs tagging processing on the first word and sentence information to obtain the first attribute information in the following specific manner: Performing word segmentation and tagging processing on the first word and sentence information to obtain first word and sentence sequence information; Processing the first sentence sequence information using a preset part-of-speech vector model to obtain the first part-of-speech vector information; and / or, The first phrase information is processed using a preset homonymous word table to obtain the first word rhyme information; the first word rhyme information includes first rhyme information and / or first phrase quantity information; the phrase rhyme information represents the rhyme pattern of the lyrics in the first phrase information; the first rhyme information includes one or more of single rhyme information, double rhyme information, triple rhyme information and rhyme length information; the rhyme length information includes the number of characters in each sentence of lyrics that have the same rhyme pattern.
7. A data processing device for generating lyrics, characterized in that: The device comprises: a memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the data processing method for lyrics generation according to any one of claims 1 to 5.
8. A computer storable medium, characterized in that The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the data processing method for lyrics generation according to any one of claims 1 to 5.
Citation Information
Patent Citations
Neural network-based lyrics generation method, device, apparatus, and storage medium
CN109471951A
Lyric generation method, lyric generation model training method, lyric generation model training device and electronic equipment
CN113591472A