Power distribution method, nonvolatile storage medium, computer equipment and lamp

By using a dynamic power allocation method, the problem of large size of lamps after integrating charging function is solved, realizing the sharing of charging and lighting functions, reducing the space occupied by the power supply and improving energy utilization efficiency and user experience.

CN118944242APending Publication Date: 2024-11-12NINGBO GONEO PHOTOELECTRIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411047371.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

The existing lighting fixtures have problems with large size and high cost after integrating charging functions.

Method used

By obtaining the rated power of the predetermined power supply, the operating status of the charging module and the lighting module is determined, and dynamic power allocation is performed according to the rated power to achieve the sharing of charging and lighting functions.

Benefits of technology

It reduces the space occupied by the power supply inside the lamp, solves the problem of large size caused by the charging function, and improves energy efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118944242A_ABST
    Figure CN118944242A_ABST
Patent Text Reader

Abstract

The invention discloses a power distribution method, a nonvolatile storage medium, computer equipment and a lamp. The method comprises the steps that rated power of a preset power source is obtained, the preset power source is used for providing electric energy for a charging module and an illumination module, and the charging module can be connected with external equipment so that the preset power source can supply power to the external equipment; determining respective operation states of the charging module and the lighting module; and performing power distribution on the charging module and the lighting module according to the respective operation states of the charging module and the lighting module and the rated power of the preset power supply. The technical problem that a lamp capable of achieving the charging function is large in size in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of furniture technology, and in particular to a power distribution method, a non-volatile storage medium, a computer device and a lamp. Background Art

[0002] A lamp is a lighting tool that is used to concentrate light in a small area to facilitate work and study. With the development of technology and people's diversified demands for the functions of lamps, lamps have also added many other functions, such as: charging function for electronic devices, brightness adjustment function, etc.

[0003] Although existing lamps can provide a charging function for electronic devices, the internal design is simply to integrate another set of charging devices that are almost completely unrelated to the lighting structure into the lamp, resulting in a large size and high cost of the lamp.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a power distribution method, a non-volatile storage medium, a computer device and a lamp, so as to at least solve the technical problem in the related art that the lamp capable of realizing the charging function has a large size.

[0006] According to one aspect of an embodiment of the present invention, there is provided a power allocation method, comprising: obtaining the rated power of a predetermined power source, wherein the predetermined power source is used to provide electrical energy to a charging module and a lighting module, and the charging module can be connected to an external device so that the predetermined power source supplies power to the external device; determining the respective operating states of the charging module and the lighting module; and according to the respective operating states of the charging module and the lighting module, allocating power to the charging module and the lighting module according to the rated power of the predetermined power source.

[0007] Optionally, the rated power of the predetermined power source is the sum of the rated power of the charging module and the rated power of the lighting module, wherein the brightness of the lighting module is adjustable, and the rated power of the lighting module is the power required when operating at maximum adjustable brightness.

[0008] Optionally, power is allocated to the charging module and the lighting module according to the rated power of a predetermined power supply according to their respective operating states, including: when the charging module is running, allocating corresponding operating power to the charging module according to the rated power of the charging module; when the lighting module is running, obtaining a brightness adjustment signal emitted by the lighting module; and allocating corresponding operating power to the lighting module according to the brightness adjustment signal.

[0009] Optionally, the rated power of the predetermined power supply is less than the sum of the rated power of the charging module and the rated power of the lighting module, and is greater than the rated power of either the charging module or the lighting module, wherein the brightness of the lighting module is adjustable, and the rated power of the lighting module is the power required when operating at maximum adjustable brightness.

[0010] Optionally, power is allocated to the charging module and the lighting module according to the rated power of a predetermined power supply according to their respective operating states, including: when both the charging module and the lighting module are running, obtaining the respective priorities of the charging module and the lighting module; allocating corresponding operating power to the modules with higher priority according to the required power of the modules with higher priority; and allocating corresponding operating power to the modules with lower priority according to the difference between the rated power of a predetermined power supply and the required power of the modules with higher priority.

