Voice table lamp control method and device based on mode memory, equipment and medium
Through the mode memory function of the voice desk lamp, the lighting mode is adjusted according to the user's historical preferences and real-time parameter differences, solving the problem of manual adjustment and sudden light sensitivity in the existing technology, and achieving intelligent lighting control and visual comfort improvement.
Patent Information
- Application Number
- CN202510553511.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-07-04
AI Technical Summary
Existing voice desk lamps cannot automatically adapt to the lighting mode according to user's historical preferences, resulting in manual adjustments required for each startup, and the sudden change in light sense and color temperature during the lighting mode switching affect visual comfort.
The voice receiving module and touch module obtain the power-on and mode switching instructions, determine the mode switching rate based on the historical lighting control mode and parameter difference, and realize intelligent lighting control, including night time period judgment, historical operation data analysis, and exponential weighted sliding algorithm to establish mapping relationships, and dynamically adjust brightness and color temperature.
It improves the intelligence of voice desk lamps, reduces manual operation on the phone, ensures the naturalness of the lighting transition and user comfort, and improves interactive efficiency and visual experience.
Smart Images

Figure CN120264550A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of lighting control, and in particular to a voice desk lamp control method, device, equipment and medium based on pattern memory. Background Art
[0002] With the development of intelligent lighting technology, the voice-controlled desk lamp, as an important part of smart home, has been gradually widely used due to its convenience and personalized interaction experience. In existing voice desk lamps, there are usually multiple lighting control modes, such as night light mode, reading mode, comfort mode, etc., and users can switch between different lighting modes through voice commands or touch methods.
[0003] However, most products default to a fixed initial mode after power-on and cannot automatically adapt to a suitable lighting mode according to the user's historical usage habits, resulting in the need for users to manually adjust the mode after each power-on, and the user experience is not intelligent enough. On the other hand, during the lighting mode switching process, the current technology usually controls the changes in brightness and color temperature in a fixed rate or simple linear transition manner, without considering the specific parameter differences between different modes, and it is easy to have phenomena such as sudden light perception change and color temperature jump during the switching process, which affects visual comfort, especially in scenarios such as night or reading where the light perception is more sensitive. Summary of the Invention
[0004] In view of this, the embodiments of the present invention provide a voice desk lamp control method, device, equipment and medium based on pattern memory to solve the problem in the prior art that it cannot be automatically adapted according to the user's historical usage preferences and has a low degree of intelligence.
[0005] In a first aspect, the embodiments of the present invention provide a voice desk lamp control method based on pattern memory. The voice desk lamp includes a voice receiving module and a touch module for receiving voice commands. The method includes:
[0006] In response to a power-on command, control the voice desk lamp to perform lighting according to the historical lighting control mode;
[0007] In response to a mode switching command, obtain the parameter difference between the target switching mode and the current lighting control mode;
[0008] Determine the mode switching rate according to the parameter difference;
[0009] Control the voice desk lamp to perform mode switching according to the mode switching rate, where the power-on command and the mode switching command are obtained through the voice receiving module or the touch module.
[0010] Preferably, the step of "In response to a power-on command, control the voice desk lamp to perform lighting according to the historical lighting control mode" includes:
[0011] In response to the power-on instruction, obtain the current time period and the lighting control mode before shutdown as the historical lighting control mode, where the lighting control mode includes a night lighting mode and several other lighting modes;
[0012] Judge whether the current time period is a preset night time period and whether the historical lighting control mode is the night lighting mode;
[0013] If the current time period is a preset night time period and the historical lighting control mode is the night lighting mode, control the voice table lamp to illuminate according to the night lighting mode;
[0014] If the current time period is not a preset night time period and the lighting control mode before shutdown is the night lighting mode, control the voice table lamp to illuminate according to the lighting control mode before the night lighting mode.
[0015] Preferably, the controlling the voice table lamp to illuminate according to the historical lighting control mode in response to the power-on instruction includes:
[0016] Obtain the historical operation data set of the voice table lamp, where the historical operation data set includes several historical operation data, each historical operation data corresponds to a preset time period, and the historical operation data all include the lighting control mode when the voice table lamp is turned on and the corresponding operation time period;
[0017] When the number of historical operation data in the historical operation data set is less than the first threshold, obtain the mapping relationship between the time period and the lighting control mode according to the preset rule set;
[0018] When the number of historical operation data in the historical operation data set is between the first threshold and the second threshold, establish the mapping relationship between the time period and the lighting control mode according to the historical operation data set and the fast Fourier transform algorithm;
[0019] When the number of historical operation data in the historical operation data set is greater than the second threshold, establish the mapping relationship between the time period and the lighting control mode according to the exponential weighted sliding algorithm and the historical operation data set, where the first threshold is less than the second threshold;
[0020] Determine the lighting control mode corresponding to the current time period according to the mapping relationship;
[0021] Control the voice table lamp to illuminate according to the lighting control mode corresponding to the current time period.
[0022] Preferably, when the number of historical operation data in the historical operation data set is between the first threshold and the second threshold, establishing a mapping relationship between the time period and the lighting control mode according to the historical operation data set and the fast Fourier transform algorithm, including:
[0023] Dividing the preset time period according to a first preset granularity to obtain a plurality of first time slots;
[0024] According to the historical operation data set, counting the usage frequency of the lighting control mode in each first time slot;
[0025] Constructing a time slot frequency vector according to the first time slot and the corresponding usage frequency;
[0026] Processing the time slot frequency vector according to the fast Fourier transform algorithm to obtain the spectral distribution of the time slot frequency vector;
[0027] Obtaining a time slot sequence interval according to the main frequency component with the largest amplitude in the spectral distribution;
[0028] Within the time slot sequence interval, counting the cumulative occurrence frequency of each lighting control mode;
[0029] Performing a weighted process on the cumulative occurrence frequency of each lighting control mode to establish a mapping relationship between the time period and the lighting control mode.
[0030] Preferably, when the number of historical operation data in the historical operation data set is greater than the second threshold, establishing a mapping relationship between the time period and the lighting control mode according to the exponential decay sliding window algorithm and the historical operation data set, including:
[0031] Dividing the preset time period according to a second preset granularity to obtain a plurality of second time periods, where the second preset granularity is an integer multiple of the first preset granularity;
[0032] According to the historical operation data set and the time slot sequence interval, establishing an initial weight corresponding to a plurality of lighting control modes for each second time period;
[0033] When the voice desk lamp is turned off, recording the current lighting control mode and the corresponding second time period;
[0034] Updating the initial weight corresponding to the current lighting control mode in the second time period according to the exponential decay sliding window algorithm, and performing an exponential decay process on the weights of all other lighting control modes in this second time period to obtain the updated target weights;
[0035] Performing a normalization process on all the target weights within each second time period to construct the probability distribution of each lighting control mode under this second time period;
[0036] Determine the target lighting control mode in the second time period according to the probability distribution and a preset confidence threshold, and establish a mapping relationship between the second time period and the target lighting control mode.
[0037] Preferably, the determining the mode switching rate according to the parameter difference includes
[0038] Obtain the parameter difference, where the parameter difference includes a color temperature difference and a brightness difference;
[0039] Determine a switching dominant parameter according to the order of magnitude relationship between the color temperature difference and the brightness difference, where the switching dominant parameter includes a brightness parameter and / or a color temperature parameter;
[0040] Obtain a mode switching strategy according to the switching dominant parameter;
[0041] Determine the mode switching rate according to the mode switching strategy and the parameter difference.
[0042] Preferably, the obtaining a mode switching strategy according to the switching dominant parameter includes:
[0043] When the switching dominant parameter is a brightness parameter, determine a brightness adjustment rate and a color temperature adjustment rate according to the brightness difference and the color temperature difference;
[0044] Determine the delayed execution time of color temperature adjustment according to the order of magnitude relationship between the brightness difference and the color temperature difference;
[0045] Determine a brightness-priority mode switching strategy according to the brightness adjustment rate, the color temperature adjustment rate, and the color temperature adjustment delay time;
[0046] When the switching dominant parameter is a color temperature parameter, determine a color temperature adjustment rate and a brightness adjustment amplitude limit according to the color temperature difference and the brightness difference;
[0047] Determine a brightness adjustment strategy according to the order of magnitude relationship between the color temperature difference and the brightness difference, where the brightness adjustment strategy includes adjusting the brightness after the color temperature adjustment is completed, or adjusting the brightness according to the brightness adjustment amplitude limit while adjusting the color temperature
[0048] Determine a mode switching strategy according to the color temperature adjustment rate and the brightness adjustment strategy;
[0049] When the switching dominant parameter includes both a brightness parameter and a color temperature parameter, determine a brightness adjustment step and a color temperature adjustment step respectively according to the brightness difference and the color temperature difference;
[0050] Determine an alternating adjustment strategy according to the proportional relationship between the brightness difference value and the color temperature difference value, wherein the alternating adjustment strategy includes an alternating adjustment sequence and the number of switching stages;
[0051] Determine a mode switching strategy according to the adjustment step size and the alternating strategy.
[0052] In a second aspect, an embodiment of the present invention provides a voice desk lamp control device based on mode memory. The voice desk lamp includes a voice receiving module and a touch module for receiving voice commands. The device includes:
[0053] An illumination module for responding to a power-on command and controlling the voice desk lamp to perform illumination according to a historical illumination control mode;
[0054] A difference acquisition module for responding to a mode switching command and acquiring a parameter difference between a target switching mode and a current illumination control mode;
[0055] A switching rate determination module for determining a mode switching rate according to the parameter difference;
[0056] A mode switching module for controlling the voice desk lamp to perform mode switching according to the mode switching rate, wherein the power-on command and the mode switching command are obtained through the voice receiving module or the touch module.
[0057] In a third aspect, an embodiment of the present invention provides an electronic device, including: at least one processor, at least one memory, and computer program instructions stored in the memory, and when the computer program instructions are executed by the processor, the method in the first aspect of the above embodiment is implemented.
[0058] In a fourth aspect, an embodiment of the present invention provides a storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by the processor, the method in the first aspect of the above embodiment is implemented.
[0059] In summary, the beneficial effects of the present invention are as follows:
[0060] The voice-controlled table lamp control method, device, equipment and medium based on pattern memory provided by the embodiments of the present invention enable the table lamp to automatically enter the most suitable lighting mode according to the user's last use or high-frequency preferences through historical pattern restoration, eliminating the cumbersome operation of manual adjustment every time the device is powered on, and significantly improving the interaction efficiency and convenience; by extracting the brightness and color temperature difference values between the target mode and the current mode, and dynamically determining the switching rate based on the magnitude of the difference and the dominant parameter, the transition rate is made to match the change amplitude. Finally, the generated switching rate is converted into specific driving instructions to orderly control the adjustment rhythm of brightness and color temperature, thus forming a flexible switching method based on pattern memory and difference driving, which not only improves the intelligent matching and switching experience during startup, but also takes into account the user's comfort and control response speed, and has significant practical value and innovative advantages. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments of the present invention will be briefly introduced below. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts, and all of them are within the protection scope of the present invention.
[0062] Figure 1 is a schematic structural diagram of the voice-controlled table lamp in the embodiments of the present invention.
[0063] Figure 2 is a schematic flowchart of the voice-controlled table lamp control method based on pattern memory in the embodiments of the present invention.
[0064] Figure 3 is a schematic flowchart of the voice-controlled table lamp control method based on pattern memory in the embodiments of the present invention.
[0065] Figure 4 is a schematic structural diagram of the voice-controlled table lamp control device based on pattern memory in the embodiments of the present invention.
[0066] Figure 5 is a schematic structural diagram of the electronic device in the embodiments of the present invention.
[0067] Parts and their numbers in the figure:
[0068] Table lamp base 1, base connecting column 2, hose 3, lamp head 4, touch module 5, voice receiving module 21, bell mouth 22. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0069] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. To make the objectives, technical solutions, and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only configured to explain the present invention and are not configured to limit the present invention. For those skilled in the art, the present invention can be implemented without some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by showing examples of the present invention.
[0070] It should be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, the elements defined by the statement "including..." do not exclude the existence of additional identical elements in the process, method, article or device including the said elements.
[0071] It should be noted that all actions of obtaining signals, information or data in the present invention are carried out on the premise of complying with the corresponding data protection regulations and policies of the location and with the authorization given by the owner of the corresponding device.
[0072] Embodiment 1
[0073] The embodiment of the present invention provides a voice desk lamp control method based on pattern memory. Please refer to Figure 1 , the voice desk lamp includes a desk lamp base 1, a base connecting column 2, a hose 3, and a lamp head 4. The base connecting column 2 is provided on the upper end surface of the desk lamp base 1. It also includes a voice receiving module 21 for receiving voice commands and a touch module 5. The base connecting column is also provided with a bell mouth 22, and the bell mouth 22 includes a number of small holes in a circular array.
[0074] Refer to Figure 2 , the method includes:
[0075] S1. In response to a power-on command, control the voice desk lamp to illuminate according to the historical lighting control mode;
[0076] Specifically, the historical lighting control mode refers to the lighting settings actively selected by the user or automatically generated by the system during the previous use of the voice-controlled table lamp, including brightness levels, color temperature parameters, and lighting mode tags (such as night light mode, reading mode, comfort mode, etc.). The power-on instruction refers to the command issued by the user through the voice reception module or the touch module to turn on the table lamp, such as saying "turn on the light" or long-pressing the touch area.
[0077] The purpose of this step is to enable the table lamp to have the "memory ability" to automatically restore the lighting settings commonly used by the user or the last used settings when powered on, improving the usability. By not relying on the user to repeatedly set the mode, an intelligent lighting control logic is realized, enhancing the interactive friendliness of the product. After receiving the power-on instruction, the system will first read the historical lighting control mode saved in the internal memory or the non-volatile storage module. This historical record can include the mode with the highest usage frequency by the user within a certain period in the past, or the mode before the last time the light was turned off. The read mode is used as the current lighting control parameter and sent to the lighting drive circuit to control the LED lamp beads to output the corresponding brightness and color temperature values.
[0078] S2. In response to the mode switching instruction, obtain the parameter difference between the target switching mode and the current lighting control mode;
[0079] The mode switching instruction refers to the command issued by the user through voice or touch to change the current lighting mode, such as "switch to reading mode" or clicking on the touch panel. The target switching mode refers to the target state that the user hopes to switch to, and the current lighting control mode is the mode before the switching operation. The parameter difference refers to the numerical difference in the control parameters between the target mode and the current mode, mainly including the brightness difference and the color temperature difference. The purpose of this step is to quantify the "change amplitude" between the current mode and the target mode, providing a data basis for the subsequent transition control strategy. By extracting the differences in key control parameters such as brightness and color temperature, the system can identify the intensity of this switch and then determine how to make a reasonable transition to avoid irritating the user due to sudden lighting changes. The system analyzes the user's input switching instruction to identify the requested target lighting mode; then reads the corresponding brightness value and color temperature value of this mode, and compares them with the parameters of the currently executing mode respectively to calculate the two numerical differences. For example, if the current brightness is 30% and the target is 80%, the brightness difference is 50%; if the current color temperature is 3000K and the target is 5000K, the color temperature difference is 2000K. The system inputs these two differences as the switching amplitude parameters into the next control process.
[0080] S3. Determine the mode switching rate according to the parameter difference;
[0081] The mode switching rate refers to the speed at which the table lamp gradually transitions from the current lighting parameter state to the target state, usually manifested as the change amplitude of brightness or color temperature per unit time. For example, the brightness change rate is 5% / second, and the color temperature change rate is 200K / second. The main purpose of this step is to intelligently generate a set of switching rate control strategies based on the parameter difference calculated in the previous link, enabling the table lamp to complete the adjustment of brightness and color temperature at a speed that conforms to the human eye's perception and avoiding discomfort caused by sudden changes. At the same time, adopting different control rhythms under different difference combinations helps to improve the naturalness of visual transition and the perception of the product.
[0082] S4. Control the voice table lamp to perform mode switching according to the mode switching rate, where the power-on instruction and the mode switching instruction are obtained through the voice receiving module or the touch module.
[0083] Specifically, convert the switching rate calculated in the previous link into an actual control signal to drive the lamp to complete the lighting transition and finally achieve the target mode requested by the user. While maintaining precise control, it is also necessary to ensure that the switching process is smooth and natural, avoiding a perceptible step feeling to the naked eye. The controller uses the received switching rate as a parameter input to the PWM control module or the constant current drive module of the dimming and color mixing channels. The system gradually adjusts the brightness current or the color temperature mixing ratio at a set rate, for example, adjusting 5% brightness or 100K color temperature every 100ms until the target parameter value is fully covered.
[0084] Preferably, refer to Figure 3 , controlling the voice table lamp to perform lighting according to the historical lighting control mode in response to the power-on instruction includes:
[0085] S11. In response to the power-on instruction, obtain the current time period and the lighting control mode before shutdown as the historical lighting control mode, where the lighting control mode includes a night lighting mode and several other lighting modes;
[0086] Specifically, in response to the power-on instruction, the system first obtains the current time period and the lighting control mode before the last shutdown. The time period can be divided by hours. For example, the period from 0:00 to 6:00 in the morning is the night time period, from 6:00 to 18:00 is the daytime, and from 18:00 to 24:00 is the evening or bedtime. In the lighting control mode, the night lighting mode usually refers to a soft light setting with low brightness and low color temperature, which is used for night activities or sleep preparation; other modes such as reading, bright, and comfortable are used for functional or daily lighting scenarios. The purpose of this step is to introduce the current time as an auxiliary judgment factor, so that the table lamp's power-on response no longer mechanically depends on the "last shutdown state", but can make a more appropriate mode selection in combination with the time scenario. By simultaneously reading the "time context" and the "usage history", a more intelligent decision-making basis can be constructed.
[0087] S12. Determine whether the current time period is a preset night time period and whether the historical lighting control mode is the night lighting mode;
[0088] The system determines whether the current time period is within a preset night time period and further combines whether the previous use was in the night lighting mode. This dual judgment is crucial: on the one hand, it determines whether it is currently in a night use scenario, and on the other hand, it determines whether the user was in a night use behavior last time. Only when both are true can it proceed to the next step of directly restoring night lighting.
[0089] S13. If the current time period is a preset night time period and the historical lighting control mode is the night lighting mode, then control the voice table lamp to conduct lighting according to the night lighting mode;
[0090] When the system confirms that the current time is at night and the previous used mode was the night lighting mode, the table lamp will directly turn on in the night lighting mode. This strategy can ensure that users will not be stimulated by sudden high - brightness and high - color - temperature light when using it late at night or in the early morning, especially suitable for sensitive scenarios such as getting up at night and sleep interruption.
[0091] S14. If the current time period is not a preset night time period and the lighting control mode before turning off was the night lighting mode, then control the voice table lamp to conduct lighting according to the lighting control mode before the night lighting mode.
[0092] If the current time period is not at night, but the previous used mode in the historical record was the night lighting mode, the system will revert to the normal mode before the night mode and turn on the device in that mode. This strategy avoids the embarrassment of still using dim light when turning on the light during the day due to the "temporary night use behavior" being misrecognized as the user's preference. For example, if the user set the night light last night and then turned it off, and the table lamp still continues the night light mode when turning it on the next morning, it will seriously affect normal lighting. Through the fallback mechanism, the system can automatically "recognize temporary night behaviors" and restore the main use mode, improving the rationality of the continuous experience.
[0093] The intelligent judgment system of "based on history + time period" constructed by S11 - S14 takes into account user preferences, scenario adaptation, and usage continuity, and can implement a personalized lighting logic that better suits actual needs. Its beneficial effect is to greatly reduce the user's manual intervention in the incorrect restoration of the mode, and it is especially suitable for use in sensitive night lighting environments and multi - scenario composite requirements.
[0094] Preferably, the controlling the voice table lamp to conduct lighting according to the historical lighting control mode in response to the power - on instruction includes:
[0095] S011. Obtain the historical operation dataset of the voice - controlled table lamp. Among them, the historical operation dataset includes a number of historical operation data, each historical operation data corresponds to a preset time period, and each historical operation data includes the lighting control mode when the voice - controlled table lamp is turned on and the corresponding operation time period.
[0096] In this step, the historical operation dataset refers to the set of user usage behaviors recorded by the system during the operation of the table lamp, usually stored in a non - volatile memory, and is used to reflect long - term usage habits. Each "historical operation data" refers to a specific usage behavior, which records the lighting control mode adopted when the lamp is turned on this time and the corresponding operation time period (such as 21:00–22:30). In addition, the preset time period is used to standardize the statistical unit of each piece of data, usually with a day as the cycle or an hour as the granularity.
[0097] S012. When the number of historical operation data in the historical operation dataset is less than the first threshold, obtain the mapping relationship between the time period and the lighting control mode according to the preset rule set.
[0098] The first threshold in this step refers to the minimum threshold for judging whether the data volume is sufficient for statistical or machine - learning analysis. For example, if the historical data is less than 10 pieces, the system can consider that the user's usage does not yet have significant preference characteristics. The purpose of this step is to provide a default lighting mode decision logic for the system in the cold - start stage with a small amount of data, so that the table lamp can also make a basically reasonable control decision based on the time period without historical reference. In the implementation process, the system matches the current time period with a pre - built lighting control rule table and selects the corresponding mode according to the current time period to achieve a simple but reasonable initial control logic.
[0099] S013. When the number of historical operation data in the historical operation dataset is between the first threshold and the second threshold, establish the mapping relationship between the time period and the lighting control mode according to the historical operation dataset and the fast Fourier transform algorithm.
[0100] Specifically, the fast Fourier transform is a periodic feature extraction algorithm used to analyze the usage rhythm of historical patterns in the time dimension, that is, to identify which time periods in a day / week are frequently used for certain patterns. The purpose of this step is to extract the user's periodic lighting behavior and establish a preliminary mapping relationship between the time period and the mode when the historical data is not yet rich but has reached a certain scale. This method is better than the default rule, has a certain degree of personalization ability, and is more robust than sliding weighting during data - unstable periods.
[0101] S014. When the number of historical operation data in the historical operation data set is greater than the second threshold, establish a mapping relationship between the time period and the lighting control mode according to the exponentially weighted moving algorithm and the historical operation data set, where the first threshold is less than the second threshold;
[0102] The exponentially weighted moving algorithm is a dynamic update mechanism. Its core lies in the weighted accumulation of the mode selected by the user each time and the continuous attenuation of the historical weight, retaining the long-term trend while taking into account new preferences. In this step, when the data volume is sufficient, a behavior learning method is used to establish a high-precision and real-time updated time period-mode mapping relationship, replacing fixed rules or static frequency judgment, and improving the system adaptability.
[0103] S015. Determine the lighting control mode corresponding to the current time period according to the mapping relationship;
[0104] Specifically, use the time period as the index value to quickly query the lighting mode that should be adopted at the current time, ensuring both the intelligence of the control logic and the response speed.
[0105] S016. Control the lighting of the voice desk lamp according to the lighting control mode corresponding to the current time period.
[0106] The prediction result intelligently generated according to the historical behavior and time period is converted into actual light output parameters, enabling the end user to enjoy an automated lighting experience that conforms to habits and the environment without intervention.
[0107] During the execution process, the system passes the parameters in the target mode to the lamp control module (such as the driving IC), and drives the LED lamp beads to adjust to the specified brightness level, color temperature level or color combination. If combined with voice interaction, the adopted mode can be fed back to the user in real time to improve the interaction perception.
[0108] Through this step, the system completes the closed-loop control from data-driven to behavior response, enabling the desk lamp to truly have the ability to automatically adapt according to time and usage habits, which conforms to the development direction of intelligent lighting.
[0109] Preferably, when the number of historical operation data in the historical operation data set is between the first threshold and the second threshold, establishing a mapping relationship between the time period and the lighting control mode according to the historical operation data set and the fast Fourier transform algorithm includes:
[0110] S0131. Divide the preset time period according to the first preset granularity to obtain a plurality of first time slots;
[0111] In this step, the first preset granularity is the basic unit for dividing the time axis of the system, which can usually be set to 15 minutes, 30 minutes or 1 hour, and is used to split a day or other periodic time period into several continuous sub-time periods, namely the first time slot. The preset time period is generally 24 hours, so as to extract daily usage patterns. The time dimension is structured to provide a unified time reference framework for subsequent behavior frequency statistics and rhythm recognition. By dividing the time with a unified granularity, the distribution inconsistency problem caused by different time precision in historical data can be eliminated.
[0112] For example, when the preset time period is 24 hours, starting from 0:00 on the day, the time is divided equally according to the set granularity to obtain a fixed number of time slot numbers. For example, when the granularity is 30 minutes, 48 time slots will be generated, from T0 representing 0:00-0:30 to T47 representing 23:30-0:00. Each historical lighting data will be classified into the corresponding time slot for summary analysis.
[0113] S0132. Counting the usage frequency of the lighting control mode in each first time slot according to the historical operation data set;
[0114] In this step, the frequency of occurrence of different lighting control modes in each time slot is counted based on all historical operation data. For example, in the time slot T16, the night light mode appears 5 times, the reading mode appears 2 times, and the comfort mode appears 3 times, which is the original usage distribution of the time slot.
[0115] The purpose of this step is to capture the user's actual usage preferences in different time periods and provide real data support for the subsequent establishment of a mapping relationship between time and mode.
[0116] In specific implementation, the system traverses the historical data set, reads the time range corresponding to each record, and maps it to the corresponding time slot. Then, the lighting mode used in the time slot is recorded and the number of times it occurs is accumulated. After all time slots are counted, a time slot-mode frequency matrix will be formed as the basis for subsequent rhythm analysis.
[0117] S0133. Construct a time slot frequency vector according to the first time slot and the corresponding usage frequency;
[0118] This step is to vectorize the statistical results of the previous step. Each time slot can be regarded as a dimension, and its value is the most frequently occurring mode or the number of times each mode occurs in the time slot. The purpose of constructing the time slot frequency vector is to use the spectrum analysis algorithm to model the periodicity of the lighting behavior throughout the day.
[0119] Arrange the statistically obtained frequency data in chronological order into a one-dimensional vector according to the time slot numbers, and use numerical values in the vector to represent the intensity or dominance of the lighting behavior in each slot. For example, the value of each slot can be filled with the occurrence frequency of a certain main mode, or the weights of each mode can be added up to form a combined signal reflecting the lighting intensity and rhythm.
[0120] S0134. Process the time slot frequency vector according to the fast Fourier transform algorithm to obtain the spectral distribution of the time slot frequency vector;
[0121] Use the fast Fourier transform algorithm to transform the frequency vector and extract its energy distribution in the frequency domain. This operation can reveal whether there are obvious periodicities in the user's lighting behavior, such as the habit of using a specific mode at fixed time periods in the morning and evening every day. Thus, the original time series signal is transformed into a frequency domain signal to find the dominant periodic frequency, that is, the time distribution rhythm when the user is mainly active within a 24-hour cycle. The system transforms the time slot frequency vector through the fast Fourier transform algorithm, calculates the amplitudes and phases of different frequency components, and forms a spectral distribution map. In this spectrum, the frequency component with a larger amplitude represents a rhythm with stronger repeatability in the behavior.
[0122] S0135. Obtain the time slot sequence interval according to the main frequency component with the largest amplitude in the spectral distribution;
[0123] By identifying the main frequency component in the spectrum, determine the time period when the user's behavior repeats during the day. The time slot sequence corresponding to the main frequency is the active interval when the user frequently uses lighting. The purpose is to localize the rhythm characteristics to a specific time range, enabling the system to focus on the high-incidence areas of behavior to establish a more accurate pattern mapping, rather than averaging the whole day. The system extracts the time period corresponding to the main frequency according to the spectral distribution and reversely deduces its specific slot sequence on the time axis, such as the set of time slot numbers corresponding to 7:00 to 9:00 in the morning and 20:00 to 22:00 in the evening, etc. These time slot intervals will be the key analysis objects for subsequent preference mode judgment.
[0124] S0136. In the time slot sequence interval, count the cumulative occurrence frequencies of each lighting control mode;
[0125] Re-count the cumulative usage frequencies of different lighting control modes in the main frequency time slot sequence, aiming to further refine the pattern preference distribution within these time periods. Different from the full-cycle statistics before, here it only focuses on the high-active time periods, and the results can better represent the user's true preferences.
[0126] In the implementation process, the system extracts the data segments falling into the main frequency time slot interval from the original historical operation data, re-counts the control modes in them, and obtains a data distribution map of which lighting mode is more frequently used within a certain time period.
[0127] S0137. Perform weighted processing on the cumulative occurrence frequencies of each lighting control mode to establish a mapping relationship between time periods and lighting control modes.
[0128] Specifically, based on the previous statistics, a weight strategy is added for preference extraction. For example, for multiple modes with similar frequencies, certain preferential processing can be given by combining factors such as the most recent usage time and the frequency of user voice commands. Thus, the statistical results are transformed into an executable lighting control strategy, and the system's recognition ability for the main mode is enhanced through the weighted strategy to avoid misjudgment when the frequencies are close. The specific implementation includes: assigning a weighted score to each candidate lighting mode, selecting the one with the highest score as the main control lighting mode for the current time period, and finally establishing a mapping relationship with the main frequency time period and writing it into the system configuration table or the mapping buffer for direct invocation in subsequent control processes.
[0129] Preferably, when the number of historical operation data in the historical operation data set is greater than a second threshold, establishing a mapping relationship between a time period and the lighting control mode according to the exponential decay sliding window algorithm and the historical operation data set includes:
[0130] S0141. Divide a preset time period according to a second preset granularity to obtain a plurality of second time periods, where the second preset granularity is an integer multiple of the first preset granularity;
[0131] The second preset granularity in this step is used to re-divide the time period into analysis units for long-term preference learning. This granularity is an integer multiple of the first preset granularity. For example, if the first preset granularity is 15 minutes, the second preset granularity can be set to 30 minutes or 1 hour. This design aims to balance the time resolution and the stability of behavior statistics to establish a time framework required for a long-term user preference model. Compared with the first time slot, the second time period is more suitable for statistical learning because a larger time span can accommodate more data samples, thereby improving the convergence and stability of the model.
[0132] S0142. Establish an initial weight corresponding to a plurality of lighting control modes for each second time period according to the historical operation data set and the time slot sequence interval;
[0133] In this step, the "initial weight" is a preference estimate value assigned to different lighting modes within each time period, used to represent the user's tendency to use this mode within this time period. The "time slot sequence interval" comes from the high-frequency usage periods identified through Fourier transform or statistical results before, and these intervals can guide the initial weight assignment to be closer to the actual preference.
[0134] The purpose of this step is to provide a non-mean intelligent initialization scheme for the exponential sliding window learning algorithm, which can improve the accuracy and response speed of the early learning stage, especially in the case of big data, it can reduce the time required for learning convergence.
[0135] When implemented, the system will map the cumulative frequency of each mode in the main frequency time slot interval to the corresponding second time period, and then assign the initial weight according to the normalization principle. For example, if the night light appears 50 times and the reading mode appears 30 times in a certain period of time, the initial weights can be set to 0.625 and 0.375. For inactive time periods, a unified initial value or guide value (such as a mean of 0.25) can be set.
[0136] S0143. When the voice desk lamp is turned off, record the current lighting control mode and the corresponding second time period;
[0137] In this step, the system records the status of each user after use, and the recorded content includes: the lighting control mode currently used by the user, and the second time period during which the user used the lighting control mode.
[0138] The purpose of this step is to collect behavioral feedback data to drive the input of the exponential weighted update algorithm in real time, forming a closed-loop learning process. Compared with batch learning based on time periods, this approach is more suitable for edge real-time learning scenarios in IoT devices.
[0139] In the specific implementation, when the voice desk lamp is turned off, the system automatically calls the lighting record and maps its timestamp to the second time period. The record will then be input into the learning window of the time period as a new sample.
[0140] S0144. Update the initial weight corresponding to the current lighting control mode in the second time period according to the exponential decay sliding window algorithm, and perform exponential decay processing on the weights of all other lighting control modes in the second time period to obtain an updated target weight;
[0141] In this step, the system performs exponential weighted updates in the corresponding time period based on the newly recorded lighting control mode. The so-called exponential decay sliding window means that with the addition of each new behavior, the weight of recent behaviors increases and the influence of old behaviors gradually weakens, thus constructing a time-sensitive preference modeling mechanism.
[0142] The purpose of this step is to establish an adaptive weight mechanism that is sensitive to changes in user behavior, which can both maintain long-term stable preferences and respond to user preference shifts in a timely manner.
[0143] In specific implementation, the system first increases the weight of the current lighting mode (for example, accumulates it in proportion α), and at the same time attenuates the weights of other modes in the same time period according to the ratio of (1–α). Such updates can keep the weight structure evolving stably after each use, forming a dynamic evolution curve of different mode preferences within the current time period.
[0144] S0145. Normalize all target weights within each second time period to construct the probability distribution of each lighting control mode under this second time period;
[0145] In this step, all updated lighting mode weights will be normalized, that is, the sum of all weights is standardized to 1. The result of normalization is to construct a probability distribution of each mode within the current time period, reflecting the intensity of the usage preference of different lighting modes under this time period.
[0146] The purpose of this step is to convert the original weight values into an intuitive probability form, which is convenient for subsequent confidence judgment, mode selection and other operations, and at the same time enables the system to have a certain ability to tolerate uncertainty. Sum the target weights of all modes in the current second time period, and then divide the weight of each mode by the sum to obtain their respective probability values. For example, if the weights are 0.2, 0.3, and 0.5 respectively, the corresponding probabilities are 20%, 30%, and 50%.
[0147] S0146. Determine the target lighting control mode under this second time period according to the probability distribution and the preset confidence threshold, and establish a mapping relationship between this second time period and the target lighting control mode.
[0148] Specifically, according to the probability values of each lighting mode in the current time period, select the mode with the highest probability as the main control mode of this time period. At the same time, a confidence threshold is introduced for judgment: if the maximum probability is lower than the threshold (such as 60%), it means that the user behavior is scattered and unclear, and the system can choose to maintain the original mode unchanged or postpone the switch. The purpose of this step is to establish a mapping relationship that takes into account both stability and flexibility, ensuring that the system avoids frequent mis-switching when the user's preference is unclear and responds to the user's needs in a timely manner when the preference is significant. By comparing the maximum probability with the threshold, if the condition is met, the current time period can be bound to this mode, and the mapping relationship table can be updated. This mapping relationship can be used as the basis for subsequent startup mode recommendation or automatic switching to continuously optimize the user experience.
[0149] In an embodiment, when the startup instruction is obtained through the voice receiving module, before step S011, the method further includes:
[0150] In response to the voice instruction, collect the current voice data and execute the voice identity recognition algorithm to obtain the current user identity identifier;
[0151] In this step, "voice command" refers to any control statement input by the user through the voice receiving module, such as "turn on the light", "switch mode", etc. After receiving the voice signal, the system first calls the built-in voice recognition model to analyze the voice features to identify the speaker's identity.
[0152] The purpose of this step is to extract the user identity information through voice biometric technology without additional intervention in the user's operation, providing an entry for subsequent personalized control strategy matching. The system can use a local embedded voice recognition module or call a cloud recognition service to achieve individual recognition in a multi-user household.
[0153] For example, if the voice recognition model determines that the current speaker is "User A", the system will return the identity identifier A and pass this identifier into the control process as the index basis for subsequent reading of the lighting preference configuration.
[0154] Based on the acquisition of the current user identity identifier, all operations involving "historical mode", "operation dataset", etc. in S011–S016 need to add a user dimension index, that is, perform data operations with the current recognized identity as the key;
[0155] Specifically, the improved step S011 is: Obtain the current time period and the lighting control mode before shutdown corresponding to the current user identity identifier as the historical lighting control mode;
[0156] After receiving the power-on command, the system obtains the current user identity identifier through the previous steps, and then retrieves the historical operation dataset or the last used mode bound to this identity, instead of simply sharing the global dataset. In this way, even in a multi-user scenario, it can still be intelligently adapted according to personal usage habits.
[0157] The improved step S012 is: When the number of historical data for the current user identity identifier in the historical operation dataset is less than the first threshold, obtain the default mapping relationship between the time period and the lighting control mode according to the preset rule set;
[0158] The rule set is still executed with the currently recognized user identity as the index when there are no obvious personal preferences, to prevent confusion caused by cold start rules for different users;
[0159] The improved step S013 is: When the amount of data corresponding to the current user identity identifier in the historical operation dataset is between the first threshold and the second threshold, use the fast Fourier transform algorithm to extract periodic behavior features and establish a personalized mapping relationship between the time period and the lighting control mode.
[0160] Only perform frequency statistics and spectrum analysis on the historical usage data of the current user to avoid interference from the superposition of different user behavior patterns on individual rhythm recognition.
[0161] The improved step S014 is as follows:
[0162] When the amount of data corresponding to the current user identity identifier in the historical operation dataset is greater than the second threshold, learning is performed according to the exponentially weighted sliding window algorithm, and an adaptive mapping relationship between the time period and the lighting control mode is established.
[0163] During implementation, each user separately maintains a set of weight models and sliding windows, avoiding the mutual coverage or conflict of the long-term preferences of different family members, and ensuring the continuity and accuracy of individual behavior learning.
[0164] Improve S015: Determine the lighting control mode corresponding to the current time period according to the mapping relationship, where the mapping relationship is retrieved based on the current user identity identifier, ensuring that the mode selection process maintains personalized independence;
[0165] All statistical and frequency vector construction operations of S0131–S0137 are limited to operate on the data subset associated with the current user identity identifier. All exponentially weighted sliding operations of S0141–S0146 use the current user identity identifier as the window division unit, and each user maintains an independent weight mapping for the second time period.
[0166] By synchronously performing voice identity recognition when receiving the power-on instruction, the system can automatically distinguish different family members and perform personalized lighting control according to their respective independent historical usage habits or preference strategies. It avoids the problem that all users share the same set of default settings in the traditional system, and improves the humanization and intelligence of lighting equipment. After identity binding, the historical usage data, behavior learning process, and mode mapping relationship of each user are independently stored and evolved, and will not cover or interfere with each other. Even if multiple users frequently alternate in using the table lamp, they can maintain their respective independent and coherent lighting experiences, greatly improving system stability and user satisfaction.
[0167] In the traditional non-identity recognition system, when a new user or different users perform a cold start, the system is prone to give inappropriate modes due to insufficient initial data. After introducing identity, each new user independently infers the control strategy based on their own small sample data during a cold start, which can avoid decision-making biases caused by the behavior history of others, and make the lighting mode more quickly and accurately adapt to personal needs. The independent data learning and mode mapping based on identity can not only adapt to daily power-on, but also combine time period characteristics (such as early morning, late at night), rhythm lighting habits, different identity scenarios (such as children, the elderly), etc. for more accurate light environment adaptation, truly realizing "customization according to people, time, and scenario".
[0168] Preferably, determining the mode switching rate according to the parameter difference includes
[0169] S31. Obtain the parameter difference, where the parameter difference includes the color temperature difference and the brightness difference;
[0170] In this step, the parameter difference refers to the numerical difference in the main control parameters between the current lighting control mode and the target lighting mode, including two dimensions: brightness (e.g., changing from 20% to 80%) and color temperature (e.g., changing from 2700K to 5000K). The system calculates these two differences to judge the amplitude of the lighting change involved in this switch, providing a basic quantitative basis for subsequent switching rhythm judgment and control strategy formulation. Different magnitudes of parameter differences represent different visual stimulation intensities, and the switching rate should match the degree of change to achieve a visually comfortable control effect.
[0171] S32. Determine the switching dominant parameter according to the order of magnitude relationship between the color temperature difference and the brightness difference, where the switching dominant parameter includes the brightness parameter and / or the color temperature parameter;
[0172] The switching dominant parameter in this step refers to the parameter that has a more significant impact on the user's visual perception during the current lighting mode switch, which is dynamically determined between color temperature and brightness. The system determines which parameter changes more drastically by comparing the order of magnitude relationship between the two, thereby determining the change dimension that should be preferentially adapted.
[0173] The purpose of this step is to identify the main cause that the user is most likely to perceive in the lighting change, thus avoiding visual impact caused by large-scale changes in multiple dimensions simultaneously. By distinguishing the dominant and secondary changes, the parameter adjustment can be completed in an orderly and phased manner, enhancing the naturalness and comfort of the visual transition.
[0174] In implementation, the system normalizes the brightness difference and the color temperature difference to the same perception scale, or uses empirical weights for conversion. For example, it is set that a 10% change in brightness is equivalent to a 500K change in color temperature, and then the converted values of the two are compared. If brightness is dominant, the system marks it as brightness dominant; if color temperature is stronger, it is marked as color temperature dominant; if the difference between the two is close, both dominant factors are marked. This mark will determine the selection path of the subsequent strategy. By dynamically identifying the dominant factor, the system can automatically adapt to different types of mode switches, avoid experience fragmentation caused by a rigid process, and enhance the intelligent response ability.
[0175] S33. Obtain the mode switching strategy according to the switching dominant parameter;
[0176] The core of this step is to select the most suitable strategy for the current dominant factor from the defined multiple strategy types. For example, if brightness is dominant, the brightness priority strategy is used; if color temperature is dominant, the color temperature priority strategy is used; if both are dominant, the staggered gradient strategy is adopted.
[0177] Its purpose is to establish a policy matching mechanism so that the lighting switching method not only responds to the magnitude of the change but also adapts to the type of change. Under different combinations of dominant factors, the system will adopt different parameter adjustment sequences, rate structures, and rhythm control methods.
[0178] S34. Determine the mode switching rate according to the mode switching policy and the parameter difference.
[0179] Specifically, under the established policy path, based on the previously obtained difference, a specific switching rate is dynamically generated to control the rhythm of the lighting parameter change process. The switching rate includes the brightness adjustment rate, the color temperature adjustment rate, and whether to set a stage interval or a segmented beat.
[0180] Preferably, the obtaining of the mode switching policy according to the switching dominant parameter includes:
[0181] S331. When the switching dominant parameter is the brightness parameter, determine the brightness adjustment rate and the color temperature adjustment rate according to the brightness difference and the color temperature difference;
[0182] Specifically, when the switching dominant parameter is the brightness parameter, based on the target difference between the current brightness and the color temperature, the adjustment rates of the brightness and the color temperature in this switching are calculated respectively. The brightness adjustment rate reflects the change speed required for the table lamp to change from the current brightness to the target brightness, and the color temperature adjustment rate is used for the transition rhythm of the subsequent color temperature change part.
[0183] In implementation, a rate interval higher than the default value can be allocated according to the brightness difference, for example, between 10% - 20% / second; while the color temperature difference will be allocated a low rate interval, for example, 100K - 300K / second, as the subsequent slowly changing parameter. The two respectively generate rate control instructions for the specific control in the subsequent driving stage.
[0184] S332. Determine the delayed execution time of the color temperature adjustment according to the order of magnitude relationship between the brightness difference and the color temperature difference;
[0185] In this step, the delayed execution time refers to the time interval when the system delays starting the color temperature adjustment after completing the brightness adjustment. The delay time can be dynamically adjusted according to the degree that the brightness difference is much larger than the color temperature difference to avoid simultaneous mutations of the two parameters.
[0186] The purpose of this step is to avoid the visual load on the human eye caused by the simultaneous large changes in brightness and color temperature during the lighting switching process, especially when used at night, when getting up at night, or in a low-light environment. Mutations are likely to cause discomfort or glare.
[0187] The system can be set so that when the brightness difference reaches more than twice the color temperature difference value, the color temperature starts to be delayed, for example, it starts to execute after a delay of 1 second to 3 seconds; if the differences are similar, a short delay or no delay can be set. This delay mechanism allows users to first adapt to the brightness change and then gradually perceive the color temperature transition, improving the naturalness of the overall switching rhythm.
[0188] S333. Determine the brightness-priority mode switching strategy according to the brightness adjustment rate, color temperature adjustment rate, and color temperature adjustment delay time;
[0189] This step combines the adjustment rates and execution timings obtained in the previous two steps to construct a complete brightness-priority switching strategy. This strategy is an execution process template that defines the order, start time, change rate, and execution rhythm of each parameter adjustment. Thus, the strategy is transformed from an abstract logic into an executable model, facilitating the subsequent rate control module to gradually complete the control process according to this strategy.
[0190] The system writes this strategy structure into the control instruction queue: the first stage is the rapid brightness adjustment stage, the second stage is the slow color temperature change stage, with the delay time as the transition in between. This control method is particularly suitable for mode switching scenarios such as daytime-reading, dark area-bright, etc. for users, taking into account both responsiveness and comfort.
[0191] S334. When the switching dominant parameter is the color temperature parameter, determine the color temperature adjustment rate and the brightness adjustment amplitude limit according to the color temperature difference value and the brightness difference value;
[0192] On the premise that the color temperature is the dominant parameter, the system first determines the adjustment rate of the color temperature and sets the adjustment range limit or whether to lock the brightness parameter unchanged. The color temperature adjustment rate determines the softness of the entire transition process, and the limit of the brightness adjustment amplitude is used to avoid disturbing light intensity changes in color temperature-sensitive scenarios.
[0193] The purpose of this step is to ensure that during the switching process mainly based on color temperature change, the brightness remains stable or has a smooth transition, thus avoiding affecting the color temperature perception or causing visual jumps.
[0194] The system will set the adjustment rate according to the color temperature difference value, for example, 100K to 200K per second, and determine whether the brightness change exceeds the preset tolerance range. If it exceeds, it is limited within ±10%, and if the difference is small, the brightness is completely locked unchanged. This strategy is particularly suitable for rhythmical lighting adjustment occasions such as using warm light-white light at night or automatic wake-up in the morning.
[0195] S335. Determine the brightness adjustment strategy according to the order of magnitude relationship between the color temperature difference value and the brightness difference value, where the brightness adjustment strategy includes adjusting the brightness after the color temperature adjustment is completed, or adjusting the color temperature while restricting according to the brightness adjustment amplitude;
[0196] This step is to make a strategy judgment on the non-dominant parameter brightness. Based on the comparison result of the difference between color temperature and brightness, the system determines one of the two strategies: one is to adjust the brightness after the color temperature adjustment is completed; the other is to synchronously adjust the brightness within the limit range while adjusting the color temperature.
[0197] The purpose of this step is to clarify the control sequence and parameter linkage strategy, and avoid the chaos of the system control rhythm or the overlap of execution.
[0198] The system can be based on empirical thresholds. For example, when the brightness difference is much smaller than the color temperature difference, the adjustment of brightness is postponed; if the brightness is small but cannot be ignored, the "linked slow change" method is adopted to synchronously fine-tune the brightness at each stage of the color temperature adjustment. This method helps to form a natural gradual light effect.
[0199] S336. Determine the mode switching strategy according to the color temperature adjustment rate and the brightness adjustment strategy;
[0200] This step summarizes the color temperature rate and brightness strategy of the previous two steps to generate the final color temperature priority switching strategy process template. This strategy will specify the adjustment sequence, the start and end times of adjustment, the duration of each stage, the way of brightness participation, etc. Its purpose is to transform the control rhythm with perception as the dominant goal into a lighting control plan that can be executed technically, ensuring a stable and smooth change experience dominated by color temperature in the end.
[0201] S337. When the switching dominant parameters include both the brightness parameter and the color temperature parameter at the same time, determine the brightness adjustment step size and the color temperature adjustment step size according to the brightness difference and the color temperature difference respectively;
[0202] This step is for the situation where both brightness and color temperature are determined to be dominant factors. The system assigns adjustment step sizes to the two parameters respectively, that is, the numerical amount adjusted within each small stage, for implementing a segmented and interleaved control method.
[0203] Its purpose is to split the large-range parameter change into several small steps to form a gentle alternating change process, and avoid the perception impact caused by the simultaneous mutation of multiple parameters.
[0204] The system will determine the adjustment step size according to the absolute value of the difference and the user setting (or environment). For example, if the brightness difference is 40%, the step size can be set to 5%, and if the color temperature difference is 2000K, the step size is 250K. The size of the step size determines the number of control stages and the degree of transition fineness.
[0205] S338. Determine the alternating adjustment strategy according to the proportional relationship between the brightness difference and the color temperature difference, where the alternating adjustment strategy includes the alternating adjustment sequence and the number of switching stages;
[0206] Specifically, according to the proportional relationship between the two differences, plan the order of alternating adjustment (which item to adjust first) and the stage division (how many stages are required to complete the switch). The goal is to implement a dynamic adaptation control structure that takes into account the control effects of the two dominant factors during the switching process and ensures the coordination of the entire transition rhythm.
[0207] For example, when the brightness difference is slightly greater than the color temperature difference, the system can be set to adjust the brightness first and then the color temperature; if the two are close, it can be set to alternate every 200 ms for several rounds. The system arranges the adjustment plan according to the step size and the number of stages to achieve a cyclic control mode of brightness - color temperature - brightness - color temperature.
[0208] S339. Determine the mode switching strategy according to the adjustment step size and the alternating strategy.
[0209] This step integrates the aforementioned brightness step size, color temperature step size, and alternating rules to generate the final dual - dominant control strategy flow table. The content of the strategy includes the adjustment order, the duration of each round, the adjustment amplitude, and the interruption conditions.
[0210] Its purpose is to simulate a gradual change effect closer to the natural light change through gradual and staggered changes, enhancing the intelligence and comfort of the lamp, and is especially suitable for scene - atmosphere lighting and dynamic scenario switching.
[0211] The controller will generate a set of timing control instructions to finely adjust the light output curve according to the staggered strategy, achieving a gradual and gentle switching effect and avoiding discomfort to the user caused by sudden parameter jumps.
[0212] Embodiment 2
[0213] Please refer to Figure 4 , the embodiment of the present invention provides a voice - controlled table lamp control device based on mode memory. The voice - controlled table lamp includes a voice receiving module and a touch module for receiving voice instructions. The device includes:
[0214] An illumination module, configured to control the voice - controlled table lamp to perform illumination according to the historical illumination control mode in response to a power - on instruction;
[0215] A difference acquisition module, configured to acquire the parameter difference between the target switching mode and the current illumination control mode in response to a mode switching instruction;
[0216] A switching rate determination module, configured to determine the mode switching rate according to the parameter difference;
[0217] A mode switching module, configured to control the voice - controlled table lamp to perform mode switching according to the mode switching rate, where the power - on instruction and the mode switching instruction are obtained through the voice receiving module or the touch module.
[0218] It should be noted that each module and each unit in the voice desk lamp control device based on pattern memory in this embodiment correspond one by one to each step in the voice desk lamp control method based on pattern memory in the foregoing embodiment. Therefore, the specific implementation manner of this embodiment may refer to the implementation manner of the foregoing voice desk lamp control method based on pattern memory, and will not be elaborated here.
[0219] Embodiment 3
[0220] In addition, the voice desk lamp control method based on pattern memory described in combination with Figure 2 the embodiments of the present invention can be implemented by an electronic device. Figure 5 The schematic diagram of the hardware structure of the electronic device provided by the embodiments of the present invention is shown.
[0221] The electronic device may include a processor and a memory storing computer program instructions.
[0222] Specifically, the foregoing processor may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
[0223] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of, for example, read-only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
[0224] The computer-readable medium includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information may be computer-readable instructions, data structures, program modules or other data. Examples of the computer storage medium include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device. As defined herein, the computer-readable medium does not include transitory computer-readable media, such as modulated communication signals and carrier waves.
[0225] The processor reads and executes the computer program instructions stored in the memory to implement any one of the above-described pattern memory-based voice desk lamp control methods in the embodiments.
[0226] In one example, the electronic device may further include a communication interface and a bus. Among them, as Figure 5 shown, the processor 401, the memory 402, and the communication interface 403 are connected through the bus 410 to complete communication with each other.
[0227] The communication interface is mainly used to implement communication between various modules, devices, units, and / or devices in the embodiments of the present invention.
[0228] The bus includes hardware, software, or both, and couples the components of the electronic device to each other. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses or a combination of two or more of these. In a suitable case, the bus may include one or more buses. Although the embodiments of the present invention describe and illustrate a specific bus, the present invention contemplates any suitable bus or interconnect.
[0229] Embodiment 4
[0230] In addition, in combination with the pattern memory-based voice desk lamp control method in the above embodiments, the embodiments of the present invention may provide a computer-readable storage medium to implement. Computer program instructions are stored on the computer-readable storage medium; when the computer program instructions are executed by the processor, any one of the above-described pattern memory-based voice desk lamp control methods in the embodiments is implemented.
[0231] It should be clear that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, the detailed description of known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present invention.
[0232] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0233] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices produce means for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0234] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing devices to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means that implement the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0235] These computer program instructions can also be loaded onto a computer or other programmable data processing devices, such that a series of operation steps are executed on the computer or other programmable devices to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable devices provide steps for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0236] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or apparatuses. However, the present invention is not limited to the order of the above steps, that is, the steps can be executed in the order mentioned in the embodiments, can be different from the order in the embodiments, or several steps can be executed simultaneously.
[0237] As described above, the above is only the specific implementation manner of the present invention. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described systems, modules, and units can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein. It should be understood that the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered within the protection scope of the present invention.
Claims
1. A voice desk lamp control method based on pattern memory, characterized in that, The voice-controlled table lamp includes a voice receiving module and a touch module for receiving voice instructions. The method includes: In response to a power-on instruction, control the voice-controlled table lamp to perform lighting according to the historical lighting control mode; In response to a mode switching instruction, obtain the parameter difference between the target switching mode and the current lighting control mode; Determine the mode switching rate according to the parameter difference; Control the voice-controlled table lamp to perform mode switching according to the mode switching rate, where the power-on instruction and the mode switching instruction are obtained through the voice receiving module or the touch module.
2. The method for controlling a voice desk lamp based on pattern memory according to claim 1, wherein, The step of, in response to a power-on instruction, controlling the voice-controlled table lamp to perform lighting according to the historical lighting control mode includes: In response to a power-on instruction, obtain the current time period and the lighting control mode before shutdown as the historical lighting control mode, where the lighting control mode includes a night lighting mode and several other lighting modes; Judge whether the current time period is a preset night time period and whether the historical lighting control mode is the night lighting mode; If the current time period is a preset night time period and the historical lighting control mode is the night lighting mode, control the voice-controlled table lamp to perform lighting according to the night lighting mode; If the current time period is not a preset night time period and the lighting control mode before shutdown is the night lighting mode, control the voice-controlled table lamp to perform lighting according to the lighting control mode before the night lighting mode.
3. The method for controlling a voice desk lamp based on pattern memory according to claim 1, wherein The step of, in response to a power-on instruction, controlling the voice-controlled table lamp to perform lighting according to the historical lighting control mode includes: Obtain the historical operation dataset of the voice-controlled table lamp, where the historical operation dataset includes several historical operation data, each historical operation data corresponds to a preset time period, and the historical operation data all include the lighting control mode when the voice-controlled table lamp is turned on and the corresponding operation time period; When the number of historical operation data in the historical operation dataset is less than the first threshold, obtain the mapping relationship between the time period and the lighting control mode according to the preset rule set; When the number of historical operation data in the historical operation dataset is between the first threshold and the second threshold, establish the mapping relationship between the time period and the lighting control mode according to the historical operation dataset and the fast Fourier transform algorithm; When the number of historical operation data in the historical operation dataset is greater than the second threshold, establish the mapping relationship between the time period and the lighting control mode according to the exponential weighted sliding algorithm and the historical operation dataset, where the first threshold is less than the second threshold; Determine the lighting control mode corresponding to the current time period according to the mapping relationship; Control the lighting of the voice-controlled table lamp according to the lighting control mode corresponding to the current time period.
4. The voice desk lamp control method based on pattern memory according to claim 3, characterized in that The step of, when the number of historical operation data in the historical operation dataset is between the first threshold and the second threshold, establishing the mapping relationship between the time period and the lighting control mode according to the historical operation dataset and the fast Fourier transform algorithm includes: Divide the preset time period according to a first preset granularity to obtain a plurality of first time slots; According to the historical operation dataset, count the usage frequency of the lighting control mode in each of the first time slots; Construct a time slot frequency vector based on the first time slot and the corresponding usage frequency; Process the time slot frequency vector according to the fast Fourier transform algorithm to obtain the spectral distribution of the time slot frequency vector; Obtain a time slot sequence interval based on the main frequency component with the largest amplitude in the spectral distribution; Within the time slot sequence interval, count the cumulative occurrence frequencies of each lighting control mode; Perform weighted processing on the cumulative occurrence frequencies of each lighting control mode to establish a mapping relationship between time periods and lighting control modes.
5. The voice desk lamp control method based on pattern memory according to claim 4, wherein When the number of historical operation data in the historical operation dataset is greater than the second threshold, establishing a mapping relationship between time periods and the lighting control mode according to the exponential decay sliding window algorithm and the historical operation dataset includes: Divide the preset time period according to the second preset granularity to obtain a plurality of second time periods, where the second preset granularity is an integer multiple of the first preset granularity; According to the historical operation dataset and the time slot sequence interval, establish an initial weight corresponding to a plurality of lighting control modes for each second time period; When the voice desk lamp is turned off, record the current lighting control mode and the corresponding second time period; Update the initial weight corresponding to the current lighting control mode in the second time period according to the exponential decay sliding window algorithm, and perform exponential decay processing on the weights of all other lighting control modes in this second time period to obtain the updated target weights; Perform normalization processing on all target weights within each second time period to construct the probability distribution of each lighting control mode under this second time period; According to the probability distribution and the preset confidence threshold, determine the target lighting control mode under this second time period, and establish a mapping relationship between this second time period and the target lighting control mode.
6. The method for controlling a voice desk lamp based on pattern memory according to any one of claims 1-5, characterized in that, The determining the mode switching rate according to the parameter difference includes Obtain the parameter difference, where the parameter difference includes a color temperature difference and a brightness difference; Determine the switching dominant parameter according to the order of magnitude relationship between the color temperature difference and the brightness difference, where the switching dominant parameter includes a brightness parameter and / or a color temperature parameter; Obtain a mode switching strategy according to the switching dominant parameter; Determine the mode switching rate according to the mode switching strategy and the parameter difference.
7. The voice desk lamp control method based on pattern memory according to claim 6, wherein The obtaining a mode switching strategy according to the switching dominant parameter includes: When the switching dominant parameter is the brightness parameter, determine the brightness adjustment rate and the color temperature adjustment rate according to the brightness difference and the color temperature difference; Determine the delayed execution time of the color temperature adjustment according to the order of magnitude relationship between the brightness difference and the color temperature difference; Determine a brightness-priority mode switching strategy according to the brightness adjustment rate, the color temperature adjustment rate, and the color temperature adjustment delay time; When the switching dominant parameter is the color temperature parameter, determine the color temperature adjustment rate and the brightness adjustment amplitude limit according to the color temperature difference and the brightness difference; Determine a brightness adjustment strategy according to the order of magnitude relationship between the color temperature difference value and the brightness difference value, where the brightness adjustment strategy includes adjusting the brightness after the color temperature adjustment is completed, or restricting the brightness adjustment amplitude while adjusting the color temperature Determine a mode switching strategy according to the color temperature adjustment rate and the brightness adjustment strategy; When the switching dominant parameters include both the brightness parameter and the color temperature parameter, determine the brightness adjustment step and the color temperature adjustment step according to the brightness difference value and the color temperature difference value respectively; Determine an alternating adjustment strategy according to the proportional relationship between the brightness difference value and the color temperature difference value, where the alternating adjustment strategy includes the alternating adjustment order and the number of switching stages; Determine a mode switching strategy according to the adjustment step and the alternating strategy.
8. A voice desk lamp control device based on pattern memory, characterized in that, The voice-controlled desk lamp includes a voice receiving module and a touch module for receiving voice commands, and the device includes: An illumination module for controlling the voice-controlled desk lamp to perform illumination according to the historical illumination control mode in response to a power-on command; A difference acquisition module for acquiring the parameter difference between the target switching mode and the current illumination control mode in response to a mode switching command; A switching rate determination module for determining the mode switching rate according to the parameter difference; A mode switching module for controlling the voice-controlled desk lamp to perform mode switching according to the mode switching rate, where the power-on command and the mode switching command are obtained through the voice receiving module or the touch module.
9. An electronic device, characterized in that, Include: At least one processor, at least one memory, and computer program instructions stored in the memory, and when the computer program instructions are executed by the processor, the method described in any one of claims 1-7 is implemented.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by the processor, the method described in any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Light brightness control method and device of LED lamp, equipment and storage medium
CN117545121A
Dimming control system and method suitable for high-power light source
CN117693097A
Blue light adjusting method and system of conference all-in-one machine
CN119028256A
High-power LED lamp bead self-adaptive dimming method and system based on intelligent driving
CN119403013A
Intelligent light regulation and control method based on scene matching
CN119629810A
Cited By
Washing process switching method, electronic equipment and clothes processing equipment
CN120425545A
Task processing method and device based on intention recognition, equipment and storage medium
CN121117968A