Music detection method, apparatus, device, and medium
By calculating the similarity between musical scores and lyrics, and combining this with the percentage of modifications, the problem of high cost and low accuracy in music originality detection has been solved, achieving efficient and accurate judgment of music originality.
Patent Information
- Application Number
- CN202411846914.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-12-13
AI Technical Summary
Existing technologies for detecting the originality of music are costly and inaccurate, making it difficult to determine the proportion of creation by musicians and AI-generated music.
By acquiring the sheet music and lyrics of the target music and reference music, the similarity between the sheet music and lyrics is calculated using edit distance and similarity algorithms. The originality of the music is then determined by combining the percentage of sheet music modifications and the percentage of lyrics modifications.
It reduces the cost of music originality detection, improves the accuracy of detection, and can effectively identify the originality of music.
Smart Images

Figure CN119673207B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a music detection method and device, equipment and medium. BACKGROUND
[0002] In a music creation scenario, a user (such as a musician) usually directly creates new music or modifies existing music. To effectively protect the rights of the user's original music work, the originality of the music is detected by manual comparison to determine whether the music is original.
[0003] Under the related art, the lyrics, melody, chord, mode and key of the music song are usually compared manually to obtain a music originality determination result.
[0004] However, this method has a high cost and certain errors. SUMMARY
[0005] To solve the above technical problems, the present application provides a music detection method, device, electronic equipment and storage medium.
[0006] In one aspect, the present application provides a music detection method, comprising:
[0007] obtaining target music description information of target music to be detected;
[0008] obtaining reference music description information of reference music corresponding to the target music;
[0009] determining a score similarity between the reference music and the target music according to first score information in the reference music description information and second score information in the target music description information;
[0010] obtaining an originality detection result of the target music according to the score similarity; the originality detection result indicates whether the target music is original.
[0011] In one embodiment, obtaining the originality detection result of the target music according to the score similarity comprises:
[0012] using any one of the following:
[0013] if there is no lyrics in the reference music and the target music, determining whether the score of the target music is original according to the score similarity;
[0014] If the reference music or the target music contains lyrics, the lyrics similarity between the reference music and the target music is determined according to the first lyrics information in the reference music description information and the second lyrics information in the target music description information, and the melody and the lyrics of the target music are respectively determined to be original or not according to the melody similarity and the lyrics similarity.
[0015] In an implementation, the lyrics similarity between the reference music and the target music is determined according to the first lyrics information in the reference music description information and the second lyrics information in the target music description information, including:
[0016] A first edit distance between the first lyrics information and the second lyrics information is determined; the first edit distance is determined according to the minimum number of editing operations for converting the first lyrics information into the second lyrics information;
[0017] A first lyrics length of the first lyrics information and a second lyrics length of the second lyrics information are obtained;
[0018] A total lyrics length between the first lyrics length and the second lyrics length is determined;
[0019] A first difference between the total lyrics length and the first edit distance is determined;
[0020] The lyrics similarity is obtained according to the ratio between the first difference and the total lyrics length.
[0021] In an implementation, the melody and the lyrics of the target music are respectively determined to be original or not according to the melody similarity and the lyrics similarity, including:
[0022] A melody modification proportion is determined according to the melody similarity; the melody modification proportion is negatively correlated with the melody similarity;
[0023] If the melody modification proportion is higher than a first proportion threshold, it is determined that the melody of the target music is original, otherwise, it is determined that the melody of the target music is not original;
[0024] A lyrics modification proportion is determined according to the lyrics similarity; the lyrics modification proportion is negatively correlated with the lyrics similarity;
[0025] If the lyrics modification proportion is higher than a second proportion threshold, it is determined that the lyrics of the target music is original, otherwise, it is determined that the lyrics of the target music is not original.
[0026] In an implementation, the melody modification proportion is determined according to the melody similarity, including:
[0027] A third difference between 1 and the melody similarity is determined;
[0028] The proportion of the modification of the score is obtained according to a product of the score adjustment coefficient and the third difference value.
[0029] In an implementation, the proportion of the modification of the lyrics is determined according to the lyric similarity, including:
[0030] A fourth difference value between the first difference value and the lyric similarity is determined.
[0031] The proportion of the modification of the lyrics is obtained according to a product of the lyric adjustment coefficient and the fourth difference value.
[0032] In an implementation, the score similarity between the reference music and the target music is determined according to the first score information in the reference music description information and the second score information in the target music description information, including:
[0033] A second edit distance between the first score information and the second score information is determined; the second edit distance is determined according to a minimum number of editing operations for converting the first score information into the second score information;
[0034] A first score length of the first score information and a second score length of the second score information are obtained.
[0035] A total score length between the first score length and the second score length is determined.
[0036] A second difference value between the total score length and the second edit distance is determined.
[0037] The score similarity is obtained according to a ratio between the second difference value and the total score length.
[0038] In an implementation, the reference music description information includes the first score information, or includes the first score information and first lyric information.
[0039] Before obtaining the reference music description information of the reference music corresponding to the target music, the method further includes:
[0040] The reference music is generated based on the prompt information input by the user by using an artificial intelligence algorithm.
[0041] The reference music is stored by snapshot to obtain reference music snapshot data.
[0042] The score information in the reference music snapshot data is processed in a format to obtain the first score information.
[0043] If the reference music further includes lyrics, the lyric information in the reference music snapshot data is processed in a format to obtain the first lyric information.
[0044] In an implementation, the score information in the reference music snapshot data is formatted to obtain first score information, including:
[0045] According to the score information in the reference music snapshot data, the note description information of each note in the reference music is determined respectively;
[0046] According to the order of the notes, the note description information corresponding to each note in the reference music is converted into a string to obtain the first score information.
[0047] In an implementation, the note description information includes at least one of the following:
[0048] Note duration, note pitch, note text, note position, and note tie state.
[0049] In an implementation, the lyrics information in the reference music snapshot data is formatted to obtain first lyrics information, including:
[0050] According to the lyrics information in the reference music snapshot data, the lyrics of the reference music are divided to obtain a plurality of sentences and lyrics paragraphs corresponding to the sentences respectively;
[0051] According to the sentences and the lyrics paragraphs corresponding to the sentences respectively, the sentences are divided to obtain a sentence set corresponding to each lyrics paragraph;
[0052] According to the order of the lyrics paragraphs, the lyrics paragraphs and the sentence sets corresponding to the lyrics paragraphs are sorted to obtain sorted lyrics paragraphs and the sentence sets corresponding to the lyrics paragraphs respectively;
[0053] The sorted lyrics paragraphs and the sentence sets corresponding to the lyrics paragraphs are converted into a string to obtain the first lyrics information.
[0054] In an implementation, the target music description information includes the second score information, or includes the second score information and the second lyrics information;
[0055] Before obtaining the target music description information of the target music to be detected, the method further includes:
[0056] According to the modification instruction of the user, the reference music is modified to obtain the target music;
[0057] Based on the snapshot of the target music, target music snapshot data is obtained;
[0058] The score information in the target music snapshot data is formatted to obtain second score information;
[0059] If the target music also contains lyrics, the lyrics information in the target music snapshot data is formatted to obtain second lyrics information.
[0060] In an embodiment, the score information in the target music snapshot data is formatted to obtain second score information, including:
[0061] According to the score information in the target music snapshot data, the note description information of each note in the target music is determined respectively;
[0062] According to the order of each note, the string conversion of each note in the target music and its corresponding note description information is performed to obtain the second score information.
[0063] In an embodiment, the lyrics information in the target music snapshot data is formatted to obtain second lyrics information, including:
[0064] According to the lyrics information in the target music snapshot data, the lyrics of the target music are divided to obtain a plurality of sentences and their corresponding lyrics paragraphs;
[0065] According to each sentence and its corresponding lyrics paragraph, each sentence is divided to obtain a sentence set corresponding to each lyrics paragraph;
[0066] According to the order of each lyrics paragraph, the sorting of each lyrics paragraph and its corresponding sentence set is performed to obtain the sorted lyrics paragraph and its corresponding sentence set;
[0067] The string conversion of the sorted lyrics paragraph and its corresponding sentence set is performed to obtain the second lyrics information.
[0068] In an embodiment, the music detection device provided in the present application includes:
[0069] A first obtaining unit is configured to obtain target music description information of target music to be detected;
[0070] A second obtaining unit is configured to obtain reference music description information of reference music corresponding to the target music;
[0071] A determining unit is configured to determine the score similarity between the reference music and the target music according to the first score information in the reference music description information and the second score information in the target music description information;
[0072] An obtaining unit is configured to obtain an originality detection result of the target music according to the score similarity, wherein the originality detection result indicates whether the target music is original.
[0073] In an embodiment, the obtaining unit is configured to:
[0074] Any one of the following is adopted:
[0075] If there is no lyrics in the reference music and the target music, the score of the target music is determined to be original or not according to the score similarity;
[0076] If there is lyrics in the reference music or the target music, the lyrics similarity between the reference music and the target music is determined according to the first lyrics information in the reference music description information and the second lyrics information in the target music description information, and the score and the lyrics of the target music are respectively determined to be original or not according to the score similarity and the lyrics similarity.
[0077] In an embodiment, the obtaining unit is configured to:
[0078] determine a first edit distance between the first lyrics information and the second lyrics information; the first edit distance is determined according to the minimum number of editing operations for converting the first lyrics information into the second lyrics information;
[0079] obtain a first lyrics length of the first lyrics information and a second lyrics length of the second lyrics information;
[0080] determine a total lyrics length between the first lyrics length and the second lyrics length;
[0081] determine a first difference value between the total lyrics length and the first edit distance;
[0082] obtain the lyrics similarity according to the ratio between the first difference value and the total lyrics length.
[0083] In an embodiment, the obtaining unit is configured to:
[0084] determine a score modification proportion according to the score similarity; the score modification proportion is negatively correlated with the score similarity;
[0085] if the score modification proportion is higher than a first proportion threshold, it is determined that the score of the target music is original, otherwise, it is determined that the score of the target music is not original;
[0086] determine a lyrics modification proportion according to the lyrics similarity; the lyrics modification proportion is negatively correlated with the lyrics similarity;
[0087] if the lyrics modification proportion is higher than a second proportion threshold, it is determined that the lyrics of the target music is original, otherwise, it is determined that the lyrics of the target music is not original.
[0088] In an embodiment, the obtaining unit is configured to:
[0089] determine a third difference value between 1 and the score similarity;
[0090] The score modification proportion is obtained according to a product between the score adjustment coefficient and the third difference value.
[0091] In an implementation, the obtaining unit is configured to:
[0092] determine a fourth difference value between 1 and the lyric similarity;
[0093] The lyric modification proportion is obtained according to a product between the lyric adjustment coefficient and the fourth difference value.
[0094] In an implementation, the determining unit is configured to:
[0095] determine a second edit distance between the first score information and the second score information; the second edit distance is determined according to a minimum number of editing operations for converting the first score information into the second score information;
[0096] obtain a first score length of the first score information, and a second score length of the second score information;
[0097] determine a total score length between the first score length and the second score length;
[0098] determine a second difference value between the total score length and the second edit distance;
[0099] The score similarity is obtained according to a ratio between the second difference value and the total score length.
[0100] In an implementation, the reference music description information includes the first score information, or includes the first score information and first lyric information;
[0101] The second obtaining unit is further configured to:
[0102] generate the reference music based on the prompt information input by the user by using an artificial intelligence algorithm;
[0103] perform snapshot storage on the reference music to obtain reference music snapshot data;
[0104] perform format processing on score information in the reference music snapshot data to obtain the first score information;
[0105] If the reference music further includes lyrics, perform format processing on lyric information in the reference music snapshot data to obtain first lyric information.
[0106] In an implementation, the second obtaining unit is further configured to:
[0107] determine, according to the score information in the reference music snapshot data, note description information of each note in the reference music;
[0108] According to the order of the notes, the note description information corresponding to each note in the reference music is converted into a string to obtain first score information.
[0109] In an implementation, the note description information includes at least one of the following:
[0110] Note duration, note position, note text, note text, and note pitch.
[0111] In an implementation, the second acquisition unit is further configured to:
[0112] According to the lyrics information in the reference music snapshot data, the lyrics of the reference music are divided to obtain a plurality of sentences and their corresponding lyrics paragraphs;
[0113] According to the lyrics information in the reference music snapshot data, the lyrics of the reference music are divided to obtain a plurality of sentences and their corresponding lyrics paragraphs;
[0114] According to the order of the lyrics paragraphs, the lyrics paragraphs and their corresponding sentence sets are sorted to obtain sorted lyrics paragraphs and their corresponding sentence sets;
[0115] The sorted lyrics paragraphs and their corresponding sentence sets are converted into a string to obtain first lyrics information.
[0116] In an implementation, the target music description information includes second score information, or includes second score information and second lyrics information;
[0117] The first acquisition unit is further configured to:
[0118] According to the user's modification instruction, the reference music is modified to obtain target music;
[0119] Based on the snapshot of the target music, target music snapshot data is obtained;
[0120] The score information in the target music snapshot data is formatted to obtain second score information;
[0121] If the target music also contains lyrics, the lyrics information in the target music snapshot data is formatted to obtain second lyrics information.
[0122] In an implementation, the first acquisition unit is further configured to:
[0123] According to the score information in the target music snapshot data, the note description information of each note in the target music is determined;
[0124] According to the order of the notes, the notes in the target music and the note description information corresponding to the notes are converted into strings to obtain second score information.
[0125] In an implementation form, the first obtaining unit is further configured to:
[0126] According to the lyric information in the target music snapshot data, lyrics of the target music are divided to obtain a plurality of sentences and lyric paragraphs corresponding to the sentences respectively.
[0127] According to the sentences and the lyric paragraphs corresponding to the sentences respectively, the sentences are divided to obtain a sentence set corresponding to each lyric paragraph.
[0128] According to the order of the lyric paragraphs, the lyric paragraphs and the sentence sets corresponding to the lyric paragraphs are sorted to obtain sorted lyric paragraphs and the sentence sets corresponding to the lyric paragraphs.
[0129] The sorted lyric paragraphs and the sentence sets corresponding to the lyric paragraphs are converted into strings to obtain second lyric information.
[0130] In an aspect, an electronic device is provided in the embodiments of the present application, and the electronic device comprises:
[0131] a processor; and
[0132] a memory storing computer instructions, the computer instructions being configured to cause the processor to perform the steps of the method provided in any of the various optional implementation forms of the music detection.
[0133] In an aspect, a storage medium is provided in the embodiments of the present application, and the storage medium stores computer instructions, the computer instructions being configured to cause a computer to perform the steps of the method provided in any of the various optional implementation forms of the music detection.
[0134] The music detection method in the embodiments of the present application comprises obtaining target music description information of target music to be detected, obtaining reference music description information of reference music corresponding to the target music, determining score similarity between the reference music and the target music according to first score information in the reference music description information and second score information in the target music description information, obtaining an originality detection result of the target music according to the score similarity, and the originality detection result indicating whether the target music has originality. In this way, the cost of music originality detection can be reduced, and the accuracy of music originality detection can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0135] In order to more clearly illustrate the technical solutions in the specific embodiments of the present application or the prior art, the accompanying drawings needed to be used in the description of the specific embodiments or the prior art will be briefly introduced. Obviously, the accompanying drawings in the following description are some embodiments of the present application, and all other embodiments obtained by a person of ordinary skill in the art without creative work based on these drawings are within the protection scope of the present application. In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as there is no conflict.
[0136] Figure 1 is a flowchart of a music detection method in an embodiment of the present application.
[0137] Figure 2 is a timeline example diagram of a music snapshot in an embodiment of the present application.
[0138] Figure 3 is a MIDI score chart in an embodiment of the present application.
[0139] Figure 4 is a flowchart of a second score information generation method in an embodiment of the present application.
[0140] Figure 5 is an example diagram of JSON data in an embodiment of the present application.
[0141] Figure 6 is a flowchart of a song lyric formatting method in an embodiment of the present application.
[0142] Figure 7 is a schematic diagram of data formatting in an embodiment of the present application.
[0143] Figure 8 is a flowchart of an originality judgment method in an embodiment of the present application.
[0144] Figure 9 is a structural block diagram of a music detection device in an embodiment of the present application.
[0145] Figure 10 is a structural schematic diagram of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION
[0146] The technical solutions of the present application will be described clearly and completely in conjunction with the accompanying drawings. Obviously, the described embodiments are some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work are within the protection scope of the present application. In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as there is no conflict.
[0147] In a music creation scenario, a musician usually directly creates new music or modifies existing music. For example, with the development of artificial intelligence (AI) technology, an artificial intelligence generated content (AIGC) platform can usually generate music through AI. The musician can further modify and edit the AI-generated music and store it on the AIGC platform, for example, the lyrics of a song can be modified, the key signature or chord progression of a song can be modified, and so on.
[0148] When the musician downloads a song from the AIGC platform, the authorization of the AIGC platform is required, and the AIGC platform is difficult to identify whether the song is original. Usually, the copyright of the music work is 100% attributed to the AIGC platform, which will lead to the fact that the part of the work of the musician is ignored and the creation right of the musician cannot be effectively protected.
[0149] Under the related art, the originality of music is usually judged by manual comparison. However, by using this method, the labor cost and time of music originality detection are high, the accuracy of detection is low, and only whether the music is purely AI-generated or has the participation of the musician can be judged, but the proportion of music creation corresponding to the musician and AI cannot be judged, that is, the originality of the musician.
[0150] To solve the technical problems existing in the related art, a music detection method, device, equipment and medium are provided in the embodiments of the present application.
[0151] The various scenarios to which the present application is applied are illustrated below.
[0152] In one application scenario, the music generated by AI is used as reference music, and the music to be detected is used as target music, and the originality of the target music is detected based on the reference music.
[0153] In another application scenario, the music created first among two music to be compared is used as reference music, and the other music is used as target music, and the originality of the target music is detected based on the reference music.
[0154] In one implementation, the score similarity between the reference music and the target music is determined according to the first score information in the reference music description information and the second score information in the target music description information; the originality detection result of the target music is obtained according to the score similarity; and the originality detection result indicates whether the target music has originality.
[0155] In another implementation, the score similarity between the reference music and the target music is determined according to the first score information in the reference music description information and the second score information in the target music description information; the lyric similarity between the reference music and the target music is determined according to the first lyric information in the reference music description information and the second lyric information in the target music description information, and whether the score and the lyric of the target music are original is determined according to the score similarity and the lyric similarity, respectively.
[0156] It should be noted that the above application scenarios are only shown for the purpose of facilitating the understanding of the spirit and principles of the present application, and the implementation of the present application is not limited in this respect. On the contrary, the implementation of the present application can be applied to any applicable scenario.
[0157] In the embodiments of the present application, a music detection method is provided, which can be applied to an electronic device. The type of the electronic device is not limited in the present application, which can be any applicable device type, such as a terminal device and a server, and the like, which will not be described herein.
[0158] Referring to Figure 1 FIG. 1 shows a flowchart of the music detection method in the embodiments of the present application, and the method will be described below in combination with Figure 1 The specific implementation process of the method is as follows:
[0159] Step 101: Obtain target music description information of target music to be detected.
[0160] The target music description information can include only the second score information, or include the second score information and the second lyric information.
[0161] Further, the target music description information including the second score information and the second lyric information can be obtained by the following steps:
[0162] S1011: Modify the reference music according to the user's modification instruction to obtain the target music.
[0163] Optionally, the reference music can be AI generated or composed by a musician.
[0164] In one implementation, the target music can be obtained based on the reference music, and after the target music is determined, the reference music corresponding to the target music can be searched in the music database, for example, music similar to the target music can be used as the reference music, and music specified by the user can also be used as the reference music. The reference music and the target music can also be any two music to be compared.
[0165] In actual application, the reference music and the target music can be set according to actual application scenarios, and no limitation is made herein.
[0166] S1012: Obtain target music snapshot data based on the snapshot of the target music.
[0167] In an implementation, the song engineering information of the target music can be stored by snapshot at any time point, and a timestamp corresponding to the target music snapshot data is stored.
[0168] Optionally, the timestamp can be the time of the snapshot storage operation, or the music modification and saving time. Optionally, the music can be stored by snapshot at each music modification and saving time. The target music snapshot data can also be stored persistently. The user can modify at least one of the lyrics, the melody and the performance of the music. When the target music snapshot data is stored, the lyrics, the melody and the performance of the music can be stored respectively for subsequent detection.
[0169] The following will be described in combination with Figure 2 The timeline of the music snapshot is exemplarily illustrated. Referring to Figure 2 , which is an example diagram of the timeline of the music snapshot. Figure 2 In the timeline of the music snapshot, the timestamp of the original music version and the timestamp of each modification and saving action are shown, and the timestamps of the music version 1, the music version 2 and the final music version are shown in sequence.
[0170] S1013: Format the score information in the target music snapshot data to obtain second score information.
[0171] In the embodiments of the present application, only the originality detection based on the lyrics and the score of the music is taken as an example for description, and therefore, the lyrics and the score of the music can be formatted respectively.
[0172] In an implementation, the note description information of each note in the target music is determined based on the score information in the target music snapshot data; the notes in the target music and the note description information corresponding to the notes respectively are converted into a string according to the order of the notes to obtain the second score information.
[0173] The melody part is the melody of the music. Optionally, the data can be converted into a lightweight data interchange format (JavaScript Object Notation, JSON) and stored in a database in a persistent manner according to the formal structure sequence of the music. The formal structure sequence refers to the arrangement of different paragraphs (i.e., lyric paragraphs) in a song. Each lyric paragraph in the music can be numbered and sorted according to the order of the numbers. For example, the paragraph number section_index can start from 0.
[0174] The following illustrates various paragraph types of lyric paragraphs. At least one of the following can be included, but is not limited to: verse, chorus, bridge, intro, interlude, and outro.
[0175] The verse is usually the main narrative part of the song, describing the development of a story or emotion. The chorus is the core part of the song, usually containing the theme or climax of the song, easy to remember and repeat. The bridge is used to connect the verse and chorus, providing contrast or turning points, and adding layers to the song. The intro is the part at the beginning of the song, used to introduce the melody and rhythm. The interlude is located in the middle or end of the song, used for transition or emphasis on a certain part. The outro is the ending part of the song, sometimes similar to the intro, used to wrap up.
[0176] The score information can be Musical Instrument Digital Interface (MIDI) standard score information. MIDI standard is a music data format for communication between electronic musical instruments and computers. In MIDI visualization, MIDI data is parsed and presented in a graphical manner, allowing music producers, educators and ordinary users to visually see the structure, rhythm and melody of the music.
[0177] Referring to Figure 3 , a MIDI score chart is shown. Figure 3 In the chart, the horizontal axis is time and the vertical axis is pitch, used to display the pitch waveform curve of each note in a piece of music.
[0178] The following will be described in conjunction with Figure 4 The generation process of the second score information will be described. Referring to Figure 4 , a flowchart of a second score information generation method is shown. The specific process of the method includes:
[0179] S401: Obtain score information in the target music snapshot data.
[0180] S402: Based on the MIDI standard melody parsing algorithm, it parses the score information and obtains the parsing results.
[0181] S403: Based on the analysis results, obtain the note description information for each note in the target music.
[0182] S404: Convert the description information of each note into JSON to obtain JSON data.
[0183] S405: Store JSON data in a database.
[0184] The database can be of any type.
[0185] The note description information includes at least one of the following: note legato, note position, note text, note duration, and note pitch.
[0186] The legato status of a note can be represented as `is_slur`, indicating whether the note is legato. The note position can be represented as `position`, indicating the measure number of the note. Note text can include, but is not limited to, characters from lyrics (such as text and symbols) and spaces. The note duration can be represented as `duration`, indicating the length of time the note lasts, and the note pitch can be represented as `pitch`, indicating the pitch of the note.
[0187] The following is combined with Figure 5 Example illustration of JSON data. See also... Figure 5 The image shown is an example diagram of JSON data. Figure 5 In the code ["is_slur":false,"text":"and","position":24,"duration":4,"pitch":"A3"}, "is_slur":false," indicates that the note is not slurred, "position" indicates that the note position is 24, "text":"and" indicates that the note text is "and", "duration":4 indicates that the note duration is 4, and "pitch":"A3" indicates that the note pitch is A3.
[0188] This allows us to obtain the formatted second score information, improving the convenience of storage and subsequent comparison.
[0189] S1014: If the target music also contains lyrics, then the lyrics information in the target music snapshot data is formatted to obtain second lyrics information.
[0190] The following is combined with Figure 6 This section provides an example of lyric formatting. See also... Figure 6As shown, a flowchart of a method for lyrics formatting is shown, and the method includes the following steps:
[0191] S601: According to the lyrics information in the target music snapshot data, the lyrics of the target music are divided to obtain a plurality of sentences and their respectively corresponding lyrics paragraphs.
[0192] Optionally, the lyrics information can be stored in a txt file. In an embodiment, each line of lyrics is taken as a sentence, and the lyrics paragraph to which each sentence belongs is determined.
[0193] Further, a key-value pair between the lyrics paragraph and the sentence set, i.e., a mapping relationship (map) between the lyrics paragraph and the sentence set, can be established. The key in the key-value pair is the paragraph (section), and the value is the sentence set.
[0194] S602: According to each sentence and its respectively corresponding lyrics paragraph, each sentence is divided to obtain a sentence set respectively corresponding to each lyrics paragraph.
[0195] S603: According to the order of each lyrics paragraph, each lyrics paragraph and its respectively corresponding sentence set are sorted to obtain sorted each lyrics paragraph and its respectively corresponding sentence set.
[0196] The order of each lyrics paragraph can be the form structure of the music. The form structures of different music can be the same or different.
[0197] S604: The sorted each lyrics paragraph and its respectively corresponding sentence set are converted into a string to obtain second lyrics information.
[0198] Optionally, each sentence set can also be JSONized to obtain JSON data, which can be in the form of a json string (string) format data, and the JSON data is stored in a database.
[0199] The database can be of any type, for example, the database can be a database (TData Base, DB).
[0200] The following is an example of JSON data, the paragraph type is the chorus, the paragraph number is 0, and the sentence_list is a sentence set including a plurality of sentences.
[0201]
[0202] Further, the sentence division, sentence set sorting, and string conversion can also be performed according to the paragraph type.
[0203] In this way, the score data and the lyric data can be respectively formatted and stored, and the convenience of data storage and subsequent detection comparison is improved.
[0204] Referring to Figure 7 Fig. 1 is a schematic diagram of data formatting. Figure 7 In the music description information, the score information and the lyric information are split, and the score information and the lyric information are respectively formatted and processed, and then the formatted and processed data is JSONized and stored in the database.
[0205] The music description information includes target music description information and reference music description information. The score information includes first score information and second score information. The lyric information includes first lyric information and second lyric information.
[0206] Step 102: obtaining reference music description information of reference music corresponding to target music.
[0207] The reference music description information can include only the first score information, or include the first score information and the first lyric information.
[0208] Optionally, the reference music can be selected according to the timestamp or version of the music, for example, the music version directly generated based on AIGC can be selected as the reference music. The latest music version can be selected as the target music.
[0209] In actual application, the target music and the reference music can be selected according to the actual application scene, which is not limited here.
[0210] Further, the following steps can be used to obtain the reference music description information including the first score information and the first lyric information:
[0211] S1021: using an artificial intelligence algorithm to generate reference music based on user input prompt information.
[0212] The AI algorithm can be selected according to the actual application scene, which is not limited here.
[0213] S1022: snapshot storage of the reference music to obtain reference music snapshot data.
[0214] S1023: formatting processing of the score information in the reference music snapshot data to obtain the first score information.
[0215] In one embodiment, according to the score information in the reference music snapshot data, the note description information of each note in the reference music is determined respectively; the note description information corresponding to each note in the reference music is converted into a string according to the order of the notes to obtain the first score information.
[0216] The note description information includes at least one of the following: note tie state, note position, note text, note duration, and note pitch.
[0217] S1024: If the reference music also contains lyrics, the lyrics information in the reference music snapshot data is formatted to obtain first lyrics information.
[0218] In one implementation, when S1024 is performed, the following steps can be used:
[0219] S1024-1: According to the lyrics information in the reference music snapshot data, the lyrics of the reference music are divided to obtain a plurality of sentences and their respectively corresponding lyrics paragraphs.
[0220] S1024-2: According to each sentence and its respectively corresponding lyrics paragraph, each sentence is divided to obtain a sentence set corresponding to each lyrics paragraph.
[0221] S1024-3: According to the order of each lyrics paragraph, each lyrics paragraph and its respectively corresponding sentence set are sorted to obtain sorted each lyrics paragraph and its respectively corresponding sentence set.
[0222] S1024-4: The sorted each lyrics paragraph and its respectively corresponding sentence set are converted into a string to obtain the first lyrics information.
[0223] Wherein, the reference music description information can be obtained based on the similar principle of obtaining the target music description information, which is not limited here.
[0224] Step 103: According to the first score information in the reference music description information and the second score information in the target music description information, determine the score similarity between the reference music and the target music.
[0225] In one implementation, when step 103 is performed, the following steps can be used:
[0226] S1031: Determine the second edit distance between the first score information and the second score information; the second edit distance is determined according to the minimum number of editing operations for converting the first score information to the second score information.
[0227] For example, the editing operation can include at least one of the following: replacing one character with another character, inserting a character, and deleting a character.
[0228] For example, the operation types of each editing operation of converting the first musical score information into the second musical score information are determined, and the second edit distance is obtained according to the operation scores corresponding to the operation types respectively and the number of editing operations. For example, the operation scores corresponding to the deleting operation and the inserting operation are 1, and the operation score of the replacing operation is 2.
[0229] For example, the second edit distance of converting "kitten" into "sitting" is 3, and the conversion process can be as follows:
[0230] kitten→sitten(k→s); sitten→sittin(e→i); sittin→sitting(insert g).
[0231] In the determination of the second edit distance, the following formula can be used:
[0232]
[0233] wherein a and b are two strings, is an indicator function, which is 0 when a i = b j , and is 1 otherwise, and lev a, b i, j represents the Levenshtein distance between the first i characters of a and the first j characters of b, i and j are both natural numbers, and the initial values can both be 1, the first formula in the min operation represents deleting characters from a to reach b, the second formula represents inserting characters, and the third formula represents replacing depending on whether the current characters are the same.
[0234] S1032: Obtain a first musical score length of the first musical score information and a second musical score length of the second musical score information.
[0235] S1033: Determine a total musical score length between the first musical score length and the second musical score length.
[0236] S1034: Determine a second difference between the total musical score length and the total musical score length.
[0237] S1035: Obtain a musical score similarity according to a ratio between the second difference and the total musical score length.
[0238] Optionally, in the determination of the musical score similarity, the following formula can be used:
[0239] r = (sum - h) / sum;
[0240] wherein r is the musical score similarity, sum is the total musical score length, and h is the total musical score length.
[0241] Further, the feature distance between the first score information and the second score information can be used to determine the score similarity. In actual applications, the determination manner of the score similarity can be set according to actual application scenarios, which is not limited herein.
[0242] Step 104: obtaining the originality detection result of the target music according to the score similarity. The originality detection result indicates whether the target music is original.
[0243] In an implementation manner, when the step 104 is performed, any of the following manners can be used:
[0244] Manner one: if there is no lyrics in the reference music and the target music, the score similarity is used to determine whether the score of the target music is original.
[0245] Manner two: if the reference music or the target music contains lyrics, the lyrics similarity between the reference music and the target music is determined according to the first lyrics information in the reference music description information and the second lyrics information in the target music description information, and the score and the lyrics of the target music are respectively determined to be original according to the score similarity and the lyrics similarity.
[0246] In an implementation manner, when the lyrics similarity between the reference music and the target music is determined, the following steps can be used:
[0247] S104-1: determining the first edit distance between the first lyrics information and the second lyrics information. The first edit distance is determined according to the minimum number of editing operations for converting the first lyrics information into the second lyrics information.
[0248] S104-2: obtaining the first lyrics length of the first lyrics information and the second lyrics length of the second lyrics information.
[0249] S104-3: determining the total lyrics length between the first lyrics length and the second lyrics length.
[0250] S104-4: determining the first difference value between the total lyrics length and the first edit distance.
[0251] S104-5: obtaining the lyrics similarity according to the ratio between the first difference value and the total lyrics length.
[0252] The lyrics similarity can be determined based on the similar principle as the determination of the score similarity, which is not repeated herein.
[0253] The following will be described in combination with Figure 8 The originality determination in the manner two will be specifically described, and the reference is made to Figure 8 The flowchart of a method for originality determination is shown in FIG. 4, and the flow of the method includes:
[0254] S801: Determine the percentage of sheet music modifications based on the similarity of the sheet music; the percentage of sheet music modifications is negatively correlated with the similarity of the sheet music.
[0255] In one implementation, a third difference between 1 and the similarity of the score is determined; the percentage of score modification is obtained by multiplying the score adjustment coefficient by the third difference.
[0256] The score adjustment coefficient can be set according to the actual application scenario; for example, it can be 0.95, and there is no restriction here.
[0257] S802: Determine the percentage of lyrics modified based on lyric similarity; the percentage of lyrics modified is negatively correlated with lyric similarity.
[0258] In one implementation, a fourth difference between 1 and the lyrics similarity is determined; the proportion of lyrics modification is obtained by multiplying the lyrics adjustment coefficient and the fourth difference.
[0259] For example, the first lyric of the reference music is: "Free-flying doves show off the color of the blue sky, I sing a song for you to share our joy. There are so many things I want to say to you, but I don't know what to do. Only after heartache can happiness and joy come. From now on, our world will no longer be lonely. I stretch out my hands, hoping that the next moment is the right time for tears to condense into beautiful flowers. Let us believe in the promise of love. Free-flying doves show off the color of the blue sky, I sing a song for you to share our joy. There are so many things I want to say to you, but I don't know what to do. Only after heartache can happiness and joy come. From now on, our world will no longer be lonely. I stretch out my hands, hoping that the next moment is the right time for tears to condense into beautiful flowers. Let us believe in the promise of love. From now on, our world will no longer be lonely. Let's walk together, hoping that this moment will float into the sky and let true feelings turn into beautiful clouds. Embracing is the best choice in life."
[0260] The second lyric information of the target music is: Free-flying doves flaunt the color of the blue sky, singing a song for you to share our joy. There are so many things I want to say to you, but I don't know what to do. Only after heartache can happiness and joy come. The world of two will no longer be lonely. I stretch out my hand, hoping that the next moment is the time for tears to condense into beautiful flowers. Let us believe in the promise of love. Free-flying doves flaunt the color of the blue sky, singing a song for you to share our joy. There are so many things I want to say to you, but I don't know what to do. Only after heartache can happiness and joy come. People find it hard to grasp themselves. I hope there are still beautiful scenes along the way. Vibrant flowers sway. Songs drift across every corner of the world. Gentle breezes blow towards you. You were me yesterday, whom I deeply loved. Day and night have both spoken to me. Whenever I sing this song, I dare not look up at the myriad lights. They slip from my heart with my tears, filling endless loneliness. They carry all the promises in the wind.
[0261] It can be seen that the reference music "two people's world from now on no longer lonely stretch out your hand hope the next moment is time let tears condense into beautiful flowers let us believe the promise of love two people's world from now on no longer lonely together hope this moment floats to the sky let true love into beautiful clouds embrace is the best choice of life", and the target music "sweep over people's own difficult to grasp hope there are beautiful scenery on the way sway colorful flowers song floating over every corner of the world the breeze gently blows to you and me yesterday you are my deep love day and night have told me when singing this song I dare not look up at the lights of the world it with tears from my heart slide filled with endless loneliness it with all the promises in the wind" are different, and the lyrics modification ratio is calculated as 35%.
[0262] S803: Obtain a first ratio threshold and a second ratio threshold.
[0263] The first ratio threshold and the second ratio threshold can be dynamically issued by a configuration center (such as other devices), can be adjusted and issued at any time, can be fixed values stored locally, or can be set by a user. The first ratio threshold and the second ratio threshold can be set according to actual application scenarios, and are not limited herein.
[0264] S804: Obtain a score originality judgment result according to whether the score modification ratio is higher than the first ratio threshold.
[0265] In an embodiment, if the score modification ratio is higher than the first ratio threshold, it is determined that the score of the target music has originality, otherwise, it is determined that the score of the target music does not have originality.
[0266] The score originality judgment result can be whether the score has originality.
[0267] S805: Obtain a lyrics originality judgment result according to whether the lyrics modification ratio is higher than the second ratio threshold.
[0268] In an embodiment, if the lyrics modification ratio is higher than the second ratio threshold, it is determined that the lyrics of the target music have originality, otherwise, it is determined that the lyrics of the target music do not have originality.
[0269] The lyrics originality judgment result can be whether the lyrics have originality.
[0270] S806: Obtain a target music originality detection result based on the score originality judgment result and the lyrics originality judgment result.
[0271] In an embodiment, the score originality judgment result and the lyrics originality judgment result are directly summarized as the target music originality detection result.
[0272] In another implementation, if at least one of the score and the lyrics is original, it is determined that the music is original, otherwise, it is determined that the music is not original.
[0273] In the embodiments of the present application, the originality of the score and the originality of the lyrics can be determined according to the score similarity and the lyrics similarity of the music, and then the originality of the target music can be obtained. In addition, the score modification ratio and the lyrics modification ratio can also be obtained, and the modification content of the music can also be identified without manual identification, which reduces the labor cost and time cost, improves the efficiency, improves the accuracy of originality detection, and can dynamically adjust the rules of originality judgment (such as dynamically adjusting the first proportion threshold and the second proportion threshold), and in the music detection scene of the AIGC platform, the originality of the target music generated based on the AIGC music can be quickly identified, so as to distinguish the music generated only based on AI and the music created by the user.
[0274] Based on the same inventive concept, the embodiments of the present application also provide a music detection device. Since the principles of the above device and equipment for solving problems are similar to those of a music detection method, the implementation of the above device can be referred to the implementation of the method, and the repeated parts will not be described here. The device can be applied to electronic equipment, and the type of electronic equipment is not limited in the present application, which can be any suitable device type, such as terminal equipment and servers, etc., which will not be described here.
[0275] Reference Figure 9 As shown in FIG. 9, the music detection device in the embodiments of the present application is a structure block diagram. In some embodiments, the music detection device of the present application includes:
[0276] The first acquisition unit 901 is configured to acquire target music description information of target music to be detected;
[0277] The second acquisition unit 902 is configured to acquire reference music description information of reference music corresponding to the target music;
[0278] The determination unit 903 is configured to determine a score similarity between the reference music and the target music according to first score information in the reference music description information and second score information in the target music description information.
[0279] The obtaining unit 904 is configured to obtain an originality detection result of the target music according to the score similarity. The originality detection result indicates whether the target music is original.
[0280] In one implementation, the obtaining unit 904 is configured to:
[0281] Any one of the following is used:
[0282] If there is no lyrics in the reference music and the target music, the score similarity is used to determine whether the score of the target music is original;
[0283] If there is lyrics in the reference music or the target music, the first lyrics information in the reference music description information and the second lyrics information in the target music description information are used to determine the lyrics similarity between the reference music and the target music, and the score similarity and the lyrics similarity are used to determine whether the score and the lyrics of the target music are original respectively.
[0284] In an embodiment, the obtaining unit 904 is configured to:
[0285] determine a first edit distance between the first lyrics information and the second lyrics information; the first edit distance is determined according to the minimum number of editing operations for converting the first lyrics information into the second lyrics information;
[0286] obtain a first lyrics length of the first lyrics information and a second lyrics length of the second lyrics information;
[0287] determine a total lyrics length between the first lyrics length and the second lyrics length;
[0288] determine a first difference value between the total lyrics length and the first edit distance;
[0289] obtain the lyrics similarity according to a ratio between the first difference value and the total lyrics length.
[0290] In an embodiment, the obtaining unit 904 is configured to:
[0291] determine a score modification proportion according to the score similarity; the score modification proportion is negatively correlated with the score similarity;
[0292] if the score modification proportion is higher than a first proportion threshold, it is determined that the score of the target music is original, otherwise, it is determined that the score of the target music is not original;
[0293] determine a lyrics modification proportion according to the lyrics similarity; the lyrics modification proportion is negatively correlated with the lyrics similarity;
[0294] if the lyrics modification proportion is higher than a second proportion threshold, it is determined that the lyrics of the target music is original, otherwise, it is determined that the lyrics of the target music is not original.
[0295] In an embodiment, the obtaining unit 904 is configured to:
[0296] determine a third difference value between 1 and the score similarity;
[0297] obtain the score modification proportion according to a product between the score adjustment coefficient and the third difference value.
[0298] In an implementation, the obtaining unit 904 is configured to:
[0299] determine a fourth difference value between the first and the lyric similarity;
[0300] obtain the lyric modification proportion according to a product between the lyric adjustment coefficient and the fourth difference value.
[0301] In an implementation, the determining unit 903 is configured to:
[0302] determine a second edit distance between the first and the second score information; the second edit distance is determined according to a minimum number of editing operations for converting the first score information into the second score information;
[0303] obtain a first score length of the first score information, and a second score length of the second score information;
[0304] determine a total score length between the first score length and the second score length;
[0305] determine a second difference value between the total score length and the second edit distance;
[0306] obtain the score similarity according to a ratio between the second difference value and the total score length.
[0307] In an implementation, the reference music description information comprises the first score information, or comprises the first score information and the first lyric information.
[0308] The second obtaining unit 902 is further configured to:
[0309] generate the reference music based on the prompt information input by the user by using an artificial intelligence algorithm;
[0310] perform snapshot storage on the reference music to obtain reference music snapshot data;
[0311] perform format processing on score information in the reference music snapshot data to obtain the first score information;
[0312] if the reference music further comprises lyrics, perform format processing on lyric information in the reference music snapshot data to obtain the first lyric information.
[0313] In an implementation, the second obtaining unit 902 is further configured to:
[0314] determine note description information of each note in the reference music respectively according to score information in the reference music snapshot data;
[0315] perform string conversion on the note description information corresponding to each note in the reference music respectively according to the order of the notes to obtain the first score information.
[0316] In one implementation, the note description information includes at least one of the following:
[0317] The notes include the legato status, position, text, duration, and pitch.
[0318] In one embodiment, the second acquisition unit 902 is further configured to:
[0319] Based on the lyrics information in the reference music snapshot data, the lyrics of the reference music are divided to obtain multiple sentences and their corresponding lyric segments;
[0320] Based on each sentence and its corresponding lyric segment, the sentences are divided to obtain the sentence set corresponding to each lyric segment.
[0321] Sort the lyric segments and their corresponding sentence sets according to their chronological order to obtain the sorted lyric segments and their corresponding sentence sets.
[0322] The sorted lyric segments and their corresponding sentence sets are converted into strings to obtain the first lyric information.
[0323] In one embodiment, the target music description information includes second musical score information, or includes both second musical score information and second lyrics information;
[0324] The first acquisition unit 901 is also used for:
[0325] Based on the user's modification instructions, the reference music is modified to obtain the target music;
[0326] Obtain target music snapshot data based on snapshots of the target music;
[0327] The sheet music information in the target music snapshot data is formatted to obtain the second sheet music information;
[0328] If the target music also contains lyrics, the lyrics information in the target music snapshot data is formatted to obtain second lyrics information.
[0329] In one embodiment, the first acquisition unit 901 is further configured to:
[0330] Based on the score information in the target music snapshot data, determine the note description information for each note in the target music.
[0331] According to the order of the notes, the notes in the target music and their corresponding note descriptions are converted into strings to obtain the second musical score information.
[0332] In an implementation, the first obtaining unit 901 is further configured to:
[0333] According to the lyric information in the target music snapshot data, lyrics of the target music are divided to obtain a plurality of sentences and lyric paragraphs respectively corresponding to the sentences;
[0334] According to the lyric information in the target music snapshot data, lyrics of the target music are divided to obtain a plurality of sentences and lyric paragraphs respectively corresponding to the sentences;
[0335] According to the lyric information in the target music snapshot data, lyrics of the target music are divided to obtain a plurality of sentences and lyric paragraphs respectively corresponding to the sentences;
[0336] According to the lyric information in the target music snapshot data, lyrics of the target music are divided to obtain a plurality of sentences and lyric paragraphs respectively corresponding to the sentences;
[0337] The music detection method in the embodiment of the application includes obtaining target music description information of target music to be detected; obtaining reference music description information of reference music corresponding to the target music; determining a score similarity between the reference music and the target music according to first score information in the reference music description information and second score information in the target music description information; and obtaining an originality detection result of the target music according to the score similarity. The originality detection result indicates whether the target music is original. In this way, the cost of music originality detection can be reduced, and the accuracy of music originality detection can be improved.
[0338] In the embodiment of the application, an electronic device is provided, which includes:
[0339] a processor; and
[0340] a memory storing computer instructions configured to cause the processor to execute the method of any of the above embodiments.
[0341] In the embodiment of the application, a storage medium storing computer instructions configured to cause a computer to execute the method of any of the above embodiments is provided. Figure 10 A structural schematic diagram of an electronic device 1000 is shown. Referring to Figure 10 As shown, the electronic device 1000 includes a processor 1010 and a memory 1020, and optionally, a power supply 1030, a display unit 1040, and an input unit 1050.
[0342] The processor 1010 is the control center of the electronic device 1000, connects various components by various interfaces and lines, performs various functions of the electronic device 1000 by running or executing software programs and / or data stored in the memory 1020, and thus monitors the electronic device 1000 as a whole.
[0343] In the embodiments of the present application, the processor 1010 performs various steps in the above embodiments when calling the computer programs stored in the memory 1020.
[0344] Optionally, the processor 1010 can include one or more processing units; preferably, the processor 1010 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and applications, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 1010. In some embodiments, the processor, the memory, can be realized on a single chip, and in some embodiments, they can also be realized on independent chips respectively.
[0345] The memory 1020 can mainly include a program storage area and a data storage area, wherein the program storage area can store the operating system, various applications, etc.; the data storage area can store the data created according to the use of the electronic device 1000, etc. In addition, the memory 1020 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device, etc.
[0346] The electronic device 1000 further includes a power supply 1030 (such as a battery) for supplying power to various components, which can be logically connected to the processor 1010 through a power management system, so as to realize the functions of managing charging, discharging and power consumption, etc. through the power management system.
[0347] The display unit 1040 can be used to display information input by the user or information provided to the user and various menus of the electronic device 1000, etc., and in the embodiments of the present application, it is mainly used to display the display interface of each application in the electronic device 1000 and the objects such as text, pictures, etc. displayed in the display interface. The display unit 1040 can include a display panel 1041. The display panel 1041 can be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.
[0348] The input unit 1050 can be configured to receive information such as a number or character input by a user. The input unit 1050 can include a touch panel 1051 and another input device 1052. The touch panel 1051, also called a touch screen, can collect a touch operation of a user thereon or adjacent thereto, such as an operation of the user using a finger, a stylus, or any suitable object or accessory on or adjacent to the touch panel 1051.
[0349] Specifically, the touch panel 1051 can detect a touch operation of the user, and detect signals caused by the touch operation, convert the signals into touch coordinates, transmit the touch coordinates to the processor 1010, and receive a command from the processor 1010 and execute the command. The touch panel 1051 can be implemented in various types such as a resistive type, a capacitive type, an infrared type, and a surface acoustic wave type. The other input device 1052 can include one or more of, but is not limited to, a physical keyboard, a function key (such as a volume control key, a power on / off key, etc.), a trackball, a mouse, a joystick, etc.
[0350] Of course, the touch panel 1051 can cover the display panel 1041, and when the touch panel 1051 detects a touch operation thereon or adjacent thereto, transmit the touch operation to the processor 1010 to determine a type of the touch event, and then the processor 1010 provides a corresponding visual output on the display panel 1041 according to the type of the touch event. Although in Figure 10 the above, the touch panel 1051 and the display panel 1041 are implemented as two independent components to realize the input and output functions of the electronic device 1000, in some embodiments, the touch panel 1051 and the display panel 1041 can be integrated to realize the input and output functions of the electronic device 1000.
[0351] The electronic device 1000 can further include one or more sensors, such as a pressure sensor, a gravity acceleration sensor, a proximity light sensor, etc. Of course, according to the needs in a specific application, the above electronic device 1000 can further include a camera and other components, since these components are not the components mainly used in the embodiments of the present application, they are not shown in Figure 10 and will not be described in detail.
[0352] Those skilled in the art can understand that Figure 10 the above is only an example of the electronic device, and does not constitute a limitation on the electronic device, and can include more or fewer components than the diagram, or combine certain components, or different components.
[0353] For the convenience of description, the above parts are divided into modules (or units) according to functions and are described respectively. Of course, in the implementation of the present application, the functions of the modules (or units) can be implemented in the same or more software or hardware.
[0354] Obviously, the above embodiments are merely example for clearly illustrating but not limitation to the embodiments. Based on the above description, other different forms of changes or variations can be made by those skilled in the art. Here, all the embodiments need not and can not be enumerated. The obvious changes or variations derived from the above description are still within the protection scope of the present application.
Claims
1. A method of music detection, characterized in that, The method comprises: obtaining target music description information of target music to be detected; obtaining reference music description information of reference music corresponding to the target music; determining a score similarity between the reference music and the target music according to first score information in the reference music description information and second score information in the target music description information; obtaining an originality detection result of the target music according to the score similarity; the originality detection result indicates whether the target music has originality; if neither the reference music nor the target music contains lyrics, determining whether the score of the target music has originality according to the score similarity; if the reference music or the target music contains lyrics, determining a lyric similarity between the reference music and the target music according to first lyric information in the reference music description information and second lyric information in the target music description information, and determining whether the score and the lyrics of the target music have originality according to the score similarity and the lyric similarity respectively; wherein, determining whether the score and the lyrics of the target music have originality according to the score similarity and the lyric similarity respectively comprises: determining a score modification proportion according to the score similarity; the score modification proportion is negatively correlated with the score similarity; if the score modification proportion is higher than a first proportion threshold, it is determined that the score of the target music has originality, otherwise, it is determined that the score of the target music does not have originality; determining a lyric modification proportion according to the lyric similarity; the lyric modification proportion is negatively correlated with the lyric similarity; if the lyric modification proportion is higher than a second proportion threshold, it is determined that the lyrics of the target music have originality, otherwise, it is determined that the lyrics of the target music do not have originality; wherein, determining a score modification proportion according to the score similarity comprises: determining a third difference between 1 and the score similarity; obtaining the score modification proportion according to the product between a score adjustment coefficient and the third difference; wherein, determining a lyric modification proportion according to the lyric similarity comprises: determining a fourth difference between 1 and the lyric similarity; obtaining the lyric modification proportion according to the product between a lyric adjustment coefficient and the fourth difference.
2. The method of claim 1, wherein, determining a lyric similarity between the reference music and the target music according to first lyric information in the reference music description information and second lyric information in the target music description information comprises: determining a first edit distance between the first lyric information and the second lyric information; the first edit distance is determined according to the minimum number of editing operations for converting the first lyric information into the second lyric information; obtaining a first lyric length of the first lyric information and a second lyric length of the second lyric information; determining a total lyric length between the first lyric length and the second lyric length; determining a first difference between the total lyric length and the first edit distance; According to a ratio between the first difference value and the total length of the lyrics, the lyrics similarity is obtained.
3. The method according to claim 1 or 2, characterized in that, The determining the score similarity between the reference music and the target music according to the first score information in the reference music description information and the second score information in the target music description information comprises: determining a second edit distance between the first score information and the second score information; the second edit distance is determined according to a minimum number of editing operations for converting the first score information into the second score information; obtaining a first score length of the first score information and a second score length of the second score information; determining a total score length between the first score length and the second score length; determining a second difference value between the total score length and the second edit distance; According to a ratio between the second difference value and the total score length, the score similarity is obtained.
4. The method according to claim 1 or 2, characterized in that, The reference music description information comprises the first score information, or comprises the first score information and the first lyrics information; Before obtaining the reference music description information of the reference music corresponding to the target music, the method further comprises: generating the reference music based on the prompt information input by the user by using an artificial intelligence algorithm; snapshot storage is performed on the reference music to obtain reference music snapshot data; formatting processing is performed on the score information in the reference music snapshot data to obtain the first score information; If the reference music also contains lyrics, formatting processing is performed on the lyrics information in the reference music snapshot data to obtain the first lyrics information.
5. The method of claim 4, wherein, The formatting processing on the score information in the reference music snapshot data to obtain the first score information comprises: determining the note description information of each note in the reference music according to the score information in the reference music snapshot data; performing string conversion on the note description information corresponding to each note in the reference music in the order of the notes to obtain the first score information.
6. The method of claim 5, wherein, The note description information comprises at least one of the following: note legato state, note position, note text, note duration, and note pitch.
7. The method of claim 4, wherein, The formatting processing on the lyrics information in the reference music snapshot data to obtain the first lyrics information comprises: dividing the lyrics of the reference music according to the lyrics information in the reference music snapshot data to obtain a plurality of sentences and lyrics paragraphs corresponding to the sentences respectively; dividing each sentence according to the lyrics paragraphs corresponding to the sentences to obtain a sentence set corresponding to each lyrics paragraph respectively; sorting each lyrics paragraph and the sentence set corresponding to the lyrics paragraph in the order of the lyrics paragraphs to obtain sorted lyrics paragraphs and the sentence set corresponding to the lyrics paragraphs respectively; performing string conversion on the sorted lyrics paragraphs and the sentence set corresponding to the lyrics paragraphs to obtain the first lyrics information.
8. The method of claim 1 or 2, wherein, The target music description information comprises the second score information, or comprises the second score information and the second lyrics information; Before obtaining target music description information of the target music to be detected, the method further comprises: According to the modification instruction of the user, the reference music is modified to obtain the target music; Based on the snapshot of the target music, target music snapshot data is obtained; The score information in the target music snapshot data is formatted to obtain second score information; If the target music also contains lyrics, the lyrics information in the target music snapshot data is formatted to obtain second lyrics information.
9. The method of claim 8, wherein, The formatting processing of the score information in the target music snapshot data to obtain the second score information comprises: According to the score information in the target music snapshot data, the note description information of each note in the target music is determined respectively; According to the order of each note, the string conversion of each note and its corresponding note description information in the target music is performed to obtain the second score information.
10. The method of claim 8, wherein, The formatting processing of the lyrics information in the target music snapshot data to obtain the second lyrics information comprises: According to the lyrics information in the target music snapshot data, the lyrics of the target music are divided to obtain multiple sentences and their corresponding lyrics paragraphs; According to each sentence and its corresponding lyrics paragraph, each sentence is divided to obtain a sentence set corresponding to each lyrics paragraph; According to the order of each lyrics paragraph, the sorting of each lyrics paragraph and its corresponding sentence set is performed to obtain the sorted lyrics paragraph and its corresponding sentence set; The string conversion of the sorted lyrics paragraph and its corresponding sentence set is performed to obtain the second lyrics information.
11. An apparatus for music detection, characterized in that The device comprises: A first obtaining unit configured to obtain target music description information of target music to be detected; A second obtaining unit configured to obtain reference music description information of reference music corresponding to the target music; A determining unit configured to determine score similarity between the reference music and the target music according to first score information in the reference music description information and second score information in the target music description information; An obtaining unit configured to, if there is no lyrics in the reference music and the target music, determine whether the score of the target music is original according to the score similarity; if the reference music or the target music contains lyrics, determine lyrics similarity between the reference music and the target music according to first lyrics information in the reference music description information and second lyrics information in the target music description information, and determine whether the score and the lyrics of the target music are original according to the score similarity and the lyrics similarity respectively. The determining whether the melody and the lyrics of the target music are original respectively according to the melody similarity and the lyrics similarity comprises: determining a melody modification proportion according to the melody similarity; the melody modification proportion is negatively correlated with the melody similarity; if the melody modification proportion is higher than a first proportion threshold, it is determined that the melody of the target music is original, otherwise, it is determined that the melody of the target music is not original; determining a lyrics modification proportion according to the lyrics similarity; the lyrics modification proportion is negatively correlated with the lyrics similarity; if the lyrics modification proportion is higher than a second proportion threshold, it is determined that the lyrics of the target music are original, otherwise, it is determined that the lyrics of the target music are not original. The determining a melody modification proportion according to the melody similarity comprises: determining a third difference value between 1 and the melody similarity; and obtaining the melody modification proportion according to a product between a melody adjustment coefficient and the third difference value. The determining a lyrics modification proportion according to the lyrics similarity comprises: determining a fourth difference value between 1 and the lyrics similarity; and obtaining the lyrics modification proportion according to a product between a lyrics adjustment coefficient and the fourth difference value. The obtaining unit is configured to:
12. The apparatus of claim 11, wherein, determine a first edit distance between the first lyrics information and the second lyrics information; the first edit distance is determined according to a minimum number of editing operations for converting the first lyrics information into the second lyrics information; obtain a first lyrics length of the first lyrics information and a second lyrics length of the second lyrics information; determine a total lyrics length between the first lyrics length and the second lyrics length; determine a first difference value between the total lyrics length and the first edit distance; obtain the lyrics similarity according to a ratio between the first difference value and the total lyrics length. The determining unit is configured to:
13. The apparatus of claim 11 or 12, wherein, determine a second edit distance between the first melody information and the second melody information; the second edit distance is determined according to a minimum number of editing operations for converting the first melody information into the second melody information; obtain a first melody length of the first melody information and a second melody length of the second melody information; determine a total melody length between the first melody length and the second melody length; determine a second difference value between the total melody length and the second edit distance; obtain the melody similarity according to a ratio between the second difference value and the total melody length. The reference music description information comprises the first melody information or the first melody information and the first lyrics information.
14. The apparatus of claim 11 or 12, wherein, The second obtaining unit is further configured to: generate the reference music based on prompt information input by a user by using an artificial intelligence algorithm; perform snapshot storage on the reference music to obtain reference music snapshot data; perform format processing on melody information in the reference music snapshot data to obtain the first melody information. If the reference music also contains lyrics, the lyrics information in the reference music snapshot data is formatted to obtain the first lyrics information.
15. The apparatus of claim 14, wherein, The second obtaining unit is further configured to: determine, according to the score information in the reference music snapshot data, the note description information of each note in the reference music; convert, in the order of the notes, the note description information corresponding to each note in the reference music into a string to obtain the first score information.
16. The apparatus of claim 15, wherein, The note description information includes at least one of the following: note tie state, note position, note text, note duration, and note pitch.
17. The apparatus of claim 14, wherein, The second obtaining unit is further configured to: divide, according to the lyrics information in the reference music snapshot data, the lyrics of the reference music to obtain multiple sentences and lyrics paragraphs corresponding to the sentences respectively; divide, according to each sentence and the lyrics paragraph corresponding to the sentence, the sentences to obtain a sentence set corresponding to each lyrics paragraph; sort, in the order of the lyrics paragraphs, the lyrics paragraphs and the sentence sets corresponding to the lyrics paragraphs to obtain sorted lyrics paragraphs and the sentence sets corresponding to the lyrics paragraphs respectively; convert, into a string, the sorted lyrics paragraphs and the sentence sets corresponding to the lyrics paragraphs to obtain the first lyrics information.
18. The apparatus of claim 11 or 12, wherein, The target music description information includes the second score information or the second score information and the second lyrics information; The first obtaining unit is further configured to: modify the reference music according to a user's modification instruction to obtain the target music; obtain target music snapshot data based on a snapshot of the target music; format the score information in the target music snapshot data to obtain second score information; if the target music also contains lyrics, format the lyrics information in the target music snapshot data to obtain second lyrics information.
19. The apparatus of claim 18, wherein, The first obtaining unit is further configured to: determine, according to the score information in the target music snapshot data, the note description information of each note in the target music; convert, in the order of the notes, the note description information corresponding to each note in the target music into a string to obtain the second score information.
20. The apparatus of claim 18, wherein, The first obtaining unit is further configured to: divide, according to the lyrics information in the target music snapshot data, the lyrics of the target music to obtain multiple sentences and lyrics paragraphs corresponding to the sentences respectively; divide, according to each sentence and the lyrics paragraph corresponding to the sentence, the sentences to obtain a sentence set corresponding to each lyrics paragraph; sort, in the order of the lyrics paragraphs, the lyrics paragraphs and the sentence sets corresponding to the lyrics paragraphs to obtain sorted lyrics paragraphs and the sentence sets corresponding to the lyrics paragraphs respectively; convert, into a string, the sorted lyrics paragraphs and the sentence sets corresponding to the lyrics paragraphs to obtain the second lyrics information.
21. An electronic device, comprising: comprise: a processor; and a memory storing computer instructions for causing the processor to execute the method according to any one of claims 1 to 10.
22. A storage medium, characterized by computer program element for performing the method according to any one of claims 1 to 10 when the computer program element is executed on a computer.
Citation Information
Patent Citations
Melody similarity evaluation method and device, terminal equipment and storage medium
CN111899762A
Information processing method and device, electronic equipment and storage medium
CN113178182A