Music strong beat node detection method, device, computer equipment and storage medium

By generating multiple strong-beat candidate masks and arrays, calculating short-time energy characteristics and determining strong-beat nodes with energy characteristic difference values, the problem of low detection accuracy of music strong-beat nodes in the prior art is solved, and higher accuracy and lower complexity and cost are achieved.

CN114996504BActive Publication Date: 2025-04-29SHENZHEN WONDERSHARE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210603804.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-30
Publication Date
2025-04-29
Estimated Expiration
2042-05-30

AI Technical Summary

Technical Problem

The existing music-strong-shooting node detection methods have low accuracy and high complexity and cost.

Method used

By obtaining the music signal to be detected and its corresponding beat tracking results and beat speed, multiple strong beat candidate masks and arrays are generated, short-time energy characteristics are calculated and smoothed, and the detection results of strong beat nodes are determined based on the energy characteristic difference.

Benefits of technology

It improves the accuracy of the detection of the music-strong shooting node, simplifies the detection steps, and reduces costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114996504B_ABST
    Figure CN114996504B_ABST
Patent Text Reader

Abstract

This invention relates to the field of signal detection technology, and discloses a method, apparatus, computer device, and storage medium for detecting strong beat nodes in music. The method includes: acquiring a music signal to be detected, the corresponding beat tracking result, and the beat speed; generating multiple different strong beat candidate masks based on the beat speed using a strong beat candidate mask generation method, and generating multiple different strong beat candidate arrays based on the multiple different strong beat candidate masks and the beat tracking result; calculating short-time energy characteristics based on the music signal to be detected, and smoothing the short-time energy characteristics using a preset window function to obtain smoothed short-time energy characteristics, and calculating the energy characteristic difference of the smoothed short-time energy characteristics; and determining the strong beat node detection result corresponding to the music signal to be detected based on the multiple different strong beat candidate arrays and the energy characteristic difference. This invention not only simplifies the detection steps but also improves the detection accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of signal detection technology, and in particular to a music strong beat node detection method, device, computer equipment and storage medium. Background Art

[0002] Beat Tracking can mark the position of each beat in the music; while the purpose of downbeat tracking is to continue marking the strongest music beat in a measure of music after completing beat tracking (a measure of music is usually four-beat music, and a section of four-beat music has four beats: strong, weak, secondary strong, and weak, that is, it is necessary to detect and mark the strong music beat). In the prior art, either the downbeat node is selected by the beat speed, but the detection accuracy of the downbeat node is low, or machine learning (for example, neural network) is used to detect the position of the downbeat music node in the music. Although the detection accuracy is improved, the introduction of machine learning makes the detection method steps more complicated and costly. Summary of the invention

[0003] The embodiments of the present invention provide a music strong beat node detection method, device, computer equipment and storage medium, aiming to solve the problem of low accuracy of existing music strong beat node detection.

[0004] In a first aspect, an embodiment of the present invention provides a method for detecting a music strong beat node, which comprises:

[0005] Acquire a music signal to be detected and a beat tracking result and a beat speed corresponding to the music signal to be detected;

[0006] Generate a plurality of different strong beat candidate masks according to the beat speed by using a strong beat candidate mask generation method, and generate a plurality of different strong beat candidate arrays according to the plurality of different strong beat candidate masks and the beat tracking result;

[0007] Calculate the short-time energy feature according to the music signal to be detected, smooth the short-time energy feature by a preset window function to obtain a smoothed short-time energy feature, and calculate the energy feature difference of the smoothed short-time energy feature;

[0008] A strong beat node detection result corresponding to the music signal to be detected is determined according to the multiple different strong beat candidate arrays and the energy feature difference.

[0009] Furthermore, the number of masks in each strong beat candidate mask type is calculated according to the beat speed and a preset number of strong beat candidate mask types; a plurality of different strong beat candidate masks are generated according to the number of masks, a preset mask interval and a plurality of initial mask ranges; and a plurality of different strong beat candidate arrays are obtained by calculating the product of the plurality of different strong beat candidate masks and the beat tracking result.

