Lamp effect control method and terminal

By jointly controlling multiple spotlights with the control chip and driver chip, the personalized lighting effect configuration of spotlights is realized based on software algorithms, which solves the problems of complex control and difficult personalized configuration of existing multi-head spotlight systems, and realizes efficient and personalized lighting effect control.

CN119562413APending Publication Date: 2025-03-04AGZZX OPTOELECTRONICS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510033167.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

The control system of the existing multi-head spotlight system is complex and costly, which cannot meet the rich lighting effect needs, and the lighting effect control is cumbersome, making it difficult for users to achieve personalized configuration.

Method used

The control chip and the driver chip jointly control the multiple spotlights, and the lighting effect of each spotlight is controlled separately based on the software algorithm. Users can customize the color value of the spotlight by sending lighting effect control instructions, calculate the average user color value of the spotlight and configure it in batches or separately according to the difference.

Benefits of technology

The control system of multi-head spotlights is simplified, the delay of user-side control instructions is reduced, the personalized configuration of lighting effects is realized, and the configuration efficiency of user-side lighting effects control instructions on driver chips is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119562413A_ABST
    Figure CN119562413A_ABST
Patent Text Reader

Abstract

The invention discloses a lamp effect control method and a terminal. The method comprises the following steps: if a lamp effect control instruction sent by a user side is received, analyzing the lamp effect control instruction to obtain user color values of at least two spotlights; determining a lamp effect mode configured by the user side according to the user color values of the at least two spotlights; if the lamp effect mode is a different-color mode, calculating an average user color value according to the user color values of the at least two spotlights, and respectively calculating difference values between the user color values of the at least two spotlights and the average user color value; configuring a target color value of the first spotlight of which the difference value is smaller than a preset color value according to the average user color value, so that a driving chip controls the first spotlight based on the target color value; and configuring a target color value of the second spotlight of which the difference value is not less than the preset color value according to the user color value, so that the driving chip controls the second spotlight based on the target color value. According to the invention, the control system of the multi-head spotlight can be simplified, and the delay from issuing to execution of a user side control instruction is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of device control, and in particular to a lighting effect control method and a terminal. Background Art

[0002] Single-head spotlights are usually suitable for scenes that only require a single light source, and cannot meet the needs of scenes with multiple light sources. Currently, multi-head spotlights on the market are usually formed by welding a single spotlight into a multi-head spotlight. Each spotlight actually still retains a separate control system. This multi-head spotlight system is expensive to manufacture and has complex control logic, and cannot meet the needs of more diverse lighting effects.

[0003] In addition, the lighting effect control of multi-head spotlights usually requires programmers to write specific control programs according to the lighting effect requirements, and then send instructions to the multi-head spotlights through the controller to achieve specific lighting effects. If you want to change the lighting effect, you need to re-burn the controller, which makes the operation cumbersome and the development threshold high. Although some multi-head spotlights can realize autonomous configuration of lighting effects based on APP (application) control, for some scenes with a large number of spotlights, due to the large number of control instructions that the APP needs to send, there is a delay between the control instructions of the APP being sent and the execution of the multi-head spotlights, which causes jitter in the lighting effect change process. Therefore, for lighting effect scenes with a large number of lights, multi-head spotlights are still limited to preset lighting effect modes, that is, users can only choose from the lighting effect modes that have been burned in the controller, and cannot realize personalized adjustment of lighting effects, which limits the diversity of lighting effects. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a lighting effect control method and terminal, which can effectively simplify the control system of multiple spotlights and reduce the delay from the issuance to the execution of user-side control instructions, thereby realizing personalized configuration of lighting effects.

[0005] In order to solve the above technical problems, a technical solution adopted by the present invention is: A lighting effect control method is provided for a control chip, wherein the control chip is connected to a driver chip, and the driver chip is connected to a plurality of spotlights. The method comprises: If a lighting effect control instruction sent by a user terminal is received, the lighting effect control instruction is parsed to obtain user color values ​​of at least two spotlights; Determining the lighting effect mode configured by the user terminal according to the user color values ​​of the at least two spotlights; If the lighting effect mode is a heterochromatic mode, an average user color value is calculated according to the user color values ​​of the at least two spotlights, and the difference between the user color values ​​of the at least two spotlights and the average user color value is calculated respectively; Configure the target color value of the first spotlight whose difference is less than the preset color value according to the average user color value, so that the driving chip controls the first spotlight based on the target color value; A target color value of a second spotlight whose difference is not less than the preset color value is configured according to the user color value, so that the driving chip controls the second spotlight based on the target color value.