[0011] Optionally, the method also includes: when the priority of the lighting module is higher than the priority of the charging module, obtaining a brightness adjustment signal issued by the lighting module; determining the adjustment power required by the lighting module based on the brightness adjustment signal issued by the lighting module; and reallocating the rated power of the predetermined power supply based on the adjustment power required by the lighting module.

[0012] Optionally, the method also includes: when the priority of the lighting module is lower than that of the charging module, determining the difference between the rated power of the predetermined power source and the required power of the module with a higher priority, to obtain an upper limit value of the operating power of the lighting module; and allocating operating power to the lighting module based on the upper limit value of the operating power of the lighting module.

[0013] According to another aspect of an embodiment of the present invention, a lamp is also provided, including: a predetermined power supply, a charging module, a lighting module and a controller, wherein the predetermined power supply is connected to the charging module, the lighting module and the controller, and is used to provide power to the charging module and the lighting module; the charging module can be connected to an external device through an interface, and is used to charge the external device; the luminous brightness of the lighting module is adjustable; the controller is connected to the charging module, the lighting module and the predetermined power supply, and is used to execute any one of the above-mentioned power distribution methods; wherein the lighting module and the charging module are connected in parallel to the predetermined power supply.

[0014] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided. The non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute any one of the above power allocation methods.

[0015] According to another aspect of the embodiments of the present invention, a computer device is provided. The computer device includes a processor, and the processor is used to run a program. When the program is run, any one of the above power allocation methods is executed.

[0016] According to another aspect of the embodiments of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, any one of the above power allocation methods is implemented.

[0017] In an embodiment of the present invention, by obtaining the rated power of a predetermined power source, wherein the predetermined power source is used to provide electrical energy to a charging module and a lighting module, the charging module can be connected to an external device so that the predetermined power source supplies power to the external device; determining the respective operating states of the charging module and the lighting module; and allocating power to the charging module and the lighting module according to the respective operating states of the charging module and the lighting module according to the rated power of the predetermined power source, thereby achieving the purpose of using the same power source to realize the charging and lighting functions, thereby achieving the technical effect of reducing the space occupied by the power source inside the lamp, and further solving the technical problem of the large size of the lamp body that can realize the charging function in the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0019] Figure 1 A hardware structure block diagram of a computer terminal for implementing a power distribution method is shown;

[0020] Figure 2 is a schematic diagram of a flow chart of a power allocation method provided according to an embodiment of the present invention;

[0021] Figure 3 is a schematic diagram of the structure of a lamp provided according to an embodiment of the present invention;

[0022] Figure 4 is a circuit diagram provided according to an optional embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 should fall within the scope of protection of the present invention.

[0024] It should be noted that the terms "first", "second", etc. 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 interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "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.

[0025] According to an embodiment of the present invention, a method embodiment of power distribution is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0026] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a power distribution method. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0027] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0028] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the power allocation method in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the power allocation method of the above-mentioned application is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0029] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .

[0030] Figure 2 is a flow chart of a power allocation method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:

[0031] Step S202, obtaining the rated power of a predetermined power source, wherein the predetermined power source is used to provide power to a charging module and a lighting module, and the charging module can be connected to an external device so that the predetermined power source supplies power to the external device.

[0032] In this step, the rated power of the predetermined power source needs to be determined first, that is, the maximum power output that can be provided to the charging module and the lighting module. This rated power will serve as a basis for power allocation. The charging module can be a USB charging module, and the lighting module can be an LED lighting module.

[0033] Step S204, determining the respective operating states of the charging module and the lighting module.

[0034] In this step, the operating status of the charging module and the lighting module, that is, whether the charging module and the lighting module are working, for example, the charging module may be charging an external device, and the lighting module may be providing a lighting function. Further, the output power and the required power of each may also be included.

