Light effect control method, device and vehicle

By obtaining the light strip layout configuration file and animation parameter table, extracting RGB color data frame by frame, and generating light effect data adapted to the bus type, the problem of discrepancy between the actual and designed light effects in the ambient light display was solved, achieving higher consistency and immersive interactive effects.

CN122458261APending Publication Date: 2026-07-24ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG GEELY HLDG GRP CO LTD
Filing Date
2026-06-26
Publication Date
2026-07-24

Smart Images

  • Figure CN122458261A_ABST
    Figure CN122458261A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of vehicles and discloses a lamp effect control method, a lamp effect control device and a vehicle.The lamp effect control method comprises the following steps: acquiring a lamp strip layout configuration file, a lamp effect video and a dynamic effect parameter table, the lamp strip layout configuration file is used to record coordinate information of a visual graph of an ambient lamp strip in a standardized canvas; according to a color taking coordinate in the lamp strip layout configuration file and a frame rate corresponding to a dynamic effect type in the dynamic effect parameter table, RGB color data is extracted from the lamp effect video frame by frame, the color taking coordinate is determined according to the coordinate information of the visual graph of the lamp strip in the standardized canvas; based on a bus type in the dynamic effect parameter table and the RGB color data, lamp effect data is generated; and the ambient lamp is controlled to output a corresponding light effect according to the lamp effect data.The present application can effectively reduce the deviation between an actual lamp effect and a designed lamp effect, thereby creating an immersive interactive environment that is more consistent with the design expectation for drivers and passengers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle technology, specifically to lighting effect control methods, devices, and vehicles. Background Technology

[0002] Ambient lighting, as a key visual carrier for intelligent vehicle interaction, can dynamically adjust the color, brightness, and changing patterns of its light effects according to the vehicle's real-time status. This creates an immersive driving environment and conveys intelligent vehicle information. However, in related technologies, ambient lighting exhibits a significant discrepancy between the actual lighting effect and the designed effect during the lighting display process. Summary of the Invention

[0003] This invention provides a lighting effect control method, device, and vehicle to solve the problem in related technologies where the actual lighting effect of ambient lighting deviates significantly from the designed lighting effect when displaying lighting effects.

[0004] In a first aspect, the present invention provides a lighting effect control method, comprising: acquiring a light strip layout configuration file, a lighting effect video, and a motion effect parameter table; extracting RGB color data frame by frame from the lighting effect video according to the color coordinates in the light strip layout configuration file and the frame rate corresponding to the motion effect type in the motion effect parameter table; generating lighting effect data based on the bus type and RGB color data in the motion effect parameter table; and controlling the ambient light to output the corresponding light effect according to the lighting effect data.

[0005] The lighting effect control method provided by this invention can ensure that the color sampling position matches the designed ambient light strip visualization graphic by obtaining the coordinate information in the light strip layout configuration file; it can ensure the smoothness of the animation and the color reproduction by extracting RGB color data frame by frame based on the frame rate in the animation parameter table; and it can effectively reduce the deviation between the actual lighting effect and the designed lighting effect by generating adapted lighting effect data according to the bus type, thereby improving the consistency and reproduction of the lighting effect display, and creating an immersive interactive environment that is more in line with the design expectations for drivers and passengers.

[0006] In one optional implementation, obtaining the light strip layout configuration file includes: creating a visual graphic of the ambient light strip on a standardized canvas of a preset size, the visual graphic including at least one of point light source graphic and light guide strip graphic; establishing the correspondence between the light strip and the corresponding control bus and LED beads; and generating the light strip layout configuration file based on the coordinate information of the visual graphic, the correspondence, and the color coordinates.

[0007] The lighting effect control method provided by this invention can intuitively present the layout structure of ambient light strips by creating a visual graphic containing point light source graphics and light guide strip graphics on a standardized canvas, which facilitates designers to quickly adjust and verify the rationality of the spatial distribution of the light strips. By establishing the correspondence between the light strips and the corresponding control buses and LED beads, the control affiliation of each light strip and the association with the LED beads can be clearly defined, avoiding misalignment or confusion of control commands. By integrating the coordinate information of the visual graphic, the correspondence, and the color coordinates to generate a light strip layout configuration file, a reliable basis can be provided for the subsequent accurate extraction of RGB color data from the lighting effect video, further improving the accuracy and stability of lighting effect control.

[0008] In one optional implementation, RGB color data is extracted frame by frame from the lighting effect video based on the color coordinates in the light strip layout configuration file and the frame rate corresponding to the animation type in the animation parameter table. This includes: determining the frame sampling interval according to the frame rate corresponding to the animation type; parsing the lighting effect video frame by frame according to the frame sampling interval to obtain at least one frame of lighting effect image; and extracting the RGB color data at the corresponding position in each frame of lighting effect image based on the color coordinates in the light strip layout configuration file.

[0009] The lighting effect control method provided by this invention determines the frame sampling interval according to the frame rate corresponding to the animation type, which ensures that the sampling rhythm of the frame data is adapted to the dynamic changes of the animation. This avoids both the waste of computing resources caused by excessive sampling and the loss of animation details caused by insufficient sampling. By analyzing the lighting effect video frame by frame and extracting the RGB color data of the corresponding position by combining the color coordinates, the color information in the lighting effect image can be accurately mapped to the actual light strip layout. This ensures that the color output of each LED bead or light guide strip is highly consistent with the visual effect in the lighting effect video, providing an accurate and consistent color basis for the generation and issuance of subsequent lighting effect commands. This effectively improves the real-time performance and fidelity of lighting effect control, making the dynamic effect of the ambient light more in line with the design expectations.

[0010] In one optional implementation, determining the frame sampling interval according to the frame rate corresponding to the motion effect type includes: if the motion effect type is a global motion effect, then determining the frame sampling interval as the ratio of the original frame rate of the lighting effect video to the first frame rate corresponding to the motion effect type; if the motion effect type is a local motion effect, then determining the frame sampling interval as the ratio of the original frame rate of the lighting effect video to the second frame rate corresponding to the motion effect type, wherein the second frame rate is greater than the first frame rate.

[0011] The lighting effect control method provided by this invention addresses the differences in characteristics between global and local animation effects by employing differentiated frame rate calculations for frame sampling intervals. This effectively reduces computational load and avoids unnecessary resource consumption in global animation effect scenarios. In local animation effect scenarios, by using frame interval settings corresponding to higher sampling frame rates, subtle dynamic changes in local areas can be accurately captured, ensuring the detail expressiveness of local animation effects. This achieves adaptive optimization for different types of animation effects, further improving the efficiency and effectiveness of lighting effect control. At the same time, the differentiated sampling strategy not only takes into account the rational use of system resources but also ensures the visual fidelity of various animation effects, making the lighting effects both smooth and natural as well as precise and delicate, better meeting users' needs for ambient lighting effects in different scenarios.

[0012] In one optional implementation, lighting effect data is generated based on the bus type and RGB color data in the dynamic effect parameter table, including: verifying the number of types of RGB color data according to the number of colors corresponding to the bus type, and obtaining the verification result; generating mask data based on the verification result and the arrangement order of each LED bead under the control bus in the light strip layout configuration file; and generating lighting effect data based on the RGB color data and the mask data.

[0013] The lighting effect control method provided by this invention verifies the types of RGB color data by checking the number of colors corresponding to the bus type, which can avoid abnormal lighting effect display problems caused by data mismatch in advance and ensure the validity of lighting effect data. Based on the mask data generated by the light strip layout configuration file, the RGB color data can be accurately mapped to the corresponding position of each LED bead, ensuring that the lighting effect is accurately presented on the physical light strip, avoiding misalignment or confusion, improving the stability and flexibility of lighting effect control, and better adapting to the lighting effect requirements under different hardware configurations, so that the intention of lighting effect design can be fully and accurately realized.

