Lamp brightness adjusting method and device, equipment and storage medium
By monitoring the working parameters and working hours of the lamp in real time and calculating the power to be adjusted, the brightness adjustment deviation problem caused by the instability of the temperature sensor is solved, the accuracy and reliability of brightness adjustment are improved, and the lamp operates within the safe power range.
Patent Information
- Application Number
- CN202510212171.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-25
- Publication Date
- 2025-04-15
AI Technical Summary
In existing lighting fixtures, the instability and error of the temperature sensor lead to deviations in the power adjustment of the lamp, affecting the accuracy and reliability of brightness adjustment.
By obtaining the working parameters and real-time working time of the lamp, calculating the real-time working power, and based on the preset color mixing brightness calculation function and brightness duty cycle mapping relationship, confirm the power to be adjusted to avoid the shortcomings of traditional temperature controllers.
Improves the accuracy and reliability of brightness adjustment, ensures that the lamp operates within the safe power range, reduces energy consumption, and provides a suitable lighting environment.
Smart Images

Figure CN119835817A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of lighting control technology, and in particular to a method, device, equipment and storage medium for adjusting the brightness of a lamp. Background Art
[0002] During operation, the lamp will generate heat. If the temperature is too high, it will have an adverse effect on its luminous efficiency, especially for high-power LED lamps. The luminous brightness is positively correlated with the current, and the forward current will be adjusted accordingly due to temperature changes. When the ambient temperature exceeds a certain threshold, the forward current flowing through the LED will drop sharply; in this case, if the current continues to increase, the service life of the LED will be shortened. Therefore, in order to ensure stable lighting and extend the service life of the lamp, the power of the lamp must be appropriately adjusted according to the operating temperature.
[0003] In existing lighting fixtures, the working power of the lamp is usually adjusted accordingly based on the real-time temperature data provided by the temperature sensor; however, the accuracy of temperature sensors such as NTC (negative temperature coefficient thermistor) is affected by many factors. Specifically, the resistance-temperature characteristic of NTC is not completely linear, which leads to differences in measurement errors in different temperature ranges; in addition, as time goes by and the use environment changes, NTC may age or drift, thereby gradually reducing the accuracy of the measurement; this inaccuracy in temperature measurement will eventually lead to deviations in the lamp power adjustment.
[0004] It can be seen that the existing technology still needs to be improved and enhanced. Summary of the invention
[0005] In order to overcome the shortcomings of the prior art, the purpose of the present invention is to provide a method for adjusting the brightness of a lamp, which confirms the real-time working temperature based on the real-time working time to confirm that the power should be adjusted, thereby avoiding the problems caused by the instability and error of the NTC in traditional temperature controller and improving the brightness adjustment accuracy and reliability.
[0006] A first aspect of the present invention provides a method for adjusting the brightness of a lamp, comprising: obtaining the working parameters of the lamp, a preset mixed-color brightness calculation function and a pre-constructed brightness-duty cycle mapping relationship, wherein the working parameters include a maximum rated power; when a brightness adjustment instruction is received, obtaining the adjustment parameters, the real-time working parameters and the real-time working time, and calculating the real-time working power based on the real-time working parameters; confirming the adjusted brightness value based on the adjustment parameters and the preset mixed-color brightness calculation function, and calculating the first adjusted power based on the adjusted brightness value; determining the real-time working temperature based on the real-time working time, and obtaining the second adjusted power based on the real-time working temperature; calculating the power to be adjusted based on the first adjusted power and the second adjusted power, and comparing the power to be adjusted with the maximum rated power, and confirming the final adjusted brightness according to the comparison result.
[0007] Optionally, in a first implementation method of the first aspect of the present invention, the operating parameters of the lamp, a preset mixed color brightness calculation function and a pre-constructed brightness-to-duty cycle mapping relationship are obtained, and the operating parameters include the maximum rated power, including: obtaining the operating parameters of the lamp, the operating parameters including the maximum rated power, the forward voltage of each color light source, the maximum brightness and the corresponding current; obtaining a preset mixed color brightness calculation function, the mixed color brightness calculation function is used to calculate the brightness value corresponding to each color light source according to the color mixing ratio input by the user; obtaining the current-brightness characteristic curve of the lamp, and constructing a brightness-to-duty cycle mapping relationship according to the current-brightness characteristic curve.
[0008] Optionally, in a second implementation method of the first aspect of the present invention, when a brightness adjustment instruction is received, adjustment parameters, real-time working parameters and real-time working time are obtained, and real-time working power is calculated based on the real-time working parameters, including: when a brightness adjustment instruction is received, adjustment parameters are obtained from the brightness adjustment instruction using a pre-built SQL query statement, and the adjustment parameters include adjusting the working mode and the brightness adjustment value; real-time working time and real-time working parameters are obtained, and the real-time working parameters include real-time voltage and real-time current, and the real-time working power is calculated based on the real-time voltage and the real-time current.
[0009] Optionally, in a third implementation of the first aspect of the present invention, the adjustment brightness value is confirmed based on the adjustment parameters and a preset mixed color brightness calculation function, and the first adjustment power is calculated based on the adjusted brightness value, including: obtaining the luminous effect of the lamp; when the adjustment working mode is a monochrome mode, the brightness adjustment value is the adjusted brightness value, and the first adjustment power is calculated based on the adjusted brightness value and the luminous effect of the lamp; when the adjustment working mode is a mixed color mode, the brightness value corresponding to each color light source is calculated based on the preset mixed color brightness calculation function, and the first adjustment power is calculated based on the brightness value corresponding to each color light source and the luminous effect of the lamp.
[0010] Optionally, in a fourth implementation method of the first aspect of the present invention, the real-time working temperature is determined based on the real-time working time, and the second adjusted power is obtained based on the real-time working temperature, including: obtaining a pre-constructed time-temperature correspondence table and a pre-constructed binary search function, and obtaining the real-time working temperature from the time-temperature correspondence table based on the real-time working time using a binary search function; obtaining a pre-constructed power adjustment model, wherein the power adjustment model is constructed based on the basic power of the lamp, the temperature coefficient, and the linear relationship between the standard operating temperature and the real-time operating temperature; and the real-time working temperature is input into the pre-constructed power adjustment model to obtain the second adjusted power.
[0011] Optionally, in a fifth implementation of the first aspect of the present invention, the power to be adjusted is calculated based on the first adjustment power and the second adjustment power, and the power to be adjusted is compared with the maximum rated power, and the final adjusted brightness is confirmed based on the comparison result, including: obtaining the real-time brightness value and the preset adjustment weight factor and time weight factor, calculating the power to be adjusted based on the product of the adjustment weight factor and the first adjustment power and the product of the time weight factor and the second adjustment power, and comparing the power to be adjusted with the maximum rated power; if the power to be adjusted is less than or equal to the preset maximum rated power, calculating the first adjustment factor based on the power to be adjusted and the real-time working power, and confirming the final adjusted brightness based on the first adjustment factor and the real-time brightness value; if the power to be adjusted is greater than the preset maximum rated power, calculating the second adjustment factor based on the maximum rated power and the power to be adjusted, and confirming the final adjusted brightness based on the second adjustment factor and the real-time brightness value.
[0012] Optionally, in a sixth implementation method of the first aspect of the present invention, when a brightness adjustment instruction is received, the adjustment parameters, real-time working parameters and real-time working time are obtained, and the real-time working power is calculated based on the real-time working parameters, and then it also includes: obtaining a pre-built temperature prediction model based on random forest; inputting the real-time working time, the real-time working power, and the product of the real-time working time and the real-time working power as input variables into the temperature prediction model to obtain a temperature prediction result; obtaining a preset safety temperature range, and if the temperature prediction result exceeds the preset safety temperature range, generating a temperature alarm instruction.
[0013] The second aspect of the present invention provides a device for adjusting the brightness of a lamp, comprising: a first acquisition module, used to acquire the working parameters of the lamp, a preset mixed color brightness calculation function and a pre-constructed brightness duty cycle mapping relationship, wherein the working parameters include the maximum rated power; a second acquisition module, used to acquire the adjustment parameters, real-time working parameters and real-time working time when a brightness adjustment instruction is received, and calculate the real-time working power based on the real-time working parameters; a first calculation module, used to confirm the adjusted brightness value based on the adjustment parameters and the preset mixed color brightness calculation function, and calculate the first adjusted power based on the adjusted brightness value; a third acquisition module, used to determine the real-time working temperature based on the real-time working time, and acquire the second adjusted power based on the real-time working temperature; a second calculation module, used to calculate the adjusted power based on the first adjusted power and the second adjusted power, and compare the adjusted power with the maximum rated power, and confirm the final adjusted brightness according to the comparison result.
[0014] The third aspect of the present invention provides a lamp brightness adjustment device, which includes: a memory and at least one processor, wherein instructions are stored in the memory; at least one of the processors calls the instructions in the memory so that the lamp brightness adjustment device performs each step of the lamp brightness adjustment method described in any one of the above items.
[0015] A fourth aspect of the present invention provides a computer-readable storage medium, on which instructions are stored, and when the instructions are executed by a processor, the steps of any of the above-mentioned methods for adjusting the brightness of a lamp are implemented.
[0016] In the technical solution of the present invention, firstly, according to the preset mixed color brightness calculation function and brightness duty cycle mapping relationship, the brightness of the lamp is adjusted quickly and accurately. This automated process reduces the need for manual operation and ensures the accuracy and efficiency of brightness adjustment; secondly, the system monitors and analyzes the key working parameters of the lamp in real time, including real-time working power, time and temperature, and calculates the power to be adjusted based on the monitored real-time working parameters, and meets the user's lighting needs while ensuring that the power to be adjusted does not exceed the maximum rated power; it not only ensures that the lamp operates within a safe power range to avoid potential damage risks, but also minimizes energy consumption and provides a suitable lighting environment; finally, the real-time working temperature is confirmed based on the real-time working time to confirm the power to be adjusted, avoiding the problems caused by NTC instability and errors in traditional temperature controllers, and improving the brightness adjustment accuracy and reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A first flow chart of a method for adjusting the brightness of a lamp provided by an embodiment of the present invention;
[0018] Figure 2A schematic diagram of the structure of a lamp brightness adjustment device provided by an embodiment of the present invention;
[0019] Figure 3 A schematic diagram of the structure of a lamp brightness adjustment device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The present invention provides a method, device, equipment and storage medium for adjusting the brightness of lamps. In the present invention, the terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0021] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , an embodiment of a method for adjusting the brightness of a lamp in an embodiment of the present invention includes:
[0022] 101. Obtain operating parameters of a lamp, a preset color mixing brightness calculation function, and a pre-built brightness duty cycle mapping relationship, wherein the operating parameters include a maximum rated power;
[0023] 102. When a brightness adjustment instruction is received, an adjustment parameter, a real-time working parameter and a real-time working time are obtained, and a real-time working power is calculated based on the real-time working parameter;
[0024] In this embodiment, during the startup process of the lamp, in order to ensure that the user can perform settings safely and effectively, the following startup procedure is designed: when the lamp is powered on, the system will provide a safe setting window within the startup time of 35 seconds; during these 35 seconds, the lamp will limit its brightness output to 25% of the maximum brightness level, allowing the user to adjust the brightness setting and other related parameters during this period, that is, input brightness adjustment instructions; by designing this procedure, it is intended to prevent the user from performing improper operations without understanding the performance of the lamp, thereby triggering the protection mechanism of the power driver, resulting in the inability to perform necessary parameter configuration, that is, ensuring that the user can safely complete the initial settings in a controlled environment to ensure the long-term stable operation of the lamp.
[0025] In addition, in this embodiment, when the lamp is mistakenly configured to operate at full power (i.e., exceeding its maximum power tolerance), that is, the brightness adjustment instruction input by the user is for full power operation, the system will automatically start the preset time threshold timer. Once the timer reaches the set time threshold, the lamp will automatically switch to normal power mode, ensuring that while achieving higher lighting efficiency, the normal service life of the lamp is also maintained.
[0026] 103. Confirming an adjusted brightness value based on the adjustment parameter and a preset mixed color brightness calculation function, and calculating a first adjusted power based on the adjusted brightness value;
[0027] 104. Determine a real-time working temperature based on the real-time working time, and obtain a second adjusted power based on the real-time working temperature;
[0028] 105. Calculate the power to be adjusted based on the first adjusted power and the second adjusted power, compare the power to be adjusted with the maximum rated power, and confirm the final adjusted brightness according to the comparison result.
[0029] The present application discloses a method for adjusting the brightness of a lamp. Firstly, according to a preset mixed color brightness calculation function and a brightness duty cycle mapping relationship, the brightness of the lamp is adjusted quickly and accurately. This automated process reduces the need for manual operation and ensures the accuracy and efficiency of brightness adjustment. Secondly, the system monitors and analyzes the key operating parameters of the lamp in real time, including real-time operating power, time and temperature, and calculates the power to be adjusted based on the monitored real-time operating parameters. Under the premise of ensuring that the power to be adjusted does not exceed the maximum rated power, the user's lighting needs are met. This method not only ensures that the lamp operates within a safe power range to avoid potential damage risks, but also minimizes energy consumption and provides a suitable lighting environment. Finally, the real-time operating temperature is confirmed based on the real-time operating time to confirm the power to be adjusted, thereby avoiding the problems caused by NTC instability and errors in traditional temperature controllers and improving the brightness adjustment accuracy and reliability.
[0030] In the embodiment of the present invention, the step of obtaining the operating parameters of the lamp, the preset color mixing brightness calculation function and the pre-built brightness duty cycle mapping relationship, wherein the operating parameters include the maximum rated power, includes:
[0031] 201. Obtain operating parameters of the lamp, wherein the operating parameters include maximum rated power, forward voltage of each color light source, maximum brightness and corresponding current;
[0032] In this embodiment, the lamp can realize a single-color mode and a mixed-color mode. Therefore, the working parameters of the lamp include relevant parameters of each color light source. For example, assuming that the lamp can realize RGB, the forward voltage and maximum brightness current of the red light source are read, and the same is true for the green and blue light sources.
[0033] 202. Obtain a preset color mixing brightness calculation function, where the color mixing brightness calculation function is used to calculate the brightness value corresponding to each color light source according to the color mixing ratio input by the user;
[0034] In this embodiment, the mixed color brightness calculation function can be
[0035] calculate_mixed_brightness function, calculate_mixed_brightness function accepts a dictionary color_ratios, which contains color names and corresponding mixing ratios; the mixed color brightness calculation function uses the brightness weights of each color in the standard RGB color model to calculate the mixed brightness value. Finally, the function returns the calculated brightness value corresponding to each color light source.
[0036] 202. Obtain a current-brightness characteristic curve of the lamp, and construct a brightness duty ratio mapping relationship according to the current-brightness characteristic curve;
[0037] In this embodiment, the current-brightness characteristic curve of the lamp is obtained through preliminary testing. The specific operation is to use an adjustable current source to power the lamp, and at the same time record the lamp brightness corresponding to different current values. Subsequently, these current values and corresponding brightness values are plotted into a curve to obtain the current-brightness characteristic curve of the lamp; further, constructing a brightness-duty ratio mapping relationship involves the following steps: first, determining the target brightness range of the lamp according to actual needs; second, analyzing the current-brightness characteristic curve to find the current range corresponding to the target brightness range; then, calculating the duty cycle required to achieve the target brightness according to the PWM principle. The duty cycle refers to the proportion of time occupied by a high level in a cycle. The average brightness of the lamp can be changed by adjusting the duty cycle; then, the target brightness range is mapped with the corresponding duty cycle to form a brightness-duty ratio mapping relationship table.
[0038] In the embodiment of the present invention, when a brightness adjustment instruction is received, the adjustment parameter, the real-time working parameter and the real-time working time are obtained, and the real-time working power is calculated based on the real-time working parameter, including:
[0039] 301. When a brightness adjustment instruction is received, a pre-built SQL query statement is used to obtain adjustment parameters from the brightness adjustment instruction, where the adjustment parameters include an adjustment working mode and a brightness adjustment value;
[0040] In this embodiment, the adjustment working mode includes a monochrome mode and a mixed color mode.
[0041] 302. Acquire real-time working time and real-time working parameters, where the real-time working parameters include real-time voltage and real-time current, and calculate real-time working power based on the real-time voltage and real-time current.
[0042] In this embodiment, the working power is implemented as the product of the real-time voltage and the real-time current.
[0043] In the embodiment of the present invention, the step of determining the adjusted brightness value based on the adjustment parameter and the preset mixed color brightness calculation function, and calculating the first adjusted power based on the adjusted brightness value includes:
[0044] 401. Get the light effect of the lamp;
[0045] In this embodiment, the luminous effect refers to the visual effect related to luminescence. At the same time, the luminous effect of a light source is also the ratio of the luminous flux emitted by the light source to the power consumption, and the unit is lumen / watt (lm / W); wherein, the luminous flux is the total amount of light emitted by the light source, usually in lumen (lm), and a luminous flux measuring instrument can be used to measure the luminous flux of the lamp; the power consumption refers to the electrical energy consumed by the light source when it is working, usually in watt (W), and a power meter can be used to measure the power consumption of the lamp.
[0046] 402. When the working mode is adjusted to the monochrome mode, the brightness adjustment value is an adjusted brightness value, and a first adjusted power is calculated based on the adjusted brightness value and the light efficiency of the lamp;
[0047] In this embodiment, the first adjustment power is calculated based on the adjusted brightness value and the light effect of the lamp, specifically including the following steps: first, determine the basic parameters such as the space size, illumination standard and the light effect of the lamp, and then use the formula: power size = illumination standard × space length × space width ÷ space maintenance coefficient ÷ utilization coefficient ÷ light source light effect to calculate the original power demand, and then determine the target brightness according to the adjusted brightness value, and determine the brightness adjustment ratio according to the ratio of the target brightness to the original brightness, and finally, use the formula original power demand × brightness adjustment ratio = first adjustment power to obtain the first adjustment power.
[0048] 402. When the working mode is adjusted to the color mixing mode, the brightness value corresponding to each color light source is calculated based on a preset color mixing brightness calculation function, and the first adjustment power is calculated based on the brightness value corresponding to each color light source and the light effect of the lamp;
[0049] In this embodiment, after the brightness value corresponding to each color light source is calculated according to the preset mixed color brightness calculation function and the adjusted brightness value, that is, after the brightness value corresponding to each color light source is calculated according to the color mixing ratio input by the user, the adjustment power of each color light source is calculated in the same way as the monochrome mode, and then, the adjustment powers of each color light source are summed to obtain the first adjustment power.
[0050] In the embodiment of the present invention, determining the real-time operating temperature based on the real-time operating time, and acquiring the second adjusted power based on the real-time operating temperature, includes:
[0051] 501. Obtain a pre-built time-temperature correspondence table and a pre-built binary search function, and obtain the real-time working temperature from the time-temperature correspondence table using the binary search function based on the real-time working time;
[0052] In this embodiment, the real-time operating temperature can be quickly acquired by using a pre-built time-temperature correspondence table and a binary search function, and code modularization is implemented to facilitate updating and upgrading of the temperature-time correspondence table or the search function.
[0053] 502. Obtain a pre-built power adjustment model, where the power adjustment model is built based on a basic power of the lamp, a temperature coefficient, and a linear relationship between a standard operating temperature and a real-time operating temperature;
[0054] In this embodiment, the power adjustment model is a linear model, which is a mathematical model characterized in that the relationship between variables can be expressed as a straight line; in the power adjustment model, the adjusted power is the dependent variable, the real-time operating temperature is the independent variable, and the basic power and the temperature coefficient are known constants. This model describes how the adjusted power changes linearly with the change of the real-time operating temperature; specifically, when the real-time operating temperature is higher or lower than the standard operating temperature, the adjusted power will increase or decrease according to the temperature coefficient to achieve linear adjustment of the power.
[0055] 503. Input the real-time operating temperature into a pre-built power adjustment model to obtain a second adjusted power;
[0056] In this embodiment, the real-time working temperature is input into the pre-built power adjustment model, which can dynamically capture the current working state of the device and obtain the second adjusted power accordingly. This method of obtaining the real-time temperature based on the working time not only avoids the problems caused by NTC instability and errors of traditional temperature controllers, but also significantly improves the efficiency and stability of the equipment, effectively slows down the aging of the equipment, extends its service life, and greatly improves the energy utilization efficiency and reduces energy waste through refined adjustment strategies.
[0057] In the embodiment of the present invention, the step of calculating the power to be adjusted based on the first adjustment power and the second adjustment power, comparing the power to be adjusted with the maximum rated power, and determining the final adjustment brightness according to the comparison result includes:
[0058] 601. Obtain a real-time brightness value and a preset adjustment weight factor and a time weight factor, calculate the power to be adjusted based on the product of the adjustment weight factor and the first adjustment power and the product of the time weight factor and the second adjustment power, and compare the power to be adjusted with the maximum rated power;
[0059] In this embodiment, a weighted average method is used to comprehensively consider the brightness adjustment value input by the user and the power corresponding to the working time, thereby avoiding the problem of inaccurate brightness adjustment caused by a single factor and improving the adjustment effect.
[0060] 602. If the power to be adjusted is less than or equal to the preset maximum rated power, a first adjustment factor is calculated according to the power to be adjusted and the real-time working power, and a final adjusted brightness is determined based on the first adjustment factor and the real-time brightness value;
[0061] In this embodiment, the first adjustment factor is the ratio of the power to be adjusted to the real-time working power, and the final adjusted brightness is the product of the real-time brightness value and the first adjustment factor.
[0062] 603. If the power to be adjusted is greater than the preset maximum rated power, a second adjustment factor is calculated according to the maximum rated power and the power to be adjusted, and a final adjusted brightness is determined based on the second adjustment factor and the real-time brightness value;
[0063] In this embodiment, the second adjustment factor is the ratio of the maximum rated power to the power to be adjusted, and the final adjusted brightness is the product of the real-time brightness value and the second adjustment factor.
[0064] In this embodiment, by comparing the power to be adjusted with the maximum rated power, it can be ensured that the adjusted power does not exceed the maximum rated power of the device, thereby avoiding device damage or safety problems caused by excessive power.
[0065] In the embodiment of the present invention, when the brightness adjustment instruction is received, the adjustment parameter, the real-time working parameter and the real-time working time are obtained, and the real-time working power is calculated based on the real-time working parameter, and then the following is further included:
[0066] 701. Obtain a pre-built temperature prediction model based on random forest;
[0067] In this embodiment, the pre-built temperature prediction model based on random forest is a model obtained through the steps of data collection and preprocessing, model construction, evaluation and optimization; specifically, the model first collects historical temperature data and performs cleaning and feature engineering, then trains the random forest model with the training set data, and optimizes the model performance by adjusting the parameters; after the model is built, it is evaluated using the test set data to ensure its accuracy and robustness; finally, the trained random forest model can be used to predict new temperature data.
[0068] 702. Input the real-time working time, the real-time working power, and the product of the real-time working time and the real-time working power as input variables into a temperature prediction model to obtain a temperature prediction result;
[0069] In this embodiment, the real-time working time, the real-time working power and their product are used as input variables to be input into the temperature prediction model. The real-time working time and the real-time working power are two important parameters in the working process of the equipment. Their product can reflect the energy consumption of the equipment within a specific time. Using these parameters as input variables at the same time can more accurately describe the working state of the equipment, thereby improving the accuracy of temperature prediction; in addition, since the input variables contain a variety of information of the equipment under different working states, the model can better adapt to temperature changes under different working conditions, improve the generalization ability of the model, and thus achieve accurate prediction of the lamp temperature.
[0070] In summary, using real-time working time, real-time working power and their product as input variables can significantly improve the accuracy and generalization ability of the temperature prediction model.
[0071] 703. Obtain a preset safe temperature range. If the temperature prediction result exceeds the preset safe temperature range, generate a temperature alarm instruction.
[0072] In this embodiment, based on the preset safety temperature range obtained, when the predicted temperature at the next moment exceeds the preset safety range, the system can quickly generate a temperature alarm instruction, thereby promptly reminding relevant personnel to take necessary measures and effectively avoid potential safety hazards; this automated monitoring and alarm mechanism not only improves work efficiency, but also enhances the safety of the lamp during operation.
[0073] The above describes the method for adjusting the brightness of a lamp in an embodiment of the present invention. The following describes the device for adjusting the brightness of a lamp in an embodiment of the present invention. Figure 2 In one embodiment of the present invention, a device for adjusting the brightness of a lamp includes:
[0074] The first acquisition module 801 is used to acquire the operating parameters of the lamp, the preset color mixing brightness calculation function and the pre-built brightness duty cycle mapping relationship, wherein the operating parameters include the maximum rated power;
[0075] The second acquisition module 802 is used to acquire the adjustment parameter, the real-time working parameter and the real-time working time when receiving the brightness adjustment instruction, and calculate the real-time working power based on the real-time working parameter;
[0076] A first calculation module 803, configured to determine an adjustment brightness value based on the adjustment parameter and a preset mixed color brightness calculation function, and calculate a first adjustment power based on the adjustment brightness value;
[0077] A third acquisition module 804 is used to determine the real-time working temperature based on the real-time working time, and acquire the second adjusted power based on the real-time working temperature;
[0078] The second calculation module 805 is used to calculate the power to be adjusted based on the first adjustment power and the second adjustment power, compare the power to be adjusted with the maximum rated power, and determine the final adjustment brightness according to the comparison result.
[0079] Based on the same idea as the method in the above embodiment, the device provided by the present application can implement the method in the above embodiment.
[0080] above Figure 2 The lamp brightness adjustment device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The lamp brightness adjustment device in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0081] Figure 3 : is a schematic diagram of the structure of a lamp brightness adjustment device provided by an embodiment of the present invention. The lamp brightness adjustment device 900 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 910 (for example, one or more processors) and a memory 920, and one or more storage media 930 (for example, one or more mass storage devices) storing application programs 933 or data 932. Among them, the memory 920 and the storage medium 930 can be short-term storage or permanent storage. The program stored in the storage medium 930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the lamp brightness adjustment device 900. Furthermore, the processor 910 can be configured to communicate with the storage medium 930, and execute a series of instruction operations in the storage medium 930 on the lamp brightness adjustment device 900 to implement the steps of the lamp brightness adjustment method provided by the above-mentioned method embodiments.
[0082] The lamp brightness adjustment device 900 may also include one or more power supplies 940, one or more wired or wireless network interfaces 950, one or more input and output interfaces 960, and / or one or more operating systems 931, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that Figure 3 The structure of the lamp brightness adjustment device shown does not constitute a limitation on the lamp brightness adjustment device, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0083] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the lamp brightness adjustment method.
[0084] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system, device, or unit can refer to the corresponding process in the aforementioned method embodiment and will not be repeated here.
[0085] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.
[0086] Finally, it should be noted that the above description is only a preferred example of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for adjusting the brightness of a lamp, characterized in that: include: Obtaining operating parameters of the lamp, a preset color mixing brightness calculation function, and a pre-built brightness duty cycle mapping relationship, wherein the operating parameters include a maximum rated power; When a brightness adjustment instruction is received, the adjustment parameter, the real-time working parameter and the real-time working time are obtained, and the real-time working power is calculated based on the real-time working parameter; Determining an adjusted brightness value based on the adjustment parameter and a preset mixed color brightness calculation function, and calculating a first adjusted power based on the adjusted brightness value; Determine the real-time operating temperature based on the real-time operating time, and obtain the second adjusted power based on the real-time operating temperature; The power to be adjusted is calculated based on the first adjusted power and the second adjusted power, and the power to be adjusted is compared with the maximum rated power, and the final adjusted brightness is determined according to the comparison result.
2. The method for adjusting the brightness of a lamp according to claim 1, characterized in that: The step of obtaining the working parameters of the lamp, the preset color mixing brightness calculation function and the pre-built brightness duty cycle mapping relationship, wherein the working parameters include the maximum rated power, comprises: Obtaining operating parameters of the lamp, the operating parameters including maximum rated power, forward voltage of each color light source, maximum brightness and corresponding current; Obtaining a preset color mixing brightness calculation function, wherein the color mixing brightness calculation function is used to calculate the brightness value corresponding to each color light source according to the color mixing ratio input by the user; Obtain the current-brightness characteristic curve of the lamp, and construct a brightness-duty ratio mapping relationship based on the current-brightness characteristic curve.
3. The method for adjusting the brightness of a lamp according to claim 1, characterized in that: When a brightness adjustment instruction is received, the adjustment parameter, the real-time working parameter and the real-time working time are obtained, and the real-time working power is calculated based on the real-time working parameter, including: When a brightness adjustment instruction is received, a pre-built SQL query statement is used to obtain adjustment parameters from the brightness adjustment instruction, wherein the adjustment parameters include an adjustment working mode and a brightness adjustment value; The real-time working time and the real-time working parameters are acquired, wherein the real-time working parameters include the real-time voltage and the real-time current, and the real-time working power is calculated based on the real-time voltage and the real-time current.
4. The method for adjusting the brightness of a lamp according to claim 3, characterized in that: The step of confirming the adjusted brightness value based on the adjustment parameter and a preset mixed color brightness calculation function, and calculating the first adjusted power based on the adjusted brightness value, includes: Get the light effect of the lamp; When the working mode is adjusted to the monochrome mode, the brightness adjustment value is the adjusted brightness value, and the first adjusted power is calculated based on the adjusted brightness value and the light efficiency of the lamp; When the adjustment working mode is the color mixing mode, the brightness value corresponding to each color light source is calculated based on a preset color mixing brightness calculation function, and the first adjustment power is calculated based on the brightness value corresponding to each color light source and the light effect of the lamp.
5. The method for adjusting the brightness of a lamp according to claim 1, characterized in that: The determining the real-time operating temperature based on the real-time operating time, and acquiring the second adjusted power based on the real-time operating temperature, includes: Obtain a pre-built time-temperature correspondence table and a pre-built binary search function, and based on the real-time working time, use the binary search function to obtain the real-time working temperature from the time-temperature correspondence table; Obtaining a pre-built power adjustment model, where the power adjustment model is built based on a basic power of the lamp, a temperature coefficient, and a linear relationship between a standard operating temperature and a real-time operating temperature; The real-time operating temperature is input into a pre-built power adjustment model to obtain a second adjusted power.
6. The method for adjusting the brightness of a lamp according to claim 1, characterized in that: The step of calculating the power to be adjusted based on the first adjusted power and the second adjusted power, comparing the power to be adjusted with the maximum rated power, and determining the final adjusted brightness according to the comparison result includes: Acquire the real-time brightness value and the preset adjustment weight factor and time weight factor, calculate the power to be adjusted based on the product of the adjustment weight factor and the first adjustment power and the product of the time weight factor and the second adjustment power, and compare the power to be adjusted with the maximum rated power; If the power to be adjusted is less than or equal to the preset maximum rated power, a first adjustment factor is calculated according to the power to be adjusted and the real-time working power, and the final adjusted brightness is determined based on the first adjustment factor and the real-time brightness value; If the power to be adjusted is greater than the preset maximum rated power, a second adjustment factor is calculated according to the maximum rated power and the power to be adjusted, and the final adjusted brightness is confirmed based on the second adjustment factor and the real-time brightness value.
7. The method for adjusting the brightness of a lamp according to claim 1, characterized in that: When the brightness adjustment instruction is received, the adjustment parameter, the real-time working parameter and the real-time working time are obtained, and the real-time working power is calculated based on the real-time working parameter, and then the following is further included: Get a pre-built random forest-based temperature prediction model; The real-time working time, the real-time working power and the product of the real-time working time and the real-time working power are input as input variables into the temperature prediction model to obtain the temperature prediction result; Get the preset safe temperature range, and if the temperature prediction result exceeds the preset safe temperature range, generate a temperature alarm instruction.
8. A device for adjusting the brightness of a lamp, characterized in that: include: A first acquisition module is used to acquire operating parameters of the lamp, a preset color mixing brightness calculation function and a pre-built brightness duty cycle mapping relationship, wherein the operating parameters include a maximum rated power; A second acquisition module is used to acquire the adjustment parameter, the real-time working parameter and the real-time working time when receiving the brightness adjustment instruction, and calculate the real-time working power based on the real-time working parameter; A first calculation module, configured to determine an adjusted brightness value based on an adjustment parameter and a preset mixed color brightness calculation function, and calculate a first adjusted power based on the adjusted brightness value; a third acquisition module, configured to determine a real-time operating temperature based on the real-time operating time, and acquire a second adjusted power based on the real-time operating temperature; The second calculation module is used to calculate the power to be adjusted based on the first adjustment power and the second adjustment power, compare the power to be adjusted with the maximum rated power, and confirm the final adjustment brightness according to the comparison result.
9. A lamp brightness adjustment device, characterized in that: The lamp brightness adjustment device comprises: a memory and at least one processor, wherein instructions are stored in the memory; At least one of the processors calls the instructions in the memory to enable the lamp brightness adjustment device to perform each step of the lamp brightness adjustment method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the various steps of the lamp brightness adjustment method as described in any one of claims 1 to 7 are implemented.