[0010] Further, a first strong beat candidate mask is generated according to the first initial mask range, the preset mask interval and the number of masks; a second strong beat candidate mask is generated according to the second initial mask range, the preset mask interval and the number of masks; a third strong beat candidate mask is generated according to the third initial mask range, the preset mask interval and the number of masks; and a fourth strong beat candidate mask is generated according to the fourth initial mask range, the preset mask interval and the number of masks.

[0011] Furthermore, the root mean square value of the music signal to be detected within a preset time length is calculated; the root mean square value is substituted into the short-time energy feature formula to calculate the short-time energy feature; and the short-time energy feature is convolved with the Hanning window function to obtain a smoothed short-time energy feature.

[0012] Furthermore, the difference between the smoothed short-time energy features of every two adjacent time points in the smoothed short-time energy feature is calculated, and the difference is used as the first energy feature difference, and the larger value between the first energy feature difference and the preset value is selected as the second energy feature difference; the second energy feature difference and the preset feature difference are used as energy feature differences.

[0013] Furthermore, an initial smooth short-time energy feature and a next smooth short-time energy feature are obtained from the smooth short-time energy feature, and the initial smooth short-time energy feature is used as the current smooth short-time energy feature; the difference between the current smooth short-time energy feature and the next smooth short-time energy feature is calculated to obtain a first current feature difference; the larger value between the first current energy feature difference and a preset value is selected as the second current energy feature difference; the next smooth short-time energy feature and the next feature of the next smooth short-time energy feature are used as the current smooth short-time energy feature and the next smooth short-time energy feature, and the step of calculating the difference between the current smooth short-time energy feature and the next smooth short-time energy feature to obtain the first current feature difference is returned to execute, until the second energy feature difference is generated.

[0014] Furthermore, the product of the multiple different strong beat candidate arrays and the energy feature difference is calculated to obtain multiple strong beat node values; and the strong beat candidate array corresponding to the maximum strong beat node value among the multiple strong beat node values ​​is selected as the strong beat node detection result corresponding to the music signal to be detected.

[0015] In a second aspect, an embodiment of the present invention further provides a music strong beat node detection device, which includes:

[0016] An acquisition unit, used for acquiring a music signal to be detected and a beat tracking result and a beat speed corresponding to the music signal to be detected;

[0017] A generating unit, configured to generate a plurality of different strong beat candidate masks according to the beat tempo by using a strong beat candidate mask generating method, and to generate a plurality of different strong beat candidate arrays according to the plurality of different strong beat candidate masks and the beat tracking result;

[0018] A calculation unit, used for calculating a short-time energy feature according to the music signal to be detected, smoothing the short-time energy feature by a preset window function to obtain a smoothed short-time energy feature, and calculating an energy feature difference of the smoothed short-time energy feature;

[0019] A determination unit is used to determine a strong beat node detection result corresponding to the music signal to be detected according to the multiple different strong beat candidate arrays and the energy feature difference.

[0020] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.

[0021] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and the computer program can implement the above method when executed by a processor.

[0022] The embodiment of the present invention provides a method, device, computer equipment and storage medium for detecting a music strong beat node. The method includes: obtaining a music signal to be detected and a beat tracking result and a beat speed corresponding to the music signal to be detected; generating a plurality of different strong beat candidate masks by a strong beat candidate mask generation method according to the beat speed, and generating a plurality of different strong beat candidate arrays according to the plurality of different strong beat candidate masks and the beat tracking result; calculating a short-time energy feature according to the music signal to be detected, and smoothing the short-time energy feature by a preset window function to obtain a smoothed short-time energy feature, and calculating the energy feature difference of the smoothed short-time energy feature; determining a strong beat node detection result corresponding to the music signal to be detected according to the plurality of different strong beat candidate arrays and the energy feature difference. The technical solution of the embodiment of the present invention determines the strong beat node detection result corresponding to the music signal to be detected according to a plurality of different strong beat candidate arrays and the energy feature difference, which not only simplifies the detection steps, but also effectively avoids selecting a strong beat node only according to the beat speed, thereby improving the accuracy of music strong beat node detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0024] Figure 1 A schematic diagram of a process flow of a music strong beat node detection method provided by an embodiment of the present invention;

[0025] Figure 2 A schematic diagram of a sub-process of a music strong beat node detection method provided by an embodiment of the present invention;

