Lamp brightness control method and device, equipment, storage medium and program product

By obtaining the brightness value and expected value of LED lamps in real time and adjusting the current to achieve brightness consistency, the problem of brightness difference during the use of LED lamps is solved and the calibration cost is reduced.

CN119697852APending Publication Date: 2025-03-25BEIJING DEWEI WISDOM TECH CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411947969.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The brightness of LED lamps is prone to differences during use. The calibration of the existing technology after production is completed cannot ensure the consistency of brightness during use.

Method used

Real-time brightness control is achieved by obtaining the current brightness value and expected value of the lamp, and adjusting the input current to make the brightness close to the expected value.

Benefits of technology

It realizes automatic brightness adjustment during use of lamps, avoids the problem of inconsistent brightness, and eliminates post-production calibration work, reducing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119697852A_ABST
    Figure CN119697852A_ABST
Patent Text Reader

Abstract

The invention provides a lamp brightness control method and device, equipment, a storage medium and a program product, and relates to the technical field of lamp control. The method comprises the following steps: acquiring a first gear and a first brightness value which are currently turned on by a lamp in use; determining a first brightness expected value corresponding to the first gear from a configuration table; the mapping relation between the gear of the lamp and the expected brightness value is stored in the configuration table; and based on the first brightness value and the first brightness expected value, adjusting the current currently input to the lamp, so that the brightness value of the lamp is close to the first brightness expected value. According to the invention, the brightness value of the lamp is acquired in real time, the brightness value is compared with the expected brightness value, and the current currently input to the lamp is adjusted, so that the brightness value of the lamp is close to the expected brightness value, the brightness of the lamp can be automatically controlled in the use process of the lamp, and the problem of inconsistent brightness in the use process of the lamp is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of lamp control technology, and in particular to a lamp brightness control method, device, equipment, storage medium and program product. Background Art

[0002] With the development of product technology, the medical display field requires multiple brightness levels for different status prompts, and LED (Light Emitting Diode) lamps are usually used to obtain multiple brightness levels. However, there are large differences in brightness between different batches of LEDs, and there are also large differences in brightness between different brands of LED lamps. The brightness of LED lamps will also vary with the length of use.

[0003] In the prior art, the brightness of LED lamps is calibrated after they are produced to avoid brightness differences between different batches and brands of LED lamps. However, calibration after production cannot guarantee that there will be no brightness differences during the use of LED lamps. Summary of the invention

[0004] Embodiments of the present invention provide a method, device, equipment, storage medium and program product for controlling the brightness of a lamp, so as to solve the problem of brightness difference during the use of the lamp.

[0005] In a first aspect, an embodiment of the present invention provides a method for controlling the brightness of a lamp, comprising: obtaining a first gear position currently turned on by the lamp in use, and a first brightness value; determining a first expected brightness value corresponding to the first gear position from a configuration table; the configuration table stores a mapping relationship between the gear position of the lamp and the expected brightness value; based on the first brightness value and the first expected brightness value, adjusting the current currently input to the lamp so that the brightness value of the lamp is close to the first expected brightness value.

[0006] In some embodiments, the current currently input to the lamp is adjusted based on the first brightness value and the first expected brightness value, including: if the difference between the first brightness value and the first expected brightness value is less than a threshold, keeping the current currently input to the lamp unchanged; if the difference is greater than or equal to the threshold, adjusting the current currently input to the lamp based on the difference.

[0007] In some embodiments, adjusting the current currently input to the lamp based on the difference includes: determining a current adjustment value according to the difference; and adjusting the current currently input to the lamp based on the current adjustment value.

[0008] As a possible implementation method, adjusting the current currently input to the lamp based on the current adjustment value includes: determining a resistance adjustment value of a digital potentiometer based on the current adjustment value; and adjusting the resistance of the digital potentiometer based on the resistance adjustment value to adjust the current currently input to the lamp.

[0009] In some embodiments, the configuration table also stores a mapping relationship between the gear position of the lamp and the size of the input current; after adjusting the current currently input to the lamp based on the first brightness value and the first expected brightness value, it also includes: updating the corresponding relationship between the size of the adjusted current and the first gear position into the configuration table.

