Atmosphere lamp control method and device, vehicle and storage medium

By extracting and processing the features of audio signals from multi-channel sound sources, the ambient lights are controlled to realize the music follow-up function, which solves the problem of low matching between ambient lights and music in the existing technology and achieves a more accurate synchronization effect between music and lights.

CN118804447APending Publication Date: 2024-10-18XIAOMI EV TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310403668.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-04-14
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

In the existing technology, the visual and auditory matching of the music follow-up function of the ambient light is low, and there is a lack of effective control means.

Method used

By extracting features from audio signals of multi-channel sound sources, the beat feature signal, melody feature signal and contrast information feature signal are obtained, and the ambient lights are controlled based on the brightness information of these feature signals to realize the music follow-up function.

Benefits of technology

It achieves precise matching of music beat and melody characteristics, automatically adapts to different sound sources, creates different ambient lighting effects, and improves the synchronization between music and lighting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118804447A_ABST
    Figure CN118804447A_ABST
Patent Text Reader

Abstract

The invention relates to an atmosphere lamp control method and device, a vehicle and a storage medium. The method comprises the following steps: generating an audio signal of a single-channel sound source from an audio signal of a multi-channel sound source; performing feature extraction on the audio signal of the single-channel sound source to obtain a beat feature signal, a melody feature signal and a comparison information feature signal; performing frame-by-frame processing on the beat characteristic signal, the melody characteristic signal and the comparison information characteristic signal to obtain beat brightness information of a current frame in the beat characteristic signal, melody brightness information of the current frame in the melody characteristic signal and comparison brightness information of the current frame in the comparison information characteristic signal; and according to the beat brightness information of the current frame, the melody brightness information of the current frame and the comparison brightness information of the current frame, adopting a corresponding control mode to control an atmosphere lamp to realize a music follow-up function. According to the invention, different sound sources can be automatically adapted, and different atmosphere lamp light effects can be created for different sound sources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of signal processing, in particular to the technical field of vehicle-mounted music signal processing, and in particular to an atmosphere light control method, device, vehicle and storage medium. Background Art

[0002] With the rapid development of vehicle technology and the continuous improvement of users' vehicle experience, the current mainstream models in the market are equipped with ambient lights, which are usually designed with music-following functions, and the changes in the ambient light are used to create a live atmosphere. However, in the related art, the control of ambient lights to achieve the music-following function has the problem of low or no matching between visual and auditory senses, and there is currently a lack of effective means for controlling ambient lights to achieve the music-following function. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides an atmosphere light control method, device, vehicle and storage medium.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an atmosphere light control method, comprising:

[0005] Generate an audio signal of a single-channel sound source from an audio signal of a multi-channel sound source;

[0006] Extracting features of the audio signal of the single-channel sound source to obtain a beat feature signal, a melody feature signal and a contrast information feature signal;

[0007] Processing the beat characteristic signal, the melody characteristic signal and the contrast information characteristic signal frame by frame respectively, and obtaining the beat brightness information of the current frame in the beat characteristic signal, the melody brightness information of the current frame in the melody characteristic signal and the contrast brightness information of the current frame in the contrast information characteristic signal;

[0008] According to the beat brightness information of the current frame, the melody brightness information of the current frame and the contrast brightness information of the current frame, a corresponding control mode is adopted to control the atmosphere light to realize the music follow-up function.

[0009] According to a second aspect of an embodiment of the present disclosure, there is provided an atmosphere light control device, comprising:

[0010] A generating module, used for generating an audio signal of a single-channel sound source from an audio signal of a multi-channel sound source;

[0011] A feature extraction module is used to extract features from the audio signal of the single-channel sound source to obtain a beat feature signal, a melody feature signal and a contrast information feature signal;

[0012] A processing module, used to process the beat characteristic signal, the melody characteristic signal and the contrast information characteristic signal frame by frame respectively, to obtain the beat brightness information of the current frame in the beat characteristic signal, the melody brightness information of the current frame in the melody characteristic signal and the contrast brightness information of the current frame in the contrast information characteristic signal;

[0013] The control module is used to control the atmosphere light to realize the music following function by adopting a corresponding control mode according to the beat brightness information of the current frame, the melody brightness information of the current frame and the contrast brightness information of the current frame.

[0014] According to a third aspect of an embodiment of the present disclosure, a vehicle is provided, comprising:

[0015] At least one ambient light and at least one speaker;

[0016] At least one processor, the processor being communicatively connected to the atmosphere light and the speaker respectively;

[0017] At least one memory is communicatively connected to the at least one processor; wherein,

[0018] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method as described in the first aspect.

[0019] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor, the processor is enabled to execute the method described in the first aspect above.

[0020] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.

[0021] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: the beat, melody features and contrast information features of the music can be accurately extracted, and corresponding brightness information can be output according to the beat features, melody features and contrast information features. The corresponding control mode can be used to control the atmosphere light to realize the music follow-up function, and automatic adaptation to different sound sources can be achieved to create different atmosphere light effects for different sound sources. For example, it can be determined whether the current sound source is suitable for following the beat features or more suitable for following the melody features to match the brightness of the light.

[0022] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0024] Figure 1 The figure is a flow chart of a method for controlling an ambient light according to an exemplary embodiment.