[0026] Figure 3 A waveform diagram of a strong beat candidate mask of a music strong beat node detection method provided by an embodiment of the present invention;

[0027] Figure 4 A schematic diagram of a sub-process of a music strong beat node detection method provided by an embodiment of the present invention;

[0028] Figure 5 A waveform diagram of a music signal to be detected, a short-time energy feature, a smoothed short-time energy feature, and an energy feature difference in a music strong beat node detection method provided by an embodiment of the present invention;

[0029] Figure 6 A waveform diagram of a strong beat node detection result of a music strong beat node detection method provided by an embodiment of the present invention;

[0030] Figure 7 A schematic block diagram of a music strong beat node detection device provided by an embodiment of the present invention; and

[0031] Figure 8 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0033] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0034] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0035] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0036] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.

[0037] See also Figure 1 , Figure 1 1 is a flow chart of a music strong beat node detection method provided by an embodiment of the present invention. The music strong beat node detection method is described in detail below. Figure 1As shown, the method includes the following steps S100-S130.

[0038] S100, obtaining a music signal to be detected and a beat tracking result and a beat speed corresponding to the music signal to be detected.

[0039] In an embodiment of the present invention, the audio and video editing software obtains the music signal to be detected and the beat tracking result and beat speed corresponding to the music signal to be detected, wherein the beat tracking result is a tracking result generated by an existing beat tracking method, and the beat speed is the number of beats per minute. In practical applications, the number of beats per minute can be expressed by BPM. Understandably, 60BPM means that the number of beats in one minute is 60.

[0040] S110 , generating a plurality of different strong beat candidate masks according to the beat tempo by using a strong beat candidate mask generating method, and generating a plurality of different strong beat candidate arrays according to the plurality of different strong beat candidate masks and the beat tracking result.

[0041] In an embodiment of the present invention, after obtaining the beat speed, a plurality of different strong beat candidate masks are first generated according to the beat speed through a strong beat candidate mask generation method, wherein the plurality of different strong beat candidate masks include a first strong beat candidate mask, a second strong beat candidate mask, a third strong beat candidate mask, and a fourth strong beat candidate mask; and then a plurality of different strong beat candidate arrays are generated according to the first strong beat candidate mask, the second strong beat candidate mask, the third strong beat candidate mask, the fourth strong beat candidate mask, and the beat tracking result, wherein the strong beat candidate array includes a first strong beat candidate array, a second strong beat candidate array, a third strong beat candidate array, and a fourth strong beat candidate array.

[0042] See also Figure 2 In one embodiment, for example, in an embodiment of the present invention, the step S110 includes the following steps S111-S113.

[0043] S111, calculating the number of masks in each of the strong beat candidate mask types according to the beat speed and a preset number of strong beat candidate mask types;

[0044] S112, generating a plurality of different strong shot candidate masks according to the number of masks, a preset mask interval, and a plurality of initial mask ranges;

[0045] S113 , calculating the product of the multiple different strong beat candidate masks and the beat tracking result to obtain multiple different strong beat candidate arrays.

[0046] In an embodiment of the present invention, there are 4 strong beat candidate mask types, and the multiple initial mask ranges include a first initial mask range, a second initial mask range, a third initial mask range, and a fourth initial mask range; assuming that the beat speed is 60BPM, the preset mask interval is 4s, the first initial mask range is 0-1s, the second initial mask range is 1-2s, the third mask range is 2-3s, and the fourth mask range is 3-4s. It can be understood that the mask number in each of the strong beat candidate mask types is The number is 15=60 / 4, the first strong beat candidate mask is 0-1s, 4-5s, 8-9s, 12-13s…56-57s, the second strong beat candidate mask is 1-2s, 5-6s, 9-10s, 13-14s…57-58s; the third strong beat candidate mask is 2-3s, 6-7s, 10-11s, 14-15s…58-59s; the fourth forced candidate mask is 3-4s, 7-8s, 11-12s, 15-16s…59-60s. It should be noted that, in an embodiment of the present invention, the first strong beat candidate mask, the second strong beat candidate mask, the third strong beat candidate mask and the fourth strong beat candidate mask will have larger values ​​within the shielding value range, and smaller values ​​in the non-masked shielding area. It should also be noted that, in an embodiment of the present invention, Figure 3 As shown, the waveforms of four strong beat candidate masks are shown. Figure 3 , downbeat candidate mask1, downbeat candidate mask2, downbeat candidate mask3 and downbeat candidate mask4 respectively represent waveform diagrams of the first strong beat candidate mask, the second strong beat candidate mask, the third strong beat candidate mask and the fourth strong beat candidate mask.

