Light control method and device of vehicle, electronic equipment and storage medium

CN116101194BActive Publication Date: 2025-11-07GREAT WALL MOTOR CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211098735.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-08
Publication Date
2025-11-07
Estimated Expiration
2042-09-08

AI Technical Summary

Technical Problem

Existing vehicle lighting control systems lack diversity in light color display and cannot dynamically adjust based on real-time audio data and vehicle speed, thus affecting visual effects.

Method used

By acquiring audio data, switch signals, and vehicle speed data, frequency amplitude sampling and preset threshold comparison are performed to determine the lighting control data, thereby enabling dynamic adjustment of the light color and brightness.

Benefits of technology

It expands the sources of lighting control data, realizes the synchronization of audio and color data, improves the matching effect between music effects and lighting display, and reduces the impact on safe driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116101194B_ABST
    Figure CN116101194B_ABST
Patent Text Reader

Abstract

The application provides a light control method and device of a vehicle, an electronic device and a storage medium. The color data of the light is determined according to audio data, the source of the color data is extended, and the diversification of the source of the light control data is realized. The audio data is sampled, and is compared with a preset threshold value, so that the audio data and the color data are synchronized, and the matching effect of the music effect corresponding to the audio data and the display effect corresponding to the light control data is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of signal control, in particular to a light control method and device of a vehicle, an electronic device and a storage medium. BACKGROUND

[0002] The light of a vehicle can be an important means to improve the visual effect of the vehicle. With the development of light control technology, a single-chip microcomputer can be used to adjust the color and brightness of the light.

[0003] Generally, the light of a vehicle can achieve static multi-color display and dynamic multi-color display. However, in the process of dynamic multi-color display of the light, the color switching frequency is monotonous, and the dynamic multi-color display of the light can only be performed according to a pre-set switching scheme. Therefore, a method for providing diversified light color display is needed to improve the visual effect of the vehicle. SUMMARY

[0004] Therefore, the purpose of the present application is to provide a light control method and device of a vehicle, an electronic device and a storage medium to solve or partially solve the above technical problems.

[0005] To achieve the above purpose, the first aspect of the present application provides a light control method of a vehicle, characterized in that the method comprises:

[0006] acquiring audio data, a switching signal and speed data of the vehicle;

[0007] sampling the audio data in frequency amplitude to obtain a sampling result;

[0008] comparing the sampling result with a preset threshold to obtain a comparison result;

[0009] determining color data corresponding to the comparison result, and determining light control data based on the color data;

[0010] determining whether to send the light control data according to the switching signal and the speed data.

[0011] The second aspect of the present application provides a light control device of a vehicle, characterized in that the device comprises:

[0012] an acquisition module configured to acquire audio data, a switching signal and speed data of the vehicle;

[0013] a sampling module configured to sample the audio data in frequency amplitude to obtain a sampling result;

[0014] a comparison module configured to compare the sampling result with a preset threshold to obtain a comparison result;

[0015] The determining module is configured to determine color data corresponding to the comparison result, and determine light control data based on the color data.

[0016] The sending module is configured to determine whether to send the light control data according to the switch signal and the speed data.

[0017] A third aspect of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of the preceding aspects when executing the program.

[0018] A fourth aspect of the present application provides a non-transitory computer readable storage medium, which stores computer instructions for causing a computer to execute the method according to any one of the preceding aspects.

[0019] As can be seen from the above, the vehicle light control method, device, electronic device and storage medium provided by the present application expand the source of color data by determining the color data of the light according to the audio data, and realize the diversification of the source of light control data. By sampling the audio data and comparing it with the preset threshold, the synchronization of the audio data and the color data is realized, and the matching effect of the music effect corresponding to the audio data and the display effect corresponding to the light control data is improved. BRIEF DESCRIPTION OF DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the present application or related art, the following will briefly introduce the drawings needed to be used in the embodiments or related art descriptions. Obviously, the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0021] Figure 1a It is a structural schematic diagram of the light control system in the related art;

[0022] Figure 1b It is a signal flow diagram of the light control system in the related art;

[0023] Figure 2 It is a step schematic diagram of the vehicle light control method of the embodiment of the present application;

[0024] Figure 3 It is a structural schematic diagram of the vehicle light control device of the embodiment of the present application;