[0025] Figure 2 is a flow chart of another atmosphere light control method according to an exemplary embodiment.

[0026] Figure 3 It is a flowchart of another atmosphere light control method according to an exemplary embodiment.

[0027] Figure 4 is a flow chart of yet another atmosphere light control method according to an exemplary embodiment.

[0028] Figure 5 The figure is a flow chart of a method for controlling an ambient light according to an exemplary embodiment.

[0029] Figure 6 The figure is a block diagram of a device for controlling an ambient light according to an exemplary embodiment.

[0030] Figure 7 is a block diagram of a vehicle according to an exemplary embodiment. DETAILED DESCRIPTION

[0031] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation methods described in the following exemplary embodiments do not represent all implementation methods consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims. Among them, in the description of the present disclosure, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0032] It should be noted that the atmosphere light control method provided by the embodiment of the present disclosure can be applied to vehicles. For example, the application scenario of the technical solution of the present disclosure is that in a vehicle environment, while playing a music source in combination with an audio device, the atmosphere light control method of the embodiment of the present disclosure is used to analyze the characteristics of the music source, analyze and match different music styles, convert them into brightness information and send them to the atmosphere light, so as to control the atmosphere light to realize the corresponding music following function. Or it can also be extended to other fields that need to cooperate with the rhythm of music, and the present disclosure does not make specific limitations on this.

[0033] Figure 1 is a flow chart of a method for controlling an atmosphere lamp according to an exemplary embodiment. Figure 1 As shown, the method can be used in a vehicle, including but not limited to the following steps.

[0034] In step 101, an audio signal of a multi-channel sound source is generated into an audio signal of a single-channel sound source.

[0035] Optionally, in one implementation, the atmosphere light control method of the embodiment of the present disclosure is applied to a vehicle, and the atmosphere light is an atmosphere light inside the vehicle. The audio signal of the multi-channel sound source originates from the audio system of the vehicle multimedia system. For example, the audio signal of the multi-channel sound source may be an audio signal played by the audio system in the vehicle multimedia system. Alternatively, the audio signal of the multi-channel sound source may also be an audio signal played by a mobile device (such as a smart phone) of a person in the vehicle, and the audio signal of the multi-channel sound source played by the mobile device may be obtained by connection. Alternatively, the audio signal of the multi-channel sound source may also be obtained by implementation, and the present disclosure does not specifically limit this.

[0036] In an embodiment of the present disclosure, the number of channels of the sound source may be 2.0 type, or 5.1 type, or 7.1.4 type, etc. The audio signal of the multi-channel sound source may be processed in a single channel to obtain an audio signal of the single-channel sound source. In a possible implementation, the data of all channels in the audio signal of the multi-channel sound source may be summed and averaged to obtain an audio signal of the single-channel sound source.

[0037] In step 102, feature extraction is performed on the audio signal of the single-channel sound source to obtain a beat feature signal, a melody feature signal and a contrast information feature signal.

[0038] In an embodiment of the present disclosure, a filter can be used to extract features from an audio signal of a single-channel sound source. In a possible implementation, a multi-band filter can be used to extract features from an audio signal of a single-channel sound source to obtain a beat feature signal, a melody feature signal, and a contrast information feature signal. It can be understood that in signal processing, a multi-band filter is a process of retaining certain frequency band information from a signal. In an embodiment of the present disclosure, a multi-band filter can be used to extract features such as beat, melody, and contrast information from an audio signal of a single-channel sound source.

[0039] In step 103, the beat characteristic signal, the melody characteristic signal and the contrast information characteristic signal are processed frame by frame respectively to obtain the beat brightness information of the current frame in the beat characteristic signal, the melody brightness information of the current frame in the melody characteristic signal and the contrast brightness information of the current frame in the contrast information characteristic signal.

[0040] Optionally, in an embodiment of the present disclosure, the beat characteristic signal, melody characteristic signal and contrast information characteristic signal can be processed frame by frame, respectively, and the beat characteristic signal, melody characteristic signal and contrast information characteristic signal can be processed frame by frame, respectively. For example, energy, normalization and dynamic range compression calculations are performed on the data of each frame, so as to obtain the beat brightness information of the current frame in the beat characteristic signal, the melody brightness information of the current frame in the melody characteristic signal and the contrast brightness information of the current frame in the contrast information characteristic signal.

[0041] In step 104, according to the beat brightness information of the current frame, the melody brightness information of the current frame and the contrast brightness information of the current frame, the corresponding control mode is adopted to control the atmosphere light to realize the music following function.

[0042] In the embodiments of the present disclosure, the amplitude difference and correlation can be calculated through the beat brightness information of the current frame, the melody brightness information of the current frame, and the contrast brightness information of the current frame. According to the difference between the beat brightness information and the contrast brightness information, and the difference between the melody brightness information and the contrast brightness information, and / or the correlation between the beat brightness information and the contrast brightness information, and the correlation between the melody brightness information and the contrast brightness information, it is determined to use the corresponding control mode to control the atmosphere light to realize the music follow-up function. For example, it can be determined whether the current sound source is suitable for following the beat characteristics or more suitable for following the melody characteristics to match the brightness of the light, so as to create different atmosphere light effects for different sound sources.

