Atmosphere lamp control method, device, equipment and storage medium

By parsing the user-specified ambient light color sequence, transition color data is generated to control the operation of the vehicle's ambient lights, solving the problem of awkward user-defined color combinations and improving the display effect and control freedom of the ambient lights.

CN116476732BActive Publication Date: 2026-06-19DONGFENG MOTOR CO LTD DONGFENG NISSAN PASSENGER VEHICLE CO

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DONGFENG MOTOR CO LTD DONGFENG NISSAN PASSENGER VEHICLE CO
Filing Date
2023-04-28
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

In existing technologies, user-defined color combinations for vehicle ambient lighting can easily result in harsh display effects, limited user control, and a poor user experience.

Method used

By extracting adjacent color combinations from the user-specified ambient light color sequence, parsing the color data, generating transition color data, and controlling the ambient light operation based on the transition color data, the color transition is ensured to be smooth.

Benefits of technology

It achieves a smooth transition of user-defined ambient light colors, increases the user's freedom of control over the vehicle's ambient lighting, and enhances the display effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116476732B_ABST
    Figure CN116476732B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of vehicle control technology and discloses an ambient lighting control method, device, equipment, and storage medium. This application extracts adjacent color combinations from a user-specified ambient lighting color sequence, which includes multiple different ambient lighting colors; it analyzes the adjacent color combinations to obtain first color data and second color data; it compares the first color data and second color data to generate transition color data corresponding to the adjacent color combinations; and it controls the vehicle's ambient lighting operation based on the transition color data and the ambient lighting color sequence. Because it generates corresponding transition color data for adjacent color combinations in the user-specified ambient lighting color sequence, it ensures that there are no abrupt color combinations when the ambient lighting is controlled by the user-specified ambient lighting color, achieving a better ambient lighting display effect. This allows users to set the ambient lighting color according to their actual needs, increasing the user's freedom of control over the vehicle's ambient lighting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle control technology, and in particular to an ambient lighting control method, device, equipment, and storage medium. Background Technology

[0002] Nowadays, the installation rate of ambient lighting in vehicles has increased significantly, and the adoption rate of dynamic ambient lighting is also increasing. However, in terms of the selection of ambient lighting effects, since users can set the ambient lighting colors themselves, the combination of various colors set by users may be awkward, resulting in poor actual display effect of the vehicle ambient lighting. Currently, the OEMs set the colors for users to choose from from a limited number of pre-configured options. Users cannot control the color changes of the vehicle ambient lighting, resulting in low user freedom and a poor actual user experience.

[0003] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main objective of this invention is to provide an ambient lighting control method, device, equipment, and storage medium, aiming to solve the technical problems of low user freedom in controlling vehicle ambient lighting and poor actual user experience in the prior art.

[0005] To achieve the above objectives, the present invention provides an ambient lighting control method, the method comprising the following steps:

[0006] Extract adjacent color combinations from the user-specified ambient light color sequence, which includes multiple different ambient light colors;

[0007] The adjacent color combinations are analyzed to obtain first color data and second color data;

[0008] The first color data and the second color data are compared to generate the transition color data corresponding to the adjacent color combinations;

[0009] The vehicle ambient lighting is controlled based on the transition color data and the ambient light color sequence.

[0010] Optionally, the step of comparing the first color data and the second color data to generate transition color data corresponding to the adjacent color combinations includes:

[0011] Sort the color values ​​corresponding to each color channel in the first color data from largest to smallest to obtain the first color value sequence;

[0012] Sort the color values ​​corresponding to each color channel in the second color data from largest to smallest to obtain the second color value sequence;

[0013] The first color value sequence and the second color value sequence are compared by color channel, and the transition color data corresponding to the adjacent color combination is generated based on the color channel comparison result.

[0014] Optionally, the first color value sequence includes a first maximum color value, a first intermediate color value, and a first minimum color value, and the second color value sequence includes a second maximum color value, a second intermediate color value, and a second minimum color value;

[0015] The step of performing color channel alignment between the first color value sequence and the second color value sequence, and generating transition color data corresponding to the adjacent color combinations based on the color channel alignment results, includes:

[0016] Detect whether the first maximum color value and the second maximum color value correspond to the same color channel;

[0017] If the first maximum color value and the second maximum color value correspond to the same color channel, then it is detected whether the first intermediate color value and the second intermediate color value correspond to the same color channel.

[0018] If the first intermediate color value and the second intermediate color value correspond to the same color channel, then obtain the absolute value of the difference between the first intermediate color value and the second intermediate color value;

[0019] If the absolute value of the difference is greater than the first color threshold, then transition color data with a transition color quantity of one is generated based on the first color value sequence and the second color value sequence.

[0020] Optionally, after the step of detecting whether the first intermediate color value and the second intermediate color value correspond to the same color channel if the first maximum color value and the second maximum color value correspond to the same color channel, the method further includes:

[0021] If the first intermediate color value and the second intermediate color value do not correspond to the same color channel, then obtain the sum of the first intermediate color value and the second intermediate color value;

[0022] If the sum of the first intermediate color value and the second intermediate color value is greater than the first color threshold, then transition color data with a transition color quantity of one is generated based on the first color value sequence and the second color value sequence.

[0023] Optionally, after the step of detecting whether the first maximum color value and the second maximum color value correspond to the same color channel, the method further includes:

[0024] If the first maximum color value and the second maximum color value do not correspond to the same color channel, then it is detected whether the first intermediate color value and the second intermediate color value are both greater than or equal to the second color threshold.

[0025] If the first intermediate color value is less than the second color threshold or the second intermediate color value is less than the second color threshold, then a second-level color channel comparison is performed based on the first intermediate color value, the second intermediate color value, the first minimum color value, and the second minimum color value.

[0026] Based on the comparison results of the second-level color channel comparison, and combined with the first color value sequence and the second color value sequence, three transition color data are generated.

