Vehicle atmosphere lamp control method, vehicle, and electronic device
Patent Information
- Application Number
- CN202610846991.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-12
- Publication Date
- 2026-10-27
AI Technical Summary
[0004]本申请至少在一定程度上解决相关技术中的车辆氛围灯因硬件差异导致用户界面与底层硬件耦合严重、适配周期长、人力成本高以及颜色过渡生硬、跳变明显的技术问题
[0011]在技术方案中,构建决策树,将颜色点集组织为便于快速检索的树形索引,为高效搜索奠定结构基础;以第一颜色坐标为查询点,在决策树中采用剪枝策略进行空间搜索,通过剪枝排除大量不可能是最近邻的子树,无需遍历所有颜色点即可获取预设数量的多个邻近颜色坐标作为候选集,显著降低了匹配过程的计算复杂度和耗时,提高了颜色映射的实时性。由此,本申请在保证候选坐标集准确性的同时,实现了对大规模硬件颜色点集的高效索引与快速搜索,为后续色差评估提供了高质量的候选范围,兼顾了系统响应速度和颜色匹配精度。
Smart Images

Figure CN122994964A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of vehicle control, and more particularly to a control method for vehicle ambient lighting, a vehicle, and electronic equipment. Background Technology
[0002] With the continuous improvement of vehicle intelligence, ambient lighting has become an important feature for enhancing the driving experience and the technological feel of the interior. Currently, most vehicle ambient lighting systems support multi-color adjustable functions, allowing users to select the light color through the color selection interface of the central infotainment system.
[0003] The existing technology suffers from the following drawbacks. First, the number of colors supported and the specific color lists vary significantly between different car models and suppliers of ambient lighting hardware. This leads to severe coupling between the user interface and the underlying hardware. Whenever a new car model is introduced or a supplier is changed, colors need to be manually sorted and adjusted, and a custom mapping table needs to be delivered for development, resulting in low reusability, long adaptation cycles, and high labor costs. Second, because manual arrangement makes it difficult to precisely control the uniform transition of colors in perception, the abrupt changes between different colors are obvious, resulting in abrupt visual transitions and affecting the user experience. Summary of the Invention
[0004] This application addresses, to some extent, the technical problems in related technologies of vehicle ambient lighting, such as severe coupling between the user interface and the underlying hardware due to hardware differences, long adaptation cycles, high labor costs, and abrupt color transitions and obvious abrupt changes.
[0005] Therefore, this application aims to provide a method for controlling vehicle ambient lighting, a vehicle, and electronic equipment.
[0006] To achieve the above objectives, in a first aspect, this application provides a method for controlling vehicle ambient lighting, comprising: In response to the ambient light color selection command, the ambient light color selection command is converted into standard color space coordinates to obtain the first color coordinates; Based on the first color coordinates, the target color data is obtained by mapping and matching through a pre-built ambient light color mapping database; wherein, the ambient light color mapping database includes at least the standard color space coordinate sets and color datasets corresponding to the ambient lights of multiple car models respectively; The target color data is sent to the ambient light controller to control the ambient light to output the color corresponding to the ambient light color selection instruction.
[0007] In this technical solution, the user-triggered color selection command is converted into standard color space coordinates. Standard color space coordinates are device-independent and perceptually uniform, thus eliminating color differences between displays and ambient light head hardware in different vehicle models. Matching is performed based on these standard color space coordinates in a pre-built ambient light color mapping database. This database contains ambient light hardware configurations for different vehicle models, allowing the same user interface color wheel to adapt to different vehicle ambient light hardware configurations without modification. The matched target color data is then sent to the ambient light controller, ensuring a high degree of visual consistency between the ambient light output color and the user's selection. Therefore, this application decouples the user interface from the underlying hardware, avoiding redundant development, shortening the adaptation cycle, and reducing labor costs. Simultaneously, matching based on standard color space coordinates ensures visual smoothness of color transitions, eliminating abrupt and jarring changes, and improving the user experience.
[0008] In some embodiments of this application, obtaining target color data by mapping and matching using a pre-built ambient light color mapping database based on the first color coordinates includes: Based on the first color coordinates, a nearest neighbor search is performed through the ambient light color mapping database to obtain a set of candidate color coordinates; Based on the first color coordinate and each candidate color coordinate in the candidate color coordinate set, the color difference is calculated to obtain the visual color difference value between each candidate color coordinate and the first color coordinate. Each visual color difference value is compared with a preset perception threshold to obtain a perception comparison result, and the target color data is determined based on the perception comparison result.
[0009] In this technical solution, a set of candidate color coordinates that are close to the user's selected color in the standard color space is quickly filtered from the ambient light color mapping database through proximity search, avoiding the high computational overhead of global traversal and improving the real-time matching performance. Visual color difference evaluation is performed on the first color coordinate and each candidate color coordinate, converting the subjective perception of color difference by the human eye into a quantifiable color difference value. By comparing the color difference value with a preset perception threshold, it is possible to objectively and quantitatively determine whether each candidate color is visually close enough to the user's selected color, improving the reliability of the matching results. Therefore, this application ensures visual consistency of color mapping while also considering computational efficiency and smooth transition capabilities under hardware color gamut limitations, thus achieving universal and high-quality ambient light color control across vehicle models and hardware.
[0010] In some embodiments of this application, the step of performing a nearest neighbor search based on the first color coordinates through the ambient light color mapping database to obtain a set of candidate color coordinates includes: The current vehicle model is identified based on the vehicle model identifier, and the standard color space coordinates corresponding to the ambient light of the current vehicle model are obtained based on the ambient light color mapping database. A decision tree data structure is constructed based on the standard color space coordinate set corresponding to the ambient lighting of the current vehicle model; Using the first color coordinate as the query point, a spatial search is performed based on the decision tree using a pruning strategy to obtain a preset number of color coordinates as the candidate color coordinate set.
[0011] In this technical solution, a decision tree is constructed to organize the color point set into a tree-like index that facilitates rapid retrieval, laying a structural foundation for efficient searching. Using the first color coordinate as the query point, a pruning strategy is employed in the decision tree for spatial searching. By pruning, a large number of subtrees that are unlikely to be nearest neighbors are eliminated. This allows for the acquisition of a preset number of neighboring color coordinates as a candidate set without traversing all color points, significantly reducing the computational complexity and time consumption of the matching process and improving the real-time performance of color mapping. Therefore, this application achieves efficient indexing and rapid searching of large-scale hardware color point sets while ensuring the accuracy of the candidate coordinate set, providing a high-quality candidate range for subsequent color difference evaluation, and balancing system response speed and color matching accuracy.
[0012] In some embodiments of this application, the step of calculating the color difference based on the first color coordinate and each candidate color coordinate in the candidate color coordinate set to obtain the visual color difference value between each candidate color coordinate and the first color coordinate includes: The visual color difference value between each candidate color coordinate and the first color coordinate is obtained by weighted calculation based on the brightness difference, chroma difference and hue difference between the first color coordinate and each candidate color coordinate.
[0013] In this technical solution, by calculating the brightness difference, chroma difference, and hue difference between the first color coordinates and the candidate color coordinates respectively, and applying different weighting factors to these three components for weighted calculation, the sensitivity of the human eye to different color attributes can be simulated more accurately. Furthermore, the subjective perceptual characteristics of color differences are quantified into a unified color difference value, making the calculated visual color difference closer to the degree of color difference actually perceived by the user. Therefore, this application provides a more reliable and quantitative basis that better conforms to human visual characteristics for subsequent threshold comparison and matching decisions, thereby improving the accuracy of color mapping and user satisfaction with the output light color.
[0014] In some embodiments of this application, determining the target color data based on the perceptual comparison result includes: If there are candidate color coordinates whose visual color difference value is less than or equal to the preset perception threshold, then the color data corresponding to the candidate color coordinate with the smallest visual color difference value is determined as the target color data. If all the visual color difference values are greater than the preset perception threshold, then virtual color data is generated as the target color data.
[0015] In the technical solution, the perceptual comparison result is as follows: if there are candidate color coordinates with a color difference value less than or equal to the perceptual threshold, it means that the candidate color is visually almost indistinguishable from the user's selected color. In this case, the color data corresponding to the candidate color coordinate with the smallest color difference is selected as the target color data. This can directly utilize the existing color points in the hardware to achieve high-quality matching, ensuring that the output color is highly consistent with the user's expectations and responds quickly. If the color difference values of all candidates are greater than the threshold, it means that the existing color points in the hardware cannot visually approach the user's selected color sufficiently. In this case, the virtual color data generation process is triggered, so that even with limited physical color gamut, it can still present a color close to the user's expectations. Therefore, this application, through a dual-path decision mechanism based on threshold determination, ensures optimal matching quality within the hardware's support range and achieves smooth visual expansion when the hardware color gamut is insufficient. This effectively balances matching accuracy and color gamut coverage, further improving the robustness of color mapping and the user's viewing experience.
[0016] In some embodiments of this application, generating virtual color data as the target color data includes: Based on the set of candidate color coordinates, two candidate color coordinates that are adjacent to the first color coordinate are selected; Linear interpolation is performed based on the two candidate color coordinates to generate virtual color coordinates, and the mixing ratio corresponding to the two candidate color coordinates is obtained; The two color data corresponding to the two candidate color coordinates and the mixing ratio are used as the target color data.
[0017] In this technical solution, when the hardware cannot physically display the user-selected color, a virtual color is logically constructed between the two hardware colors through linear interpolation. The weighting relationship between the endpoint colors is preserved in the form of a mixing ratio, providing precise control parameters for subsequent time-based color mixing. Therefore, this application overcomes the limitation of the original number of physical colors in the hardware, visually expanding the range of colors that can be displayed. This allows user colors that were previously unmatched due to insufficient hardware color gamut to be approximated through the alternating overlay of endpoint colors, further smoothing color transitions and improving the user experience.
[0018] In some embodiments of this application, sending the target color data to the ambient light controller to control the ambient light to output the color corresponding to the ambient light color selection instruction includes: When the target color data includes two color data and a mixing ratio, the illumination duration corresponding to the two color data within the pulse width modulation period is determined based on the mixing ratio; according to the illumination duration and the two color data, the ambient light is alternately controlled to display the colors corresponding to the two color data, so as to visually present the colors corresponding to the virtual color coordinates.
[0019] Based on the mixing ratio, determine the illumination duration corresponding to the two color data within the pulse width modulation period; Based on the illumination duration and the two color data, the ambient light is alternately controlled to display the colors corresponding to the two color data, so as to visually present the colors corresponding to the virtual color coordinates.
[0020] In this technical solution, due to the visual inertia of the human eye, when the alternation frequency is fast enough, the observer cannot distinguish individual color flashes, but instead perceives a composite light color resulting from the proportional mixing of two colors. This composite light color is visually equivalent to the color corresponding to the virtual color coordinates. Therefore, this application, even when the hardware does not physically support a particular color, uses a time-mixing method to simulate the target virtual color using existing hardware colors. This effectively expands the color gamut that ambient lights can display, while maintaining the continuity and subtlety of color transitions, further enhancing the user's visual experience of the ambient light colors.
[0021] In some embodiments of this application, it further includes: When adding a new model, determine whether the new model has the same standard color space coordinate set and color dataset as the existing model for ambient lighting; If so, then reuse the standard color space coordinate set and color dataset corresponding to the ambient lighting of the existing vehicle model; If not, the ambient lighting configuration of the newly added vehicle model is imported through a preset template, and the standard color space coordinate set and color dataset corresponding to the newly added vehicle model are initialized and generated, and stored in the ambient lighting color mapping database.
[0022] In this technical solution, the ambient lighting color mapping database update mechanism enables the database to be dynamically updated as vehicle models expand. This supports both rapid replication for hardware reuse and efficient integration of entirely new hardware, avoiding the need for manual color mapping and user interface adaptation for each new vehicle. Therefore, this application significantly improves the reusability of the ambient lighting control solution across different vehicle models, shortens the development and adaptation cycle for new models, reduces labor costs, and simultaneously ensures the integrity and scalability of the database.
[0023] In a second aspect, this application provides a vehicle including a controller for implementing the vehicle ambient lighting control method as described in the first aspect.
[0024] In a third aspect, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the vehicle ambient lighting control method as described in the first aspect.
[0025] As can be seen from the above technical solutions, additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description
[0026] Figure 1 This is a schematic diagram of the overall flow of a vehicle ambient lighting control method according to an embodiment of this application; Figure 2 This is a schematic diagram of the target color data acquisition process according to the embodiments of this application; Figure 3 This is a schematic diagram of the candidate color coordinate set acquisition process according to the embodiments of this application; Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application.
[0027] In the above figures: 40. Bus; 41. Processor; 42. Memory; 43. Communication interface. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this application clearer, the application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments provided in this application without inventive effort are within the scope of protection of this application.
[0029] Obviously, the accompanying drawings described below are merely some examples or embodiments of this application. Those skilled in the art can apply this application to other similar scenarios based on these drawings without any inventive effort. Furthermore, it is understood that although the efforts made in this development process may be complex and lengthy, for those skilled in the art related to the content disclosed in this application, any changes to design, manufacturing, or production based on the technical content disclosed in this application are merely conventional technical means and should not be construed as insufficient disclosure of the content of this application.
[0030] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that is mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments without conflict.
[0031] Unless otherwise defined, the technical or scientific terms used in this application shall have the ordinary meaning understood by one of ordinary skill in the art to which this application pertains. The terms “a,” “an,” “an,” “the,” and similar words used in this application do not indicate quantity limitation and may indicate singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this application are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules (units) is not limited to the listed steps or units, but may also include steps or units not listed, or may include other steps or units inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” “coupled,” and similar words used in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. “Multiple” used in this application refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following objects are in an "or" relationship. The terms "first," "second," and "third" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects.
[0032] The present application will now be described in detail through exemplary embodiments. However, it should be understood that, without further description, elements, structures, and features in one embodiment may be advantageously incorporated into other embodiments. It's worth noting that with the continuous improvement of vehicle intelligence, ambient lighting has become an important feature for enhancing the driving experience and the technological feel of the interior. Currently, most vehicle ambient lighting systems support multi-color adjustment, allowing users to select the light color through the color selection interface of the central infotainment system.
[0033] The existing technology has the following significant drawbacks in its implementation: The number of colors supported and the specific color lists vary significantly between different car models and ambient lighting hardware supplied by different vendors. For example, economy cars may only support 64 colors, while high-end cars may support 128 or even 256 colors. Even if the number of colors is the same, there are inherent differences in color gamut, brightness curve, and color saturation between different vendors' lamp head modules.
[0034] This hardware difference binds the user interface to the underlying hardware, making it impossible to reuse across different car models or suppliers. Whenever a new car model is introduced or a supplier is changed, colors need to be manually sorted, adjusted, and verified. This process typically takes weeks or even months of development time, and each new car model requires repeating this process, resulting in extremely low reusability, long adaptation cycles, and high labor costs. With the accelerating pace of car model iterations and the diversification of suppliers, this problem has become increasingly prominent, severely hindering the rapid deployment and large-scale application of ambient lighting features.
[0035] Furthermore, because manual arrangement makes it difficult to precisely control the uniform transition of colors in perception, the abrupt changes between different colors are obvious, resulting in a harsh visual transition and negatively impacting the user experience. Human color perception is non-linear, and within the RGB color space, the same change in color value produces different visual differences in different color gamuts. However, current manual arrangement methods are typically based on simple linear interpolation of RGB values or empirical arrangement, failing to accurately simulate the uniformity of human perception. This results in discontinuous and uneven color changes in the ambient lighting output, creating a noticeable stepped or flickering effect, disrupting the immersive atmosphere of the car's interior lighting, and reducing user satisfaction with the ambient lighting function.
[0036] Based on this, this application proposes a control method and vehicle for ambient lighting. The method converts the user-selected color into device-independent standard color space coordinates and uses a pre-built ambient lighting color mapping database for perceptual matching to obtain the hardware color that visually most closely matches the user's selection or to generate virtual color data, which is then output to the ambient lighting controller. This decouples the user interface from hardware from different vehicle models and suppliers, avoiding repeated adaptations and manual color adjustments, shortening the development cycle, and reducing labor costs. Furthermore, the perceptually uniform color matching ensures visually smooth color transitions, eliminating abrupt and harsh changes, improving the user experience, and solving the technical problems of low color mapping table reuse, long adaptation cycles, and abrupt color transitions in existing technologies.
[0037] It should be noted that, in order to facilitate understanding of the technical solution of this application, some of the technical terms involved in this application will be briefly explained below.
[0038] The CIE Lab color space refers to a device-independent, perceptually uniform three-dimensional color space developed by the International Commission on Illumination (CIE). Here, L represents lightness, a represents the chromaticity components from green to red, and b represents the chromaticity components from blue to yellow.
[0039] Standard RGB values refer to RGB color values that conform to internationally recognized standards (such as the sRGB standard). Standard RGB has a defined color gamut, gamma curve, and reference white point, and can be converted to device-independent color spaces such as CIE XYZ or CIE Lab according to the standard algorithms specified by the International Commission on Illumination.
[0040] HSV values, which are a collective term for hue, saturation, and value, are a user-friendly way of representing color. Hue represents the basic category of a color, saturation represents the purity of a color, and value represents the lightness or darkness of a color. The HSV representation is more in line with the human eye's intuitive perception of color and is often used in color picker interface design. It can also be converted to standard RGB values using a standard formula.
[0041] In the following, embodiments of this application will be described in detail with reference to the accompanying drawings.
[0042] As attached Figures 1 to 4 As shown in the schematic embodiment of the vehicle ambient lighting control method, vehicle, and electronic device of this application, the vehicle ambient lighting control method includes the following steps S1-S3.
[0043] S1: In response to the ambient light color selection command, convert the ambient light color selection command into standard color space coordinates and obtain the first color coordinates.
[0044] Preferably, users can issue ambient lighting color selection commands via a universal color wheel displayed on the vehicle's central infotainment system touchscreen. This universal color wheel is a smooth-transitioning circular color wheel that is independent of specific vehicle hardware. The colors on the wheel are pre-designed according to human visual aesthetics and perceptual uniformity, and do not depend on the specific color gamut of the current vehicle's ambient lighting.
[0045] Users can select the desired light color by touching any position on the color wheel or dragging the slider. The central control entertainment system captures the user's touch coordinates in real time and determines the original color parameters corresponding to the touch position according to the color mapping rules of the universal color wheel, such as standard RGB (sRGB, standard RGB) values or HSV values; the original color parameters are then converted into CIE Lab color space coordinate values according to a standard conversion algorithm to obtain the first color coordinates (…). , , ).
[0046] It should be noted that the standard color space coordinates adopt the CIE Lab color space coordinates established by the International Commission on Illumination (CIE). The CIE Lab color space coordinates are a device-independent, perceptually uniform three-dimensional color space.
[0047] Specifically, the CIE Lab color space consists of three dimensions: L represents lightness or brightness, with a value range of 0 to 100, where 0 represents absolute black and 100 represents ideal diffuse white; a represents the axis from green to red, with negative values leaning towards green and positive values leaning towards red; b represents the axis from blue to yellow, with negative values leaning towards blue and positive values leaning towards yellow.
[0048] The core characteristic of the CIE Lab color space lies in its perceptual uniformity. In Lab space, the Euclidean distance between two color coordinates is proportional to the subjective perception of the difference between those two colors by the human eye. In other words, regardless of the region in the space, the same coordinate distance corresponds to a similar visual color difference.
[0049] Furthermore, taking the original color parameters as standard RGB values as an example, the standard conversion algorithm specifically includes the following sub-steps: First, gamma correction is performed on the obtained standard RGB values, which is the inverse operation of the sRGB gamma curve, to obtain linear RGB values. Standard RGB values are usually gamma-encoded to adapt to the non-linear perception of the human eye, and the purpose of inverse correction is to restore their true linear light intensity.
[0050] Secondly, using the standard transformation matrix specified by the International Commission on Illumination (CIE), the linear RGB values are converted to CIEXYZ tristimulus values. The standard transformation matrix is related to the color gamut definition and reference white point (such as D65) of standard RGB.
[0051] Using the tristimulus values of the reference white point Based on this, the CIE Lab color space coordinate values, i.e., the first color coordinates, are calculated using the CIE-specified XYZ to Lab conversion formula. .
[0052] If the original parameter is an HSV value, it should first be converted to a standard RGB value using a standard formula before performing the above steps.
[0053] Through the aforementioned standard conversion algorithm, the color selected by the user on the central control entertainment system of any vehicle model can be uniquely and accurately converted into CIE Lab color space coordinates. Because the CIE Lab space is device-independent, these coordinates are unaffected by differences in color gamut of displays from different vehicle models or differences in the optical characteristics of lamp heads from different suppliers, thus eliminating ambiguity in color description at the hardware level. Simultaneously, utilizing the perceptual uniformity of the CIE Lab space, the converted first color coordinates accurately reflect the human eye's visual perception of color, ensuring a high degree of consistency between color difference calculations in subsequent steps and the subjective experience of the human eye. Therefore, step S1 lays a unified, objective, and visually compliant data foundation for achieving universal color matching across vehicle models and suppliers, providing a crucial prerequisite for decoupling the user interface from the hardware and ensuring smooth color transitions.
[0054] S2: Based on the first color coordinates, perform mapping and matching through a pre-built ambient light color mapping database to obtain the target color data; wherein, the ambient light color mapping database includes at least the standard color space coordinate sets and color datasets corresponding to the ambient lights of multiple car models.
[0055] Preferably, the ambient light color mapping database is a pre-built hardware abstraction layer database used to centrally manage the capability parameters of the ambient light hardware installed in each vehicle model.
[0056] As shown in Tables 1-3, the ambient light color mapping database contains at least the following core data tables.
[0057] Table 1 is the vehicle information table. As shown in Table 1, it is used to record information such as the vehicle's unique identifier, vehicle name, and supplier.
[0058]
[0059] Table 1 Vehicle Information Table Table 2 is the lamp head information table. As shown in Table 2, it is used to record the unique identifier of each lamp head, the vehicle model to which it belongs, the driver chip model, and the number of colors supported by the lamp head.
[0060]
[0061] Table 2 Lamp Holder Information Table Table 3 is the color information table. As shown in Table 3, it is used to record the specific data of each color point supported by each lamp head, including the coordinates (L, a, b) of the color in the CIE Lab space, the corresponding RGB drive value (R, G, B) and the color code.
[0062]
[0063] Based on the information table above, the ambient lighting color mapping database pre-stores the mapping relationship between standard color space coordinates and color data for each vehicle model and each type of hardware that can achieve each color for each light head.
[0064] In some embodiments, the ambient light color mapping database has the following update mechanism: When adding a new model, determine whether the new model has the same standard color space coordinate set and color dataset as the existing models; If so, then reuse the standard color space coordinate set and color dataset corresponding to the ambient lighting of the existing vehicle model; If not, the ambient lighting configuration of the new vehicle model is imported through a preset template, and the standard color space coordinate set and color dataset corresponding to the new vehicle model are initialized and generated, and stored in the ambient lighting color mapping database.
[0065] Preferably, the criteria for determining whether a new model has the same ambient lighting configuration as an existing model include at least one of the following: whether the supplier and model of the lamp head module are the same; whether the model of the driver chip is the same; whether the number of colors supported by the lamp head is the same; and whether the optical parameters of the lamp head are consistent.
[0066] If all of the above conditions are met, the hardware configuration is considered to be the same; otherwise, it is considered a completely new configuration. This determination can be automatically completed by reading the configuration list or engineering parameters of the newly added vehicle model.
[0067] Furthermore, the specific method for reusing ambient lighting configurations from existing vehicle models is as follows: A copy is generated in the ambient lighting color mapping database based on the existing vehicle model configuration data, including the vehicle model information table, lamp head information table, and color information table. The unique vehicle model identifier in the copy is modified to the project code of the new vehicle model. Minor modifications are then made to the copy data according to the actual needs of the new vehicle model, such as minor hardware differences and adjustments to the number of colors. The modified data is then saved as a database record for the new vehicle model. This reuse process significantly reduces the adaptation workload for new vehicle models.
[0068] Furthermore, the specific method for importing ambient lighting configurations for new car models through preset templates includes the following steps.
[0069] Enter basic parameters such as the headlight model, driver chip model, and number of supported colors for the new vehicle model through the diagnostic or engineering mode page; The initial standard color space coordinate set and corresponding color dataset are generated based on a preset template. The preset template refers to a template that automatically generates initial color mapping data based on basic parameters such as lamp head model and color number, using a pre-built theoretical or empirical model, and is used to quickly complete the initialization of the new vehicle model database.
[0070] Optionally, after initialization, each lamp head can be subjected to actual optical calibration: under the preset RGB drive value combination, the CIE Lab coordinates of the actual output of the lamp head are measured using a spectrometer, and the measured Lab coordinates and the corresponding RGB drive values are stored in the color information table in pairs to overwrite the initial data, thereby establishing a more accurate measured mapping relationship.
[0071] After completing the above steps, the generated dataset will be stored in the ambient light color mapping database, thus completing the database initialization for the new car model.
[0072] In addition, as shown in Table 3, in order to solve the problem of color difference between lamp heads of different production batches of the same model, the color information table also includes a grade code field, such as bin_code in Table 3, and the database pre-stores the standard Lab correction value corresponding to each grade code.
[0073] Specifically, when delivering each lamp head module, the ambient lighting supplier will conduct optical tests to compare its color temperature, brightness and other parameters with standard values, and assign a unique classification code according to the range of deviation. Different classification codes represent the direction and degree of deviation of the lamp head from the standard reference.
[0074] For each segmentation code, the corresponding CIE Lab coordinate correction values, namely ΔL, Δa, and Δb, are determined in advance through calibration experiments, and the correspondence between these correction values and the segmentation codes is stored in the hardware abstraction layer database.
[0075] During vehicle production, the system reads the grade code marked on each lamp module, automatically loads the corresponding standard Lab correction value from the database, and overlays the standard Lab correction value onto the theoretical CIE Lab coordinates corresponding to that lamp in the color information table to obtain the corrected CIE Lab coordinates. Subsequent color matching and driving are based on the corrected CIE Lab coordinates.
[0076] This graded calibration mechanism effectively eliminates optical differences between different batches of lamp heads, making the final output light color visually consistent. This ensures that even if lamp head characteristics fluctuate due to supplier batch variations for the same vehicle model, automatic software correction can maintain color consistency, further enhancing the robustness and practicality of this application.
[0077] In some embodiments, such as Figure 2 As shown, step 2 specifically includes the following steps S21-S23.
[0078] S21: Based on the first color coordinates, perform a nearest neighbor search through the ambient light color mapping database to obtain a set of candidate color coordinates.
[0079] Preferably, the nearest neighbor search uses a KD-Tree data structure to spatially index the color point set of the current vehicle model in the database to accelerate the search for multiple candidate points that are closest to the first color coordinates in the CIE Lab space in Euclidean distance.
[0080] Furthermore, the candidate color coordinate set is obtained through the following steps S211-S213.
[0081] S211: Identify the current vehicle model based on the vehicle model identifier, and obtain the standard color space coordinate set corresponding to the ambient light of the current vehicle model based on the ambient light color mapping database.
[0082] Preferably, the vehicle model identifier can be a project code, such as project_code in Table 2. The unique identifier of the current vehicle model can be read through the vehicle bus or configuration information, thereby filtering out the CIE Lab coordinates of all color points belonging to the vehicle model from the vehicle model information table and the headlight information table in the database.
[0083] Furthermore, the number of color points N corresponding to each vehicle model is equal to the sum of the number of colors of all the lights of that vehicle model, which is obtained by accumulating the color_count field in Table 2. The value of N is used to determine the number of candidate points to search later.
[0084] S212: Construct a decision tree based on the standard color space coordinate set corresponding to the ambient lighting of the current vehicle model.
[0085] Preferably, the decision tree can be a statically balanced KD-Tree (K-Dimensional Tree). A KD-Tree is a data structure that partitions a set of points in a k-dimensional space, suitable for nearest neighbor search in multi-dimensional spaces. Specifically, in this embodiment, since the CIE Lab color space is three-dimensional, a three-dimensional KD-Tree is constructed.
[0086] The KD-Tree is constructed using a recursive median partitioning method, and the construction process is as follows: Using the CIE Lab coordinates of all color points of the current vehicle model as the dataset, the L, a, and b dimensions are used as the splitting dimensions in turn. In each dimension, the coordinate values are sorted in ascending order, and the median is taken as the splitting plane coordinate of the node. Points less than the median are assigned to the left subtree, and points greater than the median are assigned to the right subtree. The above process is recursively repeated until each leaf node contains a single point or the preset depth limit is reached.
[0087] Furthermore, in actual engineering deployments, KD-Tree is not dynamically built every time it is powered on or every time a color is selected, but rather a strategy of offline building and online loading is adopted.
[0088] Specifically, when a vehicle rolls off the production line or the database is updated, the system constructs a balanced KD-Tree in one go based on the CIE Lab coordinates of all color points for the current vehicle model and stores it in a non-volatile partition. When the vehicle is running, the tree structure is directly mapped into memory, eliminating the need for repeated construction and thus saving startup time.
[0089] When a vehicle receives new hardware configurations or color data via OTA (Over-The-Air) upgrades, the system verifies the database version. If a change is detected, the old tree file is automatically deleted and a rebuild is triggered to ensure the consistency of the index and data. This mechanism, combining pre-build and dynamic updates, minimizes the consumption of real-time computing resources in the vehicle's infotainment system while ensuring search efficiency.
[0090] S213: Using the first color coordinate as the query point, a spatial search is performed based on the decision tree using a pruning strategy to obtain a preset number of color coordinates as a candidate color coordinate set.
[0091] Preferably, a preset quantity Based on the total number of colors for the current car model The calculation formula is dynamically determined as follows:
[0092] in: Indicates rounding down; This is a scaling factor used to determine the basic number of candidates based on the total number of colors; The minimum number of candidates is preset. This represents the preset maximum number of candidates.
[0093] The parameters mentioned above are set to balance matching accuracy and computational efficiency. Too few candidate points may miss visually similar colors, while too many candidate points will increase the computational burden of subsequent color difference calculations. In practical applications, the parameters can be configured according to the vehicle model's hardware computing power, the total number of colors, and real-time requirements.
[0094] In one specific embodiment, take , , ,but:
[0095] For example, when the total number of colors for a certain car model hour, Round down to 3. Take again ,Right now ; when hour, Round down to 12. Take again ; when hour, Round down to 25. Take again .
[0096] The values above are for illustrative purposes only and can be adjusted according to actual needs. , , The value of .
[0097] Furthermore, the pruning strategy employs depth-first traversal and maintains a max-heap of size k, with the top of the heap storing the squared Euclidean distance to the k-th nearest neighbor. The specific search process is as follows: When the search begins, Initialize to infinity. Let the split dimension of the current node be... The dimension can be any one of the three coordinate axes L, a, and b. For example, when constructing a KD-Tree, each layer takes turns selecting L, a, and b as the splitting dimension.
[0098] The coordinates of the dividing plane are That is, the coordinates of the current node in this dimension; the coordinates of the query point in this dimension are... .
[0099] Calculate the difference Difference This is used to measure the relative position of the query point and the current node's splitting plane along the splitting dimension. If A negative value indicates that the coordinates are less than the dividing plane. A positive value indicates that the coordinates are greater than the dividing plane.
[0100] Prioritize searching child nodes that are on the same side as the query point, i.e., when... If the left subtree is searched first, then the right subtree is searched first, because the right subtree is more likely to contain the nearest point.
[0101] During backtracking, only when Only when the condition is met should the other child node be recursively searched; otherwise, the subtree should be pruned directly.
[0102] During the search, whenever a leaf node is visited, the squared Euclidean distance between the node's color coordinates and the query point is calculated. If this value is less than the current heap top value *r*, the color coordinates of the current node and its squared distance are added to the max-heap, the top element is removed, and *r* is updated to the new squared distance value of the heap top. This process is repeated until all nodes that need to be traversed have been processed. After the search is complete, the max-heap stores exactly the k color coordinates with the smallest global distance, which is the desired set of candidate color coordinates, arranged in descending heap order of distance. However, no further sorting is needed before it can be directly used for subsequent color difference calculations.
[0103] By employing pruning strategies and leveraging the relatively uniform distribution of ambient light color coordinates within the CIE Lab space, automotive-grade real-time performance requirements can be met. After the search is complete, the max heap stores... The color point is the one whose Euclidean distance to the first color coordinate in CIE Lab space is the closest. The candidate color coordinates are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ...
[0104] S22: Calculate the color difference between each candidate color coordinate and the first color coordinate based on the first color coordinate and each candidate color coordinate in the candidate color coordinate set, and obtain the visual color difference value between each candidate color coordinate and the first color coordinate.
[0105] In some embodiments, a weighted calculation is performed based on the brightness difference, chroma difference, and hue difference between the first color coordinate and each candidate color coordinate to obtain the visual color difference value between each candidate color coordinate and the first color coordinate.
[0106] Preferably, the CIEDE2000 color difference formula is used as the mapping evaluation standard. The CIEDE2000 color difference formula is a color difference evaluation formula published by the International Commission on Illumination (CIE). Based on the CIE Lab color space, the CIEDE2000 color difference formula significantly improves consistency with human visual perception by introducing weighting functions for luminance, chroma, and hue, as well as rotation correction terms. Compared to earlier color difference formulas, the CIEDE2000 color difference formula can more accurately predict the subjective judgment of color differences by the human eye in medium and high chroma areas, especially at the boundary between blue and yellow.
[0107] Specifically, for the first color coordinate and a candidate color coordinate The CIEDE2000 color difference formula first calculates the difference in brightness, chroma, and hue between the two colors in the CIE Lab space, and then applies non-linear weighting and rotation correction to these differences. (Visual color difference value) The mathematical expression for can be summarized as follows:
[0108] in: , , These represent the brightness difference, chroma difference, and hue difference between the first color coordinates and the candidate color coordinates, respectively, all of which have undergone correction processing related to the reference color. , , A weighting function related to color location, used to simulate the changes in human eye sensitivity in different color regions; , , This is a scene-adaptive correction factor that can be adjusted according to factors such as lighting conditions and viewing angle. Under standard viewing conditions, it is set to 1. This is a rotation correction term, primarily applied to the blue-yellow region, used to correct the non-linear deviation in human eye color perception in this area.
[0109] The color difference calculated using the above color difference formula The smaller the value, the smaller the visual difference between the user's selected color and the hardware's candidate colors in the human eye. It quantifies the perceptual deviation between the user's desired light color and the actual color that the ambient light hardware can display. The closer the value is to 0, the more difficult it is to distinguish between the two visually, and the higher the accuracy of color reproduction.
[0110] Furthermore, in specific engineering implementations, to avoid the real-time burden of floating-point operations, the CIEDE2000 color difference formula can be simplified using lookup tables or approximate polynomials, while essentially maintaining the aforementioned weighted correction structure. Using the CIEDE2000 color difference formula for perceptual consistency evaluation makes the color mapping results of this application closer to human subjective perception, providing a reliable quantitative basis for subsequent quality control and color gamut expansion.
[0111] S23: Compare each visual color difference value with a preset perception threshold to obtain a perception comparison result, and determine the target color data based on the perception comparison result.
[0112] In some embodiments, determining the target color data based on the perceptual comparison result specifically includes the following two scenarios: If there are candidate color coordinates with a visual color difference value less than or equal to a preset perception threshold, then the color data corresponding to the candidate color coordinate with the smallest visual color difference value is determined as the target color data.
[0113] If all visual color difference values are greater than the preset perception threshold, then virtual color data is generated as the target color data.
[0114] Preferably, the preset sensing threshold is set to This value is based on experience in the field of color engineering: when At that time, the human eye can hardly distinguish color differences; when At that time, only professionally trained personnel can perceive subtle differences under strictly controlled conditions. Therefore, using version 2.0 as a threshold can ensure the visual imperceptibility of color matching in most everyday use scenarios, while avoiding unnecessary computational overhead due to excessive pursuit of extremely low color difference.
[0115] Furthermore, when multiple candidate color coordinates exist with visual color difference values less than or equal to a preset perception threshold, the color data corresponding to the smallest candidate color coordinate with the smallest visual color difference value is selected as the target color data. This ensures that the final output color is the color with the smallest visual difference from the user's desired color within the hardware color gamut. This minimum color difference priority principle can stably achieve optimal visual matching under different hardware configurations.
[0116] Furthermore, when the color difference value of all candidate points is greater than the threshold, it means that no color in the current hardware color gamut is visually close enough to the color selected by the user. At this point, the color gamut expansion optimization branch is entered, and virtual color data is generated as the target color data.
[0117] In some embodiments, generating virtual color data as target color data includes: Based on the candidate color coordinate set, select two candidate color coordinates that are adjacent to the first color coordinate; Linear interpolation is performed based on two candidate color coordinates to generate virtual color coordinates, and the mixing ratio corresponding to the two candidate color coordinates is obtained. The two color data corresponding to the two candidate color coordinates and the mixing ratio are used as the target color data.
[0118] Preferably, the specific method for selecting two candidate color coordinates adjacent to the first color coordinate is as follows: Find the candidate color coordinate that has the closest Euclidean distance to the first color coordinate from the set of candidate color coordinates, and use it as the first candidate color coordinate. .
[0119] Among the remaining candidate color coordinates, find another candidate color coordinate. This makes the first color coordinate exist arrive Projection parameters on line segment satisfy ,and Is with Candidate color coordinates that are in different directions but close to each other.
[0120] If multiple candidate color coordinates satisfy the conditions, then choose the one that best meets the criteria. The candidate color coordinates closest to 0.5 are selected so that the virtual color is located in the middle region between the two endpoint colors, resulting in the most balanced color mixing effect.
[0121] If it cannot be found If there are no candidate color coordinate pairs, then we choose the two candidate color coordinates with the closest Euclidean distance, and calculate the... Cut off to The interval is set to ensure that the virtual color coordinates lie on the line segment connecting the two points.
[0122] The above selection strategy ensures that the interpolated virtual color coordinates lie between the lines connecting the two hardware candidate color coordinates, thus providing a reasonable mixing ratio for subsequent temporal color mixing and resulting in a more natural and smooth visual extension effect. In practical engineering, since the candidate color coordinate set is usually quite dense, and the first color coordinate is often located within or near the boundary of the hardware color gamut, using the two candidate color coordinates with the smallest distance can generally meet the requirements. While the value is around 0 to 1, this preferred scheme further improves the rationality and robustness of the interpolation.
[0123] Furthermore, linear interpolation is calculated as follows: Let the coordinates of the two selected candidate colors be respectively and The first color coordinate is .
[0124] calculate exist arrive Projection parameters on line segment :
[0125] in, Represents the vector dot product. This represents the Euclidean norm.
[0126] The virtual color coordinates are: .
[0127] The mixing ratio is determined by Decide, The corresponding mixing ratio is , The corresponding mixing ratio is .
[0128] The target color data is defined as the blending ratio and the color data corresponding to the two candidate color coordinates. Three parts of information. Among them, and These are the color data stored in the database for the two candidate color coordinates, i.e., the RGB driving values. The mixing ratio coefficient is between 0 and 1.
[0129] When no color exists in the hardware physical color gamut that is sufficiently close to the user's desired color, a virtual color is logically constructed between the two actual hardware colors through linear interpolation, and the weighting relationship of the endpoint colors is preserved in the form of a mixing ratio. This mixing ratio and the endpoint color data are used together as the target color data, providing precise control parameters for subsequent time-based color mixing.
[0130] Therefore, this application breaks through the limitation of the original physical number of colors in hardware, visually expands the range of colors that can be displayed, and enables user colors that could not be matched due to insufficient hardware color gamut to be approximately displayed through the alternating and overlapping of endpoint colors, thereby further smoothing the color transition and improving the user experience.
[0131] S3: Send the target color data to the ambient light controller to control the ambient light to output the color corresponding to the ambient light color selection command.
[0132] Preferably, when the target color data is a single color data, the ambient light controller directly converts the color data into the corresponding pulse width modulation duty cycle and drives the ambient light to output the light color corresponding to the color data.
[0133] In some embodiments, when the target color data contains two color data and their mixing ratio, a time-based color mixing method is used to implement drive control, as follows: Based on the mixing ratio, determine the illumination duration corresponding to the two color data within the pulse width modulation period; Based on the illumination duration and two color data, the ambient light is alternately controlled to display the colors corresponding to the two color data, so as to visually present the colors corresponding to the virtual color coordinates.
[0134] Preferably, the ambient light controller uses a pulse width modulation period higher than the critical frequency of the human eye. The lighting duration of the two endpoint colors is allocated according to the mixing ratio: The corresponding color illumination duration is , The corresponding color illumination duration is .For example, Instant Seconds correspond to frequencies of 200Hz to 1000Hz.
[0135] The controller alternately drives the lamp heads to display these two colors. Taking advantage of the visual inertia of the human eye, the mixed light color perceived by the observer is equivalent to the virtual color. The corresponding color. In this way, even if virtual colors cannot be directly displayed in physical hardware, a smooth color gamut expansion can be achieved visually, thereby further improving the continuity of color mapping and user experience.
[0136] This application addresses core issues in existing technologies, such as strong coupling between user interface and hardware, low cross-vehicle reuse rate, and abrupt color transitions. Compared to manually arranging mapping tables, this application significantly shortens the adaptation cycle for new vehicle models and substantially reduces labor costs. Simultaneously, the perceptual consistency assessment based on the CIEDE2000 color difference formula effectively improves the visual smoothness of color transitions, eliminating abrupt and harsh transitions. Furthermore, the time-based color mixing method visually expands the equivalent color range that the hardware can display, enabling colors that were previously impossible to display directly due to insufficient hardware color gamut to achieve smooth approximation. Therefore, this application not only enhances the user's visual experience but also achieves significant cost reduction and efficiency improvement for vehicle manufacturers, possessing high industrial practical value.
[0137] This application provides a vehicle, including a controller, which is used to implement the vehicle ambient lighting control method described above.
[0138] Combination Figure 4 As shown, this embodiment discloses a specific implementation of a computer device. The computer device may include a processor 41 and a memory 42 storing computer program instructions.
[0139] Specifically, the processor 41 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0140] The memory 42 may include a large-capacity storage device for data or instructions. For example, and not limitingly, the memory 42 may include a hard disk drive (HDD), a floppy disk drive, a solid-state drive (SSD), flash memory, an optical disk drive, a magneto-optical disk drive, magnetic tape, or a Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 42 may include removable or non-removable (or fixed) media. Where appropriate, the memory 42 may be internal or external to the data processing device. In a particular embodiment, the memory 42 is non-volatile. Volatile memory. In a particular embodiment, memory 42 includes read-only memory. ROM (ROM-only memory) and RAM (Random Access Memory). Where appropriate, the ROM can be a mask-programmed ROM or a programmable ROM. Only Memory (PROM) and Erasable Programmable Read-Only Memory (EPRROM) The RAM can be a type of RAM, such as EPROM (Electrically Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), EAROM (Electrically Alterable Read-Only Memory), or FLASH (Flash Memory), or a combination of two or more of these. Where appropriate, the RAM can be a Static Random Access Memory (SRAM). Access Memory (SRAM) or Dynamic Random Access Memory (DRAM) can be Fast Page Mode Dynamic Random Access Memory (FPMDRAM), Extended Data Out Dynamic Random Access Memory (EDODRAM), Synchronous Dynamic Random-Access Memory (SDRAM), etc.
[0141] The memory 42 can be used to store or cache various data files that need to be processed and / or used for communication, as well as possible computer program instructions executed by the processor 41.
[0142] The processor 41 reads and executes computer program instructions stored in the memory 42 to implement the vehicle ambient lighting control method in the above embodiment.
[0143] In some embodiments, the computer device may further include a communication interface 43 and a bus 40. For example, Figure 4As shown, the processor 41, memory 42, and communication interface 43 are connected through bus 40 and complete communication with each other.
[0144] Communication interface 43 is used to enable communication between modules, devices, units and / or equipment in the embodiments of this application.
[0145] Communication port 43 can also enable data communication with other components such as external devices, image / data acquisition devices, databases, external storage, and image / data processing workstations.
[0146] Bus 40 includes hardware, software, or both, that couples components of a computer device together. Bus 40 includes, but is not limited to, at least one of the following: a data bus, an address bus, a control bus, an expansion bus, and a local bus. For example, and not as a limitation, bus 40 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, and a PCI bus. Express (PCI X) bus, Serial Advanced Technology Accessory (Seria l Advanced) The bus may be a Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, bus 40 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.
[0147] Furthermore, in conjunction with the vehicle ambient lighting control method in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the vehicle ambient lighting control methods in the above embodiments.
[0148] The present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-described method for controlling vehicle ambient lighting.
[0149] The present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method for controlling vehicle ambient lighting.
[0150] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
[0151] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A method for controlling vehicle ambient lighting, characterized in that, It includes: In response to the ambient light color selection command, the ambient light color selection command is converted into standard color space coordinates to obtain the first color coordinates; Based on the first color coordinates, the target color data is obtained by mapping and matching through a pre-built ambient light color mapping database; wherein, the ambient light color mapping database includes at least the standard color space coordinate sets and color datasets corresponding to the ambient lights of multiple car models respectively; The target color data is sent to the ambient light controller to control the ambient light to output the color corresponding to the ambient light color selection instruction.
2. The vehicle ambient lighting control method according to claim 1, characterized in that, The step of obtaining target color data by mapping and matching using a pre-built ambient light color mapping database based on the first color coordinates includes: Based on the first color coordinates, a nearest neighbor search is performed through the ambient light color mapping database to obtain a set of candidate color coordinates; Based on the first color coordinate and each candidate color coordinate in the candidate color coordinate set, the color difference is calculated to obtain the visual color difference value between each candidate color coordinate and the first color coordinate. Each visual color difference value is compared with a preset perception threshold to obtain a perception comparison result, and the target color data is determined based on the perception comparison result.
3. The vehicle ambient lighting control method according to claim 2, characterized in that, The step of performing a nearest neighbor search based on the first color coordinates and using the ambient light color mapping database to obtain a set of candidate color coordinates includes: The current vehicle model is identified based on the vehicle model identifier, and the standard color space coordinate set corresponding to the ambient light of the current vehicle model is obtained based on the ambient light color mapping database. A decision tree is constructed based on the standard color space coordinate set corresponding to the ambient lighting of the current vehicle model; Using the first color coordinate as the query point, a spatial search is performed based on the decision tree using a pruning strategy to obtain a preset number of color coordinates as the candidate color coordinate set.
4. The vehicle ambient lighting control method according to claim 2, characterized in that, The step of calculating the color difference based on the first color coordinate and each candidate color coordinate in the candidate color coordinate set to obtain the visual color difference value between each candidate color coordinate and the first color coordinate includes: The visual color difference value between each candidate color coordinate and the first color coordinate is obtained by weighted calculation based on the brightness difference, chroma difference and hue difference between the first color coordinate and each candidate color coordinate.
5. The vehicle ambient lighting control method according to claim 2, characterized in that, Determining the target color data based on the perceptual comparison result includes: If there are candidate color coordinates whose visual color difference value is less than or equal to the preset perception threshold, then the color data corresponding to the candidate color coordinate with the smallest visual color difference value is determined as the target color data. If all the visual color difference values are greater than the preset perception threshold, then virtual color data is generated as the target color data.
6. The vehicle ambient lighting control method according to claim 5, characterized in that, The generation of virtual color data as the target color data includes: Based on the candidate color coordinate set, two candidate color coordinates adjacent to the first color coordinate are selected; Linear interpolation is performed based on the two candidate color coordinates to generate virtual color coordinates, and the mixing ratio corresponding to the two candidate color coordinates is obtained; The two color data corresponding to the two candidate color coordinates and the mixing ratio are used as the target color data.
7. The vehicle ambient lighting control method according to claim 6, characterized in that, The step of sending the target color data to the ambient light controller to control the ambient light to output the color corresponding to the ambient light color selection instruction includes: When the target color data includes two color data and a mixing ratio, the illumination duration corresponding to the two color data within the pulse width modulation period is determined based on the mixing ratio; according to the illumination duration and the two color data, the ambient light is alternately controlled to display the colors corresponding to the two color data, so as to visually present the colors corresponding to the virtual color coordinates.
8. The method for controlling vehicle ambient lighting according to claim 1, characterized in that, Also includes: When adding a new model, determine whether the new model has the same standard color space coordinate set and color dataset as the existing model for ambient lighting; If so, then reuse the standard color space coordinate set and color dataset corresponding to the ambient lighting of the existing vehicle model; If not, the ambient lighting configuration of the newly added vehicle model is imported through a preset template, and the standard color space coordinate set and color dataset corresponding to the newly added vehicle model are initialized and generated, and stored in the ambient lighting color mapping database.
9. A vehicle, characterized in that, Includes a controller for implementing the vehicle ambient lighting control method as described in any one of claims 1 to 8.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the vehicle ambient lighting control method as described in any one of claims 1 to 8.