[0025] Figure 4 It is a structural schematic diagram of the vehicle light control system of the embodiment of the present application;

[0026] Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0028] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this application should have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms "first," "second," and similar terms used in the embodiments of this application do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are only used to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0029] As described in the background section, the vehicle lighting control system 100 in the related art is as follows: Figure 1a As shown, 10 is the ALCM (Ambient Lighting Control Module). The ALCM includes a power module 101, a scheme module 102, a switch circuit 103, and a CAN (Controller Area Network) module 104. The power module 101 obtains the vehicle's power signal from the power supply 21. The scheme module 102 obtains the pre-set lighting scheme 22. The switch circuit 103 obtains the on / off state of the lighting control system 100 from the switch. The CAN module 104 obtains the CAN signal 24 from the CAN bus. The microcontroller 105 is connected to the power module 101, the switch circuit 103, and the CAN module 104 respectively. The microcontroller 105 obtains lighting control data by processing the output signals of the power module 101, the scheme module 102, the switch circuit 103, and the CAN module 104, and sends the lighting control data to the drive module 106. The drive module 106 adjusts the levels of red 31, green 32, and blue 33 according to the color data in the lighting control data.

[0030] like Figure 1bAs shown, HUT (Head Unit, Multimedia Host) 241 can send a switch signal to ALCM10 to control the transmission of lighting control data in ALCM10, and ESP (Electronic Stability Program, Vehicle Stability System) 242 can send a vehicle speed signal to ALCM10 to control the transmission of lighting control data.

[0031] This leads to the following problems: ALCM10 restricts the lighting control data to a pre-set lighting scheme, lacking diverse color data sources, which affects the vehicle's lighting display effect.

[0032] Therefore, a lighting control method that can generate lighting control data based on audio signals is needed.

[0033] like Figure 2 As shown, the method in this embodiment includes:

[0034] Step 201: Acquire audio data, switch signals, and vehicle speed data.

[0035] In this step, audio data refers to signal data including multiple frequencies; in this embodiment, the preferred audio data is music rhythm data. The switch signal refers to a signal capable of controlling the transmission state of the light control data; in this embodiment, the preferred switch signal is a signal transmitted by the HUT (Human Transmission Unit) capable of controlling the transmission state of the light control data. Vehicle speed data can be data representing the vehicle's speed; in this embodiment, the preferred speed data is data transmitted by the ESP (Electronic Stability Program) capable of representing the vehicle's speed. This provides a sampling basis for subsequent audio data sampling, expands the sources of color data acquisition, and diversifies the sources of light control data.

[0036] Step 202: Sample the frequency amplitude of the audio data to obtain the sampling result.

[0037] In this step, since the audio data is a superposition of multiple frequency signals, frequency amplitude sampling of the audio data can obtain the multiple frequency signals corresponding to the audio data. This provides a data basis for subsequent comparison with preset thresholds.

[0038] Step 203: Compare the sampling results with the preset threshold to obtain the comparison results.

[0039] In this step, the preset threshold refers to a pre-set starting value for generating lighting control data. In this embodiment, the preferred preset threshold can be a pre-set starting value for generating lighting control data, calculated based on the sampling method. Thus, by comparing the sampling results with the preset threshold, a basis for determining subsequent color data can be provided.

[0040] Step 204, determine color data corresponding to the comparison result, determine light control data based on the color data.

[0041] In this step, the color data refers to data that can be used to generate light color, and the preferred color data in the embodiment can be PWM (Pulse Width Modulation) data that can be used to generate light color, wherein the PWM data can be obtained by corresponding conversion according to the RGB (Red Green Blue) data of the color data. The light control data refers to control data that can be used to drive the lamp, and the preferred light control data in the embodiment can include brightness data and color data, and the control data used to drive the lamp. In this way, the obtained light control data can provide a driving basis for subsequent driving of the lamp, realize the synchronization of audio data and color data, and improve the matching effect of the music effect corresponding to the audio data and the display effect corresponding to the light control data.

[0042] Step 205, determine whether to send the light control data according to the switch signal and the speed data.

[0043] In this step, in order to avoid the influence of light transformation on the safe driving of the vehicle when the speed of the vehicle is high, whether to send the light control data is determined by the vehicle speed data, thereby reducing the influence of the light control method on the safe driving of the vehicle.