[0027] Optionally, the step of controlling the operation of the vehicle ambient lights based on the transition color data and the ambient light color sequence includes:

[0028] The vehicle ambient lights are divided according to the ambient light color sequence, and the ambient light area corresponding to each ambient light color in the ambient light color sequence is determined.

[0029] Select a transition area within the ambient light area corresponding to each ambient light color;

[0030] The ambient lighting in the vehicle's ambient lighting area is controlled according to the ambient lighting color, and the ambient lighting in the vehicle's ambient lighting area is controlled according to the transition color data.

[0031] Optionally, the step of selecting a transition area in the ambient light area corresponding to each ambient light color includes:

[0032] The number of transition colors is determined based on the transition color data;

[0033] Based on the number of transition colors, select a transition area in the ambient light area corresponding to each ambient light color.

[0034] Furthermore, to achieve the above objectives, the present invention also proposes an ambient lighting control device, which may include the following modules:

[0035] The color receiving module is used to extract adjacent color combinations from the ambient light color sequence specified by the user, wherein the ambient light color sequence includes a variety of different ambient light colors;

[0036] The data parsing module is used to parse the adjacent color combinations to obtain first color data and second color data;

[0037] The color comparison module is used to compare the first color data and the second color data to generate transition color data corresponding to the adjacent color combination.

[0038] The lighting control module is used to control the operation of the vehicle's ambient lights based on the transition color data and the ambient light color sequence.

[0039] In addition, to achieve the above objectives, the present invention also proposes an ambient lighting control device, which may include: a processor, a memory, and an ambient lighting control program stored in the memory and executable on the processor. When the ambient lighting control program is executed by the processor, it implements the steps of the ambient lighting control method as described above.

[0040] Furthermore, to achieve the above objectives, the present invention also proposes a computer-readable storage medium storing an ambient light control program, wherein the ambient light control program, when executed, implements the steps of the ambient light control method described above.

[0041] This invention extracts adjacent color combinations from a user-specified ambient light color sequence, which includes various ambient light colors. It analyzes these adjacent color combinations to obtain first color data and second color data. The first and second color data are compared to generate transition color data corresponding to the adjacent color combinations. The system then controls the vehicle's ambient light operation based on the transition color data and the ambient light color sequence. Because it generates corresponding transition color data for adjacent color combinations in the user-specified ambient light color sequence, it ensures that there are no abrupt color combinations when the ambient light is controlled by the user's specified ambient light color, achieving a better ambient light display effect. This allows users to set the ambient light color according to their actual needs, increasing their freedom of control over the vehicle's ambient light. Attached Figure Description

[0042] Figure 1 This is a schematic diagram of the structure of an electronic device in the hardware operating environment involved in the embodiments of the present invention;

[0043] Figure 2 This is a flowchart illustrating the first embodiment of the ambient lighting control method of the present invention;

[0044] Figure 3 This is a schematic diagram of an ambient light display control according to an embodiment of the present invention;

[0045] Figure 4 This is a flowchart illustrating the second embodiment of the ambient lighting control method of the present invention;

[0046] Figure 5 This is a flowchart illustrating the third embodiment of the ambient lighting control method of the present invention;

[0047] Figure 6 This is a schematic diagram of the execution flow of a transition color data generation algorithm according to an embodiment of the present invention;

[0048] Figure 7 This is a structural block diagram of the first embodiment of the ambient lighting control device of the present invention.

[0049] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0050] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0051] Reference Figure 1 , Figure 1 This is a schematic diagram of the ambient lighting control device structure in the hardware operating environment involved in the embodiments of the present invention.

[0052] like Figure 1 As shown, the electronic device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk drive. The memory 1005 may also optionally be a storage device independent of the aforementioned processor 1001.

[0053] Those skilled in the art will understand that Figure 1 The structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0054] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and an ambient light control program.

[0055] exist Figure 1In the electronic device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the electronic device of the present invention can be set in the ambient light control device. The electronic device calls the ambient light control program stored in the memory 1005 through the processor 1001 and executes the ambient light control method provided in the embodiment of the present invention.

[0056] This invention provides an ambient light control method, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of an ambient lighting control method according to the present invention.

[0057] In this embodiment, the ambient light control method includes the following steps:

[0058] Step S10: Extract adjacent color combinations from the ambient light color sequence specified by the user.

[0059] It should be noted that the executing entity in this embodiment can be the ambient lighting control device or the vehicle itself. The ambient lighting control device can be a controller in the vehicle, such as an ECU controller or other controllers with similar functions. This embodiment does not limit this. In this embodiment and the following embodiments, the ambient lighting control device is used as an example to illustrate the ambient lighting control method of the present invention.

[0060] It should be noted that the ambient light color sequence can be the colors that the vehicle ambient lights need to display as set by the user. The ambient light color sequence can include a variety of different ambient light colors, and the ambient light colors have a specific order. In particular, the ambient light color sequence is allowed to have repeated colors depending on the order. For example, the ambient light color sequence can be "red-yellow-green-red".

[0061] In practical use, adjacent color combinations can be combinations of two different colors that are sequentially adjacent in the ambient light color sequence. For example, if the ambient light color sequence is "red-yellow-green", then there are two adjacent color combinations: "red-yellow" and "yellow-green".

[0062] In practice, since users often find it difficult to clearly describe the specific quantitative values ​​of colors, the administrators of the ambient lighting control device can pre-set multiple colors (64 or 256 colors) and allow users to select the multiple colors they need from among them. At this time, the ambient lighting control device will construct an ambient lighting color sequence based on the multiple colors selected by the user and the order in which the colors are selected.

[0063] Step S20: Analyze the adjacent color combinations to obtain the first color data and the second color data.

[0064] It should be noted that the first color data and the second color data can be RGB color data representing color quantization values ​​or other similar data.