[0010] In some embodiments, before obtaining the first gear value and the first brightness value of the lamp currently in use, it also includes: in response to the turn-on operation corresponding to the first gear, determining the size of the first input current corresponding to the first gear from the configuration table; according to the size of the first input current, inputting the first input current to the lamp.

[0011] In a second aspect, an embodiment of the present invention provides a device for controlling the brightness of a lamp, comprising: an acquisition module, used to acquire a first gear position currently turned on by the lamp in use, and a first brightness value; a first determination module, used to determine a first expected brightness value corresponding to the first gear position from a configuration table; the configuration table stores a mapping relationship between the gear position of the lamp and the expected brightness value; an adjustment module, used to adjust the current currently input to the lamp based on the first brightness value and the first expected brightness value, so that the brightness value of the lamp is close to the first expected brightness value.

[0012] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory storing a computer program, wherein when the processor executes the program, the method for controlling the brightness of a lamp as described in the first aspect is implemented.

[0013] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the method for controlling the brightness of a lamp as described in the first aspect.

[0014] In a fifth aspect, an embodiment of the present invention provides a computer program product, including a computer program, and when the computer program is executed by a processor, the method for controlling the brightness of a lamp as described in the first aspect is implemented.

[0015] According to the control method, device, equipment, storage medium and program product of the brightness of the lamp of the embodiment of the present invention, the first gear position currently turned on and the first brightness value of the lamp in use are obtained; the first brightness expected value corresponding to the first gear position is determined from the configuration table; the mapping relationship between the gear position of the lamp and the brightness expected value is stored in the configuration table; based on the first brightness value and the first brightness expected value, the current currently input to the lamp is adjusted so that the brightness value of the lamp is close to the first brightness expected value. The present invention obtains the brightness value of the lamp in real time, compares it with the brightness expected value, and adjusts the current currently input to the lamp so that the brightness value of the lamp is close to the brightness expected value, thereby automatically controlling the brightness of the lamp during the use of the lamp, avoiding the problem of inconsistent brightness during the use of the lamp. In addition, since the present invention can control the brightness of the lamp during the use of the lamp, the calibration work after the lamp is produced can be eliminated, thereby reducing the cost of the calibration work. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 One of the flow charts of the method for controlling the brightness of a lamp provided in an embodiment of the present invention; Figure 2 A second flow chart of a method for controlling the brightness of a lamp provided in an embodiment of the present invention; Figure 3 A third flow chart of a method for controlling the brightness of a lamp provided in an embodiment of the present invention; Figure 4 A schematic diagram of the structure of a device for controlling the brightness of a lamp provided in an embodiment of the present invention; Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0019] With the development of product technology, the medical display field requires multiple brightness levels for different status prompts, and LED (Light Emitting Diode) lamps are usually used to obtain multiple brightness levels. However, there are large differences in brightness between different batches of LEDs, and there are also relatively large differences in brightness between different brands of LED lamps. The brightness of LED lamps will also vary with the length of use. In the existing technology, the brightness of LED lamps will be calibrated after the production is completed to avoid differences in brightness between different batches and brands of LED lamps. However, calibration after production cannot guarantee that the brightness of LED lamps will not vary during use.

[0020] In order to solve the above problems, embodiments of the present invention provide a method, device, equipment, storage medium and program product for controlling the brightness of a lamp.

[0021] Figure 1 This is one of the flow charts of the method for controlling the brightness of a lamp provided in an embodiment of the present invention. In some embodiments of the present invention, the execution subject of the method for controlling the brightness of a lamp may be a lamp equipped with a control element, or a lamp mainboard, or an electronic device connected to the lamp. Figure 1 As shown, the method may include the following steps.

[0022] Step 101, obtaining the first gear position and the first brightness value of the lamp currently in use.

[0023] Among them, the lamps in use refer to lamps that have been used in actual application scenarios. They can be LED lamps in the medical field, LED lamps used in other fields, or other lamps with lighting functions.

[0024] In some embodiments, the lamp may have one or more gears, each gear corresponding to a specific brightness value. The first gear currently turned on refers to the gear currently turned on by the lamp, and the first brightness value refers to the current brightness value of the lamp. As a possible implementation, the first gear of the lamp currently turned on can be determined based on the user's turn-on operation at the front end, or can be determined based on the size of the voltage signal converted from the current currently input to the lamp. For example, the correspondence between different gears and the size range of the voltage signal can be pre-configured, and the corresponding gear can be determined based on the size of the voltage signal converted from the current input to the lamp.

