Vehicle-mounted atmosphere lamp control method, device and equipment and storage medium

By analyzing the target accompaniment audio, constructing the instrument performance score and converting it into a light sequence control file, the problem of high cost and low universality of simulating instrument performance in in-vehicle ambient lighting is solved, and an automated instrument performance effect is achieved.

CN121968413APending Publication Date: 2026-05-01DONGFENG MOTOR CO LTD DONGFENG NISSAN PASSENGER VEHICLE CO
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DONGFENG MOTOR CO LTD DONGFENG NISSAN PASSENGER VEHICLE CO
Filing Date
2026-03-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing technologies that simulate musical instrument performances using in-vehicle ambient lighting require pre-prepared control files, resulting in high costs and low applicability.

Method used

By extracting accented segments from the target accompaniment audio, determining their frequency and pitch symbols, constructing an instrument performance score, and converting it into a lighting sequence control file, the vehicle ambient lighting can be directly controlled to simulate instrument performance.

Benefits of technology

It enables the automatic conversion of accompaniment audio into instrumental scores without the need for pre-built control files, reducing costs and improving versatility, and simulating instrumental performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121968413A_ABST
    Figure CN121968413A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle-mounted atmosphere lamp control method, device and equipment and a storage medium, and relates to the technical field of vehicle control, and the method comprises the steps: extracting accent segments corresponding to accent in a target accompaniment audio; determining a to-be-converted frequency corresponding to the accent segment according to the amplitude of each frequency in the accent segment; determining a pitch symbol corresponding to the frequency to be converted; constructing a musical instrument playing score according to the pitch symbols corresponding to the accent segments, and converting the musical instrument playing score into a light sequence control file; and controlling a vehicle-mounted atmosphere lamp in the vehicle based on the light sequence control file to simulate musical instrument playing. Through analysis and processing, the target accompaniment audio can be automatically converted into the musical instrument playing score and converted into the light sequence control file, it is guaranteed that the vehicle-mounted atmosphere lamp can be controlled and musical instrument playing can be simulated subsequently according to the light sequence control file, the control file does not need to be constructed in advance, excessive manual intervention is not needed, cost is lower, and universality is higher.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle control technology, and in particular to methods, devices, equipment and storage media for controlling in-vehicle ambient lighting. Background Technology

[0002] Ambient lighting has become a mainstream feature in modern vehicles, primarily providing a better entertainment experience for drivers and passengers through the rhythm of ambient lighting. Currently, if ambient lighting needs to simulate the effect of playing musical instruments (such as guitar) during rhythmic movement, it is generally achieved through a manual, rule-based approach. This involves manually analyzing the music in advance, creating the corresponding instrumental score, and converting it into a time-stamped lighting effect sequence control file.

[0003] However, this method requires a lot of manpower to prepare in advance, and the music for the control file cannot be prepared manually in advance, so the overall effect is not ideal in practical applications. Summary of the Invention

[0004] The main purpose of this application is to provide a method, device, equipment and storage medium for controlling vehicle ambient lighting, which aims to solve the technical problems of high cost and low universality when related technologies simulate musical instrument performance through ambient lighting rhythm.

[0005] To achieve the above objectives, this application proposes a method for controlling in-vehicle ambient lighting, the method comprising: Extract the accented note segments corresponding to each accented note in the target accompaniment audio; The frequency to be converted corresponding to the accented segment is determined based on the amplitude of each frequency in the accented segment; Determine the pitch symbol corresponding to the frequency to be converted; A musical score is constructed based on the pitch symbols corresponding to each accented segment, and the musical score is converted into a light sequence control file. The vehicle's ambient lighting is controlled based on the aforementioned lighting sequence control file to simulate musical instrument performance.

[0006] Optionally, the step of extracting the accented segments corresponding to each accented note in the target accompaniment audio includes: Locate the pronunciation timing of each accented note in the target accompaniment audio; The time interval between each accent is determined based on the pronunciation timing; The segment duration is constructed based on the aforementioned time interval and segment duration coefficient; The segment time corresponding to each stressed syllable is determined based on the pronunciation time and the duration of the segment. Based on the aforementioned segmented time period, the accented segments corresponding to each accented note are extracted from the target accompaniment audio.

[0007] Optionally, determining the frequency to be converted corresponding to the accented segment based on the amplitude of each frequency in the accented segment includes: The accented segment is analyzed to determine the amplitude corresponding to each frequency in the accented segment; Sort the frequencies from largest to smallest according to their corresponding amplitudes to generate amplitude sorting results; The frequencies of the top N in the amplitude sorting results are taken as the frequencies to be converted for the accented segment, where N is the maximum number of pitches that the instrument to be simulated can produce at the same time.

[0008] Optionally, the step of using the top N frequencies in the amplitude sorting result as the frequencies to be converted corresponding to the accented segment includes: The frequencies of the top N frequencies in the amplitude sorting results are taken as the frequencies to be detected. The frequency detection threshold is determined based on the frequency ranked first in the amplitude sorting results and the detection coefficient. The frequency to be detected whose amplitude is greater than or equal to the frequency detection threshold is taken as the frequency to be converted for the accent segment.