[0044] Through the above scheme, the color data of the light is determined according to the audio data, the source of the color data is expanded, and the diversification of the source of the light control data is realized; by sampling the audio data and comparing it with the preset threshold, the synchronization of the audio data and the color data is realized, and the matching effect of the music effect corresponding to the audio data and the display effect corresponding to the light control data is improved.

[0045] In some embodiments, step 203 specifically includes:

[0046] Sort the sampling results according to the amplitude size corresponding to the sampling results to obtain a sorting result;

[0047] Obtain the sampling result corresponding to the maximum amplitude in the sorting result as the frequency data to be compared;

[0048] Compare the frequency data to be compared with the preset threshold to obtain the comparison result.

[0049] In the above scheme, the sampling result includes signals of multiple frequencies, and the signal with the maximum amplitude is selected from the signals of multiple frequencies, so that the signal that has the greatest impact on the human ear can be obtained from the signals of multiple frequencies.

[0050] The to-be-compared frequency data reflects the signal that has the greatest impact on the human ear in the sampling result, and the subsequent light control data is determined according to the to-be-compared frequency data, so that the unity of the auditory effect and the visual effect is ensured.

[0051] In some embodiments, step 202 comprises:

[0052] The frequency and amplitude in the audio data are extracted by the Fourier algorithm to obtain an extraction result;

[0053] The extraction result is filtered to obtain a filtering result;

[0054] The sampling frequency and the sampling accuracy are obtained;

[0055] The frequency data corresponding to each frequency in the filtering result is sampled according to the sampling frequency to obtain a sampling number;

[0056] The product of the sampling number, the amplitude, and the sampling accuracy is taken as the sampling result.

[0057] In the above scheme, the sampling frequency refers to the number of samples per unit time, and the sampling accuracy refers to the minimum voltage corresponding to a single sampling data.

[0058] For example, the sampling frequency is 40K, and the accuracy is 12bit, that is, the maximum of a single sampling data is 4096, and the voltage is 5V, that is, the sampling accuracy is 1.22mV. When the to-be-compared frequency data is a 1K frequency signal, 40 signals will be collected in a sampling period, because the Fourier algorithm is the superposition of data in the same frequency domain, and the sampling result of the 1K audio signal is 40*16*1.22=780, which is greater than the preset threshold 500.

[0059] Through the above scheme, a comparison basis is provided for subsequent determination of color data.

[0060] In some embodiments, the filtering of the extraction result to obtain a filtering result comprises:

[0061] The audio data between the first frequency and the second frequency in the extraction result is retained by the Fourier algorithm to obtain the filtering result.

[0062] In the above scheme, the first frequency refers to the upper limit value of the frequency corresponding to the continuous noise signal, and the second frequency refers to the lower limit value of the frequency corresponding to the intermittent noise signal.

[0063] Through the above scheme, the noise in the extraction result is filtered out, and the influence of noise on subsequent sampling is reduced.

[0064] In some embodiments, the determination of the color data corresponding to the comparison result comprises:

[0065] acquire a duration of the to-be-contrasted frequency data in the contrast result;

[0066] in response to determining that the to-be-contrasted frequency data is greater than the preset threshold and the duration of the to-be-contrasted frequency data is greater than a first preset time, convert the to-be-contrasted frequency data into first color data;

[0067] in response to determining that the to-be-contrasted frequency data is less than the preset threshold and the duration of the to-be-contrasted frequency data is greater than a second preset time, convert the to-be-contrasted frequency data into second color data.

[0068] In the above scheme, the first preset time refers to the shortest time that can determine whether to convert the to-be-contrasted data into the first color data, and the second preset time refers to the shortest time that can determine whether to convert the to-be-contrasted data into the second color data.

[0069] Through the above scheme, a judgment basis is provided for subsequent determination of color data corresponding to the contrast result.

[0070] In some embodiments, the converting the to-be-contrasted frequency data into the first color data comprises:

[0071] acquiring a plurality of colors;

[0072] acquiring a third frequency corresponding to the to-be-contrasted frequency data;

[0073] determining a first color corresponding to the third frequency from the plurality of colors;

