Light group control method, device, electronic equipment and storage medium
By obtaining target lighting effect data from the driver database and determining and controlling the target lighting area of the lamp group, the problem of long development cycle of lighting effect control in different layouts is solved, and high adaptability and scalability lighting effect control is achieved.
Patent Information
- Application Number
- CN202510100960.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-04-04
AI Technical Summary
When facing lamps with different layouts, the lighting effect control development cycle is long, lacks adaptability and scalability, and professionals need to redesign driver software.
By obtaining the target lamp effect data corresponding to the specified lamp effect mode from the driver database, the target lamp area to be controlled and the control parameters in the lamp group are determined, and the target lamp area to be controlled based on these parameters are controlled to operate in the specified lamp effect mode.
It realizes flexible adaptation to different layout lamp groups, improves the adaptability and scalability of lighting effect control, and reduces the cycle and cost of driving software development.
Smart Images

Figure CN119767483A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lighting control, and in particular to a method, device, electronic equipment and storage medium for controlling a lighting group. Background Art
[0002] In order to meet various lighting effects for specific occasions / specific equipment, lamps with dynamic lighting effects are increasingly widely used. Among them, lamps with dynamic lighting effects are usually designed for different scenes, and the positions and numbers of lamp beads in the lamps are diverse. When controlling lighting effects, even if lamps with different layouts are operated in the same lighting effect mode, professionals are still required to redesign the driver software. Therefore, facing the lighting effect control of lamps with different layouts, the current development cycle is long, and the lighting effect control lacks adaptability and scalability. Summary of the invention
[0003] In view of this, an object of the embodiments of the present application is to provide a lamp group control method, device, electronic device and storage medium, which can improve the problem of lack of adaptability and scalability of lighting effect control.
[0004] In order to achieve the above technical objectives, the technical solutions adopted in this application are as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for controlling a light group, the method comprising:
[0006] Upon receiving a control instruction to operate in a specified lighting effect mode, acquiring target lighting effect data corresponding to the specified lighting effect mode from a driving database, wherein the driving database includes at least two types of lighting effect data;
[0007] Based on the control instruction and the target lighting effect data, determine the target light zone to be controlled in the light group and the control parameters corresponding to the target light zone, wherein the control parameters at least include the location information and the operating time information of the target light zone;
[0008] Based on the control parameters, the target light zone is controlled to operate in the specified lighting effect mode.
[0009] In combination with the first aspect, in some optional implementations, before acquiring the target lighting effect data corresponding to the specified lighting effect mode from the driving database, the method further includes:
[0010] Based on at least two lighting effect modes and corresponding control parameters, a correspondence between the lighting effect mode and the lighting effect data is established to obtain the driving database, wherein the lighting effect data includes the control parameters corresponding to the corresponding lighting effect mode, and the driving database includes the target lighting effect data corresponding to the specified lighting effect mode.
[0011] In combination with the first aspect, in some optional implementations, between the step of establishing a correspondence between the lighting effect mode and the lighting effect data based on at least two lighting effect modes and corresponding control parameters, and the step of acquiring target lighting effect data corresponding to the specified lighting effect mode from the driver database, the method further includes:
[0012] Based on the received modification instruction, the control parameters in the lighting effect data corresponding to the modification instruction are adjusted, and the corresponding relationship between the lighting effect mode and the lighting effect data is updated to obtain an updated driving database.
[0013] In combination with the first aspect, in some optional implementations, the target lighting effect data is a target lighting effect array;
[0014] The step of determining a target light zone to be controlled in the light group and a control parameter corresponding to the target light zone based on the control instruction and the target light effect data includes:
[0015] According to the identification information of the light zone to be controlled carried in the control instruction, determining the light zone in the light group that matches the identification information as the target light zone;
[0016] Read each parameter from the target lighting effect array according to a pre-established correspondence between the position of the parameter in the lighting effect array and the parameter type, and determine the parameter type of each parameter according to the position of each parameter in the target lighting effect array, wherein the target lighting effect array includes the position information of the target light area, the flashing frequency, the brightness duty cycle, and one of the gradient parameters;
[0017] Based on the position information of the lamp beads, the lighting time and the off time of the lamp beads in the target lamp area are determined using a function corresponding to the lighting effect mode, and the lighting time, the off time, each parameter and the parameter type of each parameter are used as control parameters corresponding to the target lamp area.
[0018] In combination with the first aspect, in some optional implementations, each of the lamp zones is associated with a corresponding control channel in an integrated circuit driver;
[0019] Based on the control parameter, controlling the target light zone to operate in the specified light effect mode includes:
[0020] Based on the lighting time and the extinguishing time, or based on the lighting time, the extinguishing time and each parameter, all the lamp beads in the target light area are controlled to operate through the corresponding control channel in the integrated circuit driver so that the target light area emits light in the specified lighting effect mode, wherein each parameter includes one of a flashing frequency, a brightness duty cycle and a gradient parameter.
[0021] In combination with the first aspect, in some optional embodiments, the designated lighting effect mode is a dynamic lighting effect mode or a static lighting effect mode, and the dynamic lighting effect mode includes any one of a flowing mode, a meteor mode, and a breathing mode; the static lighting effect mode includes a lighting effect mode that emits light with a designated light color and / or a designated light brightness.
[0022] In combination with the first aspect, in some optional implementations, the lamp group is a lamp on a vehicle, and the drive database is stored in a domain controller of the vehicle.
[0023] In a second aspect, an embodiment of the present application further provides a light group control device, the device comprising:
[0024] an acquisition unit, configured to acquire target lighting effect data corresponding to the specified lighting effect mode from a driving database when receiving a control instruction to operate in a specified lighting effect mode, wherein the driving database includes at least two types of lighting effect data;
[0025] A determination unit, configured to determine a target light zone to be controlled in the light group and a control parameter corresponding to the target light zone based on the control instruction and the target light effect data, wherein the control parameter at least includes position information and operating time information of the target light zone;
[0026] A control unit is used to control the target light zone to operate in the specified light effect mode based on the control parameters.
[0027] In combination with the second aspect, in some optional implementations, the device further includes a creating unit, and before the acquiring unit acquires the target lighting effect data corresponding to the specified lighting effect mode from the driving database, the creating unit is used to:
[0028] Based on at least two lighting effect modes and corresponding control parameters, a correspondence between the lighting effect mode and the lighting effect data is established to obtain the driving database, wherein the lighting effect data includes the control parameters corresponding to the corresponding lighting effect mode, and the driving database includes the target lighting effect data corresponding to the specified lighting effect mode.
[0029] In combination with the second aspect, in some optional implementations, the device further includes an adjustment unit, wherein the creation unit establishes a correspondence between the lighting effect mode and the lighting effect data based on at least two lighting effect modes and corresponding control parameters, and the acquisition unit acquires the target lighting effect data corresponding to the specified lighting effect mode from the driving database, and the adjustment unit is used to:
[0030] Based on the received modification instruction, the control parameters in the lighting effect data corresponding to the modification instruction are adjusted, and the corresponding relationship between the lighting effect mode and the lighting effect data is updated to obtain an updated driving database.
[0031] In conjunction with the second aspect, in some optional implementations, the target lighting effect data is a target lighting effect array, and the determining unit is further configured to:
[0032] According to the identification information of the light zone to be controlled carried in the control instruction, determining the light zone in the light group that matches the identification information as the target light zone;
[0033] Read each parameter from the target lighting effect array according to a pre-established correspondence between the position of the parameter in the lighting effect array and the parameter type, and determine the parameter type of each parameter according to the position of each parameter in the target lighting effect array, wherein the target lighting effect array includes the position information of the target light area, the flashing frequency, the brightness duty cycle, and one of the gradient parameters;
[0034] Based on the position information of the lamp beads, the lighting time and the off time of the lamp beads in the target lamp area are determined using a function corresponding to the lighting effect mode, and the lighting time, the off time, each parameter and the parameter type of each parameter are used as control parameters corresponding to the target lamp area.
[0035] In conjunction with the second aspect, in some optional implementations, each of the lamp zones is associated with a corresponding control channel in an integrated circuit driver, and the control unit is further configured to:
[0036] Based on the lighting time and the extinguishing time, or based on the lighting time, the extinguishing time and each parameter, all the lamp beads in the target light area are controlled to operate through the corresponding control channel in the integrated circuit driver so that the target light area emits light in the specified lighting effect mode, wherein each parameter includes one of a flashing frequency, a brightness duty cycle and a gradient parameter.
[0037] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a processor and a memory coupled to each other, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the electronic device executes the above method.
[0038] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium. When the computer program is executed on a computer, the computer executes the above method.
[0039] The invention adopting the above technical solution has the following advantages:
[0040] In the technical solution provided in the present application, the target lighting effect data corresponding to the specified lighting effect mode is obtained from the driver database; then the control parameters corresponding to the target light area are obtained by using the control instructions and the target lighting effect data, and the target light area is controlled to operate in the specified lighting effect mode according to the control parameters. Since the driver database includes at least two types of lighting effect data, it can adapt to the driving of multiple lighting effect modes. If the driver database is created in advance, even when facing light groups with different layouts and using the same lighting effect mode, the lighting effect data in the driver database can still be used to achieve the corresponding lighting effect control, which is conducive to improving the adaptability and scalability of the lighting effect control. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The present application may be further described by the non-limiting embodiments given in the accompanying drawings. It should be understood that the following drawings only illustrate certain embodiments of the present application and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings may be obtained based on these drawings without creative effort.
[0042] Figure 1 A schematic flow chart of a lamp group control method provided in an embodiment of the present application.
[0043] Figure 2 A schematic diagram of the functional settings of the light group control provided in an embodiment of the present application.
[0044] Figure 3 A schematic diagram of the mapping relationship in the light group control provided in an embodiment of the present application.
[0045] Figure 4 A schematic diagram of the light zone layout in a vehicle taillight provided in an embodiment of the present application.
[0046] Figure 5 This is a functional block diagram of the light group control device provided in an embodiment of the present application.
[0047] Icon: 200 - lamp group control device; 210 - acquisition unit; 220 - determination unit; 230 - control unit. DETAILED DESCRIPTION
[0048] The present application will be described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that in the drawings or descriptions, similar or identical parts use the same figure numbers, and the implementation methods not shown or described in the drawings are forms known to ordinary technicians in the relevant technical field. In the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0049] Please refer to Figure 1The present application also provides a light group control method, which can be applied to electronic devices, and each step of the method can be executed or implemented by the electronic device. Among them, the electronic device can be an electronic control system on a vehicle, or other control device, which can be flexibly determined according to the application scenario, and is not specifically limited here. In addition, the control object of the method is a light group, and the light group can be divided into multiple areas, each area can include one or more light strings, each light string can include one or more light areas, and each light area can include at least one lamp bead. A light area, as the smallest control unit, can be used as a bit, and the electronic device can use the bit to control all the lamp beads in a light area to light up or go out at the same time. For example, when the bit is assigned a value of 1, all the lamp beads in the light area are controlled to light up; when the bit is assigned a value of 0, all the lamp beads in the light area are controlled to go out.
[0050] The light group may be, but is not limited to, various types of vehicle lamps, decorative lights on the exterior of buildings, and indoor ambient lights. In the embodiment, taking the application scenario of a vehicle as an example, the light group may include an indoor ambient light, an outdoor ambient light, a tail light, a headlight, etc. in the vehicle, and the light group control method may include the following steps:
[0051] Step 110, when receiving a control instruction to operate in a specified lighting effect mode, obtaining target lighting effect data corresponding to the specified lighting effect mode from a driving database, wherein the driving database includes at least two types of lighting effect data;
[0052] Step 120, based on the control instruction and the target lighting effect data, determining the target light zone to be controlled in the light group and the control parameters corresponding to the target light zone, wherein the control parameters at least include the location information and the operation time information of the target light zone;
[0053] Step 130: Based on the control parameters, control the target light zone to operate in the specified lighting effect mode.
[0054] In this embodiment, since the driver database can include multiple lighting effect data, it can adapt to the drivers of multiple lighting effect modes. If the driver database is created in advance and the lighting effect data corresponding to various lighting effect modes are configured, even when facing light groups with different layouts, when the same lighting effect mode is used later, the lighting effect data in the driver database can still be used to achieve the corresponding lighting effect control. In this way, there is no need to independently develop corresponding driver software for light groups with different layouts, which is conducive to reducing the driver development cost and improving the adaptability and scalability of lighting effect control.
[0055] In this embodiment, the lighting effect control method can be based on the EE (Electrical Electron) architecture, platform lighting effect control, and move the lighting effect driver to the domain controller. Using standardized interfaces, a scalable, flexible and maintainable lighting effect control system can be built, so that light groups with different layouts can be driven and adapted adaptively. Users can customize lighting effects, application scenarios can be arranged, and the decoupling of lighting effect control software and hardware can be achieved, which is conducive to shortening the development cycle of lighting effect control driver software and reducing the difficulty of maintaining lighting effect control.
[0056] The following will describe in detail the steps of the lamp group control method, as follows:
[0057] Before step 110, the method may include the step of creating a driver database. For example, before acquiring the target lighting effect data corresponding to the specified lighting effect mode from the driver database, the method may also include:
[0058] Based on at least two lighting effect modes and corresponding control parameters, a correspondence between the lighting effect mode and the lighting effect data is established to obtain the driving database, wherein the lighting effect data includes the control parameters corresponding to the corresponding lighting effect mode, and the driving database includes the target lighting effect data corresponding to the specified lighting effect mode.
[0059] In this embodiment, in the driving database, the lighting effect mode may include a dynamic lighting effect mode and a static lighting effect mode. The dynamic lighting effect mode may include but is not limited to a flowing water mode, a meteor mode, and a breathing mode. The control parameters may include, but are not limited to, the location information of the light zone, the flashing frequency, the brightness duty cycle, and the gradient parameters. Among them, the gradient parameters may include but are not limited to the gradient color type, the gradient frequency, and the like.
[0060] The flow mode can be subdivided according to the direction of the flow, such as, for example, the flow mode can include a left flow mode, a right flow mode, an upper flow mode, a lower flow mode, a dispersed flow mode and a converged flow mode.
[0061] Similarly, the meteor mode may include a left meteor mode, a right meteor mode, an upper meteor mode, a lower meteor mode, a dispersed meteor mode, and a converged meteor mode.
[0062] The static lighting effect mode may be a lighting effect mode that emits light with a specified light color and / or a specified light brightness. Both the specified light color and the specified light brightness may be flexibly set according to actual conditions.
[0063] In breathing mode, the breathing frequency and light color of the light group can be flexibly set according to actual conditions.
[0064] In this embodiment, the lighting effect data may be a two-dimensional array. The two-dimensional array may be represented as: FLPosn_Mode1[z][n] = {{c1, d1, e1, ...}, ..., {c z ,d z ,e z ,…}}, where z refers to the number of light strings that are lit, n refers to the number of parameters corresponding to a single light string, {c z ,d z ,e z ,…} represents the parameters corresponding to the zth light string, and the number of parameters is n. For example, c z ,d z ,e z Can represent different parameters, for example, c z Indicates the starting position of the lamp bead in the zth lamp string, d z Indicates the length of the zth light string (referring to the number of light zones in the light string), e z Indicates the lighting effect mode of the zth light string.
[0065] As an example, for the meteor mode, the lighting effect array is set to FLPosn_Mode1[1][3]={{10,24,3}}, where [1] represents the number of light strings to be lit is 1, and [3] represents that this light string contains three parameters, namely 10, 24, and 3. In {10,24,3}, 10 can represent that the starting bit (position) of the light string is 10, 24 represents the total bit length (referring to the number of light zones) is 24, and the corresponding control is P10_L to P32_L; 3 can represent the left meteor mode, which can be used to select the public function corresponding to the left meteor to calculate the lighting time and extinguishing time of the corresponding light zone. The lighting effect array can also include other parameters, such as the meteor length Meteorbit, which can be flexibly set according to the actual situation. For example, if Meteorbit is 4, it means that the number of lamp beads that are lit at the same time is 4.
[0066] Engineers can establish the correspondence between lighting effect modes and lighting effect arrays through various lighting effect modes and corresponding control parameters, thereby obtaining a driver database that supports multiple lighting effect mode drivers, thereby increasing the scalability and adaptability of lighting effect control.
[0067] After the driver database is established, engineers can adjust the control parameters in the lighting effect data according to the different layouts of the lighting groups and the desired lighting effect scheme (the lighting effect scheme may include parameters such as light brightness, lighting effect mode, and flashing frequency) to update the driver database. For example, between the step of establishing a correspondence between the lighting effect mode and the lighting effect data based on at least two lighting effect modes and corresponding control parameters, and the step of obtaining the target lighting effect data corresponding to the specified lighting effect mode from the driver database, the method may further include:
[0068] Based on the received modification instruction, the control parameters in the lighting effect data corresponding to the modification instruction are adjusted, and the corresponding relationship between the lighting effect mode and the lighting effect data is updated to obtain an updated driving database.
[0069] The control parameters that can be modified can be the position, flickering frequency, light brightness and other parameters of any light zone. In this way, when light groups with different layouts use the same lighting effect mode, users can only modify the position, flickering frequency, light brightness and other parameters of the light zone to achieve driver adaptation without redesigning the driver software, which is conducive to improving the development efficiency of the driver software and reducing development costs. In addition, the lighting effect can be personalized according to different users.
[0070] In step 110, the control instruction may carry identification information (recorded as the first identification) indicating the specified lighting effect mode. Since the driving database pre-stores lighting effect data corresponding to various lighting effect modes, after parsing the control instruction and obtaining the first identification, the lighting effect data with the same first identification can be found from the driving database as the target lighting effect data.
[0071] The specified lighting effect mode is the aforementioned dynamic lighting effect mode or static lighting effect mode. The dynamic lighting effect mode may be, but is not limited to, a flowing water mode, a shooting star mode, and a breathing mode. The static lighting effect mode may be a lighting effect mode that emits light with a specified light color and / or a specified light brightness.
[0072] In this embodiment, if the application scenario is a vehicle, the control command can be issued by a smart phone bound to the vehicle, or triggered by the user operating the vehicle's central control display screen, or triggered by other means. There is no specific restriction on the way the control command is generated here.
[0073] In this embodiment, the target lighting effect data may be a two-dimensional lighting effect array, which may be used as the target lighting effect array. In step 120, based on the control instruction and the target lighting effect data, determining the target light area to be controlled in the light group and the control parameters corresponding to the target light area may include:
[0074] According to the identification information (recorded as the second identification) representing the light zone to be controlled carried in the control instruction, determining the light zone in the light group that matches the identification information as the target light zone;
[0075] Read each parameter from the target lighting effect array according to a pre-established correspondence between the position of the parameter in the lighting effect array and the parameter type, and determine the parameter type of each parameter according to the position of each parameter in the target lighting effect array, wherein the target lighting effect array includes the position information of the target light area, the flashing frequency, the brightness duty cycle, and one of the gradient parameters;
[0076] Based on the position information of the lamp beads, the lighting time and the off time of the lamp beads in the target lamp area are determined using a function corresponding to the lighting effect mode, and the lighting time, the off time, each parameter and the parameter type of each parameter are used as control parameters corresponding to the target lamp area.
[0077] Understandably, some relatively basic parameters can be recorded in the lighting effect array, such as fixed data such as the location information of the light zone and the lighting effect mode. The lighting time and the extinguishing time of the light zone as variable data can be calculated by the function corresponding to the location information of the light zone in the lighting effect array and the corresponding lighting effect mode.
[0078] In this embodiment, the target light area is the area in the light group that needs to be controlled. The lights in the uncontrolled area of the light group do not need to be lit. The corresponding relationship between the position of the parameter in the light effect array and the parameter type can be flexibly set according to the actual situation, and is not specifically limited here.
[0079] In the control command, the area LampArea of the domain control can be carried. For example, define the area number LampArea of the left front position light of the vehicle as 2 (that is, the second identifier), please refer to Figure 3 The left front position light includes 24 light zones, namely P10L-P33L, representing bits 10 to 33 of the left front position light, and each light zone has two lamp beads. In this way, the second identifier in the control instruction can be used to identify the area to be controlled, and all the light zones in the area are target light zones.
[0080] In this embodiment, the lighting time and the extinguishing time of the target light zone can be calculated by using different public functions according to different lighting effect modes.
[0081] As an example, when the lighting effect mode is the left meteor mode, the common function of the lighting time of the target light zone can be:
[0082] Start_time=Mid_TimeArry[LampArea-1][i-1]+Tasktime+FlowFrq
[0083] In the formula, Start_time refers to the lighting time, or the starting time;
[0084] If the target lamp area is not the first lamp area in the lighting effect control process, Mid_TimeArry[LampArea-1][i-1] refers to the middle time of the previous lamp area; if the target lamp area is the first lamp area in the lighting effect control process, Mid_TimeArry[LampArea-1][i-1] can be the time when the control command is received;
[0085] LampArea refers to the area in the lamp group, and i refers to the current number of lamp areas;
[0086] Tasktime refers to the running time of the software cycle, for example, 20 milliseconds. The software corresponds to the lighting effect control method.
[0087] FlowFrq refers to the interval frequency or interval duration of meteor slides.
[0088] The common function of the extinction time can be:
[0089] Stop_time=Start_time+(Meteorbit-1)*(Tasktime+FlowFrq)+(FlowSize)*(Tasktime+FlowFrq)
[0090] In the formula, Stop_time refers to the extinguishing time, or the stopping time;
[0091] Start_time refers to the lighting time;
[0092] Meteorbit refers to the length of a meteor, which is the number of lamp beads lit by a single meteor;
[0093] FlowSize refers to the length of the current light string in the light group.
[0094] The calculation function of the intermediate time can be:
[0095] Mid_time=Start_time+(Meteorbit-1)*(Tasktime+FlowFrq)+(FlowSize-Meteorbit)*(Tasktime+FlowFrq)
[0096] The middle time Mid_time can be used to calculate the lighting start time of the next controlled lamp area, and can be used as Mid_TimeArry[LampArea-1][i-1].
[0097] Each of the light zones is associated with a corresponding control channel in an IC (Integrated Circuit) driver. In step 130, based on the control parameters, controlling the target light zone to operate in the specified lighting effect mode may include:
[0098] Based on the lighting time and the extinguishing time, or based on the lighting time, the extinguishing time and each parameter, all the lamp beads in the target light area are controlled to operate through the corresponding control channel in the integrated circuit driver so that the target light area emits light in the specified lighting effect mode, wherein each parameter includes one of a flashing frequency, a brightness duty cycle and a gradient parameter.
[0099] For example, the light zones in the light group are divided into 1 to 20, and each zone corresponds to a group of LED lights. Using the function "LgithSet_Device", the domain controller passes parameters such as the light area (LightArea), the light zone / lamp bead position (Posn) to be turned on, the lighting time, the off time and the duty cycle (DutyRatio) to the IC driver (that is, the driver chip). The driver chip parses these parameters and uses the corresponding control channel to light up the lamp beads in the corresponding light zone. In this way, the decoupling of software and hardware is conducive to improving the flexibility and scalability of the method, and is convenient for future functional expansion and optimization. Among them, the LgithSet_Device function is used to transmit the control parameters calculated in the domain controller to the IC driver.
[0100] Please refer to Figures 2 to 4 ,This method is based on EE architecture and can directly drive the IC driver chip (i.e., IC driver). The implementation process of the method involves application layer software, complex driver and underlying chip driver, such as Figure 2 As shown. The complex driver includes the driver database and other parameters or functions related to the driver. In order to meet the needs of platform software, the lighting effect array, meteor length Meteorbit, interval frequency and other parameters are set as configurable items or settable items open to the outside world. Different configurations meet different application scenarios or vehicle model adaptation. In order to achieve software and hardware decoupling and adapt to the lighting control of different models, the following strategies are adopted:
[0101] Modular design: modularize the functions of the lighting effect modes, simplify the independent implementation of different lighting effect modes (such as breathing mode, up and down, left and right water flow mode, etc.). Each lighting effect mode can be called through a unified interface.
[0102] Configuration file: defines a standard configuration file format, including the lighting parameters of each vehicle model (such as lamp bead position, lighting effect type, etc.). The data format of the configuration file can be a two-dimensional array, that is, a lighting effect array. By modifying the lighting effect array, the hardware layout of different vehicle models can be adapted.
[0103] Position mapping: Using the mapping function, the incoming light zone / light string / area position (Posn) can be mapped to the light parameters in the lighting effect array, and the mapping function can be used to handle the position changes of lamp beads for different models.
[0104] Dynamic effect support: Provides user customization function for dynamic lighting effects, allowing users to define various combinations of lighting effects, such as flashing frequency, breathing frequency, gradient color, etc., and dynamically load user-defined lighting effects through standard interface parameter transmission and configuration files.
[0105] Unified interface: Provides a unified interface for static and dynamic lighting effects. Static lighting effects directly transmit application layer data, while dynamic lighting effects can calculate the positions of the remaining light zones / lamp beads based on the initial position and total length of the first light zone / lamp bead in the controlled light group.
[0106] In complex dynamic driving, the public functions of the corresponding lighting effect modes are used to calculate the corresponding control parameters of the lamp beads to ensure that the lighting effects of the lamp groups in different car models are consistent under the same lighting effect mode.
[0107] Through the above strategy, it is possible to ensure flexible adaptation of lighting effects between different models while reducing the coupling between software and hardware.
[0108] In addition, in the electronic control system of the vehicle, both the application layer and the basic software layer use standardized interfaces, which is conducive to enhancing the operability of the system, improving development efficiency, reducing integration complexity, and improving the maintainability and scalability of the system. In the lighting control system, the control is mainly divided into three levels: application software, complex driver and underlying software driver chip. The realization of lighting effects is mainly completed in the complex driver. The complex driver receives instructions from the application layer through the defined standardized interface, including instruction parameters such as lighting control mode, flashing frequency, position of driving lamp beads, brightness duty cycle, breathing mode parameters and gradual light and fade time. For the lower layer, the complex driver passes the instructions to the driver layer through the Set interface to directly control the IC driver chip. For example, the light zones in the light group are divided into 1 to 20, and each light zone corresponds to a group of LED lights. Using the function "LightSetDevice", the domain controller passes parameters such as the light area (LightArea), the light zone / lamp bead position (Posn) to be turned on, the lighting time, the extinguishing time and the duty cycle (DutyRatio) to the IC driver. The driver chip parses these parameters and uses the corresponding control channel (such as Figure 3 In this way, the software and hardware are decoupled, which is conducive to improving the flexibility and scalability of the method and facilitating future functional expansion and optimization.
[0109] The separation of lighting effect control and hardware configuration allows the adaptation of lighting effects to be completed only by modifying the configuration file without changing the underlying code, thereby improving the maintainability and scalability of the system.
[0110] For static lighting effects, the lamp bead position information sent by the application layer can be directly transmitted. That is, after the controlled area is determined in the light group, all the lamp beads in the controlled area can be directly used as control objects without calculating the controlled lamp beads one by one.
[0111] Dynamic lighting effects need to support higher flexibility to allow for custom functions. The calculation of the lamp bead position will be completed in the driver code, and the configuration file allows the modification of the lighting effect's starting position, total length, and effect type, which are written into the lighting effect array. This centralized management method allows lighting effect parameters such as the lighting effect array and meteor length (Meteabit) to be easily adjusted, avoiding the complexity of in-depth code modification.
[0112] For example, the lighting area (LightATRa) can be split into continuous LED strings according to the configuration file, including the start position, total length and control mode. The start and end time of the light string is automatically calculated through the general function, and the lighting effect is dynamically realized, which simplifies the development process. This design not only improves development efficiency, but also enables maintenance personnel to quickly get started and flexibly adjust parameters to achieve the desired effect.
[0113] The direct drive mode of the EE architecture has the advantages of fast response speed, simplified hardware design, and high reliability. By calculating the control parameters on the domain controller, parameters such as the position of the lamp beads (Posn) and the lighting time can be quickly obtained, and these parameters can be directly written into the driver chip. Subsequently, the driver chip is called to transmit the corresponding information and quickly drive the corresponding channel to complete the lighting effect display.
[0114] The above solution can meet the platform requirements of lighting effect driving. Different mapping relationships or different light groups, different car models, only need to modify the lighting effect array in the configuration file to complete the adaptation, without modifying the complex driver-related code, can realize the platformization and standardization of lighting effect control, shorten the development cycle of various types of car lighting products, and reduce the cost of car lighting development and management.
[0115] As an example, see Figure 3 , if the light group is the left front position light of the vehicle, when the lighting effect mode is specified as meteor mode, the area number LampArea of the left position light is defined as 2, which can include light areas P10_L-P33_L, representing bits 10 to 33 of the left position light. The lamp beads mapped to the left position light area are numbered 1-48. Each control channel of each IC driver corresponds to a light area P, and each light area includes two lamp beads, such as Figure 3 The shooting star can light up all left front position lamps in the following ways:
[0116] The application layer sends a control command to light up in meteor mode, set the interval frequency to 20ms, and the lighting effect array is FLPosn_Mode1[1][3]={{10,24,3}}, 10 represents the starting bit is 10, 24 represents the total bit length is 24, and the corresponding control is P10_L to P33_L. The parameter 3 in {10,24,3} represents the left meteor effect, and the left meteor public function is selected to implement it. The meteor length Meteorbit can be 4, which means that the number of lamp beads lit at the same time is 4. In complex drivers, the relevant control parameters (such as the starting bit) are passed into the public function, in which the Start_time, Stop_time, and Mid_time of each bit lighting time are automatically calculated. During the start and stop time, the left meteor function is called periodically. In each cycle of the left meteor function, bit10 to bit13 are lit in sequence, and then the values of these four bits are moved to the left until bit33 changes from 1 to 0 (indicating that the lamp beads in the lamp area where bit33 is located have changed from emitting to extinguishing). The bit value after each cycle is written into CddLampIDbit (CddLampIDbit is a cache space that can store the value of the lamp area bit), and the LgithSet_Device function is called to pass the parameters of the light area 2, the position of the lamp beads to be turned on CddLampIDbit, and the duty cycle to the chip driver function. According to the datasheet of the driver chip, the underlying code of the UART (Universal Asynchronous Receiver / Transmitter) communication protocol is completed to realize the control of the LED lights of the corresponding channel. That is, by controlling the channel, the corresponding bit is controlled to turn on and off, and the light effect of the left meteor is realized.
[0117] In this embodiment, the control bit position may vary due to the different number and position of the lamp beads in the lamp group, or the different lighting effects expected to be presented. In order to adapt to this variability, the control parameters can be changed through external calls or configuration files. That is, the control parameters can be adjusted by modifying the lighting effect array.
[0118] For example, see Figure 4 The rear position lamp of the vehicle is a C-shaped lamp, and its lamp area mapping and position distribution are as follows: Figure 4As shown, define the left position light area number LampArea as 3. The convergence pipeline is to light up each bit in sequence from both ends to the middle. The tail light of this shape first lights up bit14-bit10, then lights up bit6-bit9, and finally lights up bit15-bit32. The same is true for the right position light. According to the mapping of the position light area, set the lighting effect array to RLPosn_Mode1[3][3]={{14,5,2},{6,4,1},{15,18,1}}, and set the number of left position light strings z of a C-shaped tail light to 3. The last parameter of each string of lights represents the function of the shift operation. Parameter 1 in {15,18,1} is to use the left pipeline function for shift operation, and parameter 2 in {14,5,2} is to select the right pipeline function for shift operation. The time calculation of each string of lights is performed in the public function. The flow time is divided into the lighting time Start_time and the stop time Stop_time.
[0119] Start time Start_time = StopTimeArry[LampArea-1][i-1]+Tasktime+FlowFrq;
[0120] Among them, StopTimeArry[LampArea-1][i-1] can refer to the time when the control command is received, or the time when the last lamp area is turned off;
[0121] Stop time Stop_time = Start_time + (FlowSize-1)*Tasktime + (FlowSize-1)*FlowFrq.
[0122] Each string of lights calls the flow function to perform shift operations at the start time and stop time, and stores the results of each string of lights in the parameter CddLampIDbit by OR operation. The parameters are also passed to the driver chip for channel driving to display the flow effect. The application layer simultaneously sends the left flow control of the left rear position light and the left flow control of the right rear position light, which can achieve the convergent flow effect of the entire taillight.
[0123] Each lighting effect corresponds to a set of lighting effect arrays. In this way, even if the left and right flow reference of the overall lighting effect is changed, there is no need to write new code to implement it and modify the lighting effect array in the configuration file for adaptation. Therefore, based on the above design, no matter it is different car models, different driver chips, different required lighting effect definitions, or different lighting hardware, they can all be adapted using the method of this application. That is, by moving the driver up to the domain controller, differentiated driver adaptation can be achieved for different platform models.
[0124] Please refer to Figure 5The present application also provides a light group control device 200, which includes at least one software function module that can be stored in a storage module in the form of software or firmware or fixed in an operating system (OS) of an electronic device. The processor in the electronic device is used to execute the executable modules stored in the memory, such as the software function modules and computer programs included in the light group control device 200.
[0125] The light group control device 200 includes various units and their functions are as follows:
[0126] The acquisition unit 210 is used to acquire target lighting effect data corresponding to the specified lighting effect mode from a driving database when receiving a control instruction to operate in a specified lighting effect mode, wherein the driving database includes at least two types of lighting effect data;
[0127] A determination unit 220, configured to determine a target light zone to be controlled in the light group and a control parameter corresponding to the target light zone based on the control instruction and the target light effect data, wherein the control parameter at least includes location information and operating time information of the target light zone;
[0128] The control unit 230 is used to control the target light zone to operate in the specified lighting effect mode based on the control parameters.
[0129] In some optional implementations, the device further includes a creating unit, and before the acquiring unit 210 acquires the target lighting effect data corresponding to the specified lighting effect mode from the driving database, the creating unit is used to:
[0130] Based on at least two lighting effect modes and corresponding control parameters, a correspondence between the lighting effect mode and the lighting effect data is established to obtain the driving database, wherein the lighting effect data includes the control parameters corresponding to the corresponding lighting effect mode, and the driving database includes the target lighting effect data corresponding to the specified lighting effect mode.
[0131] In some optional embodiments, the device further includes an adjustment unit, wherein the creation unit establishes a correspondence between the lighting effect mode and the lighting effect data based on at least two lighting effect modes and corresponding control parameters, and the acquisition unit 210 acquires the target lighting effect data corresponding to the specified lighting effect mode from the driving database, and the adjustment unit is used to:
[0132] Based on the received modification instruction, the control parameters in the lighting effect data corresponding to the modification instruction are adjusted, and the corresponding relationship between the lighting effect mode and the lighting effect data is updated to obtain an updated driving database.
[0133] In some optional implementations, the target lighting effect data is a target lighting effect array, and the determination unit 220 is further configured to:
[0134] According to the identification information of the light zone to be controlled carried in the control instruction, determining the light zone in the light group that matches the identification information as the target light zone;
[0135] Read each parameter from the target lighting effect array according to a pre-established correspondence between the position of the parameter in the lighting effect array and the parameter type, and determine the parameter type of each parameter according to the position of each parameter in the target lighting effect array, wherein the target lighting effect array includes the position information of the target light area, the flashing frequency, the brightness duty cycle, and one of the gradient parameters;
[0136] Based on the position information of the lamp beads, the lighting time and the off time of the lamp beads in the target lamp area are determined using a function corresponding to the lighting effect mode, and the lighting time, the off time, each parameter and the parameter type of each parameter are used as control parameters corresponding to the target lamp area.
[0137] In some optional implementations, each of the lamp zones is associated with a corresponding control channel in an integrated circuit driver, and the control unit 230 is further configured to:
[0138] Based on the lighting time and the extinguishing time, or based on the lighting time, the extinguishing time and each parameter, all the lamp beads in the target light area are controlled to operate through the corresponding control channel in the integrated circuit driver so that the target light area emits light in the specified lighting effect mode, wherein each parameter includes one of a flashing frequency, a brightness duty cycle and a gradient parameter.
[0139] The embodiment of the present application provides an electronic device that may include a processor and a memory. The memory stores a computer program, and when the computer program is executed by the processor, the electronic device can execute the corresponding steps in the above-mentioned light group control method. The electronic device may be an electronic control system or other control device in a vehicle, which can be used to drive and adapt light groups with different layouts, and can improve the scalability and adaptability of light effect control.
[0140] In this embodiment, the processor may be a general-purpose processor. For example, the processor may be, but is not limited to, a domain controller, a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and may implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present application.
[0141] The memory may be integrated with the processor or exist independently. When the memory exists independently, the memory may be, but is not limited to, a random access memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, etc. In this embodiment, the memory may be used to store preset numbers, etc. Of course, the memory may also be used to store a program, and the processor executes the program after receiving an execution instruction.
[0142] It should be noted that technicians in the relevant field can clearly understand that for the convenience and simplicity of description, the specific working process of the electronic device and lighting effect control device described above can refer to the corresponding process of each step in the aforementioned method, and will not be elaborated here.
[0143] The embodiment of the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is run on a computer, the computer executes the light group control method described in the above embodiment.
[0144] Through the description of the above implementation methods, technical personnel in this field can clearly understand that the present application can be implemented by hardware, and can also be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, an electronic device, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0145] In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The apparatus and method embodiments described above are merely schematic, for example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a part of a module, a program segment or a code, and a part of the module, program segment or code contains one or more executable instructions for implementing the specified logical function. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. In addition, each functional module in each embodiment of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part.
[0146] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for controlling a light group, characterized in that: The method comprises: Upon receiving a control instruction to operate in a specified lighting effect mode, acquiring target lighting effect data corresponding to the specified lighting effect mode from a driving database, wherein the driving database includes at least two types of lighting effect data; Based on the control instruction and the target lighting effect data, determine the target light zone to be controlled in the light group and the control parameters corresponding to the target light zone, wherein the control parameters at least include the location information and the operating time information of the target light zone; Based on the control parameters, the target light zone is controlled to operate in the specified lighting effect mode.
2. The method according to claim 1, characterized in that Before acquiring the target lighting effect data corresponding to the specified lighting effect mode from the driving database, the method further includes: Based on at least two lighting effect modes and corresponding control parameters, a correspondence between the lighting effect mode and the lighting effect data is established to obtain the driving database, wherein the lighting effect data includes the control parameters corresponding to the corresponding lighting effect mode, and the driving database includes the target lighting effect data corresponding to the specified lighting effect mode.
3. The method according to claim 2, characterized in that Between the step of establishing a correspondence between the lighting effect mode and the lighting effect data based on at least two lighting effect modes and corresponding control parameters, and the step of acquiring target lighting effect data corresponding to the specified lighting effect mode from the driving database, the method further includes: Based on the received modification instruction, the control parameters in the lighting effect data corresponding to the modification instruction are adjusted, and the corresponding relationship between the lighting effect mode and the lighting effect data is updated to obtain an updated driving database.
4. The method according to claim 1, characterized in that: The target lighting effect data is a target lighting effect array; The step of determining a target light zone to be controlled in the light group and a control parameter corresponding to the target light zone based on the control instruction and the target light effect data includes: According to the identification information of the light zone to be controlled carried in the control instruction, determining the light zone in the light group that matches the identification information as the target light zone; Read each parameter from the target lighting effect array according to a pre-established correspondence between the position of the parameter in the lighting effect array and the parameter type, and determine the parameter type of each parameter according to the position of each parameter in the target lighting effect array, wherein the target lighting effect array includes the position information of the target light area, the flashing frequency, the brightness duty cycle, and one of the gradient parameters; Based on the position information of the lamp beads, the lighting time and the off time of the lamp beads in the target lamp area are determined using a function corresponding to the lighting effect mode, and the lighting time, the off time, each parameter and the parameter type of each parameter are used as control parameters corresponding to the target lamp area.
5. The method according to claim 4, characterized in that Each of the lamp zones is associated with a corresponding control channel in an integrated circuit driver; The controlling the target light zone to operate in the specified light effect mode based on the control parameter includes: Based on the lighting time and the extinguishing time, or based on the lighting time, the extinguishing time and each parameter, all the lamp beads in the target light area are controlled to operate through the corresponding control channel in the integrated circuit driver so that the target light area emits light in the specified lighting effect mode, wherein each parameter includes one of a flashing frequency, a brightness duty cycle and a gradient parameter.
6. The method according to claim 1, characterized in that The designated lighting effect mode is a dynamic lighting effect mode or a static lighting effect mode. The dynamic lighting effect mode includes any one of a flowing mode, a meteor mode, and a breathing mode; the static lighting effect mode includes a lighting effect mode that emits light with a designated light color and / or a designated light brightness.
7. The method according to claim 1, characterized in that The lamp group is a lamp on a vehicle, and the driving database is stored in a domain controller of the vehicle.
8. A lamp group control device, characterized in that: The device comprises: an acquisition unit, configured to acquire target lighting effect data corresponding to the specified lighting effect mode from a driving database when receiving a control instruction to operate in a specified lighting effect mode, wherein the driving database includes at least two types of lighting effect data; A determination unit, configured to determine a target light zone to be controlled in the light group and a control parameter corresponding to the target light zone based on the control instruction and the target light effect data, wherein the control parameter at least includes position information and operating time information of the target light zone; A control unit is used to control the target light zone to operate in the specified light effect mode based on the control parameters.
9. The device according to claim 8, characterized in that The device further includes a creating unit, which is used to: before the acquiring unit acquires the target lighting effect data corresponding to the specified lighting effect mode from the driving database, Based on at least two lighting effect modes and corresponding control parameters, a correspondence between the lighting effect mode and the lighting effect data is established to obtain the driving database, wherein the lighting effect data includes the control parameters corresponding to the corresponding lighting effect mode, and the driving database includes the target lighting effect data corresponding to the specified lighting effect mode.
10. The device according to claim 9, characterized in that The device further includes an adjustment unit, wherein the creation unit establishes a correspondence between the lighting effect mode and the lighting effect data based on at least two lighting effect modes and corresponding control parameters, and the acquisition unit acquires the target lighting effect data corresponding to the specified lighting effect mode from the driving database, and the adjustment unit is used to: Based on the received modification instruction, the control parameters in the lighting effect data corresponding to the modification instruction are adjusted, and the corresponding relationship between the lighting effect mode and the lighting effect data is updated to obtain an updated driving database.
11. The device according to claim 8, characterized in that The target lighting effect data is a target lighting effect array, and the determination unit is further used for: According to the identification information of the light zone to be controlled carried in the control instruction, determining the light zone in the light group that matches the identification information as the target light zone; Read each parameter from the target lighting effect array according to a pre-established correspondence between the position of the parameter in the lighting effect array and the parameter type, and determine the parameter type of each parameter according to the position of each parameter in the target lighting effect array, wherein the target lighting effect array includes the position information of the target light area, the flashing frequency, the brightness duty cycle, and one of the gradient parameters; Based on the position information of the lamp beads, the lighting time and the off time of the lamp beads in the target lamp area are determined using a function corresponding to the lighting effect mode, and the lighting time, the off time, each parameter and the parameter type of each parameter are used as control parameters corresponding to the target lamp area.
12. The device according to claim 11, characterized in that Each of the lamp zones is associated with a corresponding control channel in the integrated circuit driver, and the control unit is further used for: Based on the lighting time and the extinguishing time, or based on the lighting time, the extinguishing time and each parameter, all the lamp beads in the target light area are controlled to operate through the corresponding control channel in the integrated circuit driver so that the target light area emits light in the specified lighting effect mode, wherein each parameter includes one of a flashing frequency, a brightness duty cycle and a gradient parameter.
13. An electronic device, characterized in that: The electronic device comprises a processor and a memory coupled to each other, wherein the memory stores a computer program. When the computer program is executed by the processor, the electronic device executes the method as claimed in any one of claims 1 to 7.
14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 7.
Citation Information
Cited By
Keyboard control method and device, equipment and storage medium
CN120429022A
Lamp effect demonstration system and method, terminal equipment and computer program product
CN120812098A
Light effect control method, system and device, storage medium and program product
CN121645641A