[0065] In practical implementation, the administrator of the ambient lighting control device can pre-create a color identifier data mapping table, which stores the color data corresponding to each color identifier. When the ambient lighting control device constructs the ambient lighting color sequence based on the colors selected by the user and the order in which the colors were selected, it will construct the ambient lighting color sequence based on the color identifier corresponding to the colors selected by the user and the order in which the colors were selected. At this time, the adjacent color combinations are parsed to obtain the first color data and the second color data. This can be done by parsing the adjacent color combinations to obtain the first color identifier and the second color identifier, searching for the first color data in the color identifier data mapping table based on the first color identifier, and searching for the second color data in the color identifier data mapping table based on the second color identifier.

[0066] Step S30: Compare the first color data and the second color data to generate transition color data corresponding to the adjacent color combinations.

[0067] It should be noted that since users are not professionals, the differences between the two adjacent colors selected by the user may be significant. If the ambient light is controlled directly according to the ambient light color sequence specified by the user, the actual display effect of the vehicle ambient light may be poor due to the abrupt color transition, thus reducing the actual usability for the user. To avoid this phenomenon, the first color data and the second color data corresponding to the adjacent color combination can be compared, and the corresponding transition color data can be set for the adjacent color combination according to the comparison result.

[0068] Understandably, if the two colors in an adjacent color combination have low differences, the transition color data for this combination can be empty, meaning no transition color is set for this type of adjacent color combination. If the two colors in an adjacent color combination have some differences, but the differences are small, then setting one transition color is sufficient to achieve a smooth color transition, and the number of transition colors in the corresponding transition color data for this adjacent color combination is one. However, if the two colors in an adjacent color combination have large differences, then multiple transition colors are needed to achieve a smooth color transition, and the number of transition colors in the corresponding transition color data for this adjacent color combination can be greater than one. For example, if three transition colors are needed to achieve a smooth color transition, then the number of transition colors is three.

[0069] Step S40: Control the operation of the vehicle ambient lights according to the transition color data and the ambient light color sequence.

[0070] It should be noted that controlling the vehicle ambient lighting operation based on transition color data and ambient light color sequence can control the vehicle ambient lighting to display multiple different ambient light colors, and display transition colors between multiple different ambient light colors based on transition color data, thereby ensuring that the vehicle ambient lighting can display multiple colors according to the user's settings, and the display of various colors will not be too abrupt.

[0071] In a specific implementation, to ensure that the vehicle ambient lighting can operate smoothly according to the transition color data and the ambient lighting color sequence, step S40 in this embodiment may include:

[0072] The vehicle ambient lights are divided according to the ambient light color sequence, and the ambient light area corresponding to each ambient light color in the ambient light color sequence is determined.

[0073] Select a transition area within the ambient light area corresponding to each ambient light color;

[0074] The ambient lighting in the vehicle's ambient lighting area is controlled according to the ambient lighting color, and the ambient lighting in the vehicle's ambient lighting area is controlled according to the transition color data.

[0075] It should be noted that dividing the vehicle ambient lights according to the ambient light color sequence and determining the ambient light area corresponding to each ambient light color in the ambient light color sequence can be done by dividing the vehicle ambient lights into multiple equal parts according to the number of ambient light colors in the ambient light color sequence, so that each part of the vehicle ambient lights corresponds to one ambient light color in the ambient light color sequence. In this case, the installation area of ​​the vehicle ambient lights is the ambient light area corresponding to the ambient light color.

[0076] For example, assuming there are 8N ambient lights in a vehicle, and the ambient light color sequence contains a total of 4 ambient light colors, then each ambient light color corresponds to 2N ambient lights. Based on the installation positions of the 2N ambient lights corresponding to each ambient light color, the ambient light area corresponding to that ambient light color can be determined.

[0077] It should be noted that selecting a transition area within the ambient light area corresponding to each ambient light color can be done by selecting a portion of each of the two adjacent ambient light areas. For example, assuming the two adjacent ambient light colors are a first color and a second color, and the latter half of the ambient light area for the first color is adjacent to the former half of the ambient light area for the second color, then a predetermined area of ​​a certain size can be selected in the latter half of the ambient light area for the first color as a transition area, and a predetermined area of ​​a certain size can also be selected in the former half of the ambient light area for the second color as a transition area.

[0078] In practical use, controlling the operation of vehicle ambient lights in an ambient lighting area based on the ambient light color can mean controlling the displayed color of the vehicle ambient lights in that area to be the ambient light color. Controlling the operation of vehicle ambient lights in a transition area based on transition color data can mean controlling the displayed color of the vehicle ambient lights in that transition area to the color corresponding to the transition color data.

[0079] Furthermore, since the number of transition colors corresponding to the transition color data may be different, and the display area required for displaying different numbers of transition colors is also different, in order to ensure that the transition area can display the transition color normally, the step of selecting the transition area in the ambient light area corresponding to each ambient light color described in this embodiment may include:

[0080] The number of transition colors is determined based on the transition color data;

[0081] Based on the number of transition colors, select a transition area in the ambient light area corresponding to each ambient light color.

[0082] It should be noted that determining the number of transition colors based on the transition color data can be achieved by parsing the transition color data and determining the number of transition colors contained in the data. For example, if the transition color data is empty (NULL), then the number of transition colors is 0; if the transition color data is "(a, b, c)", then the number of transition colors is 1; if the transition color data is "(a1, b1, c1)|(a2, b2, c2)|(a3, b3, c3)", then the number of transition colors is 3.

[0083] In practical use, selecting a transition area in the ambient light area corresponding to each ambient light color based on the number of transition colors can be done by finding the corresponding display area size based on the number of transition colors, and then selecting an area of ​​the same size as the display area in the ambient light area corresponding to each ambient light color as the transition area.