[0009] Optionally, determining the pitch symbol corresponding to the frequency to be converted includes: Obtain the standard frequencies corresponding to each pitch of the instrument to be simulated; The frequency to be converted is compared with the standard frequency corresponding to each pitch to determine the frequency difference corresponding to each pitch; The pitch symbol corresponding to the frequency to be converted is set according to the pitch with the smallest corresponding frequency difference.

[0010] Optionally, the step of constructing the instrumental score based on the pitch symbols corresponding to each accented segment includes: At least one fret array is constructed based on the pitch symbol corresponding to the accented segment. The number of array elements in the fret array is consistent with the number of strings of the instrument to be simulated. The array elements in the fret array represent the frets when the sound is produced. The difference value of each selected fret array is determined based on the maximum and minimum values ​​of each fret array. The instrument playing mode corresponding to the string array with the smallest corresponding fret difference value is taken as the instrument playing mode corresponding to the accented segment. The instrument playing styles corresponding to each accented segment are combined to generate an instrumental score.

[0011] Optionally, constructing at least one fret array based on the pitch symbol corresponding to the accented segment includes: Obtain the string fret combination for each pitch symbol corresponding to the accented segment, where one pitch symbol corresponds to at least one string fret combination; Arrange and combine the string frets of each pitch symbol to determine at least one string fret combination sequence; Construct at least one string array based on the string combination sequence.

[0012] Furthermore, to achieve the above objectives, this application also proposes a vehicle ambient lighting control device, which includes: The extraction module is used to extract the accented segments corresponding to each accented note in the target accompaniment audio. The conversion module is used to determine the frequency to be converted corresponding to the accented segment based on the amplitude of each frequency in the accented segment; The determining module is used to determine the pitch symbol corresponding to the frequency to be converted; The construction module is used to construct the instrument performance score based on the pitch symbols corresponding to each accented segment, and convert the instrument performance score into a light sequence control file; The control module is used to control the vehicle's ambient lighting based on the light sequence control file to simulate musical instrument playing.

[0013] In addition, to achieve the above objectives, this application also proposes an in-vehicle ambient lighting control device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the in-vehicle ambient lighting control method as described above.

[0014] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the vehicle ambient lighting control method as described above.

[0015] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the vehicle ambient lighting control method described above.

[0016] One or more technical solutions proposed in this application have at least the following technical effects: Through analysis and processing, the target accompaniment audio can be automatically converted into instrumental score and then into a lighting sequence control file. This ensures that the ambient lighting in the vehicle can be controlled according to the lighting sequence control file to simulate instrumental performance. There is no need to build the control file in advance or to do much manual intervention, resulting in lower costs and greater versatility. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a flowchart illustrating an embodiment of the vehicle ambient lighting control method of this application. Figure 2 This is a flowchart illustrating Embodiment 2 of the vehicle ambient lighting control method of this application. Figure 3 This is a flowchart illustrating Embodiment 3 of the vehicle ambient lighting control method of this application; Figure 4 This is a schematic diagram of the module structure of the vehicle ambient lighting control device according to an embodiment of this application; Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the vehicle ambient lighting control method in this application embodiment.

[0020] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0021] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0022] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0023] Based on this, this application provides a method for controlling in-vehicle ambient lighting, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the vehicle ambient lighting control method of this application.

[0024] In this embodiment, the vehicle ambient lighting control method includes steps S10 to S50: Step S10: Extract the accented segments corresponding to each accented note in the target accompaniment audio.

[0025] It should be noted that the executing entity in this embodiment can be the vehicle itself or the in-vehicle ambient lighting control device in the vehicle. The in-vehicle ambient lighting control device can be a controller installed in the vehicle, such as an ECU controller, or other devices that can achieve the same or similar functions. This embodiment does not limit this. In this embodiment and the following embodiments, the in-vehicle ambient lighting control method of this application is described using an in-vehicle ambient lighting control device as an example.

[0026] It should be noted that the target accompaniment audio can be music excluding vocals, i.e., the instrumental part of the music. Accents are the loudest notes in music, most prominent in terms of sonic impact, and are a major factor in creating musical rhythm. The accented segment can be a musical fragment extracted from the time stamp corresponding to the accented note, sung for a certain duration.

[0027] If the music provided or specified by the user contains vocals, the vocals can be separated using music track splitting technology, keeping only the instrumental accompaniment track, thus obtaining the target accompaniment audio.

[0028] It is understandable that extracting the music segment corresponding to the accented notes is to ensure that subsequent analysis can be performed to extract its spectrum.

[0029] In practical use, when simulating instrument playing, it is generally necessary to play the instruments in sequence according to the rhythm. Therefore, the key to simulating instrument playing is to discretize the music and form regular lighting effects according to the rhythm of the music. On this basis, rhythm extraction (beat-tracking) technology can be used to identify each accent in the target accompaniment audio, and then the accented segment can be extracted by extending a period of time before and after the timestamp corresponding to the accent.