[0014] In one optional implementation, the number of types of RGB color data is verified according to the number of colors corresponding to the bus type, and a verification result is obtained, including: if the bus type is the first bus and the number of types of RGB color data is less than or equal to the number of types threshold, then a verification result that passes the verification is obtained; if the bus type is the second bus and the number of types of RGB color data is consistent with the number of color sampling points, then a verification result that passes the verification is obtained.

[0015] The lighting effect control method provided by this invention, for the first bus, provides greater flexibility in lighting effect design by setting a type threshold for verification, while ensuring data compliance. This allows designers to adjust the number of color types according to actual needs without strictly matching color sampling points, making it suitable for lighting effect scenarios with relatively low requirements for color richness but requiring rapid iteration. For the second bus, a verification rule that forces the number of color data types to be consistent with the number of color sampling points ensures that each color sampling point corresponds to accurate color data, effectively avoiding lighting effect display deviations caused by missing or redundant data. This is particularly suitable for complex dynamic lighting effect scenarios requiring high-precision color reproduction. This differentiated verification not only further improves the effectiveness and adaptability of lighting effect data but also optimizes the lighting effect control process according to the hardware characteristics of different buses, reducing unnecessary computational overhead and thus improving the overall efficiency and stability of lighting effect control.

[0016] In one optional implementation, mask data is generated based on the verification result and the arrangement order of each LED bead under the control bus, including: if the verification result indicates that the verification is passed, then based on the preset arrangement order of each LED bead under the control bus, assigning corresponding bits to each LED bead; setting the bits of the LED bead corresponding to each RGB color data to 1, and setting the remaining bits to 0; performing a bitwise OR operation on all bits corresponding to the same RGB color data to generate mask data corresponding to the RGB color data.

[0017] The lighting effect control method provided by this invention generates mask data based on the arrangement order of each LED bead under the control bus. This method can accurately map the correspondence between RGB color data and LED beads, ensuring that the color display of each bead is highly consistent with the design expectation, and effectively avoiding problems such as display misalignment or color chaos in the lighting effect. At the same time, the generation process of mask data is simplified by bitwise OR operation, which reduces the amount of data processing calculation and improves the response speed of lighting effect control.

[0018] In one optional implementation, after generating the lighting effect data, the method further includes: calculating the color difference of the RGB color values ​​corresponding to the same LED bead in adjacent frame RGB color data; updating the RGB color data based on the temporal characteristics of the transition frame, global animation, and local animation corresponding to the color difference to obtain RGB color update data; merging similar colors in the RGB color update data whose visual difference is less than a preset color difference threshold into the same standard color value, and updating the mask data corresponding to the LED bead based on the merging result to obtain mask update data; performing color difference correction and brightness compensation on the RGB color update data after similar color merging to obtain target RGB color data; and updating the lighting effect data based on the quality score results corresponding to the target RGB color data and the mask update data.

[0019] The lighting effect control method provided by this invention calculates the color difference of the RGB color values ​​of the same LED bead in adjacent frames, and updates the RGB color data by combining the temporal characteristics of transition frames, global animations, and local animations. This enables smooth transitions in lighting effects, effectively avoiding visual flickering or jumps caused by sudden color changes between frames, and improving the continuity and smoothness of the lighting effect display. By merging similar colors with visual differences less than a preset threshold and updating the mask data, the redundancy of data transmission and processing can be significantly reduced, further optimizing the consumption of computing resources and accelerating the response speed of the lighting effect. By performing color difference correction and brightness compensation on the RGB color update data after similar color merging, the individual color deviation of the LED bead can be calibrated, ensuring the consistency of color output between different LED beads and improving the comfort and professionalism of the visual experience. Finally, the lighting effect data is dynamically updated based on the quality score results corresponding to the target RGB color data and the mask update data, which can realize closed-loop optimization of the lighting effect, ensuring that the lighting effect performance always meets the design standards and user expectations, and improving the accuracy and reliability of the overall lighting effect control.

[0020] Secondly, the present invention provides a lighting effect control device, comprising: The data acquisition module is used to acquire the LED strip layout configuration file, lighting effect video, and animation parameter table. The data extraction module is used to extract RGB color data frame by frame from the light effect video based on the color coordinates in the light strip layout configuration file and the frame rate corresponding to the animation type in the animation parameter table. The data generation module is used to generate lighting effect data based on the bus type and RGB color data in the animation parameter table; The lighting effect control module is used to control the ambient light output to produce corresponding lighting effects based on the lighting effect data.

[0021] Thirdly, the present invention provides a vehicle comprising: a controller and an ambient light, the controller comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the light effect control method of the first aspect or any corresponding embodiment described above.

[0022] Fourthly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the light effect control method described in the first aspect or any corresponding embodiment thereof.

[0023] Fifthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the light effect control method described in the first aspect or any corresponding embodiment thereof.

[0024] In a sixth aspect, the present invention provides a computer program product, including computer instructions for causing a computer to execute the light effect control method described in the first aspect or any corresponding embodiment thereof. Attached Figure Description

[0025] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0026] Figure 1 This is a schematic flowchart of the first type of lighting effect control method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the LED strip layout configuration of the lighting effect control method according to an embodiment of the present invention; Figure 3 This is a second flowchart illustrating the lighting effect control method according to an embodiment of the present invention; Figure 4 This is a structural block diagram of a lighting effect control device according to an embodiment of the present invention; Figure 5 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0029] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0030] According to an embodiment of the present invention, a lighting effect control method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0031] This embodiment provides a lighting effect control method. Figure 1 This is a flowchart of a lighting effect control method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps: Step S101: Obtain the LED strip layout configuration file, lighting effect video, and motion effect parameter table.

[0032] The light strip layout configuration file records the coordinate information of the ambient light strip's visual graphics in a standardized canvas, as well as the correspondence between the light strip and the control bus and LED beads. The lighting effect video provides a dynamic visual reference for the target lighting effect, with each frame corresponding to the light strip's color, brightness, and other display status information at a specific moment. The animation parameter table describes the correspondence between lighting effect types and bus types, as well as the lighting effect change sequence, which may include frame switching frequency, loop count, gradient control parameters, and animation parameters (such as color transition speed and brightness gradient coefficient).

[0033] In some optional implementations, when acquiring the LED strip layout configuration file, lighting effect video, and motion effect parameter table, pre-stored files can be read directly through the local storage module; alternatively, the latest version of the configuration file, lighting effect video, and motion effect parameter table can be downloaded from the cloud server through the network communication module; custom files uploaded by users through the human-computer interaction interface can also be received. Simultaneously, after acquisition, these files are validated for validity. For example, it checks whether the coordinate information in the LED strip layout configuration file is complete and conforms to the standardized canvas size requirements, whether the encoding format of the lighting effect video is a system-supported type, and whether the frame switching frequency in the motion effect parameter table is within the hardware's processing range. If the validation fails, a corresponding error message is generated and fed back to the user or control terminal for adjustment of relevant parameters or re-acquisition.

[0034] In some optional implementations, when obtaining the light strip layout configuration file, a visual graphic of the ambient light strip can be created on a standardized canvas of a preset size. The visual graphic includes at least one of point light source graphic and light guide strip graphic; the correspondence between the light strip and the corresponding control bus and LED beads is established; and the light strip layout configuration file is generated based on the coordinate information of the visual graphic, the correspondence, and the color coordinates.