[0084] To facilitate understanding, we will now combine... Figure 3 This explanation is provided, but it does not limit the scope of this solution. Figure 3 This is a schematic diagram of the ambient light display control in this embodiment, as shown below. Figure 3 As shown, assuming the user-specified ambient light color sequence contains 4 ambient light colors, each color corresponds to 2*N LEDs, then the vehicle ambient light contains a total of 8*N LEDs. Since the sequence contains colors 1-4, the first color has no adjacent color to its left, and the fourth color has no adjacent color to its right. Therefore, we can first control the first half of the N LEDs of the first color to correspond to the first color, and the second half of the N LEDs of the fourth color to correspond to the fourth color.

[0085] At this point, for two adjacent colors in the ambient light color sequence (referred to as color ① and color ②, with the right half of color ① adjacent to the left half of color ②), when selecting the transition area, only the N LEDs in the right half of color ① and the N LEDs in the left half of color ② need to be considered. They can be numbered 1-2N. Then, the transition color data corresponding to the adjacent colors is obtained to determine the number of transition colors. If the number of transition colors is 0, that is, no transition color is needed between color ① and color ②, then LEDs 1 to N can be controlled to correspond to color ①, and LEDs N+1 to 2N can correspond to color ②.

[0086] If the number of transition colors is 1, that is, there is only 1 transition color, then the LEDs from 1 to N-1 correspond to color ①, the LEDs from N to N+1 correspond to the transition color, and the LEDs from N+2 to 2N correspond to color ②.

[0087] If the number of transition colors is 3, that is, there are three transition colors, then the LEDs from 1 to N-2 correspond to color ①, the (N-1)th LED corresponds to transition color ①, the Nth LED corresponds to transition color ②, the N+1th LED corresponds to transition color ③, and the LEDs from N+2 to 2N correspond to color ②.

[0088] This embodiment extracts adjacent color combinations from a user-specified ambient light color sequence, which includes various ambient light colors. It parses these adjacent color combinations to obtain first and second color data. The first and second color data are compared to generate transition color data corresponding to the adjacent color combinations. The vehicle's ambient lights are then controlled based on this transition color data and the ambient light color sequence. Because corresponding transition color data is generated for adjacent color combinations in the user-specified ambient light color sequence, it ensures that there are no abrupt color combinations when the ambient lights are controlled by the user's specified ambient light colors, achieving a better ambient light display effect. This allows users to set the ambient light colors according to their actual needs, increasing their freedom of control over the vehicle's ambient lights.

[0089] refer to Figure 4 , Figure 4 This is a flowchart illustrating a second embodiment of an ambient lighting control method according to the present invention.

[0090] Based on the first embodiment described above, step S30 of the ambient light control method in this embodiment includes:

[0091] Step S301: Sort the color values ​​corresponding to each color channel in the first color data from largest to smallest to obtain the first color value sequence.

[0092] It should be noted that sorting the color values ​​corresponding to each color channel in the first color data from largest to smallest to obtain the first color value sequence can be achieved by sorting the color values ​​corresponding to each color channel in the first color data from largest to smallest and using the sorting result as the first color value sequence. The first color value sequence includes a first maximum color value, a first intermediate color value, and a first minimum color value.

[0093] For example: Suppose the RGB data in the first color data is represented as (255, 70, 0). Then, the color value corresponding to the R color channel is 255, the color value corresponding to the G color channel is 70, and the color value corresponding to the B color channel is 0. The first color value sequence is 255-70-0. The first maximum color value is 255, corresponding to the R color channel; the first intermediate color value is 70, corresponding to the G color channel; and the first minimum color value is 0, corresponding to the B color channel.

[0094] Step S302: Sort the color values ​​corresponding to each color channel in the second color data from largest to smallest to obtain the second color value sequence.

[0095] It is understandable that the second color value sequence includes the second maximum color value, the second intermediate color value, and the second minimum color value. The method for obtaining the second color value sequence is the same as the method for obtaining the first color value sequence, and will not be repeated here.

[0096] Step S303: Perform color channel comparison between the first color value sequence and the second color value sequence, and generate transition color data corresponding to the adjacent color combination based on the color channel comparison result.

[0097] It should be noted that comparing the color channels of the first color value sequence and the second color value sequence can be done by comparing the color channels of the color values ​​that are in the same order in the first color value sequence and the second color value sequence respectively. For example, comparing the first maximum color value in the first color value sequence with the second maximum color value in the second color value sequence to determine whether the color channels corresponding to the first maximum color value and the second maximum color value are the same.

[0098] In practice, the difference between the two ambient light colors in adjacent color combinations can be determined by comparing the color channels, thereby determining whether a corresponding transition color needs to be set, and generating the transition color data corresponding to the adjacent color combination when a transition color needs to be set.

[0099] This embodiment obtains a first color value sequence by sorting the color values ​​corresponding to each color channel in the first color data from largest to smallest; it then obtains a second color value sequence by sorting the color values ​​corresponding to each color channel in the second color data from largest to smallest; the first color value sequence and the second color value sequence are compared for color channels, and transition color data corresponding to the adjacent color combinations is generated based on the comparison results. Because the first and second color data are sorted separately first, and the color channel comparison is performed based on the sorting results, it ensures that the maximum, middle, and minimum color values ​​in the two color data can be quickly determined whether they correspond to the same color channel, thereby ensuring that it is possible to quickly determine whether a transition color needs to be set.

[0100] refer to Figure 5 , Figure 5 This is a flowchart illustrating a third embodiment of an ambient lighting control method according to the present invention.

[0101] Based on the second embodiment described above, step S303 of the ambient light control method in this embodiment may include:

[0102] Step S3031: Detect whether the first maximum color value and the second maximum color value correspond to the same color channel.

[0103] It should be noted that in order to quickly determine whether the difference between the two ambient light colors in adjacent color combinations is significant, we can first compare whether the maximum color value in their color data corresponds to the same color channel. Therefore, we can first check whether the first maximum color value and the second maximum color value correspond to the same color channel.

[0104] Step S3032: If the first maximum color value and the second maximum color value correspond to the same color channel, then detect whether the first intermediate color value and the second intermediate color value correspond to the same color channel.

