A song information generation method and apparatus

By acquiring initial word grids or lyrics data and utilizing a pre-trained word grid generation model and database, target word grid data with high similarity is generated, solving the problem of difficulty in determining word grids during the lyric creation process and improving the convenience and accuracy of lyric creation.

CN115017258BActive Publication Date: 2025-12-05NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210427069.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-22
Publication Date
2025-12-05
Estimated Expiration
2042-04-22

AI Technical Summary

Technical Problem

The existing lyric writing process relies on the lyricist's specialized domain knowledge, which makes it difficult to determine the word form and results in a high threshold and difficulty for lyric writing.

Method used

By acquiring initial word pattern data or lyric data, and using a pre-trained word pattern generation model or database, target word pattern data with a similarity reaching a predetermined threshold is generated, and corresponding target song information is obtained, providing a reference for lyric creation.

Benefits of technology

It lowers the difficulty and threshold of lyric writing, improves the convenience and accuracy of lyric writing, and simplifies the process of lyric composition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115017258B_ABST
    Figure CN115017258B_ABST
Patent Text Reader

Abstract

The application discloses a song information generation method and device. The method comprises the following steps: obtaining input song search information, wherein the song search information comprises initial word pattern data or initial song lyric data; in response to the song search information being the initial word pattern data, obtaining target word pattern data from a preset database, and obtaining target song information corresponding to the target word pattern data; or, in response to the song search information being the initial song lyric data, generating initial word pattern data corresponding to the initial song lyric based on a pre-trained word pattern generation model, obtaining target word pattern data with a similarity to the initial word pattern data reaching a predetermined similarity threshold from the preset database, and obtaining target song information corresponding to the target word pattern data; and outputting the target song information. By using the method, the difficulty and threshold of the song lyric creation process can be reduced, and the accuracy and reliability of the song lyric creation process can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a method for generating song information. This application also relates to a song information generation apparatus, electronic equipment, and a computer-readable storage medium. Background Technology

[0002] Songs possess both musicality and literary merit. Musicality is primarily reflected in the melody and tune, while literary merit is mainly embodied in the lyrics. In the lyric writing process, lyricists often first determine the melody or lyrical structure of a song, and then write the lyrics based on that structure. The lyrical structure in lyrics is mainly determined by its length. For example, the lyric structure of the line "Time can no longer be wasted, how many opportunities are in our hands?" can be seen as "Time / can no longer / waste, how many / opportunities are in our hands?", expressed as "232, 232". In lyrics, it is generally distinguished based on length. Because determining the lyrical structure is a process of creating something from nothing, it is one of the more difficult aspects for lyricists.

[0003] The existing lyric writing process relies on the lyricist's specialized domain knowledge, making it quite challenging. Therefore, reducing the difficulty for lyricists in songwriting is a problem that needs to be addressed. Summary of the Invention

[0004] This application provides a song information generation method, apparatus, electronic device, and computer-readable storage medium to solve the problem of high difficulty in the existing lyric creation process.

[0005] This application provides a method for generating song information, including:

[0006] Obtain the input song retrieval information, which includes initial word structure data or initial lyrics data;

[0007] In response to the song retrieval information being initial word grid data, target word grid data with a similarity threshold reaching a predetermined similarity threshold is obtained from a preset database, and the target song information corresponding to the target word grid data is acquired; or,

[0008] In response to the song retrieval information being initial lyrics data, based on a pre-trained word grid generation model, initial word grid data corresponding to the initial lyrics data is generated, and target word grid data with a similarity to the initial word grid data reaching a predetermined similarity threshold is obtained from the preset database, thereby acquiring the target song information corresponding to the target word grid data;

[0009] Output the target song information;

[0010] The database contains associated word grid data and the corresponding song information.

[0011] Optionally, the method further includes:

[0012] Retrieve historical lyrics data for historical songs;