[0074] taking a product of a speed corresponding to the third frequency and a first preset deceleration ratio as a first change speed of the first color;

[0075] splitting the first color according to the first change speed to obtain the first color data.

[0076] In the above scheme, the plurality of colors can be 64 colors or 256 colors. The third frequency refers to a change frequency corresponding to the to-be-contrasted frequency data greater than the preset threshold, the first color refers to one color in the plurality of colors corresponding to the third frequency, the speed corresponding to the third frequency refers to a speed of change of the third frequency, the first preset deceleration ratio refers to a proportion of delay of the speed of change of the third frequency, the first change speed refers to a change speed of the first color after being delayed by the first preset deceleration ratio, and splitting refers to proportionally decomposing color data between the first color and a color at a previous time according to the first change speed.

[0077] For example, the third frequency is 1000 Hz, the speed corresponding to the third frequency is 0.001 s, the color at the last moment is changed to the first color, the first preset deceleration ratio can be selected as 10:1 from the first range of 1:1~30:1, and the first change speed is 0.001 s. The color at the last moment is changed to the first color through 10 color changes, wherein the colors corresponding to the 10 color changes are obtained by dividing the color at the last moment and the first color by 10.

[0078] Through the above scheme, the speed of color transformation corresponding to the light control data is delayed, and the visual effect embodied by the light control data is improved.

[0079] In some embodiments, the converting the to-be-contrasted frequency data into second color data comprises:

[0080] Obtaining a fourth frequency corresponding to the to-be-contrasted frequency data;

[0081] Determining a second color corresponding to the fourth frequency from the plurality of colors;

[0082] Taking the product of the speed corresponding to the fourth frequency and a second preset deceleration ratio as a second change speed of the second color;

[0083] Splitting the second color according to the second change speed to obtain the second color data.

[0084] In the above scheme, the fourth frequency refers to the change frequency corresponding to the to-be-contrasted frequency data less than a preset threshold, the second color refers to one of the plurality of colors corresponding to the fourth frequency, the speed corresponding to the fourth frequency refers to the speed of the fourth frequency change, the second preset deceleration ratio refers to the proportion of the speed of the fourth frequency change, the second change speed refers to the change speed of the second color after being delayed by the second preset deceleration ratio, and the splitting refers to proportionally decomposing the color data between the second color and the color at the last moment according to the second change speed.

[0085] For example, the fourth frequency is 100 Hz, the speed corresponding to the third frequency is 0.01 s, the color at the last moment is changed to the second color, the second preset deceleration ratio can be selected as 125:1 from the range of 100:1~200:1, and the second change speed is 0.01 s. The color at the last moment is changed to the second color through 125 color changes, wherein the colors corresponding to the 125 color changes are obtained by dividing the color at the last moment and the first color by 125.

[0086] It can be understood that the first range and the second range can be adjusted and set by the user, or can be preset by the vehicle manufacturer.

[0087] By the above scheme, the speed of color transformation corresponding to the light control data is delayed, and the visual effect embodied by the light control data is improved.

[0088] In some embodiments, before determining the light control data based on the color data, the method further comprises:

[0089] obtaining luminance data;

[0090] generating a luminance level of the light control data according to the luminance data.

[0091] In the above scheme, since the human eye is more sensitive to the luminance of the light, the luminance data cannot be adjusted corresponding to the sampling data.

[0092] By the above scheme, the luminance level in the light control data is maintained unchanged through the obtained luminance data.

[0093] In some embodiments, step 205 specifically comprises:

[0094] in response to determining that the switch signal is in the on state and the speed data is less than or equal to a predetermined speed, sending the light control data;

[0095] in response to determining that the switch signal is in the off state and the speed data is greater than or equal to the predetermined speed, not sending the light control data.

[0096] In the above scheme, when the switch signal is in the on state, it indicates that the user accepts driving the lamp of the vehicle through the light control data; when the switch signal is in the off state, it indicates that the user does not accept driving the lamp of the vehicle through the light control data; when the speed of the vehicle is too fast, driving the lamp according to the light control data will affect the human eye, and then interfere with the driving of the vehicle. When the speed data is greater than the predetermined speed, the light control data is not sent.