[0043] By implementing the embodiments of the present disclosure, the beat, melody and contrast information features of the music can be accurately extracted, and the corresponding brightness information can be output according to the beat features, melody features and contrast information features. The corresponding control mode can be used to control the atmosphere light to realize the music follow-up function. It can automatically adapt to different sound sources and create different atmosphere light effects for different sound sources. For example, it can be determined whether the current sound source is suitable for following the beat features or more suitable for following the melody features to match the brightness of the light.

[0044] Figure 2 is a flow chart of another atmosphere light control method according to an exemplary embodiment. Figure 2 As shown, the method can be used in a vehicle, including but not limited to the following steps.

[0045] In step 201, an audio signal of a multi-channel sound source is generated into an audio signal of a single-channel sound source.

[0046] In the embodiments of the present disclosure, the implementation of step 201 may be implemented in any of the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0047] In step 202, an audio signal of a single-channel audio source is input into a multi-band filter.

[0048] In one implementation, the multi-band filter includes a first low-pass filter, a band-pass filter, and a second low-pass filter. The first low-pass filter is used to extract beat features in the audio signal of a single-channel sound source; the band-pass filter is used to extract melody features in the audio signal of a single-channel sound source; and the second low-pass filter is used to extract contrast information features in the audio signal of a single-channel sound source.

[0049] In a possible implementation, the first low-pass filter may be a low-pass filter below 200 Hz; the band-pass filter may be a band-pass filter of 200-1000 Hz; and the second low-pass filter may be a low-pass filter of 1000 Hz.

[0050] In step 203, the beat feature, melody feature and contrast information feature of the audio signal of the single-channel sound source are extracted through a multi-band filter to obtain candidate beat feature signals, candidate melody feature signals and candidate contrast information feature signals.

[0051] In step 204, based on the sampling rate and the downsampling coefficient of each characteristic signal, the corresponding characteristic signals among the candidate beat characteristic signals, the candidate melody characteristic signals and the candidate contrast information characteristic signals are downsampled to obtain the beat characteristic signals, the melody characteristic signals and the contrast information characteristic signals.

[0052] In one implementation, the downsampling coefficients of different types of characteristic signals may be the same or different. In order to reduce computing power, in an embodiment of the present disclosure, the characteristic signal extracted by the multi-stage filter may be downsampled. According to the downsampling theorem, in order to prevent aliasing after downsampling, the highest frequency of the signal must satisfy the following formula:

[0053]

[0054] Among them, fh is the highest frequency of the downsampled signal, f s is the sampling rate, and D is the downsampling coefficient. Optionally, when downsampling each characteristic signal, after determining the downsampling coefficient of the current type of characteristic signal, the audio information of every D points of the current type of characteristic signal can be retained as the audio data to be processed later. Thus, the computing power can be reduced and the delay can be reduced by downsampling processing.

[0055] In step 205, the beat characteristic signal, the melody characteristic signal and the contrast information characteristic signal are processed frame by frame respectively to obtain the beat brightness information of the current frame in the beat characteristic signal, the melody brightness information of the current frame in the melody characteristic signal and the contrast brightness information of the current frame in the contrast information characteristic signal.

[0056] In the embodiments of the present disclosure, the implementation of step 205 may be implemented in any of the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0057] In step 206, according to the beat brightness information of the current frame, the melody brightness information of the current frame and the contrast brightness information of the current frame, the corresponding control mode is adopted to control the atmosphere light to realize the music follow-up function.

[0058] In the embodiment of the present disclosure, the implementation of step 206 may be implemented in any of the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0059] By implementing the disclosed embodiments, the beat (rhythm beat), melody (melody) characteristics and contrast information characteristics of the music can be accurately extracted, and the corresponding brightness information can be output according to the beat characteristics, melody characteristics and contrast information characteristics. The corresponding control mode can be used to control the atmosphere light to realize the music follow-up function, and it can automatically adapt to different sound sources and create different atmosphere light effects for different sound sources. For example, it can be determined whether the current sound source is suitable for following the beat characteristics or more suitable for following the melody characteristics to match the brightness of the light. In addition, the computing power can be reduced and the delay can be reduced through downsampling processing.

[0060] It should be noted that in some embodiments of the present disclosure, the beat feature signal, melody feature signal and contrast information feature signal can be processed frame by frame, respectively, and the beat feature signal, melody feature signal and contrast information feature signal can be processed frame by frame, for example, the energy, normalization and dynamic range compression calculations are performed on the data of each frame, so as to obtain the beat brightness information of the current frame in the beat feature signal, the melody brightness information of the current frame in the melody feature signal and the contrast brightness information of the current frame in the contrast information feature signal. Optional, please refer to Figure 3 , Figure 3 is a flow chart of another atmosphere light control method according to an exemplary embodiment. Figure 3 As shown, the method can be used in a vehicle, including but not limited to the following steps.

[0061] In step 301, an audio signal of a multi-channel sound source is generated into an audio signal of a single-channel sound source.

[0062] In the embodiments of the present disclosure, the implementation of step 301 may be implemented in any of the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0063] In step 302, feature extraction is performed on the audio signal of the single-channel sound source to obtain a beat feature signal, a melody feature signal and a contrast information feature signal.

[0064] In the embodiments of the present disclosure, the implementation method of step 302 can be implemented by any method in the embodiments of the present disclosure. For example, step 302 can include but is not limited to the above-mentioned steps 202 to 204. The implementation method of step 302 can be implemented by the above-mentioned steps 202 to 204. This is not limited to this and will not be repeated here.