[0035] The standardized canvas can use a unified sRGB color gamut (white background, RGB: 255, 255, 255), and is configured with a fixed reference coordinate system (e.g., with the top left corner of the canvas as the origin (0, 0)). The default canvas size is 400×400 pixels. The control bus can include two types: LIN bus and CAN bus. The LIN bus can include Bus ZCUP-LIN-5…Bus ZCUP-LIN-8…Bus ZCUP-LIN-11, Bus ZCUP-LIN-12, etc., and can be dynamically added or removed, with a maximum of 6 buses. A single control bus can connect to several LED beads with unique numbers, for example, numbers ranging from 0 to 14, with a maximum of 15 LEDs per bus. The LED strip visualization is available in two types: 10×10 pixel point light sources and 10×60 pixel light guide strips, both black, corresponding to RGB: 0, 0, 0, and their position and size can be adjusted by dragging. Each LED bead is bound to a color-picking coordinate, and all color-picking coordinates fall within the outline of the corresponding visual graphic. After binding, the LED strip layout configuration file in XML or JSON format can be exported with one click. The file can contain information such as canvas size, vehicle type, LED strip coordinates (4 endpoints + N color-picking points), and color-picking coordinates. The LED bead corresponding to the control bus is bound to the standardized canvas in a 1:1 ratio. When a component selection and hover command is received, both will be highlighted simultaneously, with the highlighted RGB value being (0, 153, 0), facilitating the positioning of their spatial relationship. Figure 2 As shown.

[0036] Specifically, users can complete operations on a standardized canvas of preset size through a visual editing interface: First, select a point light source graphic or light guide strip graphic from the graphic library, drag it to the corresponding position on the canvas, and adjust the size and shape of the graphic through stretching, rotation, and other operations to make it consistent with the physical layout of the actual ambient light strip; then click on the target graphic on the canvas, select the control bus type and number corresponding to the light strip in the properties panel, and enter the number of LED beads contained in the light strip and the spacing parameters of each LED bead to establish the mapping relationship between the light strip and the control bus and LED beads; then mark the keyframe area that needs to be color sampled in the lighting effect video preview window, convert the pixel coordinates of the area into the corresponding position coordinates on the standardized canvas, and form a color sampling coordinate mapping table; finally, integrate the coordinate information of the visual graphic, the correspondence between the control bus and LED beads, and the color sampling coordinate mapping table to generate a structured light strip layout configuration file, which can be exported as XML or JSON format for easy subsequent reading and parsing.

[0037] As an example, the configuration process for the ambient lighting in a 202X model of a certain S brand SUV is as follows: The user opens the visual editing interface, selects a 400×400 pixel standardized canvas (sRGB color gamut, white background), drags a 10×120 pixel light guide strip graphic from the graphics library to the lower area of ​​the canvas, and stretches and adjusts its length to 120 pixels while keeping the width at 10 pixels to match the physical light strip layout of the vehicle's front doors; then, clicks on the light guide strip graphic, and selects the LIN bus type as Bus in the properties panel. The ZCUP-LIN-5 software is used to input 10 LED beads with a spacing of 10 pixels. Each LED bead is assigned a unique number (0-9), and a mapping relationship between each LED bead and the control bus is established. Then, in the lighting effect video preview window, the blue gradient area in frame 5 is marked. The pixel coordinates of this area (corresponding to the actual light-emitting area of ​​the vehicle's light strip) are converted to a coordinate range of (50, 350) to (140, 350) on a standardized canvas. Color coordinates are then assigned to each LED bead (e.g., LED bead 0 corresponds to (50, 350), LED bead 1 corresponds to (60, 350)... LED bead 9 corresponds to (140, 350)). Finally, the canvas size (400×400), vehicle model (S brand SUV 202X), light strip endpoint coordinates ((50, 345), (170, 345), (170, 355), (50, 355)), color coordinate list, and control bus information are integrated. Data such as ZCUP-LIN-5 and the number of LED beads (10) are used to generate a JSON-formatted LED strip layout configuration file, which can be directly imported into the lighting effect control device for subsequent lighting effect parsing and execution.

[0038] As shown above, by creating a visual graphic containing point light source graphics and light guide strip graphics on a standardized canvas, the layout structure of the ambient light strips can be presented intuitively, making it easy for designers to quickly adjust and verify the rationality of the spatial distribution of the light strips. By establishing the correspondence between the light strips and the corresponding control buses and LED beads, the control affiliation of each light strip and the association with the LED beads can be clarified, avoiding misalignment or confusion of control commands. By integrating the coordinate information of the visual graphic, the correspondence, and the color coordinates to generate a light strip layout configuration file, a reliable basis can be provided for the subsequent accurate extraction of RGB color data from the lighting effect video, further improving the accuracy and stability of the lighting effect control.

[0039] Step S102: Extract RGB color data frame by frame from the light effect video based on the color coordinates in the light strip layout configuration file and the frame rate corresponding to the animation type in the animation parameter table.

[0040] The color coordinates are determined based on the coordinate information of the visual graphic of the light strip in the standardized canvas.

[0041] In some optional implementations, when extracting RGB color data frame by frame from the lighting effect video based on the color coordinates in the light strip layout configuration file and the frame rate corresponding to the animation type in the animation parameter table, the frame sampling interval can be determined according to the frame rate corresponding to the animation type; the lighting effect video can be parsed frame by frame according to the frame sampling interval to obtain at least one frame of lighting effect image; and RGB color data at the corresponding position can be extracted in each frame of lighting effect image based on the color coordinates in the light strip layout configuration file.

[0042] Specifically, if the frame rate corresponding to a certain local animation effect in the animation parameter table is 24 frames per second, then the frame sampling interval is 1 / 24 of a second (approximately 41.67 milliseconds). Starting from the initial frame of the lighting effect video, target frames are selected sequentially according to this interval; if the total video duration is 10 seconds, a total of 240 frames can be extracted. For each extracted lighting effect image, its color gamut is first converted to the sRGB color gamut consistent with the standardized canvas to ensure color display consistency. Then, the color coordinates corresponding to all LEDs in the light strip layout configuration file are traversed. For example, if a color coordinate is (x, y), the RGB value of the pixel at position (x, y) in that frame image is read (e.g., R=100, G=150, B=200). If the pixel corresponding to the color coordinate has an alpha channel (e.g., in PNG format video frames), the RGB value of the transparent area is automatically replaced with the average value of adjacent valid pixels to avoid generating invalid color data. Finally, the RGB color data of all LEDs in each frame are sorted by LED number to form a color data list corresponding to that frame, and stored in association with the frame number to provide basic data for subsequent generation of lighting effect commands. For example, for the front door light strip of the S brand 202X SUV, when extracting the lighting effect image of the 5th frame, the RGB value of LED number 0 at coordinates (50, 350) is (0, 0, 255), the RGB value of LED number 1 at coordinates (60, 350) is (0, 50, 255), and so on. The color data of all LEDs will be organized into an ordered array, which is convenient for subsequent transmission to the corresponding LEDs via the control bus.

[0043] As an example, suppose a user uploads a 5-second video of a dynamic breathing light effect with a resolution of 1920×1080 using a design tool. This video corresponds to the "Gentle Breathing" type in the animation parameter table, with a frame rate of 30 frames per second. First, the light strip layout configuration file is read to obtain the set of color coordinates corresponding to the 120 LEDs of the front door light strip. Then, based on the frame rate of 30 frames per second, the frame sampling interval is determined to be 1 / 30 second (approximately 33.33 milliseconds), and a total of 150 frames of light effect images are extracted from the 5-second video. Each frame image is first converted to the sRGB color gamut, and then the RGB values ​​are extracted for the color coordinates of each LED. For example, in the 10th frame image, the color coordinates (120, 400) of LED number 20 correspond to the RGB value (255, 100, 0), and the coordinates (130, 400) of LED number 21 correspond to (255, 120, 0). For transparent areas (such as the gradient transparency at the edge of the light effect) in a frame of the lighting effect video, the average RGB values ​​of the three adjacent valid pixels are calculated and used to fill the area. Finally, the color data of the 120 LEDs in each frame are sorted by number to generate structured data such as "Frame 10: [255,100,0;255,120,0;...]", which is then stored in a temporary cache.