[0006] In order to solve the above technical problems, another technical solution adopted by the present invention is: A lighting effect control terminal comprises a memory, a processor and a computer program stored in the memory and running on the processor. When the processor executes the computer program, each step in the above-mentioned lighting effect control method is implemented.

[0007] The beneficial effects of the present invention are: joint control of multiple spotlights is achieved through a control chip and a driver chip, and the lighting effect of each spotlight is controlled separately based on a software algorithm, which effectively simplifies the control system of multiple spotlights. The present invention allows users to send lighting effect control instructions through the user end to customize the color values ​​of at least two spotlights, thereby realizing personalized configuration of the lighting effect. At the same time, for multiple spotlights in different color modes, the average user color value of the multiple spotlights is calculated to determine the difference between each spotlight and the average user color value. When the difference is less than the preset color value, it means that the user color value of this spotlight is very close to the average user color value and cannot be distinguished by the naked eye, so it is directly configured in batches based on the average user color value. When the difference is not less than the preset color value, it means that the user color value of this spotlight is quite different from the user color value, so the user color value corresponding to the spotlight needs to be configured separately. In this way, the control chip can batch process the conversion of multiple spotlights from user color values ​​to target color values, improve the configuration efficiency of the user-side lighting effect control instructions for the driver chip, thereby reducing the delay from the issuance to the execution of the user-side control instructions. At the same time, separate configuration is adopted for spotlights with large color differences to ensure the visual effect of the lighting effect configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0008] Figure 1 A flowchart of a lighting effect control method provided by an embodiment of the present invention; Figure 2 A schematic diagram of the structure of a lighting effect control terminal provided by an embodiment of the present invention; Description of labels: 100. A lighting effect control terminal; 101. A memory; 102. A processor. DETAILED DESCRIPTION

[0009] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in conjunction with the implementation modes and the accompanying drawings.

[0010] An embodiment of the present invention provides a lighting effect control method for a control chip, wherein the control chip is connected to a driver chip, and the driver chip is connected to a plurality of spotlights. The method includes: If a lighting effect control instruction sent by a user terminal is received, the lighting effect control instruction is parsed to obtain user color values ​​of at least two spotlights; Determining the lighting effect mode configured by the user terminal according to the user color values ​​of the at least two spotlights; If the lighting effect mode is a heterochromatic mode, an average user color value is calculated according to the user color values ​​of the at least two spotlights, and the difference between the user color values ​​of the at least two spotlights and the average user color value is calculated respectively; Configure the target color value of the first spotlight whose difference is less than the preset color value according to the average user color value, so that the driving chip controls the first spotlight based on the target color value; A target color value of a second spotlight whose difference is not less than the preset color value is configured according to the user color value, so that the driving chip controls the second spotlight based on the target color value.

[0011] From the above description, it can be seen that the beneficial effects of the present invention are: joint control of multiple spotlights is achieved through a control chip and a driver chip, and the lighting effect of each spotlight is controlled separately based on a software algorithm, which effectively simplifies the control system of multiple spotlights. The present invention allows users to send lighting effect control instructions through the user end to customize the color values ​​of at least two spotlights, thereby realizing personalized configuration of the lighting effect. At the same time, for multiple spotlights in different color modes, the average user color value of the multiple spotlights is calculated to determine the difference between each spotlight and the average user color value. When the difference is less than the preset color value, it means that the user color value of this spotlight is very close to the average user color value and cannot be distinguished by the naked eye, so it is directly configured in batches based on the average user color value. When the difference is not less than the preset color value, it means that the user color value of this spotlight is quite different from the user color value, so the user color value corresponding to the spotlight needs to be configured separately. In this way, the control chip can batch process the conversion of multiple spotlights from user color values ​​to target color values, improve the configuration efficiency of the user-side lighting effect control instructions for the driver chip, thereby reducing the delay from the issuance to the execution of the user-side control instructions. At the same time, separate configuration is adopted for spotlights with large color differences to ensure the visual effect of the lighting effect configuration.

[0012] Further, determining the lighting effect mode configured by the user terminal according to the user color values ​​of the at least two spotlights includes: Detecting whether the user color values ​​of all the spotlights in the lighting effect control instruction are the same; If yes, determining that the lighting effect mode configured by the user terminal is the same color mode; Otherwise, it is determined that the lighting effect mode configured by the user terminal is a heterochromatic mode.

[0013] From the above description, it can be seen that if the user color values ​​of the spotlights are the same, the spotlights belong to the same color mode, so the control chip can uniformly realize the conversion between the user color value and the target color value of all spotlights without the need for individual conversion. If the user color values ​​of the spotlights are different, the spotlights belong to the different color mode, so the control chip needs to distinguish the spotlights that can be converted in batches and those that can be converted individually by color value before configuration, while reducing the control command delay and ensuring the visual effect of the lighting effect.

