RGB lamp control method and system

By collecting environmental and user data on mobile terminals, calculating the impact factor and weight coefficients, and generating PWM control signals, the problem that existing RGB lamp control methods are difficult to provide refined and intelligent adjustments is solved, and efficient and personalized RGB lamp control effects are achieved.

CN119562402AActive Publication Date: 2025-03-04WINNERS GROUP IND CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411620747.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-03-04
Estimated Expiration
2044-11-13

Smart Images

  • Figure CN119562402A_ABST
    Figure CN119562402A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of model construction, and provides an RGB lamp control method and system, and the method comprises the steps: collecting the environment illumination intensity, current time and geographic position coordinates of an RGB lamp, and obtaining the use habit data of a user; determining an environment illumination influence factor according to the environment illumination intensity and time; determining a user habit weight coefficient according to the user use habit data and time; determining a basic value of an RGB component according to the environment illumination influence factor, the user habit weight coefficient and the geographic position coordinate; determining a comprehensive dimming coefficient according to the environment illumination influence factor and the user habit weight coefficient, and determining an RGB final output value of the RGB lamp according to the comprehensive dimming coefficient; and converting the RGB final output value into a PWM control signal and sending the PWM control signal to a controller, and controlling on-off and color adjustment of the RGB lamp through the controller. According to the invention, the efficiency, accuracy and flexibility of RGB lamp control can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of lighting control, and in particular to a control method, system and electronic equipment for an RGB lamp. Background Art

[0002] Nowadays, the control of RGB lights is usually achieved through a simple switch and color adjustment system, using a basic PWM (pulse width modulation) control circuit to adjust the brightness of each color to achieve the effect of color mixing.

[0003] However, when users manually select colors and modes, it is often difficult to intuitively adjust the ideal color effect, especially in scenes with high light source requirements. The existing control methods lack refined adjustment functions. In addition, many RGB lights fail to take into account user usage habits and the adaptability of actual scenes. They lack intelligent adjustment and are difficult to provide an automated and scene-adaptive lighting experience. Summary of the invention

[0004] The present invention aims at the technical problems existing in the prior art and provides a control method, system and electronic device for RGB lamps which can improve the efficiency, accuracy and flexibility of controlling RGB lamps.

[0005] The technical solution of the present invention to solve the above technical problems is as follows:

[0006] The present invention provides a method for controlling an RGB lamp, the method comprising:

[0007] The light sensor of the mobile terminal collects the ambient light intensity of the RGB lamp, the current time and the geographical location coordinates, and obtains the user usage habit data of the user using the RGB lamp;

[0008] Determining an ambient light impact factor of the RGB lamp according to the ambient light intensity and the time;

[0009] Determining a user habit weight coefficient of the RGB light according to the user usage habit data and the time;

[0010] Determine the basic value of the RGB component of the RGB lamp according to the ambient light influence factor, the user habit weight coefficient, and the geographical location coordinates;

[0011] Determine a comprehensive dimming coefficient for the RGB lamp according to the ambient light influencing factor and the user habit weight coefficient, and determine a final RGB output value of the RGB lamp according to the comprehensive dimming coefficient;

[0012] The final RGB output value is converted into a PWM control signal and sent to a controller, and the controller is used to control the switching and color adjustment of the RGB lamp.

[0013] Further, determining the ambient light impact factor of the RGB lamp according to the ambient light intensity and the time includes:

[0014] Obtaining a first adjustment coefficient, a second adjustment coefficient, and a third adjustment coefficient that affect the ambient light intensity;

[0015] The ambient light intensity is adjusted according to the first adjustment coefficient, the second adjustment coefficient, and the third adjustment coefficient to determine the ambient light influence factor of the RGB lamp.

[0016] Furthermore, determining the user habit weight coefficient of the RGB lamp according to the user usage habit data and the time includes:

[0017] Determining a basic weight value corresponding to the user usage habit data according to the user's usage habit of the RGB lamp;

[0018] A user habit weight coefficient of the RGB lamp is determined according to the user usage habit data and the basic weight value.

[0019] Furthermore, determining a comprehensive dimming coefficient for the RGB lamp according to the ambient light influencing factor and the user habit weight coefficient includes:

[0020] Obtain the standard light intensity of the environment where the RGB light is located;

[0021] Determining a first dimming coefficient according to the ambient light intensity and the standard light intensity;

[0022] A comprehensive dimming coefficient for the RGB lamp is determined according to the first dimming coefficient, the ambient light impact factor and the user habit weight coefficient.

[0023] Further, determining the final RGB output value of the RGB lamp according to the comprehensive dimming coefficient includes:

[0024] Get the red component, green component and blue component in the basic value of the RGB component;

