Vehicle-mounted atmosphere lamp music rhythm music beat control method and system

By using autocorrelation calculation and threshold determination, combined with the calculation of correlation coefficients for frequency bands and the entire frequency band, the problem of inaccurate audio beat recognition in the music rhythm of in-vehicle ambient lighting was solved, achieving a smooth and stable music rhythm effect and ensuring the synchronous response of ambient lighting and music.

CN121940934APending Publication Date: 2026-04-28CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA FAW CO LTD
Filing Date
2026-01-23
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing technology cannot accurately identify audio beats, resulting in mismatches between the music rhythm effects of in-car ambient lighting, frequent flashing, or slow changes in color brightness.

Method used

By combining autocorrelation calculation with threshold determination, audio beat points are identified through audio data acquisition, time-domain to frequency-domain conversion, amplitude value recording, and autocorrelation calculation. The autocorrelation calculation formula R(τ)=E[X(t)*X(t+τ)] is used to set a threshold r to determine the beat points. The threshold r is optimized to adapt to high sampling rate audio systems by combining the correlation coefficients of frequency bands and the entire frequency band.

Benefits of technology

It achieves a smooth and stable musical rhythm effect, improves the accuracy and reliability of beat recognition, and ensures that the ambient lights are synchronized with the music.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121940934A_ABST
    Figure CN121940934A_ABST
Patent Text Reader

Abstract

The invention discloses a music beat control method and system for music rhythm of a vehicle-mounted atmosphere lamp, and relates to the field of vehicle control, and the method comprises the steps: 1, collecting audio data; step 2, carrying out time domain-frequency domain conversion; step 3, recording an amplitude value; 4, carrying out self-correlation calculation; step 5, beat point determination; and step 6, outputting a result. Wherein in the step 4, the self-correlation calculation comprises the steps of obtaining a self-correlation calculation formula; the self-correlation calculation formula is R (tau) = E [X (t) * X (t + tau)]; wherein E is an expected operator, X (t) is audio data at the moment t, and X (t + tau) is audio data at the moment t + tau; wherein in the step 5, the beat point judgment comprises the step of setting a threshold value r; when the autocorrelation coefficient R (tau) is greater than or equal to r, the sampling frame comprises a beat point, otherwise, the sampling frame does not comprise the beat point; wherein in the step 6, result output comprises the step of sending the judgment result of the rhythm points to the vehicle-mounted atmosphere lamp music rhythm control unit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle control, and in particular to a method for controlling the rhythm of music in vehicle ambient lighting, a control system for the rhythm of music in vehicle ambient lighting, electronic devices, storage media, and vehicle platforms. Background Technology

[0002] Ambient lighting with music sync functionality has become a new highlight in modern passenger vehicles. With technological advancements, extended functions utilizing ambient lighting have emerged, making ambient lighting with music sync one of the most prominent applications. However, due to the extremely fast speed of audio signals and the increasingly high sampling rates of in-car audio systems, failure to accurately recognize audio beats can lead to issues such as mismatched effects, frequent flickering, or excessively slow color and brightness changes in the ambient lighting with music sync functionality.

[0003] Therefore, a strategy is needed to control the music rhythm of the ambient lighting in a car, so that the music rhythm effect is smooth and stable. Summary of the Invention

[0004] The purpose of this invention is to provide a method for controlling the music rhythm of in-vehicle ambient lighting, a control system for controlling the music rhythm of in-vehicle ambient lighting, an electronic device, a storage medium, and a vehicle platform, thereby solving at least one of a number of technical problems.

[0005] Given the increasingly higher sampling rates and faster audio signal transmission speeds of in-vehicle audio systems, existing technologies cannot accurately identify audio beats, which is a core issue.

[0006] This invention provides the following solution:

[0007] According to a first aspect of the present invention, a method for controlling the music beat of an in-vehicle ambient lighting system is provided, comprising:

[0008] Step 1: Audio data acquisition; Step 2: Time-domain to frequency-domain conversion; Step 3: Amplitude value recording; Step 4: Autocorrelation calculation; Step 5: Beat point determination; Step 6: Result output;

[0009] Step 4, autocorrelation calculation, includes obtaining the autocorrelation calculation formula;

[0010] The formula for calculating autocorrelation is R(τ) = E[X(t)*X(t+τ)];