[0044] As mentioned above, by determining the frame sampling interval according to the frame rate corresponding to the animation type, it is possible to ensure that the sampling rhythm of the frame data is adapted to the dynamic changes of the animation. This avoids both the waste of computing resources caused by excessive sampling and the loss of animation details caused by insufficient sampling. By analyzing the lighting effect video frame by frame and extracting the RGB color data of the corresponding position by combining the color coordinates, it is possible to achieve accurate mapping between the color information in the lighting effect image and the actual light strip layout. This ensures that the color output of each LED bead or light guide strip is highly consistent with the visual effect in the lighting effect video, providing an accurate and consistent color basis for the generation and issuance of subsequent lighting effect commands. This effectively improves the real-time performance and fidelity of lighting effect control, making the dynamic effect of the ambient light more in line with the design expectations.

[0045] In some optional implementations, when determining the frame sampling interval according to the frame rate corresponding to the motion effect type, if the motion effect type is a global motion effect, the frame sampling interval is determined to be the ratio of the original frame rate of the lighting effect video to the first frame rate corresponding to the motion effect type; if the motion effect type is a local motion effect, the frame sampling interval is determined to be the ratio of the original frame rate of the lighting effect video to the second frame rate corresponding to the motion effect type, where the second frame rate is greater than the first frame rate.

[0046] Global motion effects refer to a lighting effect mode in which all controlled ambient light strips synchronously change color and brightness. This mode is constrained by the corresponding bus protocol, and the number of effective colors activated at the same time is less than or equal to the bus limit threshold. Local motion effects refer to a lighting effect mode in which only a specific set of light strips inside the vehicle undergoes light changes, while the remaining light strips maintain their original state. For example, the number of effective colors for global motion effects can be 1 to 2, while the number of effective colors for local motion effects can be 1. The frame rate (FPS1) for global motion effects can be 25 (refreshed every 40ms), and the frame rate (FPS2) for local motion effects can be 50 (refreshed every 20ms). For example, for a certain M brand sedan, the motion effect type corresponding to its global breathing light effect is global motion effect, and the first frame rate (FPS1) in the motion effect parameter table is set to 25. If the original frame rate of the lighting effect video is 60 frames / second, the calculated frame sampling interval is 60 / 25 = 2.4. In actual operation, rounding can be used to extract 1 frame every 2 or 3 frames to ensure that the sampling frame rate is close to 25 frames / second. The local welcome lighting effect of this car model (only the door light strips light up and fade) corresponds to a local animation effect type. The second frame rate (FPS2) is set to 50, and the original video frame rate is still 60 frames / second. The calculated frame sampling interval is 60 / 50 = 1.2, that is, sampling once every 1 or 2 frames to make the sampling frame rate approach 50 frames / second. In the actual sampling process, the target frames to be extracted can be calculated based on the frame number and sampling interval of the original video. For example, under the global animation effect, frame 0, frame 2, and frame 5 are extracted sequentially (with an interval of 2 or 3) to ensure that the frame rate after final sampling meets the requirements of the animation parameter table, while ensuring the smoothness and consistency of the lighting effect.

[0047] As an example, the global "starry sky gradient" animation effect of a certain T-brand pure electric SUV 202U is a global animation effect, and the first frame rate (FPS1) in the animation parameter table is set to 25. The original frame rate of the car's lighting effect video is 60 frames per second, and the calculated frame sampling interval is 60 / 25 = 2.4. In actual sampling, a dynamic adjustment strategy is adopted: when the frame number is even, it is extracted at an interval of 2 frames, and when the frame number is odd, it is extracted at an interval of 3 frames. For example, frames 0, 2, 5, and 7 are extracted in sequence, and the final sampling frame rate is stabilized at about 25 frames per second, which ensures the smoothness of the lighting effect and avoids data redundancy. The local "door welcome light" animation effect of this car model (only the front and rear door light strips perform an orange gradient from the outside to the inside) corresponds to a local animation effect type. The second frame rate (FPS2) is set to 50, and the original video frame rate is still 60 frames / second. The calculated sampling interval is 60 / 50 = 1.2. In actual operation, the sampling is performed alternately every 1 frame (e.g., frames 0, 1, 2, 3) and every 2 frames (e.g., frames 4, 6, 8) to keep the sampling frame rate close to 50 frames / second, ensuring a smooth transition of the local animation effect. After sampling, the color data of all extracted frames will be organized into a structured array according to the LED number and frame sequence number, providing accurate color input for subsequent generation of control bus commands.

[0048] As mentioned above, to address the differences in characteristics between global and local animation effects, a differentiated frame rate calculation frame sampling interval is adopted. This effectively reduces the computational load and avoids unnecessary resource consumption in global animation effect scenarios. In local animation effect scenarios, by using a frame interval setting corresponding to a higher sampling frame rate, subtle dynamic changes in local areas can be accurately captured, ensuring the detail performance of local animation effects. This achieves adaptation optimization for different types of animation effects, further improving the efficiency and effect of lighting effect control. At the same time, the differentiated sampling strategy not only takes into account the rational use of system resources but also ensures the visual fidelity of various animation effects, making the lighting effects both smooth and natural as well as precise and delicate, better meeting users' needs for ambient lighting effects in different scenarios.

[0049] Step S103: Generate lighting effect data based on the bus type and RGB color data in the motion effect parameter table.

[0050] Among them, the LIN bus can carry no more than two types of dynamic color at the same time; the CAN bus has no limit on the number of colors and can match the corresponding color pickers according to the number of LEDs.

[0051] In some optional implementations, when generating lighting effect data based on the bus type and RGB color data in the motion effect parameter table, the bus type corresponding to the current lighting effect can be determined first according to the motion effect parameter table: if the bus type is LIN bus, then color clustering analysis is performed on the RGB color data extracted from each frame to select the 1-2 most frequent main colors, and the gradient control parameters (such as color transition speed) in the motion effect parameter table are combined to calculate the gradient step size of the main colors in adjacent frames, generating lighting effect data that conforms to the LIN bus protocol, ensuring that the number of colors transmitted on the bus at the same time does not exceed 2; if the bus type is CAN bus, then the RGB color data corresponding to each LED in each frame is directly sorted by LED number, and the brightness component of the RGB value is adjusted in combination with the brightness gradient coefficient in the motion effect parameter table to generate lighting effect data containing the real-time color information of all LEDs, without limiting the number of colors. For example, regarding the LIN bus (Bus ZCUP-LIN-5) of the front doors of the S brand 202X SUV, if the extracted RGB data of a certain frame contains multiple colors, clustering is used to retain the two main colors: blue (RGB:0,0,255) and light blue (RGB:0,50,255). Based on the color transition speed of 5ms / step in the animation parameter table, it is calculated that the gradient from blue to light blue requires 10 steps. Each step adjusts the G component by 5, generating 10 intermediate frames of lighting effect data. For the center console light strip using the CAN bus, the RGB data (such as red, green, blue, and other colors) of all LEDs in each frame can be directly packaged by number to generate lighting effect command data that can be sent directly. In addition, when generating lighting effect data, the generated single-cycle lighting effect data can be repeated a corresponding number of times based on the loop count in the animation parameter table to form a complete cyclic lighting effect sequence, ensuring that the lighting effect is continuously executed according to preset rules.