[0025] As a possible implementation, the first brightness value of the lamp can be obtained by detecting the brightness of the lamp through a brightness detection unit. The brightness detection unit is connected to the lamp, and the brightness detection unit can be configured in the lamp or on a main board of the lamp.

[0026] Step 102, determining a first expected brightness value corresponding to a first gear position from a configuration table; the configuration table stores a mapping relationship between the gear positions of the lamp and the expected brightness values.

[0027] That is to say, the mapping relationship between the lamp gears and the expected brightness values ​​is stored in the configuration table in advance, and the expected brightness value refers to the specific brightness value corresponding to each gear of the lamp.

[0028] Step 103: Based on the first brightness value and the first expected brightness value, adjust the current currently input to the lamp so that the brightness value of the lamp is close to the first expected brightness value.

[0029] It can be understood that if the first brightness value is greater than or equal to the first expected brightness value, it means that there is a difference in the brightness of the first gear of the current lamp, so the current input to the lamp needs to be adjusted to control the brightness of the lamp to be close to the first expected brightness value.

[0030] In some embodiments, the first brightness value can be compared with the first expected brightness value. If the first brightness value is consistent with the first expected brightness value, there is no need to adjust the current input to the lamp. If the first brightness value is inconsistent with the first expected brightness value, the difference between the first brightness value and the first expected brightness value is determined, and based on the difference, an adjusted current value is determined, and the adjusted current value is transmitted to the lamp.

[0031] In some embodiments, the process of adjusting the current currently input to the lamp based on the first brightness value and the first expected brightness value may include the following steps.

[0032] Step S11: if the difference between the first brightness value and the first expected brightness value is smaller than a threshold value, the current currently input to the lamp is kept unchanged.

[0033] That is to say, a brightness difference threshold that does not affect actual use can be preset. If the difference between the first brightness value and the first expected brightness value is less than the threshold, it means that the current brightness difference of the lamp does not affect actual use, and the brightness of the lamp does not need to be controlled.

[0034] Step S12: if the difference is greater than or equal to the threshold, adjust the current currently input to the lamp based on the difference.

[0035] If the difference between the first brightness value and the first expected brightness value is greater than or equal to the threshold, it means that the current brightness difference of the lamp has affected actual use, and the input current of the lamp needs to be adjusted so that the difference between the brightness value of the lamp and the first expected brightness value is less than the threshold.

[0036] In some embodiments, the current currently input to the lamp can be adjusted based on the difference. For example, the circuit parameters that need to be adjusted can be determined based on the difference, and the current currently input to the lamp can be adjusted by adjusting the circuit parameters.

[0037] As an example, if the first brightness value is greater than the first expected brightness value, and the difference between the two is greater than or equal to a threshold value, the circuit parameters can be adjusted to reduce the current input to the lamp to reduce the brightness value of the lamp; if the first brightness value is less than the first expected brightness value, and the difference between the two is greater than or equal to the threshold value, the circuit parameters can be adjusted to increase the current input to the lamp to increase the brightness value of the lamp.

[0038] That is to say, the method for controlling the brightness of the lamp in the embodiment of the present invention can control the brightness in real time during the use of the lamp, and automatically calibrate the brightness of the lamp, so that the brightness of the lamp during use can always be close to the expected brightness value, avoiding the problem of lamp brightness difference.

[0039] According to the method for controlling the brightness of a lamp of an embodiment of the present invention, the first gear position currently turned on by the lamp in use and the first brightness value are obtained; the first expected brightness value corresponding to the first gear position is determined from the configuration table; the mapping relationship between the gear position of the lamp and the expected brightness value is stored in the configuration table; based on the first brightness value and the first expected brightness value, the current currently input to the lamp is adjusted so that the brightness value of the lamp is close to the first expected brightness value. The present invention obtains the brightness value of the lamp in real time, compares it with the expected brightness value, and adjusts the current currently input to the lamp so that the brightness value of the lamp is close to the expected brightness value, thereby automatically controlling the brightness of the lamp during use and avoiding the problem of inconsistent brightness during use. In addition, since the present invention can control the brightness of the lamp during use, the calibration work after the lamp is produced can be eliminated, thereby reducing the cost of the calibration work.

