Electronic device, smart luminaire, and weather phenomenon light simulation method
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-08
- Publication Date
- 2026-08-07
AI Technical Summary
首先,其显示效果完全依赖于预存素材的固有内容,一旦制作完成便无法改变,只能对其机械地调用和映射像素,缺乏对实时天气参数如实际的风速、雨量强度等的精细响应和动态生成能力,因此无法实现根据实时数据变化而细腻调整的灯光效果
[0014]本申请通过将气象物理参数转化为包含动态时空与颜色信息的虚拟粒子流,并基于目标灯具的灯珠布局将其映射为具体的驱动数据,实现了对自然天气现象细腻、逼真的动态灯光模拟。相较于传统技术,本申请能够根据风速、雨量等参数动态调整粒子运动与视觉属性,从而呈现天气现象在强度与动态上的连续变化,显著提升了视觉效果的真实感与沉浸感。同时,所生成的抽象虚拟粒子流数据独立于具体硬件,通过后续的映射步骤可灵活适配于不同形状、尺寸与灯珠排布的各类型灯具,极大地增强了方案的通用性与部署灵活性。此外,参数驱动的实时生成机制使得灯光效果能够敏捷响应气象参数的细微变化,实现了从静态指示到动态交互模拟的跨越,提升了灯具的智能化水平。
Smart Images

