Single-chip double-atmosphere lamp music rhythm control method and system and electronic equipment
By using a single-chip driven LED control method and leveraging Mel spectrograms and interpolation lookup table technology, the problems of signal delay and high hardware cost in existing technologies are solved, enabling efficient and diverse ambient lighting effect control and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TINYCHIP MICROELECTRONICS (SHANGHAI) CO LTD
- Filing Date
- 2026-04-02
- Publication Date
- 2026-05-01
AI Technical Summary
Existing methods for controlling automotive ambient lighting suffer from high signal delays and hardware costs, limited lighting effect modes, and an inability to effectively synchronize music rhythms with lighting changes.
A single chip drives two LEDs in each lamp head. The vehicle control module performs Mel-frequency spectrum calculations, and the signal is encapsulated using a CAN-to-LIN gateway module. The lamp head chip performs interpolation and lookup table processing to achieve color and brightness control of the LEDs, eliminating the need for traditional hardware and reducing calculation time and latency.
It reduces hardware costs, shortens computation time, improves the flexibility and synchronization of lighting effect calculation, enables diverse lighting effect modes, and enhances the user experience.
Smart Images

Figure CN121968418A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ambient lighting control, specifically to a single-chip dual ambient lighting music rhythm control method, system, and device. Background Technology
[0002] As an "emotional interaction gateway," car ambient lighting with musical rhythms has development potential. With technological iteration and the upgrading of consumer demand, this niche market is expected to evolve from a "niche technology" to a standard feature of smart cockpits. Through the combination of musical rhythms and lighting, the interior space can be switched to multiple modes such as "work, entertainment, and rest," becoming an extension and outward manifestation of the user's emotions.
[0003] In the field of automotive ambient lighting control, the single-chip dual ambient lighting control method refers to using a single chip to drive two LEDs in each lamp head, while the LEDs can automatically distinguish control signals through NAD (slave node address) addressing. Regarding the correspondence between music rhythm and lighting changes, a typical solution in the prior art is to use the vehicle body controller to perform music frequency analysis, and a music rhythm box to perform lighting effect synthesis and CAN-to-LIN communication routing and forwarding. For example, Chinese patent CN119796053A (application number: 202510017984.2, invention title: control method, device, vehicle and computer-readable storage medium for ambient lighting, publication date: April 11, 2025) proposes to perform music frequency analysis in the cockpit domain controller (equivalent to the vehicle body controller) to transmit the data to the vehicle body domain controller, and then use the music rhythm algorithm in the vehicle body domain controller (equivalent to the music rhythm box) to calculate the color and brightness information of the LEDs to control the ambient lighting. The shortcomings of the above solution are: because the cockpit domain controller and the vehicle body domain controller perform signal processing centrally, it will lead to signal delay, and the hardware cost is relatively high, and the ambient lighting mode is also relatively simple. Therefore, improvements to the existing technology are still needed. Summary of the Invention
[0004] To overcome the shortcomings of existing technologies, this invention proposes a single-chip dual ambient light music rhythm control method, system, and electronic device.
[0005] One method for controlling the music rhythm of a single-chip dual ambient light, wherein each light head has two ambient light beads and is driven by a single light head chip, the method comprising:
[0006] S1. The vehicle control module collects the music signal being played, calculates the energy information of multiple frequency bands through the Mel spectrogram of each frame of the signal, and selects the lighting effect mode through the vehicle control module;
[0007] S2. The energy information and lighting effect mode instructions are encapsulated into LIN signals through the CAN-to-LIN gateway module and sent to each lamp head chip;
[0008] S3. The lamp head chip has a pre-stored correspondence between frequency bands and colors. After receiving the LIN signal, the lamp head chip combines the slave node address of the lamp head with interpolation and table lookup to obtain the color and brightness information of each LED bead, thereby driving the ambient light to work.
[0009] Furthermore, in step S1, the vehicle control module performs a fast Fourier transform on each frame of signal to obtain a complex spectrum, converts the complex spectrum into a power spectrum, and then maps the power spectrum to a Mel scale through a Mel filter to generate a Mel spectrum map, thereby obtaining energy information for multiple frequency bands.
[0010] Furthermore, in step S3, after receiving the LIN signal, the lamp head chip performs interpolation processing on the energy information to generate a table of color and brightness information for multiple frequency points, and obtains the target color and brightness of the lamp beads by looking up the table according to the lighting effect mode and the slave node address of the lamp head.
[0011] Furthermore, the lighting effect modes include a breathing mode, a multi-segment pulse flow mode, and a multi-segment scanning dynamic flow mode.
[0012] Furthermore, when the breathing mode is selected as linear breathing, sinusoidal breathing, exponential breathing, or logarithmic breathing, the color and brightness of the ambient light beads change from the current color and brightness to the target color and brightness according to the linear, sinusoidal, exponential, and logarithmic rules.
[0013] Furthermore, in the multi-segment pulse flow mode, multiple LEDs under multiple continuously distributed lamp heads realize the energy information of the same frequency band. Among them, the first LED among the multiple LEDs determines the starting color and brightness information by looking up a table, while the remaining LEDs among the multiple LEDs determine the color and brightness information by attenuation coefficient.
[0014] Furthermore, the multi-segment scanning dynamic pipeline mode adds time dimension control to the multi-segment pulse pipeline mode, and achieves specific animation effects by triggering multiple multi-segment pulse pipeline modes at different times.
[0015] Furthermore, in step S1, if the sum of the spectral energy changes within a set time period is greater than a set threshold, the music being played is determined to be a fast-paced segment, and the system automatically switches to the 16-band energy information extraction mode; conversely, if the sum is less than or equal to the set threshold, the music being played is determined to be a slow-paced segment, and the system automatically switches to the 8-band energy information extraction mode.
[0016] This invention also proposes a single-chip dual ambient light music rhythm control system, wherein each lamp head has two ambient light beads and is driven by a single lamp head chip. The control system includes a vehicle control module, a CAN-to-LIN gateway module, and a lamp head chip, wherein:
[0017] The vehicle control module is used to collect the music signal being played, calculate the energy information of multiple frequency bands through the Mel spectrogram of each frame of the signal, and select the lighting effect mode.
[0018] The CAN-to-LIN gateway module is used to encapsulate the energy information and lighting effect mode instructions into LIN signals and send them to each lamp head chip.
[0019] The lamp head chip is used to pre-store the correspondence between frequency bands and colors. After receiving the LIN signal, it combines the slave node address of the lamp head with interpolation and table lookup to obtain the color and brightness information of each LED, thereby driving the ambient light to work.
[0020] The present invention also includes an electronic device comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, wherein the executable instruction causes the processor to execute the aforementioned single-chip dual ambient light music rhythm control method.
[0021] Compared with the prior art, the present invention has at least the following technical effects:
[0022] 1. Eliminates traditional hardware such as vehicle body domain controller and music rhythm box, saving hardware costs. Lighting effect calculation is decentralized to each discrete ambient light node, and interpolation calculation is performed by hardware acceleration unit to reduce calculation time and communication latency.
[0023] 2. Based on human ear perception, energy information from 8 or 16 frequency bands can be directly extracted for subsequent calculations, reducing the computational load. Furthermore, the 8 and 16 frequency bands can be automatically switched according to the music, balancing computational load and perceptual effect.
[0024] 3. The lighting effect calculation modes are diverse, and users can switch between breathing mode, multi-segment pulse flow mode, and multi-segment scanning dynamic flow mode. The lighting effect modes can be switched according to the usage scenario, user preferences, music rhythm, etc. to enhance the user experience. Attached Figure Description
[0025] Figure 1 This is a flowchart of the single-chip dual ambient light music rhythm control method in this invention;
[0026] Figure 2 This is the 8-band Mel-frequency spectrum extracted from the music signal in this invention;
[0027] Figure 3 This refers to the energy information of 8 frequency bands of one frame of music signal in this invention;
[0028] Figure 4This is a data flow diagram of the single-chip dual ambient light music rhythm control method in this invention;
[0029] Figure 5 This is a schematic diagram of the single-chip dual ambient light music rhythm control system of the present invention;
[0030] Figure 6 This is a schematic diagram of the electronic device in this invention. Detailed Implementation
[0031] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0032] Example 1, combined with Figure 1 The flowchart shown is for a single-chip dual-ambient light music rhythm control method, and... Figure 4 The data flow diagram of the single-chip dual ambient light music rhythm control method shown is used to explain the control method in this embodiment. Mel spectrograms are a method of representing audio signals by mapping them from the frequency domain to the human auditory perception domain, aiming to simulate the non-linear perception characteristics of the human ear. The human ear can clearly distinguish subtle differences in low-frequency sounds; for example, the difference between 200Hz and 300Hz is easily perceptible. However, the ability to distinguish high-frequency sounds decreases significantly. To quantify this perceptual characteristic, Mel spectrograms are introduced. Figure 2 The image shown is an 8-band Mel spectrogram extracted from the music signal in this invention. The implementation process of the Mel spectrogram is as follows:
[0033] Step 1: When the car's infotainment system plays music, the system's control module collects the music signal. The sampling rate is 44100Hz, and the communication time frame interval is usually 20ms. For example, real-time music analysis is framed according to a 20ms window to divide the continuous audio signal into short, stationary segments for spectrum analysis. The frames overlap by 50%, or 10ms frame shift, to ensure continuity.
[0034] Frame shift (seconds) × Sampling rate = Number of frame shift samples
[0035] 44kHz × 0.01s = 440 sample points
[0036] Step 2, Short-Time Fourier Transform (STFT):
[0037] Calculate the spectral energy of the framed and windowed signal:
[0038]
[0039] Where X[k,t] is the complex spectrum of the t-th frame at frequency k, w[n] is the window function, L is the frame shift length, and N is the number of FFT points;
[0040] Step 3: Generate energy map and perform power spectrum conversion.
[0041]
[0042] The complex spectrum is converted into real energy through transformation.
[0043] Step 4: Apply a Mel filter bank to generate a Mel spectrum: Design 8 or 16 triangular filters mapped to the Mel scale to generate a logarithmic Mel spectrum, simulating the nonlinear perception of loudness by the human ear and enhancing dynamic range contrast. This is achieved by using a set of triangular Mel filters. (k) For linear power spectrum The Mel spectrum is obtained by performing a weighted summation.
[0044] For example, linear frequencies are mapped to the Mel scale using a triangular filter bank:
[0045]
[0046] in, (k) are the weights of the Mel filter bank. To prevent the value from reaching zero at its minimum.
[0047] Where M[i,t] is the energy of the i-th Mel band in the t-th frame, and M is the total number of Mel bands.
[0048] In this embodiment, M is either 8 or 16, thereby obtaining the energy information of the 8th or 16th frequency band, which is then used as the subsequent control signal. Figure 3 The energy information diagram of 8 frequency bands of different frames of music signals is displayed. Figure 3 The bar chart in the image shows the energy information distribution of a specific frame of the signal. The horizontal axis represents frequency, and the vertical axis represents the relative unit. The maximum peak energy of the music is defined as full scale, and the vertical axis represents the relative value of other real-time energy values relative to the peak energy. When playing music, the vehicle control module outputs 8 or 16 frequency band energy information every 20ms, which is continuously transmitted through the CAN-to-LIN gateway module.
[0049] Taking the energy information of 8 frequency bands as an example, after obtaining the above energy information, combined with the lighting effect mode selected by the vehicle control module, the above energy information and lighting effect mode are encapsulated into LIN signals through the CAN to LIN gateway module and sent to each lamp head chip.
[0050] In this embodiment, the single-chip dual-ambient light specifically refers to each lamp head chip alternately controlling two LEDs through time-division multiplexing. In one optional implementation, the two LEDs are positioned at opposite ends of the same light guide strip, guiding light towards the center; in another optional implementation, they are positioned in the middle of the same light guide strip, guiding light towards both ends. Multiple lamp heads can be configured according to actual needs. For example, when 15 lamp heads are connected, each lamp head expands to contain two LEDs, thus enabling control of 30 LEDs. Each lamp head has a unique slave node address (NAD address), which is the address used to uniquely identify a slave node in the LIN bus. Therefore, this embodiment only needs a CAN to LIN gateway module to realize the conversion of CAN signals transmitted from the vehicle control module to LIN signals, and send the LIN signals to the distributed lamp head chips for lighting effect calculation. Compared with the existing technology that centrally analyzes music signals in hardware such as music rhythm boxes and body domain controllers, the calculation time required by this embodiment is greatly reduced and the communication delay is shortened, so that the rhythm of the music signal and the lighting effect can maintain higher synchronization and smoothness.
[0051] In an optional embodiment, the lamp head chip pre-stores the correspondence between frequency bands and the colors presented by the LEDs. For example, low frequencies correspond to warm colors, such as red and orange, while high frequencies correspond to cool colors, such as blue and purple. Thus, each frequency band corresponds to the transition from warm to cool colors from low to high, and the energy information represents the brightness information of that color. After receiving the LIN signal, the lamp head chip, combined with the pre-stored correspondence, automatically performs interpolation processing and fits the data to achieve a frequency range of 0 to 120 points. The interpolation calculation is implemented by a built-in hardware acceleration circuit. The fitting result of the global color and brightness information is obtained through interpolation, which is the lookup source for the color and brightness changes of the LEDs in subsequent processing. The specific color and brightness information corresponding to each LED is selected globally through the NAD address. For example, in a 30-LED system, the NAD address determines the location of a lamp head, such as whether it is at the "start end of light guide A", the "end end of light guide B", or the "cabin center control area", etc. After each light head obtains the same 8 / 16 frequency band data, it combines the light head's NAD address, preset lighting effect mode, and light guide strip length to obtain lighting information by looking up a table, thereby driving the ambient light to work, that is, which part of the global lighting effect should be displayed at the moment.
[0052] The initial brightness and color can be configured by the user via registers based on the characteristics of the LED beads. After configuration, color switching can be achieved through table interpolation or by calculating the intermediate color value using a cubic equation fitting formula. Color is represented by (x, y) color coordinates. Each LED bead controls the change from the current color and brightness to the target color and brightness according to the lighting effect mode. For example, lighting effect modes include breathing mode, multi-segment pulse flowing mode, and multi-segment scanning dynamic flowing mode.
[0053] Breathing modes include linear breathing, sinusoidal breathing, exponential breathing, and logarithmic breathing. When linear breathing, sinusoidal breathing, exponential breathing, or logarithmic breathing is selected, the color and brightness of the ambient light beads change from the current color and brightness to the target color and brightness according to the linear, sinusoidal, exponential, and logarithmic rules. The target color and brightness can be obtained through interpolation and lookup table processing, thereby driving the light to achieve a smooth transition of color and brightness according to the rhythm of the music.
[0054] In the multi-segment pulse flow mode, multiple LEDs under multiple continuously distributed lamp heads achieve energy information in the same frequency band. The first LED in the multi-segment lamps determines its initial color and brightness information by looking up a table, while the remaining LEDs determine their color and brightness information through attenuation coefficients. Attenuation can be performed according to linear, exponential, or other rules. The multi-segment pulse flow mode offers multiple advantages, including improved visual recognition, enhanced driving safety, and optimized design aesthetics.
[0055] Multi-segment scanning dynamic pipeline mode adds multi-dimensional time control to the multi-segment pulse pipeline mode, combining multi-segment pulse pipeline and programmable scan paths. Multi-segment scanning dynamic pipeline mode is a technology that achieves full-coverage scanning of a target area / object by dynamically adjusting the pulse energy transfer path in spatial or temporal dimensions. Its essence is a combination of "multi-segment pulse pipeline" + "programmable scan path," with core features being the dynamic reconfigurability of the path and the continuity of the scanning process. For example, multi-segment pulse pipeline mode processes data in a single line, while multi-segment scanning dynamic pipeline mode processes multiple lines simultaneously, enabling the simultaneous display of information from more frequency points, where the information for each frequency point can be obtained through a lookup table. Multi-segment scanning dynamic pipeline mode achieves specific animation effects by triggering multiple multi-segment pulse pipeline modes at different times. It can be understood that multi-segment pulse pipeline mode is an effect executed sequentially on a timeline, while multi-segment scanning dynamic pipeline mode adds time dimension control, simultaneously controlling multiple timelines, each of which still executes its own effect sequentially. It can be said that multi-segment pulse flow mode is the main means of achieving line light source effect, while multi-segment scanning dynamic flow mode is the main means of achieving area light source effect. The display pattern effect can be achieved by defining the scanning path.
[0056] To balance computational efficiency and perceptual detail, energy information from 8 frequency bands is extracted from each frame of the signal during quiet sections of the music, while energy information from 16 frequency bands is extracted from each frame during complex sections. The system automatically switches between 8-band and 16-band energy extraction. The switching criteria are as follows: if the sum of the spectral energy changes within a set time period exceeds a set threshold, the music is considered a fast-paced section, and the system automatically switches to the 16-band energy extraction mode to capture higher-resolution rhythmic information; conversely, if the sum is less than or equal to the set threshold, the music is considered a slow-paced section, and the system automatically switches to the 8-band energy extraction mode to conserve the processing resources of the ambient light head chip.
[0057] Example 2: A single-chip dual ambient light music rhythm control system, wherein each lamp head has two ambient light beads and is driven by a single lamp head chip, such as... Figure 5 As shown, the control system includes a vehicle infotainment control module 101, a gateway module 102, and a lamp head chip 103, wherein:
[0058] The vehicle control module 101 is used to collect the music signal being played, calculate the energy information of multiple frequency bands through the Mel spectrogram of each frame of the signal, and perform the selection of lighting effect modes.
[0059] The CAN-to-LIN gateway module 102 is used to encapsulate the energy information and lighting effect mode instructions into LIN signals and send them to each lamp head chip.
[0060] The lamp head chip 103 is used to pre-store the correspondence between frequency bands and colors. After receiving the LIN signal, it combines the slave node address of the lamp head with interpolation and table lookup to obtain the color and brightness information of each lamp bead, thereby driving the ambient light to work, that is, controlling the color and brightness of the ambient light lamp beads to change in the manner described in Example 1.
[0061] It should be noted that each lamp head contains a lamp head chip 103. Each lamp head chip 103 receives the same LIN information sent from the gateway module 102 and performs the same interpolation process to generate color and brightness information of the multi-frequency lamp beads. Since each lamp head has a different NAD address, the control signal selected by the lamp bead is automatically distinguished through NAD addressing.
[0062] Example 3, Figure 6 An electronic device is shown, including: a processor 112, a memory 116, a communication interface 114, and a communication bus 118.
[0063] The processor 112, the memory 116, and the communication interface 114 communicate with each other via the communication bus 118. The communication interface 114 is used to communicate with other devices, such as clients. The processor 112 is used to execute the relevant steps in the aforementioned single-chip dual ambient light control method embodiment stored in program 120.
[0064] The memory 116 is used to store the executable instructions in the program 120. The memory 116 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk memory.
[0065] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A single-chip dual-ambient light music rhythm control method, characterized in that, Each lamp holder contains two ambient light LEDs and is driven by a single lamp holder chip. The method includes: S1. The vehicle control module collects the music signal being played, calculates the energy information of multiple frequency bands through the Mel spectrogram of each frame of the signal, and selects the lighting effect mode through the vehicle control module; S2. The energy information and lighting effect mode instructions are encapsulated into LIN signals through the CAN-to-LIN gateway module and sent to each lamp head chip; S3. The lamp head chip has a pre-stored correspondence between frequency bands and colors. After receiving the LIN signal, the lamp head chip combines the slave node address of the lamp head with interpolation and table lookup to obtain the color and brightness information of each LED, thereby driving the ambient light to work.
2. The single-chip dual ambient light music rhythm control method as described in claim 1, characterized in that, In step S1, the vehicle control module performs a fast Fourier transform on each frame of signal to obtain a complex spectrum, converts the complex spectrum into a power spectrum, and then maps the power spectrum to a Mel scale through a Mel filter to generate a Mel spectrum map, thereby obtaining energy information for multiple frequency bands.
3. The single-chip dual ambient light music rhythm control method as described in claim 1, characterized in that, In step S3, after receiving the LIN signal, the lamp head chip interpolates the energy information to generate a table of color and brightness information for multiple frequency points. Based on the lighting effect mode and the slave node address of the lamp head, the target color and brightness of the lamp beads are obtained by looking up the table.
4. The single-chip dual ambient light music rhythm control method as described in claim 3, characterized in that, The lighting effect modes include breathing mode, multi-segment pulse flow mode, and multi-segment scanning dynamic flow mode.
5. The single-chip dual ambient light music rhythm control method as described in claim 4, characterized in that, When the breathing mode is selected as linear breathing, sinusoidal breathing, exponential breathing, or logarithmic breathing, the color and brightness of the ambient light beads change from the current color and brightness to the target color and brightness according to the linear, sinusoidal, exponential, or logarithmic rules.
6. The single-chip dual ambient light music rhythm control method as described in claim 4, characterized in that, In the multi-segment pulse flow mode, multiple LEDs under multiple continuously distributed lamp heads realize the energy information of the same frequency band. The first LED among the multiple LEDs determines the starting color and brightness information by looking up a table, while the remaining LEDs among the multiple LEDs determine the color and brightness information by attenuation coefficient.
7. The single-chip dual ambient light music rhythm control method as described in claim 6, characterized in that, The multi-segment scanning dynamic flow mode adds time dimension control to the multi-segment pulse flow mode. By triggering multiple multi-segment pulse flow modes at different times, specific animation effects can be achieved.
8. The single-chip dual ambient light music rhythm control method as described in claim 1, characterized in that, In step S1, if the sum of the spectrum energy changes within a set time period is greater than a set threshold, the music being played is determined to be a fast-paced segment, and the system automatically switches to the 16-band energy information extraction mode; conversely, if the sum is less than or equal to the set threshold, the music being played is determined to be a slow-paced segment, and the system automatically switches to the 8-band energy information extraction mode.
9. A single-chip dual-ambient light music rhythm control system, wherein each lamp head has two ambient light beads and is driven by a single lamp head chip, characterized in that, The control system includes a vehicle infotainment control module, a CAN-to-LIN gateway module, and a lamp head chip, wherein: The vehicle control module is used to collect the music signal being played, calculate the energy information of multiple frequency bands through the Mel spectrogram of each frame of the signal, and select the lighting effect mode. The CAN-to-LIN gateway module is used to encapsulate the energy information and lighting effect mode instructions into LIN signals and send them to each lamp head chip. The lamp head chip is used to pre-store the correspondence between frequency bands and colors. After receiving the LIN signal, it combines the slave node address of the lamp head with interpolation and table lookup to obtain the color and brightness information of each LED, thereby driving the ambient light to work.
10. An electronic device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to execute the single-chip dual ambient light music rhythm control method as described in any one of claims 1-8.
Citation Information
Patent Citations
Atmosphere lamp control method and device, vehicle and computer readable storage medium
CN119796053A
Light control method, device and system and readable storage medium
CN115366790A
Music rhythm atmosphere lamp and vehicle
CN115742949A
Adjusting method, light adjusting device, electronic equipment and storage medium
CN116978401A
Light control method and device, electronic equipment and storage medium
CN118102544A