[0013] The historical lyrics data is cleaned, and based on the word pattern generation model, word pattern data of the historical lyrics data is generated;

[0014] The association information between the word pattern data and the song information of the historical songs is stored in the database.

[0015] Optionally, the word case generation model is trained in the following manner:

[0016] Obtain the target pre-trained model;

[0017] Obtain lyrics data samples and corresponding word grid data samples;

[0018] Based on the lyrics data samples, the word grid data samples, and the target pre-trained model, a model is trained to obtain a word grid generation model for generating word grid data corresponding to the input lyrics data.

[0019] Optionally, obtaining the target pre-trained model includes:

[0020] Obtain text corpus;

[0021] Based on the text corpus, a language model is pre-trained to obtain an initial pre-trained model;

[0022] The initial pre-trained model is trained using the lyrics text corpus to obtain the target pre-trained model.

[0023] Optionally, the pre-training of the language model based on the text corpus includes:

[0024] The language model is pre-trained using a pre-training task and the text corpus.

[0025] Optionally, the pre-training task includes at least one of the following:

[0026] Pre-trained task MLM;

[0027] Pre-training task NSP.

[0028] Optionally, the method further includes: calculating the similarity between the initial word case data and the word case data stored in the database using one of the following methods:

[0029] Semantic similarity of word vectors;

[0030] Cosine similarity;

[0031] European distance;

[0032] Manhattan distance;

[0033] Distance between Han and Min people.

[0034] Optionally, the target song information includes at least one of the following:

[0035] Lyrics data for the target song;

[0036] The author of the target song;

[0037] The composition of the target song;

[0038] The name of the target song.

[0039] This application embodiment also provides a song information generation device, the device comprising:

[0040] A song retrieval information acquisition unit is used to acquire input song retrieval information, which includes initial word structure data or initial lyrics data;

[0041] The target song information acquisition unit is configured to, in response to the song retrieval information being initial word grid data, obtain target word grid data from a preset database whose similarity to the initial word grid data reaches a predetermined similarity threshold, and acquire target song information corresponding to the target word grid data; or, in response to the song retrieval information being initial lyrics data, generate initial word grid data corresponding to the initial lyrics data based on a pre-trained word grid generation model, obtain target word grid data from the preset database whose similarity to the initial word grid data reaches a predetermined similarity threshold, and acquire target song information corresponding to the target word grid data;

[0042] The target song information output unit is used to output the target song information;

[0043] The database contains associated word grid data and the corresponding song information.

[0044] This application also provides an electronic device, including a processor and a memory; wherein the memory is used to store one or more computer instructions, wherein the one or more computer instructions are executed by the processor to implement the above-described method.

[0045] This application also provides a computer-readable storage medium storing one or more computer instructions that are executed by a processor to implement the above-described method.

[0046] Compared with the prior art, the embodiments of this application have the following advantages:

[0047] The song information generation method provided in this application embodiment obtains input song retrieval information, including initial word grid data or initial lyrics data; in response to the song retrieval information being initial word grid data, it obtains target word grid data from a preset database whose similarity to the initial word grid data reaches a predetermined similarity threshold, and obtains the target song information corresponding to the target word grid data; or, in response to the song retrieval information being initial lyrics data, it generates initial word grid data corresponding to the initial lyrics data based on a pre-trained word grid generation model, obtains target word grid data from a preset database whose similarity to the initial word grid data reaches a predetermined similarity threshold, and obtains the target song information corresponding to the target word grid data; and outputs the target song information; wherein, the database stores word grid data and the song information corresponding to the word grid data in association. This method can obtain target word grid data and corresponding target song information based on initial word grid data or initial lyrics data through database retrieval, and use them as reference information in the lyric creation process. By using this method, the difficulty and threshold of lyric creation can be reduced, and the convenience and accuracy of the lyric creation process can be improved. Attached Figure Description

[0048] Figure 1 This is a flowchart of a song information generation method provided in an embodiment of this application;

