Intelligent lamp control method based on multi-dimensional spatio-temporal context snapshot and edge side instruction fine-tuning enlarging model
By generating adjustment feature data and multi-source context snapshots, and using edge-side instructions to fine-tune the large language model, the problem of difficulty in personalizing smart lighting in complex environments is solved, realizing personalized adjustment and privacy protection of smart lighting at the edge.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YUEYING INNOVATION TECH (GUANGDONG) CO LTD
- Filing Date
- 2026-02-11
- Publication Date
- 2026-05-15
AI Technical Summary
Existing smart lighting fixtures struggle to consistently deliver lighting effects that meet individual needs in complex and ever-changing living environments. They lack a mechanism to synchronously and structurally link user adjustment behaviors with multi-dimensional contextual information, resulting in insufficiently intelligent automatic adjustment and difficulty in adapting to user preferences.
By receiving user adjustment operations, adjustment feature data is generated and encapsulated into a spatiotemporal context snapshot with multi-source context data in time alignment. This snapshot is then processed through conversational processing and conditional statistical aggregation. Edge-side instructions are used to fine-tune the large language model to generate structured user profile data, which is then used to control smart lighting fixtures.
It enables personalized adjustment of smart lighting fixtures at the edge, reduces reliance on the cloud, enhances the intelligence of automatic adjustment and adaptability to user preferences, and reduces the risk of privacy exposure.
Smart Images