[0030] In a specific implementation, to ensure that the length of the extracted accented segment is reasonable, step S10 in this embodiment may include: Locate the pronunciation timing of each accented note in the target accompaniment audio; The time interval between each accent is determined based on the pronunciation timing; The segment duration is constructed based on the aforementioned time interval and segment duration coefficient; The segment time corresponding to each stressed syllable is determined based on the pronunciation time and the duration of the segment. Based on the aforementioned segmented time period, the accented segments corresponding to each accented note are extracted from the target accompaniment audio.

[0031] It should be noted that the segment duration coefficient can range from (0, 0.5). The specific value can be preset by the administrator of the vehicle ambient lighting control device, for example, setting the segment duration coefficient to 0.25.

[0032] In practical use, the target accompaniment audio can first be rhythmically extracted (beat-tracking) to determine the pronunciation time of each accent in the target accompaniment audio, thereby obtaining the accent sequence in the music, that is, the pronunciation timestamp of each accent.

[0033] Generally, there is a fixed time interval between adjacent accents. At this time, the time interval can be multiplied by the segment duration coefficient, and the product is used as the segment duration. Then, the segment duration is extended before and after the pronunciation moment of the accent, and the截取时段 of the accent can be divided. After that, based on the截取时段 corresponding to each accent,截取 is performed from the target accompaniment audio, and the accent segment corresponding to each accent can be obtained.

[0034] It can be understood that multiplying the time interval between accents by a segment duration coefficient less than 1 to obtain the segment duration and then dividing the截取时段 can ensure that a certain length of music segment can be intercepted for each accent, while also ensuring that the length of the intercepted accent segment is reasonable and avoiding including multiple different accents in one accent segment.

[0035] Among them, in some cases, the time interval between accents may not be fixed, that is, the time intervals between different accents may vary. At this time, the minimum value of the time intervals between each accent can be multiplied by the segment duration coefficient to construct the segment duration.

[0036] Step S20: Determine the待转换频率 corresponding to the accent segment according to the amplitudes of each frequency in the accent segment.

[0037] In actual use, to ensure the effectiveness of the待转换频率 to be collected, the frequency to be converted can be determined based on the energy of the pronunciation.

[0038] Therefore, screening can be performed according to the amplitudes of each frequency in the accent segment to determine the待转换频率 corresponding to the accent segment.

[0039] In actual application, in fact, an instrument generally has its own frequency domain limit (that is, the highest and lowest frequencies), and may not be able to cover all the pitches actually existing in the source music (that is, the target accompaniment audio). At this time, the pitch range (frequency domain) of the source music can be scaled so that the highest and lowest frequencies in the music fit the highest and lowest frequencies that the guitar can play, and the intermediate frequencies are scaled proportionally. This process can be performed on the entire target accompaniment audio before selecting the待转换频率, or on the selected待转换频率 after selecting the待转换频率. This embodiment does not limit this.

[0040] For example: Taking the guitar as an example, it can be defined that f_low = 82.4 Hz (E2, the lowest note of an ordinary guitar), f_high = 659.3 Hz (E5, the highest note of an ordinary guitar). At this time, assuming that the highest frequency in the target accompaniment audio is f_max, the lowest frequency is f_min, and the frequency to be scaled is f, then there is: If f_low < f_min < f_max < f_high, then after scaling, f = f (no processing); If f_min < f_low < f_max < f_high, then after scaling, f = f_max – (f_max – f) (f_max – f_low) / (f_max – f_min); If f_low < f_min < f_high < f_max, then after scaling, f = f_min + (f – f_min) (f_high – f_min) / (f_max – f_min); If f_min < f_low < f_high < f_max, then after scaling, f = f_min + (f – f_min) (f_high – f_low) / (f_max – f_min); In other cases, report an error and exit.

[0041] It should be noted that this kind of scaling is to avoid the problem that when the pitch in the source music exceeds the highest or lowest limit that can be played by the instrument, it cannot be mapped to the notes that the instrument can play and the lighting effects cannot be assigned. The purpose is to make each pitch have a corresponding lighting effect to achieve the diversity of lighting effects corresponding to different pitches, and it does not pursue the true restoration of pitch.

[0042] Step S30: Determine the pitch symbol corresponding to the frequency to be converted.

[0043] It should be noted that since the strings of the instrument are fixed, when emitting the same pitch, its frequency remains almost unchanged or changes very little. The corresponding pitch played by the real instrument can be identified by the frequency. Therefore, the frequency to be converted can be compared with the frequency of the pitch corresponding to the instrument to be simulated, so as to determine the pitch symbol corresponding to the frequency to be converted.

[0044] Among them, the instrument to be simulated can be the instrument required for subsequent performance. For example, if the guitar is to be simulated in the subsequent performance, the instrument to be simulated is the guitar.

[0045] In actual use, the administrator of the vehicle atmosphere light control device can pre-analyze the instrument to be simulated to determine the frequency values corresponding to each pitch of the instrument to be simulated.