[0105] It is understandable that if the first maximum color value and the second maximum color value correspond to the same color channel, it means that the difference between the two ambient light colors in the adjacent color combination is not very large. However, this may lead to a relatively abrupt color transition. In order to more accurately determine whether a transition color needs to be set, it is possible to further detect whether the first intermediate color value and the second intermediate color value correspond to the same color channel.

[0106] Step S3033: If the first intermediate color value and the second intermediate color value correspond to the same color channel, then obtain the absolute value of the difference between the first intermediate color value and the second intermediate color value.

[0107] It is understandable that if the first intermediate color value and the second intermediate color value correspond to the same color channel, it means that the difference between the two ambient light colors in the adjacent color combination is small, but there is still a possibility that the color transition will be relatively abrupt. In order to further determine whether a transition color needs to be set, the absolute value of the difference between the first intermediate color value and the second intermediate color value can be obtained for further judgment.

[0108] Step S3034: If the absolute value of the difference is greater than the first color threshold, then generate transition color data with a transition color quantity of one based on the first color value sequence and the second color value sequence.

[0109] It should be noted that the first color threshold can be preset by the administrator of the ambient light control device. The first color threshold can be set to half of the maximum value of the color values ​​supported in the color channel. For example, taking RGB color data as an example, the color value of a single color channel is 0-255, then the first color threshold can be set to half of 255, that is, 128.

[0110] In practical use, if the absolute value of the difference is less than or equal to the first color threshold, it means that the color difference between the two ambient lights in the adjacent color combination is very small and will not cause a harsh color transition, so there is no need to set a transition color; however, if the absolute value of the difference is greater than the first color threshold, it means that there is a certain difference between the two ambient lights in the adjacent color combination, which will cause a harsh color transition, so a transition color needs to be set.

[0111] In a specific implementation, generating transition color data with one transition color based on the first color value sequence and the second color value sequence can be done by setting a transition color. The maximum value of the RGB value of this transition color is the same as the color channel corresponding to the first maximum color value, and the value is consistent with the first maximum color value. The median value of the color is the same as the color channel corresponding to the first median color value, and the value is the average of the first median color value and the second median color value. The minimum value of the color is the same as the color channel corresponding to the first minimum color value, and the value is consistent with the first minimum color value.

[0112] Furthermore, in order to reasonably set the transition colors, after step S3032 in this embodiment, the following may also be included:

[0113] If the first intermediate color value and the second intermediate color value do not correspond to the same color channel, then obtain the sum of the first intermediate color value and the second intermediate color value;

[0114] If the sum of the first intermediate color value and the second intermediate color value is greater than the first color threshold, then transition color data with a transition color quantity of one is generated based on the first color value sequence and the second color value sequence.

[0115] It should be noted that if the first intermediate color value and the second intermediate color value do not correspond to the same color channel, then the sum of the first intermediate color value and the second intermediate color value is obtained. This indicates that there is a certain difference between the two ambient light colors in the adjacent color combination, but further judgment is required. In this case, in order to more accurately determine whether a transition color needs to be set, the sum of the first intermediate color value and the second intermediate color value can be obtained.

[0116] In practical use, if the sum of the first intermediate color value and the second intermediate color value is less than or equal to the first color threshold, it means that the color difference between the two ambient lights in the adjacent color combination is very small and will not cause a harsh color transition, so there is no need to set a transition color; if the sum of the first intermediate color value and the second intermediate color value is greater than the first color threshold, it means that there is a certain difference between the two ambient lights in the adjacent color combination, which will cause a harsh color transition, so a transition color needs to be set.

[0117] At this point, generating transition color data with one transition color based on the first color value sequence and the second color value sequence can be done by setting a transition color where the maximum value of the RGB values ​​of the transition color is the same as the color channel corresponding to the first maximum color value, the value is the same as the first maximum color value, the middle value of the color value is the same as the color channel corresponding to the first middle color value, and the value is half of the first middle color value, and the minimum value of the color value is the same as the color channel corresponding to the first minimum color value, and the value is half of the second minimum color value.

[0118] Furthermore, in order to reasonably set the transition colors, after step S3031 in this embodiment, the following may also be included:

[0119] If the first maximum color value and the second maximum color value do not correspond to the same color channel, then it is detected whether the first intermediate color value and the second intermediate color value are both greater than or equal to the second color threshold.

[0120] If the first intermediate color value is less than the second color threshold or the second intermediate color value is less than the second color threshold, then a second-level color channel comparison is performed based on the first intermediate color value, the second intermediate color value, the first minimum color value, and the second minimum color value.

[0121] Based on the comparison results of the second-level color channel comparison, and combined with the first color value sequence and the second color value sequence, three transition color data are generated.

[0122] It should be noted that the second color threshold can also be preset by the administrator of the ambient lighting control device, and the second color threshold is greater than the first color threshold.

[0123] In the specific implementation, if the first maximum color value and the second maximum color value do not correspond to the same color channel, it means that there is a high probability that the two ambient light colors in the adjacent color combination are significantly different. In order to make a more accurate judgment, it can be detected whether the first intermediate color value and the second intermediate color value are both greater than or equal to the second color threshold.

[0124] In practical use, if both the first intermediate color value and the second intermediate color value are greater than or equal to the second color threshold, it means that the color difference between the two ambient lights in the adjacent color combination is very small, and there will be no abrupt color transition, so there is no need to set a transition color. However, if the first intermediate color value is less than the second color threshold or the second intermediate color value is less than the second color threshold, it means that the color difference between the two ambient lights in the adjacent color combination is very large. In this case, multiple transition colors need to be set. In order to determine how to set multiple transition colors, a two-level color channel comparison can be performed based on the first intermediate color value, the second intermediate color value, the first minimum color value, and the second minimum color value, and the transition color data can be generated based on the comparison results.