[0035] Step S206: distribute power to the charging module and the lighting module according to their respective operating states and the rated power of the predetermined power source.

[0036] In this step, reasonable power allocation can be performed according to the power requirements of the charging module and the lighting module and the rated power of the predetermined power source. If only the charging module is working, power can be allocated only to the charging module; if only the lighting module is working, power can be allocated only to the lighting module; if both the charging module and the lighting module are working, and the power requirements of the charging module and the lighting module exceed the rated power of the predetermined power source, the power allocation can be dynamically adjusted to ensure that both can work normally.

[0037] Through the above steps, the purpose of using the same power supply to realize charging and lighting functions can be achieved, thereby achieving the technical effect of reducing the space occupied by the power supply inside the lamp, and further solving the technical problem of large size of the lamp body that can realize the charging function in the related technology.

[0038] As an optional embodiment, the rated power of the predetermined power supply is the sum of the rated power of the charging module and the rated power of the lighting module, wherein the brightness of the lighting module is adjustable, and the rated power of the lighting module is the power required when operating at the maximum adjustable brightness.

[0039] Optionally, the rated power of the predetermined power source is allocated to the charging module and the lighting module to ensure that both can operate normally. The charging module can be connected to an external device to provide power to the external device, while the brightness of the lighting module is adjustable and can be adjusted as needed. The rated power of the lighting module represents the power required when operating at the maximum adjustable brightness.

[0040] The rated power of the predetermined power source can be flexibly set. In this optional embodiment, the rated power of the predetermined power source can be set to be the sum of the rated power of the charging module and the rated power of the lighting module, which can maximize the normal operation of the charging module and the lighting module. For example, the rated power of the USB charging module is 30 watts, and the rated power of the LED lighting module is 50 watts. At this time, a predetermined power source with a rated power of 80 watts can be selected.

[0041] As an optional embodiment, power is allocated to the charging module and the lighting module according to their respective operating states and the rated power of a predetermined power supply, including: when the charging module is running, allocating corresponding operating power to the charging module according to the rated power of the charging module; when the lighting module is running, obtaining a brightness adjustment signal emitted by the lighting module; and allocating corresponding operating power to the lighting module according to the brightness adjustment signal.

[0042] Optionally, under the premise of the previous optional embodiment, that is, when the rated power of the predetermined power source is the sum of the rated power of the charging module and the rated power of the lighting module, if the charging module is operating normally, then the power can be directly allocated to the charging module according to the rated power of the charging module; if the lighting module is operating normally, the brightness adjustment signal sent by the lighting module can be obtained, and the corresponding operating power can be allocated to the lighting module according to the brightness adjustment signal to achieve the user's demand for adjusting the lighting intensity. This dynamic power allocation method can adjust the power of the lighting module according to the actual lighting needs, thereby improving energy efficiency and user experience.

[0043] Because the rated power of the predetermined power source is the sum of the rated power of the charging module and the rated power of the lighting module, the rated power of the predetermined unit can fully meet the needs of the two modules, so in the power allocation process, the power allocation for the charging module and the lighting module can be considered separately, without considering the charging module and the lighting module comprehensively for power allocation. For example, the rated power of the predetermined power source is 80 watts, the rated power of the USB charging module is 30 watts, and the rated power of the LED lighting module is 50 watts. At this time, 30W can be directly allocated to the USB charging module, and then the power allocated to the LED lighting module can be flexibly adjusted according to the needs of the LED lighting module, with a maximum of 50 watts.

[0044] As an optional embodiment, the rated power of the predetermined power supply is less than the sum of the rated power of the charging module and the rated power of the lighting module, and is greater than the rated power of either the charging module or the lighting module, wherein the brightness of the lighting module is adjustable, and the rated power of the lighting module is the power required when operating at maximum adjustable brightness.