[0052] As an example, the center console light strip of the T brand 202U pure electric SUV uses a CAN bus (Bus CTR-CAN-3), corresponding to the "Multi-color Flowing" global animation effect in the animation parameter table, with a preset loop count of 5. A total of 150 frames of color data are extracted from user-uploaded lighting effect videos, each frame containing the RGB values ​​of 180 LEDs on the center console. When generating the lighting effect data, each frame of RGB data is directly sorted by LED number, combined with a brightness gradient coefficient of 0.8 in the animation parameter table (multiplying each RGB component by 0.8) to obtain adjusted color data. Then, according to the preset loop requirements, the 150 frames of single-cycle data are repeated 5 times to form a complete lighting effect sequence of 750 frames. The roof ambient light strip uses a LIN bus (Bus ROOF-LIN-2), corresponding to the "Warm Light Breathing" local animation effect, with a preset loop count of 3. After color clustering, the extracted RGB data for each frame retains two primary colors: warm yellow (RGB:255,200,100) and orange (RGB:255,150,50). Based on the transition speed of 8ms / step in the animation parameter table, the gradient step size of the primary color in adjacent frames is calculated (e.g., R component remains unchanged, G component decreases by 10 per step, B component decreases by 20 per step), generating 200 frames of lighting effect data per cycle. This process is repeated three times to obtain a 600-frame loop sequence. Finally, these two sets of lighting effect data are sent to the center console and the LED light strip on the roof via the corresponding CAN and LIN buses, respectively, to achieve synchronized and protocol-compliant dynamic lighting effect display.

[0053] Step S104: Control the ambient light to output the corresponding light effect based on the lighting effect data.

[0054] Specifically, the lighting effect data can first be encapsulated into control frames conforming to the corresponding bus protocol based on the bus type. For the LIN bus, the main color and gradient step size information of each frame are packaged according to the LIN protocol frame format (including frame header, bus address, data segment, and checksum), and sent to the control node of the target light strip through the LIN bus interface. After receiving the data, the control node adjusts the duty cycle of the PWM signal of the connected LED beads sequentially according to the gradient parameters in the lighting effect data to achieve a smooth color transition. For the CAN bus, the RGB color data of each LED bead in each frame is encapsulated according to the CAN message format (including extended frame ID, data length code, and bead color array), and sent to the corresponding node through the CAN bus at a preset period (e.g., 10ms / frame). After parsing the message, the node directly drives each bead to output the corresponding RGB color. At the same time, the feedback signal of the bus is monitored in real time. If a data transmission error is detected (e.g., checksum failure), a retry mechanism is automatically triggered to ensure that the lighting effect data is delivered accurately. For scenarios involving multi-bus collaboration, the transmission time of lighting effect data on different buses can be calibrated based on the synchronization markers in the dynamic effect parameter table to ensure the synchronization of global or local dynamic effects. For example, after receiving the gradient lighting effect data, the LIN bus (Bus ZCUP-LIN-5) of the front doors of the S brand 202X SUV sends an update command every 5ms, controlling the G component of 10 LEDs to gradually increase from 0 to 50, achieving a gradient effect from blue to light blue. The CAN bus of the center console sends a message containing the color information of all LEDs every 10ms, enabling the center console light strip to synchronously present a multi-color dynamic effect. In addition, if an abnormal feedback signal of a certain LED is detected (such as an open circuit), that LED is removed from the lighting effect sequence, ensuring the normal operation of the remaining LEDs while maintaining the integrity of the overall lighting effect.

[0055] As an example, the sliding door light strip of the H brand 202X MPV uses LIN bus (Bus SLIDE-LIN-4) communication, corresponding to the "Welcome Flowing Water" local animation effect in the animation parameter table. The generated lighting effect data includes the main color of each frame (e.g., ice blue RGB:0,150,255) and the gradient step size (increasing the B component by 5 every 3ms). All data is encapsulated according to the LIN protocol frame format: the frame header is set to 0x5A, the bus address is set to 0x12, the data segment contains the current main color RGB value, the gradient step size, and the remaining number of loops, and the parity bit uses parity checking. The encapsulated control frame is sent to the sliding door light strip control node through the LIN bus interface at a frequency of 5ms / frame. After receiving the control frame, the sliding door light strip control node parses the data segment information and controls the color gradient of 15 LEDs by adjusting the PWM duty cycle to achieve the effect of ice blue light flowing from the outside to the inside of the door. Meanwhile, the control node sends a status message after receiving 10 frames of data. If the main control unit detects an error code in the status message (such as 0x02 indicating data loss), it immediately retransmits the previous 10 frames of lighting effect data to ensure continuous and uninterrupted lighting effects. When the vehicle is turned off, the light strip control node gradually reduces the brightness of all LEDs to 0 based on the received termination command, completing the lighting effect display.

[0056] The lighting effect control method provided in this embodiment can ensure that the color sampling position matches the designed ambient light strip visualization graphic by obtaining the coordinate information in the light strip layout configuration file; it can ensure the smoothness of the animation and the color reproduction by extracting RGB color data frame by frame based on the frame rate in the animation parameter table; and it can effectively reduce the deviation between the actual lighting effect and the designed lighting effect by generating adapted lighting effect data according to the bus type, thereby improving the consistency and reproduction of the lighting effect display, and creating an immersive interactive environment that is more in line with the design expectations for drivers and passengers.

[0057] This embodiment provides a lighting effect control method. Figure 3 This is a flowchart of a lighting effect control method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps: Step S301: Obtain the LED strip layout configuration file, lighting effect video, and animation parameter table. For details, please refer to [link to relevant documentation]. Figure 1 Step S101 of the illustrated embodiment will not be described again here.

[0058] Step S302: Based on the color coordinates in the light strip layout configuration file and the frame rate corresponding to the animation type in the animation parameter table, extract RGB color data frame by frame from the light effect video. For details, please refer to [link to relevant documentation]. Figure 1 Step S102 of the illustrated embodiment will not be described again here.

[0059] Step S303: Generate lighting effect data based on the bus type and RGB color data in the motion effect parameter table.

[0060] Specifically, step S303 includes: Step S3031: Verify the number of RGB color data types according to the number of colors corresponding to the bus type, and obtain the verification result.

[0061] In some optional implementations, when verifying the number of RGB color data types based on the number of colors corresponding to the bus type, if the bus type is the first bus and the number of RGB color data types is less than or equal to the type threshold, then the verification result is passed; if the bus type is the second bus and the number of RGB color data types is consistent with the number of color sampling points, then the verification result is passed. The first bus can be a LIN bus, and the second bus can be a CAN bus.

[0062] Specifically, if the bus type is LIN bus (first bus), its corresponding color type threshold is 2. Assuming the extracted RGB color data for a frame contains red, green, and blue, exceeding the threshold of 2, the verification result is failed. In this case, a color optimization mechanism is triggered, using K-means clustering to select the two most frequent primary colors and replace the original multi-color data, ensuring the LIN bus's color quantity limit is met. If the bus type is CAN bus (second bus), the number of color sampling points is 15 (corresponding to 15 LED beads). If the number of RGB color types in a frame is 12, inconsistent with the number of sampling points, the verification result is failed. In this case, a color interpolation algorithm based on adjacent valid pixels can be used to supplement the missing color sampling points with corresponding RGB values, matching the number of color types with the number of sampling points, ensuring each LED bead has corresponding color data. Furthermore, after successful verification, the verification result can be associated with the color data of the current frame for quick retrieval when generating subsequent lighting effect data, improving overall processing efficiency.