[0125] To facilitate understanding, we will now combine... Figure 6 To explain, Figure 6 This is a schematic diagram illustrating the execution flow of the transition color data generation algorithm in this embodiment. Figure 6 As shown, the ambient lighting control device acquires the RGB values ​​of each color selected by the customer from the 64 preset colors in the DA (a smart mobile phone interconnection system compatible with the vehicle). It then compares the RGB values ​​of two adjacent colors (color ① and color ②) in sequence, naming the RGB values ​​of color ① as X1 (first maximum color value), Y1 (first intermediate color value), and Z1 (first minimum color value), where X1 ≥ Y1 ≥ Z1. Similarly, the values ​​of color ② are named X2 (second maximum color value), Y2 (second intermediate color value), and Z2 (second minimum color value). Assume that X1 = X2 = 255, Z1 = Z2 = 0, and 0 < Y1 & Y2 < 255.

[0126] Next, it compares whether X1 and X2 correspond to the same color system (if the corresponding color channels are the same, they are determined to correspond to the same color system; otherwise, they are determined to correspond to different color systems). If X1 and X2 correspond to the same color system, it further checks whether Y1 and Y2 correspond to the same color system. If Y1 and Y2 correspond to the same color system, it further checks whether the absolute value of the difference between Y1 and Y2 is less than the first color threshold (i.e., whether |Y1-Y2|≤128). If so, no transition color is set; otherwise, a transition color data with a quantity of 1 is set. At this time, the RGB values ​​of the transition color are X3, Y3, and Z3. X3 is in the same color system as X1, X3 = 255 or X1; Y3 is in the same color system as Y1, Y3 = (Y1+Y2) / 2; and Z3 is in the same color system as Z1, Z3 = 0 or Z1.

[0127] If Y1 and Y2 do not correspond to the same color system, it will check whether the sum of Y1 and Y2 is less than or equal to the first color threshold. If it is, no transition color will be set. If not, a transition color data with a quantity of 1 will be set. At this time, the RGB values ​​of the transition color are X3, Y3, and Z3. X3 is in the same color system as X1, X3 = 255 or X1. Y3 is in the same color system as Y1, Y3 = Y1 / 2. Z3 is in the same color system as Z1, Z3 = Y2 / 2.

[0128] If X1 and X2 do not correspond to the same color family, it will check whether Y1 and Y2 are both greater than or equal to the second color threshold (i.e., check if Y1 ≥ 129 and Y2 ≥ 129). If so, no transition color is set; otherwise, a second-level color channel comparison is performed. At this time, it can first compare whether Y1 and Y2 correspond to the same color family. If Y1 and Y2 correspond to the same color family, then a transition color data of 3 can be set. At this time, the transition colors from left to right are transition colors ①②③. The RGB of transition color ① are X3, Y3, and Z3. X3 is in the same color family as X1. =255, Y3 is the same color as Y1, Y3 = (3Y1+Y2) / 4, Z3 is the same color as Z1, Z3 = 128; The RGB of transition color ② is X4, Y4, Z4, X4 is the same color as X1, X4 = 255 or X1, Y4 is the same color as X2, Y4 = 255 or X2, Z4 = (Y1+Y2) / 2, The RGB of transition color ③ is X5, Y5, Z5, X5 is the same color as X2, X5 = 255 or X2, Y5 is the same color as Y2, Y5 = (3Y2+Y1) / 4, Z5 is the same color as Z2, Z5 = 128;

[0129] If Y1 and Y2 correspond to different color families, then we can further check whether Z1 and Z2 correspond to the same color family. If Z1 and Z2 correspond to the same color family, then we can set the number of transition colors to 3. At this time, the transition colors from left to right are transition colors ①②③. The RGB values ​​of transition color ① are X3, Y3, and Z3. X3 is in the same color family as X1, so X3 = 255 or X1. Y3 is in the same color family as Y1, so Y3 = (Y1 + 255) / 2. Z3 is in the same color family as Z1, Z3 = 0. The RGB values ​​of transition color ② are X4, Y4, Z4. X4 is in the same color family as X1, X4 = 255 or X1. Y4 is in the same color family as X2, Y4 = 255 or X2. Z4 = 0. The RGB values ​​of transition color ③ are X5, Y5, Z5. X5 is in the same color family as X2, X5 = 255 or X2. Y5 is in the same color family as Y2, Y5 = (Y2 + 255) / 2. Z5 is in the same color family as Z2, Z5 = 0.

[0130] If Z1 and Z2 do not correspond to the same color family, we can further check whether Y1 and X2 correspond to the same color family. If Y1 and X2 correspond to the same color family, we can set the number of transition colors to 3. In this case, the transition colors from left to right are transition colors ①②③. The RGB values ​​of transition color ① are X3, Y3, and Z3. X3 is in the same color family as X1, X3 = 255 or X1. Y3 is in the same color family as Y1, Y3 = (Y1 + 255) / 2. Z3 is in the same color family as Z1. For the same color family, Z3 = Y2 / 4. The RGB values ​​of transition color ② are X4, Y4, and Z4. X4 is in the same color family as X1, so X4 = 255 or X1. Y4 is in the same color family as X2, so Y4 = 255 or X2. Z4 is in the same color family as Y2, so Z4 = Y2 / 2. The RGB values ​​of transition color ③ are X5, Y5, and Z5. X5 is in the same color family as X2, so X5 = 255 or X2. Y5 is in the same color family as Y2, so Y5 = 3Y2 / 4. Z5 is in the same color family as Z2, so Z5 = 128.