[0014] Furthermore, the user color value is a color value of a user color model, the target color value is a color value of a driver color model, and the number of color bytes of the user color model is smaller than the number of color bytes of the driver color model; Configuring the target color value of the second spotlight whose difference is not less than the preset color value according to the user color value so that the driving chip controls the second spotlight based on the target color value includes: Calculate a first color value of the user color value under the driving color model according to a conversion relationship between the user color model and the driving color model; The target color value of the second spotlight is configured as the first color value, so that the driving chip controls the second spotlight based on the first color value, and stores the first color value in a preset driving cache queue.

[0015] From the above description, it can be seen that the number of color bytes configured based on the user color model at the user end is smaller than the number of color bytes configured based on the driver color model by the driver chip, which can effectively reduce the data packet length of the lighting effect control command sent by the user end, thereby improving the efficiency of data transmission and reducing the control command delay. When the color value difference of the lighting effect is large, it is necessary to configure the target color value of the spotlight separately according to the user color value to ensure the lighting effect display effect.

[0016] Further, configuring the target color value of the first spotlight whose difference is less than the preset color value according to the average user color value so that the driving chip controls the first spotlight based on the target color value includes: Calculate a second color value of the average user color value under the driving color model according to a conversion relationship between the user color model and the driving color model; The target color value of the first spotlight is configured as the second color value, so that the driving chip controls the first spotlight based on the second color value.

[0017] From the above description, it can be seen that since the color models used by the user end and the driver chip are different, in order to ensure that the driver chip can quickly parse the control instructions issued by the user end, for spotlights with small color differences, batch control is directly used for configuration adjustment, thereby avoiding the time consumed by each spotlight to convert independently and reducing the delay in lighting effect control.

[0018] Furthermore, it also includes: If the color mode is the same color mode, searching the driver cache queue for a third color value corresponding to the user color value; If found, the target color values ​​of the at least two spotlights are configured as the third color value, so that the driving chip controls the at least two spotlights based on the third color value; If not found, the fourth color value of the user color value under the driving color model is calculated according to the conversion relationship between the user color model and the driving color model, and the target color values ​​of the at least two spotlights are configured as the fourth color value, so that the driving chip controls the at least two spotlights based on the fourth color value, and stores the fourth color value in the driving cache queue.

[0019] From the above description, it can be seen that for spotlights in the same color mode, the color value that has completed the conversion calculation can be directly searched from the driver cache sequence, omitting the conversion calculation process between different color models, avoiding excessive computing resources, reducing the computing power requirements for the control chip, and thus reducing the design cost of the multi-spotlight control system. If the corresponding color value is not found, the calculation result can be saved in the driver cache queue after a conversion calculation for subsequent use.

[0020] Furthermore, it also includes: respectively obtaining current color values ​​of the at least two spotlights under the driving color model; Determining a gradual change period of the at least two spotlights according to the current color value and the target color value; Determining the color gradient step length of the at least two spotlights according to the gradient cycle; The gradient color values ​​of the at least two spotlights within the gradient period are configured according to the color gradient step length, so that the driving chip controls the at least two spotlights based on the gradient color values.

[0021] From the above description, it can be seen that the gradient period is determined based on the current color value and target color value of the spotlight, and then the color gradient step is determined according to the gradient period, so that the color gradient period of the spotlight can change with its color value, thereby improving the smoothness of the color change and optimizing the gradient effect of the spotlight.

[0022] Further, determining the gradual change period of the at least two spotlights according to the current color value and the target color value includes: Calculate the component differences of the same color components between the target color value and the current color value respectively; A standard gradual change period is obtained from a preset scene period table according to the largest component difference, and the gradual change periods of the at least two spotlights are set to the standard gradual change period.

[0023] From the above description, it can be seen that the gradient period is dynamically selected based on the maximum component difference between the current color value and the target color value, so that the lighting effect of the spotlight can be adaptively adjusted with different color configurations, thereby improving the visual effect of the lighting effect change.

[0024] Further, determining the color gradient step lengths of the at least two spotlights according to the gradient cycle includes: Obtaining a default step update period, and calculating the total number of gradual changes of each of the spotlights according to the gradual change period and the step update period; The color gradient step length of each spotlight is determined according to the total gradient times and the component difference.

[0025] From the above description, it can be seen that if the gradient period is longer and the step update period is shorter, the total number of gradients required for the spotlight to change from the current color value to the target color value will be greater, and the color gradient step will be more delicate each time, making the color gradient of the spotlight smoother. In this way, the smoothness of the spotlight gradient can be effectively adjusted.