[0063] As described above, for the first bus, by setting a threshold for color types, greater flexibility in lighting effect design is provided while ensuring data compliance. This allows designers to adjust the number of color types according to actual needs without strictly matching color sampling points, making it suitable for lighting effect scenarios with relatively low requirements for color richness but requiring rapid iteration. For the second bus, a verification rule that forces the number of color data types to be consistent with the number of color sampling points ensures that each color sampling point corresponds to accurate color data, effectively avoiding lighting effect display deviations caused by missing or redundant data. This is especially suitable for complex dynamic lighting effect scenarios requiring high-precision color reproduction. This differentiated verification not only further improves the effectiveness and adaptability of lighting effect data but also optimizes the lighting effect control process based on the hardware characteristics of different buses, reducing unnecessary computational overhead and thus improving the overall efficiency and stability of lighting effect control.

[0064] Step S3032: Generate mask data based on the verification results and the arrangement order of each LED bead under the control bus in the LED strip layout configuration file.

[0065] In some optional implementations, when generating mask data based on the verification result and the arrangement order of each LED bead under the control bus, if the verification result indicates that the verification is passed, then based on the preset arrangement order of each LED bead under the control bus, a corresponding bit is assigned to each LED bead; the bit position of the LED bead corresponding to each RGB color data is set to 1, and the remaining bits are set to 0; all bits corresponding to the same RGB color data are bitwise ORed to generate mask data corresponding to the RGB color data.

[0066] Specifically, taking a car door light strip as an example, this light strip uses LIN bus control and contains 8 LED beads, with a preset arrangement of beads 1 to 8. Assume that the RGB color data after a frame passes verification is of two types: blue (corresponding to beads 1, 3, and 5) and light blue (corresponding to beads 2, 4, 6, 7, and 8). First, bits are assigned to each bead: bead 1 corresponds to bit 0, bead 2 to bit 1, bead 3 to bit 2, bead 4 to bit 3, bead 5 to bit 4, bead 6 to bit 5, bead 7 to bit 6, and bead 8 to bit 7. Next, the bits corresponding to blue beads 1, 3, and 5 are set to 1, resulting in binary data 0010101 (decimal 21); the bits corresponding to light blue beads 2, 4, 6, 7, and 8 are set to 1, resulting in binary data 1111010 (decimal 122). Finally, a bitwise OR operation is performed on these two binary data, resulting in 11111111 (decimal 255), which generates the mask data corresponding to the RGB color data of this frame. This mask data can be used to quickly locate the LED beads that need to be applied with the corresponding color when generating subsequent lighting effect data, avoiding traversing and judging each LED bead one by one, and effectively improving data processing efficiency.

[0067] As shown above, the method of generating mask data based on the arrangement order of each LED bead under the control bus can accurately map the correspondence between RGB color data and LED beads, ensuring that the color display of each bead is highly consistent with the design expectation, effectively avoiding problems such as display misalignment or color chaos in the lighting effect; at the same time, the generation process of mask data is simplified by bitwise OR operation, reducing the amount of data processing calculation and improving the response speed of lighting effect control.

[0068] Step S3033: Generate lighting effect data based on RGB color data and mask data.

[0069] Specifically, if the bus type is LIN bus, the RGB data of each primary color after verification is associated with the corresponding mask data one by one, and the gradient step size, loop count and other parameters in the animation parameter table are incorporated into it, and encapsulated into a LIN data frame including color identifier, mask value and gradient control information; for example, for the blue primary color of the aforementioned door light strip, the RGB (0,0,255), mask 21 (binary 0010101), gradient step size 5ms and other information are packaged according to the frame structure of the LIN protocol to form a lighting effect data unit that can be sent directly. If the bus type is CAN bus, the RGB data of each LED in each frame is combined with the mask data (usually all 1s, indicating that all LEDs need to be updated) in a preset order, supplemented with the brightness adjustment coefficient in the dynamic effect parameter table, and then organized according to the data segment format of the CAN message to generate lighting effect data containing the real-time color information of all LEDs. For example, for the 15 LEDs of the center console light strip, the RGB values ​​of each LED are arranged in numerical order, the mask data is set to 0x7FFF (15 bits all 1s), and a brightness coefficient of 0.9 is added. Finally, it is encapsulated into a CAN extended frame to ensure that the data is complete and meets the protocol requirements. In addition, when generating lighting effect data, the transmission priority can also be assigned to different types of lighting effect data according to the priority settings in the dynamic effect parameter table. For example, the priority of the emergency warning lighting effect is higher than that of the ordinary welcome lighting effect to ensure the real-time response and execution of key lighting effects.

[0070] As an example, the trunk light strip of the 202Y sedan from the M brand uses a LIN bus (Bus TRUNK-LIN-6), corresponding to the "trunk opening prompt" local animation in the animation parameter table. This animation has a preset loop count of 2 times and a gradient step size of 4ms / step. First, RGB color data for each frame is extracted from the lighting effect video. Verification reveals that the bus type is LIN (first bus), and the number of color types is 3, exceeding the threshold of 2. This triggers a K-means clustering algorithm to filter out two main colors: white (RGB:255,255,255) and silver (RGB:200,200,200). Next, mask data is generated: the light strip contains 6 LED beads, arranged in the order of beads 1 to 6. White corresponds to beads 1, 2, and 3, and silver corresponds to beads 4, 5, and 6. After assigning bits to each LED, bits 0-2 corresponding to white are set to 1, resulting in binary 000111 (decimal 7). Bits 3-5 corresponding to silver are set to 1, resulting in binary 111000 (decimal 56). The bitwise OR operation yields 111111 (decimal 63). Finally, the lighting effect data is generated: the white RGB value, mask 7, gradient step size 4ms, the silver RGB value, mask 56, gradient step size 4ms, and the loop count 2 are combined and encapsulated into a control frame conforming to the LIN protocol (frame header 0x6B, bus address 0x18, data segment containing color identifier, mask value, gradient parameters, and loop count, parity check). The control frame is sent to the trunk light strip control node at a frequency of 4ms / frame. After parsing, the trunk light strip control node adjusts the PWM duty cycle to achieve a gradient flow effect from white to silver, automatically stopping after two loops. Meanwhile, the trunk light strip control node receives a status update every 5 frames of data. If error code 0x03 (frame format error) is detected, the corresponding frame data is immediately retransmitted to ensure smooth display of the lighting effect.

[0071] Step S304: Control the ambient light output to produce the corresponding lighting effect based on the lighting effect data. For details, please refer to [link / reference]. Figure 1 Step S101 of the illustrated embodiment will not be described again here.

[0072] The lighting effect control method provided in this embodiment verifies the types of RGB color data by checking the number of colors corresponding to the bus type. This can avoid abnormal lighting effect display problems caused by data mismatch in advance and ensure the validity of the lighting effect data. Based on the mask data generated by the light strip layout configuration file, the RGB color data can be accurately mapped to the corresponding positions of each LED bead, ensuring that the lighting effect is accurately presented on the physical light strip, avoiding misalignment or confusion, improving the stability and flexibility of lighting effect control, and better adapting to the lighting effect requirements under different hardware configurations, so that the intention of lighting effect design can be fully and accurately realized.

[0073] In some optional implementations, after generating the lighting effect data, the color difference of the RGB color values ​​corresponding to the same LED bead in adjacent frames of RGB color data can be calculated; the RGB color data can be updated based on the temporal characteristics of the transition frames, global animations, and local animations corresponding to the color difference to obtain RGB color update data; similar colors in the RGB color update data with visual differences less than a preset color difference threshold can be merged into the same standard color value, and the mask data corresponding to the LED bead can be updated based on the merging result to obtain mask update data; color difference correction and brightness compensation can be performed on the RGB color update data after similar color merging to obtain target RGB color data; the lighting effect data can be updated based on the quality score results corresponding to the target RGB color data and the mask update data.