[0011] Where E is the expectation operator, X(t) is the audio data at time t, and X(t+τ) is the audio data at time t+τ;

[0012] Step 5, beat point determination, includes setting a threshold r;

[0013] When the autocorrelation coefficient R(τ)≥r, the sampled frame includes the beat point; otherwise, it does not include the beat point.

[0014] Step 6, the result output includes sending the beat point determination result to the vehicle ambient lighting music rhythm control unit.

[0015] Furthermore, including:

[0016] Step 1, Audio Data Acquisition: Set up an array buf[] to store the digital signal values ​​after audio sampling;

[0017] Step 2, Time-domain to frequency-domain conversion: using the standard Fourier transform formula Convert the time-domain data in the array buf[] to frequency-domain data;

[0018] Step 3, Amplitude Value Recording: Extract the maximum amplitude value (amp) for each frequency band within the current period. max and minimum amplitude value amp min The data are stored in arrays corresponding to the frequency bands, and the frequency band arrays store the amplitude data for a preset duration.

[0019] It also includes step 4, autocorrelation calculation: based on the autocorrelation calculation formula, calculate the autocorrelation coefficient between the data of the current n audio sampling frames after Fourier transform and the audio data in the corresponding frequency band array;

[0020] It also includes step 5, beat point determination: set a threshold r, when the autocorrelation coefficient R(τ) obtained in step 4 is greater than or equal to r, the current sampled frame is considered to contain a beat point, otherwise it is considered not to contain a beat point;

[0021] It also includes step 6, the result output includes sending the determination result of whether the current sampling frame is a beat point to the vehicle ambient light music rhythm control unit, and the control unit decides whether to execute the ambient light rhythm.

[0022] Furthermore, the frequency band arrays of the frequency domain data include buf_25hz and buf_50hz, which are dedicated arrays for specific frequency bands.

[0023] Furthermore, this includes the maximum amplitude value amp for each frequency band in step 3. max and minimum amplitude value amp min The data is updated in real time according to the sampling time order to ensure that the array always retains the most recent 5 seconds of valid data.

[0024] Furthermore, it also includes the steps for calculating the correlation coefficient across the entire frequency band;

[0025] In this process, the overall correlation coefficient of all current frequency band audio data is calculated using the autocorrelation function, and then combined with the frequency band correlation coefficient from step 4 to participate in the beat point determination.

[0026] Furthermore, including:

[0027] Based on the parameters of the vehicle audio system's sampling rate dynamically adjusted, the value of the threshold r is simultaneously optimized when the sampling rate is increased to ensure the sensitivity of beat recognition.

[0028] According to a second aspect of the present invention, a music rhythm control system for in-vehicle ambient lighting is provided, comprising:

[0029] The audio data acquisition module is used to set the array buf[] to store the digital signal values ​​after audio sampling;

[0030] The time-domain to frequency-domain conversion module is used to apply the standard Fourier transform formula. Convert the time-domain data in the array buf[] to frequency-domain data;

[0031] The amplitude value recording module is used to extract the maximum amplitude value (amp) of each frequency band within the current cycle. max and minimum amplitude value amp min The data are stored in arrays corresponding to the frequency bands, and the frequency band arrays store the amplitude data for a preset duration.

[0032] The autocorrelation calculation module is used to calculate the autocorrelation coefficient between the data of the current n audio sampling frames after Fourier transform and the audio data in the corresponding frequency band array, based on the autocorrelation calculation formula.

[0033] The autocorrelation calculation formula is R(τ)=E[X(t)*X(t+τ)]; where E is the expectation operator, X(t) is the audio data at time t, and X(t+τ) is the audio data at time t+τ.

[0034] The beat point determination module is used to set a threshold r. When the autocorrelation coefficient R(τ) obtained in step 4 is greater than or equal to r, the current sampled frame is determined to include a beat point; otherwise, it is determined not to include a beat point.

[0035] The result output module is used to send the determination result of whether the current sampling frame is a beat point to the vehicle ambient light music rhythm control unit, and the control unit decides whether to execute the ambient light rhythm.

[0036] According to a third aspect of the present invention, an electronic device is provided, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0037] The memory stores a computer program, which, when executed by the processor, causes the processor to perform steps such as a music rhythm control method for ambient lighting in a car.