[0131] If Y1 and X2 correspond to different color systems, then the number of transition colors can be set to 3. In this case, the transition colors from left to right are transition colors ①②③. The RGB values ​​of transition color ① are X3, Y3, and Z3. X3 is in the same color system as X1, X3 = 255 or X1. Y3 is in the same color system as Y1, Y3 = 3Y1 / 4. Z3 is in the same color system as Z1, Z3 = 128. The RGB values ​​of transition color ② are X4, Y... 4. Z4, X4 and X1 are in the same color family, X4 = 255 or X1, Y4 and X2 are in the same color family, Y4 = 255 or X2, Z4 and Y1 are in the same color family, Z4 = Y1 / 2, the RGB of transition color ③ is X5, Y5, Z5, X5 and X2 are in the same color family, X5 = 255 or X2, Y5 and Y2 are in the same color family, Y5 = (Y2 + 255) / 2, Z5 and Z2 are in the same color family, Z5 = Y1 / 4.

[0132] This embodiment compares whether the color values ​​in the color value sequences of two colors in adjacent color combinations correspond to the same color channel, and uses different methods to set the transition color data according to different comparison results. This ensures that the set transition color data can play a color buffering role, so that the transition between the two colors in the color value sequence is not too abrupt.

[0133] Furthermore, this embodiment of the invention also proposes a storage medium storing an ambient light control program, which, when executed by a processor, implements the steps of the ambient light control method described above.

[0134] Reference Figure 7 , Figure 7 This is a structural block diagram of the first embodiment of the ambient lighting control device of the present invention.

[0135] like Figure 7 As shown, the ambient lighting control device proposed in this embodiment of the invention includes:

[0136] Color receiving module 10 is used to extract adjacent color combinations from the ambient light color sequence specified by the user, wherein the ambient light color sequence includes a variety of different ambient light colors;

[0137] Data parsing module 20 is used to parse the adjacent color combinations to obtain first color data and second color data;

[0138] Color comparison module 30 is used to compare the first color data and the second color data to generate transition color data corresponding to the adjacent color combination;

[0139] The lighting control module 40 is used to control the operation of the vehicle ambient lights according to the transition color data and the ambient light color sequence.

[0140] This embodiment extracts adjacent color combinations from a user-specified ambient light color sequence, which includes various ambient light colors. It parses these adjacent color combinations to obtain first and second color data. The first and second color data are compared to generate transition color data corresponding to the adjacent color combinations. The vehicle's ambient lights are then controlled based on this transition color data and the ambient light color sequence. Because corresponding transition color data is generated for adjacent color combinations in the user-specified ambient light color sequence, it ensures that there are no abrupt color combinations when the ambient lights are controlled by the user's specified ambient light colors, achieving a better ambient light display effect. This allows users to set the ambient light colors according to their actual needs, increasing their freedom of control over the vehicle's ambient lights.

[0141] Furthermore, the color comparison module 30 is also used to sort the color values ​​corresponding to each color channel in the first color data from largest to smallest to obtain a first color value sequence; sort the color values ​​corresponding to each color channel in the second color data from largest to smallest to obtain a second color value sequence; compare the first color value sequence and the second color value sequence for color channels, and generate transition color data corresponding to the adjacent color combination based on the color channel comparison result.

[0142] Furthermore, the first color value sequence includes a first maximum color value, a first intermediate color value, and a first minimum color value, and the second color value sequence includes a second maximum color value, a second intermediate color value, and a second minimum color value;

[0143] The color comparison module 30 is further configured to detect whether the first maximum color value and the second maximum color value correspond to the same color channel; if the first maximum color value and the second maximum color value correspond to the same color channel, then detect whether the first intermediate color value and the second intermediate color value correspond to the same color channel; if the first intermediate color value and the second intermediate color value correspond to the same color channel, then obtain the absolute value of the difference between the first intermediate color value and the second intermediate color value; if the absolute value of the difference is greater than a first color threshold, then generate transition color data with a transition color quantity of one based on the first color value sequence and the second color value sequence.

[0144] Furthermore, the color comparison module 30 is also used to obtain the sum of the first intermediate color value and the second intermediate color value if the first intermediate color value and the second intermediate color value do not correspond to the same color channel; and to generate transition color data with a transition color quantity of one based on the first color value sequence and the second color value sequence if the sum of the first intermediate color value and the second intermediate color value is greater than the first color threshold.

[0145] Furthermore, the color comparison module 30 is also used to detect whether the first intermediate color value and the second intermediate color value are both greater than or equal to a second color threshold if the first maximum color value and the second maximum color value do not correspond to the same color channel; if the first intermediate color value is less than the second color threshold or the second intermediate color value is less than the second color threshold, then a second-level color channel comparison is performed based on the first intermediate color value, the second intermediate color value, the first minimum color value, and the second minimum color value; and based on the comparison result of the second-level color channel comparison, a transition color data with three transition colors is generated by combining the first color value sequence and the second color value sequence.

[0146] Furthermore, the lighting control module 40 is also used to divide the vehicle ambient lights according to the ambient light color sequence, determine the ambient light area corresponding to each ambient light color in the ambient light color sequence; select a transition area in the ambient light area corresponding to each ambient light color; control the operation of the vehicle ambient lights in the ambient light area according to the ambient light color, and control the operation of the vehicle ambient lights in the transition area according to the transition color data.

[0147] Furthermore, the lighting control module 40 is also used to determine the number of transition colors based on the transition color data; and to select a transition area in the ambient light area corresponding to each ambient light color based on the number of transition colors.

[0148] It should be understood that the above are merely illustrative examples and do not constitute any limitation on the technical solutions of the present invention. In specific applications, those skilled in the art can make settings as needed, and the present invention does not impose any restrictions on this.

[0149] It should be noted that the workflow described above is merely illustrative and does not limit the scope of protection of this invention. In practical applications, those skilled in the art can select some or all of the workflow to achieve the purpose of this embodiment according to actual needs, and no restrictions are imposed here.

[0150] In addition, for technical details not described in detail in this embodiment, please refer to the ambient light control method provided in any embodiment of the present invention, which will not be repeated here.