[0045] Optionally, the rated power of the predetermined power source can also be set to a moderate value, which is less than the sum of the rated power of the charging module and the rated power of the lighting module, and greater than the rated power of any one of the charging module and the lighting module. This setting can ensure that both the charging module and the lighting module can obtain sufficient power supply, while avoiding the situation where the power of the predetermined power source is too large and causes waste. For example, the rated power of the USB charging module is 30 watts, and the rated power of the LED lighting module is 50 watts. At this time, a predetermined power source with a rated power greater than 30 watts and less than 80 watts can be selected.

[0046] As an optional embodiment, power is allocated to the charging module and the lighting module according to the rated power of a predetermined power source according to their respective operating states, including: when both the charging module and the lighting module are running, obtaining the respective priorities of the charging module and the lighting module; allocating corresponding operating power to the modules with higher priority according to the required power of the modules with higher priority; and allocating corresponding operating power to the modules with lower priority according to the difference between the rated power of a predetermined power source and the required power of the modules with higher priority.

[0047] Optionally, under the premise of the previous optional embodiment, the brightness of the lighting module is adjustable, and the power of the charging module and the lighting module can be flexibly allocated according to the required power of the lighting module to ensure that both can operate normally and make the total allocated power as close to the rated power as possible.

[0048] Specifically, the priorities of the charging module and the lighting module can be set. For example, the priority of the charging module can be set higher, and the priority of the lighting module can be set higher. It can also be set to determine the priority according to the order in which the modules are started, that is, whichever module is started first has a higher priority. Then, power can be allocated to the two modules according to the priority. Power can be allocated first for the power required by the module with a higher priority, and then the unallocated power in the rated power can be allocated to the module with a lower priority.

[0049] Through this configuration, it is possible to meet the requirements of both charging and lighting functions under a limited predetermined power supply. The adjustable brightness function of the lighting module can improve the flexibility and applicability of the lamp while saving energy. This embodiment can effectively balance power distribution, improve system efficiency and performance, and enhance user experience.

[0050] As an optional embodiment, the method also includes: when the priority of the lighting module is higher than the priority of the charging module, obtaining a brightness adjustment signal emitted by the lighting module; determining the adjustment power required by the lighting module based on the brightness adjustment signal emitted by the lighting module; and reallocating the rated power of the predetermined power supply based on the adjustment power required by the lighting module.

[0051] Optionally, if the priority of the lighting module is higher than that of the charging module, the needs of the lighting module will be considered first, and power will be allocated to the lighting module, and the remaining unallocated power will be allocated to the charging module. In addition, the brightness adjustment signal sent by the lighting module can be detected in real time. If it is found that the required power of the lighting module has changed, the adjustment power required by the lighting module can be determined, and then the rated power of the predetermined power source can be re-allocated.

[0052] For example, the rated power of the predetermined power supply is 60 watts, the rated power of the USB charging module is 30 watts, and the rated power of the LED lighting module is 50 watts. The priority of the LED lighting module is higher than that of the USB charging module. The needs of the LED lighting module can be considered first, and 40 watts of power can be allocated to it, and then the remaining 20 watts of power can be allocated to the USB charging module; and the brightness adjustment signal of the LED lighting module can be detected in real time. If the brightness adjustment signal indicates that 5 watts of power is needed to achieve a higher brightness, the power of the USB charging module can be reduced and the allocated power of the LED lighting module can be increased; if the brightness adjustment signal indicates that 5 watts of power needs to be reduced to achieve a lower brightness, the power of the LED charging module can be reduced and the allocated power of the USB charging module can be increased.

[0053] As an optional embodiment, the method also includes: when the priority of the lighting module is lower than the priority of the charging module, determining the difference between the rated power of the predetermined power source and the required power of the module with a higher priority, to obtain an upper limit value of the operating power of the lighting module; and allocating operating power to the lighting module based on the upper limit value of the operating power of the lighting module.