[0097] By the above scheme, whether to send the light control data is determined through the vehicle speed data, which reduces the influence of the light control method on the safe driving of the vehicle.

[0098] It should be noted that the method of the embodiments of the present application can be executed by a single device, such as a computer or a server, etc. The method of the embodiments of the present application can also be applied to a distributed scenario, and completed by multiple devices cooperating with each other. In this distributed scenario, one of the multiple devices can only execute one or more steps in the method of the embodiments of the present application, and the multiple devices will interact with each other to complete the method.

[0099] It is to be understood that the foregoing description is directed to embodiments of the application. Various embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order and still achieve desirable results. In addition, the process depicted in the figures does not necessarily require the particular order shown or sequential order to achieve desirable results. In certain implementations, multitasking and parallel processing can be advantageous.

[0100] Based on the same inventive concept, on the basis of the above-mentioned various embodiment methods corresponding to the implementation scheme, the following specific implementation cases can be realized.

[0101] ALCM: connected with HUT channel through hardwire, itself supports spectrum analysis, atmosphere lamp switches 256 colors (corresponding to multiple colors in the embodiments of the application) with audio rhythm:

[0102] Real-time audio output waveform is collected through hardwire connection with HUT channel or AMP channel.

[0103] Data of each frequency band in real-time audio is extracted through Fourier algorithm: after current audio data SoundValue (corresponding to a preset threshold in the embodiments of the application) is continuously greater than 500 for 300 ms (corresponding to a first duration in the embodiments of the application) of no sound state, it is switched to sound state; after current audio data SoundValue is continuously less than 500 for 2.5 s (corresponding to a second duration in the embodiments of the application) of sound state, it is switched to no sound state.

[0104] Signals of each frequency band are compared, and a frequency band with a higher amplitude is extracted, which has a greater impact on the human ear.

[0105] A certain deceleration processing is performed through an algorithm to prevent the atmosphere lamp from flashing too fast: deceleration ratio: ratio of input speed and output speed, deceleration ratio (corresponding to a first preset deceleration ratio in the embodiments of the application) in music state is 10:1, that is, one color state is divided into 10 times of successive approximation, and deceleration ratio (corresponding to a first preset deceleration ratio in the embodiments of the application) in non-music state is 125:1.

[0106] When the audio amplitude is high, the color is biased to the red domain, and when the audio amplitude is low, the color is biased to the blue domain.

[0107] Filtering: Fourier algorithm will superimpose data in the same frequency domain, continuous noise signals will be stored in the low-frequency band buffer area, and intermittent noise signals will be stored in the high-frequency band buffer area, and the filtering algorithm will remove noise signals in the low-frequency band and the high-frequency band, data below 20 Hz (corresponding to a first frequency in the embodiments of the application) and above 15K (corresponding to a second frequency in the embodiments of the application) will be removed and will not participate in the rhythm control.

[0108] The starting threshold is that the current audio sampling frequency is 40K, the human ear can recognize audio signals in the range of 20HZ-20KHZ, and theoretically, more than twice the sampling frequency can collect all audio signals. The sampling depth is 512, that is, 512 numbers are stored as processing data, the sampling accuracy is 12 bits, the maximum value of a single data is 4096, and the voltage is 5V, that is, a value represents 1.22mv. Taking a 1K audio signal as an example, 40 1K signals will be collected in a sampling period, because the Fourier algorithm is the superposition of data in the same frequency domain, the current starting threshold is 500, and the average fluctuation voltage of the 1K audio signal is greater than 15.25(500 / 40*1.22)mv, that is, greater than the starting threshold. Similarly, 200HZ will collect 200 data, and the average voltage is greater than 3.05mv, so low-frequency signals are more likely to trigger music rhythm.

[0109] The HUT is used to set the rhythm atmosphere lamp on / off, and the customer sets it with memory. The default rhythm atmosphere lamp is turned on at the factory.

[0110] In addition, when the VehicleSpd&VehicleSpdValid(corresponding to the speed data in the embodiment of the application) is greater than or equal to 90Km / h, the rhythm atmosphere lamp is not controlled by the audio rhythm, and the atmosphere lamp is lit in ice blue by default. When the VehicleSpd&VehicleSpdValid is less than or equal to 80km / h, the normal rhythm state is restored.