[0025] Obtaining an initial red value, an initial green value, and an initial blue value of the RGB component;

[0026] Acquire a normalization coefficient for adjusting the initial red value, an attenuation coefficient for adjusting the initial green value, and a diffusion coefficient for adjusting the initial blue value;

[0027] The RGB final output value of the RGB lamp is determined according to the red component, green component and blue component in the basic value of the RGB component, the initial red value, initial green value and initial blue value of the RGB component, the ambient lighting influence factor, the user habit weight coefficient, and the standardization coefficient, the attenuation coefficient and the diffusion coefficient.

[0028] Furthermore, the user usage habit data includes: user's color preference data, light usage period data and light intensity preference data.

[0029] The present invention also provides a control system for an RGB lamp, the system comprising:

[0030] A data acquisition module, used to collect the ambient light intensity of the RGB lamp, the current time and the geographical location coordinates through the light sensor of the mobile terminal, and obtain the user usage habit data of the user using the RGB lamp;

[0031] A factor determination module, used to determine the ambient light impact factor of the RGB lamp according to the ambient light intensity and the time;

[0032] A weight determination module, used to determine a user habit weight coefficient of the RGB lamp according to the user usage habit data and the time;

[0033] A basic value module, used to determine the basic value of the RGB component of the RGB lamp according to the ambient light influencing factor, the user habit weight coefficient, and the geographical location coordinates;

[0034] An output value module, used to determine a comprehensive dimming coefficient for the RGB lamp according to the ambient light influencing factor and the user habit weight coefficient, and determine a final RGB output value of the RGB lamp according to the comprehensive dimming coefficient;

[0035] The light adjustment module is used to convert the final RGB output value into a PWM control signal and send it to the controller, so as to control the switching and color adjustment of the RGB lamp through the controller.

[0036] Furthermore, the system further comprises:

[0037] Mobile terminal, used to collect environmental data, user data and calculate control parameters;

[0038] A controller, used for receiving and executing control instructions;

[0039] RGB lamp, used to output corresponding light effects according to the control instructions;

[0040] Wherein, the mobile terminal further includes:

[0041] A light sensor, used to collect the ambient light intensity of the environment where the RGB lamp is located;

[0042] A processor, used to perform calculations on various parameters of the RGB lamp;

[0043] The wireless communication module is used for data transmission with the controller.

[0044] The beneficial effects of the present invention are:

[0045] (1) By analyzing user habits, such as color preferences and usage time periods, the present invention can provide users with highly personalized lighting settings to meet the needs of different scenes and situations.

[0046] (2) The present invention significantly improves control accuracy and adaptability by comprehensively considering multiple factors such as ambient light, time, geographical location and user habits, thus overcoming the limitations of traditional RGB lamp control methods.

[0047] (3) The present invention collects ambient light intensity in real time and calculates ambient light influencing factors, so that the RGB lamp can automatically adapt to the lighting changes in the surrounding environment, provide the best lighting effect, and improve visual comfort. The comprehensive dimming coefficient is introduced, and the ambient light and user feedback are combined to make the lighting adjustment more intelligent, which can achieve smoother brightness transition, avoid abrupt changes in light intensity, and enhance user experience.

[0048] In summary, the present invention enables the RGB lamp control method to not only meet the personalized needs of users in terms of functionality, but also significantly improves environmental adaptability and operational convenience, greatly enhancing the user experience and satisfaction. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A scene diagram of a method for controlling an RGB lamp provided by the present invention;

[0050] Figure 2 A flow chart of a method for controlling an RGB lamp provided by the present invention;

[0051] Figure 3 A schematic diagram of the structure of a control system for an RGB lamp provided by the present invention;

[0052] Figure 4 A schematic diagram of the hardware structure of a possible electronic device provided by the present invention. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0054] See also Figure 1 , Figure 1 This is a scene diagram of a method for controlling an RGB lamp provided by the present invention. Figure 1 As shown, the scene may include a terminal, a server, and a Christmas tree with RGB lights installed. The Christmas tree, the terminal, and the server are connected through a network, such as a wired or wireless network connection. Among them, the terminal may include but is not limited to portable terminals such as mobile phones and tablets installed with various network platform applications, as well as fixed terminals such as computers, query machines, and advertising machines. Among them, the server provides users with various business services, including service push servers, user recommendation servers, etc.

[0055] It should be noted that Figure 1 The scenario diagram of a method for controlling an RGB lamp is only an example. The terminal, server, and application scenario described in the embodiment of the present invention are intended to more clearly illustrate the technical solution of the embodiment of the present invention, and do not limit the technical solution provided by the embodiment of the present invention. A person skilled in the art can know that with the evolution of the system and the emergence of new business scenarios, the technical solution provided by the embodiment of the present invention is also applicable to similar technical problems. In this scenario, the method for controlling an RGB lamp of the present invention can be executed by a terminal or a server to achieve efficient, flexible, and accurate control of the RGB lamps decorated on the Christmas tree.