[0049] Figure 2 This is a unit block diagram of a song information generation device provided in an embodiment of this application;

[0050] Figure 3 This is a schematic diagram of the logical structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0051] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.

[0052] It should be noted that the terms "first", "second", "third", etc. in each part of the embodiments of the present application and in the drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. Such data can be interchanged under appropriate circumstances so that the embodiments of the present application described herein can be implemented in an order other than that shown or described herein. The terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0053] A song is a comprehensive art form that encompasses musicality and literary quality. Its musicality is mainly reflected in the melody of the song, while its literary connotation is mainly manifested in the lyrics. In a song, the lyrics often express the essence and soul of the song, elaborating on the emotions and themes it conveys. Therefore, the quality of the lyrics largely determines the quality of a song. However, the meter of a song is its melody. A song that is catchy and easy to sing must have a unique melody. In the process of lyric writing, lyricists often first determine the melody or meter of a song and then fill in the lyrics based on the determined meter. The performance of the meter in lyrics is mainly determined by length, and it pays attention to the tonal pattern, mainly including one-word sentences (flat tones, such as "Return! The west wind flutters the embroidered flags" (Zhang Xiaoxiang's "Gui Zi Yao"), oblique tones, such as: "Wrong! Wrong! Wrong!" (Lu You's "Hairpin Head Phoenix")), two-word sentences (there are four types of formats according to the tonal pattern: flat-flat ("Loud and clear, who is playing?" (Su Shi's "Zui Weng Cao")), oblique-oblique (such as: "At dusk, looking at the high city but not seeing it, only seeing countless mountains in disorder" (Jiang Kui's "Long Pavilion Sorrow")), flat-oblique (such as "Do you know? It should be that the green is lush and the red is withered." (Li Qingzhao's "Ru Meng Ling")), oblique-flat ("Waiting to sleep, not sleeping, there are thousands of things, also asking the sky, also hating the sky." (Zhao Ruguang))) and three-word sentences or four-word sentences, etc. In lyrics, generally, they are distinguished based on length. For example, for the lyrics "Time can no longer be wasted, how many opportunities are there in hand", the meter can be regarded as "Time / can no longer / be wasted, in hand / there are how many / opportunities", that is, expressed as "232, 232". The existing lyric writing process relies on the specialized domain knowledge of lyricists, and the difficulty of the lyric writing process is relatively high. For example, since the process of determining the meter is from scratch, therefore, determining the meter is a difficult link for lyricists and has a high dependence on specialized domain knowledge, resulting in a relatively high threshold and difficulty for lyric writing.

[0054] In order to reduce the difficulty and threshold for lyricists in the song creation process, this application provides a song information provision method, a corresponding song information retrieval device, an electronic device capable of implementing the method, and a computer-readable storage medium. The following embodiments provide a detailed description of the above-mentioned method, device, electronic device, and computer-readable storage medium.

[0055] The first embodiment of this application provides a method for providing song information. Figure 1 A flowchart of a method for providing song information according to an embodiment of this application is shown below. Figure 1 The method for providing song information provided in this embodiment will be described in detail. The embodiments described below are used to explain the principle of the method and are not intended to limit actual use.

[0056] like Figure 1 As shown, the song information provision method provided in this application embodiment includes the following steps:

[0057] S101, Obtain the input song search information.

[0058] This step is used to obtain song retrieval information input by the user. In this embodiment, the song retrieval information can be initial word pattern data or initial lyrics data. For example, when creating lyrics, a lyricist can determine initial word pattern data such as "232, 232" before creating the lyrics, that is, first determine the word pattern of the song to be created, and then fill in the lyrics based on the existing word pattern; or, before determining the word pattern, create the lyrics first.

[0059] S102, in response to the song retrieval information being the initial word grid data, target word grid data with a similarity to the initial word grid data reaching a predetermined similarity threshold is obtained from a preset database, and the target song information corresponding to the target word grid data is obtained; or, in response to the song retrieval information being the initial lyrics data, initial word grid data corresponding to the initial lyrics data is generated based on a pre-trained word grid generation model, and target word grid data with a similarity to the initial word grid data reaching a predetermined similarity threshold is obtained from a preset database, and the target song information corresponding to the target word grid data is obtained.

[0060] In this embodiment, the target song information includes one or more of the following: lyrics data of the target song, author of the target song, composer of the target song, and name of the target song.

[0061] The database mentioned above stores word grid data and the corresponding song information. In this embodiment, the word grid data and the corresponding song information need to be stored together in the following way:

[0062] Retrieve historical lyrics data for historical songs;

[0063] The historical lyrics data is cleaned, and word grid data of the historical lyrics data is generated based on the word grid generation model;

[0064] The word grid data and the song information of the historical songs are associated and stored together. That is, the association information between the word grid data and the song information of the historical songs is stored in the database for subsequent retrieval. For example, the lyrics and the generated word grids are stored using a unique index. In this embodiment, a graph storage structure is used to map the word grid data and song information one by one.

[0065] It should be noted that this step also requires the use of one of the following methods to calculate the similarity between the initial word array data and the word array data stored in the database: semantic similarity of word vectors, cosine similarity, Euclidean distance, Manhattan distance, Han-Min distance, etc.

[0066] In this embodiment, the above-mentioned word case generation model is trained in the following manner:

[0067] First, obtain the target pre-trained model. Specifically: acquire text corpus, for example, collect random text corpus; perform language model pre-training based on the text corpus to obtain an initial pre-trained model, for example, using a pre-training task and the random text corpus for language model pre-training, the pre-training task may include at least one of the existing natural language processing techniques, namely, the pre-training task MLM (Mask Language Model) and the pre-training task NSP (Next Sentence Prediction); train the initial pre-trained model using the lyrics text corpus to obtain the target pre-trained model.

[0068] Secondly, obtain lyrics data samples and word grid data samples corresponding to the lyrics data samples;

[0069] Finally, based on the lyrics data samples, the word grid data samples, and the target pre-trained model, a model is trained to obtain a word grid generation model for generating word grid data corresponding to the input lyrics data.

[0070] Specifically, a BERT (Bidirectional Encoder Representation Transformers) pre-trained network can be used to pre-train the model on social media and all known e-commerce media review data, encyclopedia corpora, etc., to enhance the learning ability of the pre-trained model. During the training of the pre-trained model, the pre-training tasks MLM (Mask Language Model) and NSP (Next Sentence Prediction) in natural language processing are employed. Based on this, further training is performed using lyrics data to obtain a lyrics pre-trained model. Then, the trained pre-trained model is used to train a word-form generation model on existing word-form labeled corpora. Specifically, the labeled lyrics word-form dataset is collected and cleaned, for example, by filtering out non-Chinese symbols, web links, and tag information. After data filtering, the data is processed into a format that the pre-trained network can parse. Fine-tuning is then performed using the labeled data and its labels, along with the trained pre-trained model, to obtain the word-form generation model. The input data for this word grid generation model is the original lyrics data, and the output is lyrics data separated by " / ". For example, if the input is "Time can no longer be wasted", the output is "Time / can no longer / waste". Then, it is mapped to the word grid "232" according to the rules. The training method adopts the sequence-to-sequence training method.

[0071] S103, output the target song information.

[0072] Following the above steps, this step outputs the target song information to the user so that the user can use the target song information as a reference and source of inspiration when creating lyrics.

[0073] In this embodiment, while outputting the target song information, the initial word grid data and the target word grid data can also be output simultaneously.

[0074] In existing word segmentation processes, most methods involve manual determination. For example, lyricists make decisions based on their domain knowledge to determine the word segmentation of the lyrics, or the text is segmented according to rules. In most song lyrics, word granularity is typically used. Since lyrics and words are similar, pseudo-word segments are created from the segmented lyrics and treated as the true word segmentation. However, these methods have the following shortcomings: When lyricists make decisions based on their domain knowledge, only true lyricists have the expertise to determine the word segmentation of a song, which raises the barrier to entry for lyric writing; for rule-based methods, the word segmentation and word segmentation technology are not perfectly aligned, and existing word segmentation methods cannot completely and accurately separate lyrics, and pseudo-word segments cannot replace true word segments. By using the song information provision method provided in this embodiment, for any input initial lyrics data, the method can generate initial word grid data corresponding to the initial lyrics based on a pre-trained word grid generation model, obtain target word grid data with a similarity to the initial word grid data reaching a predetermined similarity threshold from a preset database, and output the initial word grid data or target word grid data to the user. This can reduce the threshold for word grid creation and improve the convenience and accuracy of the word grid creation process.

[0075] The method provided in this application can be applied to a word grid retrieval system. The input to this system can be a word grid, such as "332 233", or lyrics, such as "I hope the wishes I've made will bloom all the way." When a word grid is input, lyrics with similar word grids are directly retrieved from the database, and the output is the lyrics. When lyrics are input, a word grid generation model generates the corresponding word grid for the lyrics, and then a retrieval is performed based on the similarity between word grids. The output includes lyrics that can serve as a reference and source of inspiration for lyric writing, as well as other song information. This process utilizes a word grid generation model trained on a large-scale pre-trained model. Only a small amount of labeled dataset is needed to train a word grid generation model, which can then be applied to a word grid retrieval system. This system can retrieve similar word grids from existing songs, greatly simplifying the composing process for creators and making lyric writing easier, thereby lowering the barrier to entry for lyric writing. This word pattern retrieval system allows users to freely input word patterns and search for songs in the existing song library that have similar word patterns to the input. This provides lyricists with better inspiration for composing music, enabling them to decide whether to modify the word pattern and how to create lyrics for that word pattern. This reduces the difficulty of composing music, shortens the time required to create lyrics, and greatly simplifies the process for lyricists.

[0076] This application trains a pre-trained model using a large amount of existing lyrics data, and then trains a word grid generation model using some labeled training data. This word grid generation model can generate word grids for any song. Therefore, users can not only use word grids to search for word grids, but also use any lyrics to search for similar lyrics based on word grids, providing a reference for the melody composition of newly created lyrics.

[0077] The first embodiment described above provides a method for generating song information. Correspondingly, the second embodiment of this application also provides a device for generating song information. This device can be applied in software or hardware to the server of a song retrieval platform to perform song information retrieval. Since the device embodiment is basically similar to the method embodiment, it is described simply. For details of the relevant technical features, please refer to the corresponding description of the method embodiment provided above. The following description of the device embodiment is merely illustrative.

[0078] Please refer to Figure 2 Understanding this embodiment, Figure 2 This is a unit block diagram of the song information generation device provided in this embodiment, such as... Figure 2 As shown, the song information generation device provided in this embodiment includes:

[0079] The song retrieval information acquisition unit 201 is used to acquire the input song retrieval information, which includes initial word data or initial lyrics data;

[0080] The target song information acquisition unit 202 is configured to, in response to the song retrieval information being initial word grid data, obtain target word grid data from a preset database whose similarity to the initial word grid data reaches a predetermined similarity threshold, and acquire target song information corresponding to the target word grid data; or, in response to the song retrieval information being initial lyrics data, generate initial word grid data corresponding to the initial lyrics data based on a pre-trained word grid generation model, obtain target word grid data from the preset database whose similarity to the initial word grid data reaches a predetermined similarity threshold, and acquire target song information corresponding to the target word grid data;

[0081] The target song information output unit 203 is used to output the target song information;

[0082] The database contains associated word grid data and the corresponding song information.

[0083] Optionally, the device further includes:

[0084] The historical lyrics data acquisition unit is used to acquire historical lyrics data of historical songs;

[0085] The word grid data generation unit is used to perform data cleaning on the historical lyrics data and generate word grid data of the historical lyrics data based on the word grid generation model;

[0086] The association information storage unit is used to store the association information between the word pattern data and the song information of the historical songs in the database.

[0087] Optionally, the word case generation model is trained in the following manner:

[0088] Obtain the target pre-trained model;

[0089] Obtain lyrics data samples and corresponding word grid data samples;

[0090] Based on the lyrics data samples, the word grid data samples, and the target pre-trained model, a model is trained to obtain a word grid generation model for generating word grid data corresponding to the input lyrics data.

[0091] Optionally, obtaining the target pre-trained model includes:

[0092] Obtain text corpus;

[0093] Based on the text corpus, a language model is pre-trained to obtain an initial pre-trained model;

[0094] The initial pre-trained model is trained using the lyrics text corpus to obtain the target pre-trained model.

[0095] Optionally, the pre-training of the language model based on the text corpus includes:

[0096] The language model is pre-trained using a pre-training task and the text corpus.

[0097] Optionally, the pre-training task includes at least one of the following:

[0098] Pre-trained task MLM;

[0099] Pre-training task NSP.

[0100] Optionally, the method further includes: calculating the similarity between the initial word case data and the word case data stored in the database using one of the following methods:

[0101] Semantic similarity of word vectors;

[0102] Cosine similarity;

[0103] European distance;

[0104] Manhattan distance;

[0105] Distance between Han and Min people.

[0106] Optionally, the target song information includes at least one of the following:

[0107] Lyrics data for the target song;

[0108] The author of the target song;

[0109] The composition of the target song;

[0110] The name of the target song.

[0111] In the above embodiments, a song information generation method and a song information generation device are provided. Furthermore, the third embodiment of this application also provides an electronic device. Since the electronic device embodiment is basically similar to the method embodiment, it is described simply. For details of the relevant technical features, please refer to the corresponding descriptions of the above-provided method embodiments. The following description of the electronic device embodiment is merely illustrative. The electronic device embodiment is as follows:

[0112] Please refer to Figure 3 To understand this embodiment, Figure 3 This is a schematic diagram of the logical structure of the electronic device provided in this embodiment. Figure 3 As shown, the electronic device provided in this embodiment includes: a processor 301 and a memory 302;

[0113] The memory 302 is used to store computer instructions for executing the above-described song information provision method. When these computer instructions are read and executed by the processor 301, they perform the following operations:

[0114] Obtain the input song retrieval information, which includes initial word structure data or initial lyrics data;

[0115] In response to the song retrieval information being initial word grid data, target word grid data with a similarity threshold reaching a predetermined similarity threshold is obtained from a preset database, and the target song information corresponding to the target word grid data is acquired; or,

[0116] In response to the song retrieval information being initial lyrics data, based on a pre-trained word grid generation model, initial word grid data corresponding to the initial lyrics data is generated, and target word grid data with a similarity to the initial word grid data reaching a predetermined similarity threshold is obtained from the preset database, thereby acquiring the target song information corresponding to the target word grid data;

[0117] Output the target song information;

[0118] The database contains associated word grid data and the corresponding song information.

[0119] Optional, also includes:

[0120] Retrieve historical lyrics data for historical songs;

[0121] The historical lyrics data is cleaned, and based on the word pattern generation model, word pattern data of the historical lyrics data is generated;

[0122] The association information between the word pattern data and the song information of the historical songs is stored in the database.

[0123] Optionally, the word case generation model is trained in the following manner:

[0124] Obtain the target pre-trained model;

[0125] Obtain lyrics data samples and corresponding word grid data samples;

[0126] Based on the lyrics data samples, the word grid data samples, and the target pre-trained model, a model is trained to obtain a word grid generation model for generating word grid data corresponding to the input lyrics data.

[0127] Optionally, obtaining the target pre-trained model includes:

[0128] Obtain text corpus;

[0129] Based on the text corpus, a language model is pre-trained to obtain an initial pre-trained model;

[0130] The initial pre-trained model is trained using the lyrics text corpus to obtain the target pre-trained model.

[0131] Optionally, the pre-training of the language model based on the text corpus includes:

[0132] The language model is pre-trained using a pre-training task and the text corpus.

[0133] Optionally, the pre-training task includes at least one of the following:

[0134] Pre-trained task MLM;

[0135] Pre-training task NSP.

[0136] Optionally, it also includes: calculating the similarity between the initial word case data and the word case data stored in the database using one of the following methods:

[0137] Semantic similarity of word vectors;

[0138] Cosine similarity;

[0139] European distance;

[0140] Manhattan distance;

[0141] Distance between Han and Min people.

[0142] Optionally, the target song information includes at least one of the following:

[0143] Lyrics data for the target song;

[0144] The author of the target song;

[0145] The composition of the target song;

[0146] The name of the target song.

[0147] In the above embodiments, a song information generation method, a song information generation device, and an electronic device are provided. Furthermore, the fourth embodiment of this application also provides a computer-readable storage medium for implementing the above song information generation method. The computer-readable storage medium embodiments provided in this application are described relatively simply; relevant parts can be found in the corresponding descriptions of the above method embodiments. The embodiments described below are merely illustrative.

[0148] The computer-readable storage medium provided in this embodiment stores computer instructions, which, when executed by a processor, perform the following steps:

[0149] Obtain the input song retrieval information, which includes initial word structure data or initial lyrics data;

[0150] In response to the song retrieval information being initial word grid data, target word grid data with a similarity threshold reaching a predetermined similarity threshold is obtained from a preset database, and the target song information corresponding to the target word grid data is acquired; or,

[0151] In response to the song retrieval information being initial lyrics data, based on a pre-trained word grid generation model, initial word grid data corresponding to the initial lyrics data is generated, and target word grid data with a similarity to the initial word grid data reaching a predetermined similarity threshold is obtained from the preset database, thereby acquiring the target song information corresponding to the target word grid data;

[0152] Output the target song information;

[0153] The database contains associated word grid data and the corresponding song information.

[0154] Optional, also includes:

[0155] Retrieve historical lyrics data for historical songs;

[0156] The historical lyrics data is cleaned, and based on the word pattern generation model, word pattern data of the historical lyrics data is generated;

[0157] The association information between the word pattern data and the song information of the historical songs is stored in the database.

[0158] Optionally, the word case generation model is trained in the following manner:

[0159] Obtain the target pre-trained model;

[0160] Obtain lyrics data samples and corresponding word grid data samples;

[0161] Based on the lyrics data samples, the word grid data samples, and the target pre-trained model, a model is trained to obtain a word grid generation model for generating word grid data corresponding to the input lyrics data.

[0162] Optionally, obtaining the target pre-trained model includes:

[0163] Obtain text corpus;

[0164] Based on the text corpus, a language model is pre-trained to obtain an initial pre-trained model;

[0165] The initial pre-trained model is trained using the lyrics text corpus to obtain the target pre-trained model.

[0166] Optionally, the pre-training of the language model based on the text corpus includes:

[0167] The language model is pre-trained using a pre-training task and the text corpus.

[0168] Optionally, the pre-training task includes at least one of the following:

[0169] Pre-trained task MLM;

[0170] Pre-training task NSP.

[0171] Optionally, the method further includes: calculating the similarity between the initial word case data and the word case data stored in the database using one of the following methods:

[0172] Semantic similarity of word vectors;

[0173] Cosine similarity;

[0174] European distance;

[0175] Manhattan distance;

[0176] Distance between Han and Min people.

[0177] Optionally, the target song information includes at least one of the following:

[0178] Lyrics data for the target song;

[0179] The author of the target song;

[0180] The composition of the target song;

[0181] The name of the target song.

[0182] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0183] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0184] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.

[0185] 2. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0186] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.