[0065] In step 303, the beat feature signal, the melody feature signal and the contrast information feature signal are framed.

[0066] In one implementation, the frame length may be set to L, and the beat feature signal, the melody feature signal, and the contrast information feature signal may be framed. For example, the frame length may be set to L and the beat feature signal may be framed; the melody feature signal may be framed based on the frame length L; and the contrast information feature signal may be framed based on the frame length L.

[0067] In step 304, energy calculation, normalization calculation and dynamic range compression calculation are performed on the current frame data in the beat characteristic signal, the current frame data in the melody characteristic signal and the current frame data in the contrast information characteristic signal to obtain the beat brightness information of the current frame in the beat characteristic signal, the melody brightness information of the current frame in the melody characteristic signal and the contrast brightness information of the current frame in the contrast information characteristic signal.

[0068] In one possible implementation, energy calculation, normalization calculation and dynamic range compression calculation are performed in sequence on the current frame data in the beat characteristic signal, the current frame data in the melody characteristic signal and the current frame data in the contrast information characteristic signal, so as to obtain the beat brightness information of the current frame in the beat characteristic signal, the melody brightness information of the current frame in the melody characteristic signal and the contrast brightness information of the current frame in the contrast information characteristic signal.

[0069] For example, taking the energy calculation of each frame of the beat characteristic signal as an example, for each frame of the beat characteristic signal, the energy of the frame can be calculated by calculating the average energy p of the frame. For example, the calculation formula of the average energy p is expressed as follows:

[0070]

[0071] Where x(n) is a frame of audio data and L is the frame length.

[0072] After obtaining the energy p of the current frame data in the beat feature signal, the frame data can be normalized in real time to control the final brightness between 0 and 100. Since the global maximum value cannot be calculated from real-time data, the present disclosure can obtain the historical maximum energy value maxPow(good) by comparing the energy p(good-1) and p(good) of the previous and next frames, and use the historical maximum energy value maxPow(good) to normalize p(good) to obtain the normalized energy value normPow(good):

[0073]

[0074]

[0075] Among them, maxPow(good) is the historical maximum capacity value; normPow(good) is the normalized energy value; p(good-1) is the energy of the previous frame data; and p(good) is the energy of the current frame data.

[0076] After obtaining the normalized capacity value of the current frame data in the beat characteristic signal, the dynamic range compression algorithm can be used to control the beat brightness of the current frame in the beat characteristic signal within an arbitrary range of 0-100, thereby obtaining the beat brightness information of the current frame in the beat characteristic signal.

[0077] In order to reduce noise and obtain data with less noise, optionally, in some embodiments of the present disclosure, after performing energy calculation on the current frame data, the current frame energy data is obtained, and the current frame energy data is smoothed based on the previous frame energy data and a smoothing coefficient; and / or, after performing normalization calculation on the current frame data, the current frame normalized data is obtained, and the current frame normalized data is smoothed given the previous frame normalized data and a smoothing coefficient.

[0078] In a possible implementation, each obtained data may be smoothed. For example, after energy calculation and normalization calculation, the data obtained after energy calculation and the data obtained after normalization calculation are smoothed, so that data with less noise can be obtained. As an example, the calculation formula of the smoothing process is expressed as follows:

[0079] y(n)=x(n-1)*a+x(n)*(1-a)a∈[0,1] (4)

[0080] Among them, y(n) is the current frame data after smoothing, x(n-1) is the previous frame data before smoothing, x(n) is the current frame data before smoothing, and a is the smoothing coefficient. The larger the smoothing coefficient, the smaller the impact on the current frame and the more obvious the smoothing effect.

[0081] Optionally, in an embodiment of the present disclosure, energy calculation, normalization calculation and dynamic range compression calculation are performed on the current frame data in the melody characteristic signal to obtain the melody brightness information of the current frame in the melody characteristic signal, and energy calculation, normalization calculation and dynamic range compression calculation are performed on the current frame data in the contrast information characteristic signal to obtain the contrast brightness information of the current frame in the contrast information characteristic signal. These can be implemented by performing energy calculation, normalization calculation and dynamic range compression calculation on the current frame data in the above-mentioned beat characteristic signal to obtain the beat brightness information of the current frame in the beat characteristic signal. This is not limited to this and will not be described in detail herein.

[0082] In step 305, according to the beat brightness information of the current frame, the melody brightness information of the current frame and the contrast brightness information of the current frame, the corresponding control mode is adopted to control the atmosphere light to realize the music follow-up function.

[0083] In the embodiments of the present disclosure, the implementation of step 305 may be implemented in any of the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0084] By implementing the embodiments of the present disclosure, the beat (rhythm beat), melody (melody) characteristics and contrast information characteristics of the music can be accurately extracted, and the corresponding brightness information can be output according to the beat characteristics, melody characteristics and contrast information characteristics. The corresponding control mode is used to control the atmosphere light to realize the music follow-up function, and it is possible to automatically adapt to different sound sources and create different atmosphere light effects for different sound sources. For example, it can be determined whether the current sound source is suitable for following the beat characteristics or more suitable for following the melody characteristics to match the brightness of the light. In addition, the computing power can be reduced and the delay can be reduced through downsampling processing. In addition, smoothing is performed in the process of converting the characteristic signal into the brightness feature, so that data with less noise can be obtained, thereby achieving a noise reduction effect.