Figure CN122534719A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent lighting, and more particularly to an electronic device, intelligent luminaire, and a method for simulating lighting of weather phenomena. Background Technology
[0003] With the popularization of smart lighting technology, combining dynamic visual information with lighting fixtures has become an important means to enhance user experience. Among these, enabling indoor lighting fixtures to reflect or simulate outdoor weather conditions is an important direction for creating an immersive environment and conveying intuitive information.
[0004] Currently, traditional technical solutions for visualizing weather information using lights mainly fall into two categories. The first is the indicator light model, which involves setting several different colored light sources on the lights and using a predefined, simple light language to represent a limited number of macro-weather conditions. For example, a solid blue light represents sunny weather, and a flashing white light represents snow. However, this approach can only convey a very limited range of information, distinguishing only a handful of weather types such as sunny, rainy, and snowy. It cannot showcase the subtle differences and dynamic processes of weather phenomena. For instance, it cannot differentiate the visual differences between light, moderate, and heavy rain, nor can it simulate complex dynamic visual effects such as cloud movement and falling raindrops. The presentation is simplistic and lacks immersion.
[0005] The second, more common, traditional approach involves displaying pre-made, weather-related static images or dynamic videos on lamps or light arrays with image display capabilities. Specifically, this approach typically stores a series of images or video files representing different weather conditions in memory. When current weather information is acquired via sensors or a network, the corresponding media file is called and played according to the weather type code, thus displaying the corresponding weather pattern on the light array. While this method provides richer image content than simple indicator lights, its core technology is the storage and playback of media files. This approach has inherent technical limitations: First, its display effect relies entirely on the inherent content of the pre-stored materials. Once the production is completed, it cannot be changed. It can only mechanically call and map pixels. It lacks the ability to respond precisely to and dynamically generate real-time weather parameters such as actual wind speed and rainfall intensity. Therefore, it cannot achieve a lighting effect that can be finely adjusted according to changes in real-time data.
[0006] Secondly, pre-stored images or videos are designed and rendered for a specific, fixed LED layout. When this scheme is applied to lamps of different shapes, sizes, or LED arrangements, the pre-rendered materials may exhibit stretching, distortion, or fail to fill the effective display area, resulting in poor adaptability. To adapt to new lamps, the entire set of media materials must be redesigned and produced, which is labor-intensive and inflexible.
[0007] In summary, existing technologies that use lighting fixtures to represent weather, whether simple indicator lights or media playback based on pre-stored materials, are fundamentally limited in their expressive power, lack of dynamic adaptability, and poor flexibility due to strong coupling with specific lighting fixture hardware layouts. Summary of the Invention
[0008] The primary objective of this application is to provide an electronic device, a smart lighting fixture, and a method for simulating lighting of weather phenomena by addressing at least one of the aforementioned problems.
[0009] To achieve the various objectives of this application, the following technical solution is adopted: A method for simulating weather phenomena with lighting, provided for one of the purposes of this application, includes: Acquire weather state data, which includes meteorological and physical parameters used to define weather phenomena; A virtual particle stream corresponding to the weather phenomenon is generated based on the meteorological physical parameters. Each virtual particle in the virtual particle stream contains a spatial state and an optical state that evolve over time. The spatial state includes three-dimensional spatial coordinates, and the optical state includes color information. At each control time point of the target luminaire, based on the spatial and optical states of all virtual particles in the virtual particle stream at that time point, the light emission control data of each lamp in the physical lamp layout that drives the target luminaire to emit light at that time point is determined. The target luminaire's LEDs are controlled to emit light according to the light emission control data, so as to render a dynamic visual effect simulating the weather phenomenon within the target luminaire's illumination area.
[0010] A weather phenomenon lighting simulation device provided for one of the purposes of this application includes: The data acquisition module is configured to acquire weather state data, which includes meteorological and physical parameters used to define weather phenomena. The particle generation module is configured to generate a virtual particle stream corresponding to the weather phenomenon based on the meteorological physical parameters. Each virtual particle in the virtual particle stream contains a spatial state and an optical state that evolve over time. The spatial state includes three-dimensional spatial coordinates, and the optical state includes color information. The LED mapping module is configured to determine the light emission control data of each LED in the physical LED layout that drives the target lamp to emit light at each control time point of the target lamp, based on the spatial and optical states of all virtual particles in the virtual particle stream at that time point. The light effect control module is configured to control the LEDs of the target lamp to emit light according to the light emission control data, so as to render a dynamic visual effect simulating the weather phenomenon within the illumination area of the target lamp.
[0011] To suit one of the purposes 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 weather phenomenon lighting simulation method with the intelligent lighting fixture as the target lighting fixture, and to drive each LED bead through the driving circuit to simulate and present the dynamic visual effects of weather phenomena.
[0012] 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 invoke a computer program from the memory to perform the steps of the weather phenomenon light simulation method.
[0013] 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 weather phenomenon lighting simulation method, which, when called by a computer, executes the steps included in the corresponding method.
[0014] This application achieves a delicate and realistic dynamic lighting simulation of natural weather phenomena by transforming meteorological physical parameters into a virtual particle stream containing dynamic spatiotemporal and color information, and mapping it to specific driving data based on the LED layout of the target luminaire. Compared with traditional technologies, this application can dynamically adjust particle motion and visual attributes according to parameters such as wind speed and rainfall, thereby presenting continuous changes in the intensity and dynamics of weather phenomena, significantly improving the realism and immersion of the visual effect. Simultaneously, the generated abstract virtual particle stream data is independent of specific hardware and can be flexibly adapted to various types of luminaires with different shapes, sizes, and LED arrangements through subsequent mapping steps, greatly enhancing the versatility and deployment flexibility of the solution. Furthermore, the parameter-driven real-time generation mechanism enables the lighting effect to respond quickly to subtle changes in meteorological parameters, achieving a leap from static indication to dynamic interactive simulation and improving the intelligence level of the luminaire. Attached Figure Description
[0015] 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 weather phenomenon lighting simulation method of this application; Figure 2 This is a schematic diagram of the weather phenomenon lighting simulation device of this application; Figure 3 This is a schematic diagram of the structure of an electronic device used in this application. Detailed Implementation
[0016] The intelligent lighting fixture provided in this application can vividly simulate the dynamic visual effects of various weather phenomena within its illumination area based on meteorological physical parameters, such as clear skies with blue skies and white clouds, drizzling rain, snowy days with falling snowflakes, windy days with surging air currents, and thunderstorms with lightning and thunder. To achieve this function, the intelligent lighting fixture typically includes multiple LEDs arranged in a predetermined physical layout, a core processor for processing and control, a memory for storing programs and data, and a drive circuit electrically connected to the LEDs. The processor communicates with the memory and can call and execute program instructions stored in the memory, thereby running the steps of the weather phenomenon lighting simulation 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 each LED to emit light through the drive circuit, ultimately enabling all LEDs to work together to render the dynamic lighting effects of the target weather phenomenon in the physical space.
[0017] The most basic and typical product form of the intelligent lighting fixtures described in this application is a single integrated lighting fixture with independent weather lighting effect simulation capabilities. Common examples of this type of lighting fixture include household ceiling lights, decorative curtain lights, dining room chandeliers, and living room wall lights. In these products, multiple LED chips are typically integrated and encapsulated within the same lamp panel, strip, or body structure, and arranged according to a pre-designed, fixed physical layout. Common layout methods include single or multiple rings, evenly distributed rectangular dot matrices, linearly arranged strips, or specific geometric shapes and curved patterns used for aesthetic design. These LED chips are preferably full-color LED chips whose emission color and brightness can be independently controlled.
[0018] In these monolithic integrated luminaires, the processor, such as a microcontroller or embedded system-on-a-chip, which serves as the control core, along with the memory storing firmware and the drive circuitry responsible for power conversion and signal modulation, are typically integrated into the luminaire's internal cavity or base, forming a complete, independently operating control system. This integrated processor essentially acts as the luminaire's controller, responsible for executing weather simulation algorithms and generating the final LED drive signals. The drive circuitry is responsible for reliably converting the low-level logic signals output by the processor, representing the target color and brightness, into high-level power signals with specific voltage, current, and modulation methods—such as pulse-width modulation signals—needed to directly illuminate the LEDs. This highly integrated design results in a compact product structure and easy installation. After connecting the power supply and performing necessary network configurations, the luminaire can operate independently without relying on an external control box.
[0019] However, the technical solution of this application is not limited to single integrated lighting fixtures. Its architecture possesses excellent scalability, enabling multiple independent lighting units to interconnect via a network, forming a larger-scale, more spatially distributed distributed intelligent lighting system. For example, in large commercial spaces, showrooms, or smart home scenarios, multiple ceiling lights, downlights, flexible smart light strips, or modular light panels can be connected via wired communication methods such as DALI and DMX, or wireless communication methods such as Wi-Fi, Bluetooth Mesh, and Zigbee. In this distributed architecture, a central coordinating controller can be set up. This central controller itself is an electronic device with stronger processing capabilities; it can be considered the central processor of the entire distributed intelligent lighting system, responsible for uniformly executing weather simulation methods, generating globally coordinated control schemes, and then distributing the decomposed control data packets to each lighting unit in the system via the network. After receiving its own control data, each lighting unit uses its internally integrated local drive circuit to drive its own LEDs to emit light. Through precise clock synchronization and protocol coordination, all lighting units can achieve collaborative lighting across spaces and devices, thereby rendering a unified, coherent, and spatially deep weather lighting effect over a larger physical area. Regardless of whether the product adopts an integrated or distributed network hardware architecture, the internal logic and implementation process of the technical solution protected in this application are unified and universal.
[0020] The intelligent lighting fixtures described in this application have broad application prospects and can be adapted to various indoor environments such as homes, offices, commercial retail spaces, hotel rooms, and leisure venues. They transcend the traditional function of simply providing basic lighting; by dynamically simulating the subtle changes in natural daylight, they can infuse indoor spaces with unique emotions and atmospheres, intuitively convey outdoor weather information, or create highly customized lighting environments purely based on the user's personal aesthetics and immediate mood.
[0021] The meteorological and physical parameters required to drive this simulation function come from diverse sources. Smart lighting fixtures can directly collect localized meteorological data, such as temperature, humidity, illuminance, and air pressure, through their built-in environmental sensors. More often, the fixtures can acquire data from external resources through their integrated communication modules, such as Wi-Fi, Bluetooth, or cellular network modules. These external resources include public or commercial meteorological data service interfaces on the internet, smart home gateways in the home, and mobile devices carried by the user, such as smartphones or tablets. Users can manually select the weather type they wish to simulate or authorize the fixtures to automatically synchronize with real-time weather through dedicated applications on these devices. These diverse parameters, including but not limited to temperature, humidity, wind speed, wind direction, precipitation, air pressure, and PM2.5 concentration, collectively constitute the raw data input driving the lighting effect simulation.
[0022] At the software implementation level, the weather phenomenon lighting simulation method of this application is concretized into a series of computer program instructions that can be executed by a processor. This program is usually pre-programmed or stored in the non-volatile memory of the smart lighting fixture, such as flash memory, in the form of firmware. When the lighting fixture is powered on, receives a remote control command from the user, or is triggered by a built-in sensor or timer, the processor will call and run this program from the memory. During the program execution, the aforementioned input meteorological and physical parameters will be gradually transformed, calculated, and mapped according to the specific technical paths and algorithm steps detailed in the subsequent embodiments of this application, ultimately generating a precise control data sequence required to drive each specific LED to emit light at each moment. It is through this complete technical chain that a delicate, dynamic lighting visual effect that is highly consistent with the target weather conditions can be ultimately presented in the physical space.
[0023] It should be noted that the weather phenomenon lighting simulation method of this application can be implemented not only as firmware directly deployed on the processor inside a smart lamp, but also as a computer program that can be installed and run on an external electronic device. Such electronic devices can be various common smart terminals, such as smartphones, tablets, personal computers, smartwatches, or smart home hubs. These devices execute the method program of this application through their own hardware resources, such as central processing units, memory, and storage devices, and establish connections with one or more target smart lamps through built-in wireless or wired communication modules such as Bluetooth, Wi-Fi, and USB. In this implementation, the electronic device undertakes the core tasks of weather simulation algorithm calculation and control data generation, while the smart lamp mainly acts as a controlled display terminal, responsible for receiving and executing the pre-encoded lighting control data sent by the electronic device. This architecture fully utilizes the stronger computing power, richer interactive interfaces such as touchscreens, and more convenient network access capabilities of smart terminals, providing users with a more flexible and powerful control experience. At the same time, this also enables the technical solution of this application to integrate with a wider ecosystem of hardware devices already in the hands of users.
[0024] The following section will elaborate and explain in detail the implementation and steps of other technical solutions claimed in the claims of this application, using several specific embodiments.
[0025] Please see Figure 1 This application further provides a method for simulating weather phenomena with lighting, which can be executed by an electronic device or a smart device, and includes the following steps: Step S5100: Obtain weather state data, wherein the weather state data includes meteorological and physical parameters used to define weather phenomena; Directly obtaining general weather type descriptions such as "sunny" or "rainy" often results in coarse-grained information, making it difficult to support the generation of detailed, dynamic, and responsive lighting effects that can adapt to continuously changing parameters. For example, a simple "rainy" type cannot distinguish between light drizzle, moderate rain, and torrential downpour, nor can it reflect the impact of wind speed on the trajectory of raindrops. To overcome this limitation, this application chooses to obtain more basic and descriptive raw data, namely weather state data, the core of which consists of meteorological and physical parameters used to define the intrinsic physical state of weather phenomena.
[0026] Meteorological physical parameters are quantifiable or coded characteristics that describe atmospheric or weather phenomena at the physical level. These parameters are the underlying causes and quantitative indicators driving the generation of lighting visual effects. Obtaining these parameters allows subsequent particle flow generation algorithms to perform calculations based on more refined and multi-dimensional data, thereby achieving continuous and smooth control of lighting effects in multiple dimensions such as intensity, dynamics, and distribution.
[0027] In one embodiment, the acquisition of weather status data is achieved by accessing external meteorological data services through the communication module built into the smart lighting fixture. For example, a data request can be sent to an application programming interface (API) provided by a meteorological data service provider on the internet, according to a predetermined communication protocol. Upon receiving the request, the API returns a structured meteorological data packet, which the processor then parses to extract the required meteorological physical parameters. These parameters typically include, but are not limited to, temperature, humidity, wind speed, wind direction, precipitation, air pressure, and air quality index, providing a data source for generating highly realistic real-time weather lighting simulations.
[0028] In another embodiment, weather condition data can also be obtained through direct user specification or interaction. Users can operate on a graphical interface. This interface provides adjustable sliders, knobs, or selection lists, allowing users to manually set or adjust various parameters of the simulated target weather. For example, a user can drag a "rainfall intensity" slider to set a specific value, or select a "wind force level" option. After the user submits these settings, the application recognizes the user-defined parameter values as weather condition data. This approach gives users a high degree of autonomy, enabling them to freely create and switch indoor lighting effects according to their preferences or mood, without relying on real-time outdoor weather.
[0029] Step S5200: Generate a virtual particle stream corresponding to the weather phenomenon based on the meteorological physical parameters. Each virtual particle in the virtual particle stream contains a spatial state and an optical state that evolve over time. The spatial state includes three-dimensional spatial coordinates, and the optical state includes color information. After acquiring meteorological and physical parameters, these parameters can be transformed into an abstract visual data set that can be processed by a computer and ultimately drive light displays—this is the virtual particle stream. The virtual particle stream is implemented as a structured, dynamic sequence, essentially a mathematical modeling and discretization of the target weather phenomenon at the visual level. The virtual particle stream consists of numerous virtual particles, each of which can be considered a dynamic visual unit with its own lifecycle and state attributes.
[0030] Each virtual particle's state comprises two dimensions: spatial state and optical state, both of which evolve dynamically over time. The spatial state describes the particle's geometric position and kinematic behavior in the simulated three-dimensional virtual space, represented by time-varying three-dimensional spatial coordinates. This coordinate system defines the particle's precise position at any given moment, serving as the basis for subsequently mapping virtual effects onto physical LEDs. The optical state describes the visual appearance of the virtual particle, represented by time-varying color information. This color information determines the visual color the particle should appear to be. By unifying and encapsulating these three elements—time, space, and color—the virtual particle stream can comprehensively depict the complete spatiotemporal evolution of dynamic natural phenomena such as falling raindrops, drifting clouds, and swirling snowflakes.
[0031] There are several specific technical implementation paths for generating this virtual particle stream based on meteorological physical parameters. These paths all achieve the conversion from parameters to particle stream using different technical means. In one embodiment, a mapping and interpretation path based on parameterized templates is adopted. In this embodiment, a general weather type is first determined based on meteorological physical parameters, such as judging a rainy day type based on a comprehensive assessment of parameters such as temperature, humidity, and precipitation.
[0032] Subsequently, a target template matching the weather type is retrieved from a pre-defined particle flow template library. The target template is defined by a set of parameters, which at least define the virtual particle generation rules, the baseline trajectory function, the optical property evolution rules, and the duration of a motion cycle. The generation rules determine when, where, and at what density the virtual particles are created during the simulation. The baseline trajectory function defines the basic motion path of the virtual particles in three-dimensional space, such as uniform linear fall, parabolic motion, or spiral motion. The optical property evolution rules define how the optical properties of the virtual particles, such as color and brightness, change over time or under certain conditions.
[0033] Next, based on the specific values of the obtained meteorological and physical parameters, such as the actual wind speed and rainfall intensity, the parameters defined in the target template are adjusted for adaptability. For example, the velocity coefficient in the baseline motion trajectory function is correlated with the wind speed value, and the particle generation density in the generation rules is correlated with the rainfall intensity value.
[0034] After adjustment, an internal analog clock is established with the motion cycle duration defined in the template as the total display duration. At each step of the analog clock, based on the adapted generation rules, the baseline motion trajectory function, and the optical attribute evolution rules, the precise three-dimensional spatial coordinates and color values of all active virtual particles at the current moment are calculated, and these coordinates and color values are bound to the timestamp of the current moment. After the analog clock has traversed the entire total display duration, the particle state data calculated at all steps and bound with timestamps are summarized and constitute the virtual particle stream defined in this application.
[0035] In another embodiment, a data-driven model-based generation path is employed. In this embodiment, the acquired meteorological and physical parameters are encoded together with the target lighting fixture's set frame rate to form a structured numerical vector containing information about the expected display duration, which serves as input data. This input data is then fed into a pre-trained particle attribute generation model. This model is a deep learning neural network trained on a large amount of paired data of weather phenomena and corresponding ideal lighting effects, learning the complex mapping relationship from meteorological parameters to dynamic visual sequences.
[0036] After receiving the input vector, the model directly outputs a dense tensor representing the spatiotemporal sequence of the virtual particle flow through internal forward inference calculations. This dense tensor can be represented as a multidimensional array, and its size in the time dimension is determined by the expected display duration and the set frame rate, ensuring that the length of the output sequence matches the target playback duration and the hardware refresh rate. Simultaneously, this dense tensor contains dedicated data channels that carry the spatial state (coordinates) and optical state (color) information of all virtual particles at all time steps.
[0037] Finally, the dense tensor can be decoded. The decoding process includes converting the tensor's index in the time dimension into specific, continuous timestamps according to a set frame rate, and extracting the spatial and optical states of each virtual particle at each moment from the corresponding coordinate and color data channels. After decoding and serialization, a virtual particle stream is finally obtained that is completely consistent with the previous embodiment in terms of data structure, containing the spatial and optical states of each virtual particle as it evolves over time, as well as its corresponding timestamp.
[0038] Regardless of the specific path chosen, the final product is a unified virtual particle flow. This virtual particle flow serves as a data bridge connecting abstract weather parameters and specific lighting hardware, providing a complete and hardware-independent data foundation for subsequent steps to accurately map dynamic visual effects onto the physical LED layout of specific lighting fixtures.
[0039] Step S5300: At each control time point of the target lamp, based on the spatial and optical states of all virtual particles in the virtual particle stream at that time point, determine the light emission control data of each lamp in the physical lamp layout that drives the target lamp to emit light at that time point. After generating a virtual particle stream containing a complete spatiotemporal sequence, the virtual particle stream needs to be mapped to specific hardware and driving instructions need to be generated. Specifically, at each discrete control time point when the target lamp is actually playing, based on the global particle state recorded by the virtual particle stream at that precise moment, combined with the inherent physical lamp layout of the target lamp, the control data of how each lamp in the driving layout should emit light at that moment can be calculated, i.e., the light emission control data. The essence of this process is to adapt the continuous or high-density virtual particle spatiotemporal state to a discrete physical lamp array with a specific spatial arrangement. To achieve this, several optional specific embodiments can be used, all of which aim to determine the light emission state of each physical lamp based on the spatial position and color information of the virtual particles.
[0040] In one embodiment, a hybrid calculation method based on spatial proximity and contribution weight can be employed. In this method, for each LED in the physical LED layout, a spatial proximity range is first defined centered on its coordinates in the layout space. Then, virtual particles whose three-dimensional spatial coordinates, recorded in all spatial states at the current control time point, fall within this proximity range are queried from the virtual particle stream. These queried particles are considered to potentially contribute to the visual effect of the LED. Next, a contribution weight is calculated based on the spatial distance between each contributing particle and the LED. The closer the particle, the higher its weight, indicating a greater influence on the final color of the LED. Then, based on all calculated contribution weights, a weighted mixing operation is performed on the color information recorded in the optical state of these particles at the current time point. This mixing operation can, for example, be a weighted average of the color values of all contributing particles according to their respective contribution weights. The result of the mixing calculation is determined as the target color value of the LED at the current control time point. Finally, the target color value is converted into a specific control command conforming to the target luminaire driving protocol; this control command constitutes the light emission control data for driving the LED to emit light. This method simulates the principle of particle system rendering in computer graphics, and can produce soft, natural-transition lighting effects.
[0041] Another embodiment employs an allocation method based on predefined mapping functions and logical partitions. In this embodiment, a logical partition model can be pre-established for the physical LED layout, or the entire layout space can be divided into several non-overlapping or partially overlapping logical regions, each associated with one or more LEDs. Simultaneously, during or after the generation of the virtual particle stream, a logical partition identifier is assigned to each virtual particle, or its logical partition is automatically determined based on its spatial coordinates. At each control time point, based on the virtual particle stream data, the aggregated optical properties of all particles within each logical partition are statistically analyzed. For example, the average color of all particles within a partition, or the color with the highest frequency of occurrence, can be calculated as the representative color of that partition. Then, according to a predefined mapping relationship, the representative color of that partition is directly assigned to one or more associated LEDs as the target color value for these LEDs, thereby generating luminous control data. This method is computationally efficient and suitable for scenarios requiring grouped control of LEDs or the achievement of blocky light effects.
[0042] In another embodiment, accurate rendering based on physical simulation and optical attenuation models can be considered. This embodiment not only considers the coordinates of particles but also introduces more complex optical models during the mapping process. For example, each virtual particle can be regarded as a point light source, and the color and brightness information in its optical state represent the light intensity of that point light source. When calculating the luminous state of a certain LED, not only neighboring particles are considered, but a light propagation and attenuation model can also be defined for the entire layout space. Based on the spatial position and light intensity of all virtual particles at that moment, the propagation, superposition, and attenuation of light in space are calculated using this model, thereby calculating the total light intensity and color spectrum received at the location of each LED and using it as the target color value. This method can simulate more realistic lighting interaction effects, such as distant particles having a weak impact on LEDs, while the light effects of multiple neighboring strong light particles will mix and superimpose.
[0043] It is important to clarify that regardless of the specific mapping algorithm used, the input is always the complete set of virtual particle states at the current control time point, and the physical LED layout information of the target luminaire. The output is always luminous control data corresponding to each LED, encoded with color and brightness information. The physical LED layout refers to the actual arrangement and coordinate relationship of all LEDs on the target luminaire in physical space, which can be predetermined and invoked as needed. The luminous control data is the underlying instruction that can ultimately be recognized and executed by the luminaire's driving circuitry, thereby precisely controlling the color and intensity of each LED's light emission.
[0044] Step S5400: Control the LED beads of the target lamp to emit light according to the light emission control data, so as to render a dynamic visual effect simulating the weather phenomenon within the illumination area of the target lamp.
[0045] After generating the illumination control data corresponding to each control time point, this data is sent to the execution unit of the target luminaire to drive its LEDs to emit light, thereby ultimately rendering a dynamic visual effect simulating the target weather phenomenon in physical space. Driving the LEDs to emit light essentially involves converting digital instructions representing the target's color and brightness information into physical signals that can actually control the LEDs to emit corresponding light.
[0046] In one embodiment, when the executing entity is a single intelligent lamp, such as an independent ceiling light, its integrated processor, after generating the illumination control data at the control time point, directly transmits it to the driver circuit located within the lamp via a local bus. This illumination control data is typically a data packet encoded in a specific protocol format. Its content, either directly or after simple conversion, corresponds to the duty cycle value of the pulse width modulation signal required for each color channel in the driver circuit. Upon receiving this data, the driver circuit parses it according to the protocol, extracts the control parameters corresponding to each LED, and generates a high-level electrical signal with corresponding voltage, current, and modulation characteristics. This electrical signal is applied to the corresponding LED, causing the LED to light up at a precise moment and emit light of the specified color and brightness. Because the processor, driver circuit, and LEDs are integrated within the same lamp, the data transmission path is short, and the latency is low, ensuring smooth and synchronized dynamic lighting effects. The illumination area of this single intelligent lamp is the area covered by its own lamp panel; all LEDs emit light collaboratively, jointly creating a simulated weather phenomenon.
[0047] In another embodiment, when the executing entity is the central controller of a distributed intelligent lighting system, such as an intelligent gateway controlling multiple downlights or light strips in a network, the generated light emission control data needs to be distributed to each lighting unit in the network. In this case, the light emission control data, in addition to color control information, also needs to include the address identifier of the target lighting unit. The central controller sends the encapsulated data packet with the target address out via a wired or wireless network protocol. Each lighting unit in the network continuously listens to the network, and upon receiving a data packet, its local microcontroller parses it, extracts the light emission control command, and then drives its local LEDs to emit light through its own driver circuit. To ensure that multiple lighting units are synchronized in time to present a coherent and unified picture, a clock synchronization protocol can be used to synchronize the internal clocks of all lighting units with the central controller and carry a timestamp in the data packet. Each unit executes the control command of that frame at the specified absolute time point. In this way, although the LEDs are distributed across different physical lighting fixtures, they can work together as a whole to render dynamic weather effects with a grander spatial scale and a more immersive feel within a larger lighting area composed of all the lighting units.
[0048] In another embodiment, when the executing entity is an electronic device separate from the smart light fixture, such as a user's smartphone, the entire process is similar to a distributed system, but the control chain is longer. After the application or service on the electronic device generates the light emission control data, it typically needs to undergo a protocol conversion to adapt to the proprietary communication protocol of the target smart light fixture brand or model. Then, the electronic device sends the converted control data to the smart light fixture via its own hardware interface, such as a Bluetooth or Wi-Fi module. Upon receiving the data, the smart light fixture's internal controller (which can be a simplified processor) is responsible for parsing and executing it. For simpler smart light fixtures, the electronic device may issue raw, encoded pulse width modulation duty cycle data, which the light fixture's controller directly passes to the drive circuit. For more advanced smart light fixtures, the electronic device may issue a higher-level, descriptive instruction (such as RGB color values), which is then recalculated by the light fixture's internal controller and converted into the final drive signal. Regardless of the number of conversion layers involved, the ultimate goal is to make the LEDs of the smart light fixture emit light according to the scheme calculated by the electronic device. In this mode, the powerful computing capabilities of electronic devices can be used to run more complex particle generation and mapping algorithms, while the lighting fixtures focus on receiving instructions and driving the hardware, thus separating computation from execution and broadening the applicability of the solution.
[0049] The specific content of the light emission control data can vary depending on the driving method and the lamp's capabilities. One format is the numerical value of each LED in the RGB or HSV color space. In another embodiment with more direct hardware control, the light emission control data directly includes the pulse width modulation (PWM) duty cycle of each color channel of each LED. Pulse width modulation is a technique that controls average power through a fast switching circuit; the duty cycle determines the average current of the LED, thereby controlling its brightness. By independently controlling the duty cycles of the red, green, and blue color channels, a rich variety of colors can be mixed. The driving circuit generates a corresponding high-frequency switching signal based on the received duty cycle value, thereby precisely controlling the light emission intensity of each LED chip.
[0050] Through the above process, at each brief control point in time, all the LEDs on the smart light fixture are precisely driven by the light emission control data, emitting specific light. When these control points arrive continuously at a high frequency, such as dozens of times per second, the light emitted by the LEDs changes rapidly and continuously. Due to the persistence of vision in the human eye, this creates a continuous and smooth dynamic animation in the observer's eyes. The content of this dynamic animation is the optical representation of particle movement and color changes simulating specific weather phenomena generated in the previous steps. Thus, within the illumination area of the target light fixture, whether it is the light panel of a single ceiling light or the entire ceiling covered by a group of distributed light fixtures, a delicate and vivid dynamic visual effect of weather phenomena corresponding to the input meteorological and physical parameters is ultimately presented, such as simulating the light spot trajectory of falling raindrops, simulating the halo flow of drifting clouds, or simulating the instantaneous flash of lightning.
[0051] It is easy to understand from the above embodiments that this application can effectively overcome the inherent limitations of traditional solutions and achieve various beneficial technical effects, including but not limited to: First, this application achieves a significant improvement in the expressiveness and detail of lighting effects, vividly simulating complex and dynamic natural weather phenomena. Because this application directly uses meteorological and physical parameters as input, it generates a virtual particle stream containing particle motion trajectories and color information that evolves over time. These virtual particles constitute the basic visual elements simulating weather phenomena. Their motion trajectories and color changes can be dynamically controlled by the input parameters. This allows for the fine adjustment of the particle swarm's density, speed, direction, and color based on real-time changing parameters such as wind speed and rainfall intensity. This realistically presents continuous and smooth changes in the intensity and dynamics of weather phenomena, such as light rain to heavy rain and light breezes to strong winds, on the lighting screen. This breaks through the limitations of traditional solutions that can only switch between a few preset macroscopic states, greatly enhancing visual immersion and realism.
[0052] Secondly, this application significantly enhances the flexibility and adaptability between lighting effects and specific lighting hardware. In traditional solutions, pre-rendered media materials are deeply bound to specific LED layouts, requiring re-creation of the materials whenever hardware is changed. However, this application generates spatiotemporal sequence data describing the movement and evolution of particles in an abstract three-dimensional space when generating the virtual particle stream. This data is independent of any specific physical LED arrangement. In the final driving step, based on the actual physical LED layout of the target lighting fixture, the virtual particle state at each moment is converted into control data to drive the specific LEDs to emit light through a mapping relationship. This two-stage architecture allows the same set of virtual particle stream data to be flexibly and accurately adapted to various lighting fixtures with different shapes, sizes, LED numbers, and arrangements through different mapping logics, without requiring redesign of effects for each type of hardware, significantly improving the versatility of the technology and the efficiency of engineering implementation.
[0053] Furthermore, this application enhances the dynamic response capability to changes in weather information and the real-time generation of effects. Because this application generates particle streams in real time based solely on input meteorological and physical parameters, rather than calling large pre-stored media files, it can respond quickly to subtle changes in these parameters. For example, when an increase in wind speed is detected, the particles can be immediately adjusted to change the simulated cloud or rain / snow movement effects accordingly. This parameter-driven real-time generation mechanism allows lighting effects to follow real weather changes more closely and agilely, achieving a leap from static indications or fixed animation playback to truly dynamic, interactive simulation, thus improving the intelligence level of lighting effects and the consistency of the user experience.
[0054] Based on any embodiment of the method in this application, generating a virtual particle stream corresponding to the weather phenomenon according to the meteorological physical parameters includes: Step S5211: Determine the weather type based on the meteorological and physical parameters, and call the target template corresponding to the weather type from the preset particle flow template library. The target template defines the virtual particle generation rules, reference motion trajectory function, optical attribute evolution rules and motion cycle duration in the form of parameters. Meteorological physical parameters can be multidimensional and continuous numerical values, such as specific temperature, humidity, wind speed, and precipitation. To efficiently interface with a pre-designed, parameterized visual effects generation scheme, these specific parameters can be mapped or summarized into a discrete, more operational weather type identifier. This process of determining weather types essentially involves classifying a continuous space of physical parameters into finite, predefined semantic categories.
[0055] In one embodiment, weather type can be determined through rule-based judgment. A set of pre-defined logical judgment rules defines the correspondence between different numerical ranges of meteorological physical parameters and specific weather types. The processor sequentially evaluates the input set of meteorological physical parameters. When the values of all parameters satisfy the combination of conditions set by a certain rule, the weather type corresponding to that rule is determined. For example, one rule can be defined as: when the precipitation parameter is greater than zero and less than 10 mm / hour, and the wind speed parameter is less than 5 m / s, the weather type is determined to be light rain. Another rule can be defined as: when the precipitation parameter is zero, the wind speed parameter is less than 3 m / s, and the cloud cover-related parameters are below a certain threshold, the weather type is determined to be sunny. By traversing the rule set, a matching condition can be found, thereby determining the weather type corresponding to the current parameter.
[0056] In another embodiment, an automated determination method based on a classification model can be employed. A weather type classification model, such as a decision tree, support vector machine, or lightweight neural network, can be pre-trained. This model takes a set of standardized meteorological and physical parameter vectors as input, performs internal calculations, and outputs a classification label representing the most likely weather type. In application, the acquired real-time meteorological and physical parameters are preprocessed into the input format required by the model and fed into the classification model. The model's output classification label is then used to determine the current weather type. This approach can handle more complex parameter combinations and nonlinear decision boundaries.
[0057] Once the weather type is determined, such as rain, sunny, snow, strong winds, or thunderstorms, the corresponding target template can be retrieved from a pre-defined particle flow template library. The particle flow template library is a structured data collection stored in memory, in which a corresponding particle flow template is pre-designed and stored for each supported weather type. Each particle flow template is a parameterized effect blueprint, a set of rules and functions that define how to dynamically generate the virtual particle flow corresponding to that weather phenomenon.
[0058] In one embodiment, the particle flow template defines multiple elements in parametric form to collectively and comprehensively describe how the motion effect is generated and evolves. These elements include the generation rules of virtual particles, a baseline motion trajectory function, optical property evolution rules, and motion cycle duration. The generation rules specify the generation mechanism of virtual particles during the simulation process, including where the particles are initialized, at what rate or density they are generated, and how their initial properties are set. The baseline motion trajectory function defines the basic motion path and manner of virtual particles in three-dimensional virtual space; its input typically includes a time variable, and its output is the spatial coordinates of the particle at that moment. The optical property evolution rules define the visual appearance of the virtual particles, mainly color information, and how it changes over time or according to certain internal states. The motion cycle duration defines the duration of a complete dynamic effect cycle, determining the total time length from the start to the end of the effect.
[0059] To facilitate understanding, an example based on specific weather conditions is provided. Assume that based on the input meteorological and physical parameters, the current weather type is determined to be rainy. The processor will then retrieve and call a particle flow template identified as rainy from the particle flow template library as the target template. The generation rule for this rainy target template might be defined as randomly generating virtual particles at a certain initial density on a horizontal plane at the top of the simulation space. Its baseline trajectory function might be defined as a vertically falling motion influenced by constant gravitational acceleration, with a small random horizontal perturbation superimposed to simulate slight drift caused by air resistance. Its optical property evolution rule might be defined as the particle's color initially being white or light blue, remaining essentially unchanged throughout its lifespan, or slightly decreasing in brightness near the bottom of the simulation space to simulate a visual fading effect. Its motion period duration might be set to the average time required for a typical raindrop to fall from the top to the bottom, for example, two seconds.
[0060] For example, if the weather type is determined to be sunny, the target template used will be completely different. The generation rules for the sunny target template might be defined as sparsely generating particle clusters representing clouds in the upper half of the simulation space. Its baseline motion trajectory function might define a slow, approximately horizontal linear or curvilinear motion. Its optical property evolution rules might define the particle color as bright white, and its brightness or size might change slowly and periodically over simulation time to simulate the changing light and shadow of clouds. Its motion period duration might be set relatively long to represent the leisurely scene of clouds drifting by slowly.
[0061] Step S5212: Adjust the parameters defined in the target template according to the meteorological and physical parameters for adaptability; Meteorological physical parameters and target template parameters can be adapted according to a certain mapping relationship. In one embodiment, this mapping can be reflected as linear or nonlinear scaling of the parameters. For example, in the aforementioned rainy day example, an initial particle generation density baseline value is defined in the generation rule of the target template. During adaptation adjustment, this baseline density value can be scaled proportionally according to the precipitation value in the meteorological physical parameters. When the precipitation parameter value is high, indicating heavy rainfall, the particle generation density parameter in the generation rule can be increased proportionally, thereby simulating a denser raindrop effect in the virtual particle stream. Conversely, when the precipitation parameter value is low, the generation density is reduced accordingly to simulate sparse light rain. This adjustment allows the lighting effect to intuitively reflect the continuous changes in rainfall intensity.
[0062] In another embodiment, adaptation adjustment can be manifested as a correction of motion trajectory parameters. Continuing with the rainy weather type as an example, the baseline motion trajectory function of the target template defines the falling motion and may include a parameter controlling the horizontal drift amplitude. During adaptation adjustment, this horizontal drift amplitude parameter can be dynamically adjusted based on the wind speed value in the meteorological physical parameters. When the wind speed value is large, the horizontal drift amplitude parameter is increased, making the falling trajectory of the virtual particles exhibit a more obvious tilt, thereby simulating the scene of raindrops being blown obliquely by the wind during a storm in terms of lighting effects. When the wind speed value is close to zero, the parameter is adjusted to a minimum value or zero, making the particles fall almost vertically, simulating a rain scene without wind. In addition, the initial falling speed parameter in the baseline motion trajectory function can also be fine-tuned based on parameters such as precipitation or temperature to simulate the changes in falling speed caused by differences in raindrop size or air resistance.
[0063] Adaptive adjustments also apply to optical property evolution rules. In one embodiment, the base hue or brightness of particle colors can be adjusted based on meteorological physical parameters related to ambient light. For example, in a sunny day template, the optical property evolution rules define the color of particles representing clouds as white. During adaptive adjustments, the color temperature or brightness coefficient of this white can be dynamically adjusted based on time information in meteorological physical parameters (such as the solar altitude angle calculated from geographical location) or direct light intensity parameters. When simulating noon, the white can be adjusted to be brighter and cooler; when simulating evening, the white can be adjusted to be slightly warmer and yellowish, and the overall brightness reduced to simulate the effect of the sunset reflecting on clouds. In rainy or cloudy day types, the color saturation and brightness of raindrops or ambient background particles can also be adjusted based on humidity or cloud thickness parameters to better match the visual perception under specific weather conditions.
[0064] Furthermore, adaptation adjustments can also trigger special evolution rules preset in the template. In one embodiment, when meteorological physical parameters meet certain specific composite conditions, the template parameters can be adjusted non-linearly and in stages. For example, in thunderstorm weather, the optical property evolution rules of the target template, in addition to defining the conventional optical properties of raindrops, also preset a set of special rules for simulating lightning, which are normally inactive. In the adaptation adjustment step, when the processor detects that the meteorological physical parameters simultaneously include indications of high precipitation and lightning activity, it triggers the preset special evolution rule. After triggering, the adjustment action can include: temporarily and significantly increasing the brightness parameters of particles in a specific spatial region to an extreme value and setting a very short duration to simulate the instantaneous intense light of lightning; or, for a short period after lightning is triggered, globally increasing the base brightness of all raindrop particles to simulate the afterglow effect of lightning instantly illuminating the night sky. This adjustment based on composite conditions allows the template to represent more complex and dramatic weather phenomena.
[0065] The adaptation adjustment can be implemented using predefined adjustment functions or lookup tables. The processor passes the template parameter names to be adjusted, along with the meteorological and physical parameter values as input, to the corresponding adjustment function. This function outputs the adjusted parameter values based on its built-in calculation logic. For example, a function can be defined that takes wind speed as input and outputs the scaling factor of the horizontal drift amplitude in the baseline motion trajectory function. After the adjustment is complete, the specific parameter values of the generation rules, baseline motion trajectory function, and optical attribute evolution rules defined in the target template are updated. These updated rules ensure that the final generated dynamic lighting effect accurately and delicately reflects the real weather conditions described by the current meteorological and physical parameters.
[0066] Step S5213: Establish an analog clock with the motion cycle duration as the total display duration. Based on the adapted generation rules, the reference motion trajectory function and the optical attribute evolution rules, determine the spatial state, optical state and corresponding timestamp of all virtual particles at each step time of the analog clock established according to the total display duration, so as to form the virtual particle stream.
[0067] The aforementioned motion cycle duration defines the total simulation time of a complete dynamic effect segment from start to finish. For example, in a rainy day template with a defined motion cycle of two seconds, this total display duration is two seconds. Based on this total display duration, a simulation clock can be established to control the particle simulation process. This simulation clock tracks the relative time elapsed during the simulation process; its starting point corresponds to time zero, marking the beginning of the dynamic effect, and its ending point corresponds to the total display duration, marking the end of the dynamic effect.
[0068] In one embodiment, the analog clock is implemented as a discrete time counter that increments with a fixed step size. The step size of the analog clock, i.e., the time point at which this counter updates, is set at a preset fixed time step size that is much smaller than the total display duration. For example, if the total display duration is 2 seconds and the time step size is set to 0.01 seconds, the analog clock will start from zero and step sequentially to 0.01 seconds, 0.02 seconds, and so on, until it reaches 2 seconds, generating a total of 200 step sizes. The choice of this time step size determines the temporal resolution of the simulation. The smaller the step size, the more refined the simulation calculation, and the more continuous the generated virtual particle flow is in the time dimension, but the corresponding computational load will increase. In another embodiment, the analog clock can also use a variable step size, dynamically adjusting the step size according to the intensity of the virtual particle movement. A larger step size is used when the movement is gentle to save computation, and a smaller step size is used when the movement is intense to ensure accuracy.
[0069] Once the simulation clock is established, the virtual particle's state can be calculated and recorded at each step of the simulation clock, based on the adapted generation rules, baseline motion trajectory function, and optical property evolution rules. This process is an iterative simulation loop, the goal of which is to calculate and save a complete snapshot of the entire particle system's evolution in the simulation space at discrete time points.
[0070] In one embodiment, at each step, the simulation process sequentially performs the following operations. First, based on the adapted generation rules, it is calculated whether new virtual particles should be created at the current moment. The generation rules define the logic for particle generation, including generation location, generation density, and initial attributes. If the rules determine that particles need to be generated at the current moment—for example, in a simulated rainy day cycle, a certain number of new raindrop particles may be generated at random positions at the top of the simulation space at each moment—then these new particles are created, and they are assigned the initial spatial and optical states defined by the generation rules. These initial spatial states include initial three-dimensional spatial coordinates, such as a random horizontal position at the top of the simulation space. The initial optical states include initial color information, such as being set to white.
[0071] Secondly, for all virtual particles active at the current moment, including newly generated particles and particles generated in previous moments that have not yet disappeared, their spatial state at the next moment, i.e., their new three-dimensional spatial coordinates, is calculated based on the adapted and adjusted baseline motion trajectory function. The baseline motion trajectory function defines the mathematical relationship between the particle's position and time. For example, for a raindrop particle falling under gravity, its baseline motion trajectory function can be expressed as a series of kinematic equations. Taking time as input, this function outputs the particle's spatial coordinates at the corresponding moment. In discrete simulations, based on the time value of the current step, this function is called to calculate the coordinates of each particle at this precise moment. If the function is continuous, it needs to be discretized and solved, calculating the new position at the current moment based on the position, velocity, and acceleration parameters of the previous moment. Through this calculation, the motion trajectory of each particle in three-dimensional space is determined frame by frame.
[0072] Simultaneously, based on the adapted optical property evolution rules, the optical state of each virtual particle at the current moment, i.e., the new color information, is calculated. The optical property evolution rules define how the particle color changes over time or its own state. The rules can be very simple, such as stipulating that the color of a raindrop particle remains white throughout its entire lifespan. The rules can also be more complex, such as stipulating that the brightness of particles representing clouds varies sinusoidally with their altitude or time to simulate the movement of light and shadow in clouds. Based on the time value of the current step, or combined with other state variables of the particle, this rule is invoked to calculate the color value that each particle should display at this moment, such as an RGB triplet.
[0073] After calculating the spatial and optical states of all active particles at the current step, the calculated complete state dataset is bound to the time value indicated by the current simulation clock. Specifically, the current spatial coordinates and color value of each particle are associated with the specific timestamp corresponding to the current step. This timestamp can be a relative time compared to the simulation's starting point. This binding process anchors dynamic attribute values to a continuous timeline.
[0074] The analog clock continues to step, repeatedly executing the particle generation, state calculation, and timestamp binding processes described above. This process ends when the analog clock reaches the total display duration. For example, in a two-second simulation, the simulation loop terminates after the analog clock progresses from the first step to the last step corresponding to the second second and completes the state calculation for all particles at that moment.
[0075] Finally, the particle state data generated and timestamped at all step times are summarized, organized, and serialized in chronological order to form a virtual particle stream. This virtual particle stream records the precise spatial position and visual appearance of each particle in the virtual particle system at each sampled time point throughout the entire display duration, completely describing the evolution of a dynamic weather phenomenon in virtual space. For example, in the aforementioned rain simulation, the final generated virtual particle stream contains data from 200 time slices, each slice recording the position and color of all raindrops in the simulation space at that 1 / 10th of a second, collectively describing a virtual rainfall lasting 2 seconds. This virtual particle stream, as the final output of the simulation process, provides a hardware-independent data source containing complete spatiotemporal information for subsequent mapping onto the LEDs of specific physical lighting fixtures.
[0076] The above embodiment, based on a particle flow template library, achieves structured and configurable rapid modeling of complex weather phenomena by mapping meteorological physical parameters to discrete weather types and calling corresponding parameterized templates. This embodiment decomposes the generation process of weather lighting effects into three logical levels: template selection, parameter adaptation, and temporal simulation. It can generate visually stable, controllable, and physically intuitive dynamic particle flows with low computational overhead using a pre-designed, artistically crafted rule library. By dynamically associating continuous physical parameters with specific visual parameters such as density, velocity, direction, and color in the templates, it achieves a delicate response of lighting effects to weather intensity, wind direction, and time while maintaining efficient generation. This allows for rich, dynamic, and adaptable weather lighting simulation effects that can be flexibly adapted to different hardware layouts, even in resource-constrained embedded environments such as household ceiling lights, effectively balancing implementation complexity and visual quality.
[0077] Based on any embodiment of the method in this application, the parameters defined in the target template are adapted according to the meteorological and physical parameters, including: adapting the corresponding parameters defined in the target template according to at least one of the following types of information in the meteorological and physical parameters: intensity or magnitude information, used to adjust the particle generation density in the generation rule, the brightness or size parameters in the optical attribute evolution rule; motion vector information, used to adjust the direction, velocity or turbulence parameters in the reference motion trajectory function; environmental state information, used to adjust the basic hue, saturation or transparency parameters in the optical attribute evolution rule; and composite trigger information, used to trigger the special evolution rules of preset particle behavior or optical state in the target template when specific weather combination conditions are met.
[0078] When adapting the invoked target template based on meteorological and physical parameters, the input information can be categorized into multiple logical classes. Each class corresponds to a different parameter set defined in the template, thereby enabling refined and dynamic control of the lighting effects across multiple dimensions. This classification and adaptation mechanism ensures that the virtual particle flow can more accurately reflect the complex weather conditions described by the meteorological and physical parameters.
[0079] Intensity or magnitude information refers to physical quantities that directly characterize the severity or quantity of weather phenomena. This type of information is primarily used to adjust template parameters directly related to the scale or energy perceived in visual effects. In one embodiment, this information includes precipitation, wind speed level, or lightning frequency. During adaptation, the processor scales the particle generation density parameter defined by the generation rules in the target template based on the values of this information. For example, when the input precipitation parameter value increases, indicating increased rainfall, the particle generation density parameter in the rain template is increased proportionally, resulting in an increase in the number of raindrop particles generated per unit time in the simulation, thus presenting a denser visual effect of rainfall in the final lighting. In another embodiment, intensity or magnitude information can also be used to adjust brightness or size parameters in the optical property evolution rules. For example, when simulating heavy snowfall, the initial size parameter of the snowflake particles can be adjusted based on the snowfall parameter; the greater the snowfall, the larger the simulated snowflake size, thus enhancing the visual effect.
[0080] Motion vector information refers to physical quantities that describe the direction and speed of macroscopic motion of air or particles. This type of information is mainly used to adjust template parameters related to particle trajectories. In one embodiment, this information includes wind direction and wind speed. During adaptation, the processor determines a two-dimensional or three-dimensional direction vector based on the wind direction parameter and the intensity of the vector based on the wind speed parameter. Subsequently, this direction vector and intensity value are applied as adjustments to the baseline motion trajectory function of the target template. For example, in a rain template, the baseline motion trajectory function defines vertical falling motion. During adaptation, the calculated direction vector can be added as an additional velocity component to the original falling motion, thereby correcting the trajectory of each raindrop particle, making it appear as if it is falling at an angle with the wind. The higher the wind speed value, the larger the added horizontal velocity component, and the more obvious the tilting effect. In another embodiment, motion vector information can also be used to adjust turbulence parameters in the baseline motion trajectory function to simulate the effects of unstable airflow. For example, when simulating windy weather, the turbulence intensity parameter that controls the random disturbance of particle paths can be adjusted according to the fluctuation of wind speed. When the wind speed changes drastically, the turbulence parameter is increased, so that the motion paths of the simulated windmill rotating particles or drifting particles show more significant disorder fluctuations.
[0081] Environmental state information refers to physical quantities that describe the overall optical or physical background conditions of the atmosphere. This type of information is mainly used to adjust template parameters related to the overall visual tone of particles. In one embodiment, this information includes ambient temperature, humidity, time, or solar intensity. During adaptation, the processor maps and adjusts the base hue, saturation, or transparency parameters defined by the optical property evolution rules in the target template based on the values of this information. For example, in a sunny day template, the optical property evolution rules define cloud particles as white. The processor can dynamically adjust the color temperature parameter of this white color based on time parameters (such as the solar altitude angle calculated from the location) or real-time light intensity parameters. Under simulated midday sunlight, the color temperature is adjusted towards cool white; under simulated dusk, the color temperature is adjusted towards warm yellow, while simultaneously reducing the brightness parameter. Similarly, in a hazy weather simulation, the transparency parameter of particles representing distant objects or the overall background can be increased based on humidity or PM2.5 concentration parameters, making their colors appear more hazy and reducing saturation to simulate the visual effect of decreased visibility.
[0082] Composite trigger information refers to trigger signals formed when multiple meteorological and physical parameters meet a set of preset logical combination conditions. This type of information is mainly used to activate special visual effect logic in the target template that is pre-designed but not continuously effective. In one embodiment, this type of information is generated by the joint judgment of multiple parameters. For example, in a thunderstorm weather template, a set of special evolution rules for simulating lightning is predefined, but the execution of these rules requires the fulfillment of specific composite conditions, such as simultaneously detecting that the precipitation parameter is greater than a certain threshold and that there is a lightning activity indication signal. In the adaptation and adjustment step, the processor continuously monitors the input meteorological and physical parameters. Once the parameters are detected to meet the preset composite trigger conditions, the special evolution rule is immediately triggered. After triggering, the adjustment action may not be a simple parameter scaling, but rather the execution of a pre-programmed special response. For example, the brightness parameters of all particles in a certain area of the simulated space can be temporarily and instantaneously adjusted to the maximum value for a very short duration to simulate a lightning flash; and within a few frames after the flash, the base brightness of all raindrop particles can be increased by one level and then slowly restored to simulate the effect of light gradually attenuating after lightning illuminates the night sky. This adjustment, based on compound conditions, enables the lighting effects to represent sudden, discontinuous, and dramatic changes in weather phenomena.
[0083] The adaptation and adjustment of the aforementioned information can be achieved using predefined adjustment functions, lookup tables, or rule sets. The processor identifies the category of the input meteorological and physical parameters, retrieves or calls the corresponding adjustment logic based on the parameter name and value, and calculates the new value of the corresponding parameter in the target template, thereby completing the dynamic customization of the generation rules, the baseline motion trajectory function, and the optical attribute evolution rules. Through this categorized, multi-dimensional adaptation and adjustment mechanism, the generation system based on a fixed template gains the ability to respond delicately and accurately to continuous and variable meteorological and physical parameters, significantly enhancing the realism and expressiveness of the generated virtual particle flow and its final lighting effects.
[0084] The embodiment described in this application, which adapts template parameters based on multi-category information, achieves refined and dynamic customization of preset weather lighting templates by mapping parameters to multi-dimensional meteorological information such as intensity, motion, environment, and composite conditions. This embodiment goes beyond simple template playback, transforming continuously changing physical parameters into continuous adjustments of visual parameters. While maintaining the efficiency and stability of template solutions, it endows lighting effects with a sensitive response to real weather details (such as rainfall, wind direction changes, day-night cycles, and even sudden lightning). This mechanism, without significantly increasing computational complexity, greatly enriches the expressive dimensions of template-based weather simulation, resulting in dynamic visual effects that are not only aesthetically pleasing but also possess subtle changes that closely reflect physical reality. This effectively solves the technical problems of fixed effects and lack of dynamic adaptability in traditional solutions.
[0085] Based on any embodiment of the method in this application, generating a virtual particle stream corresponding to the weather phenomenon according to the meteorological physical parameters includes: Step S5231: Encode the meteorological physical parameters and the set frame rate of the target lamp into a numerical vector containing the expected display duration information, and use it as input data; This embodiment can directly infer the complete data sequence corresponding to the virtual material flow from meteorological and physical parameters based on a data-driven model. To this end, the acquired meteorological and physical parameters are first combined and encoded with the set frame rate of the target lighting fixture to form a structured numerical vector, which serves as the input data for the entire generation model. The numerical vector not only contains meteorological and physical parameters describing the nature of the weather but also integrates display parameters that control the structure of the final output sequence. In one embodiment, the encoding process includes standardizing or normalizing each meteorological and physical parameter, mapping it to the numerical range agreed upon during model training.
[0086] Simultaneously, the expected display duration information also needs to be encoded into this vector. The expected display duration can be a fixed value set by the user, or a default value derived based on meteorological parameters or the scene. For example, the input data can be a one-dimensional array, where the first N elements represent normalized meteorological parameters such as temperature, humidity, wind speed, and precipitation, the (N+1)th element represents the set frame rate, and the (N+2)th element represents the expected display duration. In another embodiment, the set frame rate and the expected display duration can be pre-multiplied to obtain the total number of frames to be generated, and this total number of frames can be encoded as one of the parameters. This encoded numerical vector carries all the control information required to generate a weather animation of a specific duration and frame rate.
[0087] Step S5232: Feed the input data into the pre-trained particle attribute generation model for forward inference, and output a dense tensor representing the spatiotemporal sequence of the virtual particle flow. The size of the dense tensor in the time dimension is determined by the expected display duration and the set frame rate, and includes data channels for spatial state and optical state. Next, the encoded input data is fed into the pre-trained particle attribute generation model. This model is a trained machine learning model that has learned, through a large amount of sample data, the complex mapping relationship between the numerical vector composed of meteorological parameters and display control parameters and the spatiotemporal sequence of dynamic particles, i.e., the virtual particle flow. During the training phase, the model uses a massive paired dataset consisting of meteorological parameters, display control parameters, and corresponding ideal virtual particle flow data. The specific structure of the model can be a deep neural network, including but not limited to convolutional neural networks, recurrent neural networks, Transformers, or their variants; the specific architecture is designed according to the complexity of the task.
[0088] During the inference phase, the model receives numerical vectors from the input data and performs internal forward propagation calculations. After nonlinear transformations and feature extraction within the model, a dense tensor is finally output. This dense tensor is the model's mathematical representation of the virtual particle flow. Its key characteristic is that its size in the time dimension is directly determined by two parameters in the input data: the expected display duration and the set frame rate. Specifically, the size of the time dimension equals the expected display duration multiplied by the set frame rate, which ensures that the length of the generated sequence precisely matches the number of frames required for subsequent playback.
[0089] Furthermore, this dense tensor contains multiple data channels, which are logically divided into portions carrying spatial state and optical state information. In one embodiment, the dense tensor can have a four-dimensional shape, including, for example, batch size, time steps, particle count, and feature dimension. The feature dimension contains data channels representing three-dimensional spatial coordinates and color information (such as RGB values), respectively. In this way, the model directly outputs the complete spatiotemporal state sequence of all virtual particles at all time steps in a single forward inference operation.
[0090] Step S5233: Decode the dense tensor, convert the time dimension index of the dense tensor into a specific timestamp according to the set frame rate, and extract the spatial state and optical state from the corresponding data channel to obtain the virtual particle stream containing the spatial state, optical state and corresponding timestamp of each virtual particle as it evolves over time.
[0091] After obtaining the dense tensor output by the model, it can be decoded to transform it into a structured virtual particle flow defined in the application. To do this, a specific timestamp is first assigned to the data at each time step in the dense tensor. Since the indices of the dense tensor in the time dimension are discrete integers, while actual time should be continuous, these integer indices need to be converted into specific time points based on the set frame rate in the input data. In one embodiment, for the i-th index in the time dimension, its corresponding timestamp can be calculated by dividing i by the set frame rate. For example, if the set frame rate is 60 frames per second, then frame 0 corresponds to a timestamp of 0 seconds, frame 1 corresponds to a timestamp of approximately 0.0167 seconds, and so on. Through this linear mapping, each time slice in the dense tensor is associated with a precise moment.
[0092] Next, the spatial and optical states of each virtual particle at each timestamp are extracted from the data channels corresponding to the dense tensor. In one embodiment, the spatial state information is stored in specific feature channels of the tensor; for example, the first three channels represent the X, Y, and Z coordinates, respectively. The optical state information is stored in other channels; for example, the next three channels represent the R, G, and B color values. The decoder traverses the time dimension of the dense tensor in the order of the timestamps. For each timestamp, the decoder reads the values of all particles in all feature channels for that time slice. Then, for each particle, the values of its coordinate channels are extracted and combined to form the particle's spatial state at that moment. Simultaneously, the values of its color channels are extracted and combined to form the particle's optical state at that moment. Finally, this spatial state and optical state are bound to the current timestamp to form a complete record of the particle and its state at that moment.
[0093] After traversing all time steps of the dense tensor, a set of state records for all particles at all times is obtained. Organizing and serializing these records in chronological order generates the final virtual particle stream. This virtual particle stream is structurally identical to the virtual particle stream generated via the template path, containing the spatial and optical states of each virtual particle as it evolves over time, along with its corresponding timestamp, allowing for seamless integration into subsequent mapping and rendering steps. For example, the model receives an input vector describing "light rain, wind speed 2 meters per second, display for 5 seconds, frame rate 60Hz," and outputs a dense tensor of shape (1, 300, 1000, 6), representing a 5-second, 300-frame animation simulating 1000 raindrop particles, each with 6 features. After decoding, a virtual particle stream containing 300 consecutive time points describes the color and position information of 1000 raindrops falling obliquely in 3D space under the influence of a light breeze.
[0094] The above embodiments, through an end-to-end deep learning architecture, achieve a direct and efficient mapping from raw meteorological and display parameters to complete spatiotemporal particle sequences. This avoids the complexity of manually designing physical rules or templates, and can automatically learn and synthesize highly realistic and diverse dynamic weather visual effects. Since the model inference process does not rely on iterative simulation, its generation speed is stable and predictable, making it particularly suitable for applications with high real-time requirements. Furthermore, by uniformly controlling the duration, frame rate, and hardware playback parameters of the generated effect at the input end, the inherent matching between the generated content and the playback device is ensured, improving the overall system efficiency.
[0095] Based on any embodiment of the method in this application, at each control time point of the target luminaire, according to the spatial and optical states of all virtual particles in the virtual particle stream at that time point, the luminous emission control data of each lamp in the physical lamp layout driving the target luminaire at that time point is determined, including: Step S5310: For each LED in the physical LED layout, search for all virtual particles in the virtual particle flow based on the three-dimensional spatial coordinates contained in the spatial state of the LED. After generating a virtual particle stream describing weather phenomena, it needs to be mapped onto specific physical lighting fixtures to drive the LEDs to emit light. This mapping process can be performed independently at each control time point of the target lighting fixture. The control time points can be discrete time series determined by the refresh rate of the target lighting fixture, such as 60 or 120 points per second. At each control time point, based on the data from the virtual particle stream, the control data required to drive each LED in the physical LED layout of the lighting fixture to emit light is calculated; this is the light emission control data. In this embodiment, a rendering method based on spatial proximity and contribution weights is used to simulate the soft rendering principle of particle systems in computer graphics, in order to generate soft, naturally transitioning lighting effects.
[0096] Therefore, for each LED in the physical LED layout of the target luminaire, virtual particles that contribute visually to it can be searched in the virtual particle stream. The physical LED layout describes the actual spatial arrangement and coordinates of all LEDs on the target luminaire and is known in advance. Accordingly, at a given control time point, the spatial state of all virtual particles recorded in the virtual particle stream at that moment is read, i.e., their three-dimensional spatial coordinates. Then, using the physical coordinates of the currently processed LED as the center, a predefined spatial proximity range is used to search for neighboring virtual particles. The spatial proximity range can be a sphere (or circle), a cube (or rectangle), or other spatial region defined according to the layout characteristics. In one embodiment, the radius of this proximity range can be preset according to the LED density and the desired light effect softness.
[0097] By traversing the spatial coordinates of all virtual particles at the controlled time point, it is determined which virtual particles' three-dimensional spatial coordinates fall within the spatial proximity range defined by the current LED. Marking all virtual particles falling within this spatial proximity range as neighboring virtual particles of that LED completes the search. For example, for a virtual particle stream simulating raindrops, at a certain moment, the proximity range of a certain LED might contain the coordinates of several raindrop particles. This means that the light effect of these raindrops should influence the light emission of that LED.
[0098] Step S5320: Determine the contribution weight of each neighboring virtual particle to the lamp bead based on the spatial distance between the lamp bead and each of its neighboring virtual particles; After identifying all neighboring virtual particles, the contribution of each particle to the current LED needs to be quantified. This contribution weight is represented by a value called the contribution weight, which primarily depends on the spatial distance between the particle and the LED. In one embodiment, the contribution weight is inversely proportional to the distance; the closer the particle, the greater its contribution weight. The specific weight calculation can be achieved using a preset decay function. A common implementation uses linear decay, where the contribution weight equals 1 minus the ratio of the distance to the radius of the neighboring area. When the distance is 0, the weight is 1; when the distance equals the radius, the weight is 0. In another embodiment, a Gaussian decay function or an exponential decay function can be used, causing the weight to decrease smoothly and rapidly as the distance increases. This distance-based weight calculation ensures that the visual influence of a virtual particle gradually diffuses and decays outwards from its spatial location, rather than affecting only a discrete point. This helps create a soft halo effect rather than a harsh spot of light.
[0099] Step S5330: Based on the contribution weight, the color information contained in the optical state of all neighboring virtual particles of the LED bead at this time point is weighted and mixed to calculate the target color value of the LED bead. After determining the contribution weight of each neighboring particle, the comprehensive color that the current LED should display at this moment, i.e., the target color value, is calculated. This can be accomplished by weighted mixing of the color information of all neighboring virtual particles at this point in time. The optical state of each neighboring virtual particle at this moment contains its color information, such as an RGB value. During weighted mixing, each component (e.g., R, G, B) of the color vector of each neighboring virtual particle is multiplied by the contribution weight corresponding to that particle to obtain the weighted color component. Then, the weighted color components of all neighboring particles are summed separately. In one embodiment, after summing, the result also needs to be divided by the sum of all weights to achieve normalization and prevent excessive changes in overall brightness due to different particle numbers or weights. The final color vector obtained is the target color value of the LED.
[0100] Step S5340: Convert the target color value into the light emission control data required to drive the LED to emit light.
[0101] Finally, the calculated target color value needs to be converted into structured control information that can actually control the LED's illumination, i.e., illumination control data. The target color value is an abstract data representing visual color, decoupled from specific hardware driver details. The illumination control data, on the other hand, is the control information ultimately used to indicate or command the LED's illumination state. The specific content and output format of the conversion process depend on the overall architecture design and division of responsibilities of the control system.
[0102] In one embodiment, the light emission control data is generated as drive instructions that can be directly executed by the underlying hardware. In this architecture, the conversion process requires a complete mapping from abstract color values to specific electronic control signals. If the target luminaire's LEDs are standard RGB LEDs, the process may include converting the target color value from the color space used in the calculation to a color space that matches the photoelectric characteristics of the LED chip, and may also include gamma correction to compensate for the nonlinearity perceived by the human eye. The corrected color value is then quantized into a range of values acceptable to the drive circuit. A common driving method is pulse width modulation (PWM), so the conversion process includes calculating the required PWM duty cycle for each color channel based on the color value. For example, a target color value represented as (R, G, B) is converted into three duty cycle values between 0 and 100. These duty cycle values, along with the target LED's address identifier, are encapsulated into data packets according to the communication protocol format required by the luminaire's drive circuit, thus constituting the light emission control data that can be directly sent to the hardware drive circuit. After receiving this data packet, the driving circuit parses the duty cycle and address, and then generates a pulse width modulation electrical signal with the corresponding duty cycle, thereby precisely controlling the LED bead at the corresponding address to emit light of the specified color and brightness.
[0103] In another embodiment, the luminescence control data is generated as an intermediate-level, descriptive control parameter, rather than the lowest-level electrical signal command. Under this architecture, the conversion process is relatively simplified. The target color value, along with its corresponding LED identifier, is directly organized and encapsulated according to a predetermined, higher-level data structure. For example, the generated data packet can contain a timestamp and a list, where each item records an LED identifier and its corresponding target color value. This form of luminescence control data contains all the color information required to drive the LED, but does not specify specific low-level parameters such as the pulse width modulation duty cycle. It can be sent to a lower-level processor or driver module specifically responsible for hardware driving. Upon receiving this descriptive luminescence control data, this lower-level module is responsible for performing the color space conversion, quantization, and pulse width modulation duty cycle calculation steps described in the above embodiment, ultimately generating the actual electrical control signal to drive the LED.
[0104] The above embodiments achieve a soft, continuous lighting rendering effect with a natural halo by smoothly distributing the visual influence of each virtual particle to multiple surrounding physical LEDs based on spatial distance. This embodiment effectively bridges the discrete virtual particle system with discrete physical LED arrays, avoiding the harsh, granular visual effect produced by directly hard mapping particles to LEDs one-to-one. Through this weighted mixing mechanism that simulates light diffusion, the final dynamic weather lighting effects, such as raindrop halos, cloud gradients, and light penetration, are visually smoother and more realistic, significantly enhancing the immersiveness and expressiveness of the overall visual effect. This solves the problem of visual roughness that may occur when adapting abstract particle flows to specific hardware layouts with high quality.
[0105] Based on any embodiment of the method in this application, converting the target color value into the light emission control data required to drive the LED to emit light includes the following steps: Step S5341: Convert the target color value from the first color space to the second color space supported by the target lamp bead; The first color space is the color representation system used to calculate the target color value. However, the photoelectric conversion characteristics of the target lamp beads, such as a specific model of LED, may not fully conform to the standard color space. To ensure that the color emitted by the lamp beads is consistent with the color perceived or calculated by the human eye, a color space mapping conversion can be performed. In one embodiment, if the lamp beads support a wider color gamut such as Adobe RGB or DCI-P3, and the calculation process is based on sRGB, then the target color value needs to be converted from sRGB to the target color space. In another embodiment, the conversion process may include gamma correction to compensate for the nonlinear photoelectric response of the display device and the nonlinear perception of brightness by the human eye. During the conversion, each component of the target color value is first subjected to an inverse gamma transform to convert it to a linear light intensity value. Then, a linear transformation is performed according to the photoelectric characteristics of the target lamp. Finally, the gamma curve required by the target lamp is applied for encoding to obtain a color value in the second color space that conforms to the physical characteristics of the target lamp. This step ensures the accurate transmission of color intent from digital calculation to physical emission.
[0106] Step S5342: Based on the converted color values, combined with the current working mode of the target lamp and the global brightness parameters, calculate the pulse width modulation duty cycle of each color channel; The current operating mode of the target luminaire is an abstraction of the luminaire's operating state, such as normal mode, night mode, energy-saving mode, etc. Different modes can correspond to different maximum brightness limits or color preferences. The global brightness parameter is a coefficient set by the user or system that affects the overall luminous intensity of all LEDs. The process of calculating the pulse width modulation duty cycle is to quantify the color value representing light intensity into a proportion of the control switching time acceptable to the drive circuit. In one embodiment, for RGB LEDs, their color values include three channel components: red, green, and blue. When calculating the pulse width modulation duty cycle of each channel, first multiply the color component value of that channel by the global brightness parameter, and then limit the amplitude according to the brightness upper limit corresponding to the current operating mode. Then, the resulting final brightness value is mapped to a fixed numerical range, such as between 0 and 255. This value is the pulse width modulation duty cycle of that color channel, which directly determines the proportion of time that the driving voltage applied to the LED of that channel is in a high-level state within one modulation cycle. A duty cycle of zero indicates that the LED of that channel is completely off, while a duty cycle of the maximum value indicates that the LED of that channel is emitting light at maximum power. By independently controlling the duty cycle of the three color channels, the desired colors can be mixed.
[0107] Step S5343: Encode the pulse width modulation duty cycle into a data packet conforming to the target lamp communication protocol, and send it to the target lamp as the light emission control data.
[0108] Finally, the calculated pulse width modulation duty cycle for each color channel is encoded according to the target luminaire's communication protocol and encapsulated into a data packet, which is then sent to the target luminaire as the final light emission control data. Different luminaires or driver chips may use different communication protocols, such as I2C, SPI, DMX512, or a custom serial protocol. The encoding process must follow the data frame format specified by the protocol. In one embodiment, the data packet needs to contain the address information of the target LED, the duty cycle data of each color channel, and a possible checksum. For example, in a control system using a custom serial protocol, the data packet may begin with a specific start byte, followed by the LED address byte, then the duty cycle data bytes for the red, green, and blue channels, and finally end with a checksum byte. The processor sends the encapsulated data packet out through the corresponding physical interface. After receiving the data packet, the target luminaire's driver circuit decodes it, extracts the address and duty cycle information, and generates a corresponding high-frequency pulse width modulation signal to drive the LED at the specified address to emit light, thereby accurately achieving the required color and brightness.
[0109] The above embodiments achieve a seamless connection from abstract visual computing to specific hardware drivers. This embodiment ensures that the color and brightness intentions generated by the algorithm can overcome the differences in photoelectric characteristics of different hardware, ultimately achieving an accurate and consistent presentation on the physical LEDs, thereby guaranteeing the visual fidelity of the overall weather lighting simulation effect. Simultaneously, by incorporating the working mode and global brightness parameters into the calculation, the light intensity can be flexibly adjusted in different application scenarios, enhancing the product's practicality and user experience.
[0110] Based on any embodiment of the method in this application, weather state data is obtained, including: Step S5110: In response to the lighting effect update event, send a data acquisition request to the external meteorological data source to obtain real-time meteorological data packets; In one embodiment, the lighting effect update event can be a periodic timer event, such as triggering every 10 minutes, to achieve timed synchronization with outdoor weather. In another embodiment, the event can also be a refresh command manually triggered by the user through an application interface or other physical buttons. Furthermore, the event can also be triggered by coordinated signals from other modules within the smart home system, such as when an environmental sensor detects a significant change in indoor lighting conditions.
[0111] Upon responding to a lighting effect update event, communication can be initiated with an external meteorological data source to obtain real-time meteorological data packets. In one embodiment, the data source is an application programming interface (API) provided by a public or commercial meteorological data service provider on the Internet. A data acquisition request is constructed according to the predefined protocol format of the API via a network communication module and sent to the network address corresponding to the meteorological data service interface. In another embodiment, the external meteorological data source can also be a local smart home gateway or a network-attached storage device, which stores meteorological information pre-downloaded or aggregated by other devices. A data acquisition request is sent to this local source. After sending the request, a response from the meteorological data source is awaited and received; this response contains a structured meteorological data packet.
[0112] Step S5120: Parse the meteorological physical parameters from the meteorological data packet. The meteorological physical parameters include any one or more of the following: temperature, humidity, wind speed, wind direction, precipitation, air pressure, and air quality index.
[0113] Upon receiving the meteorological data packet, the meteorological physical parameters required for subsequent steps can be parsed. Since different data sources may provide different data packet structures, the parsing logic needs to be adapted accordingly. In one embodiment, if the data packet is in JSON format, the parsing process includes locating specific keys representing information such as temperature, humidity, and wind speed, and reading their corresponding values. The meteorological physical parameters parsed from the data packet constitute a set of quantifiable physical quantities describing the current weather state. These parameters include any one or more of temperature, humidity, wind speed, wind direction, precipitation, air pressure, and air quality index. For example, a single parsing might yield a temperature of 20 degrees Celsius, humidity of 65%, wind speed of 3 meters per second, wind direction of northeast, precipitation of 0 millimeters per hour, air pressure of 1000 hPa, and air quality index of 50. These specific numerical parameters, compared to a simple "sunny" label, provide a multi-dimensional, continuous, and accurate weather description, providing a rich and reliable data foundation for generating dynamic lighting effects that can delicately reflect weather intensity, trends, and complex characteristics.
[0114] The above embodiments achieve automated and standardized integration between the weather lighting simulation system and real-world meteorological data. This enables the continuous acquisition of high-precision, multi-dimensional real-time weather information, thereby driving the lighting effects to dynamically and accurately follow objective changes in outdoor weather, greatly enhancing the real-time performance and realism of the simulation. Simultaneously, this approach entrusts weather sensing capabilities to professional meteorological services, simplifying the design of terminal equipment, improving system reliability and maintainability, and providing a stable and efficient data input channel for constructing an immersive indoor lighting environment capable of intelligently responding to changes in the real environment.
[0115] Based on any embodiment of the method in this application, the weather type to which the weather state data belongs and the dynamic visual effect satisfy at least one of the following feature correspondences: Firstly, when the weather type is sunny, the dynamic visual effect is presented as clouds with white light effects simulating drifting in a predetermined direction on a blue background.
[0116] The core characteristic of dynamic visual effects resembling a clear sky lies in the combination of an overall color scheme and dynamic elements. In one embodiment, the visual effect uses a blue-toned background to simulate a clear sky. Against this blue background, there are clouds simulated by white light effects. These cloud effects are not static but continuously drift along a predetermined direction. This predetermined direction can be fixed, such as from left to right, or it can be dynamically set based on wind direction information from acquired meteorological physical parameters. The speed, density, and shape of the drifting clouds can be finely adjusted according to parameters such as cloud cover, but overall, the movement remains gentle and continuous to reflect the fluidity of clouds under a clear sky.
[0117] Secondly, when the weather type is rainy, the dynamic visual effect is presented as raindrops simulated by white or light blue light spots randomly appearing and slowly disappearing on a dark gray background.
[0118] The dynamic visual effects for rainy days contrast sharply with those for sunny days in terms of overall atmosphere and particle behavior. In one embodiment, the visual effect simulates the dim light of a rainy day against a dark gray background. Against this background, the dynamic effect consists of white or light blue dots representing raindrops. These dots exhibit a specific pattern of behavior: they appear rapidly and randomly at different locations in the simulated space, simulating the formation of raindrops, then move at a relatively fast speed (like falling), and slowly disappear after reaching their destination or after a period of time, simulating the process of raindrops falling out of view or fading visually. This rhythm of rapid appearance and slow disappearance, combined with the random generation positions, creates a sense of continuous and dynamic rain. The density, falling speed, and color intensity of the raindrops can be adaptively adjusted according to parameters such as rainfall intensity and lighting conditions.
[0119] Thirdly, when the weather type is snowy, the dynamic visual effect is presented as snowflakes simulated by white light spots falling from the edge to the center and accumulating on a dark blue background, gradually melting away after accumulating to a threshold.
[0120] The dynamic visual effects for snowy weather focus on simulating the unique trajectory and cumulative effect of falling snowflakes. In one embodiment, the visual effect uses a dark blue background to suggest the cold atmosphere of winter or night. The dynamic effect consists of snowflakes simulated by white dots of light. The movement paths of these snowflake dots are designed to fall from the edge of the illuminated area towards the center. This centripetal movement enhances the sense of visual convergence and immersion, simulating the accumulation behavior of snowflakes. After reaching the bottom or a specific area, the falling snowflakes do not disappear immediately but visually "pile up," manifested as an increase in the cumulative brightness or density of the dots in that area. When the accumulation reaches a preset visual threshold, the simulated snow begins to gradually melt, manifested as a slow decrease in the brightness or density of the area until it returns to its original state, and then a new accumulation cycle begins. This periodic behavior of accumulation and melting vividly simulates the natural process of snowfall and melting.
[0121] Fourth, when the weather type is a strong wind, the dynamic visual effect is presented as a windmill with at least two rings of light spots rotating in opposite directions on a dark blue background.
[0122] The dynamic visual effect for strong winds primarily uses simulated rotating abstract patterns to represent the movement of the wind. In one embodiment, the visual effect uses a dark blue background. The dynamic effect consists of at least two rings of light dots arranged in a circular pattern, simulating windmill blades or abstract airflow vortices. These rings rotate in opposite directions; for example, the inner ring rotates clockwise, and the outer ring rotates counterclockwise. This opposing rotational motion creates a strong dynamic contrast and a sense of flow, effectively conveying the strength and rotational characteristics of the wind. The rotation speed of the rings can be linearly adjusted according to wind speed parameters; the higher the wind speed, the faster the rotation speed, thus visually translating the intensity of the wind into the intensity of the visual dynamic.
[0123] Fifth, when the weather type is thunderstorm, the dynamic visual effect is presented as a strong white flashing light effect appearing intermittently in the whole area or in a local area on a dark gray background to simulate lightning.
[0124] The key to dynamic visual effects in thunderstorm scenarios lies in simulating the suddenness and high intensity of lightning flashes and their instantaneous impact on ambient light. In one embodiment, the visual effect uses a dark gray background to represent the dense clouds of a thunderstorm. The dynamic effect is primarily manifested as intermittent, intense white flashes. These flashes can instantly cover the entire illuminated area, simulating a powerful lightning bolt illuminating the sky; or they can appear only in a localized area, simulating lightning in distant clouds. The flashes are extremely intense, creating a stark contrast with the dark background, and last for a very short time before rapidly decaying. This intermittent, high-intensity flashing effect accurately captures the core visual characteristics of lightning in thunderstorms. The frequency of the flashes can be roughly correlated with indicators of lightning activity.
[0125] The feature correspondences provided in the above embodiments transform abstract weather concepts into executable lighting effect specifications with clear visual characteristics and behavioral patterns, guiding the generation of animation effects for virtual particle flows. This embodiment ensures that the generated lighting effects are not only dynamic but also possess high semantic accuracy and intuitive recognizability, allowing users to clearly perceive whether the simulated weather is sunny, rainy, snowy, windy, or thunderstorm. These predefined feature relationships form the design foundation for high-quality weather lighting effects. Combined with the aforementioned parametric generation and adaptation adjustment mechanisms, the final light show maintains both artistic design aesthetics and a sensitive and accurate dynamic response to real weather parameters. This achieves highly realistic and expressive simulation of weather phenomena at the visual level, significantly enhancing the user experience of smart lighting fixtures in terms of atmosphere creation and information delivery.
[0126] Please see Figure 2A weather phenomenon lighting simulation device provided to meet one of the purposes of this application is a functional embodiment of the weather phenomenon lighting simulation method of this application. The device includes a data acquisition module 5100, a particle generation module 5200, an LED mapping module 5300, and a light effect control module 5400. The data acquisition module 5100 is configured to acquire weather state data, which includes meteorological and physical parameters for defining weather phenomena. The particle generation module 5200 is configured to generate a virtual particle stream corresponding to the weather phenomenon based on the meteorological and physical parameters. Each virtual particle in the virtual particle stream contains... The system includes spatial and optical states that evolve over time, wherein the spatial state includes three-dimensional spatial coordinates and the optical state includes color information; the LED mapping module 5300 is configured to determine, at each control time point of the target luminaire, the luminous emission control data for each LED in the physical LED layout that drives the target luminaire to emit light at that time point, based on the spatial and optical states of all virtual particles in the virtual particle stream at that time point; the luminous effect control module 5400 is configured to control the LEDs of the target luminaire to emit light according to the luminous emission control data, so as to render a dynamic visual effect simulating the weather phenomenon within the illumination area of the target luminaire.
[0127] Based on any embodiment of the device in this application, the particle generation module 5200 includes: a template determination module, configured to determine the weather type according to the meteorological physical parameters, and call a target template corresponding to the weather type from a preset particle flow template library, wherein the target template defines the generation rules, reference motion trajectory function, optical attribute evolution rules, and motion cycle duration of virtual particles in the form of parameters; an adaptation adjustment module, configured to perform adaptation adjustment on the parameters defined in the target template according to the meteorological physical parameters; and a particle flow construction module, configured to establish an analog clock with the motion cycle duration as the total display duration, and determine the spatial state, optical state, and corresponding timestamp of all virtual particles according to each step of the analog clock established according to the total display duration, based on the adapted and adjusted generation rules, reference motion trajectory function, and optical attribute evolution rules, to constitute the virtual particle flow.
[0128] Based on any embodiment of the device in this application, the adaptation adjustment module includes: adjusting the corresponding parameters defined in the target template according to at least one of the following types of information in the meteorological physical parameters: intensity or magnitude information, used to adjust the particle generation density in the generation rule, the brightness or size parameters in the optical attribute evolution rule; motion vector information, used to adjust the direction, velocity or turbulence parameters in the reference motion trajectory function; environmental state information, used to adjust the basic hue, saturation or transparency parameters in the optical attribute evolution rule; and composite trigger information, used to trigger the preset special evolution rules of particle behavior or optical state in the target template when specific weather combination conditions are met.
[0129] Based on any embodiment of the device in this application, the particle generation module 5200 includes: an input construction module, configured to encode the meteorological physical parameters and the set frame rate of the target lamp into a numerical vector containing expected display duration information, as input data; an inference output module, configured to feed the input data into a pre-trained particle attribute generation model for forward inference, and output a dense tensor representing the spatiotemporal sequence of the virtual particle flow, wherein the size of the dense tensor in the time dimension is determined by the expected display duration and the set frame rate, and includes data channels for spatial state and optical state; and a decoding construction module, configured to decode the dense tensor, convert the time dimension index of the dense tensor into a specific timestamp according to the set frame rate, and extract the spatial state and optical state from the corresponding data channels, thereby obtaining the virtual particle flow containing the spatial state, optical state and corresponding timestamp of each virtual particle as it evolves over time.
[0130] Based on any embodiment of the device in this application, the LED mapping module 5300 includes: a proximity search module, configured to, for each LED in the physical LED layout, search for all virtual particles in the virtual particle stream based on the three-dimensional spatial coordinates contained in the spatial state of the LED; a weight determination module, configured to determine the contribution weight of each neighboring virtual particle to the LED based on the spatial distance between the LED and each neighboring virtual particle; a color value determination module, configured to, based on the contribution weight, perform weighted mixing of the color information contained in the optical state of all neighboring virtual particles of the LED at the time point to calculate the target color value of the LED; and a color value replacement module, configured to convert the target color value into the light emission control data required to drive the LED to emit light.
[0131] Based on any embodiment of the device in this application, the color value conversion module includes: a color conversion module configured to convert the target color value from a first color space to a second color space supported by the target lamp beads; a pulse adaptation module configured to calculate the pulse width modulation duty cycle of each color channel based on the converted color value and the current working mode and global brightness parameters of the target lamp; and an encoding and transmission module configured to encode the pulse width modulation duty cycle into a data packet conforming to the communication protocol of the target lamp, so as to send the light emission control data to the target lamp.
[0132] Based on any embodiment of the device in this application, the data acquisition module 5100 includes: an update response module, configured to respond to a lighting effect update event and send a data acquisition request to an external meteorological data source to obtain a real-time meteorological data packet; and a parameter parsing module, configured to parse the meteorological physical parameters from the meteorological data packet, wherein the meteorological physical parameters include any one or more of temperature, humidity, wind speed, wind direction, precipitation, air pressure, and air quality index.
[0133] Based on any embodiment of the device in this application, the weather type to which the weather state data belongs and the dynamic visual effect satisfy at least one of the following characteristic correspondences: when the weather type is sunny, the dynamic visual effect is presented as clouds simulated by white light effects drifting in a predetermined direction on a blue background; when the weather type is rainy, the dynamic visual effect is presented as raindrops simulated by white or light blue light spots randomly appearing and slowly disappearing on a dark gray background; when the weather type is snowy, the dynamic visual effect is presented as snowflakes simulated by white light spots falling from the edge to the center and accumulating on a dark blue background, gradually melting after accumulating to a threshold; when the weather type is windy, the dynamic visual effect is presented as windmills simulated by at least two rings of light spots rotating in opposite directions on a dark blue background; when the weather type is thunderstorm, the dynamic visual effect is presented as strong white flashing light effects appearing intermittently in the entire area or a local area on a dark gray background to simulate lightning.
[0134] To address the aforementioned technical problems, embodiments of this application also provide an electronic device. For example... Figure 3The 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 executed by the processor, the computer-readable instructions enable the processor to implement a weather phenomenon lighting simulation method. The processor provides computational 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 weather phenomenon lighting simulation 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 3 The 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.
[0135] In this embodiment, the processor is used to execute... Figure 2 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. A 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 weather phenomenon lighting simulation device of this application, and the server can call the server's program code and data to execute the functions of all sub-modules.
[0136] 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 weather phenomenon lighting simulation method of any embodiment of this application.
[0137] 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 magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0138] 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.
[0139] 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 simulating weather phenomena with lighting, characterized in that, include: Acquire weather state data, which includes meteorological and physical parameters used to define weather phenomena; A virtual particle stream corresponding to the weather phenomenon is generated based on the meteorological physical parameters. Each virtual particle in the virtual particle stream contains a spatial state and an optical state that evolve over time. The spatial state includes three-dimensional spatial coordinates, and the optical state includes color information. At each control time point of the target luminaire, based on the spatial and optical states of all virtual particles in the virtual particle stream at that time point, the light emission control data of each lamp in the physical lamp layout that drives the target luminaire to emit light at that time point is determined. The target luminaire's LEDs are controlled to emit light according to the light emission control data, so as to render a dynamic visual effect simulating the weather phenomenon within the target luminaire's illumination area.
2. The weather phenomenon light simulation method according to claim 1, characterized in that, Generating a virtual particle stream corresponding to the weather phenomenon based on the meteorological physical parameters includes: The weather type is determined based on the meteorological and physical parameters. A target template corresponding to the weather type is called from a preset particle flow template library. The target template defines the generation rules of virtual particles, the reference motion trajectory function, the optical property evolution rules, and the motion cycle duration in the form of parameters. The parameters defined in the target template are adjusted for adaptability based on the meteorological and physical parameters. An analog clock is established with the motion cycle duration as the total display duration. Based on the adapted generation rules, the reference motion trajectory function, and the optical attribute evolution rules, the spatial state, optical state, and corresponding timestamp of all virtual particles are determined at each step of the analog clock established according to the total display duration, so as to form the virtual particle stream.
3. The weather phenomenon light simulation method according to claim 2, characterized in that, The parameters defined in the target template are adjusted for adaptability based on the meteorological and physical parameters, including: Based on at least one of the following types of information from the meteorological physical parameters, the corresponding parameters defined in the target template are adjusted for adaptability: Intensity or magnitude information is used to adjust the particle generation density in the generation rule and the brightness or size parameters in the optical property evolution rule; Motion vector information is used to adjust the direction, velocity, or turbulence parameters in the reference motion trajectory function; Environmental status information is used to adjust the basic hue, saturation, or transparency parameters in the optical property evolution rules. Composite trigger information is used to trigger special evolution rules of particle behavior or optical state preset in the target template when certain weather combination conditions are met.
4. The weather phenomenon light simulation method according to claim 1, characterized in that, Generating a virtual particle stream corresponding to the weather phenomenon based on the meteorological physical parameters includes: The meteorological physical parameters and the set frame rate of the target lamp are encoded into a numerical vector containing information on the expected display duration, which is then used as input data. The input data is fed into a pre-trained particle attribute generation model for forward inference, and a dense tensor representing the spatiotemporal sequence of the virtual particle flow is output. The size of the dense tensor in the time dimension is determined by the expected display duration and the set frame rate, and includes data channels for spatial state and optical state. The dense tensor is decoded, and the time dimension index of the dense tensor is converted into a specific timestamp according to the set frame rate. The spatial state and optical state are extracted from the corresponding data channel to obtain the virtual particle stream containing the spatial state, optical state and corresponding timestamp of each virtual particle as it evolves over time.
5. The weather phenomenon light simulation method according to claim 1, characterized in that, At each control time point of the target luminaire, based on the spatial and optical states of all virtual particles in the virtual particle stream at that time point, the luminous emission control data for each LED in the physical LED layout driving the target luminaire at that time point is determined, including: For each LED in the physical LED layout, in the virtual particle stream, based on the three-dimensional spatial coordinates contained in the spatial state, all virtual particles in the vicinity of that LED are searched. Based on the spatial distance between the LED and each of its neighboring virtual particles, the contribution weight of each neighboring virtual particle to the LED is determined. Based on the contribution weight, the color information contained in the optical state of all neighboring virtual particles of the LED bead at this point in time is weighted and mixed to calculate the target color value of the LED bead. The target color value is converted into the light emission control data required to drive the LED to emit light.
6. The weather phenomenon light simulation method according to claim 5, characterized in that, Converting the target color value into the light emission control data required to drive the LED to emit light includes: The target color value is converted from the first color space to the second color space supported by the target lamp chip; Based on the converted color values, combined with the current working mode of the target luminaire and the global brightness parameters, the pulse width modulation duty cycle of each color channel is calculated. The pulse width modulation duty cycle is encoded into a data packet conforming to the target luminaire's communication protocol, and then sent to the target luminaire as the light emission control data.
7. The weather phenomenon light simulation method according to any one of claims 1 to 6, characterized in that, Obtain weather status data, including: In response to the lighting effect update event, a data acquisition request is sent to an external meteorological data source to obtain real-time meteorological data packets; The meteorological physical parameters are parsed from the meteorological data package. The meteorological physical parameters include any one or more of the following: temperature, humidity, wind speed, wind direction, precipitation, air pressure, and air quality index.
8. The weather phenomenon light simulation method according to any one of claims 1 to 6, characterized in that, The weather type to which the weather state data belongs and the dynamic visual effect satisfy at least one of the following characteristic correspondences: When the weather type is sunny, the dynamic visual effect is presented as clouds with white light effects floating in a predetermined direction on a blue background. When the weather type is rainy, the dynamic visual effect is presented as raindrops simulated by white or light blue light dots randomly appearing and slowly disappearing on a dark gray background. When the weather type is snowy, the dynamic visual effect is presented as snowflakes simulated by white light dots falling from the edge to the center and accumulating on a dark blue background, and then gradually melting away after accumulating to a threshold. When the weather type is strong wind, the dynamic visual effect is presented as a windmill with at least two rings of light spots rotating in opposite directions on a dark blue background. When the weather type is thunderstorm, the dynamic visual effect is presented as a strong white flashing light effect appearing intermittently on a dark gray background, either over the entire area or in a localized area, to simulate lightning.
9. A smart lighting fixture, characterized in that, The device includes a processor, a memory, and a plurality of LEDs arranged in a predetermined physical layout and their driving circuits. The processor is configured to call a computer program from the memory to execute the steps of the weather phenomenon lighting simulation method as described in any one of claims 1 to 8, using the smart lamp as the target lamp, and drive each LED to simulate the dynamic visual effects of weather phenomena through the driving circuits.
10. An electronic device comprising a processor and a memory, characterized in that, The processor is configured to invoke a computer program from the memory to perform the steps of the weather phenomenon light simulation method as described in any one of claims 1 to 8.