Lyric sentence segmentation method and device, storage medium and program product
By obtaining the number of words in the lyrics and sentences and using the lyrics and sentence breaking model to process, identifying and breaking lyrics and sentences without breaking, the problem of lyrics and sentences is solved, and the accuracy of lyrics and sentence breaking is improved, especially in the lyrics with rhyme characteristics.
Patent Information
- Application Number
- CN202411327127.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-01-10
AI Technical Summary
In audio playback applications, lyrics uploaded by users may not be broken, resulting in confusion in the lyrics display, and it is difficult for the prior art to effectively identify and process lyrics that have not broken.
By obtaining the number of words of each lyric sentence in the lyrics, we determine the lyric sentences that meet specific conditions, and use the lyric sentence breaking model to break sentences based on the text content information and pronunciation information, including word segmentation, pinyin, position and word feature information processing to generate sentence breaking information To make the lyrics and sentences a breakdown.
It can timely identify and break lyrics that have not broken verses, prevent lyrics from being confused, improve the accuracy of breaking sentences, especially through pronunciation information processing, improve the accuracy of breaking sentences with rhyme characteristics.
Smart Images

Figure CN119294395A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of Internet technology, and in particular to a method, device, storage medium and program product for segmenting lyrics. Background Art
[0002] Audio playback applications generally provide users with a song upload function, where users can upload songs in the application. Users can upload lyrics when uploading songs, or other users can upload lyrics for the song.
[0003] Before uploading lyrics, users need to edit them. Lyrics are generally composed of multiple verses. When editing lyrics, users need to segment the lyrics in a certain way. For example, they can segment with punctuation marks or insert specified segmentation marks to segment.
[0004] When editing lyrics, users sometimes forget to punctuate the lyrics. There may be no punctuation in the entire lyrics, or there may be no punctuation in a part of the lyrics. In this way, after the application or the backend server obtains the lyrics uploaded by the user, it will mistakenly think that the unpunctuated content is a lyric sentence. This will cause the lyrics to be displayed confusingly during the song playback. Summary of the invention
[0005] In order to solve the related technical problems, the present disclosure provides a method, device, storage medium and program product for lyric segmentation. The technical solution is as follows:
[0006] In a first aspect, a method for segmenting lyrics is provided, the method comprising:
[0007] Get the number of words in each lyric sentence of the target song;
[0008] Based on the number of words in each of the lyrics, determining a first lyrics sentence that meets a first super-word condition;
[0009] Inputting the first lyric sentence into a lyric sentence segmentation model, extracting text content information and pronunciation information of the first lyric sentence by the lyric sentence segmentation model, and determining the sentence segmentation information of the first lyric sentence based on the text content information and the pronunciation information;
[0010] Based on the segmentation information of the first lyric sentence, the first lyric sentence is segmented to obtain a plurality of lyric sentences after segmentation.
[0011] In a possible implementation, determining the first lyric sentence satisfying the first super-word condition based on the number of words in each lyric sentence includes:
[0012] Determine the standard word count of the first lyric sentence of the target song based on the word count of all the lyric sentences of the target song;
[0013] The sum of the standard number of words in the first lyric sentence and the preset number of words is determined as the first word count threshold;
[0014] A lyric sentence whose word count is greater than the first word count threshold and a preset second word count threshold is determined as the first lyric sentence that meets the first super-word condition.
[0015] In a possible implementation, the lyrics segmentation model includes a word segmentation sub-model, a pinyin sub-model, a position sub-model, a word feature sub-model and a sentence segmentation model;
[0016] The extracting text content information and pronunciation information of the first lyrics sentence from the lyrics segmentation model, and determining the segmentation information of the first lyrics sentence based on the text content information and the pronunciation information, includes:
[0017] Using the word segmentation sub-model, segment the first lyric sentence to obtain at least one word included in the first lyric sentence;
[0018] Determining the pinyin feature information corresponding to each word in the at least one word through the pinyin sub-model;
[0019] Determining the position feature information corresponding to each word in the first lyrics sentence by using the position sub-model;
[0020] Determining the word feature information corresponding to each word through the word feature sub-model;
[0021] The sentence segmentation model is used to process the pinyin feature information, position feature information and word feature information corresponding to each word to obtain the sentence segmentation information of the first lyric sentence.
[0022] In a possible implementation, the sentence segmentation model is used to process the pinyin feature information, the position feature information, and the word feature information corresponding to each word to obtain the sentence segmentation information of the first lyrics sentence, including:
[0023] Concatenate the pinyin feature information, position feature information and word feature information corresponding to each word to obtain the combined feature information corresponding to each word;
[0024] The combined feature information corresponding to each word is input into a sentence segmentation model to obtain the sentence segmentation information of the first lyric sentence output by the sentence segmentation model.
[0025] In a possible implementation, the lyrics segmentation model includes a pinyin sub-model, a position sub-model, a character feature sub-model and a sentence segmentation model;
[0026] The extracting text content information and pronunciation information of the first lyrics sentence from the lyrics segmentation model, and determining the segmentation information of the first lyrics sentence based on the text content information and the pronunciation information, includes:
[0027] Determine the pinyin feature information corresponding to each word in the first lyrics sentence by using the pinyin sub-model;
[0028] Determining the position feature information corresponding to each word in the first lyrics sentence by using the position sub-model;
[0029] Determining the character feature information corresponding to each character through the character feature sub-model;
[0030] The sentence segmentation model is used to process the pinyin feature information, position feature information and character feature information corresponding to each character to obtain the sentence segmentation information of the first lyrics sentence.
[0031] In a possible implementation, the method further includes:
[0032] Acquire at least one lyrics training sample and at least one poetry training sample, wherein each lyrics training sample includes a sample lyrics sentence and corresponding sample sentence segmentation information, and each poetry training sample includes a sample poetry sentence and corresponding sample sentence segmentation information, wherein the sample lyrics sentence is obtained by merging multiple consecutive lyrics sentences in the sample lyrics, and the sample poetry sentence is obtained by merging multiple consecutive poetry sentences in the sample poetry;
[0033] Based on the at least one lyrics training sample and the at least one poetry training sample, the lyrics segmentation model to be trained is trained to obtain the lyrics segmentation model that has completed the training.
[0034] In a possible implementation, the sentence segmentation information includes a character sequence, each character in the character sequence corresponds to a word in the first lyric sentence, and each character in the character sequence represents position information of the corresponding word.
[0035] In a possible implementation, after segmenting the first lyric sentence based on the segmentation information of the first lyric sentence to obtain a plurality of segmented lyric sentences, the method further includes:
[0036] The first lyric sentence in the lyrics of the target song is replaced with the multiple lyric sentences after the segmentation to obtain updated lyrics of the target song.
[0037] In a possible implementation, obtaining the number of words in each lyric sentence of the target song includes:
[0038] Obtaining lyrics of the target song;
[0039] Removing the lyrics header from the lyrics to obtain processed lyrics, wherein the lyrics header is other content in the lyrics except the lyrics;
[0040] In the processed lyrics, the number of words in each lyric sentence is obtained.
[0041] In a possible implementation, after segmenting the first lyric sentence based on the segmentation information of the first lyric sentence to obtain a plurality of segmented lyric sentences, the method further includes:
[0042] Determine a second lyric sentence satisfying a second super-word condition among the multiple lyric sentences after the sentence segmentation;
[0043] Inputting the second lyrics sentence into the lyrics segmentation model, extracting text content information and pronunciation information of the second lyrics sentence by the lyrics segmentation model, and determining the segmentation information of the second lyrics sentence based on the text content information and the pronunciation information;
[0044] Based on the segmentation information of the second lyric sentence, the second lyric sentence is segmented to obtain a plurality of lyric sentences after segmentation.
[0045] In a possible implementation, the second super-word condition includes at least one of the following conditions:
[0046] The word count is greater than a first word count threshold and a preset second word count threshold, wherein the first word count threshold is the sum of a standard word count of the first lyric sentence and a preset word count, and the standard word count of the first lyric sentence is determined based on the word count of each lyric sentence in the target song including the first lyric sentence;
[0047] The word count is greater than a standard word count of a second lyric sentence, where the standard word count of the second lyric sentence is determined based on the word count of each other lyric sentence in the target song except the first lyric sentence;
[0048] The number of words is greater than the standard number of words in the third lyric sentence, and the standard number of words in the third lyric sentence is determined based on the number of words in each lyric sentence in the original song corresponding to the target song.
[0049] In a second aspect, a device for segmenting lyrics is provided, the device comprising:
[0050] An acquisition module, used to acquire the number of words in each lyric sentence of the target song;
[0051] A determination module is used to determine a first lyric sentence that meets a first super-word condition based on the number of words in each lyric sentence; input the first lyric sentence into a lyric sentence segmentation model, extract text content information and pronunciation information of the first lyric sentence by the lyric sentence segmentation model, and determine the sentence segmentation information of the first lyric sentence based on the text content information and the pronunciation information;
[0052] The segmentation module is used to segment the first lyric sentence based on the segmentation information of the first lyric sentence to obtain a plurality of lyric sentences after segmentation.
[0053] In a possible implementation manner, the determining module is used to:
[0054] Determine the standard word count of the first lyric sentence of the target song based on the word count of all the lyric sentences of the target song;
[0055] The sum of the standard number of words in the first lyric sentence and the preset number of words is determined as the first word count threshold;
[0056] A lyric sentence whose word count is greater than the first word count threshold and a preset second word count threshold is determined as the first lyric sentence that meets the first super-word condition.
[0057] In a possible implementation, the lyrics segmentation model includes a word segmentation sub-model, a pinyin sub-model, a position sub-model, a word feature sub-model and a sentence segmentation model;
[0058] The determining module is used to:
[0059] Using the word segmentation sub-model, segment the first lyric sentence to obtain at least one word included in the first lyric sentence;
[0060] Determining the pinyin feature information corresponding to each word in the at least one word through the pinyin sub-model;
[0061] Determining the position feature information corresponding to each word in the first lyrics sentence by using the position sub-model;
[0062] Determining the word feature information corresponding to each word through the word feature sub-model;
[0063] The sentence segmentation model is used to process the pinyin feature information, position feature information and word feature information corresponding to each word to obtain the sentence segmentation information of the first lyrics sentence.
[0064] In a possible implementation manner, the determining module is used to:
[0065] Concatenate the pinyin feature information, position feature information and word feature information corresponding to each word to obtain the combined feature information corresponding to each word;
[0066] The combined feature information corresponding to each word is input into a sentence segmentation model to obtain the sentence segmentation information of the first lyric sentence output by the sentence segmentation model.
[0067] In a possible implementation, the lyrics segmentation model includes a pinyin sub-model, a position sub-model, a character feature sub-model and a sentence segmentation model;
[0068] The determining module is used to:
[0069] Determine the pinyin feature information corresponding to each word in the first lyrics sentence by using the pinyin sub-model;
[0070] Determining the position feature information corresponding to each word in the first lyrics sentence by using the position sub-model;
[0071] Determining the character feature information corresponding to each character through the character feature sub-model;
[0072] The sentence segmentation model is used to process the pinyin feature information, position feature information and character feature information corresponding to each character to obtain the sentence segmentation information of the first lyrics sentence.
[0073] In a possible implementation, the device further includes a training module, which is used to:
[0074] Acquire at least one lyrics training sample and at least one poetry training sample, wherein each lyrics training sample includes a sample lyrics sentence and corresponding sample sentence segmentation information, and each poetry training sample includes a sample poetry sentence and corresponding sample sentence segmentation information, wherein the sample lyrics sentence is obtained by merging multiple consecutive lyrics sentences in the sample lyrics, and the sample poetry sentence is obtained by merging multiple consecutive poetry sentences in the sample poetry;
[0075] Based on the at least one lyrics training sample and the at least one poetry training sample, the lyrics segmentation model to be trained is trained to obtain the lyrics segmentation model that has completed the training.
[0076] In a possible implementation, the sentence segmentation information includes a character sequence, each character in the character sequence corresponds to a word in the first lyric sentence, and each character in the character sequence represents position information of the corresponding word.
[0077] In a possible implementation manner, the device further includes a replacement module, configured to:
[0078] The first lyric sentence in the lyrics of the target song is replaced with the multiple lyric sentences after the segmentation to obtain updated lyrics of the target song.
[0079] In a possible implementation, the acquisition module is used to:
[0080] Obtaining lyrics of the target song;
[0081] Removing the lyrics header from the lyrics to obtain processed lyrics, wherein the lyrics header is other content in the lyrics except the lyrics;
[0082] In the processed lyrics, the number of words in each lyric sentence is obtained.
[0083] In a possible implementation, the device further includes a secondary sentence segmentation module, which is used to:
[0084] Determine a second lyric sentence satisfying a second super-word condition among the multiple lyric sentences after the sentence segmentation;
[0085] Inputting the second lyrics sentence into the lyrics segmentation model, extracting text content information and pronunciation information of the second lyrics sentence by the lyrics segmentation model, and determining the segmentation information of the second lyrics sentence based on the text content information and the pronunciation information;
[0086] Based on the segmentation information of the second lyric sentence, the second lyric sentence is segmented to obtain a plurality of lyric sentences after segmentation.
[0087] In a possible implementation manner, the second super-word condition includes at least one of the following conditions:
[0088] The word count is greater than a first word count threshold and a preset second word count threshold, wherein the first word count threshold is the sum of a standard word count of the first lyric sentence and a preset word count, and the standard word count of the first lyric sentence is determined based on the word count of each lyric sentence in the target song including the first lyric sentence;
[0089] The word count is greater than a standard word count of a second lyric sentence, where the standard word count of the second lyric sentence is determined based on the word count of each other lyric sentence in the target song except the first lyric sentence;
[0090] The number of words is greater than the standard number of words in the third lyric sentence, and the standard number of words in the third lyric sentence is determined based on the number of words in each lyric sentence in the original song corresponding to the target song.
[0091] In a third aspect, a computer device is provided, comprising a memory and a processor, wherein the memory is used to store computer instructions, and the processor executes the computer instructions stored in the memory so that the computer device executes the method provided by the first aspect and its possible implementation methods.
[0092] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program code. When the computer program code is executed by a computer device, the computer device executes the method provided by the first aspect and its possible implementation methods.
[0093] In a fifth aspect, a computer program product is provided. The computer program product includes a computer program code. When the computer program code is executed by a computer device, the computer device executes the method provided by the first aspect and its possible implementation methods.
[0094] In the present disclosure, lyrics with super words are identified in the lyrics, and such lyrics are considered to be lyrics that may have unpunctuated problems. Then, the machine learning model punctuates the lyrics based on the text content information and pronunciation information of the first lyrics. In this way, lyrics that have forgotten to be punctuated in the database can be found in time, and the lyrics can be punctuated in time. In the subsequent song playback process, the correct lyrics that have been punctuated can be used for display. Thereby, the lyrics display confusion can be prevented. In addition, because the lyrics of the song generally have certain rhyme characteristics, punctuation based on pronunciation information can improve the accuracy of punctuation. BRIEF DESCRIPTION OF THE DRAWINGS
[0095] Figure 1 is a structural diagram of a server provided by an embodiment of the present disclosure;
[0096] Figure 2 is a display schematic diagram of a lyrics page provided by an embodiment of the present disclosure;
[0097] Figure 3 is a display schematic diagram of a lyrics page provided by an embodiment of the present disclosure;
[0098] Figure 4 It is a schematic diagram of a processing flow of a method for segmenting lyrics provided by an embodiment of the present disclosure;
[0099] Figure 5 It is a structural schematic diagram of a lyrics segmentation model provided by an embodiment of the present disclosure;
[0100] Figure 6 It is a schematic diagram of a processing flow for determining sentence segmentation information provided by an embodiment of the present disclosure;
[0101] Figure 7 It is a structural schematic diagram of a lyrics segmentation model provided by an embodiment of the present disclosure;
[0102] Figure 8 It is a schematic diagram of a processing flow for determining sentence segmentation information provided by an embodiment of the present disclosure;
[0103] Fig. 9 It is a schematic diagram of a processing flow of training a lyrics segmentation model provided by an embodiment of the present disclosure;
[0104] Fig.10 It is a schematic diagram of a processing flow of secondary segmentation provided by an embodiment of the present disclosure;
[0105] Fig.11 It is a structural schematic diagram of a device for segmenting lyrics provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0106] In order to make the objectives, technical solutions and advantages of the present disclosure more clear, the embodiments of the present disclosure will be further described in detail below with reference to the accompanying drawings.
[0107] The embodiment of the present disclosure provides a method for punctuating lyrics. The execution subject of the method may be a computer device, which may be a terminal or a server. The terminal may be a terminal with an audio playback application installed, and may be a mobile phone, a tablet computer, a notebook, a desktop computer, etc. The server may be a single server or a server group. If it is a single server, the server may be responsible for all the processing in the following scheme. If it is a server group, different servers in the server group may be responsible for different processing in the following scheme. The specific processing distribution may be arbitrarily set by the technical staff according to actual needs, and will not be repeated here. When the execution subject is a terminal, after the user edits the lyrics to be uploaded at the terminal, the processing flow of this scheme is performed before the terminal uploads the lyrics. When the execution subject is a server, after the user uploads the lyrics at the terminal, the terminal sends the lyrics to the server, and the server performs the processing flow of this scheme. The embodiment of the present disclosure takes the execution subject being a server as an example to describe the scheme in detail.
[0108] The server may be a background server of an application with a lyrics display function, and the application may be an audio playback application, a video playback application, a life service application, etc. The disclosed embodiment takes the background server of an audio playback application to segment lyrics as an example to explain the solution in detail, and other situations are similar, which will not be described in detail in this embodiment.
[0109] Figure 1 is a schematic diagram of the structure of a server provided by an embodiment of the present disclosure. From the perspective of hardware composition, the structure of the server can be as follows Figure 1 As shown, it includes a processor 110 , a memory 120 and a display component 130 .
[0110] The processor 110 may be a central processing unit (CPU) or a system on chip (SoC), etc. The processor 110 may be used to process various operation instructions, for example, determining the first lyric sentence that meets the first super word condition, etc.
[0111] The memory 120 may include various volatile memories or non-volatile memories, such as a solid state disk (SSD), a dynamic random access memory (DRAM), etc. The memory 120 may be used to store initial data, intermediate data, and result data used in the relevant processing process, for example, lyrics, segmentation information of the first lyrics sentence, etc.
[0112] The display component 130 can be an independent screen, or a screen integrated with the terminal body, a projector, etc. The screen can be a touch screen or a non-touch screen (can be displayed through remote live broadcast). The display component 130 is used to display the system interface, application interface, etc. For example, the display component 130 can display the segmentation information of the first lyrics sentence, multiple lyrics sentences after segmentation, etc.
[0113] Users can upload lyrics in audio playback applications. However, sometimes there are lyrics without punctuation in the lyrics uploaded by users. When playing songs, the lyrics page displays each lyric sentence according to the punctuation. The lyrics without punctuation are displayed chaotically on the lyrics page. For example, Figure 2 In the lyric page shown, in the lyric "surrounded by green trees and red walls, the boat is gently floating in the water", the part "lightly floating in the water" that exceeds the display area of the lyric page is hidden, resulting in a confusing display of the lyrics. Figure 3 In the lyrics page shown, there is no punctuation in the lyrics "The sea reflects the beautiful white tower, surrounded by green trees and red walls, and the boat floats gently in the water". Because the line break position is not at the end of the sentence, the lyrics display is chaotic (normal lyrics are wrapped at the end of the sentence). In order to solve the above problem, the present disclosure provides a method for punctuating lyrics. The processing flow of punctuating lyrics is described in detail below. Figure 4 As shown, the following steps are included:
[0114] 401, obtaining the number of words in each lyric sentence of the target song.
[0115] After the user uploads the lyrics on the terminal, the terminal sends the lyrics to the server. The server traverses the lyrics in the database. Each time it traverses to a song's lyrics, it performs this process. First, get the number of words in each lyric sentence in the lyrics. For example, the number of words in each lyric sentence of the target song is 6, 6, 2, 6, 18, and 6.
[0116] The target song's lyrics may include a lyrics header and a timestamp. Before obtaining the word count of each lyric sentence in the target song's lyrics, the lyrics header and timestamp may be removed to obtain processed lyrics. In the processed lyrics, the word count of each lyric sentence is obtained. The lyrics header is the content other than the lyrics sentence in the lyrics, such as the lyricist information, the composer information, and the singer. The timestamp is used to indicate the time when each lyric sentence starts, usually including minutes and seconds. Regular expressions can be used to remove the lyrics header and timestamp.
[0117] 402, based on the number of words in each lyric sentence, determine a first lyric sentence that meets a first super-word condition.
[0118] The first superword condition may be preset by a technician, and several possible first superword conditions are listed below.
[0119] Super word condition one: determines the standard word number of the first lyric sentence of the target song based on the number of words in all the lyric sentences of the target song. The standard word number of the first lyric sentence can be the average value, maximum value, etc. of the word number of each lyric sentence of the target song. The sum of the standard word number of the lyric sentence and the preset word number is determined as the first word count threshold, wherein the preset word number can be pre-set by a technician, such as 4, 5, etc.
[0120] Super word condition 2, the second word count threshold is set by the technician based on experience. The second word count threshold of each song can be the same or different. For example, the second word count threshold of all target songs can be set to the same value, or the second word count threshold of some or a certain target song can be set separately. For example, the second word count threshold of target song A is 15, and the second word count threshold of target song B is 10, or the second word count thresholds of all target songs are the same value 15, or the second word count thresholds of some target songs are 15, and the second word count thresholds of some target songs are 10, and so on.
[0121] Optionally, the first super-word condition can be any one of the super-word condition one and the super-word condition two mentioned above, or the above two super-word conditions can be combined as the first super-word condition. When the number of words in a lyrics sentence satisfies both the super-word condition one and the super-word condition two mentioned above, the lyrics sentence will be taken as the first lyrics sentence.
[0122] For example, the number of words in all the lyrics of the target song are 6, 6, 2, 6, 18, and 6 respectively. Then, the average number of words in the target song is 7.33, and the preset number of words is 5. Then, the first word count threshold (the sum of the average number of words and the preset number of words) is 12.33, and the second word count threshold is 15. Then, the lyrics sentence with 18 words in the target song is determined as the first lyrics sentence that meets the first super-word condition.
[0123] 403, input the first lyric sentence into the lyric sentence segmentation model, extract the text content information and pronunciation information of the first lyric sentence by the lyric sentence segmentation model, and determine the sentence segmentation information of the first lyric sentence based on the text content information and pronunciation information.
[0124] The words at the end of some lyrics may have the same rhyme, so the words with the same rhyme in the first lyric sentence are more likely to be the positions that need to be segmented. The pronunciation information can be pinyin, so that the pronunciation information can reflect the rhyme of each word in the first lyric sentence, so that the segmentation information of the first lyric sentence obtained in this way is more reliable.
[0125] After obtaining the first lyric sentence, the text of the first lyric sentence is input into the lyric segmentation model, and the lyric segmentation model extracts the text content information and pronunciation information of the first lyric sentence, and determines the segmentation information of the first lyric sentence based on the text content information and pronunciation information. The text content information can be a word in the first lyric sentence, or a character in the first lyric sentence, and the pronunciation information can be the pinyin of the first lyric sentence. The specific processing is described in detail in the subsequent process and will not be repeated here.
[0126] The sentence segmentation information includes a character sequence, each character in the character sequence corresponds to a word in the first lyric sentence, and each character in the character sequence represents the position information of the corresponding word. Each character in the character sequence can be a first character and a second character. For example, the first character is 1 and the second character is 0.
[0127] The first character is used to indicate that the corresponding text is the first text of a sentence, and the second character is used to indicate that the corresponding text is text other than the first text of a sentence. For example, for the first sentence of lyrics "Let's row the oars and push the waves. The sea reflects the beautiful white pagoda, surrounded by green trees and red walls. The boat floats gently in the water, and a cool breeze blows in the face", the segmentation information of the first sentence of lyrics output by the lyrics segmentation model is "100000010000001000000000100000000010000000001000000000".
[0128] Alternatively, the first character is used to indicate that the corresponding text is the end of a sentence, and the second character is used to indicate that the corresponding text is text other than the end of a sentence. For example, for the first lyric sentence "Let's row the oars and push the waves away. The sea reflects the beautiful white pagoda, surrounded by green trees and red walls. The boat floats gently in the water, and a cool breeze blows in the face", the segmentation information of the first lyric sentence output by the lyrics segmentation model is "000000100000010000000001000000000100000000010000000001".
[0129] Alternatively, the first character is used to indicate that the corresponding text is the beginning text or the end text of a sentence, and the second character is used to indicate that the corresponding text is text other than the beginning text or the end text of a sentence. For example, for the first lyric sentence "Let's row the oars and push the waves away. The sea reflects the beautiful white pagoda, surrounded by green trees and red walls. The boat floats gently in the water, and a cool breeze blows towards us", the segmentation information of the first lyric sentence output by the lyrics segmentation model is "100000110000011000000001100000000110000000011000000001".
[0130] The technicians can pre-set the first character and the second character to respectively represent the position of the text in the first lyric sentence. For example, the first character indicates that the corresponding text is the end text of the sentence, and the second character is used to indicate that the corresponding text is text other than the end text of the sentence.
[0131] 404, based on the segmentation information of the first lyric sentence, segment the first lyric sentence to obtain a plurality of segmented lyric sentences.
[0132] According to the segmentation information, the first sentence of the lyrics is segmented. For example, the segmentation information is "00000010000001000000000100000000010000000001000000001", and the multiple lyrics after the segmentation of the first sentence of the lyrics "Let us row the oars, the boat pushes away the waves, the sea reflects the beautiful white pagoda, it is surrounded by green trees and red walls, the boat floats gently in the water, and a cool breeze blows in the face" are "Let us row the oars, the boat pushes away the waves, the sea reflects the beautiful white pagoda, it is surrounded by green trees and red walls, the boat floats gently in the water, and a cool breeze blows in the face".
[0133] After obtaining the multiple lyrics sentences after the segmentation, the first lyrics sentence in the lyrics of the target song is replaced with the multiple lyrics sentences after the segmentation to obtain the updated lyrics of the target song.
[0134] After obtaining the updated lyrics, the timestamp corresponding to the first word of each sentence of the multiple lyrics after the segmentation can be determined according to the timestamp of each word of the lyrics of the target song stored in advance, and it can be used as the timestamp for scrolling the lyrics page. The timestamp of each word of the lyrics of the target song can be obtained by inputting the lyrics and audio data of the target song into the timestamp model, obtaining the timestamp corresponding to each word in the lyrics output by the timestamp model, and storing the lyrics and the timestamp in correspondence. The timestamp model can be a machine learning model, such as a convolutional neural network, a recurrent neural network, etc.
[0135] In this way, the lyrics with super words are identified in the lyrics, and such lyrics are considered to be lyrics that may have unpunctuated problems. Then, the machine learning model punctuates the lyrics based on the text content information and pronunciation information of the first lyrics. In this way, the lyrics that have forgotten to be punctuated in the database can be found in time, and the lyrics can be punctuated in time. In the subsequent song playback process, the correct lyrics that have been punctuated can be used for display. Thereby, the display confusion of lyrics can be prevented. In addition, because the lyrics of the song generally have certain rhyme characteristics, punctuation based on pronunciation information can improve the accuracy of punctuation.
[0136] In a possible implementation, the lyrics segmentation model includes a word segmentation sub-model, a phonetic sub-model, a position sub-model, a word feature sub-model and a sentence segmentation model, for example Figure 5 The structure diagram of the lyrics segmentation model shown in FIG. 1 is a flowchart for determining the segmentation information. Figure 6 As shown, the following steps are included:
[0137] 601. Segment the first lyric sentence using a segmentation sub-model to obtain at least one word included in the first lyric sentence.
[0138] The output of the word segmentation sub-model is at least one word (single word or multi-word word) arranged in the order of the first lyric sentence. For example, for the first lyric sentence "Let's row the boat with two oars and push away the waves. The sea surface reflects the beautiful white tower. It is surrounded by green trees and red walls. The boat floats gently in the water and a cool breeze blows in the face", the input of the word segmentation sub-model is "Let's row the boat with two oars and push away the waves. The sea surface reflects the beautiful white tower. It is surrounded by green trees and red walls. The boat floats gently in the water and a cool breeze blows in the face", and the output is "Let / we / row / the / boat / push / away / the / waves / sea / reflects / the / beautiful / white / tower / surrounded / by / green / trees / and / red / walls / the / boat / floats / gently / in / the / water / and / a / cool / wind / blows / in / the / face".
[0139] 602. Determine the pinyin feature information corresponding to each word in at least one word through the pinyin sub-model.
[0140] The at least one word output by the word segmentation sub-model is respectively input into the pinyin sub-model to obtain the pinyin feature information corresponding to each word in the first lyrics sentence. The pinyin feature information can be a vector or a matrix.
[0141] For example, "let", "we", "swing", "start", "double oars", "small boat", "push", "open", "waves", "sea surface",..., "in", "water", "in", "oncoming", "blow", "coming", "cool", "of", and "wind" are respectively input into the pinyin sub-model, and the output pinyin feature information is "rang", "women", "dang", "qi", "shuangjia", "xiaochuaner", "tui", "kai", "bolang", "haimian",..., "zai", "shui", "zhong", "yingmian", "chui", "laile", "liangshuang", "de", and "feng".
[0142] 603. Determine the position feature information corresponding to each word in the first lyrics sentence through the position sub-model.
[0143] The position feature information may include starting position information and ending position information. The starting position information and ending position information of each single word are the same, and the starting position information and ending position information of each multi-word phrase are different. At least one word after word segmentation and the first lyrics sentence are input into the position sub-model together, and the position feature information corresponding to each word is output. For example, in the first lyrics sentence "Let us row the boat and push away the waves. The sea reflects the beautiful white tower. It is surrounded by green trees and red walls. The boat floats gently in the water and a cool breeze blows in the face", the starting position information of "let" is 1, the ending position information is 1, the starting position information of "we" is 2, and the ending position information is 3. Position feature information can be a vector, a matrix, etc.
[0144] 604, determining the word feature information corresponding to each word through the word feature sub-model.
[0145] The word feature information can be a vector or a matrix. In this way, for each word (single-word word or multi-word word) in the first lyrics sentence, it has word feature information, pinyin feature information and position feature information. For example, the word feature information of the word "we" can be a word vector, the pinyin feature information can be a vector generated by the pinyin "women", and the position feature information can be a two-dimensional vector, the first dimension is the starting position information 2, and the second dimension is the ending position information 3.
[0146] 605, using the sentence segmentation model, the pinyin feature information, position feature information and word feature information corresponding to each word are processed to obtain the sentence segmentation information of the first lyric sentence.
[0147] The pinyin feature information, position feature information and word feature information corresponding to each word are concatenated to obtain the combined feature information corresponding to each word, and the combined feature information corresponding to each word is input into the sentence segmentation model to obtain the sentence segmentation information of the first lyric sentence output by the sentence segmentation model.
[0148] For example, when the pinyin feature information, the position feature information and the word feature information are vectors, the pinyin feature information, the position feature information and the word feature information can be concatenated into a combined vector, the dimension of the combined vector is the sum of the vector dimensions of the pinyin feature information, the position feature information and the word feature information, and the N dimension in the combined vector is the pinyin feature information, the M dimension is the position feature information, and the P dimension is the word feature information. For example, the pinyin feature information is (4, 5, 1, 2, 6), the position feature information is (2, 3), and the word feature information is (2, 6, 4, 7, 5), then the combined feature information is (4, 5, 1, 2, 6, 2, 3, 2, 6, 4, 7, 5). Then the combined feature information is input into the sentence segmentation model to obtain the sentence segmentation information of the first lyric sentence.
[0149] Since the number of words in each sentence of some lyrics may be the same, the possibility of punctuation in the middle of a word is small, and the words at the end of the sentence may have the same rhyme. In the above processing flow, the pinyin feature information of each first sentence of lyrics can reflect the rhyme, and the position feature information can reflect the position. Combined with the word feature information, the first sentence of lyrics is punctuated, and the rhyme and the position of each word are taken into consideration. In this way, the obtained punctuation information is more reliable.
[0150] In a possible implementation, the lyrics segmentation model includes a pinyin sub-model, a position sub-model, a character feature sub-model and a sentence segmentation model, for example Figure 7 The structure diagram of the lyrics segmentation model shown in FIG. 1 is a flowchart for determining the segmentation information. Figure 8 As shown, the following steps are included:
[0151] 801, determine the pinyin feature information corresponding to each word in the first lyrics sentence through the pinyin sub-model.
[0152] Each word in the first lyrics sentence is input into the pinyin sub-model respectively to obtain the pinyin feature information corresponding to each word in the first lyrics sentence. The pinyin feature information can be a vector or a matrix.
[0153] For example, "let", "I", "we", "swing", "start", "double", "oar", "small", "boat", "er",..., "blow", "come", "le", "cool", "shuang", "of", and "wind" are respectively input into the pinyin sub-model, and the output pinyin feature information is "rang", "wo", "men", "dang", "qi", "shuang", "jia", "xiao", "chuan", "er",..., "chui", "lai", "le", "liang", "shuang", "de", and "feng".
[0154] 802. Determine the position feature information corresponding to each word in the first lyric sentence through the position sub-model.
[0155] Input the first lyric sentence into the position sub-model, and output the position feature information corresponding to each word. The position feature information can be the order of each word in the first lyric sentence. For example, in the first lyric sentence "Let's row the boat and push away the waves. The sea reflects the beautiful white tower. It is surrounded by green trees and red walls. The boat floats gently in the water and a cool breeze blows in the face", the position feature information of "let" is 1, and the position feature information of "I" is 2. The position feature information can be a vector or a matrix.
[0156] 803. Determine the character feature information corresponding to each character through the character feature sub-model.
[0157] The character feature information can be a vector or a matrix. The character feature sub-model and the word feature sub-model in the above step 604 can be the same. In this way, for each character in the first lyrics sentence, there are character feature information and pinyin feature information. For example, the character feature information of the character "I" can be a word vector, and the pinyin feature information can be a vector generated by the pinyin "wo".
[0158] 804, using the sentence segmentation model, the pinyin feature information, position feature information and character feature information corresponding to each character are processed to obtain the sentence segmentation information of the first lyric sentence.
[0159] The pinyin feature information, position feature information and character feature information corresponding to each character are concatenated to obtain the combined feature information corresponding to each character, and the combined feature information corresponding to each character is input into the sentence segmentation model to obtain the sentence segmentation information of the first lyric sentence output by the sentence segmentation model.
[0160] For example, when the pinyin feature information, the position feature information and the character feature information are vectors, the pinyin feature information, the position feature information and the character feature information can be concatenated into a combined vector, the dimension of the combined vector is the sum of the vector dimensions of the pinyin feature information, the position feature information and the character feature information, and the specified X dimension in the combined vector is the pinyin feature information, the specified Y dimension is the position feature information, and the specified Z dimension is the character feature information. For example, the pinyin feature information is (4, 5, 1, 2, 6), the position feature information is (2), and the character feature information is (6, 4, 3, 5), then the combined feature information is (4, 5, 1, 2, 6, 2, 6, 4, 3, 5). Then the combined feature information is input into the sentence segmentation model to obtain the sentence segmentation information of the first lyric sentence.
[0161] Since the characters at the end of each sentence in some songs may have the same rhyme, in the above processing flow, the pinyin feature information can reflect the pronunciation in the first sentence of lyrics. The first sentence of lyrics is segmented according to the pinyin feature information and character feature information of each first sentence of lyrics, taking into account the pronunciation of each character. In this way, the obtained segmentation information is more reliable.
[0162] In one possible implementation, the process of training the lyrics segmentation model can be as follows: Fig. 9 As shown, the following steps are included:
[0163] 901, obtaining at least one lyrics training sample and at least one poetry training sample.
[0164] Among them, each lyrics training sample includes a sample lyrics sentence and corresponding sample segmentation information, and each poetry training sample includes a sample poetry sentence and corresponding sample segmentation information. The sample lyrics sentence is obtained by merging multiple consecutive lyrics sentences in the sample lyrics, and the sample poetry sentence is obtained by merging multiple consecutive poetry sentences in the sample poetry.
[0165] Determine N consecutive lyrics sentences (N is a value greater than 1, which can be pre-set by a technician) that do not meet the first super word condition in the music library, and merge the N consecutive lyrics sentences as a lyrics training sample. For example, "The sun is shining in the sky, the flowers are smiling at me, the birds are saying good morning, why do you carry a small schoolbag?" does not meet the first super word condition. In this way, "The sun is shining in the sky, the flowers are smiling at me, the birds are saying good morning, why do you carry a small schoolbag?" can be used as a sample lyrics sentence, and the corresponding segmentation information is "0000100001000001000000001". In this way, a lyrics training sample is obtained, and multiple operations are performed to obtain multiple lyrics training samples. The method of obtaining poetry training samples is similar to this and will not be repeated.
[0166] Optionally, the ratio of the number of lyrics training samples to the number of poetry training samples is a specified value greater than 1. For example, the ratio of the number of lyrics training samples to the number of poetry training samples is 2, 3, and so on.
[0167] 902. Based on at least one lyrics training sample and at least one poetry training sample, train the lyrics segmentation model to be trained to obtain a lyrics segmentation model that has completed the training.
[0168] Input one of the sample lyrics / sample poetry sentences into the lyrics segmentation model to be trained, generate predicted segmentation information, determine the loss value based on the sample segmentation information and the predicted segmentation information, and adjust the parameters of the lyrics segmentation model to be trained based on the loss value. Use multiple lyrics training samples and multiple poetry training samples to perform the above training parameter adjustment process until the training end condition is met, and determine the lyrics segmentation model after parameter adjustment as the lyrics segmentation model that has completed training. The training end condition can be reaching a specified number of training times, or the loss value is less than a preset threshold in N consecutive training times, etc.
[0169] In this way, the training samples include not only correctly punctuated lyrics, but also correctly punctuated poetry sentences. The lyrics segmentation model obtained by training the above training samples can learn the punctuation rhymes and improve the accuracy of punctuation of poetry lyrics.
[0170] In a possible implementation, after the first lyrics are segmented, it can be determined whether the obtained multiple lyrics need to be segmented again. The corresponding processing flow can be, for example, Fig.10 As shown, the following steps are included:
[0171] 1001. Determine, among the multiple lyrics sentences after segmentation, a second lyrics sentence that satisfies a second super-word condition.
[0172] The second super-word condition may be preset by a technician, and several possible second super-word conditions are listed below.
[0173] The third condition of excess words is that the word count is greater than the first word count threshold and the preset second word count threshold, wherein the first word count threshold is the sum of the standard word count of the first lyric sentence and the preset word count, and the standard word count of the first lyric sentence is determined based on the word count of each lyric sentence including the first lyric sentence in the target song. The standard word count of the first lyric sentence can be the average value, maximum value, etc. of the word count of each lyric sentence including the first lyric sentence in the target song.
[0174] The fourth condition of super words is that the word count is greater than the standard word count of the second lyric sentence, and the standard word count of the second lyric sentence is determined based on the word count of each other lyric sentence in the target song except the first lyric sentence. The standard word count of the second lyric sentence can be the average value, maximum value, etc. of the word count of each other lyric sentence in the target song except the first lyric sentence.
[0175] The fifth condition of excess words is that the number of words is greater than the standard number of words in the third lyric sentence, and the standard number of words in the third lyric sentence is determined based on the number of words in each lyric sentence in the original song corresponding to the target song. The standard number of words in the third lyric sentence can be the average number of words in each lyric sentence in the original song, the maximum value, etc.
[0176] Optionally, the second super-word condition can be any one of the above-mentioned super-word condition three, super-word condition four, and super-word condition five, or the above-mentioned super-word condition three, super-word condition four, and super-word condition five can be combined as the second super-word condition.
[0177] 1002, input the second lyric sentence into the lyric segmentation model, extract the text content information and pronunciation information of the second lyric sentence by the lyric segmentation model, and determine the segmentation information of the second lyric sentence based on the text content information and pronunciation information.
[0178] The processing method for determining the sentence segmentation information of the second lyric sentence is similar to the processing method for determining the sentence segmentation information of the first lyric sentence in the above step 403, and will not be repeated here.
[0179] 1003. Based on the segmentation information of the second lyric sentence, segment the second lyric sentence to obtain a plurality of lyric sentences after segmentation.
[0180] The processing method of segmenting the second lyrics is similar to the processing method of segmenting the first lyrics in the above step 404, and will not be repeated here.
[0181] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.
[0182] Based on the same technical concept, the embodiment of the present disclosure also provides a device for punctuating lyrics, such as Fig.11 As shown, the device comprises:
[0183] The acquisition module 1110 is used to acquire the number of words in each lyric sentence of the target song, and can specifically implement the processing function of the above step 401 and other implicit steps.
[0184] The determination module 1120 is used to determine the first lyric sentence that meets the first super-word condition based on the number of words in each lyric sentence; input the first lyric sentence into the lyric sentence segmentation model, extract the text content information and pronunciation information of the first lyric sentence by the lyric sentence segmentation model, and determine the sentence segmentation information of the first lyric sentence based on the text content information and pronunciation information. Specifically, the processing functions of the above steps 402 and 403 and other implicit steps can be realized.
[0185] The segmentation module 1130 is used to segment the first lyric sentence based on the segmentation information of the first lyric sentence to obtain multiple lyric sentences after segmentation. Specifically, it can realize the processing function of the above step 404 and other implicit steps.
[0186] In a possible implementation, the determination module 1120 is used to: determine the standard word count of the first lyric sentence of the target song based on the word counts of all the lyric sentences of the target song; determine the sum of the standard word count of the first lyric sentence and the preset word count as the first word count threshold; determine the lyric sentence with a word count greater than the first word count threshold and the preset second word count threshold as the first lyric sentence that meets the first super-word condition. Specifically, the processing function of the above step 402 and other implicit steps can be implemented.
[0187] In a possible implementation, the lyrics segmentation model includes a word segmentation sub-model, a pinyin sub-model, a position sub-model, a word feature sub-model and a sentence segmentation model; the determination module 1120 is used to: segment the first lyrics sentence through the word segmentation sub-model to obtain at least one word included in the first lyrics sentence; determine the pinyin feature information corresponding to each word in the at least one word through the pinyin sub-model; determine the position feature information corresponding to each word in the first lyrics sentence through the position sub-model; determine the word feature information corresponding to each word through the word feature sub-model; process the pinyin feature information, position feature information and word feature information corresponding to each word through the sentence segmentation model to obtain the sentence segmentation information of the first lyrics sentence. Specifically, the processing functions of the above steps 601, 602, 603, 604, 605 and other implicit steps can be implemented.
[0188] In a possible implementation, the determination module 1120 is used to: concatenate the pinyin feature information, position feature information and word feature information corresponding to each word to obtain the combined feature information corresponding to each word; input the combined feature information corresponding to each word into the sentence segmentation model to obtain the sentence segmentation information of the first lyric sentence output by the sentence segmentation model. Specifically, the processing function of the above step 605 and other implicit steps can be realized.
[0189] In a possible implementation, the lyrics segmentation model includes a pinyin sub-model, a position sub-model, a character feature sub-model and a sentence segmentation model; the determination module 1120 is used to: determine the pinyin feature information corresponding to each character in the first lyrics sentence through the pinyin sub-model; determine the position feature information corresponding to each character in the first lyrics sentence through the position sub-model; determine the character feature information corresponding to each character through the character feature sub-model; and process the pinyin feature information, position feature information and character feature information corresponding to each character through the sentence segmentation model to obtain the sentence segmentation information of the first lyrics sentence. Specifically, the processing functions of the above steps 801, 802, 803, and 804, as well as other implicit steps, can be implemented.
[0190] In a possible implementation, the device further includes a training module 1140, which is used to: obtain at least one lyrics training sample and at least one poetry training sample, wherein each lyrics training sample includes a sample lyrics sentence and corresponding sample segmentation information, each poetry training sample includes a sample poetry sentence and corresponding sample segmentation information, the sample lyrics sentence is obtained by merging multiple consecutive lyrics sentences in the sample lyrics, and the sample poetry sentence is obtained by merging multiple consecutive poetry sentences in the sample poetry; based on at least one lyrics training sample and at least one poetry training sample, the lyrics segmentation model to be trained is trained to obtain a lyrics segmentation model that has been trained. Specifically, the processing functions of the above steps 901 and 902, as well as other implicit steps, can be implemented.
[0191] In a possible implementation, the sentence segmentation information includes a character sequence, each character in the character sequence corresponds to a word in the first lyric sentence, and each character in the character sequence represents the position information of the corresponding word. Specifically, the processing function of the above step 403 and other implicit steps can be implemented.
[0192] In a possible implementation, the device further includes a replacement module 1150, which is used to replace the first lyrics sentence in the target song lyrics with multiple lyrics sentences after segmentation to obtain updated lyrics of the target song. Specifically, the processing function of the above step 404 and other implicit steps can be implemented.
[0193] In a possible implementation, the acquisition module 1110 is used to: acquire the lyrics of the target song; remove the lyrics header in the lyrics to obtain processed lyrics, wherein the lyrics header is the content other than the lyrics in the lyrics; and acquire the number of words in each lyrics sentence in the processed lyrics. Specifically, the processing function of the above step 401 and other implicit steps can be implemented.
[0194] In a possible implementation, the device further includes a secondary segmentation module 1160, which is used to: determine a second lyric sentence that meets the second super-word condition among multiple lyric sentences after segmentation; input the second lyric sentence into the lyric segmentation model, extract the text content information and pronunciation information of the second lyric sentence by the lyric segmentation model, and determine the segmentation information of the second lyric sentence based on the text content information and pronunciation information; segment the second lyric sentence based on the segmentation information of the second lyric sentence to obtain multiple lyric sentences after segmentation. Specifically, the processing functions of the above steps 1001, 1002, and 1003, as well as other implicit steps, can be realized.
[0195] In a possible implementation, the second super-word condition includes at least one of the following conditions: the word count is greater than the first word count threshold and the preset second word count threshold, wherein the first word count threshold is the sum of the standard word count of the first lyric sentence and the preset word count, and the standard word count of the first lyric sentence is determined based on the word count of each lyric sentence including the first lyric sentence in the target song; the word count is greater than the standard word count of the second lyric sentence, and the standard word count of the second lyric sentence is determined based on the word count of each other lyric sentence in the target song except the first lyric sentence; the word count is greater than the standard word count of the third lyric sentence, and the standard word count of the third lyric sentence is determined based on the word count of each lyric sentence in the original song corresponding to the target song. Specifically, the processing function of the above step 1001 and other implicit steps can be implemented.
[0196] The acquisition module 1110, determination module 1120, segmentation module 1130, training module 1140, replacement module 1150, and secondary segmentation module 1160 may be implemented by a processor, or by a processor in conjunction with a memory and a display.
[0197] In the disclosed embodiment, lyrics with super words are identified in the lyrics. Such lyrics are considered to be lyrics that may have unpunctuated problems. Then, the machine learning model punctuates the lyrics based on the text content information and pronunciation information of the first lyrics. In this way, lyrics that have forgotten to be punctuated in the database can be found in time, and the lyrics can be punctuated in time. In the subsequent song playback process, the correct lyrics that have been punctuated can be used for display. Thereby, the display confusion of lyrics can be prevented. In addition, because the lyrics of a song generally have certain rhyme characteristics, punctuation based on pronunciation information can improve the accuracy of punctuation.
[0198] When the device for segmenting lyrics provided in the above embodiment is in operation, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device for segmenting lyrics provided in the above embodiment and the method embodiment for segmenting lyrics belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0199] The embodiment of the present disclosure also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computer device or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct a computing device to execute a method for segmenting lyrics.
[0200] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for segmenting lyrics, characterized in that: The method comprises: Get the number of words in each lyric sentence of the target song; Based on the number of words in each of the lyrics, determining a first lyrics sentence that meets a first super-word condition; Inputting the first lyric sentence into a lyric sentence segmentation model, extracting text content information and pronunciation information of the first lyric sentence by the lyric sentence segmentation model, and determining the sentence segmentation information of the first lyric sentence based on the text content information and the pronunciation information; Based on the segmentation information of the first lyric sentence, the first lyric sentence is segmented to obtain a plurality of lyric sentences after segmentation.
2. The method according to claim 1, characterized in that The step of determining the first lyric sentence satisfying the first super-word condition based on the number of words in each lyric sentence comprises: Determine the standard word count of the first lyric sentence of the target song based on the word count of all the lyric sentences of the target song; The sum of the standard number of words in the first lyric sentence and the preset number of words is determined as the first word count threshold; A lyric sentence whose word count is greater than the first word count threshold and a preset second word count threshold is determined as the first lyric sentence that meets the first super-word condition.
3. The method according to claim 1, characterized in that The lyrics segmentation model includes a word segmentation sub-model, a pinyin sub-model, a position sub-model, a word feature sub-model and a sentence segmentation model; The extracting text content information and pronunciation information of the first lyrics sentence from the lyrics segmentation model, and determining the segmentation information of the first lyrics sentence based on the text content information and the pronunciation information, includes: Using the word segmentation sub-model, segment the first lyric sentence to obtain at least one word included in the first lyric sentence; Determining the pinyin feature information corresponding to each word in the at least one word through the pinyin sub-model; Determining the position feature information corresponding to each word in the first lyrics sentence by using the position sub-model; Determining the word feature information corresponding to each word through the word feature sub-model; The sentence segmentation model is used to process the pinyin feature information, position feature information and word feature information corresponding to each word to obtain the sentence segmentation information of the first lyrics sentence.
4. The method according to claim 3, characterized in that The sentence segmentation model is used to process the pinyin feature information, the position feature information and the word feature information corresponding to each word to obtain the sentence segmentation information of the first lyrics sentence, including: The pinyin feature information, the position feature information and the word feature information corresponding to each word are concatenated to obtain the combined feature information corresponding to each word; The combined feature information corresponding to each word is input into a sentence segmentation model to obtain the sentence segmentation information of the first lyric sentence output by the sentence segmentation model.
5. The method according to claim 1, characterized in that The lyrics segmentation model includes a pinyin sub-model, a position sub-model, a character feature sub-model and a sentence segmentation model; The extracting text content information and pronunciation information of the first lyrics sentence from the lyrics segmentation model, and determining the segmentation information of the first lyrics sentence based on the text content information and the pronunciation information, includes: Determine the pinyin feature information corresponding to each word in the first lyrics sentence by using the pinyin sub-model; Determining the position feature information corresponding to each word in the first lyrics sentence by using the position sub-model; Determining the character feature information corresponding to each character through the character feature sub-model; The sentence segmentation model is used to process the pinyin feature information, position feature information and character feature information corresponding to each character to obtain the sentence segmentation information of the first lyrics sentence.
6. The method according to claim 1, characterized in that The method further comprises: Acquire at least one lyrics training sample and at least one poetry training sample, wherein each lyrics training sample includes a sample lyrics sentence and corresponding sample sentence segmentation information, and each poetry training sample includes a sample poetry sentence and corresponding sample sentence segmentation information, wherein the sample lyrics sentence is obtained by merging multiple consecutive lyrics sentences in the sample lyrics, and the sample poetry sentence is obtained by merging multiple consecutive poetry sentences in the sample poetry; Based on the at least one lyrics training sample and the at least one poetry training sample, the lyrics segmentation model to be trained is trained to obtain the lyrics segmentation model that has completed the training.
7. The method according to claim 1, characterized in that The sentence segmentation information includes a character sequence, each character in the character sequence corresponds to a word in the first lyric sentence, and each character in the character sequence represents position information of the corresponding word.
8. The method according to claim 1, characterized in that After segmenting the first lyric sentence based on the segmentation information of the first lyric sentence to obtain a plurality of segmented lyric sentences, the method further includes: The first lyric sentence in the lyrics of the target song is replaced with the multiple lyric sentences after the segmentation to obtain updated lyrics of the target song.
9. The method according to claim 1, characterized in that: The step of obtaining the number of words in each lyric sentence of the target song includes: Obtaining lyrics of the target song; Removing the lyrics header from the lyrics to obtain processed lyrics, wherein the lyrics header is other content in the lyrics except the lyrics; In the processed lyrics, the number of words in each lyric sentence is obtained.
10. The method according to claim 1, characterized in that After segmenting the first lyric sentence based on the segmentation information of the first lyric sentence to obtain a plurality of segmented lyric sentences, the method further includes: Determine a second lyric sentence satisfying a second super-word condition among the multiple lyric sentences after the sentence segmentation; Inputting the second lyrics sentence into the lyrics segmentation model, extracting text content information and pronunciation information of the second lyrics sentence by the lyrics segmentation model, and determining the segmentation information of the second lyrics sentence based on the text content information and the pronunciation information; Based on the segmentation information of the second lyric sentence, the second lyric sentence is segmented to obtain a plurality of lyric sentences after segmentation.
11. The method according to claim 10, characterized in that The second super-word condition includes at least one of the following conditions: The word count is greater than a first word count threshold and a preset second word count threshold, wherein the first word count threshold is the sum of a standard word count of the first lyric sentence and a preset word count, and the standard word count of the first lyric sentence is determined based on the word count of each lyric sentence in the target song including the first lyric sentence; The word count is greater than a standard word count of a second lyric sentence, where the standard word count of the second lyric sentence is determined based on the word count of each other lyric sentence in the target song except the first lyric sentence; The number of words is greater than the standard number of words in the third lyric sentence, and the standard number of words in the third lyric sentence is determined based on the number of words in each lyric sentence in the original song corresponding to the target song.
12. A computer device, characterized in that: The computer device comprises a memory and a processor, wherein the memory is used to store computer instructions; the processor executes the computer instructions stored in the memory, so that the computer device executes the method described in any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program code. When the computer program code is executed by a computer device, the computer device executes the method according to any one of claims 1 to 11.
14. A computer program product, characterized in that The computer program product comprises a computer program code. When the computer program code is executed by a computer device, the computer device executes the method according to any one of claims 1 to 11.