[0085] In some embodiments of the present disclosure, the confidence can be accumulated by comparing the difference between the features and the correlation to determine whether the current music source is suitable for following the beat feature or the melody feature to match the brightness of the light, so as to achieve the purpose of real-time adaptation to different song styles and automatic switching to follow different music features. Figure 4 , Figure 4 is a flow chart of another atmosphere light control method according to an exemplary embodiment. Figure 4 As shown, the method can be used in a vehicle, including but not limited to the following steps.

[0086] In step 401, an audio signal of a multi-channel sound source is generated into an audio signal of a single-channel sound source.

[0087] In the embodiments of the present disclosure, the implementation of step 401 may be implemented in any of the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0088] In step 402, feature extraction is performed on the audio signal of the single-channel sound source to obtain a beat feature signal, a melody feature signal and a contrast information feature signal.

[0089] In the embodiments of the present disclosure, the implementation of step 402 may be implemented in any of the embodiments of the present disclosure, which is not limited here and will not be described in detail.

[0090] In step 403, the beat characteristic signal, the melody characteristic signal and the contrast information characteristic signal are processed frame by frame respectively to obtain the beat brightness information of the current frame in the beat characteristic signal, the melody brightness information of the current frame in the melody characteristic signal and the contrast brightness information of the current frame in the contrast information characteristic signal.

[0091] In the embodiments of the present disclosure, the implementation method of step 403 can be implemented in any way in the embodiments of the present disclosure. For example, step 403 can include but is not limited to the above-mentioned steps 303 and 304, and the implementation method of step 301 can be implemented in the way of the above-mentioned steps 303 and 304. This is not limited to this and will not be repeated here.

[0092] In step 404, a first difference between the beat brightness information of the current frame and the contrast brightness information of the current frame is determined.

[0093] In one implementation, the difference between the beat brightness information of the current frame and the contrast brightness information of the current frame may be calculated to obtain a first difference between the beat brightness information of the current frame and the contrast brightness information of the current frame.

[0094] In step 405, a second difference between the melody brightness information of the current frame and the contrast brightness information of the current frame is determined.

[0095] In one implementation, the difference between the melody brightness information of the current frame and the contrast brightness information of the current frame may be calculated to obtain the second difference between the melody brightness information of the current frame and the contrast brightness information of the current frame.

[0096] In step 406, a first correlation between the beat brightness information of the current frame and the contrast brightness information of the current frame is determined.

[0097] In one implementation, the correlation between the beat brightness information of the current frame and the contrast brightness information of the current frame may be calculated to obtain a first correlation between the beat brightness information of the current frame and the contrast brightness information of the current frame.

[0098] In a possible implementation, the calculation formula used to calculate the correlation between the beat brightness information of the current frame and the contrast brightness information of the current frame can be expressed as follows:

[0099]

[0100] Among them, corr is the correlation, A i is the data of the i-th signal in the current frame of the beat feature signal, is the average value of the current frame data in the beat feature signal, B i To compare the data of the i-th signal in the current frame in the information feature signal, is the average value of the current frame data in the comparison information feature signal.

[0101] In step 407, a second correlation between the melody brightness information of the current frame and the contrast brightness information of the current frame is determined.

[0102] In a possible implementation, the correlation between the melody brightness information of the current frame and the contrast brightness information of the current frame may be calculated to obtain a second correlation between the melody brightness information of the current frame and the contrast brightness information of the current frame. For example, the calculation of the correlation between the melody brightness information of the current frame and the contrast brightness information of the current frame is performed using the calculation principle of the above formula (5), which is not repeated here.

[0103] It should be noted that, in the embodiment of the present disclosure, the execution order of the above steps 404, 405, 406 and 407 is not specific, or they can be executed simultaneously, and the present disclosure does not make any specific limitation on this.

[0104] In step 408, the current beat total score and the current melody total score are determined according to the first difference and the second difference, and / or the first correlation and the second correlation.

[0105] In an embodiment of the present disclosure, the first difference and the second difference may be compared in size, and the first correlation and the second correlation may be compared in size. The current beat total score and the current melody total score may be determined based on the comparison result of the first difference and the second difference, and / or the comparison result of the first correlation and the second correlation.

[0106] In one implementation, in response to the first difference being smaller than the second difference and / or the first correlation being larger than the second correlation, the current beat score is increased by one, and the current beat total score and the current melody total score are determined.

[0107] In another implementation, in response to the first difference being greater than or equal to the second difference and / or the first correlation being less than or equal to the second correlation, the current melody score is increased by one, and the current melody total score and the current beat total score are determined.

[0108] In step 409, in response to the current beat total score being greater than or equal to the first score threshold, or the current melody total score being greater than or equal to the second score threshold, the corresponding control mode is used to control the atmosphere light to realize the music follow-up function.

[0109] In one implementation, in response to the current beat total score being greater than or equal to the first score threshold, the ambient light is controlled to be in a beat control mode; wherein the beat control mode is used to instruct the ambient light to implement a music follow-up function based on the beat brightness information of the current frame. In a possible implementation, when the current beat total score is greater than or equal to the first score threshold, and the ambient light is controlled to be in the beat control mode, the current melody total score may be initialized, for example, the current melody total score may be reset to 0.