Claims

1. A song information generation method characterized by comprising: The method comprises: acquiring input song search information, the song search information comprising initial word lattice data or initial lyrics data; in response to the song search information being initial word lattice data, obtaining target word lattice data from a preset database that has a similarity to the initial word lattice data reaching a predetermined similarity threshold, and acquiring target song information corresponding to the target word lattice data; or, in response to the song search information being initial lyrics data, generating initial word lattice data corresponding to the initial lyrics data based on a pre-trained word lattice generation model, obtaining target word lattice data from the preset database that has a similarity to the initial word lattice data reaching a predetermined similarity threshold, and acquiring target song information corresponding to the target word lattice data; outputting the target song information; wherein the database stores word lattice data and song information corresponding to the word lattice data in association, and the word lattice data is data distinguished based on length in lyrics.

2. The method of claim 1, wherein, The method further comprises: acquiring historical lyrics data of historical songs; performing data cleaning on the historical lyrics data, and generating word lattice data of the historical lyrics data based on the word lattice generation model; storing association information between the word lattice data and song information of the historical songs in the database.

3. The method according to claim 1 or 2, characterized in that, The word lattice generation model is obtained through training in the following manner: obtaining a target pre-training model; acquiring lyrics data samples and word lattice data samples corresponding to the lyrics data samples; performing model training based on the lyrics data samples, the word lattice data samples, and the target pre-training model to obtain a word lattice generation model for generating word lattice data corresponding to input lyrics data.