[0111] The vehicle light control method of the above embodiment has the beneficial effects of the vehicle light control method of any one of the preceding embodiments, which will not be repeated here.

[0112] Based on the same inventive concept, the present application also provides a vehicle light control device corresponding to the method of any of the above embodiments.

[0113] Reference Figure 3 The vehicle light control device comprises:

[0114] The acquisition module 301 is configured to acquire audio data, a switching signal and speed data of a vehicle;

[0115] The sampling module 302 is configured to sample the frequency amplitude of the audio data to obtain a sampling result;

[0116] The comparison module 303 is configured to compare the sampling result with a preset threshold to obtain a comparison result;

[0117] The determination module 304 is configured to determine color data corresponding to the comparison result, and determine light control data based on the color data;

[0118] The sending module 305 is configured to determine whether to send the light control data according to the switch signal and the speed data.

[0119] In some embodiments, the comparison module 303 is configured to:

[0120] sort the sampling results according to the amplitude values corresponding to the sampling results to obtain a sorting result;

[0121] obtain the sampling result corresponding to the maximum amplitude in the sorting result as the frequency data to be compared;

[0122] compare the frequency data to be compared with the preset threshold to obtain the comparison result.

[0123] In some embodiments, the sampling module 302 is configured to:

[0124] extract the frequency and amplitude in the audio data by a Fourier algorithm to obtain an extraction result;

[0125] filter the extraction result to obtain a filtering result;

[0126] obtain a sampling frequency and a sampling accuracy;

[0127] sample the frequency data corresponding to each frequency in the filtering result according to the sampling frequency to obtain a sampling number;

[0128] multiply the sampling number, the amplitude, and the sampling accuracy to obtain the sampling result.

[0129] In some embodiments, the sampling module 302 is specifically configured to:

[0130] retain the audio data between the first frequency and the second frequency in the extraction result by the Fourier algorithm to obtain the filtering result.

[0131] In some embodiments, the determination module 304 includes:

[0132] an obtaining unit configured to obtain a duration of the frequency data to be compared in the comparison result;

[0133] a first color unit configured to, in response to determining that the frequency data to be compared is greater than the preset threshold and the duration of the frequency data to be compared is greater than a first preset time, convert the frequency data to be compared into first color data;

[0134] a second color unit configured to, in response to determining that the frequency data to be compared is less than the preset threshold and the duration of the frequency data to be compared is greater than a second preset time, convert the frequency data to be compared into second color data.

[0135] In some embodiments, the first color unit is configured to:

[0136] obtain a plurality of colors;

[0137] obtain a third frequency corresponding to the frequency data to be compared;

[0138] determine a first color corresponding to the third frequency from the plurality of colors;

[0139] take a product of a speed corresponding to the third frequency and a first preset deceleration ratio as a first change speed of the first color;

[0140] split the first color according to the first change speed to obtain the first color data.

[0141] In some embodiments, the second color unit is configured to:

[0142] obtain a fourth frequency corresponding to the frequency data to be compared;

[0143] determine a second color corresponding to the fourth frequency from the plurality of colors;

[0144] take a product of a speed corresponding to the fourth frequency and a second preset deceleration ratio as a second change speed of the second color;

[0145] split the second color according to the second change speed to obtain the second color data.

[0146] In some embodiments, the apparatus further comprises:

[0147] a brightness obtaining module configured to obtain brightness data;

[0148] a generating module configured to generate a brightness level of the light control data according to the brightness data.

[0149] In some embodiments, the determining module 305 is configured to:

[0150] in response to determining that the switch signal is in an on state and the speed data is less than or equal to a predetermined speed, send the light control data;

[0151] in response to determining that the switch signal is in an off state and the speed data is greater than or equal to the predetermined speed, not send the light control data.

[0152] For the convenience of description, the above apparatus is described in various modules respectively according to functions. Of course, in the implementation of the present application, the functions of each module can be implemented in one or more software and / or hardware.

[0153] The device of the above embodiments is used to implement the light control method of the corresponding vehicle in any of the preceding embodiments, and has the beneficial effects of the corresponding method embodiments, which are not repeated here.

[0154] Figure 4 The light control system 200 of the vehicle corresponding to any of the above embodiments is shown, which includes an audio module 107 configured to obtain audio data 25.