[0026] Further, configuring the gradient color values ​​of the at least two spotlights within the gradient period according to the color gradient step length includes: Get the current gradient times of each of the spotlights; Detecting whether the current number of gradient changes is equal to the total number of gradient changes; If yes, stop updating the gradient color value; Otherwise, the gradient color value of each of the spotlights at the current gradient times is configured according to the color gradient step.

[0027] From the above description, it can be seen that since the total number of gradients required for each spotlight in the same gradient cycle is different, in order to ensure that all spotlights can synchronously complete the change from the current color value to the target color value within the gradient cycle, it is determined whether the spotlight has completed the gradient process based on the total number of gradients. There is no need to detect the color value of the spotlight in real time, which improves the detection efficiency while ensuring the real-time and smoothness of the lighting effect control.

[0028] Another embodiment of the present invention provides a lighting effect control terminal, including a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements each step of the above-mentioned lighting effect control method when executing the computer program.

[0029] From the above description, it can be seen that the beneficial effects of the present invention are: joint control of multiple spotlights is achieved through a control chip and a driver chip, and the lighting effect of each spotlight is controlled separately based on a software algorithm, which effectively simplifies the control system of multiple spotlights. The present invention allows users to send lighting effect control instructions through the user end to customize the color values ​​of at least two spotlights, thereby realizing personalized configuration of the lighting effect. At the same time, for multiple spotlights in different color modes, the average user color value of the multiple spotlights is calculated to determine the difference between each spotlight and the average user color value. When the difference is less than the preset color value, it means that the user color value of this spotlight is very close to the average user color value and cannot be distinguished by the naked eye, so it is directly configured in batches based on the average user color value. When the difference is not less than the preset color value, it means that the user color value of this spotlight is quite different from the user color value, so the user color value corresponding to the spotlight needs to be configured separately. In this way, the control chip can batch process the conversion of multiple spotlights from user color values ​​to target color values, improve the configuration efficiency of the user-side lighting effect control instructions for the driver chip, thereby reducing the delay from the issuance to the execution of the user-side control instructions. At the same time, separate configuration is adopted for spotlights with large color differences to ensure the visual effect of the lighting effect configuration.

[0030] The above-mentioned lighting effect control method and terminal of the present invention can be applied to the multi-spotlight control scenario, which can effectively simplify the control system of multiple spotlights and reduce the delay from the issuance to the execution of the user-side control command, thereby realizing the personalized configuration of the lighting effect. The following is an explanation through a specific implementation method: Please refer to Figure 1 , Embodiment 1 of the present invention is: A lighting effect control method is used for a control chip, wherein the control chip is connected to a driving chip, and the driving chip is connected to a plurality of spotlights.

[0031] The method comprises: S1. If a lighting effect control instruction sent by a user terminal is received, the lighting effect control instruction is parsed to obtain user color values ​​of at least two spotlights.

[0032] In some embodiments, before step S1, it also includes: mapping multiple spotlights connected to the same driver chip. The control chip is sequentially assigned with unique light code numbers L[n] according to the connection order of the spotlights, where n represents the total number of spotlights. Each spotlight is an independent element, and each element includes control attributes such as switch, brightness, color temperature, color, and scene. These control attributes are identified by a unique light code number L[n]. Based on this, when the user needs to customize the lighting effect mode, the user can select the light code number L[n] of the spotlight to be controlled on the user side. After the selection is completed, the user side enters the detailed lighting effect control interface. On the lighting effect control interface, the user can customize the brightness, color temperature, color, and scene of the spotlight. After the customization is completed, the lighting effect control instructions are generated based on the light code number L[n] and the user-defined lighting effect control scheme.

[0033] In some embodiments, the user terminal and the control chip are remotely controlled based on wireless communication to improve the convenience of user configuration. To ensure the transmission efficiency of the data packet, the user color value is the color value of the user color model, the target color value is the color value of the drive color model, and the color byte number of the user color model is less than the color byte number of the drive color model.

[0034] In a specific scenario, remote control is implemented between the user end and the control chip based on Bluetooth networking. Since the data packet size of Bluetooth networking is limited to 11 bytes, if a data packet containing the light code number L[n], the control command and the target color value is directly transmitted, it will exceed 11 bytes. Therefore, the present invention defines a data packet format. In the customized data packet: the light code number L[n] is compressed into one byte (8 bits), where each bit represents a light; the control command occupies 1 byte to indicate the specific control type (switch, brightness, color temperature, color, mode setting); the target color value abandons the traditional RGB color model for representation and adopts the HSV color model for representation. Because the RGB color model requires 6 bytes to store color values ​​(each color component is 0-255), if the HSV color model is adopted, H (hue) occupies 2 bytes (range 0-359), S (saturation) and V (brightness) each occupy one byte, this method reduces the number of data packet bytes and improves transmission efficiency.