[0054] Optionally, if the priority of the lighting module is lower than that of the charging module, the needs of the charging module will be considered first, and power will be allocated to the charging module, and the remaining unallocated power will be allocated to the lighting module. Of course, the brightness adjustment signal sent by the lighting module can also be detected in real time. If it is found that the required power of the lighting module has changed, the adjustment power required by the lighting module can be determined, but the upper limit of the power allocated to the lighting module needs to be determined, and the allocated power of the lighting module is adjusted within the range limited by the upper limit.

[0055] For example, the rated power of the predetermined power supply is 60 watts, the rated power of the USB charging module is 30 watts, and the rated power of the LED lighting module is 50 watts. The priority of the LED lighting module is lower than that of the USB charging module. The demand of the USB charging module can be considered first, and 30 watts of power can be allocated to it, and then the remaining 30 watts of power can be allocated to the LED lighting module; the brightness adjustment signal of the LED lighting module can be detected in real time, and the allocated power of the LED lighting module can be adjusted, but it can only be adjusted within 0-30 watts, and the power allocated to the LED lighting module cannot be increased.

[0056] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.

[0057] Through the description of the above implementation methods, those skilled in the art can clearly understand that the power allocation method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0058] According to an embodiment of the present invention, a lamp for implementing the above power distribution method is also provided. Figure 3 is a schematic diagram of the structure of a lamp provided according to an embodiment of the present invention. Figure 3 As shown, the lamp includes: a predetermined power source 31, a charging module 32, a lighting module 33 and a controller 34. The lamp is described below.

[0059] The predetermined power source 31 is connected to the charging module, the lighting module and the controller, and is used to provide power to the charging module and the lighting module.

[0060] The charging module 32 can be connected to an external device through an interface to charge the external device.

[0061] The light brightness of the lighting module 33 is adjustable.

[0062] The controller 34 is connected to the charging module, the lighting module and the predetermined power source, and is used to execute any one of the above power distribution methods.

[0063] The lighting module and the charging module are connected in parallel to a predetermined power source.

[0064] The predetermined power source refers to a specific power supply device used to provide power to the charging module and the lighting module, and the specific rated power can be preset. The charging module can be connected to an external device through an interface to charge the external device. The light brightness of the lighting module can be adjusted, and the user can adjust the lighting intensity as needed. The controller is connected to the charging module, the lighting module and the predetermined power source, and is used to execute any of the above-mentioned power allocation methods and allocate power according to the operating status and requirements of the charging module and the lighting module.

[0065] Figure 4 is a circuit diagram provided according to an optional embodiment of the present invention, such as Figure 4The figure shows the circuit diagram inside the lamp provided by the present invention, which can realize any of the above power distribution methods. The overall circuit is composed of four major circuits: a constant voltage power supply circuit (predetermined power supply), an LED drive circuit and an LED (lighting module), an MCU control circuit and a function button or touch point (controller), and a USB charging protocol circuit and a charging interface (charging module).

[0066] Among them, the constant voltage power supply circuit is composed of an AC input rectifier filter circuit, a switching power supply circuit, an isolation transformer, and an output rectifier filter circuit, and outputs a constant voltage to provide voltage and current for the subsequent module. The LED driver power supply circuit is powered by the previous constant voltage power supply and adopts a switching power supply constant current circuit to provide a constant current for the LED. Its switching and dimming functions are controlled by the MCU control circuit to output a PWM signal to the LED driver circuit. When the PWM signal is at a low level, the LED is turned off, and when the PWM signal is at a high level, the LED is turned on. By changing the duty cycle of the PWM signal, the LED can be dimmed. In addition, these functions can also be triggered by function buttons and touch points, such as switch buttons and dimming buttons, that is, the MCU chip in the figure can receive touch signals. The USB charging protocol circuit includes a USB charging protocol IC, which can set three gears: fast charge 1, fast charge 2, and slow charge. Taking 30-watt fast charge as an example, fast charge 1 is 30 watts, fast charge 2 is 22 watts, and slow charge is 10 watts. The MCU control circuit is connected to the LED drive circuit and the USB charging protocol circuit to realize bidirectional transmission control. It can detect and identify the working status of the LED drive circuit and the USB charging circuit, so that the LED lighting module and the USB charging module share a constant voltage power supply and realize intelligent power distribution.