4. The method of claim 3, wherein, The obtaining of the target pre-training model comprises: acquiring a text corpus; performing language model pre-training based on the text corpus to obtain an initial pre-training model; training the initial pre-training model using lyrics text corpus to obtain the target pre-training model.

5. The method of claim 4, wherein, The language model pre-training based on the text corpus comprises: performing language model pre-training using a pre-training task and the text corpus.

6. The method of claim 5, wherein, The pre-training task comprises at least one of: a pre-training task MLM; a pre-training task NSP.

7. The method of claim 1, wherein, Further comprising: calculating the similarity between the initial word lattice data and the word lattice data stored in the database in one of the following manners: semantic similarity of word vectors; cosine similarity; Euclidean distance; Manhattan distance; Hammings distance.

8. The method of claim 1, wherein, The target song information comprises at least one of: lyrics data of a target song; an author of a target song; a composition of a target song; a name of a target song.

9. A song information generating apparatus characterized by comprising: The device comprises: a song search information acquisition unit configured to acquire input song search information, the song search information comprising initial word lattice data or initial lyrics data; The target song information obtaining unit is configured to, in response to the song retrieval information being initial word lattice data, obtain target word lattice data with a similarity to the initial word lattice data reaching a predetermined similarity threshold from a preset database, and obtain target song information corresponding to the target word lattice data; or, in response to the song retrieval information being initial lyrics data, generate initial word lattice data corresponding to the initial lyrics data based on a pre-trained word lattice generation model, obtain target word lattice data with a similarity to the initial word lattice data reaching a predetermined similarity threshold from the preset database, and obtain target song information corresponding to the target word lattice data. The target song information output unit is configured to output the target song information. The database stores word lattice data and song information corresponding to the word lattice data in association.

10. An electronic device, comprising: The device comprises a processor and a memory. The memory is configured to store one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the method of any one of claims 1-8.

11. A computer readable storage medium having stored thereon one or more computer instructions, wherein, The instructions are executed by the processor to implement the method of any one of claims 1-8.

Citation Information

Patent Citations

  • Song retrieval method and device, server and storage medium

    CN111198965A

  • Method and device for generating music for lyrics text, and computer-readable storage medium

    WO2020015153A1