Figure CN122054420A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent lighting control technology, and in particular to an intelligent lighting control method based on a multi-dimensional spatiotemporal context snapshot and edge-side command fine-tuning large model. Background Technology
[0002] Existing smart lighting fixtures typically have the ability to adjust parameters such as brightness and color temperature, and can achieve automatic adjustment through preset scenes, timed tasks, or simple linkages based on ambient illuminance. Users can also control the fixtures via mobile applications, voice interaction, or physical switches / knobs. While these solutions improve ease of operation to some extent, their automatic adjustment often relies on fixed thresholds, rule bases, or limited historical statistics, and is often aimed at "general scenarios" or "average users," making it difficult to consistently deliver lighting effects that meet individual needs in complex and ever-changing real-life environments.
[0003] In practical use, different users exhibit significant differences in their preferences for brightness and color temperature at different times, under varying weather conditions, ambient light levels, and during different activities. Users also frequently make manual adjustments to the automatic output to achieve a more comfortable lighting environment. Existing technologies often only record control commands or final settings, lacking a mechanism to synchronously correlate and structurally solidify user adjustment behavior with multi-source environmental information. They also lack effective differentiation between continuous fine-tuning and accidental touches, making it difficult to accurately understand user adjustment intentions and establish stable preferences. This results in unstable automatic adjustment effects and insufficient personalization, manifesting as "insufficiently intelligent adjustment."
[0004] Furthermore, uploading user behavior and environmental data to the cloud for analysis to enhance intelligence can easily lead to privacy breaches and network dependence; while achieving personalized analysis at the edge faces challenges such as limited computing power and difficulty in structuring and implementing results. Therefore, current technologies still lack an intelligent lighting control method that can combine user adjustment behavior with multi-dimensional contextual information to generate / update individualized adjustment strategies and directly guide lighting control, thereby improving the intelligence of automatic adjustment and its adaptability to user preferences. Summary of the Invention
[0005] The purpose of this application is to solve the problems mentioned above, such as insufficient intelligence in automatic adjustment and difficulty in adapting to individual user preferences.
[0006] According to one aspect of this application, a smart lighting control method based on a large model fine-tuned by multi-dimensional spatiotemporal context snapshots and edge-side command is provided, comprising: S10. Receive user adjustment operation and obtain the light status before adjustment and the corresponding target light status; S20. Generate adjustment feature data based on the difference between the target light state and the light state before adjustment. The adjustment feature data includes at least the target brightness, the target color temperature, and the brightness correction range and / or the color temperature correction range. S30. Within a preset time range in which the adjustment operation occurs, receive multi-source context data corresponding to the adjustment operation, and encapsulate it into spatiotemporal context snapshot data with the adjustment feature data in time alignment and store it. S40. Perform session processing on the snapshot data, merge the continuous adjustments within the preset time window into an adjustment session, and select the final stable state snapshot as statistical sample data. S50. Perform conditional statistical aggregation on the statistical sample data to obtain statistical indicator data, generate prompt words based on the statistical indicator data, input edge-side instructions to fine-tune the large language model inference, and output structured user profile data under JSON Schema constraints. S60. Generate or update intelligent adjustment strategies based on the user profile data to control the intelligent lighting fixtures.
[0007] Preferably, S10 includes: S11. Receive adjustment operation events from mobile applications, voice interaction terminals, or physical knobs / buttons; S12. The type of the adjustment operation event is determined to be a switch operation, brightness adjustment operation, and / or color temperature adjustment operation; S13. When the adjustment operation event is parsed, the current brightness value and the current color temperature value are read as the lighting state before adjustment, and the target brightness value and / or target color temperature value are extracted from the adjustment operation event as the target lighting state.
[0008] Preferably, S20 includes: S21. Determine the brightness correction range as the difference between the target brightness and the brightness before adjustment, and / or, determine the color temperature correction range as the difference between the target color temperature and the color temperature before adjustment. S22. Write the sign of the brightness correction amplitude and / or color temperature correction amplitude into the adjustment feature data as an adjustment direction marker, and write its absolute value into the adjustment feature data as a correction intensity marker; S23. In subsequent conditional statistical aggregation, the modified intensity marker is used as the negative feedback intensity to participate in the statistics, so as to characterize the degree of deviation between the automatic control output and the user's expectations.
[0009] Preferably, S30 further includes: S31. After receiving the adjustment operation, perform data freeze to lock the timestamp, and complete the synchronous reading of multi-source data within the preset collection time limit; S32. Synchronously read motion data, millimeter-wave radar status data, weather data cache value and ambient illuminance reading within the preset time range corresponding to the locked timestamp; S33. Align the action data, millimeter-wave radar status data, weather data cache value, and ambient illuminance reading with the adjustment feature data according to the timestamp and encapsulate them into a snapshot record to form the spatiotemporal context snapshot data.
[0010] Preferably, S30 further includes: S34. Write the snapshot record into the circular buffer of the local Flash; S35. When the circular buffer is full, the earliest written snapshot record is overwritten in chronological order to maintain the recent sample set for subsequent session processing and statistical aggregation under fixed storage resources.
[0011] Preferably, the multi-source context data includes at least human state data, ambient illumination data, weather data, and / or time-series data, wherein: Human body status data is acquired by millimeter-wave radar and includes at least the determination of stillness / micro-motion / movement, respiratory rate, and / or distance of presence; Ambient illuminance data is acquired by a photosensitive sensor and includes at least the illuminance value Lux; The weather data includes at least weather codes and / or outdoor temperatures to enable the conditional statistical aggregation to form groups based on weather conditions and / or time-of-day conditions.
[0012] Preferably, S40 includes: S41. Construct an adjustment sequence consisting of multiple snapshot records in chronological order; S42. Based on the time sliding window, merge multiple snapshot records corresponding to continuous adjustment operations within the window into the same adjustment session; S43. Select the final steady-state snapshot as the intention truth sample for each adjustment session and write it into the statistical sample data; S44. Record the number of adjustments within the adjustment session and write it into the statistical sample data as a hesitation feature to characterize the user's repeated correction behavior.
[0013] Preferably, step S40 further includes at least one data cleaning step: S45. Accidental touch removal: When the duration of the light-on session in the adjustment session is less than the threshold, the corresponding adjustment session is marked as an accidental touch and removed from the statistical sample data; S46. Consistency check and weight reduction: When the human body state data is inconsistent with the adjustment operation type, the corresponding sample is marked as having low context confidence and its weight is reduced in the conditional statistical aggregation of S50. S47. Environment Alignment: When weather data expires, write a macro-environment missing marker for the corresponding sample and exclude it from weather-based group statistics or process it according to the missing data handling strategy in that group.
[0014] Preferably, S50 includes: S51. Group the statistical sample data according to weather conditions and / or time period conditions; S52. Calculate the brightness preference expectation and / or color temperature preference expectation within each group; S53. Calculate the average brightness correction magnitude and / or average color temperature correction magnitude within each group to obtain a negative feedback deviation vector used to characterize the direction and degree of automatic control deviation, and write the preference expectation and negative feedback deviation vector into the statistical index data.
[0015] Preferably, S50 includes: S54. Fill the statistical indicator data into the preset analysis template to generate prompt words; S55. Input the prompt word into the edge-side instruction to fine-tune the large language model to obtain the inference result; S56. Perform JSON Schema constraint decoding on the inference result to limit the set of output fields and data types, so that the output is user profile data with a predefined JSON structure, and includes at least a list of feature tags and a summary summary; S57. The edge-side instruction fine-tuning large language model is obtained by instruction fine-tuning through a hybrid source instruction dataset. The hybrid source instruction dataset includes at least synthetic instruction data that has been distilled by the ultra-large model and reviewed by experts, as well as empirical intent data obtained by obtaining subjective intent labels through intent inquiry initiated by the client and mapping them with objective adjustment operation logs. Accordingly, S60 includes: S61. Extract feature tags from the user profile data and match them with a preset strategy library to generate or update the intelligent adjustment strategy; S62. When a high photosensitive tag is matched, reduce the base brightness coefficient of the automated scene. S63. When a rainy day warm light preference tag is matched, generate a color temperature limit rule based on weather conditions and inject it into the rule engine; S64. In subsequent control cycles, output control commands according to the intelligent adjustment strategy to control the brightness and / or color temperature of the intelligent lamp.
[0016] This application offers the following advantages: By acquiring the pre-adjustment light state and the corresponding target light state when a user makes an adjustment operation, and forming adjustment feature data representing the adjustment intention based on the difference between the two, this adjustment intention is time-aligned with multi-source context data and encapsulated into a spatiotemporal context snapshot. This avoids the loss of intent and context mismatch caused by only recording the final setting value, thus providing a reliable data foundation for subsequent personalized adjustments. Furthermore, by performing session-based processing on the snapshot data and selecting the final stable state as a statistical sample, the interference of noise such as continuous fine-tuning, jitter, and accidental touches on preference statistics can be suppressed, making the accumulated user habits more stable. Based on the statistical sample, conditional statistical aggregation can characterize brightness / color temperature preferences and negative feedback deviations under different conditions such as weather and time of day, improving the adaptability of the adjustment strategy to scene changes. At the edge, the large language model is fine-tuned using instructions and structured user profile data is output under JSON Schema constraints, allowing the profile results to be directly parsed and implemented by the control module, thereby generating or updating intelligent adjustment strategies and controlling the output of the lights. This realizes the transformation of automatic adjustment from "fixed rules / general thresholds" to "individualized and adaptive," while reducing dependence on the cloud and protecting privacy. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is a logic block diagram of the intelligent lighting control method based on multi-dimensional spatiotemporal context snapshots and edge-side instruction fine-tuning of a large model, as described in one embodiment of this application. Detailed Implementation
[0019] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings. Preferred embodiments of this application are shown in the drawings. However, this application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the disclosure of this application.
[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0021] Please refer to Figure 1 One embodiment of this application provides a smart lighting control method based on a large model fine-tuning using multi-dimensional spatiotemporal context snapshots and edge-side command adjustments, comprising: S10. Receive user adjustment operation and obtain the pre-adjustment light state and the corresponding target light state. In this step, it should be noted that the user adjustment operation can be triggered by a mobile application, voice interaction, or physical knob / button. After receiving the adjustment command, the edge controller first reads the current output brightness and color temperature values of the lamp as the "pre-adjustment light state"; simultaneously, it parses the target brightness and / or target color temperature from the adjustment command as the "target light state". When the command only contains brightness or only contains color temperature, the corresponding values in the pre-adjustment light state can be used for the unspecified parameters to form a complete target light state, facilitating subsequent difference calculation and sample standardization.
[0022] S20. Generate adjustment feature data based on the difference between the target lighting state and the lighting state before adjustment. The adjustment feature data includes at least the target brightness, target color temperature, and brightness correction range and / or color temperature correction range. In this step, it should be noted that the adjustment feature data is used to quantify the "user's manual intervention" into a statistically significant negative feedback signal, where the target brightness and target color temperature are directly used as explicit preference targets; the brightness correction range and color temperature correction range can be determined as follows: ΔL=L target L pre ΔC=C target C pre Where ΔL represents the brightness correction range, and ΔC represents the color temperature correction range; L target L represents the target brightness. pre Indicates the brightness before adjustment; C target Indicates the target color temperature, C pre Indicates the original color temperature before adjustment. The symbol "+" or "+" indicates the color temperature before adjustment. "Used to characterize the adjustment direction (increase / decrease), in engineering implementation, the "direction mark" and "intensity mark" can be written into the adjustment feature data field together so that they can be used as weights or deviations in subsequent conditional statistical aggregation calculations."
[0023] S30. Within a preset time range when the adjustment operation occurs, receive multi-source context data corresponding to the adjustment operation, and encapsulate it into spatiotemporal context snapshot data with the adjustment feature data time-aligned and store it. It's important to note that the core of this step is "synchronously solidifying the context at the time of the adjustment," thereby avoiding mismatches between user behavior and environmental / human information. Upon detecting an adjustment operation, the edge controller can trigger a data freeze mechanism, locking the timestamp within a collection timeframe of, for example, on the order of 50ms, and simultaneously read: action data (instruction source, adjustment method, etc.), millimeter-wave radar status (stationary / micro-motion / movement, breathing rate, distance of presence, etc.), ambient illuminance readings (Lux), and weather cache data (weather code, outdoor temperature, etc.). Then, using the locked timestamp as the alignment reference, encapsulate the "adjustment feature data + context data" into an immutable snapshot record and write it to local storage (e.g., a Flash circular buffer) to continuously retain recent high-value samples under fixed storage resources.
[0024] S40. Perform session-based processing on the snapshot data, merging continuous adjustments within a preset time window into adjustment sessions and selecting the final stable-state snapshot as statistical sample data. In this step, it should be noted that repeated fine-tuning by users within a short period often represents the same intent expression; directly counting each adjustment individually would amplify noise. This step can use a time-sliding window to de-jitter and merge the snapshot sequence: consecutive brightness / color temperature adjustments within the window are grouped into the same "adjustment session," retaining only the final stable-state snapshot at the end of the session as the true intent sample; the number of adjustments within the session can be recorded as a "hesitation degree" feature to characterize the degree of repeated corrections by the user. To improve sample quality, a cleaning strategy can also be introduced: for example, sessions where the light-on duration is less than 10 seconds are marked as accidental touches and removed; when the human body state and operation behavior are inconsistent, the context confidence is marked as low and weighted less in subsequent statistics; when weather data exceeds 1 hour of validity, the macro-environment is marked as missing and excluded from weather-based grouping statistics.
[0025] S50. Perform conditional statistical aggregation on the statistical sample data to obtain statistical indicator data. Generate prompt words based on the statistical indicator data and input edge-side instructions to fine-tune the large language model inference. Output structured user profile data under JSON Schema constraints. In this step, it should be noted that conditional statistical aggregation is used to transform "scattered samples" into "preference patterns that can be used for strategy generation." Statistical samples can be grouped according to weather conditions and time period conditions to calculate the expected brightness preference and / or color temperature preference, for example: E(CCT|Weather=Rain,Time=Evening) E(L|Weather=Clear,Time=Night) Where E(·) represents the expected value; CCT represents the color temperature random variable of the relevant samples; L represents the brightness random variable of the relevant samples; "Weather=Clear" indicates that the weather condition is sunny; "Time=Evening" indicates that the time period is evening; "Time=Night" indicates that the time period is nighttime; the symbol "∣" indicates that statistics are performed under the given weather and time period conditions. The average value of the average correction magnitude vector (ΔL, ΔC) can be calculated to characterize the direction and degree of automatic control deviation. Subsequently, the above statistical indicators are filled into a preset analysis template to generate prompt words, which are then input into instructions deployed on the edge to fine-tune the large language model for inference. To ensure the results can be engineered and implemented, this step uses JSON Schema constraint decoding to force the output of a structured user profile that meets the predefined field set and data type (e.g., "feature tag list + summary summary"), avoiding the problem of free text being difficult to parse. On the model side, fine-tuning of instructions can be accomplished through a hybrid source instruction dataset: one part is synthetic data that has been distilled by a large model and reviewed by experts, and the other part is empirical intent data obtained by obtaining subjective intent labels through client queries and mapping them with objective logs, thereby improving the stability and interpretability of profile labels.
[0026] S60. Generate or update intelligent adjustment strategies based on user profile data to control smart lighting fixtures. In this step, it's important to note that structured user profile data is used to drive executable strategy updates. Feature tags from the profile can be mapped to a strategy library, forming two types of strategies: parameter overriding and / or rule injection. For example, when the profile indicates "high luminous sensitivity," the base brightness coefficient of the automated scene is lowered; when the profile indicates "warm light preference in rainy weather," an IF-THEN rule is generated that "if the weather meets rainy conditions, the color temperature is limited to a preset warm color temperature" and written into the rule engine. In subsequent control cycles, the edge controller outputs control commands based on the updated strategy, automatically adjusting the lighting fixture brightness and / or color temperature. A light environment report can be presented on the client side to display tags and suggestions, thus forming a closed loop of "perception—profile—strategy—control."
[0027] The technical solution implemented in this embodiment can simultaneously solidify high-value samples of "pre-adjustment state - target state - multi-source context" when user manual adjustment occurs. It also suppresses interference from accidental touches, jitter, and context mismatch statistics through conversationalization and cleaning mechanisms, thereby obtaining stable and reliable preference statistics. Furthermore, it utilizes edge-side instructions to fine-tune the large language model and output parsable structured user profiles under JSON Schema constraints. This allows the profile results to directly drive parameter updates and rule injection, continuously generating intelligent adjustment strategies that are individualized and adaptable to changing scenarios. This significantly improves the problems of insufficient intelligence in automatic adjustment and difficulty in adapting to individual user preferences, while reducing reliance on the cloud and protecting privacy.
[0028] In one specific embodiment, S10 includes: S11. Receive adjustment operation events from mobile applications, voice interaction terminals, or physical knobs / buttons. In this step, it should be noted that the edge controller can simultaneously maintain event reception mechanisms for multiple input channels: for mobile applications and voice interaction terminals, control commands can be received and their payloads parsed via network communication interfaces; for physical knobs / buttons, operation triggers can be captured via GPIO interrupts or polling. To ensure that events from different channels are comparable on the same timeline, the controller can assign an event identifier and attach a reception timestamp to each received adjustment operation event; when multiple channels send duplicate commands within the same time period, deduplication and merging can be performed according to preset priorities (e.g., local physical operations take precedence over remote commands), thereby preventing the same intent from being recorded repeatedly.
[0029] S12. The type of the adjustment operation event is identified as a switch operation, brightness adjustment operation, and / or color temperature adjustment operation. In this step, it should be noted that the parsing process is used to uniformly map instructions from different channels and formats into a standardized "operation type + parameter" structure. For a switch operation, it can be identified as an on / off state switching event; for a brightness adjustment operation, the target brightness value or incremental / decrease step information can be parsed; for a color temperature adjustment operation, the target color temperature value or warm / cool direction and step information can be parsed. To improve the consistency of subsequent statistics, this step can normalize parameters with different protocols / dimensions. For example, brightness can be uniformly mapped to a preset quantization level or a 0-100 scale, and color temperature can be uniformly mapped to a per-unit value or a standard scale within the color temperature range supported by the device. When an event contains both brightness and color temperature parameters, it can be marked as a joint adjustment event so that it can be processed as a combined output with the same intent in subsequent processing.
[0030] S13. Upon parsing an adjustment operation event, read the current brightness value and current color temperature value as the pre-adjustment lighting state, and extract the target brightness value and / or target color temperature value from the adjustment operation event as the target lighting state. It should be noted that, to accurately depict the user's "correction" to the current automatic output, the actual output value of the luminaire needs to be read as the pre-adjustment lighting state before the instruction takes effect. Therefore, this step can read the current brightness value from the PWM duty cycle, constant current drive setting, or device control register, and the current color temperature value from the color temperature mixing ratio or color temperature control register before executing the luminaire driver update. The target light state is obtained from the parsed event parameters: if the event provides a target value, the target brightness / target color temperature is directly taken; if the event provides a step increase or decrease, the step is superimposed on the previous light state and the boundary is clipped to make it fall within the brightness and color temperature range allowed by the device; if the event only contains brightness or only contains color temperature, the other unspecified parameter can be used with the corresponding value in the previous light state to form a complete target light state, which facilitates the subsequent unified calculation of the brightness correction range and color temperature correction range and the formation of comparable samples.
[0031] The technical solution implemented in this embodiment enables unified access and standardized parsing of adjustment operations from multiple sources, ensuring that the control intentions expressed by users through mobile devices, voice, or physical operations are consistently encoded. Simultaneously, it locks the pre-adjustment light state and extracts the target light state before the instruction takes effect, ensuring that the difference between "pre-adjustment and target" accurately reflects the user's correction needs for the current automatic output. This avoids incorrect state selection and intent distortion caused by execution delays, gradual driver changes, or repeated instructions from multiple channels, providing accurate and reusable basic data for subsequently generating stable adjustment feature data, constructing spatiotemporal context snapshots, and forming personalized intelligent adjustment strategies.
[0032] In one specific embodiment, S20 includes: S21. Determine the brightness correction range as the difference between the target brightness and the brightness before adjustment, and / or determine the color temperature correction range as the difference between the target color temperature and the color temperature before adjustment. In this step, it should be noted that this step is used to convert a user's single adjustment from an "instruction / target value" into a "measurable correction amount," so that subsequent statistical modeling can simultaneously characterize the preference target and the magnitude of the deviation. The brightness correction range and color temperature correction range are determined by the "difference between the target value and the value before adjustment" as defined above. To improve comparability between different devices and different units of measurement, brightness can be uniformly mapped to a proportional scale (e.g., 0–100) or discrete levels, and color temperature can be uniformly mapped to a standard scale within the device's supported range. When the target value exceeds the device's allowable range, the target value can be clipped before determining the correction range to avoid outliers causing distortion of the correction range.
[0033] S22. Write the signs of the brightness correction magnitude and / or color temperature correction magnitude into the adjustment feature data as adjustment direction markers, and write their absolute values into the adjustment feature data as correction intensity markers. In this step, it should be noted that the adjustment direction marker is used to express the correction direction; for example, a positive brightness correction magnitude indicates that the user wants brighter light, and a negative magnitude indicates that the user wants darker light. The positive and negative values of the color temperature correction magnitude respectively indicate a correction towards a preset cooler or warmer direction (the positive and negative directions can be uniformly defined by the system). The correction intensity marker is used to measure the user's dissatisfaction with the current automatic output; the larger the absolute value, the more significant the deviation and the stronger the correction requirement. To facilitate subsequent aggregation statistics and model inference, this step writes the target brightness, target color temperature, direction marker, and intensity marker into the structured adjustment feature data fields, and can normalize the intensity marker for integration with other statistical indicators.
[0034] S23. In subsequent conditional statistical aggregation, the correction intensity marker is used as the negative feedback intensity in the statistics to characterize the degree of deviation between the automatic control output and the user's expectations. In this step, it should be noted that the correction intensity marker enables the system to transform "user manual fine-tuning" into a calculable feedback signal for the automatic strategy. When performing grouped statistics based on conditions such as weather, time of day, ambient light, or human condition, the average correction intensity, quantiles, or weighted mean can be calculated based on the correction intensity marker to quantify the degree of automatic control deviation under specific conditions. Furthermore, the correction intensity can be used as a weight to weight the preference estimate, making strongly corrected samples contribute more to strategy correction, thereby improving the efficiency and stability of strategy adaptation. For joint adjustment scenarios, a joint intensity feature of brightness and color temperature can also be formed to characterize the user's emphasis on these two parameters.
[0035] The technical solution implemented in this embodiment can quantify user adjustment behavior into negative feedback features with direction and intensity, enabling the system not only to know the target value adjusted by the user, but also to measure the magnitude and direction of its deviation from the current automatic output. Introducing the correction intensity into the subsequent conditional statistical aggregation for statistical or weighted calculation can reduce the misjudgment of preferences caused by relying solely on the final set value, improve the accuracy of identifying the user's true preferences in different scenarios, and provide a calculable basis for the continuous adaptive update of the intelligent adjustment strategy, thereby improving the problem that automatic adjustment is not intelligent enough and is difficult to keep up with individual preferences in the long term.
[0036] In one specific embodiment, S30 further includes: S31. Upon receiving an adjustment operation, perform data freezing to lock the timestamp and complete the synchronous reading of multi-source data within a preset acquisition time limit. It should be noted that this step is used to solidify the "moment of user adjustment" as a unified reference point, avoiding mismatches caused by inconsistent sampling times between different sensors and external data sources. The edge controller can immediately enter a frozen state upon receiving the adjustment operation, record and lock the timestamp t0, and start a short acquisition window to synchronously retrieve the current values from each data source. This acquisition window can be set to millisecond level, for example, completing the reading and encapsulation of key data within 50ms, thereby ensuring that the context of human body status, illumination, and weather is as close as possible to the adjustment operation. During the freezing process, read-write mutual exclusion or double buffering mechanisms can be set to avoid cross-contamination of snapshot content caused by new adjustment writes during sampling. When multiple consecutive adjustments occur within the acquisition window, the corresponding timestamp can be locked for each adjustment separately, or they can be merged into the same session for processing in subsequent steps.
[0037] S32. Synchronously read motion data, millimeter-wave radar status data, weather data cache values, and ambient illuminance readings within the preset time range corresponding to the locked timestamp. In this step, it should be noted that motion data describes "how the user adjusts," which may include the adjustment source (mobile device / voice / physical operation), adjustment method (absolute setting / step increment / decrement), and target parameters; millimeter-wave radar status data describes "whether a person is present and in what state," and can read features such as stationary / micro-motion / movement judgment, breathing frequency, and distance; ambient illuminance readings describe "whether the scene is bright," and can be provided by a photosensitive sensor with illuminance values (Lux); weather data cache values describe the "macro-environment," and may include weather codes, outdoor temperature, etc., preferably read from local cache to reduce network latency, and include the cache generation time for subsequent validity assessment. To improve synchronization, this step can use parallel acquisition or time-division acquisition but complete within the same acquisition window, and attach a sampling time t to each type of data. i When |t i When t0 exceeds the threshold, this type of data can be marked as low confidence or missing to reduce its interference with subsequent statistical grouping.
[0038] S33. Align and encapsulate the motion data, millimeter-wave radar status data, weather data cache values, and ambient illuminance readings with regulation feature data according to timestamps to form snapshot records, thereby creating spatiotemporal context snapshot data. In this step, it should be noted that the goal of alignment and encapsulation is to create a unified record that is "immutable, traceable, and usable for subsequent statistics." Specifically, the snapshot record can be organized into a set of fields: timestamp field (e.g., t0), regulation feature fields (target brightness, target color temperature, correction magnitude, direction / intensity markers, etc.), human status field, illuminance field, weather field, and optional confidence / missing marker field. Alignment can employ a strategy of "using t0 as the primary timestamp and taking the most recently sampled value within the acquisition window," or "average / median within the window" to suppress transient noise. After the snapshot record is generated, it is written to local storage to form spatiotemporal context snapshot data. Preferably, sequential writing is performed using a Flash circular buffer, and verification information (such as CRC) is added during writing to ensure record availability in the event of power failure or abnormal conditions.
[0039] The technical solution implemented in this embodiment can synchronously collect and align multi-source context data based on a locked timestamp when user adjustments occur, and associate adjustment intentions with environmental information such as human body status, illumination, and weather as the same snapshot record, thereby reducing context mismatch caused by asynchronous sensor sampling and network weather latency; at the same time, the timeliness and traceability of samples are improved through the acquisition window, confidence / missing markers, and snapshot immutable encapsulation mechanism, providing high-quality input for subsequent conversational processing and conditional statistical aggregation, thereby improving the adaptability of the generated user profile and intelligent adjustment strategy to scene changes and individual differences.
[0040] In one specific embodiment, S30 further includes: S34. Write the snapshot records to the local Flash circular buffer. It's important to note that this step is used for long-term, low-cost storage of high-value samples at the edge, avoiding reliance on continuous network connectivity or cloud storage. The circular buffer can consist of a contiguous address space in the Flash memory, with snapshot records appended sequentially. Each record can contain a header and a body. The header includes at least the record length, version number, timestamp, and verification information (e.g., CRC), while the body is a set of snapshot fields. To reduce Flash write overhead, sequential writing can be performed in "page / sector" units, with the next sector erased only after it's full. Write and read pointers can be maintained to indicate the next write position and the current earliest valid record position. To handle power outages or abnormal resets, pointer metadata can be updated after writing is complete, or a dual-backup pointer area and a monotonically increasing sequence number can be used to improve recovery reliability.
[0041] S35. When the circular buffer is full, the earliest written snapshot record is overwritten in chronological order to maintain the recent sample set for subsequent session processing and statistical aggregation under fixed storage resources. In this step, it's important to note that the overwrite strategy prioritizes retaining the "recent behavior distribution" under limited storage capacity, ensuring that subsequent profile and strategy updates are more closely aligned with recent user habit changes. Specifically, overwriting can be triggered when the write pointer is about to catch up with the read pointer: first, the read pointer is moved forward to the next record boundary, invalidating the earliest record, and then new records are written, achieving first-in-first-out (FIFO) updates. To avoid parsing errors caused by crossing record boundaries, the length of each record can be explicitly stored in the record header, and boundary checks can be performed before overwriting; when a record verification failure is detected, corrupted records can be skipped, and the search for the next valid record continues. To balance "recentness" and "sample representativeness," retention strategies can also be set, such as setting a minimum number of records to retain for samples that appear very rarely but have strong correction intensity, or generating a statistical summary from the snapshots before overwriting to reduce the risk of critical information being quickly overwritten.
[0042] The technical solution implemented in this embodiment can achieve continuous and low-cost storage of spatiotemporal context snapshots using a local Flash circular buffer, accumulating recent user adjustments and environmental samples without increasing cloud dependence; by using write pointers / read pointers and time-order overwrite mechanisms, the timeliness and continuity of the sample set are maintained under fixed storage resources, and the reliability of records is improved with verification and anomaly recovery strategies, thereby providing stable data input for subsequent session processing and conditional statistical aggregation, and thus improving the update speed and adaptation effect of user profiles and intelligent adjustment strategies.
[0043] In one specific embodiment, the multi-source context data includes at least human state data, ambient illumination data, weather data, and / or time-series data, wherein: Human body status data is acquired by millimeter-wave radar and includes at least the determination of stillness / micro-motion / movement, respiratory rate, and / or distance of presence.
[0044] Ambient illuminance data is acquired by a photosensitive sensor and includes at least the illuminance value Lux.
[0045] Weather data must include at least weather codes and / or outdoor temperatures to enable conditional statistical aggregation to form groups based on weather conditions and / or time-of-day conditions.
[0046] It should be noted that the purpose of setting up multi-source context data is to provide distinguishable conditional variables for "the same regulatory behavior may reflect different preferences in different contexts," so that subsequent statistical aggregation can form stable patterns at a finer-grained scene slice. Multi-source context data can be organized at the edge with a unified data structure, such as writing it into snapshot records together with regulatory feature data in the form of "context vectors / context fields," and associating it with a lock timestamp, thereby ensuring that the context and regulatory intent are aligned in time.
[0047] Human body state data is used to reflect the user's presence and activity status, thereby distinguishing different lighting needs such as "reading / resting / walking". Millimeter-wave radar can output state judgments such as stationary / micro-movement / movement, and can further provide continuous features such as breathing frequency and presence distance; among them, breathing frequency can be used as an auxiliary criterion for resting state, and presence distance can be used to distinguish between close-range activity and long-range presence. To ensure availability, the radar output can be de-glitched and smoothed with short windows, and each snapshot record is accompanied by a radar validity mark to identify "unmanned / low-confidence" samples and perform downweighting during subsequent cleaning or statistical grouping.
[0048] Ambient illuminance data is used to characterize the baseline of the indoor lighting environment, avoiding the misjudgment of "adjustments caused by changes in natural light" as long-term preferences. The photosensor can directly output illuminance values (Lux) and can perform correction or normalization based on the illuminance according to the luminaire's installation location. For example, illuminance can be mapped to several interval labels (low / medium / high) to form statistically significant grouping keys when combined with time of day, weather, and other conditions. Simultaneously, sampling time and sampling stability can be recorded to avoid illuminance misreading caused by sensor response lag when luminaires change.
[0049] Weather data is used to describe the impact of the macro-environment on lighting psychology and demand. Structured fields such as weather codes and outdoor temperatures are preferred, and data can be read from local cache to reduce network latency. Each weather data entry is accompanied by its cache generation time to determine data expiration and mark missing data if necessary. Time-series data is used to characterize intraday rhythms and differences in daily routines, and can include date, day of the week, time period labels (e.g., morning / daytime / evening / nighttime), or timestamp-derived features. By standardizing weather and time-series data into conditional fields, subsequent conditional statistical aggregation can group statistical samples based on "weather conditions and / or time period conditions" to obtain the expected brightness / color temperature preferences and correction biases under different scenarios, thereby guiding the strategy to adaptively adjust in different situations.
[0050] The technical solution implemented in this embodiment can simultaneously solidify key contexts such as human body state, ambient light, weather, and time sequence when user adjustment behavior occurs, so that the adjustment needs of the same user in different situations can be effectively distinguished and used for conditional grouping statistics; thereby reducing misadjustment caused by relying solely on a single environmental quantity or general rules, improving the scene resolution and stability of preference recognition, and supporting the generation of intelligent adjustment strategies that are more tailored to individuals and adapt to changes in weather and time of day, thus improving the problem that automatic adjustment is not intelligent enough and is difficult to adapt to the actual user situation.
[0051] In one specific embodiment, S40 includes: S41. Construct a conditioning sequence consisting of multiple snapshot records in chronological order. In this step, it's important to note that this step organizes the discretely written snapshot records into an analyzable time-series data structure. Specifically, the snapshot records can be sorted according to their timestamp fields to form a sequence arranged in ascending order of time. When records with the same timestamp or abnormal timestamp intervals appear, stable sorting and anomaly removal can be performed based on record number, writing order, or verification validity. To facilitate subsequent session segmentation, index fields such as "Operation Type," "Target Parameter," and "Correction Strength" can be added to each record in the sequence, thereby supporting rapid scanning and segmentation based on changes in time and intent.
[0052] S42. Merge multiple snapshot records corresponding to continuous adjustment operations within a window into a single adjustment session based on a time-sliding window. It's important to note that the core of this step is to treat continuous fine-tuning by the user within a short period as a single expression of intent, avoiding the amplification of noise by splitting a single adjustment intent into multiple samples. The session window length can be set (e.g., on the order of several seconds to tens of seconds, specifically configurable according to product interaction habits). The sliding scan starts from the beginning of the sequence: when the time interval between two adjacent snapshot records is less than the window threshold, and the operation objects are consistent (e.g., both are brightness / color temperature adjustments for the same light fixture), they are determined to belong to the same adjustment session; when the interval exceeds the threshold or a significant intent switch occurs (e.g., switching from brightness adjustment to turning off the light, or quickly switching from warm light to cool light and maintaining it), the current session ends and the next session begins. To reduce the risk of erroneous merging, the rate of change of the correction intensity or the convergence trend of the target parameter can be further considered to determine whether they are still within the same session.
[0053] S43. For each adjustment session, select the final stable state snapshot as the intent truth sample and write it into the statistical sample data. In this step, it should be noted that the "final stable state" represents the user's final expectation for this adjustment, avoiding interference from transitional states caused by repeated adjustments in the middle. The stable state can be determined by at least one rule: for example, selecting the last snapshot record at the end of the session; or when the target brightness / target color temperature change of several consecutive snapshot records is less than a preset threshold and the duration exceeds the stability determination time, selecting the last record that meets the stability condition as the stable state. The selected stable state snapshot is written into the statistical sample data as the "intent truth sample," and the start time, end time, and session length of the session can be retained simultaneously for subsequent weight adjustment or confidence evaluation of different sessions during conditional statistical aggregation.
[0054] S44. Record the number of adjustments within the adjustment session and write it into the statistical sample data as a hesitation feature to characterize the user's iterative correction behavior. In this step, it should be noted that the number of adjustments reflects the user's uncertainty about the automatic output or sensitivity to the target parameter in that context: the more adjustments within the same session, the more sensitive the user is to the current output deviation or the greater the gap between the system's initial output and the user's expectations. The number of snapshots within the session, the number of effective adjustments (excluding invalid operations that repeatedly set the same value), or the adjustment frequency per unit time can be used as a measure of hesitation, and this hesitation feature should be written into the statistical sample data along with the steady-state samples. In subsequent conditional statistical aggregation, hesitation can be used to deweight or stratify the samples to reduce the disturbance of "iterative operations" on long-term preference estimation.
[0055] The technical solution implemented in this embodiment can construct adjustment sequences by sorting them by time and merge sessions based on a time sliding window, thus merging short-term continuous fine-tuning of users into a single intent expression, thereby suppressing statistical noise caused by adjustment jitter and repetitive operations; furthermore, it uses the final stable state snapshot as the intent truth sample, making the accumulated statistical samples more representative of the user's true expectations, and combines hesitation characteristics to characterize repeated correction behavior, providing a more stable and interpretable input for subsequent conditional statistical aggregation and user profile reasoning, thereby improving the adaptability of the intelligent adjustment strategy to individual user preferences and scene changes.
[0056] In one specific embodiment, S40 further includes at least one data cleaning step: S45. Accidental Touch Removal: When the duration of the light-on session in a regulation session is less than a threshold, the corresponding regulation session is marked as an accidental touch and removed from the statistical sample data. It should be noted that this step is used to filter short-term operations that do not represent genuine preferences, preventing accidental touches or tentative light-on attempts from interfering with preference statistics. The duration of the light-on session can be derived from the start and end times of the regulation session and changes in the on / off state: for example, calculating the duration from the first time the light is turned on within the session to the time the light is turned off or the session ends. When this duration is less than a preset threshold (e.g., on the order of 10 seconds, which can be configured according to product interaction habits), it is usually difficult to form a stable lighting demand, so the session is marked as an accidental touch and directly removed from the statistical sample data. To avoid mistakenly deleting genuine needs, auxiliary conditions can be added before removal, such as whether there is a significant correction intensity within the session or whether there are human presence characteristics. Sessions that meet the auxiliary conditions can be de-weighted instead of removed.
[0057] S46. Consistency Verification and Weight Reduction: When human body state data is inconsistent with the adjustment operation type, the corresponding sample is marked as having low contextual confidence and its weight is reduced in the conditional statistical aggregation in S50. It should be noted that this step is used to reduce the impact of "contextual and intent mismatch" samples on the statistical results. Inconsistency can include at least: human body state data showing no one or inactive status at a distance, but with frequent fine adjustments to brightness / color temperature; or human body state showing obvious activity, but the adjustment operation presents extreme settings that do not match the activity (e.g., continuously dimming to the lowest level and repeatedly correcting during strong activity). In implementation, consistency judgment rules can be constructed: for example, based on static / micro-motion / movement judgment, the existence of distance thresholds, and a joint judgment of adjustment intensity / frequency; when inconsistency is judged, it is not necessary to directly remove the sample, but rather to write a "low contextual confidence" mark on the sample and assign it a smaller weight in subsequent statistical aggregation to achieve robust statistics that "retain but have a weak impact". The weights can be set according to preset levels. For example, the weight of normal samples is 1, and the weight of low confidence samples is in the range of 0.2 to 0.5, thereby suppressing the pull of abnormal samples on the preference expectation and bias vector.
[0058] S47. Environment Alignment: When weather data expires, a macro-environment missing marker is added to the corresponding sample, preventing it from participating in weather-condition-based grouping statistics or handling it according to the missing data handling strategy within that group. It's important to note that this step is to avoid erroneous grouping caused by "expired macro-environment". Weather data typically comes from cache or intermittent updates, and its generation time may differ from the adjustment time. Therefore, an update timestamp can be attached to each weather data entry, and an expiration threshold can be set (e.g., on the order of one hour, configurable according to update frequency). When the difference between the adjustment time and the weather update timestamp exceeds the expiration threshold, the weather data is considered expired, and a "macro-environment missing" marker is added to the corresponding sample. Subsequent grouping statistics based on weather conditions can be handled in two ways: first, samples with missing markers are directly excluded from the weather group, participating only in statistics unrelated to weather conditions; second, they are grouped into the "weather unknown / missing" group to avoid confusion with the actual weather group, thus maintaining the interpretability and stability of the statistical indicators.
[0059] The technical solution implemented in this embodiment can significantly reduce the contamination of statistical samples by short-term erroneous operations, context mismatches, and outdated environmental information through cleaning mechanisms such as accidental touch removal, consistency verification and weight reduction, and macro-environment validity judgment, thereby improving the authenticity and confidence of statistical sample data. In subsequent conditional statistical aggregation, the cleaned samples can more stably reflect the user's true adjustment intentions and preferences in different situations, thereby improving the accuracy of user profile inference, enhancing the reliability and convergence stability of intelligent adjustment strategy updates, and ultimately improving the problems of insufficient intelligence in automatic adjustment and easy misadjustment or unstable adaptation.
[0060] In one specific embodiment, S50 includes: S51. Group the statistical sample data according to weather conditions and / or time period conditions. In this step, it should be noted that this step refines user preferences from "overall average" to "context-related," enabling the same user's light usage needs to be learned separately under different weather conditions and at different time periods. The grouping key can include at least one of the following: weather conditions can be determined by fields such as weather codes and outdoor temperature ranges; time period conditions can be derived from timestamps, for example, divided by hours or mapped to discrete time period labels such as morning / daytime / evening / nighttime. To ensure grouping stability, weather and time periods can be discretized, for example, by binning temperatures into several intervals, mapping weather codes to categories such as sunny / cloudy / rainy / snowy, and setting "unknown / missing" groups or excluding samples with missing macro-environment data from weather groups, thereby avoiding grouping contamination caused by expired or missing data.
[0061] S52. Calculate the expected brightness and / or expected color temperature within each group. In this step, it should be noted that the output is a "preference target" that can be directly used for strategy generation. The calculation objects are the target brightness and target color temperature fields from the statistical sample data within each group. The expected preference can be obtained using an arithmetic mean, weighted average, or robust statistics (such as the median or truncated mean). When there are differences in confidence levels within the samples, confidence weights can be used to make the low-confidence samples contribute less to the expected value. For example, for brightness, the target brightness of each sample within a group can be denoted as a random variable L, and its expected preference can be expressed as E(L|condition); for color temperature, the target color temperature of each sample within a group can be denoted as a random variable CCT, and its expected preference can be expressed as E(CCT|condition). Here, E(·) represents the mathematical expectation, "|" indicates statistics under the given group conditions; L represents the random variable of target brightness, and CCT represents the random variable of target color temperature. To avoid small sample fluctuations, a minimum sample size threshold can be set. When the number of samples in a group is insufficient, the samples can be merged into adjacent time periods / similar weather groups or exponential moving averages can be used to fuse with historical statistics.
[0062] S53. Calculate the average brightness correction magnitude and / or average color temperature correction magnitude within each group to obtain a negative feedback deviation vector characterizing the direction and degree of automatic control deviation. Write the preference expectation and negative feedback deviation vector into the statistical index data. In this step, it should be noted that this step transforms the "user's correction of the automatic output" into a deviation quantity that can be used for policy correction. The average brightness correction magnitude can be obtained by averaging the brightness correction magnitudes of each sample within the group, and the average color temperature correction magnitude can be obtained by averaging the color temperature correction magnitudes of each sample within the group. Both can jointly constitute the negative feedback deviation vector. To enhance robustness, the correction magnitudes can be weighted using correction strength weights or confidence weights, so that strong and high-confidence corrections contribute more to the deviation vector. Finally, write the preference expectation and negative feedback deviation vector obtained from each group into the storage structure as statistical index data, serving as input features for subsequent prompt word generation and model inference.
[0063] The technical solution implemented in this embodiment can group samples by weather and time period and calculate brightness / color temperature preference expectations separately, enabling the system to obtain individualized preference targets for different scenarios and avoid misadjustment caused by general thresholds or global averages. At the same time, by using negative feedback deviation vector quantization to automatically control the direction and degree of deviation between the output and user expectations, it provides a calculable basis for strategy parameter correction and rule generation, thereby improving the intelligent adjustment's adaptability to scene changes and its stable fit to individual user preferences.
[0064] In one specific embodiment, S50 includes: S54. Populate the statistical indicator data into the preset analysis template to generate prompt words. In this step, it's important to note that this step transforms the "calculable statistical results" into a structured input suitable for model understanding, thereby improving inference stability and interpretability. The preset analysis template can adopt a hybrid form of fixed fields and natural language descriptions, including at least: grouping conditions (such as weather categories, time period labels), expected brightness / color temperature preferences within the group, negative feedback bias vector (or its components), sample size, confidence level, or missing data markers. When populating, numerical fields can be expressed with uniform units and precision (e.g., brightness in 0-100 scale, color temperature in K values or standard scales), and the semantics of each field should be clearly defined in the template. This ensures that the prompt words generated by the same template for different users and time periods have a consistent structure, facilitating the model's learning of the mapping relationship between "statistical indicators → profile labels." To reduce the length of prompt words and edge inference overhead, an upper limit can be set on the number of groups, prioritizing groups with sufficient sample size or significant negative feedback strength when writing them into the template.
[0065] S55. Fine-tune the large language model by inputting prompt words into the edge-side command to obtain the inference result. In this step, it's important to note that performing inference at the edge reduces reliance on the cloud and mitigates privacy risks. Edge-side command fine-tuning of the large language model can be deployed on devices such as home gateways, lighting controllers, or edge computing boxes, receiving prompt words and outputting inference results via local API calls. To adapt to edge computing power, lightweight models, quantized models, or low-rank adaptations can be used to reduce computation and memory usage. Inference timeout and degradation strategies can also be set: when edge inference resources are insufficient, only key tags or only strategy suggestion fields can be output to ensure the availability of the control loop.
[0066] S56. Perform JSON Schema constraint decoding on the inference results to limit the output field set and data type, ensuring the output is user profile data with a predefined JSON structure, including at least a feature tag list and a summary summary. It's important to note that this step transforms the model output from unstable free text constraints into a directly parsable, engineered result. JSON Schema allows predefined field sets, field types, and value ranges; for example, defining the "feature tag list" as a string array, the "summary summary" as a string, and defining an enumeration set or confidence field for each tag. Constraint decoding can employ syntax constraint generation or post-generation validation to ensure the output strictly conforms to the schema; otherwise, retries, rollback to the default profile, or outputting only historical profiles are triggered. Through this constraint, the control policy module can unambiguously read tags and perform rule matching, avoiding erroneous policy updates due to natural language ambiguity.
[0067] S57. The edge - side instruction - fine - tuned large - language model is obtained by fine - tuning with a mixed - source instruction dataset. The mixed - source instruction dataset at least includes synthetic instruction data distilled by a super - large model and reviewed by experts, and empirical intention data obtained by initiating intention queries from clients to obtain subjective intention tags and mapping them with objective adjustment operation logs. In this step, it should be noted that the purpose of using the mixed - source dataset is to balance coverage and authenticity simultaneously: synthetic instruction data is used to cover various combinations of weather / time period / illuminance / human body state and diverse preference expressions, and the label consistency is improved through expert review; empirical intention data is used to establish a correspondence between users' subjective descriptions and objective adjustment behaviors, thereby reducing semantic biases caused by relying solely on logs for inference. When constructing the mapping, the intention tags obtained from client queries can be associated with the stable - state samples of the adjustment session within the same time window to form supervised samples of "statistical metrics → target tags"; and sampling can be balanced according to users and scenarios to avoid data bias. Through the above - mentioned fine - tuning, the model is better at outputting stable, interpretable, and implementable portrait tags based on statistical metrics.
[0068] Correspondingly, S60 includes: S61. Extract feature tags from the user portrait data and match them with a preset policy library to generate or update intelligent adjustment policies. In this step, it should be noted that the policy library can be composed of a mapping table of "tag - policy item", and the policy items can include parameter overwriting, rule trigger conditions, and execution actions, etc. The controller reads the feature - tag list after parsing the JSON structure, retrieves the corresponding policy items for each tag, and merges them according to preset priorities or conflict - resolution rules, such as "safety / comfort takes precedence over energy conservation" and "explicit user adjustment takes precedence over automatic policies". The generated or updated intelligent adjustment policies can be written into the local rule engine or control parameter table, and the effective time and version number are recorded to support rollback and progressive updates.
[0069] S62. When a high - sensitivity tag is matched, the basic brightness coefficient of the automated scene is lowered. In this step, it should be noted that the basic brightness coefficient is used to scale or offset - correct the target brightness of the automatic scene. For example, when the automatic scene gives a reference brightness L auto the actual execution brightness can be set to L exec =k·L auto , where k is the basic brightness coefficient and 0 < k < 1 indicates a decrease; the coefficient can be set to multiple levels according to the tag level or adaptively updated according to the negative - feedback strength. Through coefficient - based processing, policy updates can achieve individualized dimming without rewriting the entire set of scene rules, and it is convenient to continue fine - tuning and convergence in subsequent feedback.
[0070] S63. When a rainy day warm light preference tag is matched, a color temperature constraint rule based on weather conditions is generated and injected into the rule engine. In this step, it should be noted that the color temperature constraint rule can be expressed in IF-THEN form: when the weather condition meets "rainy day" and is in automatic adjustment mode, the color temperature is restricted to a preset warm color temperature range or set to the target warm color temperature. The rule engine can maintain the rule triggering conditions, execution actions, and priorities, ensuring that when multiple rules are met simultaneously, they are executed according to priority, and avoiding conflicts with real-time manual adjustments by the user. When the user manually adjusts the color temperature again, the rule can be temporarily suspended and resumed in the next control cycle, achieving a balance between automatic strategy and manual control.
[0071] S64. In subsequent control cycles, control commands are output based on the intelligent adjustment strategy to control the brightness and / or color temperature of the intelligent lighting fixtures. In this step, it should be noted that the control cycle can be time-triggered or event-triggered: time-triggered cycles are used for periodic evaluation of the environment and strategy, while event-triggered cycles are used for immediate adjustments when there are significant changes in weather / illuminance / human condition or when a user enters / leaves. In each control cycle, the controller reads the current environment and strategy, calculates the target brightness and target color temperature, and issues control commands through the lighting fixture communication protocol (such as BLE, Zigbee, Wi-Fi, or wired bus). Gradual transitions and limiting protection can be added during execution to avoid sudden changes causing discomfort or exceeding the device's capabilities. To ensure closed-loop stability, the execution results and subsequent user adjustments can be used to form a sample again, continuously iterating the profile and strategy.
[0072] The technical solution implemented in this embodiment can fine-tune the large language model by inputting the indicators obtained from conditional statistical aggregation into edge-side instructions using templated prompt words. Under the constraints of JSON Schema, it outputs parsable and stable structured user profile data, avoiding the difficulties in policy parsing caused by the uncontrollability of free text. At the same time, through instruction fine-tuning of the mixed source instruction dataset, the profile tags have better coverage and consistency in multiple scenarios. Furthermore, based on the profile tag matching strategy library and by generating or updating intelligent adjustment strategies through parameter coefficient correction and rule injection, intelligent adjustment strategies can be generated or updated. In subsequent control cycles, these strategies can directly drive the brightness / color temperature output of lamps, achieving adaptive adjustment for different users, different weather conditions, and different time periods. This significantly improves the intelligence and individualization of automatic adjustment and reduces the dependence on cloud inference.
[0073] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
Claims
1. A smart lighting control method based on a large model fine-tuning using multi-dimensional spatiotemporal context snapshots and edge-side command adjustments, characterized in that, include: S10. Receive user adjustment operation and obtain the light status before adjustment and the corresponding target light status; S20. Generate adjustment feature data based on the difference between the target light state and the light state before adjustment. The adjustment feature data includes at least the target brightness, the target color temperature, and the brightness correction range and / or the color temperature correction range. S30. Within a preset time range in which the adjustment operation occurs, receive multi-source context data corresponding to the adjustment operation, and encapsulate it into spatiotemporal context snapshot data with the adjustment feature data in time alignment and store it. S40. Perform session processing on the snapshot data, merge the continuous adjustments within the preset time window into an adjustment session, and select the final stable state snapshot as statistical sample data. S50. Perform conditional statistical aggregation on the statistical sample data to obtain statistical indicator data, generate prompt words based on the statistical indicator data, input edge-side instructions to fine-tune the large language model inference, and output structured user profile data under JSON Schema constraints. S60. Generate or update intelligent adjustment strategies based on the user profile data to control the intelligent lighting fixtures.
2. The intelligent lighting control method based on multi-dimensional spatiotemporal context snapshots and edge-side command fine-tuning of a large model according to claim 1, characterized in that, S10 includes: S11. Receive adjustment operation events from mobile applications, voice interaction terminals, or physical knobs / buttons; S12. The type of the adjustment operation event is determined to be a switch operation, brightness adjustment operation, and / or color temperature adjustment operation; S13. When the adjustment operation event is parsed, the current brightness value and the current color temperature value are read as the lighting state before adjustment, and the target brightness value and / or target color temperature value are extracted from the adjustment operation event as the target lighting state.
3. The intelligent lighting control method based on multi-dimensional spatiotemporal context snapshots and edge-side command fine-tuning of a large model according to claim 1, characterized in that, S20 includes: S21. Determine the brightness correction range as the difference between the target brightness and the brightness before adjustment, and / or, determine the color temperature correction range as the difference between the target color temperature and the color temperature before adjustment. S22. Write the sign of the brightness correction amplitude and / or color temperature correction amplitude into the adjustment feature data as an adjustment direction marker, and write its absolute value into the adjustment feature data as a correction intensity marker; S23. In subsequent conditional statistical aggregation, the modified intensity marker is used as the negative feedback intensity to participate in the statistics, so as to characterize the degree of deviation between the automatic control output and the user's expectations.
4. The intelligent lighting control method based on multi-dimensional spatiotemporal context snapshots and edge-side command fine-tuning of a large model according to claim 1, characterized in that, The S30 further includes: S31. After receiving the adjustment operation, perform data freeze to lock the timestamp, and complete the synchronous reading of multi-source data within the preset collection time limit; S32. Synchronously read motion data, millimeter-wave radar status data, weather data cache value and ambient illuminance reading within the preset time range corresponding to the locked timestamp; S33. Align the action data, millimeter-wave radar status data, weather data cache value, and ambient illuminance reading with the adjustment feature data according to the timestamp and encapsulate them into a snapshot record to form the spatiotemporal context snapshot data.
5. The intelligent lighting control method based on multi-dimensional spatiotemporal context snapshots and edge-side command fine-tuning of a large model according to claim 4, characterized in that, The S30 further includes: S34. Write the snapshot record into the circular buffer of the local Flash; S35. When the circular buffer is full, the earliest written snapshot record is overwritten in chronological order to maintain the recent sample set for subsequent session processing and statistical aggregation under fixed storage resources.
6. The intelligent lighting control method based on multi-dimensional spatiotemporal context snapshots and edge-side command fine-tuning of a large model according to claim 4, characterized in that, The multi-source context data includes at least human state data, ambient illumination data, weather data, and / or time-series data, wherein: Human body status data is acquired by millimeter-wave radar and includes at least the determination of stillness / micro-motion / movement, respiratory rate, and / or distance of presence; Ambient illuminance data is acquired by a photosensitive sensor and includes at least the illuminance value Lux; The weather data includes at least weather codes and / or outdoor temperatures to enable the conditional statistical aggregation to form groups based on weather conditions and / or time-of-day conditions.
7. The intelligent lighting control method based on multi-dimensional spatiotemporal context snapshots and edge-side command fine-tuning of a large model according to claim 1, characterized in that, S40 includes: S41. Construct an adjustment sequence consisting of multiple snapshot records in chronological order; S42. Based on the time sliding window, merge multiple snapshot records corresponding to continuous adjustment operations within the window into the same adjustment session; S43. Select the final steady-state snapshot as the intention truth sample for each adjustment session and write it into the statistical sample data; S44. Record the number of adjustments within the adjustment session and write it into the statistical sample data as a hesitation feature to characterize the user's repeated correction behavior.
8. The intelligent lighting control method based on multi-dimensional spatiotemporal context snapshots and edge-side command fine-tuning of a large model according to claim 7, characterized in that, S40 further includes at least one data cleaning step: S45. Accidental touch removal: When the duration of the light-on session in the adjustment session is less than the threshold, the corresponding adjustment session is marked as an accidental touch and removed from the statistical sample data; S46. Consistency check and weight reduction: When the human body state data is inconsistent with the adjustment operation type, the corresponding sample is marked as having low context confidence and its weight is reduced in the conditional statistical aggregation of S50. S47. Environment Alignment: When weather data expires, write a macro-environment missing marker for the corresponding sample and exclude it from weather-based group statistics or process it according to the missing data handling strategy in that group.
9. The intelligent lighting control method based on multi-dimensional spatiotemporal context snapshots and edge-side command fine-tuning of a large model according to claim 1, characterized in that, The S50 includes: S51. Group the statistical sample data according to weather conditions and / or time period conditions; S52. Calculate the brightness preference expectation and / or color temperature preference expectation within each group; S53. Calculate the average brightness correction magnitude and / or average color temperature correction magnitude within each group to obtain a negative feedback deviation vector used to characterize the direction and degree of automatic control deviation, and write the preference expectation and negative feedback deviation vector into the statistical index data.
10. The intelligent lighting control method based on multi-dimensional spatiotemporal context snapshots and edge-side command fine-tuning of a large model according to claim 1, characterized in that, The S50 includes: S54. Fill the statistical indicator data into the preset analysis template to generate prompt words; S55. Input the prompt word into the edge-side instruction to fine-tune the large language model to obtain the inference result; S56. Perform JSON Schema constraint decoding on the inference result to limit the set of output fields and data types, so that the output is user profile data with a predefined JSON structure, and includes at least a list of feature tags and a summary summary; S57. The edge-side instruction fine-tuning large language model is obtained by instruction fine-tuning through a hybrid source instruction dataset. The hybrid source instruction dataset includes at least synthetic instruction data that has been distilled by the ultra-large model and reviewed by experts, as well as empirical intent data obtained by obtaining subjective intent labels through intent inquiry initiated by the client and mapping them with objective adjustment operation logs. Accordingly, S60 includes: S61. Extract feature tags from the user profile data and match them with a preset strategy library to generate or update the intelligent adjustment strategy; S62. When a high photosensitive tag is matched, reduce the base brightness coefficient of the automated scene. S63. When a rainy day warm light preference tag is matched, generate a color temperature limit rule based on weather conditions and inject it into the rule engine; S64. In subsequent control cycles, output control commands according to the intelligent adjustment strategy to control the brightness and / or color temperature of the intelligent lamp.