[0110] In another implementation, in response to the current melody total score being greater than or equal to the second score threshold, the ambient light is controlled to be in melody control mode; wherein the melody control mode is used to instruct the ambient light to implement a music follow-up function based on the melody brightness information of the current frame. In a possible implementation, the second score threshold may be the same as or different from the first score threshold. Wherein, when the current melody total score is the current melody total score and the ambient light is controlled to be in melody control mode, the current beat total score may be initialized, for example, the current beat total score may be reset to 0.

[0111] The following will be combined Figure 5 The present disclosure is described exemplarily.

[0112] like Figure 5 As shown, the atmosphere light control method may include the following steps.

[0113] Step 1: You can synthesize multi-channel sound sources into a single channel.

[0114] Step 2: Input the audio signal of the single-channel sound source into a multi-band filter, obtain the characteristic audio signal of the beat, melody and contrast information through the multi-band filter and perform downsampling processing.

[0115] Step 3: Process the downsampled beat feature signal, melody feature signal and contrast information feature signal through the basic algorithm. The basic algorithm mainly processes the downsampled audio data in frames, and calculates the energy, normalization and dynamic range compression of each frame of data. And smoothing is performed during the processing. Each frame of audio information is converted into brightness features, so that the beat brightness information of the current frame in the beat feature signal, the melody brightness information of the current frame in the melody feature signal and the contrast brightness information of the current frame in the contrast information feature signal can be obtained.

[0116] Step 4: After obtaining the beat brightness information, the melody brightness information of the current frame in the melody feature signal, and the contrast brightness information of the current frame in the contrast information feature signal, the judgment mechanism calculates the amplitude difference and correlation between the contrast brightness information, the beat brightness information, and the melody brightness information. When the difference between the beat brightness information and the contrast brightness information is less than the difference between the melody brightness information and the contrast brightness information, or the correlation between the beat brightness information and the contrast brightness information is greater than the correlation between the melody brightness information and the contrast brightness information, it is determined that the current frame is a sound source that meets the beat-following feature. At the same time, the beat score of the current frame is increased by one until the score is added to the set score threshold, and the mode is switched to the beat-following feature. If the beat score of the current frame does not reach the score threshold, and the total melody score does not reach the score threshold, the current mode can be continued.

[0117] By implementing the embodiments of the present disclosure, confidence can be accumulated by comparing the differences and correlations between features, so as to adapt to different song styles in real time and automatically switch to follow different music features.

[0118] Figure 6 is a block diagram of an atmosphere light control device according to an exemplary embodiment. Figure 6 The device includes: a generating module 601, a feature extracting module 602, a processing module 603 and a controlling module 604.

[0119] The generating module 601 is used to generate an audio signal of a single-channel sound source from an audio signal of a multi-channel sound source.

[0120] The feature extraction module 602 is used to extract features from the audio signal of the single-channel sound source to obtain a beat feature signal, a melody feature signal and a contrast information feature signal.

[0121] In one implementation, the feature extraction module 602 is specifically used to: input the audio signal of the single-channel sound source into a multi-band filter; extract the beat features, melody features and contrast information features of the audio signal of the single-channel sound source through the multi-band filter to obtain candidate beat feature signals, candidate melody feature signals and candidate contrast information feature signals; based on the sampling rate and the downsampling coefficient of each feature signal, downsample the corresponding feature signals among the candidate beat feature signals, the candidate melody feature signals and the candidate contrast information feature signals to obtain the beat feature signals, the melody feature signals and the contrast information feature signals.

[0122] In one possible implementation, the multi-band filter includes a first low-pass filter, a band-pass filter, and a second low-pass filter, wherein the first low-pass filter is used to extract beat features in the audio signal of a single-channel sound source; the band-pass filter is used to extract melody features in the audio signal of a single-channel sound source; and the second low-pass filter is used to extract contrast information features in the audio signal of a single-channel sound source.

[0123] The processing module 603 is used to process the beat characteristic signal, the melody characteristic signal and the contrast information characteristic signal frame by frame respectively, and obtain the beat brightness information of the current frame in the beat characteristic signal, the melody brightness information of the current frame in the melody characteristic signal and the contrast brightness information of the current frame in the contrast information characteristic signal.

[0124] In one implementation, the processing module 603 is specifically used to: perform frame processing on the beat characteristic signal, the melody characteristic signal and the contrast information characteristic signal respectively; perform energy calculation, normalization calculation and dynamic range compression calculation on the current frame data in the beat characteristic signal, the current frame data in the melody characteristic signal and the current frame data in the contrast information characteristic signal to obtain the beat brightness information of the current frame in the beat characteristic signal, the melody brightness information of the current frame in the melody characteristic signal and the contrast brightness information of the current frame in the contrast information characteristic signal.

[0125] In one possible implementation, the processing module 603 is also used to: obtain the current frame energy data after performing energy calculation on the current frame data, and smooth the current frame energy data based on the previous frame energy data and the smoothing coefficient; and / or obtain the current frame normalized data after performing normalization calculation on the current frame data, and smooth the current frame normalized data given the previous frame normalized data and the smoothing coefficient.