[0046] In a specific implementation, the pitch symbol corresponding to the frequency to be converted can be determined by comparing the frequency differences. At this time, step S30 described in this embodiment may include: Obtain the standard frequencies corresponding to each pitch of the instrument to be simulated; The frequency to be converted is compared with the standard frequency corresponding to each pitch to determine the frequency difference corresponding to each pitch; The pitch symbol corresponding to the frequency to be converted is set according to the pitch with the smallest corresponding frequency difference.

[0047] It should be noted that the standard frequencies corresponding to each pitch of the instrument to be simulated can be pre-calibrated by the personnel in charge of the vehicle ambient lighting control equipment.

[0048] For example, taking a guitar as an example, the standard frequency corresponding to the calibrated pitch E2 (low Mi) is 82.41Hz, the standard frequency corresponding to F2 (low Fa) is 87.31Hz, and so on.

[0049] In practical use, after determining the frequency to be converted, the frequency to be converted can be compared with the standard frequency corresponding to each pitch. The absolute value of the difference between the frequency to be converted and the standard frequency can be calculated, and this absolute value of the difference can be used as the frequency difference corresponding to each pitch. Then, the pitch symbol corresponding to the frequency to be converted can be set according to the pitch with the smallest corresponding frequency difference.

[0050] For example: Suppose the frequency to be converted is 84, and the standard frequency corresponding to pitch E2 (low Mi) is 82.41Hz, the standard frequency corresponding to F2 (low Fa) is 87.31Hz, and the standard frequency corresponding to F#2 / Gb2 (low Fa / low Sol) is 92.50. Then, the frequency difference corresponding to E2 is 1.59, the frequency difference corresponding to F2 is 3.31, and the frequency difference corresponding to F#2 / Gb2 is 8.50. Therefore, the high note symbol corresponding to the frequency to be converted is E2.

[0051] In this case, an accented segment may correspond to multiple frequencies to be converted, and thus an accented segment can correspond to multiple pitch symbols.

[0052] Step S40: Construct an instrumental score based on the pitch symbols corresponding to each accented segment, and convert the instrumental score into a light sequence control file.

[0053] Step S50: Control the vehicle ambient lighting based on the light sequence control file to simulate musical instrument playing.

[0054] In practical use, after determining the pitch symbol corresponding to each accented segment, the playing method that can be used when the instrument to be simulated produces that pitch can be determined, thus determining the playing method corresponding to each accented segment. Then, the playing methods of each accented segment are combined in chronological order to generate the instrument performance score.

[0055] Next, the instrument score can be mapped to a lighting sequence control file. Taking a guitar as an example, if the car ambient lighting is a 6-lamp color ambient light, the mapping conversion method can be as follows: There are 6 colored light positions, each with 13 selectable colors. A color map is set in advance, and the 13 colors are corresponding to values ​​from 0 to 12. The six colored lights correspond to the six guitar strings. When music is played, each light emits the color corresponding to the fret of that string at the current timestamp. The lights corresponding to strings that are not being played do not light up. The brightness of the light is determined as follows (0% brightness when not emitting light, and 100% brightness at its brightest) to achieve a gradual dimming effect between two time stamps: The time interval between two adjacent timestamps is t_period, and the total time elapsed from the first timestamp to the current moment of the music is t_total. Then, the brightness of the light within the current timestamp period is: max(0, 1 – (t_total mod t_period / t_period)). α) 100%, where mod is the remainder operation and max is the maximum value; Here, α is a parameter used to adjust the speed at which the brightness of the lights dims. The larger the value, the faster the brightness dims. When the value is greater than 1, all the lights will be completely turned off at the end of each timestamp period and wait to be turned on again at the next timestamp, thus enhancing the visual rhythm.

[0056] Taking a guitar as an example, if the car ambient lighting is a dot matrix ambient light, the mapping conversion method can be as follows: The dot matrix is ​​divided into a matrix of 20 rows vertically and 6 columns horizontally. Each column represents a string, forming a beam of light.

[0057] The number of illuminated segments corresponding to each string within the current timestamp period is determined as follows: The time interval between two adjacent timestamps is t_period, and the total time elapsed from the first timestamp to the current moment of the music is t_total. If the fret corresponding to a string at the current timestamp is m, then the number of lit segments corresponding to that string within the current timestamp period is: round ((m + 8) (max (0, 1 – (t_total mod t_period / t_period) β))), where round is the rounding operation function; The parameter β is used to adjust the speed at which the light column descends; the larger the parameter, the faster it descends. When this parameter is greater than 1, all lights will be completely turned off at the end of each timestamp period, waiting to be turned on again at the next timestamp, enhancing the visual rhythm.

[0058] This embodiment provides a method for controlling in-vehicle ambient lighting. Through analysis and processing, the target accompaniment audio can be automatically converted into an instrumental score and then into a lighting sequence control file. This ensures that the in-vehicle ambient lighting can be controlled according to the lighting sequence control file to simulate instrumental performance. There is no need to build the control file in advance or to have too much manual intervention, resulting in lower cost and greater versatility.

[0059] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 Step S20 includes steps S201 to S203: Step S201: Analyze the accented segment to determine the amplitude corresponding to each frequency in the accented segment.

