Lamp control method and device and lamp
By allocating independent memory for each mode and generating accurate LED control data, the problem of lamps being unable to display multiple modes simultaneously is solved, achieving greater flexibility in lighting effects and improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN QIANYAN TECH LTD
- Filing Date
- 2026-04-08
- Publication Date
- 2026-05-05
AI Technical Summary
Existing lighting fixtures can only display one mode at a time, which cannot meet the requirement of displaying multiple modes simultaneously. Furthermore, when executing multiple modes based on a single memory, data corruption is likely to occur, resulting in significant errors in lighting control data.
Each mode is allocated an independent memory space. The target model is run through the LED identification and lighting effect parameters to generate control data for each LED and transmit it to the lighting control chip to control the LED to emit light in multiple modes.
It enables lamp beads to accurately emit light in multiple modes, improving the user experience, breaking the limitations of single-mode display, and enhancing the flexibility and adjustability of lighting effects.
Smart Images

Figure CN121985459A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of lighting control technology, and more specifically, to a lighting control method, device, and lighting fixture. Background Technology
[0002] Existing solutions can only display one mode for a single light fixture, either a music mode or a color mode. The light fixture can only display one effect at a time, which cannot meet the requirement of displaying multiple modes simultaneously. Summary of the Invention
[0003] This application proposes a lighting control method, device, and lighting fixture to improve the above-mentioned deficiencies.
[0004] In a first aspect, this application provides a lighting control method applied to a processor of a lighting fixture, the lighting fixture further including a lighting control chip and multiple LEDs, the method comprising: acquiring configuration data of the lighting fixture, the configuration data including multiple modes, LED identifiers corresponding to each mode, and lighting effect parameters corresponding to each mode; determining a target model corresponding to each mode; allocating corresponding memory for each mode, the memory being the running space of the target model corresponding to that mode; running the corresponding target model based on the memory, LED identifiers, and lighting effect parameters corresponding to each mode to obtain first control data for each LED corresponding to each mode, the first control data including at least one frame of lighting control data; determining second control data for all LEDs in the lighting fixture based on the first control data for each LED corresponding to each mode, and transmitting the second control data of each LED to the lighting control chip, triggering the lighting control chip to control the LEDs to emit light according to the multiple modes based on the second control data of each LED, the second control data including at least one frame of lighting control data.
[0005] Secondly, this application also provides a lighting control device, applied to a processor of a lighting fixture, wherein the lighting fixture further includes a lighting control chip and multiple LEDs. The device includes: a data acquisition module for acquiring configuration data of the lighting fixture, the configuration data including multiple modes, LED identifiers corresponding to each mode, and lighting effect parameters corresponding to each mode; a model determination module for determining a target model corresponding to each mode; a resource allocation module for allocating corresponding memory for each mode, the memory being the running space of the target model corresponding to that mode; a first calculation module for running the corresponding target model based on the memory, LED identifiers, and lighting effect parameters corresponding to each mode to obtain first control data for each LED corresponding to each mode, the first control data including at least one frame of lighting control data; and a second calculation module for determining second control data for all LEDs in the lighting fixture based on the first control data for each LED corresponding to each mode, and transmitting the second control data of each LED to the lighting control chip, triggering the lighting control chip to control the LEDs to emit light according to the multiple modes based on the second control data of each LED, the second control data including at least one frame of lighting control data.
[0006] Thirdly, this application also provides a lighting fixture, including: one or more processors; a memory; a lighting control chip and a plurality of lamp beads, the lighting control chip being connected to the processor and each of the lamp beads respectively; one or more application programs, wherein the one or more application programs are stored in the memory, the one or more application programs are configured to be executed by the one or more processors, and the one or more application programs are configured to perform the aforementioned method.
[0007] In this application, firstly, configuration data of the lamp is obtained, including multiple modes, LED identifiers corresponding to each mode, and lighting effect parameters corresponding to each mode; secondly, a target model corresponding to each mode is determined; then, corresponding memory is allocated for each mode, the memory being the running space of the target model corresponding to that mode; finally, the corresponding target model is run based on the memory, LED identifiers, and lighting effect parameters corresponding to each mode to obtain first control data for each LED corresponding to each mode, the first control data including at least one frame of lighting control data; based on the first control data for each LED corresponding to each mode, second control data for all LEDs in the lamp is determined, and the second control data for each LED is transmitted to the lighting control chip, triggering the lighting control chip to control the LEDs to emit light according to multiple modes based on the second control data for each LED, the second control data including at least one frame of lighting control data.
[0008] This application allocates memory for each mode, enabling data isolation for the target model running for each mode. This results in more accurate first control data, which in turn leads to more accurate second control data for each LED, allowing the LEDs in the lamp to emit light accurately in multiple modes and improving the user experience.
[0009] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 A flowchart of the lighting control method provided in an embodiment of this application is shown; Figure 2 A flowchart of a lighting control method according to another embodiment of this application is shown; Figure 3 A flowchart of a lighting control method according to another embodiment of this application is shown; Figure 4 A flowchart of a lighting control method according to another embodiment of this application is shown; Figure 5 A flowchart of a lighting control method according to another embodiment of this application is shown; Figure 6 A flowchart of a lighting control method according to another embodiment of this application is shown; Figure 7 A flowchart of the existing single display mode method is shown; Figure 8 A flowchart of a lighting control method according to another embodiment of this application is shown; Figure 9 A structural block diagram of the lighting control method apparatus provided in an embodiment of this application is shown; Figure 10 A structural block diagram of the lamp provided in an embodiment of this application is shown; Figure 11 A structural block diagram of a computer-readable storage medium provided in an embodiment of this application is shown; Figure 12A structural block diagram of a computer program product provided in an embodiment of this application is shown. Detailed Implementation
[0012] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, and not all of them. The components of the embodiments of the present application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present application. All other embodiments obtained by those skilled in the art based on the embodiments of the present application without inventive effort are within the scope of protection of the present application.
[0013] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0014] Existing solutions can only display one mode for a single light fixture, either a music mode or a color mode. A light fixture can only display one effect at a time, failing to meet the requirement of displaying multiple modes simultaneously. Furthermore, the inventors discovered that executing multiple modes from a single memory location leads to data corruption, resulting in significant errors in the light control data and making it difficult for the light fixture to accurately display multiple modes simultaneously.
[0015] Therefore, in this application embodiment, a lighting control method, device, and lighting fixture are provided to solve or partially solve the above-mentioned problems.
[0016] Please see Figure 1 The diagram illustrates a flowchart of a lighting control method provided in this application embodiment. The method is applied to a processor of a lighting fixture, which also includes a lighting control chip and multiple LED beads. Specifically, it includes steps S101 to S105.
[0017] Step S101: Obtain the configuration data of the lamp, the configuration data including multiple modes, the lamp bead identifier corresponding to each mode, and the lighting effect parameters corresponding to each mode.
[0018] It should be noted that the configuration data is user-defined data. The user sets multiple modes, the corresponding LED bead identifier for each mode, and the corresponding lighting effect parameters in the application, and then sends the configuration data to the lamp.
[0019] In one alternative embodiment, the processor can read the already stored configuration data from the storage module. If new configuration data is detected, the processor overwrites the existing configuration data in the storage module with the new configuration data and then reads the configuration data from the storage module.
[0020] It is understood that the modes include, but are not limited to, music mode, color mode, or DIY mode. The lamp includes multiple LEDs, each installed in a fixed position within the lamp, and each LED has a corresponding identifier, which can be the LED's serial number. The LED identifier corresponds to its installation position; based on the identifier, the installation location of the LED can be determined. Therefore, users can determine the LED identifier corresponding to each mode based on the area set for each mode. Lighting effect parameters include, but are not limited to, color value, brightness value, light effect movement direction, and light effect movement speed.
[0021] In one alternative embodiment, the luminaire is pre-configured into multiple zones, each zone corresponding to an LED identifier. The user selects several zones in the application to execute different modes, sets the lighting effect parameters corresponding to each mode, and then obtains configuration data and sends the configuration data to the processor.
[0022] In one alternative embodiment, the user divides the area according to their needs, selects multiple areas from the divided areas for display, and sets the mode and lighting effect parameters for each display area.
[0023] In one optional embodiment, each of the multiple modes can be different, or at least two of the multiple modes can be different. That is, the same mode can be executed in multiple regions, or a different mode can be executed in each region. For example, the configuration data includes three modes, each corresponding to a different region: music mode, color mode, and DIY mode. As another example, the configuration data includes three modes, each corresponding to a different region: music mode, color mode, and DIY mode.
[0024] It should be noted that the LED identifiers for any two modes are not duplicated, meaning that the areas corresponding to each mode do not overlap.
[0025] In one example, the user assigns zones, sets modes, and configures lighting effect parameters within the application. When assigning zones, the user divides the lighting fixture into several zones, specifying the number of integrated circuits (ICs) per zone. Each IC can correspond to one or more LEDs. Based on each zone, a unique LED identifier is assigned, and the user can configure whether each zone is illuminated. When setting modes, the user can assign different modes to each zone, such as music mode, color mode, or DIY mode. When setting lighting effect parameters for each mode, the user can configure parameters such as color and brightness values. For example, in music mode, the user can set the sensitivity and direction of the lighting effect movement; in DIY mode, the user can set the direction and speed of the lighting effect movement and the range of movement. This determines the configuration data. Then, the application sends these configuration data to the chip, which stores them in memory. When the system powers on, it can read these configuration data from memory. Based on the configuration data, it can know which areas are in combination mode, whether each area is lit, the mode parameters of each area, and the mode lighting effect parameters (such as color value, brightness value, sensitivity of music mode and the direction of movement of specific lighting effects, direction and speed of lighting effects in DIY mode, range of movement of lighting effects, effective range of lighting effects, etc.). When the application sends the data, it will send it in the order of the physical location of each area. The chip will also store it in memory in the order of the physical location of each area. Reading is also done in order. If the user does not set the reading order, the chip will read it in the default order preset by the lighting designer.
[0026] Step S102: Determine the target model corresponding to each of the patterns.
[0027] Understandably, the target model can be the lighting effect execution function, and running the lighting effect execution function yields the lighting control data. Different modes correspond to different display logic; therefore, the target models for different modes are also different, and running different target models is necessary to display different modes. Therefore, it is necessary to determine the target model corresponding to each mode.
[0028] In one optional embodiment, the database stores multiple preset modes and preset models corresponding to each preset mode. The preset model corresponding to the preset mode that is the same as the mode is taken as the target model corresponding to the mode. The target model corresponding to each mode is determined in this way.
[0029] Step S103: Allocate corresponding memory for each mode, wherein the memory is the running space of the target model corresponding to the mode.
[0030] Understandably, during system startup, corresponding memory is allocated for each mode. This memory provides runtime space for the target model; in other words, when running the target model corresponding to a mode, data is read and written from the memory allocated to that mode. Allocating different memory to different modes ensures that the target model for each mode runs independently, thereby achieving data isolation between modes and preventing data corruption.
[0031] In one optional embodiment, memory is allocated to each mode based on a pre-set storage amount. For example, if the maximum memory requirement of each mode is less than 1k, the memory size corresponding to each mode is set to 1k, which ensures that the memory for calculating the lighting effects of each mode is sufficient and also ensures the isolation of the lighting effect calculations corresponding to each mode.
[0032] In one optional embodiment, allocating corresponding memory for each of the modes includes steps S1031 to S1032: Step S1031: Determine the number of LEDs corresponding to each mode based on the LED identifier corresponding to each mode.
[0033] Understandably, each LED has an identifier, and the number of LEDs corresponding to each mode can be determined based on the LED identifier corresponding to each mode.
[0034] Step S1032: Allocate corresponding memory for each mode according to the number of LEDs corresponding to each mode.
[0035] Each mode is allocated memory based on the number of LEDs it corresponds to. If a mode has more LEDs, then the memory capacity for that mode is larger.
[0036] The embodiments of this application can both ensure sufficient memory for calculating lighting effects in each mode and avoid resource waste.
[0037] In one optional embodiment, before allocating corresponding memory for each mode, it is determined whether new configuration data is detected being sent by the application. If no new configuration data is detected, the new configuration data overwrites the original configuration data, and the process returns to obtaining the configuration data of the lamp and subsequent steps.
[0038] Step S104: Based on the memory, LED identifier and lighting effect parameters corresponding to each mode, run the corresponding target model to obtain the first control data for each LED corresponding to each mode. The first control data includes at least one frame of lighting control data.
[0039] Understandably, each mode needs to be displayed according to a preset method, which is related to the physical location of each LED and the lighting effect parameters set by the user. Memory is the running space of the target model corresponding to that mode, used to achieve data isolation between modes. Therefore, it is necessary to run the corresponding target model based on the memory, LED identifier, and lighting effect parameters corresponding to each mode to obtain the first control data for each LED corresponding to each mode.
[0040] In one alternative embodiment, the target model corresponding to each mode can be run serially by the processor, or the target model corresponding to each mode can be run in parallel; no specific limitation is made here.
[0041] In one optional embodiment, the first control data can be a single frame of lighting control data, or it can be multiple frames of lighting control data. Each frame of lighting control data is used to control the LED to display once. For example, the first control data for one LED is: lighting control data 1. Another example is: lighting control data 1, lighting control data 2, ..., lighting control data N, where N is a positive integer greater than 3.
[0042] Step S105: Based on the first control data of each lamp bead corresponding to each mode, determine the second control data of all lamp beads in the lamp, and transmit the second control data of each lamp bead to the lamp control chip, triggering the lamp control chip to control the lamp bead to emit light according to multiple modes based on the second control data of each lamp bead, wherein the second control data includes at least one frame of lamp control data.
[0043] It should be noted that the lighting control data of each lamp bead in the lamp is the second control data. The second control data is transmitted to the lighting control chip, and the lighting control chip can control the lamp bead to emit light in multiple modes based on the second control data of each lamp bead.
[0044] In one example, the first control data includes a frame of lighting control data, and the second control data includes a frame of lighting control data. The target model is run once based on the memory, lamp bead identifier and lighting effect parameters corresponding to each mode to obtain a frame of lighting control data for each lamp bead corresponding to each mode. The second control data (a frame of lighting control data) of all lamp beads in the lamp can be determined based on the first control data (a frame of lighting control data) of each lamp bead corresponding to each mode.
[0045] In one example, the first control data includes one frame of lighting control data, and the second control data includes multiple frames of lighting control data. The target model is run once based on the memory, LED identifier, and lighting effect parameters corresponding to each mode to obtain one frame of lighting control data for each LED corresponding to each mode. The first control data (one frame of lighting control data) for each LED corresponding to each mode is obtained multiple times. Then, based on the first control data (one frame of lighting control data) for each LED corresponding to each mode obtained multiple times, the second control data (multiple frames of lighting control data) for all LEDs in the lamp is determined.
[0046] In one example, the first control data includes multiple frames of lighting control data, and the second control data includes one frame of lighting control data. The target model is run once based on the memory, lamp bead identifier and lighting effect parameters corresponding to each mode to obtain multiple frames of lighting control data for each lamp bead corresponding to each mode. Based on the first control data (multiple frames of lighting control data) for each lamp bead corresponding to each mode, multiple frames of second control data for all lamp beads in the lamp are determined.
[0047] In one example, the first control data includes multiple frames of lighting control data, and the second control data includes multiple frames of lighting control data. The target model is run once based on the memory, lamp bead identifier and lighting effect parameters corresponding to each mode to obtain multiple frames of lighting control data for each lamp bead corresponding to each mode. Based on the first control data (multiple frames of lighting control data) for each lamp bead corresponding to each mode, multiple frames of second control data (multiple frames of lighting control data) for all lamp beads in the lamp are determined. In this embodiment, firstly, configuration data of the lamp is obtained, including multiple modes, LED identifiers corresponding to each mode, and lighting effect parameters corresponding to each mode; secondly, a target model corresponding to each mode is determined; then, corresponding memory is allocated for each mode, the memory being the running space of the target model corresponding to that mode; finally, the corresponding target model is run based on the memory, LED identifiers, and lighting effect parameters corresponding to each mode to obtain first control data for each LED corresponding to each mode, the first control data including at least one frame of lighting control data; based on the first control data for each LED corresponding to each mode, second control data for all LEDs in the lamp is determined, and the second control data for each LED is transmitted to the lighting control chip, triggering the lighting control chip to control the LEDs to emit light according to multiple modes based on the second control data for each LED, the second control data including at least one frame of lighting control data.
[0048] This application allocates memory for each mode, enabling data isolation for the target model operation corresponding to each mode. This results in more accurate first control data, which in turn leads to more accurate second control data for each LED in the lamp. Consequently, the LEDs in the lamp can accurately emit light in multiple modes, improving the user experience.
[0049] This application achieves a unique lighting effect for each user-selected area, allowing multiple areas to operate simultaneously without interference, while ensuring that the lighting effect data changes for each area. This breaks the previous limitation that lighting fixtures could only run one scene lighting effect at a time, enabling greater flexibility and adjustability of lighting effects on a single fixture and improving the user experience.
[0050] Please see Figure 2 The diagram illustrates a flowchart of a lighting control method provided in this application embodiment. The method is applied to a processor of a lighting fixture, which also includes a lighting control chip and multiple LED beads. Specifically, it includes steps S201 to S206.
[0051] Step S201: Obtain the configuration data of the lamp, the configuration data including multiple modes, the lamp bead identifier corresponding to each mode, and the lighting effect parameters corresponding to each mode.
[0052] Step S202: Determine the target model corresponding to each of the aforementioned patterns.
[0053] Step S203: Allocate corresponding memory for each mode, wherein the memory is the running space of the target model corresponding to the mode.
[0054] Step S204: Run the corresponding target model based on the memory, LED identifier and lighting effect parameters corresponding to each mode to obtain multi-frame lighting control data of each LED in a first order for each mode.
[0055] It should be noted that the target model is run based on the memory, LED identifier, and lighting effect parameters corresponding to each mode to obtain multi-frame lighting control data for each LED in each mode, arranged in the first order.
[0056] An example is that the multiple frames of lighting control data arranged in the first order are "lighting control data 1, lighting control data 2, ..., lighting control data N", and each lighting control data is used to control the LED to display once, that is, the multiple frames of lighting control data arranged in the first order are used to control the LED to display multiple times.
[0057] Step S205: Determine the first control data for each LED corresponding to each mode based on the multi-frame lighting control data arranged in a first order for each LED corresponding to each mode.
[0058] In one optional embodiment, the multiple frames of lighting control data for each LED corresponding to each mode, arranged in a first order, are used as the first control data. That is, the first control data for one LED is used to control that LED to display multiple times.
[0059] In one optional embodiment, the configuration data further includes gradient parameters corresponding to each mode. Gradient data arranged in a second order between adjacent frames of lighting control data is determined based on the gradient parameters corresponding to each mode and the multi-frame lighting control data of each LED arranged in a first order. The multi-frame lighting control data of each LED corresponding to each mode arranged in the first order, and the gradient data arranged in the second order between all adjacent frames of lighting control data, are used as first control data. The values of the gradient data arranged in the second order between adjacent frames of lighting control data are located between those adjacent frames, and the closer the gradient data is to the lighting control data in the arrangement order, the smaller the difference between the gradient data and the value of the lighting control data. For example, if two frames of lighting control data are obtained, the first frame is 10 and the second frame is 23, the two gradient data arranged in the second order based on these two frames of lighting control data are 14 and 18 respectively. The lighting control data (10), gradient data (14), gradient data (18), and lighting control data (23) are used as the first control data. The LED beads are controlled to display sequentially based on the lighting control data 10, 14, 18, and 23. This allows the displayed light to change gradually rather than abruptly, improving the user's visual experience. It should be noted that the lighting control data here are specific values and are only for illustration, without any specific limitations.
[0060] In one example, the obtained multi-frame lighting control data arranged in a first order is "lighting control data 1, lighting control data 2, lighting control data 3, lighting control data 4". Based on the multi-frame lighting control data arranged in the first order and the corresponding gradient parameters, at least one gradient data arranged in a second order between two adjacent frames of lighting control data can be obtained. The gradient data between lighting control data 1 and lighting control data 2 can be obtained as gradient data 1, the gradient data between lighting control data 2 and lighting control data 3 can be obtained as gradient data 2, and the gradient data between lighting control data 3 and lighting control data 4 can be obtained as gradient data 3. Therefore, "lighting control data 1, gradient data 1, lighting control data 2, gradient data 2, lighting control data 3, gradient data 3, lighting control data 4" is used as the first control data.
[0061] Step S206: Based on the first control data of each LED corresponding to each mode, determine the second control data of all LEDs in the lamp, and transmit the second control data of each LED to the lamp control chip, triggering the lamp control chip to control the LED to emit light according to multiple modes based on the second control data of each LED.
[0062] In one optional embodiment, the first control data includes multiple frames of lighting control data, and the second control data is a single frame of lighting control data. Based on the first control data of each lamp bead corresponding to each mode, the second control data of all lamp beads in the lamp is determined, and the second control data of each lamp bead is transmitted to the lighting control chip in sequence, triggering the lighting control chip to control the lamp bead to emit light according to multiple modes based on the second control data of each lamp bead.
[0063] For example, the first control data includes 4 frames of lighting control data, the second control data includes 1 frame of lighting control data, the lamp includes 4 LEDs, mode 1 corresponds to LED 1 and LED 2, mode 2 corresponds to LED 3 and LED 4, the first control data corresponding to LED 1 is: A1, A2, A3, A4, the first control data corresponding to LED 2 is: B1, B2, B3, B4, the first control data corresponding to LED 3 is: C1, C2, C3, C4, the first control data corresponding to LED 4 is: D1, D2, D3, D4. Based on the first control data of each LED corresponding to each mode, the second control data of all LEDs in the lamp is determined, resulting in the following 4 second control data corresponding to LED 1: A1, A2, A3, A4, the 4 second control data corresponding to LED 2: B1, B2, B3, B4, the 4 second control data corresponding to LED 3: C1, C2, C3, C4, the 4 second control data corresponding to LED 4: D1, D2, D3, D4. The first second control data of each LED is transmitted to the lighting control chip. Based on the first second control data A1, B1, C1, and D1 corresponding to each LED, the lighting control chip controls the four LEDs for the first display. Then, the second second control data of each LED is transmitted to the lighting control chip. Based on the second second control data A2, B2, C2, and D21 corresponding to each LED, the lighting control chip controls the four LEDs for the second display, and so on, until the four LEDs have completed four displays. It should be noted that this embodiment is only an example, and the number of LEDs, the number of modes, and the number of lighting control data for each LED are not specifically limited.
[0064] In one optional embodiment, the first control data includes multiple frames of lighting control data, and the second control data consists of multiple lighting control data. Based on the first control data of each LED corresponding to each mode, the second control data of all LEDs in the lamp is determined, and the second control data of each LED is transmitted to the lighting control chip. The lighting control chip is then triggered to control the LEDs to emit light according to the multiple modes in sequence based on the second control data of each LED.
[0065] For example, the first control data includes 4 frames of lighting control data, the second control data includes 4 frames of lighting control data, the lamp includes 4 LEDs, mode 1 corresponds to LED 1 and LED 2, mode 2 corresponds to LED 3 and LED 4, the first control data corresponding to LED 1 is: A1, A2, A3, A4, the first control data corresponding to LED 2 is: B1, B2, B3, B4, the first control data corresponding to LED 3 is: C1, C2, C3, C4, the first control data corresponding to LED 4 is: D1, D2, D3, D4. Based on the first control data of each LED corresponding to each mode, the second control data of all LEDs in the lamp is determined, resulting in the second control data corresponding to LED 1 being: A1, A2, A3, A4, the second control data corresponding to LED 2 being: B1, B2, B3, B4, the second control data corresponding to LED 3 being: C1, C2, C3, C4, and the second control data corresponding to LED 4 being: D1, D2, D3, D4. The second control data of each LED bead is transmitted to the lighting control chip. The lighting control chip controls the four LED beads to perform the first display based on the first lighting control data A1, B1, C1, D1 of each LED bead. Then, it controls the four LED beads to perform the second display based on the second lighting control data A2, B2, C2, D2 of each LED bead, until the four LED beads are controlled to complete four displays.
[0066] In this embodiment, the target model corresponding to each mode is run to obtain the first control data for each LED in each mode. Based on the first control data for each mode, the second control data for all LEDs in the lamp is determined, and the second control data for each LED is transmitted to the lamp control chip. This triggers the lamp control chip to control the LED to emit light according to multiple modes based on the second control data for each LED. The target model can be run only once, and subsequently, the LEDs can be controlled to emit light according to multiple modes based on the second control data for each LED.
[0067] Please see Figure 3 The diagram illustrates a flowchart of a lighting control method provided in this application embodiment. The method is applied to a processor of a lighting fixture, which also includes a lighting control chip and multiple LED beads. Specifically, it includes steps S301 to S307.
[0068] Step S301: Obtain the configuration data of the lamp, the configuration data including multiple modes, the lamp bead identifier corresponding to each mode, and the lighting effect parameters corresponding to each mode.
[0069] Step S302: Determine the target model corresponding to each of the patterns.
[0070] Step S303: Allocate corresponding memory for each mode, wherein the memory is the running space of the target model corresponding to the mode.
[0071] Step S304: Determine the input data of the target model based on the lighting effect parameters corresponding to each mode and the preset first frame number, where the first frame number indicates the number of times the corresponding target model has been run.
[0072] It should be noted that one mode involves lighting up in sequence according to rainbow colors. This mode corresponds to 7 LEDs, and the lighting effect parameters are that the first to the seventh LED light up in the order of rainbow colors. Furthermore, each LED dynamically displays the rainbow colors. The first LED displays red in the first frame; for the first LED, it should first display red, then orange, and from the third to the seventh frame, it should display yellow, green, blue, cyan, and purple in sequence. It is known that the output of the target model can differ each time. Different input data during the target model's execution will lead to different output data. Therefore, it is necessary to determine the input data for the target model based on the lighting effect parameters corresponding to each mode and the preset first frame sequence number.
[0073] In one optional embodiment, the input data of the target model can be determined based on the first frame number. For example, the lighting effect parameters are that the first to the seventh LED light bulbs light up sequentially in rainbow colors, and each light dynamically displays rainbow colors. The first LED light bulb displays red in the first frame. If the first frame number is 0, it means that the first LED light bulb displays red in the first frame, and the display colors of the seven LED light bulbs in the first frame are red, orange, yellow, green, blue, cyan, and purple, respectively. If the first frame number is 1, it means that the first LED light bulb displays orange in the second frame, and the display colors of the seven LED light bulbs in the second frame are orange, yellow, green, blue, cyan, purple, and red, respectively.
[0074] In one optional embodiment, a timestamp is determined based on the first frame sequence number, and the input data for the target model is determined based on the timestamp. For example, the lighting effect parameters are that the first to the seventh LED light bulbs light up sequentially in rainbow colors, and each LED dynamically displays rainbow colors. The first LED light bulb displays red in the first frame, and the duration of each LED light bulb's illumination is 1 second. If the first frame sequence number is 0, it means that the first LED light bulb displays red in the first frame, resulting in the following display colors for the seven LED light bulbs in the first frame: red, orange, yellow, green, blue, cyan, and purple. If the first frame sequence number is 1, it means that each LED light bulb has been displayed for 1 second, and the first LED light bulb should display orange in the next frame, resulting in the following display colors for the seven LED light bulbs in the second frame: orange, yellow, green, blue, cyan, purple, and red.
[0075] Step S305: Run the corresponding target model according to the memory, LED identifier and input data corresponding to each mode to obtain the current lighting control data of each LED corresponding to each mode.
[0076] It is understood that by running the corresponding target model based on the memory, LED identifier and input data corresponding to each mode, the current lighting control data of each LED corresponding to each mode can be obtained. The current lighting control data represents a frame of lighting control data.
[0077] Step S306: Determine the first control data for each LED corresponding to each mode based on the current lighting control data for each LED corresponding to each mode.
[0078] It is understandable that after obtaining the current control data of each LED corresponding to each mode, the first control data of each LED corresponding to each mode is determined based on the current lighting control data of each LED corresponding to each mode. That is, the first control data includes one frame of LED data.
[0079] Step S307: Based on the first control data of each LED corresponding to each mode, determine the second control data of all LEDs in the lamp, and transmit the second control data of each LED to the lamp control chip, triggering the lamp control chip to control the LED to emit light according to multiple modes based on the second control data of each LED.
[0080] In one optional embodiment, determining the second control data of all LEDs in the lamp based on the first control data of each LED corresponding to each mode includes steps S3071 to S3072: Step S3071: Obtain preset data as control data for each LED that does not correspond to the mode.
[0081] It should be noted that the user may not have configured every single LED in the light fixture. Therefore, there are LEDs corresponding to each mode, as well as multiple LEDs not corresponding to a given mode. These multiple LEDs not corresponding to a given mode are either off by default or display a background color (a preset solid or non-solid background color). Preset data is obtained as the control data for each LED not corresponding to a given mode. The LEDs corresponding to the preset data are either off or displaying the background color. The control data for these LEDs is single-frame lighting control data.
[0082] Step S3072: Based on the lamp bead identifier in the lamp fixture, the first control data of each lamp bead corresponding to each mode and the control data of each lamp bead not corresponding to the mode are concatenated to obtain the second control data of all lamp beads in the lamp fixture.
[0083] In one example, the lamp includes 1-100 LEDs, with each number corresponding to one LED. The user sets three modes: the first mode corresponds to LEDs 1-20, the second mode corresponds to LEDs 21-50, and the third mode corresponds to LEDs 51-80. Preset data is obtained as the control data for LEDs 81-100 that do not correspond to a mode. The first control data of each LED 1-20, each LED 21-50, each LED 51-80, and each LED 81-100 are concatenated according to their numbers to obtain the second control data for each LED 1-100.
[0084] In one optional embodiment, white balance calculation and current limiting calculation are performed on the first control data of each lamp corresponding to each mode to obtain new first control data of each lamp corresponding to each mode. Then, the first control data of each lamp corresponding to each mode and the control data of each lamp not corresponding to the mode are spliced together to obtain the second control data of all lamps in the lamp.
[0085] In one optional embodiment, the lighting control data of the LED located at the junction of two modes can be taken as the intermediate data of the first control data of the LEDs in the vicinity. For example, LEDs 1, 2 and 3 are arranged in sequence in physical position. LED 1 corresponds to mode 1, LED 3 corresponds to mode 2, and LED 2 does not correspond to any mode. The first control data of LED 1 is s, and the first control data of LED 2 is h. Then the control data of LED 2 can be set to the intermediate value between s and h.
[0086] In one optional embodiment, after step S307, the method further includes: determining whether to stop displaying; if displaying is stopped, saving the configuration data and releasing the memory corresponding to each region.
[0087] Please see Figure 4 The diagram illustrates a flowchart of a lighting control method provided in an embodiment of this application. The method is applied to a processor of a lighting fixture, which also includes a lighting control chip and multiple LED beads. Specifically, it includes steps S401 to S408.
[0088] Step S401: Obtain the configuration data of the lamp, the configuration data including multiple modes, the lamp bead identifier corresponding to each mode, and the lighting effect parameters corresponding to each mode.
[0089] Step S402: Determine the target model corresponding to each of the patterns.
[0090] Step S403: Allocate corresponding memory for each mode, wherein the memory is the running space of the target model corresponding to the mode.
[0091] Step S404: Determine the input data of the target model based on the lighting effect parameters corresponding to each mode and the preset first frame number, where the first frame number indicates the number of times the corresponding target model has been run.
[0092] Step S405: Run the corresponding target model according to the memory, LED identifier and input data corresponding to each mode to obtain the current lighting control data of each LED corresponding to each mode.
[0093] Step S406: Use the current lighting control data of each LED corresponding to each mode as the first control data.
[0094] It is understood that the current lighting control data of each LED corresponding to each mode is used as the first control data, that is, the first control data is a single frame of lighting control data, and a frame of lighting control data is obtained each time the target model is run.
[0095] Step S407: Based on the first control data of each LED corresponding to each mode, determine the second control data of all LEDs in the lamp, and transmit the second control data of each LED to the lamp control chip, triggering the lamp control chip to control the LED to emit light according to multiple modes based on the second control data of each LED.
[0096] Step S408: Increment the first frame number corresponding to each mode by one to obtain a new preset first frame number, and return to execute the input data and subsequent steps for determining the target model based on the lighting effect parameters corresponding to each mode and the preset first frame number.
[0097] An exemplary approach involves acquiring configuration data for the lighting fixture and determining the target model corresponding to each mode. Memory is allocated for each mode. Input data for the target model is determined based on the lighting effect parameters corresponding to each mode and a preset first frame number. The target model is run according to the memory, LED identifier, and input data for each mode to obtain the current lighting control data for each LED in each mode. This current lighting control data is used as the first control data. Second control data for all LEDs in the lighting fixture is determined based on the first control data for each LED in each mode, and the second control data for each LED is transmitted to the lighting control chip. This triggers the lighting control chip to control the LEDs to emit light in multiple modes based on the second control data for each LED. Then, the first frame number corresponding to each mode is incremented by one to obtain a new preset first frame number. The process returns to executing the input data for determining the target model based on the lighting effect parameters corresponding to each mode and the preset first frame number, and subsequent steps. The process can continuously calculate the second control data for each LED in the lighting fixture and transmit the second control data for each LED to the lighting control chip, triggering the lighting control chip to control the LEDs to emit light in multiple modes based on the second control data for each LED. It can realize the real-time calculation of the second control data of each lamp bead in the lamp and the real-time emission of each lamp bead.
[0098] Please see Figure 5 The diagram illustrates a flowchart of a lighting control method provided in this application embodiment. The method is applied to a processor of a lighting fixture, which also includes a lighting control chip and multiple LED beads. Specifically, it includes steps S501 to S511.
[0099] Step S501: Obtain the configuration data of the lamp, the configuration data including multiple modes, the lamp bead identifier corresponding to each mode, and the lighting effect parameters corresponding to each mode.
[0100] Step S502: Determine the target model corresponding to each of the patterns.
[0101] Step S503: Allocate corresponding memory for each mode, wherein the memory is the running space of the target model corresponding to the mode.
[0102] Step S504: Determine the input data of the target model based on the lighting effect parameters corresponding to each mode and the preset first frame number, where the first frame number indicates the number of times the corresponding target model has been run.
[0103] Step S505: Run the corresponding target model according to the memory, LED identifier and input data corresponding to each mode to obtain the current lighting control data of each LED corresponding to each mode.
[0104] Step S506: Based on the current lighting control data of each LED corresponding to each mode, the previous lighting control data, and the gradation parameters, obtain the gradation model and the number of gradation steps for each mode.
[0105] It should be noted that in actual lighting displays, if the lights switch abruptly between two consecutive frames, such as switching directly from red to blue, it may give users a bad experience in some scenarios. Therefore, it is necessary to set some gradient frames between the two display frames so that users see the lights gradually changing from red to blue, thus improving the user's visual experience.
[0106] Therefore, the configuration data of this application also includes gradient parameters corresponding to each mode. The gradient model and gradient number corresponding to each mode are obtained based on the current lighting control data of each LED corresponding to each mode, the previous lighting control data, and the gradient parameters.
[0107] It is understandable that the gradient parameters include at least one of the gradient step, gradient speed, and gradient number.
[0108] For example, the gradient parameters include the gradient step and the number of gradients. For mode 1, if the user sets the gradient step to 0 and the number of gradients to 3, it means that this mode does not need a gradient and only needs to display the same color three times in sequence.
[0109] As an example, the fading parameters include the fading step and the number of fading iterations. For mode 2, if the user sets the fading step to 1 and the number of fading iterations to 3, it means that this mode requires fading, and the step size for each fading iteration is 1. It should be noted that this is just an example; the fading step for each LED in a given mode may be different, and the step size for each LED in each fading iteration may also be different.
[0110] Step S507: Based on the gradient model corresponding to each mode, determine the control data of each LED bead corresponding to each mode, and use the control data of each LED bead corresponding to each mode as the first control data. The control data of each LED bead does not exceed the range from the previous control data to the current control data, and the difference between the control data of each LED bead and the current control data is less than the difference between the previous control data and the current control data.
[0111] It is understood that the control data of each LED bead corresponding to each mode is determined based on the gradient model corresponding to each mode, and the control data of each LED bead corresponding to each mode is used as the first control data. The control data of each LED bead does not exceed the range from the previous control data to the current control data, and the difference between the control data of each LED bead and the current control data is less than the difference between the previous control data and the current control data. The control data is one frame of control data.
[0112] In one alternative embodiment, the gradient model corresponding to each mode can be run serially by the processor, or the gradient model corresponding to each mode can be run in parallel; no specific limitation is made here.
[0113] For example, for a single LED, the previous lighting control data corresponds to a display color of black (0,0,0), the current lighting control data corresponds to a display color of blue (0,0,255), and based on the gradient model, the current control data corresponds to an electric blue (0,0,200). The previous control data corresponds to a display color of navy blue (0,0,100). Thus, by controlling the LED to sequentially display four frames of black (0,0,0), navy blue (0,0,100), electric blue (0,0,200), and blue (0,0,255), a gradient from black to blue can be achieved, improving the user's visual experience.
[0114] In one optional embodiment, determining the control data for each LED bead corresponding to each mode based on the gradient model corresponding to each mode includes steps S5071 to S5072: Step S5071: Allocate a corresponding cache for each mode, wherein the cache is the running space of the gradient model corresponding to that mode.
[0115] Step S5072: Determine the control data for each LED bead corresponding to each mode based on the cache corresponding to each mode and the gradient model.
[0116] In this embodiment, the control data of each LED bead corresponding to each mode is determined based on the cache corresponding to each mode and the gradient model. This can achieve data isolation when running the gradient model corresponding to each mode, ensure the security of the data corresponding to each mode, obtain more accurate control data for each LED bead, and thus obtain more accurate first control data for each LED bead corresponding to each mode, and more accurately display multiple modes.
[0117] In one optional embodiment, a first cache and a second cache are allocated for each mode. The first cache stores the current lighting control data and the previous lighting control data for each LED corresponding to that mode, and the second cache stores the control data for each LED corresponding to that mode. The capacity of the first cache is determined by the number of LEDs corresponding to that mode, ensuring that the first cache provides sufficient space. The capacity of the second cache is also determined by the number of LEDs corresponding to that mode, ensuring that the second cache provides sufficient space.
[0118] In one alternative embodiment, a third cache is allocated to store second control data for each LED of the luminaire. The capacity of the third cache is determined by the number of LEDs corresponding to the luminaire, ensuring that the third cache provides sufficient space.
[0119] Step S508: Based on the first control data of each LED corresponding to each mode, determine the second control data of all LEDs in the lamp, and transmit the second control data of each LED to the lamp control chip, triggering the lamp control chip to control the LED to emit light according to multiple modes based on the second control data of each LED.
[0120] Step S509: Subtract one from the gradient count to obtain the new gradient count, and determine whether the new gradient count is 0.
[0121] It should be noted that the gradient count represents the number of times the gradient model needs to be calculated. After executing the gradient model once, the gradient count is reduced by one to get the new gradient count, and then it is checked whether the new gradient count is 0.
[0122] Step S510: If the new gradient count is 0, increment the first frame number corresponding to each mode by one to obtain a new preset first frame number, and return to execute the input data and subsequent steps for determining the target model based on the lighting effect parameters corresponding to each mode and the preset first frame number.
[0123] If the new gradient count is 0, it means that the gradient model no longer needs to be executed, or the gradient display has been implemented. The first frame number corresponding to each mode is incremented by one to obtain a new preset first frame number. Then, the input data and subsequent steps for determining the target model based on the lighting effect parameters corresponding to each mode and the preset first frame number are returned.
[0124] Step S511: If the new gradient count is not 0, return to the execution of determining the control data of each LED bead corresponding to each mode based on the gradient model corresponding to each mode, and use the control data of each LED bead corresponding to each mode as the first control data and subsequent steps.
[0125] Understandably, if the new gradient count is not 0, it means that the gradient display has not been fully realized. In this case, the process returns to the step of determining the control data of each LED bead corresponding to each mode based on the gradient model corresponding to each mode, and using the control data of each LED bead corresponding to each mode as the first control data and subsequent steps.
[0126] In this embodiment, after obtaining the first control data for each LED corresponding to each mode, the gradient model and gradient count for each mode are obtained based on the current lighting control data, the previous lighting control data, and the gradient parameters for each LED corresponding to each mode. Based on the gradient model for each mode, the control data for each LED corresponding to each mode is determined, and this control data is used as the first control data. Based on the first control data for each LED corresponding to each mode, the second control data for all LEDs in the lamp is determined. After transmitting the second control data for each LED to the lighting control chip, if it is necessary to continue executing the gradient model for each mode, the gradient count is decremented by one to obtain a new gradient count. The gradient model for each mode is then returned to obtain new second control data for each LED to control the LED display. If it is not necessary to continue executing the gradient model for each mode, the first frame number for each mode is incremented by one to obtain a new preset first frame number. The execution of the target model for each mode and subsequent operations is then returned. This allows the LED display color to change gradually, improving the user's visual experience.
[0127] Please see Figure 6 The diagram illustrates a flowchart of a lighting control method provided in an embodiment of this application. The method is applied to a processor of a lighting fixture, which also includes a lighting control chip and multiple LED beads. Specifically, it includes steps S601 to S610.
[0128] Step S601: System startup.
[0129] Step S602: Combinatorial mode initialization. That is, initializing the system.
[0130] Step S603: Does the system run in combination mode? If it runs in combination mode, proceed to step S604; otherwise, proceed to step S610 to obtain output data through other modes.
[0131] Step S604: Prepare for each mode (prepare memory and assign various parameter values). Specifically, allocate corresponding memory for each mode and prepare corresponding lighting effect parameters for each mode.
[0132] Step S605: Start the specific data processing process led_seg_send_data_process for the combined pattern. This means that there are operating rules set for the target model corresponding to each pattern, and the process begins executing those rules.
[0133] Step S606: Start running each mode in the combined mode.
[0134] Step S607: Run led_seg_send_data_process to run the target model corresponding to each mode according to the set running rules.
[0135] Step S608: Obtain the final output data for all patterns of the combined pattern.
[0136] Step S609: Output to the LED chip for display.
[0137] Step S610: Other modes.
[0138] Please see Figure 7 It shows a flowchart of an existing method for displaying a single mode, specifically including steps S701 to S706.
[0139] Step S701: Single-mode control begins.
[0140] Step S702: Issue the mode start command to the system management scheduler.
[0141] If the system determines that it can switch to the new mode.
[0142] Step S703: Switch to the target's single mode and prepare the mode parameters.
[0143] Step S704: Run mode and obtain the effect data.
[0144] Step S705: Output to the underlying plaform to calculate the lighting effect changes, current limiting, and white balance.
[0145] Step S706: The final output is displayed on the light.
[0146] Please see Figure 8 The diagram illustrates a flowchart of a lighting control method provided in an embodiment of this application. The method is applied to a processor of a lighting fixture, which also includes a lighting control chip and multiple LED beads. Specifically, it includes steps S801 to S807.
[0147] Step S801: Combination mode control begins.
[0148] Step S802: Issue the mode start command to the system management scheduler.
[0149] If the system determines that it can switch to the new mode.
[0150] Step S803: Switch to the combination mode and prepare the parameters for each mode in sequence. That is, prepare the lighting effect parameters corresponding to each mode.
[0151] Step S804: Start the process for calculating data in the combined mode. The process sets the running rules for the target model corresponding to each mode, and starts executing the running rules.
[0152] Step S805: Run each mode sequentially, and calculate the corresponding lighting effect data in each sub-mode. Here, lighting effect data represents the first control data.
[0153] Step S806: After calculating the data for each segment, output it to the platform, and then calculate the rate limiting and white balance.
[0154] This can be understood as obtaining the first control data of each LED corresponding to each mode, outputting the first control data of each LED corresponding to each mode to the physical layer, and then calculating current limiting and white balance.
[0155] Step S807: The final output is displayed on the light.
[0156] This application embodiment achieves true multi-mode parallel display on a single lamp by configuring isolation, memory isolation, and process scheduling.
[0157] Please see Figure 9 The diagram shows a structural block diagram of a lighting control device 900 provided in an embodiment of this application. The device 900 includes: a data acquisition module 910, a model determination module 920, a resource allocation module 930, a first calculation module 940, and a second calculation module 950.
[0158] The data acquisition module 910 is used to acquire the configuration data of the lamp, the configuration data including multiple modes, the lamp bead identifier corresponding to each mode, and the lighting effect parameters corresponding to each mode.
[0159] The model determination module 920 is used to determine the target model corresponding to each of the patterns.
[0160] The resource allocation module 930 is used to allocate corresponding memory for each mode, wherein the memory is the running space of the target model corresponding to the mode.
[0161] Furthermore, the resource allocation module 930 is also used to determine the number of LEDs corresponding to each mode based on the LED identifier corresponding to each mode; and to allocate corresponding memory for each mode according to the number of LEDs corresponding to each mode.
[0162] The first calculation module 940 is used to run the corresponding target model based on the memory, LED identifier and lighting effect parameters corresponding to each mode, and obtain the first control data for each LED corresponding to each mode. The first control data includes at least one frame of lighting control data.
[0163] Furthermore, the first calculation module 940 is also used to run the corresponding target model based on the memory, LED identifier and lighting effect parameters corresponding to each mode, to obtain multi-frame lighting control data of each LED corresponding to each mode arranged in a first order; and to determine the first control data of each LED corresponding to each mode based on the multi-frame lighting control data of each LED corresponding to each mode arranged in a first order.
[0164] Furthermore, the first calculation module 940 is also used to determine the input data of the target model based on the lighting effect parameters corresponding to each mode and a preset first frame number, wherein the first frame number indicates the number of times the corresponding target model has been run; run the corresponding target model according to the memory, LED identifier and the input data corresponding to each mode to obtain the current lighting control data of each LED corresponding to each mode; and determine the first control data of each LED corresponding to each mode based on the current lighting control data of each LED corresponding to each mode.
[0165] Furthermore, the first calculation module 940 is also used to use the current lighting control data of each LED corresponding to each of the modes as the first control data.
[0166] Furthermore, the first calculation module 940 is also used to obtain the gradient model and gradient number corresponding to each mode based on the current lighting control data, the previous lighting control data, and the gradient parameters for each LED corresponding to each mode; determine the control data for each LED corresponding to each mode based on the gradient model corresponding to each mode; use the control data for each LED corresponding to each mode as the first control data; the control data for each LED does not exceed the range from the previous lighting control data to the current lighting control data; and the difference between the control data for each LED and the current lighting control data is less than the difference between the previous control data and the current lighting control data.
[0167] Furthermore, the first calculation module 940 is also used to allocate a corresponding cache for each mode, the cache being the running space of the gradient model corresponding to that mode; and to determine the control data of each LED bead corresponding to each mode based on the cache corresponding to each mode and the gradient model.
[0168] The second calculation module 950 is used to determine the second control data of all lamps in the lamp according to the first control data of each lamp corresponding to each mode, and transmit the second control data of each lamp to the lamp control chip, triggering the lamp control chip to control the lamp to emit light according to multiple modes based on the second control data of each lamp, wherein the second control data includes at least one frame of lamp control data.
[0169] Furthermore, the second calculation module 950 is also used to add one to the first frame number corresponding to each mode to obtain a new preset first frame number, and return to execute the input data and subsequent steps for determining the target model based on the lighting effect parameters corresponding to each mode and the preset first frame number.
[0170] Furthermore, the second calculation module 950 is also used to subtract one from the gradient count to obtain a new gradient count, and to determine whether the new gradient count is 0; if the new gradient count is 0, then the first frame number corresponding to each mode is incremented by one to obtain a new preset first frame number, and the process returns to execute the input data and subsequent steps for determining the target model based on the lighting effect parameters corresponding to each mode and the preset first frame number; if the new gradient count is not 0, then the process returns to execute the control data for determining each LED bead corresponding to each mode based on the gradient model corresponding to each mode, and uses the control data for each LED bead corresponding to each mode as the first control data and subsequent steps.
[0171] Furthermore, the second calculation module 950 is also used to acquire preset data as control data for each lamp bead that does not correspond to the mode; and to concatenate the first control data of each lamp bead corresponding to each mode and the control data of each lamp bead that does not correspond to the mode based on the lamp bead identifier in the lamp to obtain the second control data of all lamp beads in the lamp.
[0172] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described device and module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0173] In the several embodiments provided in this application, the coupling between modules can be electrical, mechanical, or other forms of coupling.
[0174] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0175] Please refer to Figure 10 This document illustrates a structural block diagram of a lighting fixture 1000 provided in an embodiment of this application. The lighting fixture 1000 may include one or more of the following components: a processor 1011, a memory 1012, and one or more application programs; a lighting control chip 1013; and a plurality of LED chips 1014. The lighting control chip is connected to the processor and each of the LED chip chips. The processor 1011 is electrically connected to the memory 1012, and the one or more programs are configured to execute the methods described in the foregoing embodiments of the test methods.
[0176] The processor 1011 may include one or more processing cores. The processor 1011 connects to various parts within the luminaire 1000 using various interfaces and lines, and performs various functions and processes data of the luminaire 1000 by running or executing instructions, programs, code sets, or instruction sets stored in the memory 1012, and by calling data stored in the memory 1012. Optionally, the processor 1011 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 1011 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and computer programs; the GPU is responsible for rendering and drawing the displayed content; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 1011 and may be implemented separately through a communication chip. Specifically, the methods described in the foregoing embodiments can be executed by one or more processors 1011.
[0177] In some implementations, memory 1012 may include random access memory (RAM) or read-only memory (ROM). Memory 1012 can be used to store instructions, programs, code, code sets, or instruction sets. Memory 1012 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described below, etc. The data storage area may also store data created during the use of the lamp 1000.
[0178] Please refer to Figure 11 This diagram illustrates a structural block diagram of a computer-readable medium provided in an embodiment of this application. The computer-readable medium 1100 stores program code that can be called by a processor to execute the methods described in the above method embodiments.
[0179] Computer-readable medium 1100 may be an electronic storage device such as flash memory, EEPROM (Electrically Erasable Programmable Read-Only Memory), EPROM, hard disk, or ROM. Optionally, computer-readable medium 1100 includes non-transitory computer-readable storage medium. Computer-readable medium 1100 has storage space for program code 1110 that performs any of the method steps described above. This program code can be read from or written to one or more computer program products. The program code 1110 may be compressed, for example, in a suitable form.
[0180] Please refer to Figure 12 The diagram illustrates a structural block diagram of a computer program product according to an embodiment of this application. The computer program product 1200 includes a computer program / instructions 1210, which, when executed by a processor, implements the steps of the aforementioned method.
[0181] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A lighting control method, characterized in that, A processor for use in a lighting fixture, the lighting fixture further including a lighting control chip and multiple LED chips, the method comprising: Obtain the configuration data of the lamp, the configuration data including multiple modes, the lamp bead identifier corresponding to each mode, and the lighting effect parameters corresponding to each mode; Determine the target model corresponding to each of the aforementioned patterns; Allocate corresponding memory for each mode, whereby the memory serves as the runtime space for the target model corresponding to that mode; Based on the memory, LED bead identifier and lighting effect parameters corresponding to each mode, the corresponding target model is run to obtain the first control data for each LED bead corresponding to each mode. The first control data includes at least one frame of lighting control data. Based on the first control data of each LED corresponding to each mode, the second control data of all LEDs in the lamp are determined, and the second control data of each LED is transmitted to the lamp control chip, triggering the lamp control chip to control the LED to emit light in multiple modes based on the second control data of each LED. The second control data includes at least one frame of lamp control data.
2. The method according to claim 1, characterized in that, The process of allocating corresponding memory for each of the modes includes: Based on the LED identifier corresponding to each mode, determine the number of LEDs corresponding to each mode; Based on the number of LEDs corresponding to each mode, allocate corresponding memory for each mode.
3. The method according to claim 1, characterized in that, Based on the memory, LED identifier, and lighting effect parameters corresponding to each mode, the corresponding target model is run to obtain the first control data for each LED corresponding to each mode, including: Based on the memory, LED identifier and lighting effect parameters corresponding to each mode, run the corresponding target model to obtain multi-frame lighting control data of each LED corresponding to each mode arranged in a first order; The first control data for each LED corresponding to each mode is determined based on the multi-frame lighting control data arranged in a first order for each LED in each mode.
4. The method according to claim 1, characterized in that, Based on the memory, LED identifier, and lighting effect parameters corresponding to each mode, the corresponding target model is run to obtain the first control data for each LED corresponding to each mode, including: The input data of the target model is determined based on the lighting effect parameters corresponding to each mode and the preset first frame number, where the first frame number indicates the number of times the corresponding target model has been run. Run the corresponding target model based on the memory, LED identifier and input data for each mode to obtain the current lighting control data for each LED corresponding to each mode; The first control data for each LED corresponding to each mode is determined based on the current lighting control data for each LED in each mode.
5. The method according to claim 4, characterized in that, The step of determining the first control data for each LED corresponding to each mode based on the current lighting control data for each LED corresponding to each mode includes: The current lighting control data of each LED corresponding to each of the aforementioned modes is used as the first control data; After determining the second control data of all LEDs in the lamp based on the first control data of each LED corresponding to each mode, and transmitting the second control data of each LED to the lamp control chip, the method further includes: Increment the first frame number corresponding to each mode by one to obtain a new preset first frame number, and return to execute the input data and subsequent steps for determining the target model based on the lighting effect parameters corresponding to each mode and the preset first frame number.
6. The method according to claim 4, characterized in that, The configuration data also includes gradient parameters corresponding to each mode, and the determination of first control data for each LED corresponding to each mode based on the current lighting control data for each LED corresponding to each mode includes: The gradient model and gradient count for each mode are obtained based on the current lighting control data, the previous lighting control data, and the gradient parameters for each LED. Based on the gradient model corresponding to each mode, the control data of each LED bead corresponding to each mode is determined. The control data of each LED bead corresponding to each mode is used as the first control data. The control data of each LED bead does not exceed the range from the previous control data to the current control data. The difference between the control data of each LED bead and the current control data is less than the difference between the previous control data and the current control data. After determining the second control data of all LEDs in the lamp based on the first control data of each LED corresponding to each mode, and transmitting the second control data of each LED to the lamp control chip, the method further includes: Subtract one from the previous gradient count to get the new gradient count, and then determine whether the new gradient count is 0. If the new gradient count is 0, then increment the first frame number corresponding to each mode by one to obtain a new preset first frame number, and return to execute the input data and subsequent steps for determining the target model based on the lighting effect parameters corresponding to each mode and the preset first frame number; If the new gradient count is not 0, then return to the execution of determining the control data of each LED corresponding to each mode based on the gradient model corresponding to each mode, and use the control data of each LED corresponding to each mode as the first control data and subsequent steps.
7. The method according to claim 6, characterized in that, The process of determining the control data for each LED bead corresponding to each mode based on the gradient model corresponding to each mode includes: Allocate a corresponding cache for each mode, and the cache is the running space of the gradient model corresponding to that mode; The control data for each LED bead in each mode is determined based on the cache corresponding to each mode and the gradient model.
8. The method according to claim 4, characterized in that, The step of determining the second control data of all LEDs in the lamp based on the first control data of each LED corresponding to each mode includes: Obtain preset data as control data for each LED that does not correspond to the mode; Based on the lamp bead identifier in the lamp, the first control data of each lamp bead corresponding to each mode and the control data of each lamp bead not corresponding to the mode are concatenated to obtain the second control data of all lamp beads in the lamp.
9. A lighting control device, characterized in that, A processor for use in lighting fixtures, the lighting fixtures also including a lighting control chip and multiple LED chips, the device comprising: The data acquisition module is used to acquire the configuration data of the lamp, the configuration data including multiple modes, the lamp bead identifier corresponding to each mode, and the lighting effect parameters corresponding to each mode; The model determination module is used to determine the target model corresponding to each of the patterns; The resource allocation module is used to allocate corresponding memory for each mode, wherein the memory is the running space of the target model corresponding to the mode; The first calculation module is used to run the corresponding target model based on the memory, LED bead identifier and the lighting effect parameters corresponding to each mode, and to obtain the first control data for each LED bead corresponding to each mode. The first control data includes at least one frame of lighting control data. The second calculation module is used to determine the second control data of all lamps in the lamp according to the first control data of each lamp corresponding to each mode, and transmit the second control data of each lamp to the lamp control chip, triggering the lamp control chip to control the lamp to emit light according to multiple modes based on the second control data of each lamp, wherein the second control data includes at least one frame of lamp control data.
10. A lamp, characterized in that, include: One or more processors; Memory; The lighting control chip and multiple LED beads are connected to the processor and each of the LED beads respectively. One or more applications, wherein the one or more applications are stored in the memory, the one or more applications are configured to be executed by the one or more processors, and the one or more applications are configured to perform the method as described in any one of claims 1-8.
Citation Information
Patent Citations
An intelligent control method and system for energy-saving lighting
CN109068440A
Terminal and camera lamp effect control method
CN110248099A
Method and device for controlling lamp strip, chip and electronic equipment
CN114340097A
Vehicle lamp control system
CN114633678A
Atmosphere lamp control method, controller, electronic equipment and storage medium
CN115568055A