[0035] Based on this, the user color model in the present invention is set to the HSV color model, which is a hue, saturation, and value model. It is based on the color wheel and describes colors in a more intuitive way. The driving color model is set to the RGB color model, which is red, green, and blue, and describes colors in proportion to the three primary colors. That is, the user color values ​​in the following steps are all HSV color values, and the target color values ​​are all RGB color values.

[0036] It should be noted that the control chip needs to quickly parse the HSV color value sent by the user end and convert it into RGB color value before the corresponding spotlight can be controlled by the driver chip. In addition, the user end is timely and may send HSV color values ​​continuously. Therefore, the control chip must process these data in real time. In this regard, the present invention ensures that the control chip can process data through the following steps S2 to S5.

[0037] S2. Determine the lighting effect mode configured by the user terminal according to the user color values ​​of the at least two spotlights.

[0038] Specifically, the step S2 includes: S21, detecting whether the user color values ​​of all the spotlights in the lighting effect control instruction are the same.

[0039] S22: If yes, determine that the lighting effect mode configured by the user terminal is the same color mode. Specifically, the same color mode can be determined only when the user color values ​​of all spotlights in the lighting effect control instruction are the same.

[0040] S23: Otherwise, determine that the lighting effect mode configured by the user terminal is a heterochromatic mode.

[0041] S3. If the lighting effect mode is a heterochromatic mode, an average user color value is calculated according to the user color values ​​of the at least two spotlights, and differences between the user color values ​​of the at least two spotlights and the average user color value are calculated respectively.

[0042] In some embodiments, the average user color value is calculated based on the user color values ​​of at least two spotlights as follows: the H, S, and V component values ​​of each spotlight are added together to obtain a total value SUM1 HSV For example, the H, S, and V component values ​​of spotlight L[1] are a, b, and c respectively, then the total value SUM1 of spotlight L[1] is HSV =a+b+c. Then, the total values ​​of all the spotlights are added together and the average value is calculated to get the average user color value. For example, the total value of spotlight L[1] is SUM1 HSV , the total value of spotlight L[2] is SUM2 HSV, then the average user color value AVG of spotlight L[1] and spotlight L[2] is HSV =(SUM1 HSV +SUM2 HSV ) / 2.

[0043] In some embodiments, calculating the difference between the user color value of the at least two spotlights and the average user color value is specifically as follows: calculating the total value SUM of each spotlight HSV and the average user color value AVG HSV The difference between .

[0044] In some embodiments, after the difference is calculated, it is possible to directly detect whether the difference is less than a preset color value, so as to distinguish the first spotlight from the second spotlight, and to execute step S4 and step S5.

[0045] S4. Configure a target color value of the first spotlight whose difference is less than a preset color value according to the average user color value, so that the driving chip controls the first spotlight based on the target color value.

[0046] Specifically, step S4 includes: S41. Calculate a second color value of the average user color value under the driving color model according to a conversion relationship between the user color model and the driving color model.

[0047] In some embodiments, the average user color value AVG under the HSV color model is calculated. HSV The corresponding AVG in the RGB color model RGB , the second color value is AVG RGB .

[0048] S42: Configure the target color value of the first spotlight as the second color value, so that the driving chip controls the first spotlight based on the second color value.

[0049] In some embodiments, the target color value of the first spotlight whose difference value is less than the preset color value is configured as AVG RGB , so that the driver chip is based on AVG RGB Control the first spotlight to change color.

[0050] S5. Configure a target color value of a second spotlight whose difference is not less than the preset color value according to the user color value, so that the driving chip controls the second spotlight based on the target color value.

[0051] Specifically, step S5 includes: S51. Calculate a first color value of the user color value under the driving color model according to a conversion relationship between the user color model and the driving color model.

[0052] In some embodiments, the RGB color value corresponding to the HSV color value under the HSV color model under the RGB color model is calculated, and the first color value is the RGB color value.

[0053] S52: Configure the target color value of the second spotlight as the first color value, so that the driver chip controls the second spotlight based on the first color value, and stores the first color value in a preset driver cache queue.

[0054] In some embodiments, the target color value of the second spotlight whose difference is not less than the preset color value is configured as an RGB color value, so that the driving chip controls the second spotlight to change color based on the RGB color value.