[0047] S120, calculating a short-time energy feature according to the music signal to be detected, smoothing the short-time energy feature through a preset window function to obtain a smoothed short-time energy feature, and calculating an energy feature difference of the smoothed short-time energy feature.

[0048] In an embodiment of the present invention, after obtaining the music signal to be detected, the short-time energy feature is first calculated according to the music signal to be detected by using the short-time energy feature formula, and the short-time energy feature is smoothed by a preset window function to obtain a smoothed short-time energy feature, wherein the preset window function is a Hanning window function. After obtaining the smoothed short-time energy feature, the energy feature difference of the smoothed short-time energy feature is calculated by using the energy feature difference formula.

[0049] See also Figure 4In one embodiment, for example, in an embodiment of the present invention, the step S120 includes the following steps S121-S125.

[0050] S121, calculating the root mean square value of the music signal to be detected within a preset time length;

[0051] S122, substituting the RMS value into the short-time energy characteristic formula to calculate the short-time energy characteristic;

[0052] S123, convolving the short-time energy feature with a Hanning window function to obtain a smoothed short-time energy feature;

[0053] S124, calculating the difference between the smoothed short-time energy features of every two adjacent time points in the smoothed short-time energy feature, and taking the difference as the first energy feature difference, and selecting the larger value between the first energy feature difference and a preset value as the second energy feature difference;

[0054] S125. Use the second energy characteristic difference and the preset characteristic difference as energy characteristic difference.

[0055] In the embodiment of the present invention, for the sake of simplicity of description, it is assumed that the energy feature difference formula is max(0, smoothed short-term energy(t)-smoothed short-term energy(t-1)), after obtaining the music signal to be detected, the root mean square value rms(signal) of the signal within a preset time length is calculated, wherein the preset time length is 10ms; rms(signal) is substituted into the short-time energy feature formula 20*log10(rms(signal)*sqrt(2)) to calculate the short-time energy feature short-term energy, that is, the short-time energy feature short-term energy=20*log10(rms(signal)*sqrt(2)); short-term energy is convolved with a Hanning window function with a time length of 0.5s to obtain a smoothed short-term energy feature smoothed short-term energy; and an initial smoothed short-term energy feature smoothed short-term is obtained from the smoothed short-term energy. energy(0) and the next smoothed short-term energy feature smoothed short-term energy(1), and use smoothed short-term energy(0) as the current smoothed short-term energy feature, calculate the difference between smoothed short-term energy(1)-smoothed short-term energy(0), and compare smoothed short-term energy(1)-smoothed short-term energy(0) with the preset value 0, select the larger value as the second current energy feature difference, and so on, until the second energy feature difference is generated, and use the second energy feature difference and the preset feature difference 0 as the energy feature difference. Specifically, Figure 5 As shown, the waveform diagram of the music signal to be detected, the short-time energy feature, the smoothed short-time energy feature and the energy feature difference is shown, wherein Figure 5In the figure, audio waveform, short-term energy, smoothed short-term energy and attack ofsmoothed short-term energy respectively represent the waveforms of the music signal to be detected, the short-term energy feature, the smoothed short-term energy feature and the energy feature difference. It should be noted that in the embodiment of the present invention, the reason why the preset feature difference value 0 and the second energy feature difference value are used as the energy feature difference value is that the smoothed short-term energy feature at the last moment cannot be the minuend, so the preset feature difference value 0 is used instead.

[0056] S130, determining a strong beat node detection result corresponding to the music signal to be detected according to the multiple different strong beat candidate arrays and the energy feature difference.