[0056] Among them, both the terminal and the server can be used for:

[0057] The light sensor of the mobile terminal collects the ambient light intensity of the RGB lamp, the current time and the geographical location coordinates, and obtains the user usage habit data of the user using the RGB lamp;

[0058] Determining an ambient light impact factor of the RGB lamp according to the ambient light intensity and the time;

[0059] Determining a user habit weight coefficient of the RGB light according to the user usage habit data and the time;

[0060] Determine the basic value of the RGB component of the RGB lamp according to the ambient light influence factor, the user habit weight coefficient, and the geographical location coordinates;

[0061] Determine a comprehensive dimming coefficient for the RGB lamp according to the ambient light influencing factor and the user habit weight coefficient, and determine a final RGB output value of the RGB lamp according to the comprehensive dimming coefficient;

[0062] The final RGB output value is converted into a PWM control signal and sent to a controller, and the controller is used to control the switching and color adjustment of the RGB lamp.

[0063] See also Figure 2 , provides a flow chart of a control method of an RGB lamp of the present invention, comprising the following steps:

[0064] Step 201: collect the ambient light intensity of the RGB lamp, the current time and the geographical location coordinates through the light sensor of the mobile terminal, and obtain the user usage habit data of the user using the RGB lamp.

[0065] The user usage habit data may include: the user's color preference data, light usage period data and light intensity preference data.

[0066] In a specific implementation, the light sensor built into the mobile terminal can measure the light intensity E of the surrounding environment in real time. This data is used to evaluate the brightness of the current environment so that corresponding adjustments can be made when adjusting the RGB lights. For example, in an environment with strong light, the light intensity may need to be reduced, while in a darker environment, the light brightness needs to be increased.

[0067] Through the system time function, the mobile terminal can obtain the current time t in real time. Time information is an important factor in adjusting the lighting effect. For example, users may need warmer lights at night and cooler lights during the day. This information helps the system make intelligent adjustments based on the time period.

[0068] Mobile terminals can use GPS or other positioning technologies to obtain the user's geographic location coordinates (x, y). Geographic location also affects lighting adjustment. For example, different regions have different sunshine hours and intensities. The system can optimize the output of lights based on the user's location information to adapt to local environmental conditions.

[0069] In some embodiments, the system can analyze and record the user's color choices in different time periods and scenarios through the user's historical operation records. These data help the system understand the user's color preferences in different environments, thereby providing personalized light color settings. The system can record the time periods when the user uses the RGB lamp, for example, the user usually uses the light between 7 and 10 pm. This data helps the system predict the user's usage habits and automatically adjust the light settings to suit the user's pace of life. The user's preference for light intensity will also be recorded. For example, some users may prefer soft light, while others may prefer bright light. The system can use this information to provide light intensity settings that best meet user needs in different scenarios.

[0070] Through the above methods, the present invention can fully collect data on ambient light intensity, current time, geographic location coordinates, and user usage habits, so that your smart RGB light control system can achieve more accurate and personalized light adjustment. This multi-dimensional data collection not only improves the adaptability and flexibility of the light, but also significantly improves the user experience, making it more in line with the actual needs of users.

[0071] Step 202: Determine the ambient light impact factor of the RGB lamp according to the ambient light intensity and the time.

[0072] In some embodiments, step 202 may include:

[0073] Obtaining a first adjustment coefficient, a second adjustment coefficient, and a third adjustment coefficient that affect the ambient light intensity;

[0074] The ambient light intensity is adjusted according to the first adjustment coefficient, the second adjustment coefficient, and the third adjustment coefficient to determine the ambient light influence factor of the RGB lamp.

[0075] In some embodiments, the ambient light impact factor can be expressed as:

[0076]

[0077] Among them, α is the environmental lighting factor, k 1 , k 2 , k 3 They are the first adjustment coefficient, the second adjustment coefficient and the third adjustment coefficient, E is the ambient light intensity, and t is the time.

[0078] In specific implementations, the ambient light intensity E represents the intensity of the light in the current environment, and the unit is usually lux. The higher the light intensity, the brighter the ambient light, and vice versa. This value directly affects the adjustment of the RGB light to ensure that the appropriate lighting effect can be provided under different lighting conditions.

[0079] The time t can be expressed in hours. This variable is obtained by using the sine function The purpose of the processing is to simulate the changing pattern of daytime light. For example, the difference in light intensity between day and night, the characteristics of the sine function make the change of light intensity in the morning and evening smoother.

