CN-121985459-A - Lamp control method and device and lamp
Abstract
The application discloses a lamp control method and device and a lamp, and belongs to the technical field of lamp control, wherein the lamp control method and device comprises the steps of obtaining configuration data of the lamp and determining a target model corresponding to each mode; the method comprises the steps of distributing corresponding internal memories for each mode, operating a corresponding target model based on the internal memories, lamp bead identifiers and lamp efficiency parameters corresponding to each mode to obtain first control data of each lamp bead corresponding to each mode, determining second control data of all lamp beads in a lamp according to the first control data of each lamp bead corresponding to each mode, transmitting the second control data of each lamp bead to a lamp control chip, and triggering the lamp control chip to control the lamp beads to emit light according to a plurality of modes based on the second control data of each lamp bead. The target model corresponding to each mode operates to realize data isolation, so that more accurate second control data of each lamp bead are obtained, the lamp beads of the lamp can accurately emit light according to a plurality of modes, and the experience of a user is improved.
Inventors
- HUANG SHUXIN
- WU HONGWEI
Assignees
- 深圳市千岩科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20260408
Claims (10)
- 1. A method of controlling a luminaire, the luminaire further comprising a lamp control chip and a plurality of lamp beads, the method comprising: acquiring configuration data of the lamp, wherein the configuration data comprises a plurality of modes, lamp bead identifiers corresponding to each mode and lamp efficiency parameters corresponding to each mode; determining a target model corresponding to each mode; Allocating a corresponding memory for each mode, wherein the memory is a running space of a target model corresponding to the mode; operating a corresponding target model based on the memory, the lamp bead identifier and the lamp efficiency parameter corresponding to each mode to obtain first control data of each lamp bead corresponding to each mode, wherein the first control data comprises at least one frame of lamp control data; And determining second control data of all the lamp beads in the lamp according to the first control data of each lamp bead corresponding to each mode, transmitting the second control data of each lamp bead to a lamp control chip, triggering the lamp control chip to control the lamp beads to emit light according to a plurality of modes based on the second control data of each lamp bead, wherein the second control data comprises at least one frame of lamp control data.
- 2. The method of claim 1, wherein allocating a corresponding memory for each of the modes comprises: determining the number of the lamp beads corresponding to each mode based on the lamp bead identifier corresponding to each mode; and distributing a corresponding memory for each mode according to the number of the lamp beads corresponding to each mode.
- 3. The method of claim 1, wherein the running the corresponding target model based on the memory, the lamp bead identifier, and the lamp efficacy parameter corresponding to each of the modes to obtain the first control data of each of the lamp beads corresponding to each of the modes comprises: Operating a corresponding target model based on the memory, the lamp bead identifiers and the lamp efficiency parameters corresponding to each mode to obtain multi-frame lamp control data of each lamp bead corresponding to each mode, wherein the multi-frame lamp control data are arranged according to a first sequence; and determining the first control data of each lamp bead corresponding to each mode based on the multi-frame lamp control data of each lamp bead corresponding to each mode and arranged according to the first sequence.
- 4. The method of claim 1, wherein the running the corresponding target model based on the memory, the lamp bead identifier, and the lamp efficacy parameter corresponding to each of the modes to obtain the first control data of each of the lamp beads corresponding to each of the modes comprises: determining input data of the target model based on the lighting effect parameters corresponding to each mode and a preset first frame sequence number, wherein the first frame sequence number represents the number of times that the corresponding target model is operated; Operating a corresponding target model according to the memory, the lamp bead identifier and the input data corresponding to each mode to obtain current lamp control data of each lamp bead corresponding to each mode; And determining first control data of each lamp bead corresponding to each mode based on the current lamp control data of each lamp bead corresponding to each mode.
- 5. The method of claim 4, wherein said determining the first control data for each of the light beads for each of the modes based on the current light control data for each of the light beads for each of the modes comprises: taking the current lamp control data of each lamp bead corresponding to each mode as first control data; the method for determining the second control data of all the lamp beads in the lamp according to the first control data of each lamp bead corresponding to each mode, and transmitting the second control data of each lamp bead to the lamp control chip further comprises the following steps: And adding one to the first frame number corresponding to each mode to obtain a new preset first frame number, and returning to execute the input data and subsequent steps of determining the target model based on the lamp efficiency parameters corresponding to each mode and the preset first frame number.
- 6. The method of claim 4, wherein the configuration data further includes a fade parameter for each of the modes, wherein the determining the first control data for each of the light beads for each of the modes based on the current light control data for each of the light beads for each of the modes comprises: obtaining a gradual change model and gradual change times corresponding to each mode according to the current lamp control data, the previous lamp control data and the gradual change parameters of each lamp bead corresponding to each mode; Determining regulation and control data of each lamp bead corresponding to each mode based on the gradual change model corresponding to each mode, taking the regulation and control data of each lamp bead corresponding to each mode as first control data, wherein the regulation and control data of each lamp bead does not exceed the range from the previous lamp control data to the current lamp control data, and the difference value between the regulation and control data of each lamp bead and the current lamp control data is smaller than the difference value between the previous regulation and control data and the current lamp control data; the method for determining the second control data of all the lamp beads in the lamp according to the first control data of each lamp bead corresponding to each mode, and transmitting the second control data of each lamp bead to the lamp control chip further comprises the following steps: Subtracting one from the gradual change times to serve as new gradual change times, and judging whether the new gradual change times are 0; If the new gradual change times are 0, adding a first frame number corresponding to each mode to obtain a new preset first frame number, and returning to execute the step of determining the input data of the target model and the follow-up steps based on the lamp efficiency parameters corresponding to each mode and the preset first frame number; And if the new gradual change times are not 0, returning to execute the regulation and control data of each lamp bead corresponding to each mode based on the gradual change model corresponding to each mode, and taking the regulation and control data of each lamp bead corresponding to each mode as first control data and subsequent steps.
- 7. The method of claim 6, wherein the determining the regulatory data for each bead for each mode based on the fade model for each mode comprises: Allocating a corresponding cache for each mode, wherein the cache is an operation space of a gradual change model corresponding to the mode; And determining the regulation and control data of each lamp bead corresponding to each mode based on the buffer memory corresponding to each mode and the gradual change model.
- 8. The method of claim 4, wherein determining the second control data for all the beads in the luminaire based on the first control data for each bead corresponding to each of the patterns comprises: acquiring preset data as control data of each lamp bead which does not correspond to the mode; And splicing the first control data of each lamp bead corresponding to each mode and the control data of each lamp bead which does not correspond to the mode based on the lamp bead identification in the lamp to obtain the second control data of all lamp beads in the lamp.
- 9. A luminaire control device, characterized by a processor applied to a luminaire, said luminaire further comprising a lamp control chip and a plurality of lamp beads, said device comprising: the data acquisition module is used for acquiring configuration data of the lamp, wherein the configuration data comprises a plurality of modes, lamp bead identifiers corresponding to each mode and lamp efficiency parameters corresponding to each mode; The model determining module is used for determining a target model corresponding to each mode; The resource allocation module is used for allocating a corresponding memory for each mode, wherein the memory is an operation space of a target model corresponding to the mode; the first calculation module is used for running a corresponding target model based on the memory, the lamp bead identifier and the lamp efficiency parameter corresponding to each mode to obtain first control data of each lamp bead corresponding to each mode, wherein the first control data comprises at least one frame of lamp control data; The second calculation module is used for determining second control data of all the lamp beads in the lamp according to the first control data of each lamp bead corresponding to each mode, transmitting the second control data of each lamp bead to the lamp control chip, triggering the lamp control chip to control the lamp beads to emit light according to a plurality of modes based on the second control data of each lamp bead, and the second control data comprises at least one frame of lamp control data.
- 10. A light fixture, comprising: One or more processors; A memory; A lamp control chip and a plurality of lamp beads, the lamp control chip is connected with the processor and each lamp bead respectively; One or more applications, wherein the one or more applications are stored in the memory, the one or more applications configured to be executed by the one or more processors, the one or more applications configured to perform the method of any of claims 1-8.
Description
Lamp control method and device and lamp Technical Field The application relates to the technical field of lamp control, in particular to a lamp control method and device and a lamp. Background In the existing scheme, only one mode, either a music mode or a color mode, can be displayed by one lamp as a whole, and the requirement of simultaneously displaying a plurality of modes cannot be met. Disclosure of Invention The application provides a lamp control method and device and a lamp, so as to overcome the defects. The application provides a lamp control method, which is applied to a processor of a lamp, wherein the lamp further comprises a lamp control chip and a plurality of lamp beads, the method comprises the steps of obtaining configuration data of the lamp, wherein the configuration data comprise a plurality of modes, lamp bead identifiers corresponding to each mode and lamp effect parameters corresponding to each mode, determining a target model corresponding to each mode, distributing a corresponding memory for each mode, wherein the memory is an operation space of the target model corresponding to the mode, operating the corresponding target model based on the memory corresponding to each mode, the lamp bead identifiers and the lamp effect parameters, obtaining first control data of each lamp bead corresponding to each mode, the first control data comprise at least one frame of lamp control data, determining second control data of all lamp beads in the lamp control chip according to the first control data of each lamp bead corresponding to each mode, transmitting the second control data of each lamp bead to the lamp control chip, and triggering the lamp control chip to emit light according to at least one frame of lamp control data. The application further provides a lamp control device, which is applied to a processor of a lamp, the lamp further comprises a lamp control chip and a plurality of lamp beads, the device comprises a data acquisition module, a model determination module, a resource allocation module, a first calculation module and a second calculation module, wherein the data acquisition module is used for acquiring configuration data of the lamp, the configuration data comprise a plurality of modes, lamp bead identifiers corresponding to the modes and lamp effect parameters corresponding to the modes, the model determination module is used for determining a target model corresponding to the modes, the resource allocation module is used for allocating a corresponding memory for the modes, the memory is an operation space of the target model corresponding to the modes, the first calculation module is used for operating the corresponding target model based on the memory corresponding to the modes, lamp bead identifiers and the lamp effect parameters, the first control data comprise at least one frame of lamp control data, the second calculation module is used for determining a second control data of the lamp in the lamp, the memory is used for allocating a corresponding memory to the modes, the first control data of the lamp beads corresponding to the modes, the first control data of each lamp bead are transmitted to the lamp control chip based on the second control data, and the second control data of each lamp bead comprise at least one frame of the lamp control chip are triggered by the second control data. In a third aspect, the application also provides a lamp comprising one or more processors, a memory, a lamp control chip and a plurality of lamp beads, wherein the lamp control chip is respectively connected with the processors and each lamp bead, and one or more application programs, wherein the one or more application programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more application programs are configured to execute the method. The method comprises the steps of firstly obtaining configuration data of a lamp, wherein the configuration data comprise a plurality of modes, lamp bead identifiers corresponding to the modes and lamp effect parameters corresponding to the modes, secondly determining a target model corresponding to the modes, then distributing a corresponding memory for each mode, wherein the memory is an operation space of the target model corresponding to the mode, finally operating the corresponding target model based on the memory corresponding to the modes, the lamp bead identifiers and the lamp effect parameters to obtain first control data of each lamp bead corresponding to the modes, the first control data comprise at least one frame of lamp control data, determining second control data of all lamp beads in the lamp according to the first control data of each lamp bead corresponding to the modes, transmitting the second control data of each lamp bead to a lamp control chip, and triggering the lamp control chip to control the lamp beads to emit light according to the plurality of modes based on the sec