[0057] In an embodiment of the present invention, after calculating the first strong beat candidate array, the second strong beat candidate array, the third strong beat candidate array and the fourth strong beat candidate array, the first strong beat candidate array, the second strong beat candidate array, the third strong beat candidate array and the fourth strong beat candidate array are respectively multiplied by the energy feature difference to obtain a plurality of strong beat node values; the strong beat candidate array corresponding to the maximum strong beat node value among the plurality of strong beat node values ​​is selected as the strong beat node detection result corresponding to the music signal to be detected, such as Figure 6 As shown, the first strong beat candidate array is selected as the strong beat node detection result corresponding to the music signal to be detected, wherein Figure 6 In the example, downbeat tracking is the result of strong beat node detection.

[0058] Figure 7 2 is a schematic block diagram of a music strong beat node detection device 200 provided in an embodiment of the present invention. Figure 7 As shown, corresponding to the above music strong beat node detection method, the present invention also provides a music strong beat node detection device 200. The music strong beat node detection device 200 includes a unit for executing the above music strong beat node detection method, and the device can be configured in a computer device. Figure 7 The music strong beat node detection device 200 includes an acquisition unit 201, a generation unit 202, a calculation unit 203 and a determination unit 204.

[0059] Among them, the acquisition unit 201 is used to acquire the music signal to be detected and the beat tracking result and beat speed corresponding to the music signal to be detected; the generation unit 202 is used to generate a plurality of different strong beat candidate masks according to the beat speed through a strong beat candidate mask generation method, and generate a plurality of different strong beat candidate arrays according to the plurality of different strong beat candidate masks and the beat tracking result; the calculation unit 203 is used to calculate the short-time energy feature according to the music signal to be detected, and smooth the short-time energy feature through a preset window function to obtain a smoothed short-time energy feature, and calculate the energy feature difference of the smoothed short-time energy feature; the determination unit 204 is used to determine the strong beat node detection result corresponding to the music signal to be detected according to the plurality of different strong beat candidate arrays and the energy feature difference.

[0060] In some embodiments, such as this embodiment, the generating unit 202 includes a first calculating subunit, a first generating subunit, and a second calculating subunit.

[0061] Among them, the first calculation subunit is used to calculate the number of masks in each strong beat candidate mask type according to the beat speed and a preset number of strong beat candidate mask types; the first generation subunit is used to generate multiple different strong beat candidate masks according to the number of masks, a preset mask interval and multiple initial mask ranges, specifically, a first strong beat candidate mask is generated according to a first initial mask range, a preset mask interval and the number of masks; a second strong beat candidate mask is generated according to a second initial mask range, the preset mask interval and the number of masks; a third strong beat candidate mask is generated according to a third initial mask range, the preset mask interval and the number of masks; a fourth strong beat candidate mask is generated according to a fourth initial mask range, the preset mask interval and the number of masks; the second calculation subunit is used to calculate the product of the multiple different strong beat candidate masks and the beat tracking result to obtain multiple different strong beat candidate arrays.

[0062] In some embodiments, such as the present embodiment, the computing unit 203 includes a third computing subunit, a fourth computing subunit, a fifth computing subunit, a sixth computing subunit, and an AS unit.

[0063] Among them, the third calculation subunit is used to calculate the root mean square value of the music signal to be detected within a preset time length; the fourth calculation subunit is used to substitute the root mean square value into the short-time energy feature formula to calculate the short-time energy feature; the fifth calculation subunit is used to convolve the short-time energy feature with the Hanning window function to obtain a smoothed short-time energy feature; the sixth calculation subunit calculates the difference between the smoothed short-time energy features of every two adjacent time points in the smoothed short-time energy feature, and uses the difference as the first energy feature difference, selects the larger value between the first energy feature difference and the preset value as the second energy feature difference, specifically, obtains the starting smoothed short-time energy feature and the next smoothed short-time energy feature from the smoothed short-time energy feature, and uses the starting smoothed short-time energy feature as the second energy feature difference. short-time energy feature as the current smooth short-time energy feature; calculate the difference between the current smooth short-time energy feature and the next smooth short-time energy feature to obtain a first current feature difference; select the larger value between the first current energy feature difference and the preset value as the second current energy feature difference; use the next smooth short-time energy feature and the next feature of the next smooth short-time energy feature as the current smooth short-time energy feature and the next smooth short-time energy feature, and return to execute the step of calculating the difference between the current smooth short-time energy feature and the next smooth short-time energy feature to obtain the first current feature difference until the second energy feature difference is generated; the as unit is used to use the second energy feature difference and the preset feature difference as the energy feature difference.