[0080] The first adjustment coefficient k 1 Used to adjust the influence of ambient light on lighting effects. When E is low, the first adjustment coefficient k 1 It can help increase the alpha value to ensure that the RGB light can still provide appropriate brightness in low-light environments.

[0081] The second adjustment coefficient k 2 Used to adjust the effect of E on α. ​​It controls the weight of ambient light intensity in the calculation of the influence factor. If it is set higher, the effect of ambient light intensity on the influence factor will be enhanced.

[0082] The third adjustment coefficient k 3 Used to adjust the base value of the formula to ensure that the calculation of the impact factor is still reasonable in extreme cases (such as when the ambient light is zero). It can help prevent the value of α from becoming negative and ensure the stability of the formula.

[0083] The composition shows that the influence of ambient light intensity E is related to time changes. When t represents morning and evening, the output of the sine function will change between 0 and 1, reflecting the changes in light intensity in the morning and evening. Adding the adjustment coefficient k 1 This ensures that the output is not too low in low light conditions.

[0084] k 2 ×E+k 3 This ensures the stability of the entire formula. When the ambient light intensity is low (such as E is close to 0), k 3 The existence of ensures that division by zero does not occur. Adjustment coefficient k 2 This ensures that the effect of ambient light intensity on α can be adjusted according to the set ratio.

[0085] It can be understood that the calculated value of the ambient light impact factor α will be used for subsequent RGB light adjustment. A higher α value means that the ambient light intensity is high and the brightness of the RGB light needs to be reduced; while a lower α value means that the ambient light intensity is insufficient and the RGB light should be brightened to meet the user's visual needs.

[0086] Through the above methods, the present invention can achieve modeling of the complex relationship between light intensity and time, so that the RGB lamp can be flexibly adjusted under different ambient lighting conditions, providing a more personalized and comfortable lighting experience.

[0087] Step 203: Determine a user habit weight coefficient of the RGB lamp according to the user usage habit data and the time.

[0088] In some embodiments, step 203 may be expressed as:

[0089] Determining a basic weight value corresponding to the user usage habit data according to the user's usage habit of the RGB lamp;

[0090] A user habit weight coefficient of the RGB lamp is determined according to the user usage habit data and the basic weight value.

[0091] In some embodiments, the user habit weight coefficient can be expressed as:

[0092]

[0093] Among them, β is the user habit weight coefficient, m is the basic weight value, U is the user usage habit data, and t is time.

[0094] In a specific implementation, the user usage habit data U represents the user's behavior data when using RGB lights, including the user's color preference, usage time, light intensity preference, etc. This data can be obtained by analyzing the user's historical usage records. The value of U is usually standardized through a certain quantitative method to ensure the accuracy of the calculation.

[0095] Here t is the current time in hours. The color scheme is processed to reflect the influence of different times of day on user preferences. For example, warm colors may be preferred at night, while cool colors may be preferred during the day.

[0096] m is a fixed value that represents the basic weight of the user's usage habits. It ensures that even if the user's habit data U is zero, β will have a basic value to avoid the formula output being a negative number. This value can be adjusted according to actual conditions to meet the needs of different users.

[0097] ln(U+1) expresses the natural logarithm of the user's usage habit data, ensuring that the impact of user habits on β is nonlinear. The characteristics of the logarithmic function make the increase in the impact decrease as U increases, indicating that the maximum value of usage habits will not cause the weight coefficient to be too inflated.

[0098] Indicates the time change of user preferences. When time changes, user preferences may change accordingly. The cosine function can naturally simulate this change, forming a periodic effect, helping the system better understand the user's needs at different times.

[0099] The result of the entire numerator is squared, which means that the change of the user habit weight coefficient β is sensitive and can emphasize the impact of larger user usage habit data and time changes. This square processing can help the system emphasize the user's strong preferences when optimizing lighting adjustment.

[0100] Finally, the addition of the basic weight value m ensures that the user habit weight coefficient always remains within a reasonable range, avoiding β becoming unstable due to too low user usage habit data. This design enables the system to have a basic and stable starting point when processing user preferences.

[0101] The calculated user habit weight coefficient β will be used for subsequent RGB light adjustment decisions. A higher β value indicates that the user has a strong habit, and the system should place more emphasis on the user's preference for light adjustment; a lower β value indicates that the user's preference is not obvious, and other factors need to be considered for adjustment.

[0102] Through the above methods, the present invention can quantify the personalized preferences of users, so that RGB lights can intelligently adapt to the needs of users at different times and situations, significantly improving the user experience and providing each user with a customized lighting solution.

[0103] Step 204: Determine the basic value of the RGB component of the RGB lamp according to the ambient light influence factor, the user habit weight coefficient, and the geographic location coordinates.