[0040] Figure 2 The second flow chart of the method for controlling the brightness of a lamp provided by an embodiment of the present invention. Figure 2 As shown, based on the above embodiment, the implementation process of adjusting the current currently input to the lamp based on the difference may include the following steps.

[0041] Step 201, determining a current adjustment value according to the difference.

[0042] In some embodiments, a large number of experiments can be conducted in advance to record the difference between the actual brightness value and the expected brightness value, and the corresponding relationship between the current adjustment value. This corresponding relationship can be a relationship curve between the difference and the current adjustment value, or a correspondence table between the difference range and the current adjustment value. Based on this corresponding relationship, the current adjustment value corresponding to the current difference can be determined.

[0043] Step 202, adjusting the current currently input to the lamp based on the current adjustment value.

[0044] In some embodiments, the current currently input to the lamp can be adjusted by adjusting the circuit parameters. As an example, the current input to the lamp can be adjusted by adjusting the resistance of a digital potentiometer in the circuit where the lamp is located. Adjusting the current currently input to the lamp based on the current adjustment value may include: determining a resistance adjustment value of the digital potentiometer based on the current adjustment value; and adjusting the resistance of the digital potentiometer based on the resistance adjustment value to adjust the current currently input to the lamp.

[0045] According to the method for controlling the brightness of a lamp in an embodiment of the present invention, a current adjustment value is determined according to the difference; based on the current adjustment value, the current currently input to the lamp is adjusted. The brightness of the lamp can be efficiently controlled to the expected value through the current adjustment, thereby minimizing the impact of the brightness difference on actual use.

[0046] Figure 3 The third flow chart of the method for controlling the brightness of a lamp provided by an embodiment of the present invention. In some embodiments, the configuration table also stores the mapping relationship between the gear position of the lamp and the magnitude of the input current. For example, when the lamp is turned on, the configuration table can be directly configured to determine the magnitude of the current required to be input to the lamp for the currently turned-on gear position, and the corresponding magnitude of the input current is input to the lamp. Figure 3 As shown, the method may include the following steps.

[0047] Step 301, obtaining the first gear position and the first brightness value of the lamp currently in use.

[0048] Step 302: determine a first expected brightness value corresponding to a first gear from a configuration table; the configuration table stores a mapping relationship between the gears of the lamp and the expected brightness values.

[0049] Step 303: Based on the first brightness value and the first expected brightness value, adjust the current currently input to the lamp so that the brightness value of the lamp is close to the first expected brightness value.

[0050] Step 304: Update the corresponding relationship between the adjusted current and the first gear into the configuration table.

[0051] It is understandable that during the use of the lamp, the brightness difference caused by the attenuation trend is usually irreversible. Therefore, in order to improve the efficiency of lamp brightness control and enhance the user experience, the corresponding relationship between the magnitude of the current after each adjustment and the first gear can be updated to the configuration table. In other words, the corresponding relationship between the magnitude of the input current after the latest adjustment and the gear is stored in the configuration table.

[0052] As a possible implementation method, each time the current is adjusted, the current input current can be determined from the configuration table, and the current adjustment value can be determined based on the brightness difference, and the current adjustment can be achieved by adjusting the resistance of the digital position meter; based on the input current and the current adjustment value, the size of the adjusted input current can be determined, and the correspondence between the size of the adjusted current and the first gear can be updated in the configuration table.

[0053] In some embodiments, the following steps may be included before obtaining the first gear value and the first brightness value of the lamp currently in use.

[0054] Step S31, in response to the start-up operation corresponding to the first gear, determining the magnitude of the first input current corresponding to the first gear from the configuration table.

[0055] Since the configuration table stores the correspondence between the size of the most recently adjusted input current and the gear position, each time the lamp is turned on, the size of the input current of the current turning-on gear is determined based on the configuration table, so that the brightness of the lamp can reach the expected brightness when it is turned on. This not only ensures the consistency of brightness during the use of the lamp, but also avoids repeated current adjustment, thereby improving the efficiency of brightness control.

[0056] Step S32: inputting the first input current into the lamp according to the magnitude of the first input current.

[0057] In some embodiments, based on the magnitude of the first input current, the resistance of the digital potentiometer can be adjusted to a corresponding resistance value to obtain a first input current of a corresponding magnitude, and then input the first input current into the lamp.