[0074] Specifically, taking the ambient lighting strip in the center console of the 202Z SUV of the S brand as an example, this light strip is controlled by a CAN bus (BusCENTER-CAN-9), corresponding to the "Driving Mode Linkage" global animation in the animation parameter table. When the driving mode switches from Eco mode to Sport mode, the RGB color difference of the same LED bead in adjacent frames (Eco mode frame and Sport mode frame) is first calculated: taking LED bead 6 as an example, its RGB value is (0,200,0) in Eco mode and (255,0,0) in Sport mode. The color difference is calculated using the Euclidean distance formula. If the value exceeds the preset transition threshold of 150, a transition frame generation mechanism is triggered, inserting 5 transition frames. The RGB values ​​of each frame gradually transition from green to red using linear interpolation (e.g., transition frame 1 is (51, 160, 0), transition frame 2 is (102, 120, 0), etc.). Next, based on the temporal characteristics of global and local animation effects (global animation effects need to synchronize all light strips inside the vehicle, while local animation effects only apply to specific areas), the RGB data of the transition frames and the original frames are integrated to obtain RGB color update data. Subsequently, similar colors in the RGB color update data are merged: for example, the visual difference between (153, 80, 0) in transition frame 3 and (160, 75, 0) in transition frame 4 is less than the preset color difference threshold of 20, and they are merged into the standard color value (156, 78, 0). At the same time, the corresponding mask data is updated: the bits of the corresponding LEDs in the original mask for these two frames are kept at 1 to ensure the accuracy of color application. Next, color difference correction and brightness compensation were performed: gamma correction (γ=1.2) was used to adjust the darker red component in the transition frame, making the color transition more natural; combined with the ambient light sensor data (e.g., the current ambient light intensity is 500 lux), the brightness of all LEDs was compensated by 15% to avoid insufficient light effect recognition under strong light. Finally, based on the quality score results of the target RGB color data and mask update data (e.g., a smoothness score of 92 points and a color accuracy score of 88 points), the lighting effect data was fine-tuned: one transition frame was added to improve smoothness, and the color values ​​of two LEDs were corrected to improve accuracy. The final updated lighting effect data can achieve a smooth transition of the ambient light strip from green to red when switching driving modes, and the brightness is adapted to the current in-vehicle environment, improving the user experience.

[0075] As an example, when the driver's side door is opened, the local animation "Welcome Mode" is activated. First, the color difference between adjacent frames of the initial state of the door light strip (off, RGB value (0,0,0)) and the target state of Welcome Mode (warm yellow, RGB value (255,200,100)) is calculated using the Euclidean distance formula. The color difference is approximately 320, which is greater than the preset transition threshold of 180. Therefore, the transition frame generation mechanism is triggered, inserting 8 transition frames. Each frame undergoes non-linear interpolation according to a fade-in / fade-out curve (e.g., transition frame 1 is (30,24,12), transition frame 4 is (128,100,50), etc.), making the color transition more layered. Next, considering the timing characteristics of this local animation only affecting the driver's side door light strip, the RGB data of the transition frames and the target frame are integrated to obtain the door light strip's exclusive RGB color update data. Subsequently, similar colors are merged: In this example, the color difference between (200,160,80) in transition frame 5 and (205,165,82) in transition frame 6 is less than 15, and they are merged into the standard color value (203,163,81). At the same time, the corresponding mask data is updated to ensure that only the bit position of the driver's side door light strip is 1, so as to avoid affecting the lighting effect of other areas. After that, color difference correction and brightness compensation are performed: By adjusting the gamma correction value of the blue component (γ=1.1), the warm yellow tone is made softer and less dazzling; combined with the nighttime ambient light sensor data (current ambient light intensity is 0 lux), the brightness of the door light strip is compensated by 20% to enhance nighttime visibility. Finally, based on the quality score results of the target RGB color data and mask update data (smoothness 95 points, local adaptation 90 points), the lighting effect data is fine-tuned: the interpolation curve of the transition frame is optimized to make the brightness increase in the initial stage smoother; the red component deviation of one LED is corrected to ensure the consistency of the warm yellow tone. The final updated lighting effect data achieves a natural gradient from off to warm yellow when the car door is opened, which not only enhances the user's sense of welcome but also adapts to the visual needs of the nighttime environment.

[0076] The lighting effect control method provided in this embodiment calculates the color difference of the RGB color values ​​of the same LED bead in adjacent frames, and updates the RGB color data by combining the temporal characteristics of transition frames, global animations, and local animations. This enables a smooth transition of lighting effects, effectively avoiding visual flickering or jump problems caused by sudden color changes between frames, and improving the continuity and smoothness of the lighting effect display. By merging similar colors with visual differences less than a preset threshold and updating the mask data, the redundancy of data transmission and processing can be significantly reduced, further optimizing the consumption of computing resources and accelerating the response speed of the lighting effect. By performing color difference correction and brightness compensation on the RGB color update data after similar color merging, the individual color deviation of the LED bead can be calibrated to ensure the consistency of color output between different LED beads, improving the comfort and professionalism of the visual experience. Finally, the lighting effect data is dynamically updated based on the quality score results corresponding to the target RGB color data and the mask update data, which can realize closed-loop optimization of the lighting effect, ensuring that the lighting effect performance always meets the design standards and user expectations, and improving the accuracy and reliability of the overall lighting effect control.

[0077] This embodiment also provides a lighting effect control device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0078] This embodiment provides a lighting effect control device, such as... Figure 4 As shown, it includes: The data acquisition module 401 is used to acquire the light strip layout configuration file, lighting effect video and animation parameter table. The light strip layout configuration file is used to record the coordinate information of the visual graphic of the ambient light strip in the standardized canvas. The data extraction module 402 is used to extract RGB color data frame by frame from the light effect video based on the color coordinates in the light strip layout configuration file and the frame rate corresponding to the animation type in the animation parameter table. The color coordinates are determined based on the coordinate information of the visual graphic of the light strip in the standardized canvas. Data generation module 403 is used to generate lighting effect data based on the bus type and RGB color data in the motion effect parameter table; The lighting effect control module 404 is used to control the ambient light output corresponding lighting effects based on the lighting effect data.

[0079] In some optional implementations, the data acquisition module 401 includes: The graphic creation unit is used to create a visual graphic of an ambient light strip on a standardized canvas of a preset size. The visual graphic includes at least one of point light source graphics and light guide strip graphics. The relationship establishment unit is used to establish the correspondence between the light strip and the corresponding control bus and LED beads; The file generation unit is used to generate a light strip layout configuration file based on the coordinate information, correspondence, and color coordinates of the visualized graphic.

[0080] In some alternative implementations, the data extraction module 402 includes: An interval determination unit is used to determine the frame sampling interval according to the frame rate corresponding to the motion effect type. The video parsing unit is used to parse the lighting effect video frame by frame according to the frame sampling interval to obtain at least one frame of lighting effect image; The data extraction unit is used to extract the RGB color data of the corresponding position in each frame of the light effect image based on the color coordinates in the light strip layout configuration file.

[0081] In some optional implementations, the interval determination unit includes: The first interval determination subunit is used to determine the frame sampling interval as the ratio of the original frame rate of the lighting effect video to the first frame rate corresponding to the motion effect type if the motion effect type is a global motion effect. The second interval determination subunit is used to determine the frame sampling interval as the ratio of the original frame rate of the lighting effect video to the second frame rate corresponding to the motion effect type if the motion effect type is a local motion effect. The second frame rate is greater than the first frame rate.