[0064] In some embodiments, such as this embodiment, the determining unit 204 includes a seventh calculating subunit and a selecting unit.

[0065] Among them, the seventh calculation subunit is used to calculate the product of the multiple different strong beat candidate arrays and the energy feature difference to obtain multiple strong beat node values; the selection unit is used to select the strong beat candidate array corresponding to the maximum strong beat node value among the multiple strong beat node values ​​as the strong beat node detection result corresponding to the music signal to be detected.

[0066] The above-mentioned music strong beat node detection device can be implemented in the form of a computer program, and the computer program can be used in Figure 8 Runs on the computer device shown.

[0067] See also Figure 8 , Figure 8 300 is a schematic block diagram of a computer device provided by an embodiment of the present invention. The computer device 300 is a display device with a music strong beat node detection function.

[0068] See also Figure 8The computer device 300 includes a processor 302 , a memory and a network interface 305 connected via a system bus 301 , wherein the memory may include a non-volatile storage medium 303 and an internal memory 304 .

[0069] The non-volatile storage medium 303 can store an operating system 3031 and a computer program 3032. When the computer program 3032 is executed, the processor 302 can execute a music strong beat node detection method.

[0070] The processor 302 is used to provide computing and control capabilities to support the operation of the entire computer device 300 .

[0071] The internal memory 304 provides an environment for the operation of the computer program 3032 in the non-volatile storage medium 303. When the computer program 3032 is executed by the processor 302, the processor 302 can execute a method for detecting a strong beat node of music.

[0072] The network interface 305 is used to communicate with other devices over the network. Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device 300 to which the solution of the present invention is applied. The specific computer device 300 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0073] Among them, the processor 302 is used to run the computer program 3032 stored in the memory to implement the following steps: obtain the music signal to be detected and the beat tracking result and beat speed corresponding to the music signal to be detected; generate multiple different strong beat candidate masks through a strong beat candidate mask generation method according to the beat speed, and generate multiple different strong beat candidate arrays according to the multiple different strong beat candidate masks and the beat tracking results; calculate the short-time energy feature according to the music signal to be detected, and smooth the short-time energy feature through a preset window function to obtain a smoothed short-time energy feature, and calculate the energy feature difference of the smoothed short-time energy feature; determine the strong beat node detection result corresponding to the music signal to be detected according to the multiple different strong beat candidate arrays and the energy feature difference.

[0074] In certain embodiments, such as the present embodiment, when the processor 302 implements the step of generating a plurality of different strong beat candidate masks through a strong beat candidate mask generating method according to the beat tempo, and generating a plurality of different strong beat candidate arrays according to the plurality of different strong beat candidate masks and the beat tracking result, the processor 302 specifically implements the following steps: calculating the number of masks in each strong beat candidate mask type according to the beat tempo and a preset number of strong beat candidate mask types; generating a plurality of different strong beat candidate masks according to the number of masks, a preset mask interval, and a plurality of initial mask ranges; and calculating the product of the plurality of different strong beat candidate masks and the beat tracking result to obtain a plurality of different strong beat candidate arrays.

[0075] In certain embodiments, such as the present embodiment, the processor 302, when implementing the step of generating multiple different strong beat candidate masks according to the number of masks, the preset mask interval, and multiple initial mask ranges, specifically implements the following steps: generating a first strong beat candidate mask according to the first initial mask range, the preset mask interval, and the number of masks; generating a second strong beat candidate mask according to the second initial mask range, the preset mask interval, and the number of masks; generating a third strong beat candidate mask according to the third initial mask range, the preset mask interval, and the number of masks; generating a fourth strong beat candidate mask according to the fourth initial mask range, the preset mask interval, and the number of masks.

[0076] In certain embodiments, such as the present embodiment, when the processor 302 implements the step of calculating the short-time energy feature according to the music signal to be detected and smoothing the short-time energy feature through a preset window function to obtain a smoothed short-time energy feature, it specifically implements the following steps: calculating the root mean square value of the music signal to be detected within a preset time length; substituting the root mean square value into the short-time energy feature formula to calculate the short-time energy feature; and convolving the short-time energy feature with the Hanning window function to obtain a smoothed short-time energy feature.