[0058] In other embodiments, the corresponding relationship between the lamp gear and the resistance value of the digital potentiometer can be stored in the configuration table, that is, after each adjustment, the latest corresponding relationship between the lamp gear and the resistance value of the digital potentiometer is updated to the configuration table. When the lamp is turned on, the resistance value corresponding to the current on gear is directly determined from the configuration table, and the resistance of the digital potentiometer is adjusted to the resistance value, and the obtained first input current is input to the lamp. During the use of the lamp after it is turned on, the difference between the brightness value of the lamp and the expected brightness value can be monitored in real time, and the input current can be adjusted in time, so that the brightness of the lamp can be kept consistent during use.

[0059] According to the method for controlling the brightness of a lamp according to an embodiment of the present invention, after adjusting the current currently input to the lamp based on the first brightness value and the first expected brightness value, the corresponding relationship between the magnitude of the adjusted current and the first gear is updated in the configuration table, so that the configuration table contains the latest corresponding relationship between the magnitude of the current and the gear. In addition, the method also includes, in response to the start-up operation corresponding to the first gear, determining the magnitude of the first input current corresponding to the first gear from the configuration table; and inputting the first input current to the lamp according to the magnitude of the first input current. The present invention can ensure that when the lamp is turned on, a current of a corresponding magnitude is input to the lamp based on the latest adjusted current magnitude, so as to avoid the brightness difference when the lamp is turned on affecting normal use, and can also avoid repetitive current adjustment to improve the efficiency of brightness control.

[0060] In order to implement the above embodiment, the present invention also provides a device for controlling the brightness of a lamp.

[0061] Figure 4 This is a schematic diagram of the structure of a device for controlling the brightness of a lamp provided by an embodiment of the present invention. Figure 4 As shown, the device includes: an acquisition module 410, a first determination module 420 and an adjustment module 430. The acquisition module 410 is used to acquire the first gear position currently turned on by the lamp in use, and the first brightness value; the first determination module 420 is used to determine the first brightness expected value corresponding to the first gear position from the configuration table; the configuration table stores the mapping relationship between the gear position of the lamp and the brightness expected value; the adjustment module 430 is used to adjust the current currently input to the lamp based on the first brightness value and the first brightness expected value, so that the brightness value of the lamp is close to the first brightness expected value.

[0062] In some embodiments, the adjustment module 430 is specifically used to: if the difference between the first brightness value and the first expected brightness value is less than a threshold, keep the current input to the lamp unchanged; if the difference is greater than or equal to the threshold, adjust the current input to the lamp based on the difference.

[0063] In some embodiments, the adjustment module 430 is further used to: determine a current adjustment value according to the difference; and adjust the current currently input to the lamp based on the current adjustment value.

[0064] As a possible implementation, the adjustment module 430 is further used to: determine a resistance adjustment value of the digital potentiometer based on the current adjustment value; and adjust the resistance of the digital potentiometer based on the resistance adjustment value to adjust the current currently input to the lamp.

[0065] In some embodiments, the configuration table also stores a mapping relationship between the gear position of the lamp and the size of the input current; the device also includes an update module 440, which is used to: after adjusting the current currently input to the lamp based on the first brightness value and the first expected brightness value, update the corresponding relationship between the size of the adjusted current and the first gear position into the configuration table.

[0066] In some embodiments, the device further includes a second determination module 450. The second determination module 450 is used to: in response to the start-up operation corresponding to the first gear position, determine the magnitude of the first input current corresponding to the first gear position from the configuration table; and input the first input current to the lamp according to the magnitude of the first input current.

[0067] According to the control device for the brightness of a lamp according to the embodiment of the present invention, by acquiring the brightness value of the lamp in real time, comparing it with the expected brightness value, and adjusting the current currently input to the lamp, so that the brightness value of the lamp is close to the expected brightness value, the brightness of the lamp can be automatically controlled during the use of the lamp, thereby avoiding the problem of inconsistent brightness during the use of the lamp. In addition, since the present invention can control the brightness of the lamp during the use of the lamp, the calibration work after the lamp is produced can be eliminated, thereby reducing the cost of the calibration work.

[0068] It should be noted that the explanations in the above embodiments of the method for controlling the brightness of a lamp are also applicable to the device for controlling the brightness of a lamp in the embodiments of the present invention, and will not be described in detail here.

