Music teaching system based on artificial intelligence
The AI-based music teaching system addresses the problem of untapped complexity of dialect scales in existing technologies, enabling precise scale analysis and personalized creative guidance, thereby improving the effectiveness of song learning and creation.
Patent Information
- Application Number
- CN202511355411.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2025-11-18
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN120977337A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent music teaching technology, specifically to a music teaching system based on artificial intelligence. Background Technology
[0002] Dialects, as an important carrier of regional culture, possess unique musical scales containing rich tonal variations. Utilizing dialectal scales for song learning can help users more naturally perceive and imitate pitch changes in melodies, improving pitch accuracy and expressiveness when singing. At the same time, the diversity of dialectal scales provides a solid foundation for learning songs of different styles, enhancing the personalization and regional characteristics of music learning.
[0003] Existing song learning technologies largely rely on standard Mandarin or universal scale models, neglecting the diversity and complexity of dialect scales. This makes it difficult for users to accurately grasp melodic details, especially when dealing with songs with regional characteristics. Furthermore, traditional technologies are often based on matching fixed scale fragments, lacking in-depth analysis of continuous scale changes and context, and failing to effectively capture the temporal sequence characteristics of scales, thus limiting matching accuracy and the level of intelligence in learning guidance. Simultaneously, the lack of dynamic monitoring and intelligent guidance mechanisms for personalized user creation makes it difficult for users to receive effective feedback and guidance during the creative process, reducing the enjoyment and efficiency of learning. Therefore, there is an urgent need for a song learning system that incorporates the characteristics of dialect scales, dynamically analyzes scale sequences, and intelligently guides creation to improve the learning experience and the quality of creation.
[0004] This proposal suggests an artificial intelligence-based music teaching system. Summary of the Invention
[0005] This invention provides an artificial intelligence-based music teaching system to facilitate the resolution of the problems mentioned in the background section.
[0006] This invention provides the following technical solution: a music teaching system based on artificial intelligence, comprising:
[0007] The scale analysis module is used to acquire audio recorded by the user in dialect, extract the scales in the audio in chronological order to form a scale sequence, construct multiple scale segments, and group the scale segments according to the segment length.
[0008] The matching and scoring module is used to compare scale fragments with the scale sequences of songs in the music library, count the number of matches, and calculate the matching degree of songs in the music library by combining the number of matches and the length of the scale fragment.
[0009] The intelligent song recommendation module is used to recommend songs in the music library to users in descending order of matching degree, and to record the songs selected by the user as target songs.
[0010] The creation monitoring module is used to monitor the last note of the user's currently created song, obtain the historical note sequence of the last note based on the set repetition judgment threshold, compare the historical note sequence with the target song, and prompt the user with the repetition level based on the comparison result;
[0011] The intelligent creation guidance module is used to generate subsequent scales to guide users in their creation process, based on the repetition level of the song being created, the historical scale sequence, and the comparison results with the target song.
[0012] Optionally, the scale analysis module is used to acquire audio recorded by the user in a dialect, extract the scales from the audio in chronological order, and form a scale sequence, including:
[0013] Provide text to users, who then input audio recordings of the text in their local dialect;
[0014] Set the sampling interval;
[0015] The audio is divided into multiple audio segments according to the sampling interval, and the pitch of each audio segment is extracted at the middle moment;
[0016] A scale threshold is set, which is used to distinguish different scales;
[0017] Get the pitch of any two adjacent audio segments, calculate the absolute value of the difference between the two pitches, and compare the absolute value of the difference with the pitch threshold.
[0018] If the absolute value of the difference is greater than or equal to the scale threshold, the two scales are considered to be different.
[0019] If the absolute value of the difference is less than the scale threshold, the two scales are considered to be the same.
[0020] For any given consecutive identical musical notes, the number of consecutive identical notes is denoted as a complex number.
[0021] Set the deduplication value;
[0022] Calculate the complex number by dividing it by the number without duplicates, and round it up to the nearest integer. The result is recorded as a simplified number.
[0023] Simplify a complex number of consecutive identical musical notes into a simple number of consecutive identical musical notes;
[0024] Arrange all the simplified scales in chronological order to obtain a scale sequence.
[0025] The process involves constructing multiple scale segments, grouping these segments according to their length, including:
[0026] Get the number of musical notes n in the musical scale sequence;
[0027] Set the segment length values to 1, 2...n;
[0028] Iterate through each scale in the scale sequence in turn, and record the selected scale as the first scale;
[0029] Choose any segment length;
[0030] Based on the selected segment length, continuous scales of the same length as the selected segment are sequentially extracted starting from the first scale to obtain scale segments;
[0031] The length of each segment is selected sequentially to construct multiple scale segments that begin with the first octet.
[0032] Obtain all scale fragments and group scale fragments of the same length into a fragment group.
[0033] Optionally, the matching scoring module is used to compare scale fragments with the scale sequences of songs in the music library and count the number of matches, including:
[0034] Iterate through each segment group in turn. For the segment group being iterated, obtain any scale segment in the segment group and obtain the first and second notes of the scale segment.
[0035] The length of each scale segment in a segment group is denoted as the group length.
[0036] Select any song from the music library, and filter the scales in the song's scale sequence that are equal to the first note of the scale. These are then denoted as the local scales.
[0037] Starting from each locating scale, extract library segments of equal length to the group length in sequence, and compare the library segments and the selected scale segments scale by scale to determine whether they are equal.
[0038] If every note in the library fragment and the selected scale fragment are the same, then the match is successful;
[0039] If the library fragment and the selected scale fragment have different scales, the match will fail.
[0040] The number of library segments that were successfully matched and selected as scale segments is recorded as the number of locations.
[0041] Obtain the number of locations for each scale segment in the segment group, calculate the sum of the location numbers, and record the result as the number of matches for the segment group.
[0042] Optionally, the calculation of the matching degree of songs in the music library by combining the number of matchings and the segment length of the scale fragment includes:
[0043] Get the group length of all segment groups, calculate the sum, and record the result as the length base;
[0044] Divide the length of each segment group by the length base to determine the length weight of each segment group.
[0045] Get the number of matches for each segment group, calculate the weighted sum of the number of matches and the length weight, and record the result as the match degree between the song and the user.
[0046] Optionally, the creation monitoring module is used to monitor the last note of the user's currently created song, obtain the historical scale sequence of the last note according to a set repetition judgment threshold, compare the historical scale sequence with the target song, and prompt the user with the repetition level based on the comparison result, including:
[0047] The number of musical scales in the historical musical scale sequence is recorded as the repetition detection threshold;
[0048] The scale that repeats the threshold before the final scale is obtained and denoted as the initial scale.
[0049] The initial and final scales, as well as the scales between the initial and final scales, are combined to form a historical scale sequence;
[0050] Filter out the scales in the target song that are equal to the initial scale, and denote them as the mapping starting point;
[0051] After obtaining each mapping start point, the musical scale of the threshold is repeatedly judged and recorded as the mapping end point;
[0052] Each mapping start point and its corresponding mapping end point, as well as the musical scales between the mapping start point and the mapping end point, are arranged in chronological order to form multiple mapping sequences.
[0053] Optionally, the creation monitoring module is used to monitor the last note of the user's currently created song, obtain the historical scale sequence of the last note according to a set repetition judgment threshold, compare the historical scale sequence with the target song, and prompt the user with the repetition level based on the comparison result. It also includes:
[0054] For any given mapping sequence:
[0055] The scales in the mapped sequence are compared with the scales in the historical scale sequence in chronological order. The number of equal scales in the same chronological order is counted and recorded as the repetition degree of the mapped sequence.
[0056] Obtain the repetition of all mapped sequences, calculate the mean of the repetition, and record the mean as the average repetition of the historical scale sequence;
[0057] A repetition threshold is set, which is used to classify repetition levels;
[0058] The average repetition rate is compared with the repetition rate threshold. If the average repetition rate is greater than or equal to the repetition rate threshold, the user is prompted that the repetition rate of the currently created song is high.
[0059] If the average repetition rate is less than the repetition rate threshold, the user will be prompted that the repetition level of the song they are currently creating is low.
[0060] Optionally, the intelligent creation guidance module is used to generate subsequent scales to guide the user's creation based on the repetition level of the created song, combined with the comparison results of the historical scale sequence and the target song, including:
[0061] When a user's currently created song has a high repetition rate:
[0062] Get all mapping sequences corresponding to the historical scale sequence, and iterate through each mapping sequence in turn;
[0063] Obtain the repetition rate of the mapped sequence;
[0064] The i-th repetition level after the mapping endpoint of the mapping sequence in the target song is denoted as the reference level.
[0065] Arrange the scales between the mapping endpoint and the reference scale in chronological order to form an extended scale sequence;
[0066] Get the extended scale sequences corresponding to all mapping sequences, and get the maximum number of scales k in the extended scale sequences;
[0067] The numerical values for setting the time sequence are 1, 2, ..., k;
[0068] Select time sequence in ascending order of numerical values, obtain the scale of each extended scale sequence in the time sequence, and obtain the existing scale of each time sequence in the target song;
[0069] Obtain all the scales used to compose a song and form a song scale set;
[0070] Obtain the existing scales in each time sequence, and obtain all scales in the song scale set that are not equal to the existing scales to obtain the subsequent scales in the time sequence;
[0071] The system recommends subsequent musical scales for each time sequence to the user.
[0072] The present invention has the following beneficial effects:
[0073] 1. This AI-based music teaching system effectively detects and distinguishes continuous scales by dividing user-recorded audio in dialect into multiple audio segments according to sampling intervals and extracting the scales at the midpoints of the segments. By setting a scale threshold to judge scale differences, it accurately identifies scale changes and avoids interference from scale noise and minor deviations in subsequent analysis. The simplified processing of consecutive identical scales effectively compresses the scale sequence length and reduces data redundancy. Since dialect scales may have individual words with elongated sounds, resulting in multiple consecutive identical scales, the extracted scales need to be simplified. Furthermore, if multiple identical scales are used, subsequent division of the scale sequence into multiple segments will result in segments containing only the same scale. Since overly simplistic scales are unlikely to appear in actual songs, there is no need to compare such scale segments with the song, thus improving the efficiency and accuracy of subsequent scale sequence processing.
[0074] 2. This AI-based music teaching system constructs scale fragments of various lengths based on scale sequences, enriching its multi-scale analysis capabilities of melodic structure. By traversing the matching times of different fragment lengths and melodic scale sequences, it can capture the characteristics of scale combinations of different lengths in the melody. This helps to discover the degree of overlap between the user's dialect scales and the song. Generally, the higher the degree of overlap, the easier it is for the user to learn the song, because there are more similar transitions or identical scales. This is especially beneficial for beginners to learn skills other than singing scales. Furthermore, the longer the scale fragment, the higher the coherence. If it overlaps with the song, it is even more beneficial for beginners to learn. Therefore, the longer the fragment, the higher its weight. For scale fragments of different lengths and contents, its matching performance in the music library is evaluated, providing an accurate basis for subsequent music recommendations. This enhances the depth of the teaching system's analysis of music materials, improves the intelligence level of personalized teaching and creative assistance, strengthens the ability to distinguish melodic similarity, and enhances the overall intelligence level of the music teaching system.
[0075] 3. This AI-based music teaching system introduces a weighted approach based on the length of musical scale segments. It combines the number of matches with this length weight to calculate the overall match rate between a song and a user's segment group, reasonably reflecting the impact of segment length on the matching contribution. By normalizing the weights based on the length base, the system ensures fairness and scientific rigor in the match rate calculation for segments of different lengths. This effectively avoids the problem of inflated match rates caused by matching a large number of short segments, improving the accuracy and stability of the match scoring. The comprehensive match rate calculation enhances the system's ability to comprehensively judge melodic similarity, laying the foundation for accurate music recommendations and creative feedback.
[0076] 4. This AI-based music teaching system dynamically acquires the historical scale sequence of the current last note of a song by setting a repetition judgment threshold. It then compares this sequence with the target song to construct multiple mapping sequences, achieving precise monitoring of repetitive segments in the user's creation. The reason for using only the target song is that, since the user chooses to learn from it, the probability of the user repeating melodies and scales with the target song during the creation process is higher. Avoiding comparison with all songs reduces the cost of calculating repetition; selecting the target song with the highest probability of repetition is more beneficial than harmful. Real-time feedback on melodic repetition during the creation process helps users adjust their creative thinking promptly, avoiding monotonous and mechanical repetition. The flexible adjustment of the repetition judgment threshold makes the monitoring highly adaptable and controllable, enhancing the system's ability to perceive user creative behavior and promoting personalized and diverse music creation.
[0077] 5. This AI-based music teaching system scientifically determines the repetition level of user-composed songs by calculating the average repetition rate and comparing it with a preset threshold. The automatic assessment of repetition levels provides the system with quantifiable indicators of creative quality, helping users understand the diversity and innovation of their compositions. It intelligently identifies highly repetitive segments and provides timely prompts, guiding users to create more varied and personalized works. This enhances the intelligent feedback capabilities and user experience of the music teaching system.
[0078] 6. This AI-based music teaching system, targeting high-repetition-level creative scenarios, combines historical scale sequences with the target song's comparison results to generate multiple candidate sequences of subsequent scales. By extending the scale sequence analysis and extracting diverse subsequent scales within the time series, it greatly enriches the flexibility and diversity of creative guidance. The subsequent scales are all scales not used in the target song where repetition is possible. Utilizing global information from the song's scale set, it effectively eliminates repetitive scales and recommends more innovative scales, enhancing the novelty and musical expression of the user's creations. It achieves precise and dynamic creative assistance, helping users overcome repetition bottlenecks and promoting personalized music creation and improved teaching effectiveness. Attached Figure Description
[0079] Figure 1 This is a schematic diagram of the module of the present invention. Detailed Implementation
[0080] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0081] Example 1, refer to Figure 1 An artificial intelligence-based music teaching system includes:
[0082] The musical scale used in existing song creation technology refers to the pitch markings of the notes arranged in chronological order within a song. A musical scale not only contains the pitch information of each note but also reflects the direction and variation patterns of the melody. Through a continuous sequence of scales, the musical characteristics of a melody can be accurately described, becoming an important foundation for song creation and analysis. Therefore, using dialectal scales to match song melodies is particularly suitable for constructing a preliminary melody similarity scoring system, especially suitable as a "starting training tool" for music beginners. By matching melodies similar to dialectal scales, it helps users quickly enter a musical learning state, find the feeling of singing in natural intonation, and thus lay the foundation for subsequent more systematic music training (such as rhythm and singing techniques).
[0083] Using the musical characteristics of dialects can be helpful in learning to sing because dialects retain unique phonetic rhythms and tonal habits, which can enhance learners' perception and expression of melody pitch and rhythm, promote the coordination of language and music, and improve pronunciation accuracy and emotional expression. At the same time, dialects reduce language barriers, enhance the sense of familiarity in learning, and, combined with regional cultural background, help to convey the emotional connotation of songs more deeply, thus improving the overall efficiency and effectiveness of song learning.
[0084] For example, the tonal changes in the Minnan dialect are mostly gradual rises and falls, similar to the smooth, continuous gliding of notes in a song. Speakers accustomed to this type of tonal variation find it easier to naturally sing a continuous melody when learning lyrical songs, reducing abrupt breaks and enhancing the song's fluency.
[0085] Sichuan dialect features distinct phonological variations, emphasizing intonation and rhythm, similar to the rhythmic accents in rock or rap songs. Learners can utilize these phonological characteristics to better grasp the relationship between strong and weak beats in songs, enhancing their sense of rhythm and expressiveness.
[0086] This solution is suitable for users who want to learn and create songs independently on their personal devices. It is geared towards a broad user base, especially those seeking personalized music learning and creation. Considering the diverse range of dialects, it's impractical to design complete teaching content for each dialect. Therefore, representative songs from the music library are selected as teaching samples. Pitch features are extracted from user-recorded dialect audio, and the user's pitch sequence is matched and scored against target songs. Based on the matching results, learning tracks are recommended. During the creation process, the system monitors the user's pitch usage in real time, assesses repetition levels, and generates subsequent pitch guidance, achieving personalized and dynamic music learning and creation assistance. Through this method, learners from different regions can effectively learn and create using representative songs without needing to develop separate teaching content for each dialect, while ensuring the accuracy and universality of the teaching and creation assistance.
[0087] The scale analysis module is used to acquire audio recorded by the user in dialect, extract the scales in the audio in chronological order to form a scale sequence, construct multiple scale segments, and group the scale segments according to the segment length.
[0088] Provide text to users, who then input audio recordings of the text in their local dialect;
[0089] In this embodiment, the user is provided with the sentence "Hello," and the user records the audio in a dialectal tone, resulting in a 4-second audio file.
[0090] Set the sampling interval to 0.5s;
[0091] The audio was divided into 8 audio segments according to the sampling interval, and the scale at the middle moment of each audio segment was extracted. The scale was output as [60, 60, 60, 61, 63, 63, 63, 63] in MIDI numerical form, and the position of the scale was recorded as [0, 1, 2, 3, 4, 5, 6, 7].
[0092] The existing technology, MIDI (Musical Instrument Digital Interface) numerical representation, is an internationally standardized method for digitally representing musical scales, abbreviated as MIDI numerical.
[0093] Set the scale threshold to 1; the scale threshold is used to distinguish different scales.
[0094] Get the pitch of any two adjacent audio segments, calculate the absolute value of the difference between the two pitches, and compare the absolute value of the difference with the pitch threshold.
[0095] For the scale pair [60, 60] at position [0, 1], if the absolute value of the difference is 0, it is considered to be the same scale;
[0096] For the scale pair [60, 60] at position [1, 2], if the absolute value of the difference is 0, it is considered to be the same scale;
[0097] For the scale pair [60, 61] at positions [2, 3], the absolute value of the difference is 1, indicating that they are different scales;
[0098] For the scale pair [61, 63] at positions [3, 4], the absolute value of the difference is 2, indicating that they are different scales;
[0099] For the scale pair [63, 63] at position [4, 5], the absolute value of the difference is 0, and they are considered to be the same scale;
[0100] For the scale pair [63, 63] at position [5, 6], the absolute value of the difference is 0, and they are considered to be the same scale;
[0101] For the scale pair [63, 63] at position [6, 7], if the absolute value of the difference is 0, it is considered to be the same scale;
[0102] [60, 60, 60], consecutive and identical, the complex number is 3;
[0103] [63, 63, 63, 63], consecutive and identical, the complex number is 4;
[0104] Set the deduplication value to 2;
[0105] Calculate the complex number 3, divide it by the repeated value 2, and round it up. The result is recorded as the simplified number 2.
[0106] Calculate the complex number 4, divide it by the repeated value 2, and round it up. The result is recorded as the simplified number 2.
[0107] Simplify a complex number of consecutive identical musical notes into a simple number of consecutive identical musical notes;
[0108] Arrange all the simplified scales in chronological order to obtain the scale sequence [60,60,61,63,63].
[0109] Based on the scale sequence, construct multiple scale segments according to a set segment length, specifically including:
[0110] Find the number of musical notes in the musical scale sequence, n=5;
[0111] Set the segment length values to 1, 2...n;
[0112] Construct a scale segment by sequentially selecting each value of the segment length, for each selected value:
[0113] Select each scale in the scale sequence in turn, and record the selected scale as the first scale;
[0114] When m=1, each scale is a scale segment, for a total of 5 scale segments:
[60] ,
[60] ,
[61] ,
[63] ,
[63] ;
[0115] When m=2, the length of the scale segment is 2: [60,60], [60,61], [61,63], [63,63];
[0116] When m=3, the length of the scale segment is 3: [60,60,61], [60,61,63], [61,63,63];
[0117] When m=4, the length of the scale segment is 4: [60,60,61,63], [60,61,63,63];
[0118] When m=5, the length of the scale segment is 5: [60,60,61,63,63];
[0119] The matching and scoring module is used to compare scale fragments with the scale sequences of songs in the music library, count the number of matches, and calculate the matching degree of songs in the music library by combining the number of matches and the length of the scale fragment.
[0120] Select any song from the music library. In this embodiment, the melody scale of the selected song in the music library is as follows: [60,60, 61, 63, 63, 65, 60, 61, 63, 63, 60, 60, 61, 63];
[0121] 1. The number of segments and the number of matching segments are as follows:
[60] matches 5 positions,
[60] matches 5 positions,
[61] matches 3 positions,
[63] matches 5 positions,
[63] matches 5 positions.
[0122] Number of matches: 5+5+3+5+5=23;
[0123] Two segments are grouped together, and the scale segments and the number of matches are as follows: [60,60] matches 2 positions, [60,61] matches 3 positions, [61,63] matches 3 positions, and [63,63] matches 2 positions.
[0124] Number of matches: 2+2+3+3=10;
[0125] The three segments are scale segments and the number of matches are [60,60,61] matching 2 positions, [60,61,63] matching 3 positions, and [61,63,63] matching 2 positions.
[0126] Number of matches: 2 + 2 + 3 = 7;
[0127] The four segments are scale segments and the number of matches are [60,60,61,63] matching 2 location numbers and [60,61,63,63] matching 2 location numbers respectively;
[0128] Number of matches: 2 + 2 = 4;
[0129] Five fragment groups, with scale fragments and the number of matches being [60, 60, 61, 63, 63], each matching one location;
[0130] Match count: 1;
[0131] Get the length values of all segments, calculate and sum them, and record the result as the length base = 1 + 2 + 3 + 4 + 5 = 15;
[0132] Divide the length of each segment group by the length base, and record the result as the length weight of each segment group.
[0133] Among them, the length weight of segment group 1 is approximately 0.0667 (1 / 15), and the branch matching degree is calculated as 23 × 0.0667 = 1.5341.
[0134] The length weight of the 2-segment group is approximately 0.1333 (2 / 15). The branch matching degree is calculated as 10 × 0.1333 = 1.3330.
[0135] The length weight of the 3-segment group is approximately 0.2 (3 / 15). The calculated branch matching degree is 7 × 0.2 = 1.4000.
[0136] The length weight of the 4-segment group is approximately 0.26667, and the branch matching degree is calculated as 4 × 0.26667 = 1.0668.
[0137] The length weight of the 5-segment group is approximately 0.3333 (5 / 15). The branch matching degree is calculated as 1 × 0.3333 = 0.3333.
[0138] The total matching degree of all branches is: 1.5341 + 1.3330 + 1.4000 + 1.0668 + 0.3333 = 5.6672;
[0139] The intelligent song recommendation module is used to recommend songs in the music library to users in descending order of matching degree, and to record the songs selected by the user as target songs.
[0140] Target song scale sequence:
[0141] [60, 60, 61, 63, 63, 65, 60, 61, 63, 63, 60, 60, 61, 63], with indices starting from 0;
[0142] The creation monitoring module is used to monitor the last note of the user's currently created song, obtain the historical note sequence of the last note based on the set repetition judgment threshold, compare the historical note sequence with the target song, and prompt the user with the repetition level based on the comparison result;
[0143] The repetition judgment threshold of 4 is the number of musical scales, which is used to limit the number of musical scales in the historical musical scale sequence;
[0144] Obtain the first repeated judgment threshold note before the last note, denoted as the initial note = 60;
[0145] Arrange the initial and final scales, as well as the scales between the initial and final scales, into a historical scale sequence in chronological order;
[0146] In this embodiment, the user is currently creating the final scale sequence (including the preceding scale):
[0147] Assume the current last note is 63, and the repetition threshold is 4;
[0148] The first four notes of the user's final scale are: 60, 61, 63, 63;
[0149] Historical scale sequence = [60, 61, 63, 63, 63] (including the starting and ending notes);
[0150] Filter the target song for notes equal to the initial scale, and denote them as the mapping starting points. The indices of the filtered mapping starting points are 0, 1, 6, 10, and 11 respectively.
[0151] The index of the starting point of the mapping is 0, and the mapping sequence is [60, 60, 61, 63, 63];
[0152] The index of the starting point of the mapping is 1, and the mapping sequence is [60, 61, 63, 63, 65];
[0153] The index of the starting point of the mapping is 6, and the mapping sequence is [60, 61, 63, 63, 60];
[0154] The index of the starting point of the mapping is 10, and the mapping sequence is [60, 60, 61, 63, null] (insufficient length).
[0155] The index of the starting point of the mapping is 11, and the mapping sequence is [60, 61, 63, null, null] (the length is insufficient), where null is empty;
[0156] Only consider sequences of complete length, i.e., the first 3.
[0157] Compare historical scale sequences and mapped sequences, and count the number of equal scales (comparing in chronological order):
[0158] The mapping sequence [60, 60, 61, 63, 63] is compared in chronological order to determine if the scales are equal: 60=60, 61≠60, 63≠61, 63=63, 63=63. The number of identical scales (repetition) is 3.
[0159] The mapping sequence [60, 61, 63, 63, 65] has 60=60, 61=61, 63=63, 63=63, and 63≠65. The number of identical notes (repetition) is 4.
[0160] The mapping sequence is [60, 61, 63, 63, 60], where 60=60, 61=61, 63=63, 63=63, 63≠60, and the number of identical notes (repetition) is 4.
[0161] Average repeatability = (3+4+4) / 3 = 3.67;
[0162] The repetition threshold is 3.5, and the average repetition is 3.67, which is greater than 3.5, indicating a "high repetition level".
[0163] The intelligent creation guidance module is used to generate subsequent scales to guide users in their creation process, based on the repetition level of the song being created, the historical scale sequence, and the comparison results with the target song.
[0164] When a user's currently created song has a high repetition rate:
[0165] Get all mapping sequences corresponding to the last note, and iterate through each mapping sequence in turn;
[0166] Obtain the repetition rate of the mapped sequence;
[0167] The i-th repetition level after the mapping endpoint of the mapping sequence in the target song is denoted as the reference level.
[0168] In the intelligent creation guidance module, the system obtains the continuous scales following the final scale in the corresponding target sequence as creation guidance based on the repetition rate of the user's current creation segment. The repetition rate is used to limit the reference length, ensuring that the generated guidance maintains logical continuity with the user's current creation segment while dynamically adjusting its length according to the matching degree, thus achieving personalized and continuous creation guidance.
[0169] Arrange the scales between the mapping endpoint and the reference scale in chronological order to form an extended scale sequence;
[0170] The extended scale sequence of mapping sequence 1: [60, 60, 61, 63, 63] = [65, 60]
[0171] Mapping sequence 2: Extended scale sequence of [60, 61, 63, 63, 65] = [60, 61, 63];
[0172] Mapping sequence 3: The extended scale sequence of [60, 61, 63, 63, 60] = [null] is empty;
[0173] Get the extended scale sequences corresponding to all mapping sequences, and get the maximum number of scales in the extended scale sequences, k=3;
[0174] The numerical values for setting the time sequence are 1, 2, ..., k;
[0175] The song's scale set is {60, 61, 63, 65}.
[0176] When the time sequence is 1, the existing scale is 65, 60, and the recommended subsequent scales are 61, 63;
[0177] When the time sequence is 2, the existing scale is 60, 61, and the recommended subsequent scale is 65, 63;
[0178] When the time sequence is 3, the existing scale is 63, and the recommended subsequent scales are 60, 61, and 65.
[0179] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0180] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1.A music teaching system based on artificial intelligence, characterized by, Comprise: Scale analysis module, for obtaining the user using dialect recorded audio, in time sequence extraction audio scale, form scale sequence, and construct a plurality of scale segments, the scale segment is grouped according to the length of the segment; Matching score module, for comparing scale segment and music library song library scale sequence, the number of matches is counted, and the matching degree of the song in the music library is calculated by combining the number of matches and the length of the scale segment; Song intelligent recommendation module, for recommending the song in the music library to the user in the order from high to low according to the matching degree, and recording the song selected by the user as the target song; Creation monitoring module, for monitoring the last scale of the song currently created by the user, obtaining the historical scale sequence of the last scale according to the set repetition judgment threshold, comparing the historical scale sequence with the target song, and prompting the user according to the comparison result; Creation intelligent guidance module, for generating subsequent scales for guiding the user to create according to the repetition level of the created song, combining the comparison result of the historical scale sequence and the target song. 2.The artificial intelligence-based music teaching system of claim 1, wherein, The scale analysis module is used for obtaining the audio recorded by the user using dialect, extracting the scale in the audio in time sequence, and forming a scale sequence, comprising: Provide text to the user, and input the text audio using the dialect of the user; Set the sampling interval; Divide the audio into a plurality of audio segments according to the sampling interval, and extract the scale at the middle time of each audio segment; Set the scale threshold, which is used to distinguish different scales; Arbitrarily obtain the scales of two adjacent audio segments, calculate the absolute value of the difference between the two scales, and compare the absolute value of the difference with the scale threshold; If the absolute value of the difference is greater than or equal to the scale threshold, it is determined that the two scales are different; If the absolute value of the difference is less than the scale threshold, it is determined that the two scales are the same; For any one scale that is continuously the same, the number of scales that are continuously the same is obtained, which is recorded as a complex number; Set the deduplication value; Calculate the complex number divided by the deduplication value, and take the integer part, the result is recorded as a simple number; Simplify the complex number of consecutive scales to the simple number of consecutive scales; Arrange all the simplified scales in time sequence to obtain the scale sequence. 3.The artificial intelligence-based music teaching system of claim 2, wherein The plurality of scale segments are constructed, and the scale segments are grouped according to the length of the segment, comprising: Obtain the number n of scales contained in the scale sequence; Set the values of the segment length as 1, 2…n respectively; Traverse each scale of the scale sequence in turn, and record the selected scale as the first scale; Optionally select the segment length; Based on the selected segment length, continuously cut the continuous scales equal to the selected segment length from the first scale to obtain the scale segment; Select each segment length in turn to construct a plurality of scale segments starting with the first scale; Obtain all the scale segments, and group the scale segments with the same segment length into a segment group. 4.The AI-based music teaching system of claim 3, wherein, The matching score module is used for comparing the scale segment and the library scale sequence of the song in the music library, and counting the number of matches, comprising: Traverse each segment group in turn, for the segment group being traversed, obtain any scale segment in the segment group, and obtain the first scale of the scale segment; Record the segment length of the scale segment in the segment group as the group length; Optionally selecting a song in the music library, screening the scale equal to the first scale in the library scale sequence of the song, and recording the scale as a positioning scale; Starting from each positioning scale, sequentially cutting a library segment equal in length to the group length, and judging whether the library segment and the selected scale segment are equal at each scale; If each scale of the library segment and the selected scale segment is equal, the matching is successful; If there is a scale of the library segment and the selected scale segment that is not equal, the matching fails; Counting the number of library segments that successfully match the selected scale segment, and recording the number as a positioning number; Obtaining the positioning number of each scale segment in the segment group, calculating the sum of the positioning numbers, and recording the result as the matching number of the segment group. 5.The artificial intelligence-based music teaching system of claim 4, wherein, The matching degree of the song in the music library is calculated by combining the matching number and the segment length of the scale segment, including: Obtaining the group length of all segment groups, calculating the sum, and recording the result as the length base; Dividing the group length of each segment group by the length base to obtain the length weight of each segment group; Obtaining the matching number of each segment group, calculating the weighted sum of the matching number and the length weight, and recording the result as the matching degree of the song and the user. 6.The artificial intelligence-based music teaching system of claim 1, wherein The creation monitoring module is configured to monitor the last scale of the song currently created by the user, obtain a historical scale sequence of the last scale according to a set repetition judgment threshold, compare the historical scale sequence with the target song, and prompt the user with a repetition level according to the comparison result, including: Recording the number of scales in the historical scale sequence as the repetition judgment threshold; Obtaining the scale before the repetition judgment threshold of the last scale, and recording the scale as a starting scale; Forming the historical scale sequence by combining the starting scale and the last scale and the scales between the starting scale and the last scale; Screening the scale equal to the starting scale in the target song, and recording the scale as a mapping starting point; Obtaining the scale after the repetition judgment threshold of each mapping starting point, and recording the scale as a mapping ending point; Forming multiple mapping sequences by combining each mapping starting point and the corresponding mapping ending point and the scales between the mapping starting point and the mapping ending point in time sequence. 7.The artificial intelligence-based music teaching system of claim 6, wherein, The creation monitoring module is configured to monitor the last scale of the song currently created by the user, obtain a historical scale sequence of the last scale according to a set repetition judgment threshold, compare the historical scale sequence with the target song, and prompt the user with a repetition level according to the comparison result, and further including: For any one mapping sequence: Comparing the scales of the mapping sequence and the scales in the historical scale sequence in time sequence, counting the number of equal scales in the same time sequence, and recording the number as the repetition degree of the mapping sequence; Obtaining the repetition degree of all mapping sequences, calculating the average of the repetition degrees, and recording the average as the average repetition degree of the historical scale sequence; Setting a repetition degree threshold, which is used to divide the repetition level; Comparing the average repetition degree with the repetition degree threshold, if the average repetition degree is greater than or equal to the repetition degree threshold, prompting the user that the repetition level of the currently created song is high; If the average repetition degree is less than the repetition degree threshold, prompting the user that the repetition level of the currently created song is low. 8.The AI-based music teaching system of claim 7, wherein, The creation intelligent guidance module is configured to generate a subsequent scale for guiding the user to create according to the repetition level of the created song, the comparison result of the historical scale sequence and the target song, including: When the repetition level of the song currently created by the user is high: Obtaining all mapping sequences corresponding to the historical scale sequence, and sequentially traversing each mapping sequence; Obtaining the repetition degree of the mapping sequence; Obtaining the scale at the repetition degree after the mapping end point of the mapping sequence in the target song, and recording the scale as a reference scale; Composing an extended scale sequence by arranging the scales between the mapping end point and the reference scale in time sequence; Obtaining the extended scale sequence corresponding to all mapping sequences, and obtaining the maximum value k of the number of scales in the extended scale sequence; Setting the values of the time sequence as 1, 2, …, k respectively; Selecting the time sequence in the order from small to large according to the values, obtaining the scales of each extended scale sequence under the time sequence, and obtaining the existing scales of each time sequence in the target song; Obtaining all the scales for creating the song, and composing a song scale set; Obtaining the existing scales under each time sequence, obtaining all the scales which are not equal to the existing scales in the song scale set, and obtaining the subsequent scales under the time sequence; Recommending the subsequent scales under each time sequence to the user.