[0067] When the USB charging circuit is running alone, the USB charging circuit works at maximum power, and the 4th pin of the USB charging protocol IC outputs an electrical signal (USB control signal) to the 8th pin of the MCU, informing the controller that the USB charging circuit is working. At this time, if the LED switch button is pressed or touched, the 5th pin of the MCU detects the light-on signal, and the 8th pin of the MCU will output an electrical signal to the 4th pin of the USB charging protocol IC, informing the USB charging circuit that the LED light is working, and the USB charging protocol circuit will immediately charge according to the current minus the LED working current. At the same time, the 7th pin of the MCU outputs an electrical signal to the 2nd pin of the LED driver IC, starting the IC to work, output drive current to the LED, and make the LED light up and work.

[0068] Similarly, when the LED switch button is pressed or touched, the MCU's 5th pin detects the light-on signal (touch signal), and the 7th pin outputs an electrical signal (PWM signal) to the 2nd pin of the LED driver IC, which starts the IC and outputs a drive current to the LED to light up the LED. At the same time, the MCU's 8th pin outputs an electrical signal to the 4th pin of the USB charging protocol IC to inform the USB charging circuit that the LED light is already working. If USB charging is required, charge at the current minus the LED working current.

[0069] When USB charging and LED lighting are working at the same time, the MCU detects and controls the power of the LED in real time through the duty cycle signal of pin 7; the USB protocol IC pin 4 transmits a signal to the MCU pin 8 in real time to inform the USB of the current charging power level. When the LED is dimmed and the power is reduced, if the current USB charging power limit is less than the maximum power, it can be allocated to the USB until the charging power reaches the maximum.

[0070] It should be noted that the above modules as part of the device can be run in the computer terminal 10 provided in the embodiment.

[0071] An embodiment of the present invention may provide a computer device. Optionally, in this embodiment, the computer device may be located in at least one network device among multiple network devices of a computer network. The computer device includes a memory and a processor.

[0072] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the power allocation method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned power allocation method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0073] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: obtain the rated power of a predetermined power source, wherein the predetermined power source is used to provide power to the charging module and the lighting module, and the charging module can be connected to an external device so that the predetermined power source powers the external device; determine the respective operating states of the charging module and the lighting module; and allocate power to the charging module and the lighting module according to the rated power of the predetermined power source based on the respective operating states of the charging module and the lighting module.

[0074] Optionally, the rated power of the predetermined power source is the sum of the rated power of the charging module and the rated power of the lighting module, wherein the brightness of the lighting module is adjustable, and the rated power of the lighting module is the power required when operating at maximum adjustable brightness.

[0075] Optionally, power is allocated to the charging module and the lighting module according to the rated power of a predetermined power supply according to their respective operating states, including: when the charging module is running, allocating corresponding operating power to the charging module according to the rated power of the charging module; when the lighting module is running, obtaining a brightness adjustment signal emitted by the lighting module; and allocating corresponding operating power to the lighting module according to the brightness adjustment signal.

[0076] Optionally, the rated power of the predetermined power supply is less than the sum of the rated power of the charging module and the rated power of the lighting module, and is greater than the rated power of either the charging module or the lighting module, wherein the brightness of the lighting module is adjustable, and the rated power of the lighting module is the power required when operating at maximum adjustable brightness.

[0077] Optionally, power is allocated to the charging module and the lighting module according to the rated power of a predetermined power supply according to their respective operating states, including: when both the charging module and the lighting module are running, obtaining the respective priorities of the charging module and the lighting module; allocating corresponding operating power to the modules with higher priority according to the required power of the modules with higher priority; and allocating corresponding operating power to the modules with lower priority according to the difference between the rated power of a predetermined power supply and the required power of the modules with higher priority.