[0060] It should be noted that in order to reasonably determine the frequencies to be analyzed, invalid accents must first be eliminated. At this time, the energy level can be used to make a judgment. Therefore, a fast Fourier transform (fft) can be performed on the accented segments to determine the amplitude corresponding to each frequency in the accented segments.

[0061] Step S202: Sort each frequency according to its amplitude from largest to smallest to generate an amplitude sorting result.

[0062] Step S203: Take the top N frequencies in the amplitude sorting results as the frequencies to be converted corresponding to the accented segment, where N is the maximum number of pitches that the instrument to be simulated can produce at the same time.

[0063] In practical use, the higher the energy, the stronger the pitch. Therefore, during the screening process, frequencies can be sorted from largest to smallest based on their amplitude to generate an amplitude sorting result.

[0064] Since stringed instruments are limited by their strings, the maximum number of pitches they can produce at the same time is limited. Therefore, the top N frequencies in the amplitude sorting results can be selected as the frequencies to be converted for the accented segments based on the maximum number of pitches that the instrument to be simulated can produce at the same time.

[0065] Taking a guitar as an example, it has six strings, from the sixth string to the first string from top to bottom. Generally speaking, the sixth string is the thickest, has a low vibration frequency, and produces a lower pitch; the first string is the thinnest, and produces a higher pitch. The pitch of each string depends not only on its thickness but also on its "vibration length." The longer the vibration length, the lower the vibration frequency, and the lower the pitch; conversely, the shorter the vibration length, the higher the vibration frequency, and the higher the pitch. The "vibration length" is adjusted using frets. The long, thin part of the guitar is called the "fretboard," which is divided into several sections, each called a fret. Pressing down a fret on a string allows that string to vibrate for the length of the string following that fret. Therefore, the higher the fret, the shorter the vibration length of that string, and the higher the pitch. If a string is not pressed down on any fret, it is called an "open string," and its pitch is the lowest.

[0066] On the guitar fretboard, the first twelve frets are outside the guitar body for easy playing. Including the open strings, each string can form thirteen frets, producing thirteen pitches. When playing the guitar, the player presses down on the frets with their left hand and plucks the corresponding string with their right hand. The string produces a specific pitch depending on the fret being pressed. Therefore, when a string and the frets pressed on it are determined, the pitch produced is also determined. The guitar's structural design dictates that each string and fret combination has a fixed vibration frequency, and the pitch produced corresponds to a specific standard note.

[0067] In actual playing, a guitar has six strings, and multiple strings can be plucked at the same time. Based on this, a guitar allows multiple pitches to be produced at the same time. There can be more than one pitch, but no more than six, that is, N is 6. Therefore, when taking a guitar as an example, the frequencies can be sorted from largest to smallest according to their corresponding amplitude to generate an amplitude sorting result. Then, the top 6 frequencies in the amplitude sorting result are used as the frequencies to be converted for the accented segments.

[0068] In a specific implementation, to further avoid noise interference, step S203 of this embodiment may include: The frequencies of the top N frequencies in the amplitude sorting results are taken as the frequencies to be detected. The frequency detection threshold is determined based on the frequency ranked first in the amplitude sorting results and the detection coefficient. The frequency to be detected whose amplitude is greater than or equal to the frequency detection threshold is taken as the frequency to be converted for the accent segment.

[0069] It should be noted that in some cases, although the amplitude is ranked high, its amplitude may be relatively small. In this case, the frequency corresponding to the amplitude may actually correspond to noise. Based on this, the frequency ranked first can be used for further filtering. Therefore, the top N frequencies in the amplitude ranking result can be used as the frequencies to be detected. Then, the frequency ranked first in the amplitude ranking result is multiplied by the detection coefficient to generate the frequency detection threshold. After that, the frequencies whose amplitude is greater than or equal to the frequency detection threshold are used as the frequencies to be converted for the accented segments.

[0070] The detection coefficient can be set in the range of (0.5, 1.0). The specific value can be preset by the administrator of the vehicle ambient lighting control device, for example, setting the detection coefficient to 0.7.

[0071] It is understandable that if the corresponding amplitude is less than the frequency detection threshold, it means that although the frequency to be detected ranks relatively high in the amplitude sorting results, its actual amplitude value is actually small, and it essentially corresponds to noise. Therefore, it can be excluded, and only the frequencies to be detected with an amplitude greater than or equal to the frequency detection threshold are taken as the frequencies to be converted for the accent segment.

[0072] For example: Suppose N=6, the amplitudes corresponding to the top 6 frequencies are 300, 280, 260, 100, 50, and 20, and the detection coefficient is 0.7. Then the frequency detection threshold is 300. 0.7 = 210, so at this point, only the first three frequencies can be used as the frequencies to be converted.

[0073] This embodiment provides a method for controlling in-vehicle ambient lighting. This application selects a suitable frequency as the frequency to be converted by combining the maximum number of pitches that the instrument to be simulated can emit at the same time and the amplitude. While ensuring compliance with the principles of instrument playing, it minimizes the number of frequencies that need to be analyzed and converted in the future.

[0074] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 Step S40 includes steps S401 to S404: Step S401: Construct at least one string fret array based on the pitch symbol corresponding to the accented segment.