[0104] In some embodiments, the base values ​​of the RGB components of an RGB lamp may be expressed as:

[0105]

[0106] Among them, R is the red component, R 0 is the initial red value, d is the normalization coefficient. G is the green component, G 0 is the initial green value, c is the attenuation coefficient. B is the blue component, B 0 is the initial blue value and p is the diffusion coefficient.

[0107] In the specific implementation, the initial component value R 0 , G 0 , B 0 It is the initial output value of the RGB lamp, indicating the basic brightness of each color when there are no other influencing factors.

[0108] The normalization coefficient d is used to normalize the output of the red component to ensure that the final red value is within a reasonable range. It helps adjust the scale of R to make it adaptable under different environmental conditions.

[0109] The attenuation coefficient c controls the attenuation of the green component G with position differences. As |xy| increases, the output of the green component decays exponentially, reflecting the effect of distance on light intensity.

[0110] The diffusion coefficient p is used to calculate the blue component B, which determines the diffusion degree of the blue component output with the position difference. When |xy| is large, the output blue component will gradually weaken.

[0111] The ambient light impact factor α represents the impact of ambient light on the RGB light adjustment. It dynamically adjusts the brightness of different components through a combination of sine, cosine and tangent functions.

[0112] The user habit weight coefficient β reflects the user's habit of using lights. As time t changes, the adjustment of the light component is weighted accordingly.

[0113] The coordinates (x, y) represent the spatial position of the lamp and are used to calculate the lighting differences between different positions, thereby affecting the output of the RGB components.

[0114] The output of R is regulated by the ambient lighting influence factor α and the user habit weight coefficient β, ensuring that the distance in different environments (x, y) affects the final value of red and ensures the difference in light intensity at different spatial locations.

[0115] The green component G uses the cosine function cos(βt) to represent the time dependency of green. Changes in user habits can cause the brightness of green to have different intensities in different time periods. By controlling the influence of |xy| on the green component through an exponential function, the attenuation of brightness due to distance is smoother and adapts to different spatial layouts.

[0116] The introduction of makes the blue component change over time, providing a more delicate adjustment effect. Controls the diffusion of blue light, ensuring that the intensity of blue light changes smoothly and naturally at different locations.

[0117] The formula takes into account ambient light, user habits, time changes and spatial location, ensuring that RGB lights can provide personalized and precise lighting experience under different conditions. This multi-dimensional adjustment mechanism makes the user experience more user-friendly and can adapt to diverse environments and needs.

[0118] Through the above methods, the present invention realizes the precise control of RGB lights and provides an intelligent lighting solution based on the environment and user habits. This method not only improves the user experience, but also ensures that the RGB lights can operate efficiently and flexibly in various environments.

[0119] Step 205: Determine a comprehensive dimming coefficient for the RGB lamp according to the ambient light influencing factor and the user habit weight coefficient, and determine a final RGB output value of the RGB lamp according to the comprehensive dimming coefficient.

[0120] In some embodiments, step 205 may include the following steps:

[0121] Obtain the standard light intensity of the environment where the RGB lamp is located;

[0122] Determining a first dimming coefficient according to the ambient light intensity and the standard light intensity;

[0123] A comprehensive dimming coefficient for the RGB lamp is determined according to the first dimming coefficient, the ambient light impact factor and the user habit weight coefficient.

[0124] In some embodiments, the comprehensive dimming coefficient is expressed as:

[0125]

[0126] Among them, γ is the comprehensive dimming coefficient, E 0 is the standard light intensity, E is the ambient light intensity, α is the ambient light influencing factor, and β is the user habit weight coefficient.

[0127] In specific implementation, the comprehensive dimming coefficient γ is a coefficient used to comprehensively adjust the output of RGB lights, which determines the final lighting effect. The ambient light intensity E can be measured by the sensor, which directly affects the output adjustment of the RGB lights. Standard light intensity E 0 It is used to compare with the ambient light intensity E to determine the amplitude that needs to be adjusted. α represents the degree of influence of ambient light on the RGB lamp, reflecting how changes in lighting conditions affect the output of the light. β reflects the coefficient of user preference, taking into account the user's habits and time factors when using RGB lamps.

[0128] Specifically, By adding the squares of α and β and taking the square root, the effects of environmental factors and user habits on lighting adjustment are comprehensively considered. The square root calculation ensures that these effects are not linearly superimposed during adjustment, but interact in a more complex way. This nonlinear combination of characteristics makes the adjustment of lighting more flexible and natural when the environment changes or user habits change. For example, if the user habit weight β is high, indicating that the user has a strong preference for lighting, then γ will be larger, which will be more inclined to meet the needs of users when dimming.