[0038] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform steps such as a music beat control method for ambient lighting in a vehicle.

[0039] According to a fifth aspect of the present invention, a vehicle platform is provided, comprising:

[0040] Electronic devices, steps for implementing music beat control methods such as those for ambient lighting in vehicles;

[0041] The processor runs programs, and when the programs are running, they execute steps such as music beat control methods for ambient lighting and music rhythm in vehicles, based on data output from electronic devices.

[0042] Storage medium used to store programs that, when running, execute steps such as music beat control methods for ambient lighting in vehicles based on data output from electronic devices.

[0043] The above solution achieves the following beneficial technical effects:

[0044] This application achieves a smooth and stable musical rhythm effect through a combination algorithm of frequency band amplitude recording, autocorrelation calculation and threshold determination, which completely improves the abnormal phenomena of traditional rhythm.

[0045] This application significantly improves the accuracy and reliability of beat recognition by combining audio shortwave analysis with full-band correlation coefficient calculation and accumulating at least 5 seconds of amplitude data.

[0046] This application adapts to high sampling rate car audio systems through algorithmic logic, enabling stable response to fast audio signals and ensuring real-time synchronization between rhythm and music beat. Attached Figure Description

[0047] Figure 1 This is a flowchart of a method for controlling the music rhythm of an in-vehicle ambient light, provided by one or more embodiments of the present invention.

[0048] Figure 2 This is a structural diagram of a music rhythm control system for vehicle ambient lighting provided in one or more embodiments of the present invention.

[0049] Figure 3 This is a schematic diagram of the logic framework for music beat detection provided in a specific embodiment of the present invention.

[0050] Figure 4 This is a block diagram of an electronic device for controlling the music rhythm of in-vehicle ambient lighting, provided by one or more embodiments of the present invention. Detailed Implementation

[0051] The technical solution of the present invention will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0052] Figure 1 This is a flowchart of a method for controlling the music rhythm of an in-vehicle ambient light, provided by one or more embodiments of the present invention.

[0053] like Figure 1 The method for controlling the music rhythm of the in-vehicle ambient lighting, as shown, includes:

[0054] Step 1: Audio data acquisition; Step 2: Time-domain to frequency-domain conversion; Step 3: Amplitude value recording; Step 4: Autocorrelation calculation; Step 5: Beat point determination; Step 6: Result output;

[0055] Step 4, autocorrelation calculation, includes obtaining the autocorrelation calculation formula;

[0056] The formula for calculating autocorrelation is R(τ) = E[X(t)*X(t+τ)];

[0057] Where E is the expectation operator, X(t) is the audio data at time t, and X(t+τ) is the audio data at time t+τ;

[0058] Step 5, beat point determination, includes setting a threshold r;

[0059] When the autocorrelation coefficient R(τ)≥r, the sampled frame includes the beat point; otherwise, it does not include the beat point.

[0060] Step 6, the result output includes sending the beat point determination result to the vehicle ambient lighting music rhythm control unit.

[0061] In this embodiment, it includes:

[0062] Step 1, Audio Data Acquisition: Set up an array buf[] to store the digital signal values ​​after audio sampling;

[0063] Step 2, Time-domain to frequency-domain conversion: using the standard Fourier transform formula Convert the time-domain data in the array buf[] to frequency-domain data;

[0064] Step 3, Amplitude Value Recording: Extract the maximum amplitude value (amp) for each frequency band within the current period. max and minimum amplitude value amp minThe data are stored in arrays corresponding to the frequency bands, and the frequency band arrays store the amplitude data for a preset duration.

[0065] It also includes step 4, autocorrelation calculation: based on the autocorrelation calculation formula, calculate the autocorrelation coefficient between the data of the current n audio sampling frames after Fourier transform and the audio data in the corresponding frequency band array;

[0066] It also includes step 5, beat point determination: set a threshold r, when the autocorrelation coefficient R(τ) obtained in step 4 is greater than or equal to r, the current sampled frame is considered to contain a beat point, otherwise it is considered not to contain a beat point;

[0067] It also includes step 6, the result output includes sending the determination result of whether the current sampling frame is a beat point to the vehicle ambient light music rhythm control unit, and the control unit decides whether to execute the ambient light rhythm.

[0068] In this embodiment, the frequency band arrays of the frequency domain data include buf_25hz and buf_50hz, which are dedicated arrays for specific frequency bands.