[0075] It should be noted that the number of array elements in the string fret array is the same as the number of strings in the instrument to be simulated, and the array elements in the string fret array represent the frets when the sound is produced.

[0076] In practical use, the string and fret array can be constructed by determining the pitch symbol corresponding to the accented segment and the string and fret array needed to produce the same sound as the accented segment when the instrument is played.

[0077] For example, taking a guitar as an example, if the pitch symbol corresponding to the accented segment is F2, and to produce the same sound as that accented segment, the 6th string and 1st fret are needed. In this case, the string fret array can be [1, x, x, x, x, x]. The first element of the string fret array represents the 6th string of the guitar, and so on. The last element represents the 1st string of the guitar, and the array element x represents the initial state, and 1 represents the 1st fret.

[0078] Step S402: Determine the fret difference value corresponding to each fret array based on the maximum and minimum fret values ​​of each string fret array.

[0079] It should be noted that the maximum value of a fret in the fret array can be the maximum value among the array elements, the minimum value of a fret is the minimum value among the array elements, and the difference value of a fret can be the absolute value of the difference between the maximum value and the minimum value of a fret.

[0080] For example, for a string fret array [1, 5, 2, x, x, x], where x is in its initial state and is not included in the size calculation, the maximum value of the fret is 5 and the minimum value of the fret is 1. Therefore, the difference in frets of this string fret array is 4.

[0081] Step S403: The instrument playing mode corresponding to the string array with the smallest fret difference value is taken as the instrument playing mode corresponding to the accented segment.

[0082] In practical use, when playing an instrument, the smaller the difference in fret value at any given moment, the simpler and more natural the player's operation will be. At the same time, the playing rhythm will be more stable and the transitions will be smoother. The instrument playing method corresponding to the string fret array with the smallest difference in fret value is most likely to be consistent with the actual playing method. Therefore, the instrument playing method corresponding to the string fret array with the smallest difference in fret value can be used as the instrument playing method corresponding to the accented passage.

[0083] Step S404: Combine the instrument playing methods corresponding to each accented segment to generate an instrument playing score, and convert the instrument playing score into a light sequence control file.

[0084] In practical use, the instrument playing methods corresponding to each accented segment can be combined in chronological order to generate an instrument performance score.

[0085] In a specific implementation, in order to generate the string fret array as reasonably as possible, step S401 in this embodiment may include: Obtain the string fret combination for each pitch symbol corresponding to the accented segment, where one pitch symbol corresponds to at least one string fret combination; Arrange and combine the string frets of each pitch symbol to determine at least one string fret combination sequence; Construct at least one string array based on the string combination sequence.

[0086] It should be noted that when a musical instrument is played, the same pitch symbol will correspond to at least one string fret combination. That is, different string fret combinations may produce the same pitch. For example, taking the guitar as an example, for the pitch G3 (accent Sol), the corresponding string fret combinations may be 3rd string 0th fret, 4th string 5th fret, and 5th string 10th fret.

[0087] In practical use, you can first look up the pitch-fret combination mapping table to determine the fret combination of each pitch symbol. Then, arrange and combine the fret combinations of each pitch symbol to determine at least one fret combination sequence. Finally, construct at least one fret array based on the fret combination sequence constructed by the combination.

[0088] For example, taking a guitar as an example, suppose the pitch symbols corresponding to the accented notes are F2, D3, and E3. The string fret combination corresponding to F2 is only the 1st fret of the 6th string, the string fret combination corresponding to D3 is the 0th fret of the 4th string, the 5th fret of the 5th string, and the 10th fret of the 6th string, and the string fret combination corresponding to E3 is the 2nd fret of the 4th string and the 7th fret of the 5th string. Theoretically, there are 1 possible combinations. 3 There are 2 types, which can construct 6 string fret combination sequences. However, when multiple frets on a guitar string are pressed at the same time, only the higher fret will be sounded. Therefore, a string at the same time cannot correspond to multiple frets, nor can it produce different pitches. At this time, conflicting parts need to be eliminated. In fact, there are only two string fret combination sequences that are retained: "6th string 1st fret - 5th string 7th fret - 4th string 0th fret" and "6th string 1st fret - 5th string 5th fret - 4th string 2nd fret". The constructed string fret arrays are [1, 7, 0, x, x, x] and [1, 5, 2, x, x, x].