[0129] pass The ratio of the current ambient light intensity to the standard light intensity reflects the relationship between the current ambient light intensity and the standard light intensity. This ratio determines the degree of dimming. The characteristics of the inverse tangent function make the dimming amplitude change slowly when the ambient light intensity is close to the standard light intensity; when the ambient light intensity is low or high, the change in the dimming amplitude will be more significant. This design makes the lighting adjustment more natural and avoids visual discomfort caused by over-adjustment.

[0130] The calculation result of the comprehensive dimming coefficient γ will directly affect the output of the RGB lamp and determine the changes in the light under different environmental conditions and user preferences. By comprehensively considering the ambient light intensity, user habits and environmental influencing factors, it ensures that the RGB lamp can intelligently and flexibly adapt to various usage scenarios, thereby improving the user's lighting experience.

[0131] Through the above methods, the present invention can achieve precise control of RGB light output, making light adjustment more humane and intelligent. The introduction of this coefficient enables RGB lights to provide personalized lighting effects under changing environmental conditions and user needs, thereby improving the overall user experience.

[0132] In some embodiments, step 205 may further include the following steps:

[0133] Get the red component, green component and blue component in the basic value of the RGB component;

[0134] Obtaining an initial red value, an initial green value, and an initial blue value of the RGB component;

[0135] Acquire a normalization coefficient for adjusting the initial red value, an attenuation coefficient for adjusting the initial green value, and a diffusion coefficient for adjusting the initial blue value;

[0136] The RGB final output value of the RGB lamp is determined according to the red component, green component and blue component in the basic value of the RGB component, the initial red value, initial green value and initial blue value of the RGB component, the ambient lighting influence factor, the user habit weight coefficient, and the standardization coefficient, the attenuation coefficient and the diffusion coefficient.

[0137] In some embodiments, the RGB final output value of the RGB lamp is expressed as:

[0138]

[0139] Among them, R final is the final red value, G final is the final green value, B final is the final blue value, R is the red component, G is the green component, B is the blue component, γ is the comprehensive dimming coefficient, and t is the time.

[0140] In the specific implementation, the three output color components are guaranteed not to exceed 255 (the maximum value of the RGB color model). The three color components R, G, and B are the basic color values ​​calculated previously, indicating the basic color intensity of the light. γ reflects the comprehensive influencing factors of the environment and user habits, affecting the final color output. Time t is used to dynamically adjust the lighting effect.

[0141] In the red and green outputs, sine and cosine functions are used to achieve periodic changes in the lighting effect. As time changes, the brightness and color of the light will fluctuate regularly. For example, the sine function and cosine function The use of RGB lights allows them to undergo a complete brightness change cycle every 12 hours. This periodic adjustment can simulate natural light changes and enhance the user's visual experience.

[0142] By multiplying the basic color components R, G, and B, the comprehensive dimming coefficient γ determines the intensity adjustment of the current light. A high γ value will increase the light brightness, while a low value will reduce the light brightness. The use of the min(255,...) function ensures that the final RGB value does not exceed 255, which conforms to the specification of the RGB color model. This restriction avoids the problem of exceeding the representable range due to calculations, ensuring that the output color value is within the valid range.

[0143] Through the design of the above formula, RGB lamps can achieve dynamic and intelligent lighting adjustment, combining environmental conditions and user habits to achieve a personalized lighting experience. In particular, by introducing the time factor, the lighting effect can be made more natural and changeable, improving user satisfaction.

[0144] In the above manner, the present invention not only realizes fine dimming control by designing the final output value of the RGB lamp, but also enhances the visual experience of the user under different time and environmental conditions. This intelligent adjustment can be automatically adjusted according to the real-time environment and user preferences, making the RGB lamp more in line with the needs of the user.

[0145] Step 206: Convert the RGB final output value into a PWM control signal and send it to a controller, and control the switching and color adjustment of the RGB lamp through the controller.

[0146] In specific implementation, PWM is a modulation technology that controls the average value of current by adjusting the width of the signal (the height of the pulse). For RGB lights, the PWM signal can accurately control the brightness of each color LED.

[0147] The period of the PWM signal is usually fixed, such as 1 millisecond. Within this period, the duty cycle of the modulation (the ratio of the duration of the high level to the period) determines the brightness of the LED. For example, a duty cycle of 50% means that the LED will be turned on half of the time, thus providing medium brightness.

[0148] The generated PWM control signal is sent to the controller via a wireless communication protocol (such as WiFi, Bluetooth, etc.). After receiving the signal, the controller will parse the PWM signal of each color and adjust the working state of the RGB lamp accordingly.