[0126] The control module 604 is used to control the atmosphere light to realize the music following function by adopting the corresponding control mode according to the beat brightness information of the current frame, the melody brightness information of the current frame and the contrast brightness information of the current frame.

[0127] In one implementation, the control module 604 is specifically used to: determine a first difference between the beat brightness information of the current frame and the contrast brightness information of the current frame; determine a second difference between the melody brightness information of the current frame and the contrast brightness information of the current frame; determine a first correlation between the beat brightness information of the current frame and the contrast brightness information of the current frame; determine a second correlation between the melody brightness information of the current frame and the contrast brightness information of the current frame; determine the current beat total score and the current melody total score based on the first difference and the second difference, and / or the first correlation and the second correlation; in response to the current beat total score being greater than or equal to the first score threshold, or the current melody total score being greater than or equal to the second score threshold, adopting a corresponding control mode to control the atmosphere light to realize the music follow-up function.

[0128] In one possible implementation, the control module 604 determines the current beat total score and the current melody total score based on the first difference and the second difference, and / or the first correlation and the second correlation as follows: in response to the first difference being less than the second difference, and / or the first correlation being greater than the second correlation, the current beat score is increased by one, and the current beat total score and the current melody total score are determined; or, in response to the first difference being greater than or equal to the second difference, and / or the first correlation being less than or equal to the second correlation, the current melody score is increased by one, and the current melody total score and the current beat total score are determined.

[0129] In one possible implementation, the control module 604 is specifically used to: in response to the current beat total score being greater than or equal to a first score threshold, control the atmosphere light to be in a beat control mode; wherein the beat control mode is used to indicate that the atmosphere light implements a music follow-up function based on the beat brightness information of the current frame; or, in response to the current melody total score being greater than or equal to a second score threshold, control the atmosphere light to be in a melody control mode; wherein the melody control mode is used to indicate that the atmosphere light implements a music follow-up function based on the melody brightness information of the current frame.

[0130] In a possible implementation, the ambient light may be an ambient light inside a vehicle.

[0131] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0132] Figure 7 FIG. 7 is a block diagram of a vehicle 700 according to an exemplary embodiment. Figure 7 , the vehicle 700 may include one or more of the following components: a processing component 702 , a memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output (I / O) interface 712 , a sensor component 714 , and a communication component 716 .

[0133] The processing component 702 generally controls the overall operation of the vehicle 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.

[0134] The memory 704 is configured to store various types of data to support operations in the vehicle 700. Examples of such data include instructions for any application or method operating on the vehicle 700, etc. The memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0135] The power assembly 706 provides power to various components of the vehicle 700. The power assembly 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the vehicle 700.

[0136] The multimedia component 708 includes a screen that provides an output interface between the vehicle 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes one or more cameras. The camera may receive external multimedia data when the vehicle 700 is in an operating mode, such as a shooting mode or a video mode. Each camera may be a fixed optical lens system or have a focal length and optical zoom capability. In some embodiments, the multimedia component 708 includes at least one ambient light, which may achieve corresponding lighting effects.

[0137] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the vehicle 700 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting an audio signal. In some embodiments, the audio component 710 also includes at least one speaker. When the vehicle 700 is in an atmosphere light control mode, the audio signal output by the speaker can be used to control the atmosphere light to realize the music follow-up function, so that it can realize automatic adaptation to different sound sources and create different atmosphere light lighting effects for different sound sources.

[0138] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0139] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the vehicle 700. For example, the sensor assembly 714 can detect the open / closed state of the vehicle 700, the relative positioning of components, such as the display and keypad of the vehicle 700, and the sensor assembly 714 can also detect the position change of the vehicle 700 or a component of the vehicle 700, the presence or absence of user contact with the vehicle 700, the orientation or acceleration / deceleration of the vehicle 700, and the temperature change of the vehicle 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0140] The communication component 716 is configured to facilitate wired or wireless communication between the vehicle 700 and other devices. The vehicle 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0141] In an exemplary embodiment, the vehicle 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-described methods.

[0142] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 704 including instructions, which can be executed by a processor 720 of the vehicle 700 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0143] In an exemplary embodiment, a computer program product is also provided, comprising a computer program, which implements the steps of the above method when executed by the processor 720 of the vehicle 700.

[0144] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0145] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for controlling an atmosphere lamp, characterized in that: include: Generate an audio signal of a single-channel sound source from an audio signal of a multi-channel sound source; Extracting features of the audio signal of the single-channel sound source to obtain a beat feature signal, a melody feature signal and a contrast information feature signal; Processing the beat characteristic signal, the melody characteristic signal and the contrast information characteristic signal frame by frame respectively, and obtaining the beat brightness information of the current frame in the beat characteristic signal, the melody brightness information of the current frame in the melody characteristic signal and the contrast brightness information of the current frame in the contrast information characteristic signal; According to the beat brightness information of the current frame, the melody brightness information of the current frame and the contrast brightness information of the current frame, a corresponding control mode is adopted to control the atmosphere light to realize the music follow-up function.