[0155] Based on the same inventive concept, the present application also provides an electronic device corresponding to the method of any of the above embodiments, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the light control method of the vehicle according to any of the above embodiments when executing the program.

[0156] Figure 5 A more specific hardware structure schematic diagram of an electronic device provided in the embodiment is shown, which can include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other in the device through the bus 1050.

[0157] The processor 1010 can be implemented in the form of a general-purpose CPU (Central Processing Unit, central processor), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., for executing related programs to implement the technical solutions provided in the embodiments of the present specification.

[0158] The memory 1020 can be implemented in the form of a ROM (Read Only Memory, read-only memory), a RAM (Random Access Memory, random access memory), a static storage device, a dynamic storage device, etc. The memory 1020 can store an operating system and other application programs, and when the technical solutions provided in the embodiments of the present specification are implemented by software or firmware, the related program codes are saved in the memory 1020 and executed by the processor 1010.

[0159] The input / output interface 1030 is configured to connect an input / output module to realize information input and output. The input / output module can be configured in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. The input device can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device can include a display, a speaker, a vibrator, an indicator light, etc.

[0160] The communication interface 1040 is configured to connect a communication module (not shown in the figure) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired manner (such as a USB, a network cable, etc.) or a wireless manner (such as a mobile network, WIFI, Bluetooth, etc.).

[0161] The bus 1050 includes a channel to transmit information between various components (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040) of the device.

[0162] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, the device can also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device can also only include components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.

[0163] The electronic device of the above embodiments is used to implement the light control method of the vehicle in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described here.

[0164] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application also provides a non-transitory computer readable storage medium storing computer instructions for causing the computer to execute the light control method of the vehicle according to any of the above embodiments.

[0165] The computer readable media of the embodiments can include permanent and non-permanent, removable and non-removable media, which can be implemented by any method or technology to store information. The information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage device, or any other non-transmission medium that can be used to store information accessible by a computing device.

[0166] The storage medium of the above embodiments stores computer instructions for causing the computer to execute the light control method of the vehicle as described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which are not described here again.

[0167] Those skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present application (including claims) is limited to these examples; the above embodiments or technical features between different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes of the different aspects of the embodiments of the present application as described above. In order to be brief, they are not provided in detail.

[0168] In addition, in order to simplify the description and discussion, and so as not to make the embodiments of the present application difficult to understand, the well-known power / ground connections of integrated circuit (IC) chips and other components can or can not be shown in the provided drawings. In addition, the devices can be shown in the form of block diagrams in order to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented the embodiments of the present application (i.e. these details should be fully within the understanding of those skilled in the art). Where specific details (e.g. circuits) are set forth in order to describe the exemplary embodiments of the present application, it will be apparent to those skilled in the art that the embodiments of the present application can be implemented without these specific details or with variations of these specific details. Therefore, these descriptions should be considered illustrative rather than limiting.

[0169] While the present application has been described in connection with certain embodiments thereof, many modifications, substitutions, changes, and of forms will be apparent to those of ordinary skill in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) can use the embodiments discussed.

[0170] Embodiments of the present application are intended to cover all such alternatives, modifications, and variations as come within the scope of the appended claims. Accordingly, any and all such alterations, omissions, equivalents, improvements, and the like are intended to be encompassed by the present application.

Claims

1. A light control method of a vehicle, characterized by, The method comprises: acquiring audio data, a switch signal and speed data of a vehicle; frequency amplitude sampling of the audio data to obtain a sampling result, comprising: extracting frequencies and amplitudes in the audio data by a Fourier algorithm to obtain an extraction result; filtering the extraction result to obtain a filtering result; acquiring a sampling frequency and a sampling precision; sampling frequency data corresponding to each frequency in the filtering result according to the sampling frequency to obtain a sampling number; taking the product of the sampling number, the amplitude and the sampling precision as the sampling result; comparing the sampling result with a preset threshold to obtain a comparison result, comprising: sorting the sampling result according to the amplitude corresponding to the sampling result to obtain a sorting result; taking the sampling result corresponding to the maximum amplitude in the sorting result as to-be-compared frequency data; comparing the to-be-compared frequency data with the preset threshold to obtain the comparison result; determining color data corresponding to the comparison result, comprising: acquiring a duration of the to-be-compared frequency data in the comparison result; in response to determining that the to-be-compared frequency data is greater than the preset threshold and the duration of the to-be-compared frequency data is greater than a first preset time, acquiring a plurality of colors, acquiring a third frequency corresponding to the to-be-compared frequency data; determining a first color corresponding to the third frequency from the plurality of colors; taking the product of a speed corresponding to the third frequency and a first preset deceleration ratio as a first change speed of the first color; splitting the first color according to the first change speed to obtain first color data, and taking the first color data as the color data; determining light control data based on the color data; determining whether to send the light control data according to the switch signal and the speed data.