[0069] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call a computer program in the memory 530 to perform the steps of the method for controlling the brightness of a lamp.

[0070] For example, the method includes: obtaining the first gear position and the first brightness value currently turned on by the lamp in use; determining the first expected brightness value corresponding to the first gear position from a configuration table; the configuration table stores the mapping relationship between the gear position of the lamp and the expected brightness value; based on the first brightness value and the first expected brightness value, adjusting the current currently input to the lamp so that the brightness value of the lamp is close to the first expected brightness value.

[0071] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for 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, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0072] On the other hand, an embodiment of the present invention further provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the steps of the lamp brightness control method provided in the above embodiments.

[0073] The method includes: obtaining the first gear position and the first brightness value currently turned on by the lamp in use; determining the first expected brightness value corresponding to the first gear position from a configuration table; the configuration table stores the mapping relationship between the gear position of the lamp and the expected brightness value; based on the first brightness value and the first expected brightness value, adjusting the current currently input to the lamp so that the brightness value of the lamp is close to the first expected brightness value.

[0074] On the other hand, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, which stores a computer program, and the computer program is used to enable a processor to execute the steps of the lamp brightness control method provided in the above embodiments.

[0075] The method includes: obtaining the first gear position and the first brightness value currently turned on by the lamp in use; determining the first expected brightness value corresponding to the first gear position from a configuration table; the configuration table stores the mapping relationship between the gear position of the lamp and the expected brightness value; based on the first brightness value and the first expected brightness value, adjusting the current currently input to the lamp so that the brightness value of the lamp is close to the first expected brightness value.

[0076] The non-transitory computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drives (SSDs)), etc.

[0077] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0078] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for controlling the brightness of a lamp, characterized in that: include: Get the first gear position and the first brightness value of the lamp currently in use; Determine a first expected brightness value corresponding to the first gear position from a configuration table; The configuration table stores a mapping relationship between the gear position of the lamp and the expected brightness value; Based on the first brightness value and the first expected brightness value, the current currently input to the lamp is adjusted so that the brightness value of the lamp is close to the first expected brightness value.

2. The method according to claim 1, characterized in that The adjusting the current currently input to the lamp based on the first brightness value and the first expected brightness value includes: If the difference between the first brightness value and the first expected brightness value is less than a threshold, keeping the current currently input to the lamp unchanged; If the difference is greater than or equal to the threshold, the current currently input to the lamp is adjusted based on the difference.

3. The method according to claim 2, characterized in that The adjusting the current currently input to the lamp based on the difference includes: Determining a current adjustment value according to the difference; Based on the current adjustment value, the current currently input to the lamp is adjusted.

4. The method according to claim 3, characterized in that The adjusting the current currently input to the lamp based on the current adjustment value includes: Based on the current adjustment value, determining a resistance adjustment value of the digital potentiometer; Based on the resistance adjustment value, the resistance of the digital potentiometer is adjusted to adjust the current currently input to the lamp.

5. The method according to any one of claims 1 to 4, characterized in that The configuration table also stores a mapping relationship between the gear position of the lamp and the magnitude of the input current; After adjusting the current currently input to the lamp based on the first brightness value and the first expected brightness value, the method further includes: The corresponding relationship between the magnitude of the adjusted current and the first gear is updated in the configuration table.

6. The method according to claim 5, characterized in that Before obtaining the first gear value and the first brightness value of the lamp currently in use, the method further includes: In response to a start-up operation corresponding to the first gear position, determining a magnitude of a first input current corresponding to the first gear position from the configuration table; The first input current is input to the lamp according to the magnitude of the first input current.

7. A device for controlling the brightness of a lamp, characterized in that: include: An acquisition module, used to acquire the first gear position currently turned on by the lamp in use, and the first brightness value; A first determination module, configured to determine a first expected brightness value corresponding to the first gear position from a configuration table; the configuration table stores a mapping relationship between the gear position of the lamp and the expected brightness value; The adjustment module is used to adjust the current currently input to the lamp based on the first brightness value and the first expected brightness value, so that the brightness value of the lamp is close to the first expected brightness value.

8. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the method for controlling the brightness of a lamp according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for controlling the brightness of a lamp according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for controlling the brightness of a lamp according to any one of claims 1 to 6 is implemented.