[0082] In some alternative implementations, the data generation module 403 includes: The data verification unit is used to verify the number of types of RGB color data according to the number of colors corresponding to the bus type, and obtain the verification result. The mask generation unit is used to generate mask data based on the verification results and the arrangement order of each LED bead under the control bus in the LED strip layout configuration file. The lighting effect generation unit is used to generate lighting effect data based on RGB color data and mask data.

[0083] In some optional implementations, the data verification unit includes: The first verification subunit is used to obtain a verification result if the bus type is the first bus and the number of types of RGB color data is less than or equal to the type threshold. The second verification subunit is used to obtain a verification result if the bus type is the second bus and the number of RGB color data types is consistent with the number of color sampling points.

[0084] In some optional implementations, the mask generation unit includes: The bit allocation subunit is used to allocate corresponding bits to each LED based on the preset arrangement order of each LED under the control bus if the verification result indicates that the verification is passed. The bit position subunit is used to set the bit position of the LED corresponding to each RGB color data to 1, and the remaining bits to 0; The mask data generation subunit is used to perform a bitwise OR operation on all bits corresponding to the same RGB color data to generate mask data corresponding to the RGB color data.

[0085] In some alternative implementations, the data generation module 403 further includes: The color difference calculation unit is used to calculate the color difference of the RGB color values ​​of the same LED in adjacent frames of RGB color data. The color update unit is used to update the RGB color data based on the temporal characteristics of the transition frames, global animations and local animations corresponding to the color difference, so as to obtain the RGB color update data. The mask update unit is used to merge similar colors in the RGB color update data whose visual difference is less than a preset color difference threshold into the same standard color value, and update the mask data corresponding to the LED beads based on the merging result to obtain the mask update data. The color difference correction unit is used to perform color difference correction and brightness compensation on the RGB color update data after similar colors have been merged to obtain the target RGB color data. The lighting effect update unit is used to update the lighting effect data based on the quality score results corresponding to the target RGB color data and the mask update data.

[0086] The lighting effect control device provided in this embodiment of the invention can execute the lighting effect control method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the various modules and units described above are the same as in the corresponding embodiments described above, and will not be repeated here.

[0087] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0088] The following is a detailed reference. Figure 5The diagram illustrates a structural schematic suitable for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 501, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 502 or a program loaded from memory 508 into random access memory (RAM) 503. The RAM 503 also stores various programs and data required for the operation of the electronic device. The processor 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0089] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 508 including, for example, magnetic tapes, hard disks, etc.; and communication devices 509. Communication device 509 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0090] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 509, or installed from a memory 508, or installed from a ROM 502. When the computer program is executed by the processor 501, it performs the functions defined in the lighting effect control method of the embodiments of the present invention.

[0091] Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0092] This invention also provides a vehicle, which includes a controller and an ambient light. The controller includes a memory and a processor, which are communicatively connected. The memory stores computer instructions, and the processor executes the computer instructions to perform the lighting control method shown in the above embodiments.

[0093] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the lighting effect control method shown in the above embodiments is implemented.

[0094] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0095] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A lighting effect control method, characterized in that, The method includes: Obtain the LED strip layout configuration file, lighting effect video, and animation parameter table; Based on the color coordinates in the light strip layout configuration file and the frame rate corresponding to the animation type in the animation parameter table, RGB color data is extracted frame by frame from the light effect video; Based on the bus type and RGB color data in the animation parameter table, generate lighting effect data; The ambient light output is controlled according to the lighting effect data.

2. The method according to claim 1, characterized in that, Obtaining the LED strip layout configuration file includes: Create a visual graphic of the ambient light strip on a standardized canvas of a preset size. The visual graphic includes at least one of point light source graphic and light guide strip graphic. Establish the correspondence between the light strip and the corresponding control bus and LED beads; The light strip layout configuration file is generated based on the coordinate information of the visualized graphic, the corresponding relationship, and the color coordinates.

3. The method according to claim 1, characterized in that, The step of extracting RGB color data frame by frame from the light effect video based on the color coordinates in the light strip layout configuration file and the frame rate corresponding to the animation type in the animation parameter table includes: The frame sampling interval is determined according to the frame rate corresponding to the animation type. The lighting effect video is analyzed frame by frame according to the frame sampling interval to obtain at least one frame of lighting effect image; Based on the color coordinates in the light strip layout configuration file, RGB color data at the corresponding position is extracted in each frame of the light effect image.

4. The method according to claim 3, characterized in that, The step of determining the frame sampling interval according to the frame rate corresponding to the motion effect type includes: If the motion effect type is a global motion effect, then the frame sampling interval is determined to be the ratio of the original frame rate of the lighting effect video to the first frame rate corresponding to the motion effect type; If the motion effect type is a local motion effect, then the frame sampling interval is determined to be the ratio of the original frame rate of the lighting effect video to the second frame rate corresponding to the motion effect type, wherein the second frame rate is greater than the first frame rate.

5. The method according to claim 1, characterized in that, The process of generating lighting effect data based on the bus type and RGB color data in the motion effect parameter table includes: Based on the number of colors corresponding to the bus type, the number of types of the RGB color data is verified to obtain the verification result; Based on the verification results and the arrangement order of each LED bead under the control bus in the LED strip layout configuration file, mask data is generated. The lighting effect data is generated based on the RGB color data and the mask data.

6. The method according to claim 5, characterized in that, The step of verifying the number of types of RGB color data according to the number of colors corresponding to the bus type, and obtaining the verification result, includes: If the bus type is the first bus and the number of types of RGB color data is less than or equal to the type threshold, then a verification result of passing the verification is obtained. If the bus type is a second bus and the number of types of RGB color data is consistent with the number of color sampling points, then a verification result of passing the verification is obtained.

7. The method according to claim 5, characterized in that, The process of generating mask data based on the verification result and the arrangement order of each LED bead under the control bus includes: If the verification result indicates that the verification is successful, then based on the preset arrangement order of each LED bead under the control bus, a corresponding bit is assigned to each LED bead. Set the bit position of the LED corresponding to each RGB color data to 1, and set the remaining bits to 0; Perform a bitwise OR operation on all bits corresponding to the same RGB color data to generate mask data corresponding to the RGB color data.

8. The method according to any one of claims 1 to 7, characterized in that, After generating the lighting effect data, the method further includes: Calculate the color difference of the RGB color values ​​of the same LED in adjacent frames of RGB color data; The RGB color data is updated based on the temporal characteristics of the transition frames, global animations, and local animations corresponding to the color difference, to obtain updated RGB color data; Similar colors in the RGB color update data with visual differences less than a preset color difference threshold are merged into the same standard color value, and the mask data corresponding to the LED beads is updated based on the merging result to obtain the mask update data; Color difference correction and brightness compensation are performed on the RGB color update data after similar color merging to obtain the target RGB color data; The lighting effect data is updated based on the quality score results corresponding to the target RGB color data and the mask update data.

9. A lighting effect control device, characterized in that, The device includes: The data acquisition module is used to acquire the LED strip layout configuration file, lighting effect video, and animation parameter table. The data extraction module is used to extract RGB color data frame by frame from the light effect video based on the color coordinates in the light strip layout configuration file and the frame rate corresponding to the animation type in the animation parameter table. The data generation module is used to generate lighting effect data based on the bus type and RGB color data in the animation parameter table; The lighting effect control module is used to control the ambient light to output corresponding lighting effects based on the lighting effect data.

10. A vehicle, characterized in that, include: The vehicle includes a controller and ambient lighting. The controller includes a memory and a processor, which are communicatively connected. The memory stores computer instructions, and the processor executes the computer instructions to perform the method of any one of claims 1 to 8.