[0149] In some embodiments, the controller can be responsible for receiving the PWM signal from the mobile terminal and parsing it into specific operation instructions to control the switch and color of the RGB lamp. The controller determines the switch state of the RGB lamp based on the received PWM signal. If the duty cycle is 0, it means turning off the light; if the duty cycle is greater than 0, the LED of the corresponding color is turned on. The controller adjusts the brightness of each color LED according to the PWM signals of different colors. For example, when the red PWM signal has a higher duty cycle, the red LED will be brighter and achieve the desired lighting effect.

[0150] In this way, the RGB lamp can achieve precise brightness and color control, ensuring that users can get an ideal lighting experience in different environments and at different times. The use of PWM control signals makes the dimming process smoother and more stable, avoiding flickering caused by current fluctuations. The present invention can effectively convert the calculated RGB final output value into an executable PWM signal, and control and adjust the light through a controller. This intelligent control method improves the operational flexibility and user experience of the RGB lamp, enabling it to adapt to various usage scenarios and user needs.

[0151] See also Figure 3 , Figure 3 A schematic diagram of the structure of a control system for an RGB lamp provided by the present invention.

[0152] like Figure 3 As shown, a control system of an RGB lamp proposed in an embodiment of the present invention includes:

[0153] The data acquisition module 301 is used to collect the ambient light intensity of the RGB lamp, the current time and the geographical location coordinates through the light sensor of the mobile terminal, and obtain the user usage habit data of the user using the RGB lamp;

[0154] A factor determination module 302 is used to determine the ambient light impact factor of the RGB lamp according to the ambient light intensity and the time;

[0155] A weight determination module 303, for determining a user habit weight coefficient of the RGB light according to the user usage habit data and the time;

[0156] A basic value module 304, configured to determine a basic value of the RGB component of the RGB lamp according to the ambient light influencing factor, the user habit weight coefficient, and the geographic location coordinates;

[0157] The output value module 305 is used to determine the comprehensive dimming coefficient for the RGB lamp according to the ambient light influence factor and the user habit weight coefficient, and determine the RGB final output value of the RGB lamp according to the comprehensive dimming coefficient;

[0158] The light adjustment module 306 is used to convert the final RGB output value into a PWM control signal and send it to the controller, so as to control the switching and color adjustment of the RGB light through the controller.

[0159] In some embodiments, the control system of the RGB lamp may further include:

[0160] Mobile terminal, used to collect environmental data, user data and calculate control parameters;

[0161] A controller, used for receiving and executing control instructions;

[0162] RGB lamp, used to output corresponding light effects according to the control instructions;

[0163] Wherein, the mobile terminal further includes:

[0164] A light sensor, used to collect the ambient light intensity of the environment where the RGB lamp is located;

[0165] A processor, used to perform calculations on various parameters of the RGB lamp;

[0166] The wireless communication module is used for data transmission with the controller.

[0167] See also Figure 4 , Figure 4 Schematic diagram of an electronic device provided by an embodiment of the present invention. Figure 4 As shown, an embodiment of the present invention provides an electronic device 400, including a memory 410, a processor 420, and a computer program 411 stored in the memory 410 and executable on the processor 420. When the processor 420 executes the computer program 411, the following steps are implemented:

[0168] The light sensor of the mobile terminal collects the ambient light intensity of the RGB lamp, the current time and the geographical location coordinates, and obtains the user usage habit data of the user using the RGB lamp;

[0169] Determining an ambient light impact factor of the RGB lamp according to the ambient light intensity and the time;

[0170] Determining a user habit weight coefficient of the RGB light according to the user usage habit data and the time;

[0171] Determine the basic value of the RGB component of the RGB lamp according to the ambient light influence factor, the user habit weight coefficient, and the geographical location coordinates;

[0172] Determine a comprehensive dimming coefficient for the RGB lamp according to the ambient light influencing factor and the user habit weight coefficient, and determine a final RGB output value of the RGB lamp according to the comprehensive dimming coefficient;

[0173] The final RGB output value is converted into a PWM control signal and sent to a controller, and the controller is used to control the switching and color adjustment of the RGB lamp.

[0174] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0175] Those skilled in the art will appreciate that embodiments of the present invention may provide methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects.

Claims

1. A method for controlling an RGB lamp, characterized in that: The method comprises: The light sensor of the mobile terminal collects the ambient light intensity of the RGB lamp, the current time and the geographical location coordinates, and obtains the user usage habit data of the user using the RGB lamp; Determine the ambient light impact factor of the RGB lamp according to the ambient light intensity and the time; Determining a user habit weight coefficient of the RGB light according to the user usage habit data and the time; Determine the basic value of the RGB component of the RGB lamp according to the ambient light influence factor, the user habit weight coefficient, and the geographical location coordinates; Determine a comprehensive dimming coefficient for the RGB lamp according to the ambient light influencing factor and the user habit weight coefficient, and determine a final RGB output value of the RGB lamp according to the comprehensive dimming coefficient; The final RGB output value is converted into a PWM control signal and sent to a controller, and the controller is used to control the switching and color adjustment of the RGB lamp.