[0077] In certain embodiments, such as the present embodiment, the processor 302 specifically implements the following steps when implementing the step of calculating the energy feature difference of the smoothed short-time energy feature: calculating the difference between the smoothed short-time energy features of every two adjacent time points in the smoothed short-time energy feature, and using the difference as the first energy feature difference, selecting the larger value between the first energy feature difference and the preset value as the second energy feature difference; using the second energy feature difference and the preset feature difference as the energy feature difference.

[0078] In some embodiments, such as the present embodiment, the processor 302 specifically implements the following steps when implementing the step of calculating the difference between the smoothed short-time energy features of every two adjacent time points in the smoothed short-time energy feature, taking the difference as the first energy feature difference, and selecting the larger value between the first energy feature difference and the preset value as the second energy feature difference: obtaining the starting smoothed short-time energy feature and the next smoothed short-time energy feature from the smoothed short-time energy feature, and taking the starting smoothed short-time energy feature as the current smoothed short-time energy feature; calculating the difference between the current smoothed short-time energy feature and the next smoothed short-time energy feature to obtain the first current feature difference; selecting the larger value between the first current energy feature difference and the preset value as the second current energy feature difference; taking the next smoothed short-time energy feature and the next feature of the next smoothed short-time energy feature as the current smoothed short-time energy feature and the next smoothed short-time energy feature, and returning to execute the step of calculating the difference between the current smoothed short-time energy feature and the next smoothed short-time energy feature to obtain the first current feature difference until the second energy feature difference is generated.

[0079] In certain embodiments, such as the present embodiment, the processor 302, when implementing the step of determining the strong beat node detection result corresponding to the music signal to be detected based on the multiple different strong beat candidate arrays and the energy feature difference, specifically implements the following steps: calculating the product of the multiple different strong beat candidate arrays and the energy feature difference to obtain multiple strong beat node values; selecting the strong beat candidate array corresponding to the maximum strong beat node value among the multiple strong beat node values ​​as the strong beat node detection result corresponding to the music signal to be detected.

[0080] It should be understood that in the embodiment of the present invention, the processor 302 may be a central processing unit (CPU), and the processor 302 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0081] It is understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a storage medium, which is a computer-readable storage medium. The computer program is executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0082] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program. When the computer program is executed by a processor, the processor executes any embodiment of the above-mentioned music strong beat node detection method.

[0083] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0084] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0085] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0086] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0087] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.

[0088] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0089] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

[0090] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A music strong beat node detection method, characterized in that: include: Acquire a music signal to be detected and a beat tracking result and a beat speed corresponding to the music signal to be detected; Generate a plurality of different strong beat candidate masks according to the beat speed by using a strong beat candidate mask generation method, and generate a plurality of different strong beat candidate arrays according to the plurality of different strong beat candidate masks and the beat tracking result; Calculate the short-time energy feature according to the music signal to be detected, smooth the short-time energy feature by a preset window function to obtain a smoothed short-time energy feature, and calculate the energy feature difference of the smoothed short-time energy feature; Determine a strong beat node detection result corresponding to the music signal to be detected according to the multiple different strong beat candidate arrays and the energy feature difference; The method of generating a plurality of different strong beat candidate masks according to the beat speed by using a strong beat candidate mask generation method, and generating a plurality of different strong beat candidate arrays according to the plurality of different strong beat candidate masks and the beat tracking result, comprises: Calculate the number of masks in each of the strong beat candidate mask types according to the beat speed and a preset number of strong beat candidate mask types; Generate a plurality of different strong shot candidate masks according to the number of masks, the preset mask interval, and a plurality of initial mask ranges; A plurality of different strong beat candidate arrays are obtained by calculating the product of the plurality of different strong beat candidate masks and the beat tracking result.