[0069] In this embodiment, it includes the maximum amplitude value amp for each frequency band in step 3. max and minimum amplitude value amp min The data is updated in real time according to the sampling time order to ensure that the array always retains the most recent 5 seconds of valid data.

[0070] In this embodiment, an audio shortwave analysis step is also included;

[0071] Among them, feature extraction of shortwave audio signals helps to optimize the accuracy of beat point determination.

[0072] In this embodiment, a full-band correlation coefficient calculation step is also included;

[0073] In this process, the overall correlation coefficient of all current frequency band audio data is calculated using the autocorrelation function, and then combined with the frequency band correlation coefficient from step 4 to participate in the beat point determination.

[0074] In this embodiment, it includes:

[0075] Based on the parameters of the vehicle audio system's sampling rate dynamically adjusted, the value of the threshold r is simultaneously optimized when the sampling rate is increased to ensure the sensitivity of beat recognition.

[0076] Figure 2 This is a structural diagram of a music rhythm control system for vehicle ambient lighting provided in one or more embodiments of the present invention.

[0077] like Figure 2 The music rhythm control system for the in-vehicle ambient lighting shown includes:

[0078] The audio data acquisition module is used to set the array buf[] to store the digital signal values ​​after audio sampling;

[0079] The time-domain to frequency-domain conversion module is used to apply the standard Fourier transform formula. Convert the time-domain data in the array buf[] to frequency-domain data;

[0080] The amplitude value recording module is used to extract the maximum amplitude value (amp) of each frequency band within the current cycle. max and minimum amplitude value amp min The data are stored in arrays corresponding to the frequency bands, and the frequency band arrays store the amplitude data for a preset duration.

[0081] The autocorrelation calculation module is used to calculate the autocorrelation coefficient between the data of the current n audio sampling frames after Fourier transform and the audio data in the corresponding frequency band array, based on the autocorrelation calculation formula.

[0082] The autocorrelation calculation formula is R(τ)=E[X(t)*X(t+τ)]; where E is the expectation operator, X(t) is the audio data at time t, and X(t+τ) is the audio data at time t+τ.

[0083] The beat point determination module is used to set a threshold r. When the autocorrelation coefficient R(τ) obtained in step 4 is greater than or equal to r, the current sampled frame is determined to include a beat point; otherwise, it is determined not to include a beat point.

[0084] The result output module is used to send the determination result of whether the current sampling frame is a beat point to the vehicle ambient light music rhythm control unit, and the control unit decides whether to execute the ambient light rhythm.

[0085] It is worth noting that although this system / device only discloses the above-mentioned modules / units, it does not mean that this system / device is limited to the above-mentioned basic functional modules. On the contrary, what this invention intends to express is that, based on the above-mentioned basic functional modules, those skilled in the art can add one or more functional modules in combination with the prior art to form an infinite number of embodiments or technical solutions. That is to say, this system is open rather than closed. It cannot be assumed that the scope of protection of the claims of this invention is limited to the above-disclosed basic functional modules just because this embodiment only discloses a few basic functional modules.

[0086] In one specific embodiment, an algorithm for calculating musical beats is disclosed, resulting in a smooth and stable musical rhythm effect:

[0087] like Figure 3 The logic for music beat detection and the algorithm for ambient light music rhythm effects shown include the following parts:

[0088] 1) Audio data acquisition;

[0089] An array buf[] is set up to store the digital signal values ​​after audio sampling.

[0090] 2) Conversion of audio data from the time domain to the frequency domain - Fourier transform;

[0091] Using the standard Fourier formula This converts time-domain data into frequency-domain data.

[0092] Extract the maximum amplitude value (amp) of each frequency band within the current period. max ) and minimum value (amp) min These data are recorded in arrays of different frequency bands (each array must contain at least 5 seconds of data), such as: buf_25hz, buf_50hz, etc.

[0093] 3) Calculate the autocorrelation between the Fourier transform data of the current n audio sampling frames in each frequency band and the audio data values ​​of each frequency band, as shown in the formula below:

[0094] R(τ) = E[X(t)*X(t+τ)]

[0095] 4) Set a threshold r. When R(τ)>=r, the current sampled frame is considered to contain a beat point; otherwise, the current sampled frame does not contain a beat point.