[0078] Optionally, the method also includes: when the priority of the lighting module is higher than the priority of the charging module, obtaining a brightness adjustment signal issued by the lighting module; determining the adjustment power required by the lighting module based on the brightness adjustment signal issued by the lighting module; and reallocating the rated power of the predetermined power supply based on the adjustment power required by the lighting module.

[0079] Optionally, the method also includes: when the priority of the lighting module is lower than that of the charging module, determining the difference between the rated power of the predetermined power source and the required power of the module with a higher priority, to obtain an upper limit value of the operating power of the lighting module; and allocating operating power to the lighting module based on the upper limit value of the operating power of the lighting module.

[0080] According to the embodiment of the present invention, a power distribution scheme is provided. By obtaining the rated power of a predetermined power source, wherein the predetermined power source is used to provide electric energy for a charging module and a lighting module, and the charging module can be connected to an external device, so that the predetermined power source supplies power to the external device; determining the respective operating states of the charging module and the lighting module; and distributing power to the charging module and the lighting module according to the respective operating states of the charging module and the lighting module and the rated power of the predetermined power source, the purpose of using the same power source to realize the charging and lighting functions is achieved, thereby achieving the technical effect of reducing the space occupied by the power source inside the lamp, and further solving the technical problem of the large volume of the lamp body that can realize the charging function in the related art.

[0081] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a non-volatile storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0082] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the power allocation method provided in the above embodiment.

[0083] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0084] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining the rated power of a predetermined power source, wherein the predetermined power source is used to provide electrical energy to a charging module and a lighting module, and the charging module can be connected to an external device so that the predetermined power source supplies power to the external device; determining the respective operating states of the charging module and the lighting module; and allocating power to the charging module and the lighting module according to the rated power of the predetermined power source based on the respective operating states of the charging module and the lighting module.

[0085] Optionally, the rated power of the predetermined power source is the sum of the rated power of the charging module and the rated power of the lighting module, wherein the brightness of the lighting module is adjustable, and the rated power of the lighting module is the power required when operating at maximum adjustable brightness.

[0086] Optionally, power is allocated to the charging module and the lighting module according to the rated power of a predetermined power supply according to their respective operating states, including: when the charging module is running, allocating corresponding operating power to the charging module according to the rated power of the charging module; when the lighting module is running, obtaining a brightness adjustment signal emitted by the lighting module; and allocating corresponding operating power to the lighting module according to the brightness adjustment signal.

[0087] Optionally, the rated power of the predetermined power supply is less than the sum of the rated power of the charging module and the rated power of the lighting module, and is greater than the rated power of either the charging module or the lighting module, wherein the brightness of the lighting module is adjustable, and the rated power of the lighting module is the power required when operating at maximum adjustable brightness.

[0088] Optionally, power is allocated to the charging module and the lighting module according to the rated power of a predetermined power supply according to their respective operating states, including: when both the charging module and the lighting module are running, obtaining the respective priorities of the charging module and the lighting module; allocating corresponding operating power to the modules with higher priority according to the required power of the modules with higher priority; and allocating corresponding operating power to the modules with lower priority according to the difference between the rated power of a predetermined power supply and the required power of the modules with higher priority.

[0089] Optionally, the method also includes: when the priority of the lighting module is higher than the priority of the charging module, obtaining a brightness adjustment signal issued by the lighting module; determining the adjustment power required by the lighting module based on the brightness adjustment signal issued by the lighting module; and reallocating the rated power of the predetermined power supply based on the adjustment power required by the lighting module.

[0090] Optionally, the method also includes: when the priority of the lighting module is lower than that of the charging module, determining the difference between the rated power of the predetermined power source and the required power of the module with a higher priority, to obtain an upper limit value of the operating power of the lighting module; and allocating operating power to the lighting module based on the upper limit value of the operating power of the lighting module.