[0151] Furthermore, it should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0152] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0153] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory (ROM) / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0154] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. An ambient light control method, characterized by, The ambient lighting control method includes the following steps: Extract adjacent color combinations from the user-specified ambient light color sequence, which includes multiple different ambient light colors; The adjacent color combinations are analyzed to obtain first color data and second color data; The first color data and the second color data are compared to generate the transition color data corresponding to the adjacent color combinations; The vehicle ambient lighting is controlled to operate based on the transition color data and the ambient light color sequence. The step of comparing the first color data and the second color data to generate the transition color data corresponding to the adjacent color combination includes: Sort the color values ​​corresponding to each color channel in the first color data from largest to smallest to obtain the first color value sequence; The color values ​​corresponding to each color channel in the second color data are sorted from largest to smallest to obtain a second color value sequence. The first color value sequence includes a first maximum color value, a first intermediate color value, and a first minimum color value. The second color value sequence includes a second maximum color value, a second intermediate color value, and a second minimum color value. Detect whether the first maximum color value and the second maximum color value correspond to the same color channel; If the first maximum color value and the second maximum color value correspond to the same color channel, then it is detected whether the first intermediate color value and the second intermediate color value correspond to the same color channel. If the first intermediate color value and the second intermediate color value correspond to the same color channel, then obtain the absolute value of the difference between the first intermediate color value and the second intermediate color value; If the absolute value of the difference is greater than the first color threshold, then transition color data with one transition color is generated based on the first color value sequence and the second color value sequence. Specifically, the maximum value of the color value in the transition color data with one transition color is the same as the color channel corresponding to the first maximum color value, and its value is consistent with the first maximum color value. The median value of the color value in the transition color data with one transition color is the same as the color channel corresponding to the first median color value, and its value is the average of the first median color value and the second median color value. The minimum value of the color value in the transition color data with one transition color is the same as the color channel corresponding to the first minimum color value, and its value is consistent with the first minimum color value.

2. The ambient light control method of claim 1, wherein, After the step of detecting whether the first intermediate color value and the second intermediate color value correspond to the same color channel if the first maximum color value and the second maximum color value correspond to the same color channel, the method further includes: If the first intermediate color value and the second intermediate color value do not correspond to the same color channel, then obtain the sum of the first intermediate color value and the second intermediate color value; If the sum of the first intermediate color value and the second intermediate color value is greater than the first color threshold, then transition color data with a transition color quantity of one is generated based on the first color value sequence and the second color value sequence.

3. The ambient light control method of claim 1, wherein, After the step of detecting whether the first maximum color value and the second maximum color value correspond to the same color channel, the method further includes: If the first maximum color value and the second maximum color value do not correspond to the same color channel, then it is detected whether the first intermediate color value and the second intermediate color value are both greater than or equal to the second color threshold. If the first intermediate color value is less than the second color threshold or the second intermediate color value is less than the second color threshold, then a second-level color channel comparison is performed based on the first intermediate color value, the second intermediate color value, the first minimum color value, and the second minimum color value. Based on the comparison results of the second-level color channel comparison, and combined with the first color value sequence and the second color value sequence, three transition color data are generated.

4. The ambient light control method according to any one of claims 1 to 3, characterized in that, The step of controlling the vehicle ambient lighting operation based on the transition color data and the ambient lighting color sequence includes: The vehicle ambient lights are divided according to the ambient light color sequence, and the ambient light area corresponding to each ambient light color in the ambient light color sequence is determined. Select a transition area within the ambient light area corresponding to each ambient light color; The ambient lighting in the vehicle's ambient lighting area is controlled according to the ambient lighting color, and the ambient lighting in the vehicle's ambient lighting area is controlled according to the transition color data.

5. The ambient lighting control method as described in claim 4, characterized in that, The step of selecting a transition area within the ambient light region corresponding to each ambient light color includes: The number of transition colors is determined based on the transition color data; Based on the number of transition colors, select a transition area in the ambient light area corresponding to each ambient light color.

6. An ambient lighting control device, characterized in that, The ambient lighting control device includes the following modules: The color receiving module is used to extract adjacent color combinations from the ambient light color sequence specified by the user, wherein the ambient light color sequence includes a variety of different ambient light colors; The data parsing module is used to parse the adjacent color combinations to obtain first color data and second color data; The color comparison module is used to compare the first color data and the second color data to generate transition color data corresponding to the adjacent color combination. The lighting control module is used to control the operation of the vehicle ambient lights according to the transition color data and the ambient light color sequence; The color comparison module is further configured to sort the color values ​​corresponding to each color channel in the first color data from largest to smallest to obtain a first color value sequence. The color values ​​corresponding to each color channel in the second color data are sorted from largest to smallest to obtain a second color value sequence. The first color value sequence includes a first maximum color value, a first intermediate color value, and a first minimum color value; the second color value sequence includes a second maximum color value, a second intermediate color value, and a second minimum color value. It is then checked whether the first maximum color value and the second maximum color value correspond to the same color channel. If they do, it is checked whether the first intermediate color value and the second intermediate color value correspond to the same color channel. If they do, the first intermediate color value and the second intermediate color value are then compared to the same color channel. The absolute value of the difference between color values; if the absolute value of the difference is greater than the first color threshold, then a transition color data with one transition color is generated based on the first color value sequence and the second color value sequence, wherein the maximum value of the color value in the transition color data with one transition color is the same as the color channel corresponding to the first maximum color value, and the value is consistent with the first maximum color value; the median value of the color value in the transition color data with one transition color is the same as the color channel corresponding to the first median color value, and the value is the average of the first median color value and the second median color value; the minimum value of the color value in the transition color data with one transition color is the same as the color channel corresponding to the first minimum color value, and the value is consistent with the first minimum color value.

7. An ambient lighting control device, characterized in that, The ambient lighting control device includes: a processor, a memory, and an ambient lighting control program stored in the memory and executable on the processor. When the ambient lighting control program is executed by the processor, it implements the steps of the ambient lighting control method as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an ambient light control program, which, when executed, implements the steps of the ambient light control method as described in any one of claims 1-5.