[0096] 5) Output the result of whether the current sampling point is a beat point to the music rhythm control unit, which will then decide whether to perform rhythm.

[0097] Figure 4 This is a block diagram of an electronic device for controlling the music rhythm of in-vehicle ambient lighting, provided by one or more embodiments of the present invention.

[0098] like Figure 4 As shown, this application provides an electronic device, including: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0099] The memory stores a computer program, which, when executed by the processor, causes the processor to perform steps of a method for controlling the rhythm of music in an in-vehicle ambient lighting system.

[0100] This application also provides a computer-readable storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of a music beat control method for ambient lighting music in a vehicle.

[0101] This application also provides a vehicle platform, including:

[0102] Electronic devices, steps for implementing a music rhythm control method for ambient lighting in vehicles;

[0103] The processor runs a program, and when the program runs, it executes the steps of the music rhythm control method for the vehicle ambient lighting music based on the data output from the electronic device.

[0104] A storage medium for storing a program that, when running, executes the steps of a method to control the music rhythm of in-vehicle ambient lighting based on data output from an electronic device.

[0105] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not indicate that there is only one bus or one type of bus.

[0106] The electronic device comprises a hardware layer, an operating system layer running on top of the hardware layer, and an application layer running on the operating system. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and memory. The operating system can be any one or more computer operating systems that control the electronic device through processes, such as Linux, Unix, Android, iOS, or Windows. Furthermore, in this embodiment of the invention, the electronic device can be a smartphone, tablet computer, or other handheld device, or a desktop computer, portable computer, or other electronic device; there is no particular limitation in this embodiment.

[0107] In this embodiment of the invention, the executing entity for electronic device control can be an electronic device itself, or a functional module within an electronic device capable of calling and executing a program. The electronic device can obtain the firmware corresponding to the storage medium. This firmware is provided by the supplier, and different storage media may have the same or different firmware; no limitation is made here. After obtaining the firmware corresponding to the storage medium, the electronic device can write this firmware into the storage medium; specifically, it burns the firmware corresponding to the storage medium into the storage medium. The process of burning the firmware into the storage medium can be implemented using existing technology, and will not be elaborated upon in this embodiment of the invention.

[0108] Electronic devices can also obtain reset commands corresponding to storage media. These reset commands are provided by the supplier, and the reset commands for different storage media can be the same or different, which is not limited here.

[0109] At this time, the storage medium of the electronic device is a storage medium on which the corresponding firmware has been written. The electronic device can respond to the reset command corresponding to the storage medium on which the corresponding firmware has been written, thereby resetting the storage medium on which the corresponding firmware has been written according to the reset command. The process of resetting the storage medium according to the reset command can be implemented by existing technology and will not be described in detail in this embodiment of the invention.

[0110] For ease of description, the above devices are described separately by function as various units and modules. Of course, in implementing this application, the functions of each unit and module can be implemented in one or more software and / or hardware.

[0111] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined.

[0112] For the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0113] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.