2. The method according to claim 1, characterized in that The step of extracting features from the audio signal of the single-channel sound source to obtain a beat feature signal, a melody feature signal and a contrast information feature signal includes: Inputting the audio signal of the single-channel sound source into a multi-band filter; Extracting beat features, melody features and contrast information features from the audio signal of the single-channel sound source through the multi-band filter to obtain candidate beat feature signals, candidate melody feature signals and candidate contrast information feature signals; Based on the sampling rate and the downsampling coefficient of each characteristic signal, the corresponding characteristic signals among the candidate beat characteristic signal, the candidate melody characteristic signal and the candidate contrast information characteristic signal are downsampled to obtain the beat characteristic signal, the melody characteristic signal and the contrast information characteristic signal.

3. The method according to claim 2, characterized in that The multi-stage filter includes a first low-pass filter, a band-pass filter, and a second low-pass filter, wherein: The first low-pass filter is used to extract the beat feature in the audio signal of the single-channel sound source; The bandpass filter is used to extract the melody features in the audio signal of the single-channel sound source; The second low-pass filter is used to extract contrast information features from the audio signal of the single-channel sound source.

4. The method according to claim 1, characterized in that The step of processing the beat characteristic signal, the melody characteristic signal and the contrast information characteristic signal frame by frame respectively, and obtaining the beat brightness information of the current frame in the beat characteristic signal, the melody brightness information of the current frame in the melody characteristic signal and the contrast brightness information of the current frame in the contrast information characteristic signal, comprises: Respectively performing frame processing on the beat characteristic signal, the melody characteristic signal and the contrast information characteristic signal; Energy calculation, normalization calculation and dynamic range compression calculation are performed on the current frame data in the beat characteristic signal, the current frame data in the melody characteristic signal and the current frame data in the contrast information characteristic signal to obtain the beat brightness information of the current frame in the beat characteristic signal, the melody brightness information of the current frame in the melody characteristic signal and the contrast brightness information of the current frame in the contrast information characteristic signal.

5. The method according to claim 4, characterized in that The method further comprises: After performing energy calculation on the current frame data, the current frame energy data is obtained, and the current frame energy data is smoothed based on the previous frame energy data and the smoothing coefficient; and / or, After normalization calculation is performed on the current frame data, current frame normalized data is obtained, and the current frame normalized data is smoothed by giving the previous frame normalized data and a smoothing coefficient.

6. The method according to claim 1, characterized in that According to the beat brightness information of the current frame, the melody brightness information of the current frame and the contrast brightness information of the current frame, the corresponding control mode is used to control the atmosphere light to realize the music following function, including: Determine a first difference between the beat brightness information of the current frame and the contrast brightness information of the current frame; determining a second difference between the melody brightness information of the current frame and the contrast brightness information of the current frame; Determine a first correlation between the beat brightness information of the current frame and the contrast brightness information of the current frame; determining a second correlation between the melody brightness information of the current frame and the contrast brightness information of the current frame; Determine a current beat total score and a current melody total score according to the first difference and the second difference, and / or the first correlation and the second correlation; In response to the current beat total score being greater than or equal to a first score threshold, or the current melody total score being greater than or equal to a second score threshold, a corresponding control mode is adopted to control the atmosphere light to realize a music follow-up function.

7. The method according to claim 6, characterized in that Determining the current beat total score and the current melody total score according to the first difference and the second difference, and / or the first correlation and the second correlation, includes: In response to the first difference being smaller than the second difference, and / or the first correlation being larger than the second correlation, the current beat score is increased by one, and the current beat total score and the current melody total score are determined; or In response to the first difference being greater than or equal to the second difference, and / or the first correlation being less than or equal to the second correlation, the current melody score is increased by one, and the current melody total score and the current beat total score are determined.

8. The method according to claim 6, characterized in that In response to the current beat total score being greater than or equal to the first score threshold, or the current melody total score being greater than or equal to the second score threshold, using a corresponding control mode to control the atmosphere light to realize the music following function, including: In response to the current beat total score being greater than or equal to a first score threshold, controlling the atmosphere light to be in a beat control mode; wherein the beat control mode is used to instruct the atmosphere light to implement a music follow-up function based on the beat brightness information of the current frame; or, In response to the current melody total score being greater than or equal to a second score threshold, the atmosphere light is controlled to be in a melody control mode; wherein the melody control mode is used to instruct the atmosphere light to implement a music follow-up function based on the melody brightness information of the current frame.

9. The method according to any one of claims 1 to 8, characterized in that The ambient light is an ambient light inside a vehicle.

10. An atmosphere light control device, characterized in that: include: A generating module, used for generating an audio signal of a single-channel sound source from an audio signal of a multi-channel sound source; A feature extraction module is used to extract features from the audio signal of the single-channel sound source to obtain a beat feature signal, a melody feature signal and a contrast information feature signal; A processing module, used to process the beat characteristic signal, the melody characteristic signal and the contrast information characteristic signal frame by frame respectively, to obtain the beat brightness information of the current frame in the beat characteristic signal, the melody brightness information of the current frame in the melody characteristic signal and the contrast brightness information of the current frame in the contrast information characteristic signal; The control module is used to control the atmosphere light to realize the music following function by adopting a corresponding control mode according to the beat brightness information of the current frame, the melody brightness information of the current frame and the contrast brightness information of the current frame.

11. A vehicle, characterized in that: include: At least one ambient light and at least one speaker; At least one processor, the processor being communicatively connected to the atmosphere light and the speaker respectively; At least one memory is communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor, the processor is enabled to perform the method according to any one of claims 1 to 9.