2. The control method of RGB lamp according to claim 1, characterized in that: The step of determining the ambient light impact factor of the RGB lamp according to the ambient light intensity and the time includes: Obtaining a first adjustment coefficient, a second adjustment coefficient, and a third adjustment coefficient that affect the ambient light intensity; The ambient light intensity is adjusted according to the first adjustment coefficient, the second adjustment coefficient, and the third adjustment coefficient to determine the ambient light influence factor of the RGB lamp.

3. The control method of RGB lamp according to claim 2, characterized in that: The determining the user habit weight coefficient of the RGB lamp according to the user usage habit data and the time includes: Determining a basic weight value corresponding to the user usage habit data according to the user's usage habit of the RGB lamp; A user habit weight coefficient of the RGB lamp is determined according to the user usage habit data and the basic weight value.

4. The control method of RGB lamp according to claim 3, characterized in that: The step of determining a comprehensive dimming coefficient for the RGB lamp according to the ambient light influencing factor and the user habit weight coefficient includes: Obtain the standard light intensity of the environment where the RGB light is located; Determining a first dimming coefficient according to the ambient light intensity and the standard light intensity; A comprehensive dimming coefficient for the RGB lamp is determined according to the first dimming coefficient, the ambient light impact factor and the user habit weight coefficient.

5. The control method of RGB lamp according to claim 4, characterized in that: The step of determining the final RGB output value of the RGB lamp according to the comprehensive dimming coefficient includes: Get the red component, green component and blue component in the basic value of the RGB component; Obtaining an initial red value, an initial green value, and an initial blue value of the RGB component; A normalization coefficient for adjusting the initial red value, an attenuation coefficient for adjusting the initial green value, and a diffusion coefficient for adjusting the initial blue value are obtained.

6. The control method of RGB lamp according to claim 5, characterized in that: The step of determining the final RGB output value of the RGB lamp according to the comprehensive dimming coefficient includes: The RGB final output value of the RGB lamp is determined according to the red component, green component and blue component in the basic value of the RGB component, the initial red value, initial green value and initial blue value of the RGB component, the ambient lighting influence factor, the user habit weight coefficient, and the standardization coefficient, the attenuation coefficient and the diffusion coefficient.

7. The control method of an RGB lamp according to any one of claims 1 to 6, characterized in that: The user usage habit data includes: the user's color preference data, light usage time period data and light intensity preference data.

8. A control system for an RGB lamp, used to execute the control method for an RGB lamp as claimed in any one of claims 1 to 7, characterized in that: The system comprises: A data acquisition module, used to collect the ambient light intensity of the RGB lamp, the current time and the geographical location coordinates through the light sensor of the mobile terminal, and obtain the user usage habit data of the user using the RGB lamp; A factor determination module, used to determine the ambient light impact factor of the RGB lamp according to the ambient light intensity and the time; A weight determination module, used to determine a user habit weight coefficient of the RGB lamp according to the user usage habit data and the time; A basic value module, used to determine the basic value of the RGB component of the RGB lamp according to the ambient light influencing factor, the user habit weight coefficient, and the geographical location coordinates; An output value module, used to determine a comprehensive dimming coefficient for the RGB lamp according to the ambient light influencing factor and the user habit weight coefficient, and determine a final RGB output value of the RGB lamp according to the comprehensive dimming coefficient; The light adjustment module is used to convert the final RGB output value into a PWM control signal and send it to the controller, so as to control the switching and color adjustment of the RGB lamp through the controller.

9. The RGB lamp control system according to claim 8, characterized in that: The system further comprises: Mobile terminal, used to collect environmental data, user data and calculate control parameters; A controller, used for receiving and executing control instructions; RGB lamp, used to output corresponding light effects according to the control instructions; Wherein, the mobile terminal further includes: A light sensor, used to collect the ambient light intensity of the environment where the RGB lamp is located; A processor, used to perform calculations on various parameters of the RGB lamp; The wireless communication module is used for data transmission with the controller.

Citation Information

Patent Citations

  • Smart lamp regulating luminance automatically according to environment illumination intensity

    CN107567171A

  • Dimming and color temperature adjusting method and device for intelligent equipment

    CN112437523A

  • Color temperature regulation and control method and system for LED lamp strip

    CN117295200A

  • Illumination unit self-adaptive adjustment method of intelligent illumination system

    CN118102545A

  • Light emission control method of light for illumination, and device for the same

    JP2002244180A