[0055] In some embodiments, before step S51, the method further includes: step S50, searching the driver cache queue for a fifth color value corresponding to the user color value of the second spotlight; if found, configuring the target color value of the second spotlight to be the fifth color value; if not found, executing step S51. In this way, the color value conversion calculation process is reduced as much as possible, thereby avoiding occupying the computing power resources of the chip.

[0056] In some embodiments, after the first color value is stored in the driver cache queue, the HSV color value and the RGB color value stored last time for the spotlight may be deleted simultaneously to ensure the update and accuracy of the queue.

[0057] Embodiment 2 of the present invention is: A lighting effect control method, which is different from the first embodiment in that it also includes: S6. If the color mode is the same color mode, searching the driver cache queue for a third color value corresponding to the user color value.

[0058] S7: If found, configure the target color values ​​of the at least two spotlights as the third color value, so that the driver chip controls the at least two spotlights based on the third color value. In this way, the color value conversion calculation process can be omitted, thereby avoiding occupying the chip's computing power resources.

[0059] S8. If not found, the fourth color value of the user color value under the driving color model is calculated according to the conversion relationship between the user color model and the driving color model, and the target color values ​​of the at least two spotlights are configured as the fourth color value, so that the driving chip controls the at least two spotlights based on the fourth color value, and stores the fourth color value in the driving cache queue. In this way, since the color values ​​of all spotlights are the same, only one color value conversion calculation process is required to apply to all other spotlights, thereby improving conversion efficiency.

[0060] Embodiment 3 of the present invention is: A lighting effect control method, which is different from the second embodiment in that it also includes: S9. Obtain current color values ​​of the at least two spotlights under the driving color model respectively.

[0061] S10. Determine a gradual change period of the at least two spotlights according to the current color value and the target color value.

[0062] Specifically, the step S10 includes: S101. Calculate component differences of the same color components between the target color value and the current color value respectively.

[0063] In some embodiments, the acquired target color value and current color value are RGB respectively. tar and RGB cur Step S101 is specifically as follows: respectively calculate the component differences of the R, G, and B components, that is, the R component difference between the target color value and the current color value = R tar -R cur , G component difference = G tar -G cur , B component difference = B tar -B cur .

[0064] S102: Obtain a standard gradual change period from a preset scene period table according to the largest component difference, and set the gradual change period of the at least two spotlights as the standard gradual change period.

[0065] In some embodiments, the maximum component difference is determined among the R component difference, the G component difference and the B component difference. The standard gradual change period in the preset scene period table is debugged according to the scene mode selected by the user.

[0066] In another optional implementation, step S10 may be replaced by: calculating the color difference between the current color value and the target color value, determining the cycle coefficient according to the scene mode in the lighting effect control instruction, and setting the gradient cycle according to the cycle coefficient and the color difference. Specifically, if the current color value is R x-1 G x-1 B x-1 , the target color value is R x G x B x , then from R x-1 G x-1 B x-1 Gradually to R x G x B x You need to calculate the color difference first If from R x-1 G x-1 B x-1 Gradually to R x G x B x The period coefficient of the scene mode is k, so the gradient period t=k×d.

[0067] S11. Determine the color gradient step length of the at least two spotlights according to the gradient cycle.

[0068] Specifically, the step S11 includes: S111, obtaining a default step update period, and calculating the total number of gradual changes of each of the spotlights according to the gradual change period and the step update period.

[0069] In some embodiments, the default step size update period is 10 ms.

[0070] S112: Determine the color gradient step length of each spotlight according to the total gradient times and the component difference.

[0071] It should be noted that according to the gradient cycle T and the step update cycle (10ms), the total number of gradients of each spotlight is calculated, and then the color step of each gradient is determined to ensure that the gradient process is delicate and smooth. Among them, when the gradient cycle T is constant, the shorter the step update cycle and the more the total number of gradients, the more delicate the color step of each gradient and the smoother the gradient.

[0072] S12. Configure the gradient color values ​​of the at least two spotlights within the gradient period according to the color gradient step, so that the driving chip controls the at least two spotlights based on the gradient color values.

[0073] Specifically, the step S12 includes: S121, obtaining the current gradient times of each of the spotlights.

[0074] S122: Detect whether the current number of gradual changes is equal to the total number of gradual changes.

[0075] In some embodiments, a timer is provided, and an update function is called every 10 ms (step update period), and each spotlight is traversed in the update function to detect whether the current number of gradient changes is equal to the total number of gradient changes.

[0076] S123: If yes, stop updating the gradient color value.

[0077] S124: Otherwise, configure the gradient color value of each of the spotlights at the current gradient times according to the color gradient step.