2. The method according to claim 1, characterized in that The generating a plurality of different strong shot candidate masks according to the number of masks, the preset mask interval and the plurality of initial mask ranges comprises: Generate a first strong shot candidate mask according to the first initial mask range, the preset mask interval and the number of masks; Generate a second strong beat candidate mask according to the second initial mask range, the preset mask interval and the number of masks; Generate a third strong beat candidate mask according to the third initial mask range, the preset mask interval and the number of masks; A fourth strong beat candidate mask is generated according to the fourth initial mask range, the preset mask interval, and the number of masks.

3. The method according to claim 1, characterized in that The step of calculating the short-time energy feature according to the music signal to be detected, and smoothing the short-time energy feature by a preset window function to obtain a smoothed short-time energy feature includes: Calculating the root mean square value of the music signal to be detected within a preset time length; Substituting the RMS value into the short-time energy characteristic formula to calculate the short-time energy characteristic; The short-time energy feature is convolved with a Hanning window function to obtain a smoothed short-time energy feature.

4. The method according to claim 3, characterized in that The calculating the energy feature difference of the smoothed short-time energy feature comprises: Calculate the difference between the smoothed short-time energy features of every two adjacent time points in the smoothed short-time energy feature, and use the difference as a first energy feature difference, and select the larger value between the first energy feature difference and a preset value as a second energy feature difference; The second energy characteristic difference value and the preset characteristic difference value are used as energy characteristic difference values.

5. The method according to claim 1, characterized in that The step of calculating the difference between the smoothed short-time energy features at every two adjacent time points in the smoothed short-time energy features, taking the difference as a first energy feature difference, and selecting a larger value between the first energy feature difference and a preset value as a second energy feature difference, comprises: Acquire a starting smooth short-time energy feature and a next smooth short-time energy feature from the smooth short-time energy feature, and use the starting smooth short-time energy feature as the current smooth short-time energy feature; Calculating the difference between the current smoothed short-time energy feature and the next smoothed short-time energy feature to obtain a first current feature difference; Selecting a larger value between the first current energy characteristic difference value and a preset value as a second current energy characteristic difference value; The next smoothed short-time energy feature and the next feature of the next smoothed short-time energy feature are used as the current smoothed short-time energy feature and the next smoothed short-time energy feature, and the step of calculating the difference between the current smoothed short-time energy feature and the next smoothed short-time energy feature to obtain a first current feature difference is returned to execute until a second energy feature difference is generated.

6. The method according to claim 1, characterized in that The step of determining the strong beat node detection result corresponding to the music signal to be detected according to the multiple different strong beat candidate arrays and the energy feature difference comprises: Calculating the product of the plurality of different strong beat candidate arrays and the energy feature difference to obtain a plurality of strong beat node values; The strong beat candidate array corresponding to the maximum strong beat node value among the multiple strong beat node values ​​is selected as the strong beat node detection result corresponding to the music signal to be detected.

7. A music strong beat node detection device, characterized in that: include: An acquisition unit, used for acquiring a music signal to be detected and a beat tracking result and a beat speed corresponding to the music signal to be detected; A generating unit, configured to generate a plurality of different strong beat candidate masks according to the beat tempo by using a strong beat candidate mask generating method, and to generate a plurality of different strong beat candidate arrays according to the plurality of different strong beat candidate masks and the beat tracking result; A calculation unit, used for calculating a short-time energy feature according to the music signal to be detected, smoothing the short-time energy feature by a preset window function to obtain a smoothed short-time energy feature, and calculating an energy feature difference of the smoothed short-time energy feature; A determination unit, configured to determine a strong beat node detection result corresponding to the music signal to be detected according to the plurality of different strong beat candidate arrays and the energy feature difference; The generating unit comprises: A first calculation subunit, configured to calculate the number of masks in each of the strong beat candidate mask types according to the beat speed and a preset number of strong beat candidate mask types; A first generating subunit, configured to generate a plurality of different strong shot candidate masks according to the number of masks, a preset mask interval, and a plurality of initial mask ranges; The second calculation subunit is used to calculate the product of the multiple different strong beat candidate masks and the beat tracking result to obtain multiple different strong beat candidate arrays.

8. A computer device, characterized in that: The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 6 when executing the computer program.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 can be implemented.

Citation Information

Patent Citations

  • Audio data processing method and device, electronic equipment and storage medium

    CN110890083A

  • Information identification method and device, electronic equipment and storage medium

    CN113223487A