[0091] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the steps of the power allocation method in each embodiment of the present application when the computer program is executed by a processor.

[0092] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0093] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0094] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0095] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0096] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0097] 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 non-volatile storage medium. Based on this understanding, the technical solution of the present invention, 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, server or 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, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0098] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A power distribution method, characterized in that: include: Acquiring a rated power of a predetermined power source, wherein the predetermined power source is used to provide power to a charging module and a lighting module, and the charging module can be connected to an external device so that the predetermined power source supplies power to the external device; Determining respective operating states of the charging module and the lighting module; According to the respective operating states of the charging module and the lighting module, power is allocated to the charging module and the lighting module according to the rated power of the predetermined power source.

2. The method according to claim 1, characterized in that The rated power of the predetermined power source is the sum of the rated power of the charging module and the rated power of the lighting module, wherein the brightness of the lighting module is adjustable, and the rated power of the lighting module is the power required when operating at the maximum adjustable brightness.

3. The method according to claim 2, characterized in that The method of allocating power to the charging module and the lighting module according to the rated power of the predetermined power source according to the respective operating states of the charging module and the lighting module comprises: When the charging module is running, allocating corresponding operating power to the charging module according to the rated power of the charging module; When the lighting module is running, a brightness adjustment signal sent by the lighting module is obtained; and corresponding operating power is allocated to the lighting module according to the brightness adjustment signal.

4. The method according to claim 1, characterized in that The rated power of the predetermined power supply is less than the sum of the rated power of the charging module and the rated power of the lighting module, and is greater than the rated power of any one of the charging module and the lighting module, wherein the brightness of the lighting module is adjustable, and the rated power of the lighting module is the power required when operating at the maximum adjustable brightness.

5. The method according to claim 4, characterized in that The method of allocating power to the charging module and the lighting module according to the rated power of the predetermined power source according to the respective operating states of the charging module and the lighting module comprises: When both the charging module and the lighting module are in operation, Obtaining respective priorities of the charging module and the lighting module; According to the power required by the module with higher priority, the corresponding operating power is allocated to the module with higher priority; According to the difference between the rated power of the predetermined power source and the required power of the module with a higher priority, the corresponding operating power is allocated to the module with a lower priority.

6. The method according to claim 5, characterized in that Also includes: In the case where the priority of the lighting module is higher than the priority of the charging module, Acquiring a brightness adjustment signal emitted by the lighting module; Determining the adjustment power required by the lighting module according to the brightness adjustment signal sent by the lighting module; The rated power of the predetermined power source is reallocated according to the adjustment power required by the lighting module.

7. The method according to claim 5, characterized in that Also includes: In the case where the priority of the lighting module is lower than the priority of the charging module, Determine the difference between the rated power of the predetermined power source and the required power of the module with a higher priority, and obtain an upper limit value of the operating power of the lighting module; Based on the upper limit value of the operating power of the lighting module, the operating power is allocated to the lighting module.

8. A lamp, characterized in that: include: A predetermined power source, a charging module, a lighting module and a controller, wherein the predetermined power source is connected to the charging module, the lighting module and the controller to provide power to the charging module and the lighting module; The charging module can be connected to an external device through an interface, and is used to charge the external device; The luminous brightness of the lighting module is adjustable; The controller is connected to the charging module, the lighting module and the predetermined power source, and is used to execute the power distribution method according to any one of claims 1 to 7; Wherein, the lighting module and the charging module are connected in parallel to the predetermined power supply.

9. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute the power allocation method according to any one of claims 1 to 7.

10. A computer device, characterized in that: include: Memory and processor, The memory stores a computer program; The processor is used to execute the computer program stored in the memory, and when the computer program is run, the processor executes the power allocation method according to any one of claims 1 to 7.

11. A computer program product comprising computer instructions, characterized in that: The computer instructions are executed by a processor to execute the power allocation method according to any one of claims 1 to 7.