[0078] In some embodiments, after the update function traverses all the spotlights, the gradient color value of each spotlight at the current gradient number is transmitted to the driver chip for dimming. In this way, the gradient cycle and color gradient step can be dynamically adjusted to make the gradient effect smoother and more consistent. At the same time, the timer is used to regularly update the gradient state to ensure the real-time and smoothness of the lighting effect.

[0079] In some embodiments, step S124 is specifically: R(i)=R cur +iR L , G(i)=G cur +iG L , B(i)=B cur +iB L . Among them, R(i), G(i) and B(i) represent the components of the i-th gradient color value, R cur , G cur and B cur Represents the components of the current color value, R L , G L and B L Respectively represent the color gradient step size.

[0080] In some embodiments, if the control chip controls L[1] to L[n] spotlights simultaneously, the data sequence transmitted by the control chip to the driver chip for dimming is specifically R1G1B1…R n-1 G n-1 B n-1 …R n G n B n Based on the above step S124, the data sequence transmitted from the control chip to the driving chip for a total of i gradual changes is specifically: … …

[0081] … …

[0082] … … .

[0083] In a specific scenario, the user needs to control n spotlights, of which m spotlights have dynamic gradient lighting effects and nm spotlights have static lighting effects, where n and m are both integers. That is, n spotlights achieve a mixed dynamic and static lighting effect. For example, spotlight 1 displays static white light, and spotlight 2 displays dynamic red, green, and blue gradient switching. During the dynamic color switching display process, spotlight 2 does not affect the display effect of spotlight 1. In this scenario, the data sequence transmitted from the control chip to the driver chip for a total of i gradient changes is specifically: … … . Since spotlight 1 displays static white light, when spotlight 2 dynamically changes color, the color value of spotlight 1 does not change with the color value of spotlight 2, and only the color value of spotlight 2 changes. In this regard, the present invention sets a spotlight status polling mechanism through a timer to control different spotlights to display different lighting effects. Under the status polling mechanism, the timer queries the working status of all spotlights every 10ms. Only when the working status of the spotlight is ready can the color value conversion calculation be performed. When the working status of the spotlight is running, the data sequence can be output to the driver chip, thereby ensuring the synchronization of the dimming status of all spotlights. The working status of the spotlight is the stop status by default. After receiving the lighting effect control instruction, the target spotlight that needs to be controlled by the lighting effect is determined according to the light code number L[n], and the working status of the target spotlight is updated to the ready status. After completing the color value conversion calculation, the working status of the spotlight is changed to the running status. The control chip will detect in real time whether the working state of the spotlight is in the running state. If the working state of the spotlight is in the running state, a data sequence will be output. After the data sequence output is completed, the working state of the spotlight will be updated to the ready state or the stopped state.

[0084] Please refer to Figure 2 , Embodiment 5 of the present invention is: A lighting effect control terminal 100 includes a memory 101, a processor 102, and a computer program stored in the memory 101 and running on the processor 102. When the processor 102 executes the computer program, each step of a lighting effect control method in the above-mentioned embodiments 1 to 3 is implemented.

[0085] In summary, the present invention provides a lighting effect control method and terminal, which realizes the joint control of multiple spotlights through a control chip and a driver chip, and controls the lighting effect of each spotlight separately based on a software algorithm, thereby effectively simplifying the control system of multiple spotlights. The present invention allows a user to send a lighting effect control instruction through a user terminal to customize the color values ​​of at least two spotlights, thereby realizing personalized configuration of the lighting effect. At the same time, the present invention uses a color model with a smaller number of bytes to configure the color value on the user terminal, thereby reducing the data length of the control instruction, thereby improving the data transmission efficiency between the user terminal and the control chip. In the lighting effect control process, for multiple spotlights in a different color mode, when the user color value of the spotlight is very close to the average user color value, it is impossible to distinguish it with the naked eye, so it is directly configured in batches based on the average user color value. When the user color value of the spotlight is far from the user color value, the user color value corresponding to the spotlight needs to be configured separately. The control chip can batch process the conversion between the user color value and the target color value of multiple spotlights to ensure that the control chip can timely process the corresponding lighting effect control instruction, thereby reducing the delay from the issuance to the execution of the user terminal control instruction, while ensuring the visual effect of the lighting effect configuration. For multiple spotlights in the same color mode, the corresponding color values ​​can be directly obtained from the driver cache queue, thereby omitting the conversion calculation process and reducing the computing power requirements for the control chip. In addition, the present invention dynamically adjusts the entire gradient cycle according to the changing color value of the spotlight, thereby calculating the number of gradients in the entire cycle and the color step size of each gradient adjustment, thereby optimizing the color gradient effect of the spotlight.

