Electronic device, smart lamp and lamp effect control method
By performing semantic quantification sorting and environmental perception on intelligent lighting effects, the problem of inconsistent lighting effect switching is solved, improving the comfort and interactivity of the user experience, and realizing adaptive and personalized control of the lighting atmosphere.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 深圳市慧谷启明科技有限公司
- Filing Date
- 2026-06-08
- Publication Date
- 2026-07-31
AI Technical Summary
Existing intelligent lighting control methods result in inconsistent lighting effect transitions when played randomly or in a fixed sequence, affecting user experience and lacking coordination in visual atmosphere and emotional expression.
By uniformly quantifying and sorting the semantic information of lighting effects, a lighting effect identifier sequence number is generated. Based on the lighting effect identifier sequence of the user's limited historical number of times, a random range is determined to achieve random selection, ensuring that the selection is within the semantically similar neighborhood. Combined with environmental sensors, the random factor is dynamically adjusted to break the predictability of the fixed order.
It achieves smoother and more comfortable lighting effect switching, provides a sense of novelty and fun of exploration, simplifies operation and enhances user engagement, and adapts to user preferences and environmental changes.
Smart Images

Figure CN122496969A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent lighting, and more particularly to an electronic device, an intelligent luminaire, and a method for controlling the lighting effect of the luminaire. Background Technology
[0002] Existing smart lighting technologies typically employ two main lighting effect control modes. The first mode is the user-selective mode, where users need to browse, preview, and select from a pre-stored lighting effect library via an application. This cumbersome process fails to meet users' needs for quickly obtaining suitable lighting effects. The second mode is the automated playback mode, which can be further subdivided into sequential loop playback and random playback.
[0003] In sequential loop playback mode, the lights switch effects in a fixed preset order. The switching path is predictable, and users can easily anticipate the next effect after repeated use, quickly leading to aesthetic fatigue and a loss of the novelty brought by the changing lights. While random playback mode breaks the predictability to some extent, its randomness is completely unrestrained.
[0004] For example, in film and television shooting scenarios, random number generators are integrated into lighting fixtures to simulate the random fluctuations in lighting parameters for special effects such as flames and lightning. This randomness only affects the minor perturbations of parameters such as brightness and color within a single special effect, rather than selecting from predefined lighting effects with complete atmospheric semantics. Similarly, in decorative lighting scenarios, there exists a random lighting device where multiple light-emitting units can autonomously and randomly change within set brightness and flicker period parameters to create effects such as starlight and candlelight. However, this randomness is essentially the random generation of the basic light-emitting parameters of the lighting fixture, rather than selection from a structured, diverse, and complete library of lighting effects.
[0005] Whether playing in a sequential loop or using the two completely random or parameter-random playback modes mentioned above, a common user experience problem arises in practical applications: the visual atmosphere and emotional expression between successive lighting effects may lack connection, or even exhibit abrupt jumps. For example, a user might have just experienced a tranquil and soothing forest-colored lighting effect, only to have the system immediately switch to a lively and bustling festive effect. This abrupt switch disrupts the overall harmony and continuity of the lighting environment, causing user discomfort and affecting the immersive lighting experience. The root cause lies in the fact that existing control methods fail to effectively guide and constrain the continuity and coordination of lighting effect switching while ensuring novelty and convenience in selection.
[0006] Therefore, the technical problem that needs to be solved in the existing technology is that it has not been able to effectively avoid the experience jump and the lack of atmosphere caused by completely random or fixed sequence playback, resulting in a poor user experience obtained by random playback of lighting effects. Summary of the Invention
[0007] The primary objective of this application is to provide an electronic device, a smart lighting fixture, and a lighting effect control method for solving at least one of the aforementioned problems.
[0008] To achieve the various objectives of this application, the following technical solution is adopted: A method for controlling the lighting effect of a luminaire, provided to meet one of the purposes of this application, comprises: In response to a user-triggered single-time random lighting effect playback command, the corresponding random factor and its random range are determined. The random range is determined based on the user's limited historical number of times by associating the lighting effect identifier sequence randomly applied by the command. A random number within the random range is generated based on the random factor, and the random number is mapped to the target lighting effect identifier; The target lighting effect corresponding to the target lighting effect identifier is called from the preset lighting effect library and played in the target lighting fixture. The lighting effect library contains multiple lighting effects carrying lighting effect identifiers, and the lighting effect identifier is a sequence number determined by uniformly quantifying and sorting the semantic information of all the lighting effects.
[0009] A lighting effect control device for a lamp, provided to meet one of the purposes of this application, comprises: The instruction response module is configured to respond to a user-triggered single instruction to randomly play light effects, and to determine the corresponding random factor and its random range. The random range is determined based on a limited number of historical user attempts by associating the light effect identifier sequence randomly applied by the instruction. The identifier determination module is configured to generate a random number within the random range based on the random factor, and map the random number to the target lighting effect identifier; The application playback module is configured to call the target lighting effect corresponding to the target lighting effect identifier from the preset lighting effect library and play it on the target lighting fixture. The lighting effect library contains multiple lighting effects carrying lighting effect identifiers, and the lighting effect identifier is a sequence number determined by uniformly quantifying and sorting the semantic information of all the lighting effects.
[0010] For one purpose of this application, this application also provides an intelligent lighting fixture, which includes a processor, a memory, and a plurality of LED beads and their driving circuits arranged in a predetermined physical layout. The processor is configured to call a computer program from the memory to execute the steps of the lighting effect control method of the lighting fixture, with the intelligent lighting fixture as the target lighting fixture, and drive each LED bead to play the target lighting effect through the driving circuit.
[0011] For the purposes of this application, this application also provides an electronic device, including a processor and a memory, characterized in that the processor is configured to call a computer program from the memory to perform the steps of the lamp effect control method.
[0012] On another aspect, a computer-readable storage medium is provided to suit another purpose of this application, which stores in the form of computer-readable instructions a computer program implemented according to the described lighting effect control method, which, when called by a computer, executes the steps included in the corresponding method.
[0013] Compared to traditional technologies, this application generates lighting effect identifiers with an inherent logical order by uniformly quantifying and sorting the semantic information of lighting effects. Responding to a user's single random command, it determines the range of random selection based on the user's limited historical sequence of lighting effect identifiers, thus achieving a creative improvement in the lighting effect playback method of smart lighting fixtures. While ensuring extremely simple operation, it effectively solves the problems of disjointed lighting atmosphere and fragmented experience caused by the lack of constraints in traditional random playback. Crucially, it cleverly limits random selection to a semantically similar neighborhood to the user's recent experiences, thereby ensuring the continuity and coordination of visual atmosphere and emotional expression between different lighting effects, significantly improving viewing comfort and immersion. At the same time, the dynamically changing selection range and the randomness of the final result break the predictability of fixed-sequence playback, continuously bringing users a sense of novelty and exploratory fun. Therefore, without complex settings, it can adaptively understand and respond to the user's implicit preferences, achieving a good balance between simplified interaction, rich experience, and ensured comfort, greatly optimizing the random playback function of smart lighting fixtures. Attached Figure Description
[0014] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 This is a flowchart illustrating a typical embodiment of the lighting effect control method of this application; Figure 2 This is a schematic diagram of the graphical user interface implemented based on the lighting effect control method of this application, in which random controls are shown; Figure 3 This is a schematic diagram of the graphical user interface implemented based on the lighting effect control method of this application, used to show that the lighting effect library of this application contains multiple categories of lighting effects; Figure 4 This is a schematic block diagram of the lighting effect control device of this application; Figure 5 This is a schematic diagram of the structure of an electronic device used in this application. Detailed Implementation
[0015] The technical solution provided in this application can be applied to various smart lighting fixtures, enabling them to intelligently select and play new lighting effects that coordinate with the user's recent experience atmosphere from a pre-stored rich library of lighting effects when responding to simple random playback commands from the user. This achieves a convenient, fun, and comfortable interactive lighting experience. To realize this function, the smart lighting fixtures carrying the technology of this application typically include, in their basic physical structure, multiple LED beads that can independently or in groups control their emission color and brightness, a core processor for processing and control, a memory for storing programs and data, and a drive circuit electrically connected to the LED beads. The processor is communicatively connected to the memory and can call and execute the program instructions stored in the memory, thereby running the lighting effect control method of this application. The result of running this method is that the processor generates precise control instructions according to the method logic, and converts these instructions into electrical signals that can safely and effectively drive the LED beads to emit light through the drive circuit, ultimately rendering the dynamic light effect of the selected target lighting effect within the illumination area.
[0016] One product form of the technical solution in this application can be a standalone smart lamp with independent interaction and control capabilities, such as a smart ceiling light, a smart table lamp, or a decorative ambient light strip. In such products, the processor, memory, driver circuit, and LED chips are typically highly integrated within the same lamp body. The processor, such as a microcontroller, serves as the control core and is responsible for executing the algorithm steps of the method described in this application and generating control signals. The driver circuit is responsible for converting these signals into power signals suitable for driving the LED chips. Users interact with the lamp through a dedicated application on a mobile terminal or through physical buttons on the lamp body. When a user triggers a single random lighting effect playback command through the aforementioned interface, the command is transmitted to the processor inside the lamp, thereby initiating the method flow defined in this application.
[0017] However, the technical solution of this application is not limited to single smart lamps. Its architecture has good flexibility and can support implementation in distributed smart lighting systems. For example, in a whole-house smart scenario, multiple smart lamps can be networked together via wireless communication methods such as Wi-Fi or Bluetooth Mesh. Under this architecture, the method of this application can be deployed in a smart home hub, cloud server, or application on a user's mobile terminal. When a user triggers a random command, the central device that has deployed this method executes it, generates a control scheme, and then distributes the specific playback command to one or more target lamps in the network for execution. Regardless of whether the product adopts an integrated or distributed control hardware architecture, the internal logic and implementation process of the technical solution protected by this application are unified and universal.
[0018] The lighting effect control method proposed in this application has broad application prospects and can be adapted to various indoor scenarios that require creating specific lighting environments, such as home living rooms, office rest areas, commercial displays, and hotel rooms. It aims to solve the problems of cumbersome operation or abrupt experience in traditional lighting effect selection methods. Through intelligent finite random logic, it significantly improves the continuity and comfort of lighting switching while ensuring ease of operation and a fresh experience.
[0019] The lighting effect library required to drive this intelligent random function is the foundation of the technology. This library pre-stores multiple complete lighting effect data packages, each defining a complete visual sequence presented by the lighting fixture during playback, including color, brightness, and their dynamic changes. One improvement of this application is that each lighting effect in the library is assigned a lighting effect identifier with a specific meaning. This identifier is not an arbitrary number, but rather a sequence number generated by uniformly quantifying and sorting the semantic information of all lighting effects according to the technical means detailed in subsequent embodiments of this application. This globally ordered sequence of numbers provides the basic data structure support for the algorithm to understand the atmospheric correlation between lighting effects and achieve intelligent, finite random selection.
[0020] At the software implementation level, the lighting effect control method of this application is specified as a series of computer program instructions executable by a processor. This program is typically stored as firmware in the non-volatile memory of the lighting fixture, or installed as an application on external devices such as mobile terminals or smart home hubs. When the program is run in response to the user's random playback command, it follows the specific technical path detailed in the subsequent embodiments of this application, dynamically determines the random selection range and generates the final target based on the aforementioned semantically ordered lighting effect identifiers and the user's historical playback sequence, thereby achieving intelligent control of the lighting fixture.
[0021] It should be noted that the lighting effect control method of this application has a flexible execution entity. It can be deployed directly on the processor inside the smart lighting fixture as firmware, as described above, or it can be a computer program that can be installed and run on an external electronic device, such as an application on a user's smartphone, tablet, or smart home hub. In the latter implementation, the external device undertakes the core algorithm calculation and control decision generation work, while the smart lighting fixture mainly serves as a controlled display terminal. This architecture can fully utilize the stronger computing power and richer interactive interface of the external device.
[0022] The following section will elaborate and explain in detail the implementation and steps of the technical solution claimed in the claims of this application, with reference to several specific embodiments.
[0023] Please see Figure 1This application further provides a method for controlling the lighting effect of a lamp, which can be executed by an electronic device or a smart device, and includes the following steps: Step S5100: In response to a user-triggered single-time random lighting effect playback command, determine the corresponding random factor and its random range. The random range is determined based on the user's limited historical count by associating the lighting effect identifier sequence randomly applied by the command. The triggering methods for a single random playback command of lighting effects, initiated by a user, are diverse. In one embodiment, the user can trigger it by pressing a dedicated physical button on the physical control panel of the smart lighting fixture. In another embodiment, the user can trigger it through a dedicated application running on a mobile terminal device such as a smartphone or tablet, by clicking... Figure 2 The command is triggered by a prominently displayed shuffle virtual control in the graphical user interface shown. This virtual control can be an icon, a button, or other interactive graphical element. In a more integrated smart home environment, the command can also be triggered by a voice assistant receiving specific voice commands from the user, such as "randomly switch lighting effects."
[0024] Upon responding to this instruction, two parameters can be determined: the random factor and the random range. The random factor is the seed or initial value that drives the subsequent random number generation process, determining the specific value of the random number. The random range defines the allowed range of values for this random number generation; this range is an integer interval, corresponding to the sequence of light effect identifiers in the light effect library of this application.
[0025] The specific implementation methods for determining the two parameters, random factor and random range, can be diverse, and this application does not limit them to using the same or different technical sources. In one embodiment, both the random factor and random range can be dynamically determined. In another embodiment, the random factor can be preset to a fixed value or selected from a set of preset values, while the random range can be dynamically generated, for example, dynamically correlated and determined based on the user's historical behavior. Conversely, the random factor can also be dynamically generated, for example, based on real-time environmental data, while the random range can be preset to a fixed sequence interval.
[0026] The random factor can be determined based on various data sources. In one embodiment, the random factor can be a difficult-to-predict pseudo-random number seed generated by the system clock or hardware noise sources. In another embodiment, the random factor can originate from real-time monitoring of the environment in which the lighting fixture is located, for example, real-time data streams collected by environmental sensors, which are then processed and transformed using specific features. The determination of the random range can be closely related to the user's historical behavior. In one embodiment, the random range can be determined based on a finite number of historical instances of the user using the sequence of lighting effect identifiers applied by the random playback command. Here, the sequence of lighting effect identifiers refers to the sequence of lighting effect identifiers applied by the user after triggering the random playback command and successfully playing the lighting effect several times in the past, arranged in chronological or reverse order of application time. The finite number of historical instances is a positive integer set to balance the real-time performance of the algorithm with historical relevance, such as the most recent 1 time, 5 times, 10 times, etc. When determining the random range based on the sequence of lighting effect identifiers, it can be derived by calculation or inference based on the user's recent preferences or experience trajectory reflected in this historical sequence.
[0027] To support the above logic, this application presupposes a structured lighting effect library. This library contains a rich variety of lighting effects, such as... Figure 3 The demonstration shows that these multiple lighting effects can be categorized for users to select and apply. In this application, the lighting effect library is an ordered set established by uniformly quantifying and sorting the semantic information of the lighting effects. Each lighting effect in the library carries a lighting effect identifier, which is a globally unique serial number in the library. This serial number is not a random number, but rather it is obtained by processing and quantifying the semantic information of all lighting effects, such as the emotions conveyed by their colors and the atmosphere created by their dynamic patterns, through the preset algorithm of this application, and finally mapping it to a one-dimensional numerical sequence with monotonically increasing or decreasing characteristics. For example, a blue gradient lighting effect conveying the atmosphere of "tranquil deep sea" and an orange-red gradient lighting effect conveying the atmosphere of "sunset glow" may obtain adjacent serial numbers after quantization and sorting because they both belong to the category of "natural and soothing"; while a fast-flashing lighting effect of "festive neon" may have a serial number far away from the aforementioned two. This data structure allows the subjective perception of the distance between lighting effects to be approximated by the mathematical distance between their identifier numbers, thus providing a computational basis for intelligent selection based on sequence numbers that ensures the continuity of the atmosphere.
[0028] Step S5200: Generate a random number within the random range based on the random factor, and map the random number to the target lighting effect identifier; Once the random factor and random range are determined, a random number belonging to the determined random range can be generated based on the random factor. The specific implementation of generating the random number can employ various pseudo-random number generation algorithms well-known to those skilled in the art. In one embodiment, the determined random factor can be used as the seed value for initializing the pseudo-random number generator, and then the generator can be called to generate a random integer that follows a uniform distribution on a specified probability distribution. In another embodiment, if the random factor itself is already a qualified random number, it can be directly mapped or adjusted to the random range. For example, if the random factor is a floating-point feature value extracted from environmental data, ranging from 0 to 1, then a preset linear scaling formula can be used to map this floating-point number to the integer interval corresponding to the random range, and then rounded to obtain an integer random number.
[0029] The generated random number is used to point to a specific location in the lighting effect library. Therefore, this random number needs to be mapped to a target lighting effect identifier. Since the lighting effect identifier itself is a globally unique, monotonically increasing sequence number, corresponding one-to-one with the storage index or logical order of the lighting effect library, the essence of this mapping relationship is to determine a corresponding lighting effect identifier. In one embodiment, this can be simplified to directly using the generated random number as the target lighting effect identifier, pointing to the corresponding target lighting effect. For example, if the random range is the integer interval [100, 150] from sequence number 100 to 150, and the generated random number is 125, then the target lighting effect identifier is 125. In another embodiment, if the storage structure of the lighting effect identifier has a fixed offset from the sequence number, the mapping operation can include a simple addition or subtraction operation. The key is that, through mapping, a meaningless random number generated by the algorithm is transformed into a lighting effect identifier with a clear direction and a specific position in the semantic order of the lighting effect library, which uniquely corresponds to a target lighting effect in the library.
[0030] The target lighting effect, determined by a randomly selected point driven by a random factor and with a randomized, unpredictable range of constraints, inherits the semantic coherence guaranteed by the random range—that is, the target lighting effect identifier must fall within the sequence neighborhood similar to the user's recent experience—while also injecting a sense of novelty and unpredictability into the result through random numbers. For example, even if the user triggers the command multiple times, due to the randomness of the random factor and the random number generation process, even if the random ranges are similar, the final mapped target lighting effect identifier will rarely repeat, thus continuously providing the fun of exploration within a coherent experience.
[0031] Step S5300: Call the target lighting effect corresponding to the target lighting effect identifier from the preset lighting effect library and play it in the target lighting fixture. The lighting effect library contains multiple lighting effects carrying lighting effect identifiers. The lighting effect identifier is a sequence number determined after uniformly quantifying and sorting the semantic information of all the lighting effects.
[0032] Once the target lighting effect identifier is determined, it will serve as a unique index for retrieving and calling the corresponding data package in the lighting effect library. The target lighting effect corresponding to the target lighting effect identifier is a pre-packaged lighting effect data package in the lighting effect library that contains complete light emission control instructions. This data set defines a complete set of information that enables the target lighting fixture to physically present a specific dynamic lighting effect. For example, it may include, but is not limited to, the color and brightness value that each LED should present at each point in time during the playback cycle, as well as the timing and interpolation curves that control the changes in color and brightness over time.
[0033] The essence of retrieving a target lighting effect is to search for and retrieve the corresponding lighting effect data from the lighting effect library's storage medium, such as from the local device's memory or from a cloud server, based on the target lighting effect identifier. In one embodiment, the lighting effect library is stored in memory as an array or hash table data structure, with the target lighting effect identifier directly used as the array index or hash key, thereby efficiently locating and retrieving the corresponding lighting effect data package. In another embodiment, the lighting effect library is stored as a database, with the target lighting effect identifier serving as the primary key of a database record. A query statement is executed to retrieve the corresponding data record, from which the corresponding lighting effect data package is read.
[0034] After obtaining the target lighting effect data packet, it is applied to the playback stage of the target lighting fixture. During playback, the abstract visual descriptions and control commands in the lighting effect data packet can be converted into specific, time-precise electrical control signals that can drive the physical light-emitting elements of the target lighting fixture to generate corresponding light signals. This conversion and execution process may vary in its specific implementation entity and path depending on the system architecture described in this application.
[0035] In one embodiment, when the processor executing the method of this application is a microcontroller built into a smart lamp, the application playback process is completed entirely within a closed loop inside the lamp. The processor reads the target lighting effect data from the lighting effect library and, according to its internally defined timing and control logic, parses it into a sequence of driving parameters for each independently addressable LED chip or group of LED chips within the lamp. These driving parameters are then sent to a driving circuit connected to the processor. The driving circuit, such as an array of multiple constant current driving chips, is responsible for receiving these low-level logic control signals and precisely converting them into power signals with specific current and voltage required to light up the LED chips, typically using pulse width modulation (PWM) for brightness modulation. Finally, these power signals are applied to each LED chip, causing all LED chips to emit light collaboratively according to the scheme defined by the target lighting effect, rendering the expected dynamic lighting effect in physical space.
[0036] In another embodiment, when the processor executing the method of this application is an external electronic device, such as a user's smartphone, the application playback process involves cross-device data transmission and coordination. After the external device generates the target lighting effect identifier, it may not store the complete lighting effect data packet itself, or it may not have the direct ability to drive the lighting hardware. In this case, the external device needs to send the playback instruction containing the target lighting effect identifier to the smart lighting fixture, which is the target lighting fixture, via a wireless or wired communication link. After receiving the instruction, the smart lighting fixture's internal controller retrieves the corresponding target lighting effect data from its local lighting effect library based on the received target lighting effect identifier and completes the aforementioned driving and playback process. Alternatively, another approach is for the external device to retrieve the complete target lighting effect data from the lighting effect library, encode it into a standardized control protocol data packet, such as using DMX512, DALI, or a manufacturer-defined proprietary protocol, and then send it to the target lighting fixture via the network. The target lighting fixture's communication module receives the data packet, parses it with its internal processor, and directly converts it into a drive signal to drive the LEDs to play, without needing to perform another lighting effect data lookup itself.
[0037] Regardless of the architecture used, the completion of the playback process signifies that the target light fixture begins to continuously output light consistent with the target lighting effect definition. Simultaneously, the target lighting effect identifier for this successful playback can be recorded and updated to the sequence of lighting effect identifiers randomly applied by the user through this random playback command. This updated historical sequence becomes one of the key contextual information relied upon to determine the new random range when the user triggers the random playback command again, thus enabling the method to operate continuously and adaptively. For example, assuming the target lighting effect identifier for this playback is 125, and its corresponding lighting effect is "Deep Blue Breath," identifier 125 is added to the end of the historical sequence after playback. When the user clicks the random button again, identifier 125 will be used as an important reference point when determining the new random range, thus making it more likely to make the next random selection within the neighborhood of lighting effects semantically similar to "Deep Blue Breath."
[0038] As can be seen from the above embodiments, this application improves the implementation method of random lighting effects and achieves many beneficial technical effects, including but not limited to: First, this application simplifies user operations while effectively avoiding the fragmented and inconsistent experience caused by completely random selection. By using the sequence number determined after uniformly quantifying and sorting the semantic information of all lighting effects as the lighting effect identifier, a globally consistent and atmospherically relevant internal logical order is established for the lighting effect library. When a user triggers a single random playback command, instead of making an equal-probability selection, the random range is determined based on the sequence of lighting effect identifiers that the user has randomly applied a limited number of times in the past. This cleverly constrains the random selection to the semantic sequence neighborhood that is similar to the user's recent experience atmosphere. In this way, each time the user presses the random button, the new lighting effect obtained maintains a certain proximity to the previously played lighting effect in terms of the global semantic order represented by the sequence number. This ensures a smooth transition and harmonious unity of atmosphere and emotion between the lighting effects in subjective perception, achieving atmospheric coherence under one-click randomization, and significantly improving the user's viewing comfort and immersion.
[0039] Secondly, this application cleverly breaks the predictability of a fixed-sequence playback mode, providing users with a continuous sense of novelty and exploratory fun. Although random selection is limited to a range determined based on historical sequences, this range is dynamically changing, and the final target light effect identifier is determined by random mapping within a random range using random factors. Therefore, the specific result remains unpredictable for the user, avoiding the monotony of knowing the next light effect in sequential playback and overcoming the abruptness that complete randomness might bring. While enjoying the surprise brought by convenient operation, users don't need to worry about the next light being out of place with their current environment or mood, thus making them more willing to continue using the random function, enhancing the product's fun and user stickiness.
[0040] Furthermore, this application combines a semantically quantified and sorted lighting effect library with an algorithmic logic that determines the random range based on historical sequence association, achieving intelligent adaptation to complex user preferences and scene requirements. Without requiring complex user profile modeling or explicit preference settings, it dynamically understands the user's recent atmosphere preferences simply by tracking a limited number of random playback history sequences, thus guiding the next random exploration direction. This adaptive mechanism can gradually align with the user's current mood or environmental needs through unconscious user actions, providing a lighting experience that is both personalized and novel, enhancing the interactive intelligence and emotional value of smart lighting fixtures.
[0041] Based on any embodiment of the method in this application, determining the corresponding random factor and its random range includes: Step S5111: Acquire real-time data streams characterizing environmental activity collected by environmental sensors; Environmental sensors are a collective term for various sensors, including but not limited to microphones, motion sensors, light sensors, temperature sensors, and image sensors, among others. These sensors continuously or periodically acquire raw physical signals from the external environment and output them as real-time data streams that can be read by a processor. For example, a microphone continuously acquires audio waveform data, forming a one-dimensional time-domain signal stream; an image sensor periodically captures image frames, forming a multi-dimensional visual data stream. These data streams contain information that reflects environmental energy, changes, or the frequency of events; this information is collectively referred to as a characterization of environmental activity.
[0042] In one embodiment, a single sensor, such as a highly sensitive microphone, can be used specifically to capture sound events in the environment, and its output audio stream can be used as a real-time data stream. In another embodiment, a combination of multiple different types of sensors can be used, such as combining a microphone with a human infrared sensor. The microphone's audio stream and the human activity signal stream detected by the infrared sensor are fused and processed together as a real-time data stream characterizing the overall environmental activity level.
[0043] Step S5112: Perform time-domain or frequency-domain feature analysis on the real-time data stream to extract target feature values for quantifying the environmental activity level; The purpose of performing time-domain or frequency-domain feature analysis on real-time data streams is to extract numerical representations, i.e., target feature values, from continuous, noisy raw sensor data, i.e., real-time data streams, which can effectively and stably quantify the level of environmental activity.
[0044] The specific implementation of feature analysis depends on the type of real-time data stream acquired and the specific dimensions of environmental activity to be represented. In one embodiment, when the real-time data stream is an audio waveform from a microphone, time-domain feature analysis can be performed. For example, the root mean square value of the audio signal amplitude within a preset time window can be calculated. This value directly reflects the average volume intensity within that time period and can serve as a quantitative indicator of the level of environmental sound activity. In another embodiment, frequency-domain feature analysis can be performed on the same audio stream. For example, the time-domain signal can be converted into a frequency-domain signal using a fast Fourier transform, and then the energy proportion within a specific frequency band can be calculated. For instance, calculating the energy within the main frequency bands of human voices can specifically quantify the activity level of human conversation in the environment, distinguishing it from background white noise.
[0045] In another embodiment, when the real-time data stream is a sequence of video frames from an image sensor, feature analysis can be performed on visual dynamics. For example, the differences in pixel values between consecutive video frames can be calculated, and the intensity of object movement or light changes in the scene can be quantified by calculating the number of differing pixels or the sum of the difference values, thus serving as a target feature value for the level of visual environmental activity. In yet another embodiment, when a motion sensor is used, feature analysis can directly read the sensor's output, which has already been internally processed, and the numerical value representing the number or intensity of detected motion events, and use it as the target feature value.
[0046] Feature extraction can be a periodic or event-triggered process. In one embodiment, feature analysis is performed on the real-time data stream within the latest time window at a fixed sampling interval, such as once per second, and a continuously updated sequence of target feature values is output. In another embodiment, feature analysis is triggered only when the data stream exceeds a certain threshold, indicating a significant environmental event. The extracted target feature values are scalars or low-dimensional vectors whose values are positively or negatively correlated with the level of environmental activity. For example, in audio analysis, a larger root mean square value indicates more active environmental sounds; in video analysis, a larger sum of inter-frame differences indicates more dramatic changes in the visual scene.
[0047] Step S5113: Convert the target feature value into a seed value that meets the input requirements of the pseudo-random number generator through a preset mapping relationship, and use the seed value as the random factor.
[0048] The target feature values extracted directly from the sensor data stream may not be compatible with the input format expected by the pseudo-random number generator in terms of their numerical range, distribution characteristics, or data type. Therefore, after extracting the target feature values used to quantify the level of environmental activity, the target feature values can be converted into a seed value that meets the input requirements of the pseudo-random number generator according to a preset mapping relationship.
[0049] The preset mapping relationship can include various specific mathematical transformations or data processing operations. In one embodiment, the mapping relationship can be a simple normalization and scaling operation. For example, suppose the target feature value is a non-negative floating-point number obtained by calculating the root mean square of the audio signal, with a theoretical range of zero to positive infinity, but the actual value usually falls between zero and an empirical maximum value. In this case, the preset mapping relationship can be to divide the target feature value by a preset empirical maximum value, mapping it to a normalized interval between 0 and 1, and then, according to the data type required by the pseudo-random number generator seed, for example, multiplying it by a large integer constant and rounding it down, to obtain an integer seed value within a range. In another embodiment, the mapping relationship can be a hash function. When the target feature value is a vector or a concatenated composite feature, it can be input into a preset hash function, such as a simplified implementation of MD5 or SHA series hash algorithms, to map feature data of arbitrary length to a fixed-length integer value with good discreteness, which can then be used as the seed value.
[0050] The mapping relationship can also be implemented by incorporating timestamps or other contextual information to further enhance the unpredictability of the seed value. In one embodiment, the preset mapping relationship can be to concatenate the target feature value with the current system timestamp or perform a bitwise XOR operation, and then apply a hash function to the result to generate the final seed value. This method ensures that even if the target feature values extracted twice consecutively are exactly the same, the final seed value will be different due to the change in timestamp, thus avoiding the problem of the random factor remaining unchanged in a static environment.
[0051] The generated seed value should conform to the input requirements of the selected pseudo-random number generator. In one embodiment, if the pseudo-random number generator used is a function in the standard library that requires an integer seed, then the mapping relationship must ensure that the final output is an integer. For example, in the C language standard library, the `srand` function accepts an unsigned int seed. Therefore, the pre-defined mapping relationship needs to convert the results of all processing steps into an integer value within the range of unsigned int. In another embodiment, if the algorithm used allows or requires the seed to be a byte array, then the mapping relationship may need to format the processing result into a byte sequence of a specific length.
[0052] Ultimately, the seed value obtained through the preset mapping relationship will be used as the random factor driving the subsequent random number generation process. This random factor essentially determines the initial value of the pseudo-random number generator's internal state, thus indirectly determining the specific value of the subsequently generated random number within the random range. In this way, the activity information in the environment, after feature extraction and mapping transformation, is effectively injected into the source of the lighting effect random selection algorithm, enabling the final lighting effect switching to have a non-mechanical, subtle correlation with the real-time dynamics of the environment at a microscopic level. For example, when the environment suddenly becomes noisy, the audio feature value increases, and the seed value generated by the mapping changes accordingly, which may ultimately lead to the random number generation result pointing to a lighting effect in a relatively more "active" or "intense" atmosphere area in the semantic order, realizing the implicit guidance of the environmental state on the lighting atmosphere.
[0053] The above embodiments, by dynamically generating random factors from real-time environmental data, establish an intrinsically computable relationship between the originally isolated and mechanical random playback process of lighting effects and the changing state of the physical environment. This allows the present application to further gain the technical advantages of environmental perception and contextual adaptation in solving the technical problem of balancing ease of operation and atmosphere coherence under one-click random playback. Specifically, by actively sensing and quantifying the activity of the environment using environmental sensors and converting it into seeds to drive random selection, the switching of lighting effects is not only subject to the inherent constraints of user historical preferences and the semantic order of lighting effects, but also incorporates an instant response to the current environmental dynamics at the source of each selection. This ensures a smooth transition between lighting effects and atmospheres, and endows the changes in lighting with additional contextual intelligence that corresponds to the environmental state. This elevates the interactive experience of smart lighting fixtures from passively responding to user commands to an organic component that can actively perceive and integrate into the surrounding environment.
[0054] Based on any embodiment of the method in this application, determining the corresponding random factor and its random range includes: Step S5121: Based on the user's limited historical number of times the light effect identifier sequence is randomly applied through the instruction, a representative benchmark light effect identifier is determined. The benchmark light effect identifier is the latest applied light effect identifier in the light effect identifier sequence or the average identifier corresponding to all light effect identifiers. To determine the random range, a reference position in the semantic order of lighting effects can be extracted from the user's recent interaction history, representing their current or recent experience tendencies. The user's limited historical number of interactions is recorded by a sequence of lighting effect identifiers randomly applied to trigger the random playback command in this application. This sequence records the identifiers of each lighting effect successfully experienced by the user within a limited time window, such as the most recent one, five times, or ten times, by clicking the random playback button. This sequence is arranged chronologically, reflecting the user's recent lighting experience trajectory. The baseline lighting effect identifier can be determined based on this sequence of identifiers.
[0055] The role of the baseline lighting effect identifier is to serve as an anchor point or center for subsequently determining the random range. In one embodiment, the most recently applied lighting effect identifier in the lighting effect identifier sequence can be directly determined as the baseline lighting effect identifier. The principle is that the user's most recent choice best represents their immediate preference or the atmosphere they are in. For example, if the user's most recently randomly played lighting effect identifier is 125, and the corresponding lighting effect atmosphere is "tranquil deep sea," then this random selection should be centered on 125, exploring the semantically adjacent area in order to continue the "tranquil" atmosphere.
[0056] In another embodiment, a mean indicator can be obtained by mathematically calculating all the indicator sequences in the light effect identifier sequence, and this mean indicator can be determined as the baseline light effect indicator. This method comprehensively considers the overall tendency of the user's recent multiple selections, rather than focusing only on the last one. When calculating the mean indicator, since the light effect identifier itself is a globally unique sequence number, its mean can be calculated using an arithmetic mean. For example, assuming that the light effect identifier sequence used by the user in the last three random applications is [120, 125, 130], then its arithmetic mean is (120+125+130) / 3=125, and this value of 125 can be used as the baseline light effect indicator for this time. This method helps to smooth out the randomness of a single selection, making the baseline point more reflective of the user's overall preference focus over a period of time.
[0057] In more complex embodiments, different weights can be assigned to identifiers at different time points in the sequence when calculating the mean, for example, assigning higher weights to more recent identifiers, thereby achieving a weighted average, so that the calculation result, while taking into account the history, also tends to favor recent selections.
[0058] It should be noted that, regardless of whether the latest identifier or the average identifier is used, the determined baseline lighting effect identifier must be a valid value existing in the global sequence of lighting effect identifiers in the lighting effect library. When the result of mathematical calculation according to the aforementioned embodiment cannot uniquely correspond to an existing lighting effect identifier in the lighting effect library due to non-integer or other reasons, the lighting effect identifier whose value is closest to the calculation result can be selected as the baseline lighting effect identifier.
[0059] Step S5122: Taking the reference lighting effect identifier as the center, determine the neighborhood interval in the sequence of lighting effect identifiers in the lighting effect library that does not contain any historical lighting effect identifiers that have been applied in the sequence of lighting effect identifiers, and determine the neighborhood interval as the random range.
[0060] After determining the baseline lighting effect identifier, a neighborhood interval can be identified as the center within the globally ordered sequence of lighting effect identifiers in the lighting effect library. This neighborhood interval will then be used as the random range for this random selection. The goal of determining the neighborhood interval is to define a semantically ordered region around the baseline point that can be randomly explored. The size and location of this region need to be calculated using specific rules.
[0061] In one embodiment, the neighborhood interval can be determined by extending a fixed number of values forward and backward from the baseline light effect identifier. For example, assuming the baseline light effect identifier is 125 and the preset fixed extension number is 10, the determined neighborhood interval is the integer closed interval [115, 135] from sequence number 115 to sequence number 135. This interval includes all valid light effect identifiers within 10 units before and after the baseline point in the sequence number. In another embodiment, the extension number can be dynamic rather than fixed, for example, it can be dynamically calculated based on the length of the user's historical selection sequence, the user's operation frequency, or the system's preset exploration activity parameters. For example, when the user's recent historical sequence is short, the extension number can be set larger to encourage broader exploration; when the historical sequence is long, indicating that the user has formed certain preference habits, the extension number can be appropriately reduced to make more refined recommendations.
[0062] However, simply defining a continuous interval may include lighting effect identifiers that the user has recently experienced. To ensure that each random selection provides a new experience and avoids replaying recently applied lighting effects, the determined neighborhood interval can exclude or not include any historical lighting effect identifiers that already exist in the lighting effect identifier sequence that the user has randomly applied through this command a limited number of times in history. There are several specific implementations for implementing this exclusion logic. In one embodiment, an original, continuous candidate neighborhood interval can be calculated first according to the aforementioned method, and then each number in this candidate interval can be traversed to check if it exists in the historical lighting effect identifier sequence. If it exists, the number is removed from the candidate interval. After filtering, the remaining set of valid numbers constitutes the final neighborhood interval that does not contain any historical identifiers. For example, if the base lighting effect identifier is 125 and the original neighborhood interval is [115, 135], but the historical sequence contains identifiers 118, 125, and 130, then after exclusion, the neighborhood interval will become a non-contiguous set, and this set will be used as the random range for this random selection.
[0063] In another embodiment, to avoid generating non-contiguous interval sets that would complicate subsequent random number generation, a dynamic boundary adjustment method can be employed. Specifically, to ensure that the final neighborhood interval contains at least one non-historical light effect identifier, the boundaries of the original interval are dynamically, symmetrically, or asymmetrically expanded until the newly expanded area contains a sufficient number of valid identifiers not in the historical sequence. For example, if the original interval [115, 135] has insufficient valid identifiers due to an excessive number of historical identifiers, the interval boundary can be expanded outward to [110, 140], and the check can be performed again until the number of valid identifiers within the interval meets a preset minimum requirement.
[0064] The determined neighborhood interval is essentially an ordered subset of the global sequence of light effect identifiers. All light effect identifiers within this subset are semantically similar to the baseline light effect identifier, ensuring the continuity of the atmosphere in the random selection results. At the same time, by excluding recently experienced historical identifiers, it ensures that each selection result is new and unique for the user, thus continuously injecting a sense of novelty into the coherent experience. For example, the baseline light effect identifier 125 corresponds to the "Tranquil Deep Sea" atmosphere. Its neighborhood interval [115, 135] may contain light effect identifiers with similar atmospheres such as "Twinkling Stars," "Moonlight Forest," and "Lake Ripples," but it excludes the recently played "Tranquil Deep Sea" itself. This ensures that the new light effect continues the "tranquil" tone in terms of atmosphere while providing new visual content.
[0065] In one embodiment, to prevent the random range from being confined to one end of the global sequence number sequence due to the accumulation of historical sequences, thus reducing exploration diversity, a loop boundary processing logic can be introduced when determining the neighborhood interval. Specifically, when the original neighborhood interval defined with the reference light effect identifier as the center exceeds the valid boundary of the global sequence number sequence of the light effect identifier, for example, if the lower limit of the interval is less than the minimum sequence number 1, or the upper limit of the interval is greater than the maximum sequence number N, the excess part is regarded as starting a loop again from the other end of the sequence. When calculating the valid neighborhood interval, the original interval is regarded as a loop with its head and tail connected on the sequence number sequence. For example, assuming the global sequence number sequence is 1 to 200, the reference light effect identifier is 195, and the preset expansion number is 20. According to conventional calculation, the original neighborhood interval should be [175, 215]. Since the maximum sequence number is 200, the upper limit of the interval 215 exceeds the boundary. At this time, the loop logic is applied to map the excess part [201, 215] back to the beginning of the sequence, which is equivalent to the interval [1, 15]. Therefore, the effective neighborhood interval after cyclic processing consists of two consecutive sub-intervals: [175, 200] and [1, 15]. When subsequently excluding historical identifiers and determining the final random range, operations can be performed on the union of these two sub-intervals. This cyclic processing method ensures that even if the reference point is close to one end of the sequence, the range of random exploration can smoothly extend to the other end of the sequence, thus breaking the blockage or exploration blind spots that physical boundaries may cause, and maintaining sufficient exploration breadth and global diversity in long-term use.
[0066] The above embodiments, by using the benchmark lighting effect identifier in the user's historical experience sequence as the center, dynamically define a neighborhood that excludes previously applied historical identifiers as the random range. This allows the application to not only solve the problems of operational convenience and atmosphere continuity, but also to further achieve the technical advantages of precise anti-repetition and guided exploration. It not only uses semantic sorting to ensure the continuity of the emotional tone of random selection, but also forces the algorithm to explore in the neighboring semantic space that the user has not experienced before and that is closely related to the current preference by actively excluding recent historical selections. This effectively breaks the trap of repeated recent experiences that may be caused by simple loops or complete randomness. On the basis of ensuring that each random result is a brand new experience, it guides users to make bounded and directional continuous discoveries along the semantic dimension of their interests, significantly enhancing the long-term effectiveness of random interaction and user participation.
[0067] Based on any embodiment of the method in this application, determining the corresponding random factor and its random range includes: Step S5131: Obtain the duration of the last time the user played the light effect through the command, and use the ratio of the duration of the last time to the preset duration as the adjustment coefficient affecting the random range this time; When determining the dwell time, the starting point for measurement can be the moment the target lighting effect begins playing, and the ending point is the moment the user performs any action that explicitly terminates the playback of that lighting effect. These actions include, but are not limited to, the user triggering a random playback command to switch to the next lighting effect, the user manually selecting another lighting effect, the user turning off the light fixture, or the light fixture automatically turning off due to a timer or sensor event. By recording the time interval from the start to the end of the target lighting effect's playback, the dwell time can be determined.
[0068] After obtaining the dwell time, it is compared with a preset duration. The preset duration can be a reference value set by the developer or algorithm based on experience, and its purpose is to provide a benchmark for judging user dwell behavior. In one embodiment, the preset duration can be set to a typical, reasonable time sufficient for the user to fully experience and judge a lighting effect, such as 30 seconds, 1 minute, or 2 minutes. In another embodiment, the preset duration can also be set according to the inherent playback cycle of the target lighting effect itself, for example, set to an integer multiple of the time required for the lighting effect to complete one cycle.
[0069] The ratio of dwell time to preset time can be used as an adjustment coefficient affecting the random range of this event. When the dwell time is less than the preset time, the adjustment coefficient is less than 1; when the dwell time is equal to the preset time, the adjustment coefficient is equal to 1; when the dwell time is greater than the preset time, the adjustment coefficient is greater than 1. The implicit logic is that the longer a user stays on a lighting effect, the more they may like or adapt to the atmosphere created by that effect, and therefore the larger the adjustment coefficient; conversely, a short dwell time may indicate that the user is not very interested or wants to switch quickly, and therefore the smaller the adjustment coefficient.
[0070] Step S5132: Determine the final random range based on the adjustment coefficient and the preset base range, so that the longer the dwell time, the wider the random range selected in this random selection.
[0071] The adjustment coefficient calculated above can be used in conjunction with a preset base range to determine the final random range. The preset base range defines a basic or initial amplitude for the random range. In one embodiment, the base range can be represented as a fixed number of values extending outwards from a certain reference point (e.g., a reference lighting indicator determined based on a historical sequence). For example, the base range can be represented as "±10", meaning that the basic selection interval is 10 numbers before and after the reference point.
[0072] The specific algorithm for determining the final random range ensures that the width of the randomly selected range is positively correlated with the adjustment coefficient; that is, the longer the dwell time, the wider the random range. A direct implementation is to multiply the expansion value defined by the base range by the adjustment coefficient, using the product as the actual expansion value for this application. The calculation formula is: Current expansion value = Base range expansion value × Adjustment coefficient. For example, if the base range is ±10 and the preset duration is 60 seconds, and the user previously stayed for 90 seconds with an adjustment coefficient of 1.5, then the current expansion value would be calculated as 10 × 1.5 = 15. This means the final random range will expand by 15 numbers to each side of the base point, expanding the range width from the original 21 numbers (-10 to +10, including the base point) to 31 numbers (-15 to +15, including the base point). Conversely, if the user only stayed for 30 seconds last time, the adjustment coefficient is 0.5, then the expansion value this time is 5, and the random range is narrowed to expand by 5 numbers to both sides from the base point.
[0073] In another embodiment, the combination of the adjustment coefficient and the base range can be achieved using a piecewise function or a lookup table. For example, multiple adjustment coefficient intervals can be set, each corresponding to a different range adjustment strategy. When the adjustment coefficient is greater than 1.2, a wide-range strategy is used; when the adjustment coefficient is between 0.8 and 1.2, a standard-range strategy is used; and when the adjustment coefficient is less than 0.8, a narrow-range strategy is used. Regardless of the specific calculation method used, the final effect is to adaptively adjust the initiative of the next random exploration based on the user's acceptance of the previous lighting effect. A long user dwell time is interpreted as positive feedback, thus providing a wider exploration space in the next instance, hoping that the user will discover more similar good lighting effects; a short user dwell time is interpreted as needing adjustment, thus narrowing the exploration range and making more cautious recommendations that are closer to recent preferences.
[0074] Through the above embodiments, this application, based on intelligent finite randomness based on historical sequences, further incorporates a refined response to real-time feedback on individual user actions. This enables the lighting effect recommendation system to not only have the ability to remember historical trajectories but also the ability to learn and adapt based on real-time feedback. It can more sensitively adapt to the changing emotions and preferences of users, thereby ensuring the continuity of the atmosphere while making each random interaction more personalized and intelligent.
[0075] Based on any embodiment of the method in this application, after calling the target lighting effect corresponding to the target lighting effect identifier from the preset lighting effect library and playing it in the target lighting fixture, the method includes: Step S6100: In response to the lighting effect collection event, count the total number of times the user has collected each lighting effect in the lighting effect library; Users can save the target lighting effects randomly determined in this application, such as... Figure 2 The "My Favorite Lighting Effects" section is shown in the image. Lighting effect favorites events are triggered when a user explicitly "favorites" or "adds to favorites list" a currently playing or viewed lighting effect through the application's interface. This action is a proactive and explicit expression of the user's preference for a specific lighting effect. When such an event is detected, the user's identifier, the favorited lighting effect's identifier, and the favorite timestamp are recorded in the background database.
[0076] The total number of light effects saved by users reflects their familiarity with or habitual use of the entire light effect library. Therefore, by statistically analyzing the light effects saved by users, their total number can be determined as the total number of saves. It should be noted that the scope of the statistics can be global, that is, counting the total historical number of all light effects in the library; or it can be based on a specific time window, such as counting the number of saves within the most recent month, to better reflect recent changes in user preferences.
[0077] Step S6200: Adjust the base range of the random range determined based on the total collection amount to change the number of light effect icons covered by the next redefined random range.
[0078] The base range is a preset or dynamically maintained fundamental parameter used to calculate the final random range. It can be a fixed extended quantity value (such as N in "baseline ± N") or a preset sequence interval width. Adjusting this base range based on the total number of collections allows the number of light effect icons covered by the redefined random range to adapt to the user's familiarity with the light effect library when the user triggers a random playback command for the next time.
[0079] Specifically, a user's total number of favorites reflects the depth of their interaction and the degree of exploration and preference solidification within the lighting effects library. A reasonable implementation strategy is as follows: when a user's total number of favorites is low, it indicates that the user is still in the early stages of exploration and their preferences are not yet clear. In this case, a wider base range should be set to encourage random exploration within a broader semantic space, helping users discover potential points of interest. Conversely, when a user's total number of favorites is high, it indicates that the user has already clarified many preferences through the act of saving. The base range should be narrowed so that random exploration is more focused and precise around the areas of preference they have expressed, improving recommendation hit rate and reducing ineffective jumps to areas that the user may not be interested in.
[0080] Specific methods for implementing this adjustment include, but are not limited to, the following embodiments. In one embodiment, a mapping table from the total number of collections to a base range can be predefined. For example, when the total number of collections is less than 5, the base range is set to "base point ± 15"; when the total number of collections is between 5 and 20, the base range is "base point ± 10"; and when the total number of collections is greater than 20, the base range is "base point ± 5". Whenever the total number of collections changes (e.g., a new collection is added), this mapping table is queried based on the new total number of collections, and the internally stored base range value is updated. The updated base range value is then used in the next calculation of the random range.
[0081] In another embodiment, adjustment can be a continuous calculation process. An initial base range value, Base_Range, and an adjustment coefficient, k, can be set. Each time the actual base range Adj_Range used is calculated, the formula Adj_Range = Base_Range * f(Fav_Count) is used, where Fav_Count is the total number of collections, and f is a mapping function. For example, f(Fav_Count) = 1 / (1 + 0.1 * Fav_Count). When Fav_Count is 0, f is 1, and Adj_Range equals Base_Range; as Fav_Count increases, the value of f decreases, and Adj_Range also decreases, thereby narrowing the random range. The specific form of the function f can be designed according to the desired adjustment sensitivity and curve shape.
[0082] After the base range is adjusted, its effect will take effect the next time the user triggers the shuffle command. For example, suppose the current base range is adjusted to "±5" due to the user's high number of favorites. When the user clicks the shuffle button again, a new base light effect identifier (such as identifier 130) will be determined based on the historical light effect identifier sequence. Then, using the adjusted base range "±5", a candidate neighborhood interval [125, 135] is calculated. This interval covers 11 light effect identifiers, which is significantly narrower and more focused than the interval of 21 identifiers generated using the base range "±10" before adjustment. When calculating the final random range, this candidate interval can still be processed using logic such as excluding historical identifiers.
[0083] Through the above embodiments, this application introduces a slow feedback adjustment mechanism based on long-term explicit preferences, in addition to responding to real-time user interaction and short-term history. This mechanism allows the cardinal range parameter determining the breadth of random exploration to adaptively evolve as users continue to use the system and express their preferences. In the long term, it provides novice users with ample exploration space to help them discover their interests; as user preference profiles become clearer, it shifts to providing more accurate recommendations that better match their established preferences. This dynamic adjustment capability enables the random playback function of smart lighting fixtures to grow with users, maintaining high relevance and novelty, thereby enhancing the long-term use value of the product and user satisfaction.
[0084] Based on any embodiment of the method in this application, prior to responding to a user-triggered single-time random lighting effect playback command, the method includes: Step S4110: Encode the visual performance data of multiple lighting effects into a parameter vector. The visual performance data includes any multiple items from hue, saturation, brightness, dynamic change mode, and atmosphere description text. Visual performance data may specifically include hue, saturation, brightness, dynamic change patterns, and any number of elements from the atmosphere description text. Hue, saturation, and brightness together define the color attributes of the lighting effect. In one embodiment, the average hue, average saturation, and average brightness values of the main hue or representative color of the lighting effect can be extracted over a complete playback cycle. In another, more refined embodiment, color information can be encoded into a color histogram, for example, by dividing the hue space into several intervals and statistically analyzing the frequency distribution of the colors of all pixels or keyframes in the lighting effect falling within each interval, thereby obtaining a multi-dimensional vector to characterize the color distribution features.
[0085] The dynamic change pattern describes the pattern of brightness and color changes of the lighting effect over time. In one embodiment, the frequency of change of the lighting effect can be extracted, for example, by analyzing the main period of the brightness signal or calculating its frequency domain characteristics. In another embodiment, the type of change pattern can be extracted, for example, the change pattern can be classified into categories such as breathing, gradual change, jumping, and flowing water, and the category labels can be one-hot encoded. In more complex embodiments, features can be extracted from the time-series signal of the lighting effect, such as extracting the mean, variance, zero-crossing rate, and other time-domain features of its brightness change curve, or extracting its frequency domain energy distribution through Fourier transform, and using these feature values as a numerical representation of the dynamic change pattern.
[0086] Atmosphere description text is natural language text that is manually or automatically added to lighting effects to describe their emotional or scene semantics, such as words or phrases like tranquil, lively, forest, party, etc. The key to processing atmosphere description text lies in converting it from unstructured text into structured numerical vectors. In one embodiment, a pre-trained word vector model, such as Word2Vec or GloVe, can be used to map each word in the text to a dense vector. Then, the average or maximum value of the vectors of all words in the text is taken to obtain a fixed-length parameter vector representing the overall semantics of the text. In another embodiment, a sentence encoding model, such as the BERT-based Sentence-BERT model, can be used to directly encode the entire atmosphere description text sentence into a semantic vector.
[0087] After acquiring the aforementioned visual performance data, they need to be encoded into a unified parameter vector. The encoding process involves concatenating, fusing, or further transforming these heterogeneous data features to form a final, fixed-dimensional numerical array. In one embodiment, encoding can be a simple feature concatenation. For example, assuming color features are represented as a 3D vector [H, S, V], dynamic features as a 2D vector [Freq, Type], and ambient text features as a 128-dimensional vector, they can be directly concatenated into a 133-dimensional parameter vector. In another embodiment, features from different sources can be normalized first, such as mapping hue values from 0-360 degrees to 0-1, and logarithmically scaling frequency values, before concatenation. This ensures that the numerical magnitudes of each feature dimension are roughly equivalent, preventing any single feature from dominating subsequent clustering.
[0088] Accordingly, each lighting effect is transformed into a point in a high-dimensional space, namely a parameter vector. This vector integrates the color, dynamics, and semantic information of the lighting effect, so that lighting effects that have similar visual representation and semantic perception in mathematics have parameter vectors that are relatively close in distance in the vector space.
[0089] Step S4120: Perform cluster analysis on the parameter vectors of all lighting effects to classify lighting effects with similar vector characteristics into the same atmosphere category; Based on the spatial distribution and similarity of parameter vectors, lighting effects with similar visual representations and semantic features are automatically categorized, forming several groups with strong internal consistency and distinct characteristics. These groups constitute atmosphere categories, and each lighting effect in the library can be labeled according to different atmosphere categories for easy reference. Figure 3 As shown, users can browse and apply lighting effects by category through a graphical user interface.
[0090] A pre-defined clustering algorithm is implemented. Clustering is an unsupervised machine learning method whose input is a set of parameter vectors for all lighting effects, and whose output is the category label assigned to each lighting effect. In one embodiment, a classic partitioning-based clustering algorithm, such as K-means clustering, can be used. In this embodiment, the desired number of atmosphere categories K needs to be specified in advance or estimated by the algorithm. The algorithm randomly selects K initial vectors as cluster centers and then iteratively executes the following steps: First, it calculates the distance from the parameter vector of each lighting effect to each cluster center and assigns it to the category represented by the nearest cluster center; second, based on the assignment results, it recalculates the mean of all vectors in each category and updates it as the new cluster center. The iterative process continues until the movement of the cluster centers is less than a preset threshold or the maximum number of iterations is reached, at which point each lighting effect is classified into a category. For example, assuming the parameter vector is 133-dimensional and K is set to 5, after K-means clustering, blue-toned, low-dynamic lighting effects such as "Tranquil Deep Sea," "Twinkling Stars," and "Moonlight Forest" may be classified into category A; warm-toned, gently changing lighting effects such as "Sunset Glow" and "Candlelight Dinner" may be classified into category B; and high-saturation, fast-paced lighting effects such as "Festival Neon" and "City Stream Lights" may be classified into category C.
[0091] In another embodiment, a density-based clustering algorithm can be used, such as a density-based clustering method with noise. This method does not require pre-specifying the number of clusters; its core idea is to connect points in high-density regions into clusters and identify points in low-density regions as noise. The algorithm identifies core points, boundary points, and noise points by defining two parameters: the neighborhood radius and the minimum number of points. For lighting effect parameter vectors, the DBSCAN algorithm can discover clusters of arbitrary shapes and automatically treat sparse, isolated vectors as noise or separate small categories, which may be more robust when processing lighting effect data with complex distributions or outliers.
[0092] In another embodiment, a hierarchical clustering algorithm can be used. This algorithm constructs a tree structure, or dendrogram, by calculating the distance between vectors. One implementation is a bottom-up aggregation method, where each light effect vector initially forms its own class, and then the two closest classes are iteratively merged until all vectors are merged into one large class or a preset class distance threshold is met. By cutting the dendrogram to different heights, clustering results of different granularities can be obtained. The advantage of this approach is that it does not require pre-specifying the K value, and the merging relationship of classes at different granularities can be visually observed through the dendrogram.
[0093] Measuring distance or similarity is crucial for cluster analysis. In one approach, Euclidean distance can be directly used to calculate the straight-line distance between two parameter vectors in space. In another approach, when different dimensions of feature vectors have different importance or dimensional differences, standardized Euclidean distance can be used, or the dimensions of the parameter vectors can be normalized first. Yet another approach uses cosine similarity, which focuses on the directional angle between vectors rather than absolute distance, and is suitable for measuring semantic similarity in scenarios such as text feature vectors.
[0094] After clustering analysis, each lighting effect is assigned a category label, such as Category 1, Category 2, etc., and text annotations can be added to these category labels. These categories are automatically formed based on the feature distribution of the data itself. Lighting effects within the same atmosphere category have parameter vectors that are close to each other in the feature space, which means that they have high similarity in color, dynamics, and textual semantics, thus conveying a similar atmosphere in subjective perception. For example, all lighting effects classified into the category of "natural and soothing" may have parameter vectors that show similar values in the blue / green dimension, the low-frequency dimension, and the textual semantic vector dimension containing keywords such as "tranquil" and "natural".
[0095] Step S4130: Based on the semantic correlation between the sets of atmosphere description texts corresponding to each atmosphere category, sort all atmosphere categories, and within the same atmosphere category, sort them again based on the similarity of the parameter vectors of each lighting effect. Based on the clustering results from the previous steps, the lighting effects of all ambient light categories can be sorted in two stages, as detailed below: In the first stage, all atmosphere categories are sorted based on the semantic relationships between the atmosphere description text sets corresponding to each atmosphere category. Here, the atmosphere description text set refers to the sum of the atmosphere description texts carried by all light effects belonging to the same atmosphere category. For example, suppose clustering results in three categories: Category A includes light effects such as "Tranquil Deep Sea," "Moonlight Forest," and "Lakeside Morning Mist," and its atmosphere description text set includes words and combinations such as "tranquil," "deep sea," "moonlight," "forest," "lakeside," and "morning mist"; Category B includes light effects such as "Sunset Glow" and "Candlelight Dinner," and its text set includes "sunset," "glow," "candlelight," and "dinner"; Category C includes light effects such as "Festival Neon" and "City Carnival," and its text set includes "festival," "neon," "city," and "carnival."
[0096] The goal of sorting these text sets based on semantic relationships is to determine a category order that is meaningful in terms of human cognition or emotion. In one embodiment, a semantic similarity matrix can be constructed by calculating the average distance or similarity between categories based on semantic vectors, and then this matrix can be used to sort the categories. Specifically, the entire set of atmosphere description texts corresponding to each atmosphere category can be encoded into a category semantic vector representing the overall semantics of that category using a text encoding model (such as Sentence-BERT). Then, the cosine similarity between any two category semantic vectors is calculated to obtain a symmetric similarity matrix. The sorting algorithm can be designed to find a path along which the semantic similarity between adjacent categories is maximized. For example, an approximation algorithm for the Traveling Salesman Problem can be used to find an order that traverses all category vectors and maximizes the total path similarity. Another more intuitive embodiment is to predefine one or more ordered semantic dimension axes, such as a "tranquil-active" axis or a "natural-artificial" axis. Then, the projection values of the semantic vectors of each category onto these preset axes are calculated, and finally, all categories are sorted according to the magnitude of the projection values. For example, assuming a "quiet-active" axis is defined, the calculated projection value is 0.1 for category A (very quiet), 0.5 for category B (moderate), and 0.9 for category C (very active). Then, the categories can be sorted in ascending order of projection value, resulting in the category order A, B, C.
[0097] In another embodiment, the sorting can be based on rules or prior knowledge. For example, system developers can manually specify a list of category orders based on common sense, such as [Nature, Warmth, Festival, Colorful]. While this approach does not rely on automatic calculation, it is a simple and effective implementation method for lighting effect libraries with a fixed number of categories and clear semantics.
[0098] After completing the global sorting of all atmosphere categories, the second stage involves a secondary sorting within each atmosphere category based on the similarity of the parameter vectors of the lighting effects. This aims to establish an ordered sequence of lighting effects within each category, ensuring that visually similar effects are positioned closer together. One embodiment employs a centroid-based or representative vector-based sorting method. First, the mean vector of all lighting effect parameter vectors within the atmosphere category is calculated as the centroid. Then, the distance from the parameter vector of each lighting effect within the category to this centroid is calculated. Finally, the lighting effects are sorted in ascending order of distance. This places the most representative lighting effects closer to the category center at the top, and those more peripheral, potentially possessing some characteristics of the category but less pure, at the bottom. Another embodiment uses algorithms such as hierarchical clustering or minimum spanning tree to find an optimal traversal path within each category. For example, all lighting effect parameter vectors can be treated as points, constructing a complete graph with edge weights equal to the distance between vectors. Then, a Hamiltonian path is found that minimizes the average distance between adjacent points on the path; the order of this path serves as the intra-category sorting result.
[0099] Through these two stages, the relative positions of different atmosphere categories in the global semantic space were first determined macroscopically, from "tranquil and natural" to "festive and lively." Then, the arrangement rules of lighting effects within each category were determined microscopically, from "the most typical forest color" to "a slightly varied stream color." The sorting results at these two levels together define a fine, hierarchical global order structure, laying the foundation for assigning each lighting effect a globally unique number that reflects its precise position within this structure.
[0100] Step S4140: Based on the sorting of the atmosphere categories and the secondary sorting results of the lighting effects within the categories, generate globally unique, monotonically increasing serial numbers for all lighting effects as lighting effect identifiers to complete the construction of the lighting effect library.
[0101] After completing the global sorting of all atmosphere categories and the secondary sorting of each light effect within the same atmosphere category, a completely determined, linear arrangement of light effects from macro to micro is obtained. Based on this final, determined arrangement, each light effect in the sequence is assigned a globally unique, monotonically increasing sequence number. This sequence number will serve as the light effect identifier, thus completing the final construction of the light effect library.
[0102] The process of generating sequence numbers is essentially about sequentially numbering the light effects according to a predetermined arrangement. A straightforward and clear implementation is to assign consecutive positive integers to each light effect, starting from the first one, according to the established global order. For example, assuming the first atmosphere category is "Natural Soothing," and the first light effect within it is "Tranquil Deep Sea," then it is assigned sequence number 1. Next, the second-ranked light effect in the same category is "Moonlight Forest," assigned sequence number 2. This continues until all light effects within the "Natural Soothing" category have been assigned numbers. Then, the next atmosphere category in the global order, such as "Warm Light," is processed. The first-ranked light effect in this category, "Sunset Glow," is assigned number 11, immediately following the previously assigned number. If the "Natural Soothing" category contains 10 light effects, and the last one is assigned sequence number 10, then the first light effect in the "Warm Light" category, "Sunset Glow," is assigned sequence number 11, and subsequent light effects are assigned sequence numbers 12, 13, and so on. This process continues until a sequence number is assigned to the last light effect in the light effect library. The maximum value of this sequence number is equal to the total number of light effects in the light effect library.
[0103] Through this sequential numbering, the light effect identifiers themselves possess rich semantic information. First, their global uniqueness ensures that each light effect has a unique index in the database. Second, their monotonically increasing nature accurately reflects the position of the light effect in the global semantic order. The relative numerical values of the identifier numbers of any two light effects directly indicate their order in the global ranking; and the absolute difference in the numerical values also approximates their relative distance in the semantic space to some extent. For example, a light effect identified as 125 and a light effect identified as 130, which are four positions apart in the global order, generally have a higher similarity in atmosphere perception than a light effect identified as 125 and a light effect identified as 200. This mapping relationship allows complex, high-dimensional semantic similarities and associations to be encoded into a simple one-dimensional integer sequence.
[0104] Ultimately, all lighting effects and their corresponding lighting effect identifiers together constitute the semantically structured lighting effect library defined in this application. In subsequent steps, when a lighting effect needs to be called based on a target lighting effect identifier, it can be quickly retrieved directly using that identifier. When it is necessary to determine a random range based on a historical sequence, the algorithm can directly perform neighborhood calculations on the integer sequence composed of these identifiers.
[0105] The above embodiments, by automatically constructing a hierarchical semantic ordering library of lighting effects from multimodal data, further enhance the technical advantages of this application in solving the problem of atmosphere coherence, providing a clear technical implementation path and strong scalability. This embodiment encodes the visual features and textual semantics of lighting effects into a computable parameter vector from the bottom layer, objectively forms atmosphere categories through cluster analysis, and completes a dual sorting from category to individual based on semantic correlation and vector similarity, ultimately mapping it to a globally unique monotonically increasing sequence number. This constitutes a complete and automated data preprocessing pipeline. The generated lighting effect identifier sequence is not only the foundation for the efficient operation of subsequent intelligent random algorithms, but also transforms the subjective sense of atmosphere into an objective and verifiable mathematical order, ensuring that a finite random effect based on semantic neighborhood can be stably achieved in different lighting effect libraries and application scenarios, fundamentally guaranteeing the universality and robustness of the technical solution.
[0106] Based on any embodiment of the method in this application, prior to responding to a user-triggered single-time random lighting effect playback command, the method includes: Step S4310: Extract the visual sensory parameters of each of the multiple lighting effects, wherein the visual sensory parameters include the main hue value, average brightness value and dynamic change frequency value of the lighting effect. This embodiment requires extracting a set of quantifiable visual sensory parameters for each lighting effect in the lighting effect library. These parameters capture the key features of the lighting effect in the three basic sensory dimensions of color, brightness, and dynamic change in a concise numerical form. The visual sensory parameters may include at least the dominant hue value, average brightness value, and dynamic change frequency value of the lighting effect, and may also include other parameters according to actual needs.
[0107] The dominant hue value is used to characterize the overall color tendency of the lighting effect. In one embodiment, the average hue component of all pixels or all keyframe color points within a complete playback cycle can be calculated as the dominant hue value. For example, for a blue gradient lighting effect, its dominant hue value is assumed to be approximately 240 degrees, falling within the blue region. In another embodiment, the dominant hue value can be obtained by calculating the color histogram of the lighting effect and taking the center value of the interval with the densest distribution along the hue dimension. This method is more resistant to interference from brightness variations or minor noise in the average calculation, resulting in a more representative dominant hue.
[0108] The average luminance value is used to characterize the overall brightness of the lighting effect. In one embodiment, the average luminance component of all pixels or all keyframe color points over a complete playback cycle can be calculated. For example, a bright lighting effect might have an average luminance value close to 1.0, while a dim lighting effect might have an average luminance value close to 0.1. In another embodiment, a weighted average method can be used, such as weighting the luminance based on pixel saturation, so that the luminance of highly saturated colors contributes more to the average value, thus better aligning with the human eye's greater sensitivity to vibrant colors.
[0109] The dynamic frequency value is used to quantify how quickly the brightness or color of a lighting effect changes over time. In one embodiment, the global brightness change time-series signal of the lighting effect can be analyzed in the frequency domain, for example, by extracting the strongest frequency component in its power spectrum using a Fast Fourier Transform, and using this as the dynamic frequency value. For example, a slowly breathing lighting effect might have a dominant frequency of 0.1 Hz, while a rapidly flashing lighting effect might have a dominant frequency of 5 Hz. In another embodiment, the frequency change can be approximated by calculating the number of times the brightness change signal crosses its mean per unit time; this method is simpler and more direct.
[0110] The process of extracting these visual sensory parameters can be automated by reading data packets of the lighting effects, such as files containing video sequences or timing control instructions, and then sampling and calculating the color and brightness data for each frame or each time point. The calculated dominant hue value, average brightness value, and dynamic change frequency value can be formatted as floating-point numbers, collectively forming a three-dimensional feature vector. This feature vector describes the state of the lighting effect in key sensory dimensions in a highly abstract but numerically stable way.
[0111] Step S4320: Input the visual sensory parameters of each lighting effect into a pre-trained sensory semantic mapping model to obtain the quantitative score of the lighting effect on multiple preset ordered sensory dimensions. After extracting the visual sensory parameters of each lighting effect, namely the main hue value, average brightness value, and dynamic change frequency value, it is necessary to map these basic physical quantities to a higher-level, semantically perceptive dimension. This can be accomplished with the help of a pre-trained sensory semantic mapping model, whose input is the visual sensory parameters of the lighting effect and whose output is the quantitative score of the lighting effect on a set of preset, ordered sensory dimensions.
[0112] The sensory semantic mapping model is pre-trained using machine learning methods. In one embodiment, a simple multilayer perceptron can be used as the model architecture. The input layer of this multilayer perceptron has three neurons, corresponding to the input primary hue value, average brightness value, and dynamic change frequency value, respectively. The model contains one or more hidden layers for learning non-linear combinations of features. The number of neurons in the output layer is equal to the number of preset sensory dimensions. The output value of each neuron is the quantitative score of the lighting effect on the corresponding sensory dimension, which can be set between 0 and 1 or between -1 and 1, representing the intensity or degree of conformity of the lighting effect on that dimension.
[0113] The preset sensory dimensions define a clearly ordered evaluation axis for assessing and comparing lighting effects. These dimensions describe the sensory and emotional experience that the lighting effects bring. In one embodiment, the preset sensory dimensions may include a tranquil-active dimension and a cool-warm dimension. On the tranquil-active dimension, a higher quantitative score indicates a more active and dynamic perception of the lighting effect, while a lower score indicates a more tranquil and stable perception. On the cool-warm dimension, a higher score indicates a warmer perceived color of the lighting effect, while a lower score indicates a cooler perception. In another embodiment, the preset sensory dimensions may also include a single-dimensional monotonous-rich dimension, or more complex combinations of dimensions such as natural-artificial or soft-intense.
[0114] The model can be trained using a pre-labeled training dataset. This dataset contains a large number of lighting effect samples, each sample including its visual sensory parameters as input features, and target ratings on various sensory dimensions pre-labeled by human experts or through extensive user surveys. One training method involves inputting the lighting effect samples into an initialized model, calculating the difference between the model's predicted quantitative ratings and the human-labeled target ratings, and then using a backpropagation algorithm to adjust the model's internal weight parameters using this difference, so that the model's predicted ratings gradually approach human subjective perception labels. After sufficient iterative training, the model learns to predict possible quantitative ratings for the lighting effect on abstract dimensions such as tranquil-active and cool-warm, based on the three specific parameters of hue, brightness, and frequency.
[0115] During the deployment phase, the visual sensory parameters extracted from any lighting effect are input into this trained model. The model then performs forward propagation calculations and outputs a set of quantitative scores. For example, suppose the trained model presets two dimensions: tranquil-active and cool-warm. Inputting a lighting effect parameter with a primary hue value of 240, an average brightness value of 0.6, and a dynamic change frequency value of 0.2 into the model might result in a tranquil-active dimension score of 0.2 and a cool-warm dimension score of 0.1. This score set [0.2, 0.1] represents the coordinates of the lighting effect in the preset sensory space. A low activity score indicates a tranquil atmosphere, while a low warmth score, combined with its blue primary color, indicates a cool atmosphere; the overall description is the perception of "tranquil and cool."
[0116] Step S4330: Based on the preset sensory dimension priority, the quantitative scores of all lighting effects are weighted and fused to determine the total score of the lighting effects; After obtaining the quantitative scores of each lighting effect across all preset sensory dimensions, these scores can be weighted and fused according to the preset sensory dimension priorities, thereby calculating a single, comparable total score for each lighting effect. The preset sensory dimension priorities define the relative importance order of each sensory dimension during ranking. For example, the "tranquil-active" dimension can be set as the first priority, and the "cool-warm" dimension as the second priority. A specific implementation of the weighted fusion method transforms the multi-dimensional score vector into a scalar value according to priority order, where the scores of higher-priority dimensions dominate in determining the total score.
[0117] In one embodiment, a cascading comparison method based on priority order can be used to determine the total score of the lighting effect. First, the quantitative scores of the two lighting effects are compared in the first priority dimension. If the score of lighting effect A in the first dimension is higher than that of lighting effect B, then the total score of lighting effect A is directly determined to be "higher" than that of lighting effect B. Only when the scores of the two lighting effects in the first dimension are equal, do they continue to be compared in the second priority dimension, and so on. In this way, the total score of the lighting effect is an implicit, multi-dimensional ranking order rather than a specific numerical value.
[0118] In another, more common implementation, a weighted summation method can be used to calculate an explicit numerical total score. Specifically, a weight coefficient is assigned to each sensory dimension, with the magnitude of the weight coefficient being positively correlated with the priority of that dimension. For example, the first priority dimension is assigned the largest weight W1, and the second priority dimension is assigned a smaller weight W2, where W1 > W2. Then, the formula for calculating the total lighting effect score is: Total Lighting Effect Score = (Rating 1 × W1) + (Rating 2 × W2) + ... By adjusting the specific values of the weight coefficients, the degree of influence of different dimensions on the final ranking can be precisely controlled. For example, setting W1 = 0.7 and W2 = 0.3, the calculated total lighting effect score will mainly reflect the performance of the lighting effect in the "Tranquil-Active" dimension, while the performance in the "Cool-Warm" dimension also plays a certain moderating role. The advantage of this method is that it is simple to calculate, and the resulting total score is a continuous value, which facilitates subsequent precise ranking.
[0119] Step S4340: Sort each light effect according to the total score of the light effect, and generate a globally unique, monotonically increasing sequence number for each light effect based on the sorting result as the light effect identifier, so as to complete the construction of the light effect library.
[0120] After calculating the total score for each lighting effect, all effects are sorted according to this total score. The goal of sorting is to generate a globally unique, monotonically increasing sequence number as an identifier for each lighting effect. The implementation of the sorting is straightforward. In one embodiment, all lighting effects can be arranged in ascending order according to their calculated total scores. The lighting effect with the lowest total score is ranked first and assigned the sequence number 1; the lighting effect with the second lowest total score is ranked second and assigned the sequence number 2; and so on, until the lighting effect with the highest total score is assigned the sequence number N, where N is the total number of lighting effects in the lighting effect library. In another embodiment, a descending order can also be used, which is essentially the same, only the direction of the sequence number assignment is reversed.
[0121] After sorting, the light effects in the light effect library form a globally ordered linear sequence. Based on this sorting result, each light effect in the sequence is assigned a consecutive positive integer sequence number, thus completing the generation of the light effect identifier. For example, assuming that the light effect with the lowest total score after sorting is "Tranquil Deep Sea" with a total score of 0.15, it is assigned the sequence number 1. The light effect with the second lowest total score is "Moonlight Forest" with a total score of 0.18, assigned the sequence number 2. This process continues until the light effect with the highest total score, "Festival Neon," is assigned the sequence number N. In this way, each light effect is given a globally unique, monotonically increasing sequence number. This sequence number not only serves as an index, but more importantly, its value precisely reflects the position of the light effect in the global perceptual order defined by the preset sensory dimension priority and model score. Finally, all light effects and their corresponding light effect identifiers together constitute the light effect library constructed by sensory semantic quantification sorting as defined in this application.
[0122] The above embodiments do not rely on complex multimodal feature engineering or manual semantic labels. They only extract three calculable basic parameters—primary hue, brightness, and frequency—from the lighting effect itself. Using a pre-trained model, these parameters are mapped to perceptual dimensions with a clear order. Then, based on preset priorities, they are fused into a single total score for global sorting. The entire process forms an end-to-end automated pipeline from raw data to ordered labels. This not only reduces the reliance on manual annotation and improves the objectivity and repeatability of the construction process, but also ensures that the generated lighting effect label sequence is directly based on a human-understandable sensory dimension evaluation system. This ensures the accuracy and rationality of subsequent finite random algorithms based on this sequence in guiding the atmosphere.
[0123] Please see Figure 4 This invention provides a lighting effect control device to meet one of the purposes of this application. It is a functional embodiment of the lighting effect control method of this application. The device includes an instruction response module 5100, an identifier determination module 5200, and an application playback module 5300. The instruction response module 5100 is configured to respond to a user-triggered single-time random lighting effect playback instruction, determine the corresponding random factor and its random range, wherein the random range is determined based on a limited number of user historical attempts through association with the lighting effect identifier sequence randomly applied by the instruction; the identifier determination module 5200 is configured to generate a random number within the random range according to the random factor, and map the random number to a target lighting effect identifier; the application playback module 5300 is configured to call the target lighting effect corresponding to the target lighting effect identifier from a preset lighting effect library and apply it to the target lighting fixture for playback, wherein the lighting effect library contains multiple lighting effects carrying lighting effect identifiers, and the lighting effect identifier is a sequence number determined after uniformly quantifying and sorting the semantic information of all the lighting effects.
[0124] Based on any embodiment of the device in this application, the instruction response module 5100 includes: a sensing acquisition module, configured to acquire a real-time data stream characterizing environmental activity collected by an environmental sensor; a feature extraction module, configured to perform time-domain or frequency-domain feature analysis on the real-time data stream to extract target feature values for quantifying the level of environmental activity; and a seed determination module, configured to convert the target feature value into a seed value that meets the input requirements of a pseudo-random number generator through a preset mapping relationship, and use the seed value as the random factor.
[0125] Based on any embodiment of the device in this application, the instruction response module 5100 includes: a benchmark determination module, configured to determine a representative benchmark lighting effect identifier based on a sequence of lighting effect identifiers randomly applied by the user through the instruction a limited number of historical times, wherein the benchmark lighting effect identifier is the most recently applied lighting effect identifier in the lighting effect identifier sequence or the average identifier corresponding to all lighting effect identifiers; and a range determination module, configured to determine a neighborhood interval centered on the benchmark lighting effect identifier and within the sequence of numbers formed by lighting effect identifiers in the lighting effect library that does not contain any historically applied lighting effect identifiers in the lighting effect identifier sequence, and to determine the neighborhood interval as the random range.
[0126] Based on any embodiment of the device in this application, the instruction response module 5100 includes: a coefficient determination module, configured to obtain the dwell time after the user last played the light effect through the instruction, and use the ratio of the dwell time to a preset time as an adjustment coefficient affecting the random range this time; and a range adjustment module, configured to determine the final random range based on the adjustment coefficient and a preset base range, so that the longer the dwell time, the wider the random range selected this time.
[0127] Based on any embodiment of the device in this application, following the application playback module 5300, the device further includes: a collection response module, configured to respond to a lighting effect collection event and count the total number of collections of each lighting effect in the lighting effect library by the user; and a quantity control module, configured to adjust the base range of the random range determined based on the total number of collections to change the number of lighting effect identifiers covered by the next redefined random range.
[0128] Based on any embodiment of the device in this application, prior to the instruction response module 5100, this device further includes: a data encoding module, configured to encode the visual performance data of multiple lighting effects into parameter vectors, wherein the visual performance data includes any multiple of hue, saturation, brightness, dynamic change mode, and atmosphere description text; a clustering analysis module, configured to perform clustering analysis on the parameter vectors of all lighting effects to classify lighting effects with similar vector features into the same atmosphere category; a sorting execution module, configured to sort all atmosphere categories according to the semantic correlation between the atmosphere description text sets corresponding to each atmosphere category, and perform secondary sorting within the same atmosphere category based on the similarity of the parameter vectors of each lighting effect; and an identifier assignment module, configured to generate a globally unique, monotonically increasing sequence number as a lighting effect identifier for all lighting effects based on the sorting of the atmosphere categories and the secondary sorting results of the lighting effects within the categories, thereby completing the construction of the lighting effect library.
[0129] Based on any embodiment of the device in this application, prior to the instruction response module 5100, this device further includes: a parameter extraction module, configured to extract visual sensory parameters of each of the multiple lighting effects, the visual sensory parameters including the main hue value, average brightness value, and dynamic change frequency value of the lighting effect; a quantization scoring module, configured to input the visual sensory parameters of each lighting effect into a pre-trained sensory semantic mapping model to obtain the quantization score of the lighting effect on a preset multiple ordered sensory dimensions; a total score determination module, configured to perform weighted fusion of the quantization scores of all lighting effects according to the preset sensory dimension priority to determine the total score of the lighting effect; and a sorting and identification module, configured to sort each lighting effect according to the total score of the lighting effect, and generate a globally unique, monotonically increasing sequence number as a lighting effect identifier for all lighting effects based on the sorting result, so as to complete the construction of the lighting effect library.
[0130] To address the aforementioned technical problems, embodiments of this application also provide an electronic device. For example... Figure 5 The diagram shows the internal structure of an electronic device. This electronic device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable storage medium stores an operating system, a database, and computer-readable instructions. The database may store a sequence of control information. When the processor executes the computer-readable instructions, it enables the processor to implement a lighting effect control method. The processor provides computing and control capabilities to support the operation of the entire electronic device. The memory stores computer-readable instructions, which, when executed by the processor, enable the processor to execute the lighting effect control method of this application. The network interface of the electronic device is used for communication with a terminal. Those skilled in the art will understand that… Figure 5The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0131] In this embodiment, the processor is used to execute... Figure 4 The system contains the specific functions of each module and its sub-modules, and the memory stores the program code and various data required to execute these modules or sub-modules. The network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all modules / sub-modules in the lighting effect control device of this application, and the server can call the server's program code and data to execute the functions of all sub-modules.
[0132] This application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the lighting effect control method of any embodiment of this application.
[0133] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM).
[0134] Those skilled in the art will understand that the steps, measures, and solutions in the various operations, methods, and processes discussed in this application can be alternated, modified, combined, or deleted. Furthermore, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and solutions in the prior art that are similar to those in the open-source operations, methods, and processes of this application can also be alternated, modified, rearranged, decomposed, combined, or deleted.
[0135] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for controlling the lighting effect of a lamp, characterized in that, include: In response to a user-triggered single-time random lighting effect playback command, the corresponding random factor and its random range are determined. The random range is determined based on the user's limited historical number of times by associating the lighting effect identifier sequence randomly applied by the command. A random number within the random range is generated based on the random factor, and the random number is mapped to the target lighting effect identifier; The target lighting effect corresponding to the target lighting effect identifier is called from the preset lighting effect library and played in the target lighting fixture. The lighting effect library contains multiple lighting effects carrying lighting effect identifiers, and the lighting effect identifier is a sequence number determined by uniformly quantifying and sorting the semantic information of all the lighting effects.
2. The lighting effect control method for lamps according to claim 1, characterized in that, Determine the corresponding random factor and its random range, including: Acquire real-time data streams characterizing environmental activity, collected by environmental sensors; Perform time-domain or frequency-domain feature analysis on the real-time data stream to extract target feature values for quantifying the level of environmental activity; The target feature value is converted into a seed value that meets the input requirements of a pseudo-random number generator through a preset mapping relationship, and this seed value is used as the random factor.
3. The lighting effect control method for lamps according to claim 1, characterized in that, Determine the corresponding random factor and its random range, including: Based on the user's limited historical number of times the light effect identifier sequence is randomly applied through the instruction, a representative benchmark light effect identifier is determined. The benchmark light effect identifier is the latest applied light effect identifier in the light effect identifier sequence or the average identifier corresponding to all light effect identifiers. Centered on the reference lighting effect identifier, a neighborhood interval is determined in the sequence of lighting effect identifiers in the lighting effect library that does not contain any historical lighting effect identifiers that have been applied in the sequence of lighting effect identifiers, and this neighborhood interval is determined as the random range.
4. The lighting effect control method for lamps according to claim 1, characterized in that, Determine the corresponding random factor and its random range, including: The duration of the user's last time playing the light effect via the command is obtained, and the ratio of the duration of the last time to the preset duration is used as an adjustment coefficient affecting the random range of this time. The final random range is determined based on the adjustment coefficient and the preset base range, so that the longer the dwell time, the wider the random range selected in this random selection.
5. The lighting effect control method for lamps according to claim 1, characterized in that, After retrieving the target lighting effect corresponding to the target lighting effect identifier from the preset lighting effect library and playing it in the target lighting fixture, the process includes: In response to the lighting effect collection event, the total number of lighting effects collected by users in the lighting effect library is counted. The base range of the random range is determined based on the total collection volume to change the number of light effect icons covered by the next redefined random range.
6. The lighting effect control method for lamps according to any one of claims 1 to 5, characterized in that, Prior to a user-triggered single-time random lighting effect playback command, including: The visual performance data of multiple lighting effects are encoded into a parameter vector, wherein the visual performance data includes any of the following: hue, saturation, brightness, dynamic change mode, and atmosphere description text. Cluster analysis is performed on the parameter vectors of all lighting effects to classify lighting effects with similar vector characteristics into the same atmosphere category; Based on the semantic correlation between the sets of atmosphere description texts corresponding to each atmosphere category, all atmosphere categories are sorted, and within the same atmosphere category, a secondary sort is performed based on the similarity of the parameter vectors of each lighting effect. Based on the sorting of the atmosphere categories and the secondary sorting of the lighting effects within each category, a globally unique, monotonically increasing sequence number is generated for all lighting effects as an identifier to complete the construction of the lighting effect library.
7. The lighting effect control method for lamps according to any one of claims 1 to 5, characterized in that, Prior to a user-triggered single-time random lighting effect playback command, including: Extract the visual sensory parameters of each of the multiple lighting effects, including the main hue value, average brightness value, and dynamic change frequency value of the lighting effect; The visual sensory parameters of each lighting effect are input into a pre-trained sensory semantic mapping model to obtain the quantitative score of the lighting effect on multiple preset ordered sensory dimensions. Based on the preset sensory dimension priority, the quantitative scores of all lighting effects are weighted and fused to determine the total score of the lighting effects; Based on the total score of the lighting effects, each lighting effect is sorted. Based on the sorting result, a globally unique, monotonically increasing sequence number is generated for each lighting effect as a lighting effect identifier to complete the construction of the lighting effect library.
8. A lighting effect control device, characterized in that, It includes: The instruction response module is configured to respond to a user-triggered single instruction to randomly play light effects, and to determine the corresponding random factor and its random range. The random range is determined based on a limited number of historical user attempts by associating the light effect identifier sequence randomly applied by the instruction. The identifier determination module is configured to generate a random number within the random range based on the random factor, and map the random number to the target lighting effect identifier; The application playback module is configured to call the target lighting effect corresponding to the target lighting effect identifier from the preset lighting effect library and play it on the target lighting fixture. The lighting effect library contains multiple lighting effects carrying lighting effect identifiers, and the lighting effect identifier is a sequence number determined by uniformly quantifying and sorting the semantic information of all the lighting effects.
9. A smart lighting fixture, characterized in that, The device includes a processor, a memory, and a plurality of LED beads arranged in a predetermined physical layout, and a driving circuit thereof. The processor is configured to call a computer program from the memory to execute the steps of the lighting effect control method of any one of claims 1 to 8, with the smart luminaire as the target luminaire, and drive each LED bead to play the target lighting effect through the driving circuit.
10. An electronic device comprising a processor and a memory, characterized in that, The processor is configured to call a computer program from the memory to perform the steps of the lighting effect control method as described in any one of claims 1 to 8.