[0089] In practical applications, combining and then excluding elements as described above can lead to overly complex overall logic. Therefore, the string array can be constructed using a traversal approach, for example: Taking a guitar as an example, suppose the pitch symbols corresponding to the accented notes are arranged from low to high frequency as F2, D3, E3. When traversing them, the first extracted pitch symbol is F2, which can only be selected on the 1st fret of the 6th string. The array is then updated to [1, x, x, x, x, x]. The second extracted pitch is D3, which generates two possible string fret combinations: 4th string 0th fret, 5th string 5th fret, and 6th string 10th fret. Since the 6th string is already fixed at 1st fret due to F2, the 6th string 10th fret combination is excluded. The remaining two combinations are filled into the available strings in the previous array. After the string fret array is updated, there are two possible combinations: [1, x, 0, x, x, x] and [1, 5, x, x, x, x]. The third extracted pitch is E3. Possible combinations are 4th string 2nd fret and 5th string 7th fret. However, the 4th string in the first string fret array is already fixed at 0th fret, so it can only be filled with the 5th string 7th fret. The 5th string in the second string fret array is already fixed at 5th fret, so it can only be filled with the 4th string 2nd fret. Therefore, after the string fret array is updated, it can have two possible forms: [1, 7, 0, x, x, x] and [1, 5, 2, x, x, x]. After all pitches have been processed, the difference between the highest and lowest frets in the array [1, 5, 2, x, x, x] is 4, which is smaller than the difference of 6 in the array [1, 7, 0, x, x, x]. Therefore, the instrument playing mode corresponding to the array [1, 5, 2, x, x, x] is selected as the instrument playing mode corresponding to this accented segment.

[0090] This embodiment provides a method for controlling in-vehicle ambient lighting. This embodiment constructs possible fret arrays and uses the instrument playing mode corresponding to the fret array with the smallest fret difference value as the instrument playing mode corresponding to the accented segment, so as to ensure that the determined instrument playing mode is consistent with the actual playing mode as much as possible.

[0091] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the vehicle ambient lighting control method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0092] This application also provides a vehicle ambient lighting control device; please refer to... Figure 4 The vehicle ambient lighting control device includes: Extraction module 10 is used to extract the accented segments corresponding to each accented note in the target accompaniment audio; The conversion module 20 is used to determine the frequency to be converted corresponding to the accented segment based on the amplitude of each frequency in the accented segment; The determining module 30 is used to determine the pitch symbol corresponding to the frequency to be converted; Module 40 is used to construct an instrumental score based on the pitch symbols corresponding to each accented segment, and to convert the instrumental score into a light sequence control file; The control module 50 is used to control the vehicle ambient lighting based on the light sequence control file to simulate musical instrument playing.

[0093] The vehicle ambient lighting control device provided in this application, employing the vehicle ambient lighting control method described in the above embodiments, solves the technical problems of related technologies that require advance preparation of control files, resulting in high costs and low universality when simulating musical instrument performance through ambient lighting rhythm. Compared with the prior art, the beneficial effects of the vehicle ambient lighting control device provided in this application are the same as those of the vehicle ambient lighting control method provided in the above embodiments, and other technical features in the vehicle ambient lighting control device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0094] This application provides a vehicle ambient lighting control device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the vehicle ambient lighting control method in the above embodiment 1.

[0095] The following is for reference. Figure 5 The diagram illustrates a structural schematic suitable for implementing the vehicle ambient lighting control device of the embodiments of this application. The vehicle ambient lighting control device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), vehicle terminals (e.g., vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The illustrated vehicle ambient lighting control device is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0096] like Figure 5As shown, the vehicle ambient lighting control device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the vehicle ambient lighting control device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. The communication device 1009 allows the vehicle ambient lighting control device to communicate wirelessly or wiredly with other devices to exchange data. Although the figures show vehicle ambient lighting control devices with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0097] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0098] The vehicle ambient lighting control device provided in this application, employing the vehicle ambient lighting control method described in the above embodiments, solves the technical problems of related technologies that require advance preparation of control files, resulting in high costs and low universality when simulating musical instrument performance through ambient lighting rhythm. Compared with the prior art, the beneficial effects of the vehicle ambient lighting control device provided in this application are the same as those of the vehicle ambient lighting control method provided in the above embodiments, and other technical features of this vehicle ambient lighting control device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0099] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0100] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0101] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the vehicle ambient lighting control method in the above embodiments.

[0102] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0103] The aforementioned computer-readable storage medium may be included in the vehicle ambient lighting control device; or it may exist independently and not be installed in the vehicle ambient lighting control device.

[0104] The aforementioned computer-readable storage medium carries one or more programs that, when executed by the vehicle ambient lighting control device, cause the vehicle ambient lighting control device to: extract accented segments corresponding to each accent in the target accompaniment audio; determine the frequency to be converted corresponding to the accented segment based on the amplitude of each frequency in the accented segment; determine the pitch symbol corresponding to the frequency to be converted; construct an instrumental score based on the pitch symbol corresponding to each accented segment, and convert the instrumental score into a lighting sequence control file; and control the vehicle ambient lighting based on the lighting sequence control file to simulate an instrumental performance.

[0105] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof. These programming languages ​​include object-oriented programming languages—such as Python, Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0106] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0107] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0108] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described vehicle ambient lighting control method. This solves the technical problems of related technologies that require advance preparation of control files, resulting in high costs and low universality when simulating musical instrument performance through ambient lighting rhythms. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the vehicle ambient lighting control method provided in the above embodiments, and will not be elaborated upon here.

[0109] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the vehicle ambient lighting control method described above.

[0110] The computer program product provided in this application solves the technical problems of related technologies that require advance preparation of control files, resulting in high costs and low universality when simulating musical instrument performance through ambient light rhythm. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the vehicle ambient light control method provided in the above embodiments, and will not be repeated here.