2. The control method according to claim 1, characterized by, The filtering of the extraction result to obtain a filtering result comprises: reserving audio data between a first frequency and a second frequency in the extraction result by a Fourier algorithm to obtain the filtering result.

3. The control method according to claim 1, characterized by, The determination of color data corresponding to the comparison result comprises: in response to determining that the to-be-compared frequency data is less than the preset threshold and the duration of the to-be-compared frequency data is greater than a second preset time, converting the to-be-compared frequency data into second color data.

4. The control method according to claim 3, characterized by The conversion of the to-be-compared frequency data into second color data comprises: acquiring a fourth frequency corresponding to the to-be-compared frequency data; determining a second color corresponding to the fourth frequency from the plurality of colors; taking the product of a speed corresponding to the fourth frequency and a second preset deceleration ratio as a second change speed of the second color; splitting the second color according to the second change speed to obtain the second color data.

5. The control method according to claim 1, characterized by, Before determining light control data based on the color data, the method further comprises: acquiring brightness data; generating a brightness level of the light control data according to the brightness data.

6. The control method according to claim 1, characterized by The determination of whether to send the light control data according to the switch signal and the speed data comprises: in response to determining that the switch signal is in an on state and the speed data is less than or equal to a predetermined speed, sending the light control data; in response to determining that the switch signal is in an off state and the speed data is greater than or equal to the predetermined speed, not sending the light control data.

7. A light control device of a vehicle, characterized by comprising: The method comprises: an acquisition module configured to acquire audio data, a switch signal, and speed data of a vehicle; a sampling module configured to perform frequency amplitude sampling on the audio data to obtain a sampling result, wherein a frequency and an amplitude in the audio data are extracted by a Fourier algorithm to obtain an extraction result; the extraction result is filtered to obtain a filtering result; a sampling frequency and a sampling accuracy are acquired; frequency data corresponding to each frequency in the filtering result is sampled according to the sampling frequency to obtain a sampling number; and a product of the sampling number, the amplitude, and the sampling accuracy is taken as the sampling result; a comparison module configured to compare the sampling result with a preset threshold to obtain a comparison result, wherein the sampling result is sorted according to an amplitude corresponding to the sampling result to obtain a sorting result; a sampling result corresponding to a maximum amplitude in the sorting result is taken as to-be-compared frequency data; and the to-be-compared frequency data is compared with the preset threshold to obtain the comparison result; a determination module configured to determine color data corresponding to the comparison result and determine light control data based on the color data, wherein a duration of the to-be-compared frequency data in the comparison result is acquired; in response to determining that the to-be-compared frequency data is greater than the preset threshold and the duration of the to-be-compared frequency data is greater than a first preset time, a plurality of colors is acquired, a third frequency corresponding to the to-be-compared frequency data is acquired; a first color corresponding to the third frequency is determined from the plurality of colors; a product of a speed corresponding to the third frequency and a first preset deceleration ratio is taken as a first change speed of the first color; the first color is split according to the first change speed to obtain first color data, and the first color data is taken as the color data; a sending module configured to determine whether to send the light control data according to the switch signal and the speed data.

8. An electronic device, comprising: The computer program is stored in the memory and executable by the processor, and the processor executes the computer program to implement the method of any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium, comprising: The non-transitory computer readable storage medium stores computer instructions for causing a computer to execute the method of any one of claims 1 to 6. The non-transitory computer readable storage medium stores computer instructions for causing a computer to execute the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Light control method, light control device and readable storage medium

    CN110461077A

  • System and method for realizing audio and image synchronous light control

    CN113286405A