[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for controlling the musical rhythm of ambient lighting in a vehicle, characterized in that, include: Step 1, Audio data acquisition; Step 2, time-domain to frequency-domain conversion; Step 3: Record amplitude value; Step 4: Calculate autocorrelation; Step 5: Determine beat point; Step 6: Output result; Step 4, autocorrelation calculation, includes obtaining the autocorrelation calculation formula; The formula for calculating autocorrelation is R(τ) = E[X(t)*X(t+τ)]; Where E is the expectation operator, X(t) is the audio data at time t, and X(t+τ) is the audio data at time t+τ; Step 5, beat point determination, includes setting a threshold r; When the autocorrelation coefficient R(τ)≥r, the sampled frame includes the beat point; otherwise, it does not include the beat point. Step 6, the result output includes sending the beat point determination result to the vehicle ambient lighting music rhythm control unit.

2. The method for controlling the musical rhythm of in-vehicle ambient lighting according to claim 1, characterized in that, include: Step 1, Audio Data Acquisition: Set up an array buf[] to store the digital signal values ​​after audio sampling; Step 2, Time-domain to frequency-domain conversion: using the standard Fourier transform formula Convert the time-domain data in the array buf[] to frequency-domain data; Step 3, Amplitude Value Recording: Extract the maximum amplitude value (amp) for each frequency band within the current period. max and minimum amplitude value amp min The data are stored in arrays corresponding to the frequency bands, and the frequency band arrays store amplitude data for a preset duration. It also includes step 4, autocorrelation calculation: based on the autocorrelation calculation formula, calculate the autocorrelation coefficient between the data of the current n audio sampling frames after Fourier transform and the audio data in the corresponding frequency band array; return Including step 5, beat point determination: set a threshold r, when the autocorrelation coefficient R(τ) obtained in step 4 is greater than or equal to r, the current sampled frame is considered to contain a beat point, otherwise it is considered not to contain a beat point; It also includes step 6, the result output includes sending the determination result of whether the current sampling frame is a beat point to the vehicle ambient light music rhythm control unit, and the control unit decides whether to execute the ambient light rhythm.

3. The method for controlling the musical rhythm of in-vehicle ambient lighting according to claim 1, characterized in that, The frequency band arrays of the frequency domain data include buf_25hz and buf_50hz, which are dedicated arrays for specific preset frequency bands.

4. The method for controlling the musical rhythm of in-vehicle ambient lighting according to claim 1, characterized in that, This includes the maximum amplitude values ​​(amp) for each frequency band in step 3. max and minimum amplitude value amp min The data is updated and stored in real time according to the sampling time sequence to ensure that the array always retains the valid data of the most recent preset time period.

5. The method for controlling the musical rhythm of in-vehicle ambient lighting according to claim 1, characterized in that, It also includes the steps for calculating the correlation coefficient across the entire frequency band; In this process, the overall correlation coefficient of all current frequency band audio data is calculated using the autocorrelation function, and then combined with the frequency band correlation coefficient from step 4 to participate in the beat point determination.

6. The method for controlling the musical rhythm of in-vehicle ambient lighting according to any one of claims 1 to 6, characterized in that, include: Based on the parameters of the vehicle audio system's sampling rate dynamically adjusted, the value of the threshold r is simultaneously optimized when the sampling rate is increased to ensure the sensitivity of beat recognition.

7. A music rhythm control system for in-vehicle ambient lighting, characterized in that, include: The audio data acquisition module is used to set the array buf[] to store the digital signal values ​​after audio sampling; The time-domain to frequency-domain conversion module is used to apply the standard Fourier transform formula. Convert the time-domain data in the array buf[] to frequency-domain data; The amplitude value recording module is used to extract the maximum amplitude value (amp) of each frequency band within the current cycle. max and minimum amplitude value amp min The data are stored in arrays corresponding to the frequency bands, and the frequency band arrays store amplitude data for a preset duration. The autocorrelation calculation module is used to calculate the autocorrelation coefficient between the data of the current n audio sampling frames after Fourier transform and the audio data in the corresponding frequency band array, based on the autocorrelation calculation formula. The autocorrelation calculation formula is R(τ)=E[X(t)*X(t+τ)]; where E is the expectation operator, X(t) is the audio data at time t, and X(t+τ) is the audio data at time t+τ. The beat point determination module is used to set a threshold r. When the autocorrelation coefficient R(τ) obtained in step 4 is greater than or equal to r, the current sampled frame is determined to include a beat point; otherwise, it is determined not to include a beat point. The result output module is used to send the determination result of whether the current sampling frame is a beat point to the vehicle ambient light music rhythm control unit, and the control unit decides whether to execute the ambient light rhythm.

8. An electronic device, characterized in that, include: The processor, communication interface, memory, and communication bus are connected, with the processor, communication interface, and memory communicating with each other via the communication bus. The memory stores a computer program that, when executed by a processor, causes the processor to perform the steps of the music beat control method for the ambient lighting music rhythm as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The device stores a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform the steps of the music beat control method for the ambient lighting music rhythm as described in any one of claims 1 to 6.

10. A vehicle platform, characterized in that, include: An electronic device for implementing the steps of the music beat control method for vehicle ambient lighting music rhythm as described in any one of claims 1 to 6; The processor runs a program that, when the program is running, executes the steps of the music beat control method for vehicle ambient lighting music rhythm as described in any one of claims 1 to 6, based on data output from the electronic device. A storage medium for storing a program that, when running, performs the steps of the music beat control method for in-vehicle ambient lighting music rhythm as described in any one of claims 1 to 6 on data output from an electronic device.