[0111] All user-related data involved in this application (such as user privacy data, user behavior data, etc.) were obtained with the user's permission or consent; that is to say, when this application is used in a specific product or technology, user permission is required to obtain and process the relevant data, and the processing of the relevant data must comply with the relevant laws, regulations and regulatory standards of the relevant countries and regions.

[0112] The above description is only a part of the embodiments of this application and does not limit the scope of protection of this application. All equivalent structural transformations made under the technical concept of this application and using the content of this application specification and drawings, or direct / indirect applications in other related technical fields, are included in the scope of protection of this application.

Claims

1. A method for controlling in-vehicle ambient lighting, characterized in that, The vehicle ambient lighting control method includes: Extract the accented note segments corresponding to each accented note in the target accompaniment audio; The frequency to be converted corresponding to the accented segment is determined based on the amplitude of each frequency in the accented segment; Determine the pitch symbol corresponding to the frequency to be converted; A musical score is constructed based on the pitch symbols corresponding to each accented segment, and the musical score is converted into a light sequence control file. The vehicle's ambient lighting is controlled based on the aforementioned lighting sequence control file to simulate musical instrument performance.

2. The vehicle ambient lighting control method as described in claim 1, characterized in that, The extraction of accented segments corresponding to each accented note in the target accompaniment audio includes: Locate the pronunciation timing of each accented note in the target accompaniment audio; The time interval between each accent is determined based on the pronunciation timing; The segment duration is constructed based on the aforementioned time interval and segment duration coefficient; The segment time corresponding to each stressed syllable is determined based on the pronunciation time and the duration of the segment. Based on the aforementioned segmented time period, the accented segments corresponding to each accented note are extracted from the target accompaniment audio.

3. The vehicle ambient lighting control method as described in claim 1, characterized in that, The step of determining the frequency to be converted corresponding to the accented segment based on the amplitude of each frequency in the accented segment includes: The accented segment is analyzed to determine the amplitude corresponding to each frequency in the accented segment; Sort the frequencies from largest to smallest according to their corresponding amplitudes to generate amplitude sorting results; The frequencies of the top N in the amplitude sorting results are taken as the frequencies to be converted for the accented segment, where N is the maximum number of pitches that the instrument to be simulated can produce at the same time.

4. The vehicle ambient lighting control method as described in claim 3, characterized in that, The step of using the top N frequencies in the amplitude sorting result as the frequencies to be converted for the accented segment includes: The frequencies of the top N frequencies in the amplitude sorting results are taken as the frequencies to be detected. The frequency detection threshold is determined based on the frequency ranked first in the amplitude sorting results and the detection coefficient. The frequency to be detected whose amplitude is greater than or equal to the frequency detection threshold is taken as the frequency to be converted for the accent segment.

5. The vehicle ambient lighting control method as described in claim 1, characterized in that, Determining the pitch symbol corresponding to the frequency to be converted includes: Obtain the standard frequencies corresponding to each pitch of the instrument to be simulated; The frequency to be converted is compared with the standard frequency corresponding to each pitch to determine the frequency difference corresponding to each pitch; The pitch symbol corresponding to the frequency to be converted is set according to the pitch with the smallest corresponding frequency difference.

6. The vehicle ambient lighting control method according to any one of claims 1-5, characterized in that, The process of constructing a musical score based on the pitch symbols corresponding to each accented segment includes: At least one fret array is constructed based on the pitch symbol corresponding to the accented segment. The number of array elements in the fret array is consistent with the number of strings of the instrument to be simulated. The array elements in the fret array represent the frets when the sound is produced. The difference value of each selected fret array is determined based on the maximum and minimum values ​​of each fret array. The instrument playing mode corresponding to the string array with the smallest corresponding fret difference value is taken as the instrument playing mode corresponding to the accented segment. The instrument playing styles corresponding to each accented segment are combined to generate an instrumental score.

7. The vehicle ambient lighting control method as described in claim 6, characterized in that, The step of constructing at least one fret array based on the pitch symbol corresponding to the accented segment includes: Obtain the string fret combination for each pitch symbol corresponding to the accented segment, where one pitch symbol corresponds to at least one string fret combination; Arrange and combine the string frets of each pitch symbol to determine at least one string fret combination sequence; Construct at least one string array based on the string combination sequence.

8. A vehicle ambient lighting control device, characterized in that, The vehicle ambient lighting control device includes: The extraction module is used to extract the accented segments corresponding to each accented note in the target accompaniment audio. The conversion module is used to determine the frequency to be converted corresponding to the accented segment based on the amplitude of each frequency in the accented segment; The determining module is used to determine the pitch symbol corresponding to the frequency to be converted; The construction module is used to construct the instrument performance score based on the pitch symbols corresponding to each accented segment, and convert the instrument performance score into a light sequence control file; The control module is used to control the vehicle's ambient lighting based on the light sequence control file to simulate musical instrument playing.

9. A vehicle ambient lighting control device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the vehicle ambient lighting control method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the vehicle ambient lighting control method as described in any one of claims 1 to 7.