[0086] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A lighting effect control method, characterized in that: For a control chip, the control chip is connected to a driver chip, the driver chip is connected to a plurality of spotlights, the method comprises: If a lighting effect control instruction sent by a user terminal is received, the lighting effect control instruction is parsed to obtain user color values ​​of at least two spotlights; Determining the lighting effect mode configured by the user terminal according to the user color values ​​of the at least two spotlights; If the lighting effect mode is a heterochromatic mode, an average user color value is calculated according to the user color values ​​of the at least two spotlights, and the difference between the user color values ​​of the at least two spotlights and the average user color value is calculated respectively; Configure the target color value of the first spotlight whose difference is less than the preset color value according to the average user color value, so that the driving chip controls the first spotlight based on the target color value; A target color value of a second spotlight whose difference is not less than the preset color value is configured according to the user color value, so that the driving chip controls the second spotlight based on the target color value.

2. A lighting effect control method according to claim 1, characterized in that: Determining the lighting effect mode configured by the user terminal according to the user color values ​​of the at least two spotlights includes: Detecting whether the user color values ​​of all the spotlights in the lighting effect control instruction are the same; If yes, determining that the lighting effect mode configured by the user terminal is the same color mode; Otherwise, it is determined that the lighting effect mode configured by the user terminal is a heterochromatic mode.

3. The lighting effect control method according to claim 1, characterized in that: The user color value is a color value of a user color model, the target color value is a color value of a driver color model, and the number of color bytes of the user color model is smaller than the number of color bytes of the driver color model; Configuring the target color value of the second spotlight whose difference is not less than the preset color value according to the user color value so that the driving chip controls the second spotlight based on the target color value includes: Calculate a first color value of the user color value under the driving color model according to a conversion relationship between the user color model and the driving color model; The target color value of the second spotlight is configured as the first color value, so that the driving chip controls the second spotlight based on the first color value, and stores the first color value in a preset driving cache queue.

4. A lighting effect control method according to claim 3, characterized in that: Configuring a target color value of the first spotlight whose difference is less than a preset color value according to the average user color value so that the driving chip controls the first spotlight based on the target color value includes: Calculate a second color value of the average user color value under the driving color model according to a conversion relationship between the user color model and the driving color model; The target color value of the first spotlight is configured as the second color value, so that the driving chip controls the first spotlight based on the second color value.

5. The lighting effect control method according to claim 3, characterized in that: Also includes: If the color mode is the same color mode, searching the driver cache queue for a third color value corresponding to the user color value; If found, the target color values ​​of the at least two spotlights are configured as the third color value, so that the driving chip controls the at least two spotlights based on the third color value; If not found, the fourth color value of the user color value under the driving color model is calculated according to the conversion relationship between the user color model and the driving color model, and the target color values ​​of the at least two spotlights are configured as the fourth color value, so that the driving chip controls the at least two spotlights based on the fourth color value, and stores the fourth color value in the driving cache queue.

6. A lighting effect control method according to any one of claims 3 to 5, characterized in that: Also includes: respectively obtaining current color values ​​of the at least two spotlights under the driving color model; Determining a gradual change period of the at least two spotlights according to the current color value and the target color value; Determining the color gradient step length of the at least two spotlights according to the gradient cycle; The gradient color values ​​of the at least two spotlights within the gradient period are configured according to the color gradient step length, so that the driving chip controls the at least two spotlights based on the gradient color values.

7. A lighting effect control method according to claim 6, characterized in that: Determining the gradual change period of the at least two spotlights according to the current color value and the target color value includes: Calculate the component differences of the same color components between the target color value and the current color value respectively; A standard gradual change period is obtained from a preset scene period table according to the largest component difference, and the gradual change periods of the at least two spotlights are set to the standard gradual change period.

8. The lighting effect control method according to claim 7, characterized in that: Determining the color gradient step length of the at least two spotlights according to the gradient cycle includes: Obtaining a default step update period, and calculating the total number of gradual changes of each of the spotlights according to the gradual change period and the step update period; The color gradient step length of each spotlight is determined according to the total gradient times and the component difference.

9. A lighting effect control method according to claim 8, characterized in that: Configuring the gradient color values ​​of the at least two spotlights in the gradient cycle according to the color gradient step length includes: Get the current gradient times of each of the spotlights; Detecting whether the current number of gradient changes is equal to the total number of gradient changes; If yes, stop updating the gradient color value; Otherwise, the gradient color value of each of the spotlights at the current gradient times is configured according to the color gradient step.

10. A lighting effect control terminal, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, each step in the lighting effect control method as described in any one of claims 1 to 9 is implemented.