A lighting data processing method and system based on environmental perception

By segmenting and identifying brightness change paths in the environmental perception lighting data processing method, the problem of fragmented lighting changes in traditional methods is solved, and stable response and improved reliability under lighting conditions are achieved.

CN122373213APending Publication Date: 2026-07-10NINGBO YIJIANLIAN INTELLIGENT LIGHTING TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NINGBO YIJIANLIAN INTELLIGENT LIGHTING TECH CO LTD
Filing Date
2026-06-03
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Traditional lighting data processing methods based on environmental perception lack a unified expression of the structural relationship between adjacent data, resulting in fragmented lighting changes, difficulty in reflecting the correlation between data, and affecting the stability of regulation. In particular, inconsistent response is prone to occur during periods of rapid lighting change.

Method used

By dividing and numbering the time series, identifying the brightness change path, establishing cross-correlation between segments, and performing connection verification based on segment type and path order, the consistency of adjacent data changes is ensured. Combined with time position matching and sequence correction, the reliability of the response is improved.

Benefits of technology

It realizes the continuous feature expression of illumination changes under illumination conditions, improves the stability of illumination state changes and the reliability of response, and suppresses the influence of abnormal disturbances.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122373213A_ABST
    Figure CN122373213A_ABST
Patent Text Reader

Abstract

This invention relates to the field of big data processing technology, specifically to a lighting data processing method and system based on environmental perception. The method includes the following steps: acquiring brightness and time series data and dividing them into segments by intervals; extracting segment numbers to identify the direction of change; matching segments with time windows to determine their type and associate them with paths; verifying segment consistency according to path order; and correcting the order by matching timestamps. In this invention, by dividing adjacent time intervals in the time series and constructing a segment numbering system, brightness changes exhibit continuous characteristics. Path relationships are extracted by combining changes in segment number direction, and segment cross-mapping is established within multiple time windows to form an association analysis of the brightness evolution process. Connection verification is performed based on segment type and path order to ensure consistency of adjacent data changes. Combined with time position matching and order correction, the lighting state changes become more stable, improving response reliability under lighting conditions and suppressing the impact of abnormal disturbances.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of big data processing technology, and in particular to a lighting data processing method and system based on environmental perception. Background Technology

[0002] The field of big data processing technology involves the collection, storage, cleaning, transformation, and analysis of multi-source data. Specifically, this includes acquiring environmental parameter data through sensor terminals, transmitting the data to data processing equipment via communication interfaces, performing format conversion, outlier removal, time-series reconstruction, and multi-dimensional data correlation calculations on the data, and classifying and integrating the data according to preset rules or mathematical models to support data retrieval and management in subsequent application scenarios. Traditional lighting data processing methods based on environmental perception involve collecting ambient brightness values ​​using light sensors, converting analog signals to digital signals using analog-to-digital converters, writing the digital signals into storage units according to a fixed sampling period, dividing the brightness values ​​into intervals using set thresholds, matching these intervals with a lighting equipment control table, sorting continuously sampled data using timestamps, and filling in missing sampling points using linear interpolation. Finally, the processed data is output to the lighting control execution device to complete the lighting data processing flow.

[0003] Processing discrete sampled data independently lacks a unified expression of the structural relationships between adjacent data. In scenarios where illumination changes exhibit phased fluctuations or periodic ups and downs, the correlation between data is difficult to reflect, which can easily lead to a fragmented state of change process. At the same time, relying on the output of a single processing result lacks the ability to continuously track historical change paths. In environments with alternating changes over multiple time periods, it is easy to have problems with inconsistent state transitions. For example, when rapid cloud movement causes frequent fluctuations in brightness, the control results may show inconsistent responses between different stages, affecting the overall stability of regulation. Summary of the Invention

[0004] To address the technical problems existing in the prior art, embodiments of the present invention provide a lighting data processing method based on environmental perception; To achieve the above objectives, the present invention adopts the following technical solution: a lighting data processing method based on environmental perception, comprising the following steps: S1: Obtain the brightness value sequence and timestamp sequence output by the light sensor, the ascending timestamp sequence, compare the interval between adjacent timestamps and the sampling time interval, divide the area into segments and obtain the set of ambient brightness segments; S2: Based on the set of ambient brightness segments, extract the segment number sequence, identify the direction of change of adjacent segment numbers, divide the continuous directional path, identify the direction of change of the starting brightness value and the ending brightness value, and obtain the brightness change path; S3: Based on the brightness change path, extract the current and adjacent time window segment numbers, pair the segment numbers, identify the changes in the starting and ending brightness values ​​and compare them with the brightness change intervals, classify the types and correspond them with the path numbers, and obtain the segment cross-association result set; S4: Based on the cross-association result set of the segments, read the segment type identifier, classify and identify the type identifier, connect the segments in the path order, check the consistency of the starting brightness value and the ending brightness value of adjacent segments, and obtain the lighting state adjustment sequence. S5: Based on the lighting state adjustment sequence, call the corresponding position of the timestamp sequence, match the lighting state adjustment sequence and the timestamp sequence, and correct the order according to the segment number to obtain the lighting state time sequence.

[0005] As a further embodiment of the present invention, the set of ambient brightness segments includes a segment number set, a segment start brightness, a segment end brightness, a segment duration, and a segment stability identifier; the brightness change path includes a path number, a path direction identifier, a path start segment, a path end segment, a path change amplitude, and a path continuity identifier; the segment cross-association result set includes a segment pair identifier, a segment type label, a segment matching relationship, a segment change level, and a path association index; the lighting state adjustment sequence includes a state number, a state type identifier, a state connection order, a state correction mark, and a state continuous interval; and the lighting state time sequence includes a time interval range, a state time mapping, a time sequence index, a state duration, and a time segment identifier.

[0006] As a further embodiment of the present invention, the ascending timestamp sequence refers to a set of timestamps arranged in ascending order of time to ensure that the data time monotonically increases. The continuous directional path refers to the set of continuous segments formed when adjacent segments change in the same direction.

[0007] As a further embodiment of the present invention, the connecting segment refers to adjacent segments that are connected in the path sequence and whose brightness states before and after must be consistent. The process of correcting the sequence according to the segment number refers to the process of reordering and correcting the time and state sequence based on the logical order of the segment numbers.

[0008] As a further aspect of the present invention, the specific steps of S1 are as follows: S101: Obtain the brightness value sequence and timestamp sequence output by the light sensor. For the ascending timestamp sequence, calculate the interval value between adjacent timestamps one by one and compare it with the preset sampling time interval. Assign a consistent label to the position where the interval value is equal to the sampling time interval, and assign a difference label to the position where the interval value is not equal. Organize the label sequence in chronological order to obtain the time interval consistency sequence. S102: According to the time interval consistency sequence, the indexes corresponding to the consecutive consistent identifiers are assigned to the same number, the indexes corresponding to the difference identifiers are used as the starting point of the new number, the numbering is assigned to all indexes and associated with the numbering, and the correspondence between the indexes and the numbering is mapped to obtain the segment numbering mapping relationship; S103: Based on the segment number mapping relationship, the brightness values ​​corresponding to the same number are assigned to the same segment data, the first and last brightness values ​​of the segment data are extracted, and the starting and ending brightness values ​​are described in numerical order to obtain the set of ambient brightness segments.

[0009] As a further aspect of the present invention, the specific steps of S2 are as follows: S201: Based on the set of ambient brightness segments, extract the segment numbers and sort them in chronological order to obtain the segment number sequence. Determine the direction of adjacent numbers, identify the direction of change based on the increasing and decreasing relationship of the numbers, and write the direction corresponding to the adjacent numbers into the direction sequence to obtain the segment direction sequence. S202: Based on the segment direction sequence, positions with consecutive directions are grouped into the same path number, and the path numbers corresponding to positions with changed directions are incremented to obtain a segment path set; S203: Call the set of segment paths, extract the brightness value of the starting segment and the brightness value of the ending segment for each path, calculate the change range between the two and combine it with the direction sequence analysis to describe the change direction, associate the path number with the change range and the direction description to obtain the brightness change path.

[0010] As a further aspect of the present invention, the specific steps of S3 are as follows: S301: Based on the brightness change path, extract the current time window segment number and the adjacent time window segment number, pair the numbers in time order, and match the current window number with the adjacent window number item by item to obtain the segment pair sequence; S302: Based on the segment pair sequence, extract the corresponding start brightness value and end brightness value for each pair, calculate the change range between the two, and call the preset brightness change range for interval comparison, map the change range to the interval range, and obtain the interval correspondence result. S303: Call the interval correspondence result, divide each pair of segment types, write the interval range corresponding type identifier into the segment pair, and correspond the type result with the brightness change path to obtain the segment cross-association result set.

[0011] As a further aspect of the present invention, the specific steps of S4 are as follows: S401: Based on the cross-association result set of the segments, read the corresponding type identifiers of the segments and extract the segment number sequence according to the path order, classify and identify the type identifiers, and group segments of the same type into the same category path to obtain a set of type paths; S402: Based on the set of type paths, connect the segment order within the category path, extract the starting brightness state and ending brightness state at the boundary position of adjacent segments and analyze their consistency to obtain a state consistency sequence. S403: Call the state consistency sequence to correct the brightness state at the location with differences, adjust the corresponding state value according to the brightness change relationship of adjacent segments, and sort the corrected states in the path order to obtain the lighting state adjustment sequence.

[0012] As a further aspect of the present invention, the specific steps of S5 are as follows: S501: Based on the lighting state adjustment sequence, extract the corresponding state value of the segment and call the corresponding index position in the timestamp sequence, match the state value with the corresponding timestamp item by item to obtain the state time matching sequence. S502: Based on the state time matching sequence, extract the segment number order information, correct the matching result order, compare the timestamp order with the segment number order and adjust the corresponding positional relationship to obtain the order correction sequence; S503: Call the sequence correction sequence, identify the position of change of adjacent state values, divide the corresponding time range interval according to the position of change, and associate the interval with the state value to obtain the lighting state time series.

[0013] An environment-aware lighting data processing system includes: The segment division module acquires the brightness value sequence and timestamp sequence output by the light sensor, the ascending timestamp sequence, compares the interval between adjacent timestamps and the sampling time interval, divides the segment number, groups the brightness value sequence, extracts the start brightness value and end brightness value, and obtains the set of ambient brightness segments. The path recognition module extracts the segment number sequence based on the set of ambient brightness segments, identifies the direction of change of adjacent segment numbers, divides the continuous directional path, identifies the direction of change of the starting brightness value and the ending brightness value, and obtains the brightness change path. The cross-mapping module extracts the current time window segment number and the adjacent time window segment number based on the brightness change path, pairs the segment numbers, reads the starting brightness value and the ending brightness value, identifies the change direction and compares it with the brightness change interval, distinguishes the type and matches it with the path number, and obtains the segment cross-association result set. The state adjustment module, based on the segment cross-association result set, reads the segment type identifier, classifies and identifies the type identifier, connects the segments in the path order, and verifies the consistency between the starting brightness value and the ending brightness value of adjacent segments to obtain the lighting state adjustment sequence; The time matching module, based on the lighting state adjustment sequence, calls the corresponding position of the timestamp sequence, matches the lighting state adjustment sequence with the timestamp sequence, corrects the order according to the segment number, divides the time range corresponding to the state, and obtains the lighting state time sequence.

[0014] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, by dividing adjacent time intervals in a time series and constructing a segment numbering system, the brightness change exhibits continuous characteristics. Path relationships are extracted by combining the changes in the direction of segment numbering, and segment cross-mapping is established within multiple time windows to form an association analysis of the brightness evolution process. Connection verification is performed based on segment type and path order to ensure the consistency of adjacent data changes. Combined with time position matching and sequence correction, the changes in lighting state are made more stable, improving the response reliability under lighting conditions and suppressing the influence of abnormal disturbances. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic diagram of the steps of the present invention; Figure 2 This is a detailed schematic diagram of S1 of the present invention; Figure 3 This is a detailed schematic diagram of S2 of the present invention; Figure 4 This is a detailed schematic diagram of S3 of the present invention; Figure 5 This is a detailed schematic diagram of S4 of the present invention; Figure 6 This is a detailed schematic diagram of S5 of the present invention; Figure 7 This is a system module diagram of the present invention. Detailed Implementation

[0017] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0018] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0019] Please see Figure 1 This invention provides a lighting data processing method based on environmental perception, comprising the following steps: S1: Obtain the brightness value sequence and timestamp sequence output by the light sensor. The ascending timestamp sequence is compared with the interval between adjacent timestamps and the sampling time interval. Positions with consistent intervals are assigned to the same segment number, and positions with inconsistent intervals are assigned to a new segment number. The brightness value sequence is grouped according to the segment number. The start brightness value and end brightness value of each segment are extracted and the segment is described to obtain the set of ambient brightness segments. S2: Based on the set of ambient brightness segments, extract the segment number sequence, identify the direction of change of adjacent segment numbers, divide the continuous direction consistent segment path, identify the brightness change amplitude of the starting segment and ending segment in the path and give a description of the change direction, and obtain the brightness change path. S3: Based on the brightness change path, extract the segment number of the current time window and the segment number of the adjacent time window, pair the two sets of segment numbers to obtain the segment pair sequence, identify the change range of the starting brightness value and the ending brightness value in the segment pair and compare it with the brightness change interval, classify the type according to the comparison result, and correspond the type result with the path information to obtain the segment cross-association result set; S4: Based on the segment cross-association result set, read the segment corresponding type identifier in the segment cross-association result set, classify and identify the type identifier, connect segments of the same type according to the path order, check the consistency between the starting brightness state and the ending brightness state at the connection position of adjacent segments, correct the state at positions with differences, and obtain the lighting state adjustment sequence. S5: Based on the lighting state adjustment sequence, call the corresponding position of the timestamp sequence, match the lighting state adjustment sequence and the timestamp sequence item by item, correct the order of the matching results according to the segment number order, divide the time range interval corresponding to the differentiated state, and obtain the lighting state time sequence.

[0020] The set of ambient brightness segments includes segment number set, segment start brightness, segment end brightness, segment duration, and segment stability indicator. The brightness change path includes path number, path direction indicator, path start segment, path end segment, path change amplitude, and path continuity indicator. The segment cross-association result set includes segment pair indicator, segment type label, segment matching relationship, segment change level, and path association index. The lighting state adjustment sequence includes state number, state type indicator, state connection sequence, state correction mark, and state continuous interval. The lighting state time series includes time interval range, state time mapping, time sequence index, state duration, and time segment indicator.

[0021] Please see Figure 2 The specific steps of S1 are as follows: S101: Obtain the brightness value sequence and timestamp sequence output by the light sensor. For the ascending timestamp sequence, calculate the interval value between adjacent timestamps one by one and compare it with the preset sampling time interval. Assign a consistent label to the position where the interval value is equal to the sampling time interval, and assign a difference label to the position where the interval value is not equal. Organize the label sequence in chronological order to obtain the time interval consistency sequence. First, raw photoelectric analog signals are cyclically acquired via the light sensor hardware interface at 100-millisecond intervals, and converted into ambient brightness values ​​using an analog-to-digital converter. These brightness values ​​are stored in real-time in a data buffer, arranged in the order of acquisition to form a brightness value sequence. Simultaneously, a corresponding microsecond-level timestamp is recorded for each brightness value, generating a timestamp sequence. This timestamp sequence is then sorted in ascending order to ensure the temporal monotonicity of the data stream. Next, a step-by-step difference operation is performed, subtracting the previous timestamp from the next to obtain the interval between adjacent timestamps. This interval is then precisely compared with a preset sampling time interval, set to 100 milliseconds. If the interval value obtained from a calculation meets the segmented consistency criteria (i.e., the absolute value of the difference between the interval value and the preset interval is less than or equal to 2 milliseconds), it is marked as consistent at that index position, and the value is recorded as 1. If the interval value exceeds this range due to sensor response fluctuations or data transmission delays, such as 105 milliseconds, it is marked as different, and the value is recorded as 0. These identifiers are organized according to the original order of the timeline. For example, in a sequence containing 10 samples, if the 3rd and 7th sampling points produce an interval of 120 milliseconds, the generated identifier sequence is 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, resulting in a time interval consistency sequence.

[0022] S102: Based on the time interval consistency sequence, assign the index corresponding to the continuous consistent identifier to the same number, take the index corresponding to the difference identifier as the starting point of the new number, assign the number to all indexes and associate the numbers, and match the index with the number to obtain the segment number mapping relationship; First, the time interval consistency sequence generated in the preceding steps is read, and a logical scan begins from the first index identifier. During the scan, index positions with consecutive consistency identifiers and values ​​of 1 are grouped into the same numbering group and assigned a unique integer number. When the scan pointer moves to a difference identifier with a value of 0, the current continuity is determined to be interrupted, the coverage of the current number is immediately terminated, and the index corresponding to the difference identifier is used as the starting point for the next new number, which is then assigned an incremented new number. The above loop judgment and assignment operation is performed on all indices, and each index is associated with its generated unique number to establish a mapping table between index values ​​and segment numbers. For example, if the consistency sequence is 1 for the first 5 items, 0 for the 6th item, and 1 for the 7th to 10th items, then indices 1 to 5 are uniformly assigned number 1, index 6 is independently assigned number 2 due to the interval anomaly, and indices 7 to 10 are assigned number 3, ultimately obtaining the segment number mapping relationship.

[0023] S103: Based on the segment number mapping relationship, the brightness values ​​corresponding to the same number are assigned to the same segment data. The first and last brightness values ​​of the segment data are extracted, and the starting and ending brightness values ​​are described in numerical order to obtain the set of ambient brightness segments. First, based on the segment number mapping relationship, all brightness values ​​belonging to the same number are extracted from the original sequence and encapsulated into the corresponding segment data container. Within each container, an index positioning operation is used to precisely extract the starting brightness value (first value in the sorted sequence) and the ending brightness value (last value in the sorted sequence) of that segment. Following the ascending order of the numbers, the starting and ending brightness values ​​corresponding to each number are recorded and described sequentially. For example, segment number 1 contains 5 brightness values, with the first value being 120 lux and the last value being 150 lux; segment number 2 contains only one difference marker, so its starting and ending brightness values ​​are both the brightness value of that marker itself, 155 lux; segment number 3 has a starting value of 160 lux and a last value of 200 lux. Through the structured extraction of these boundary values, the final set of ambient brightness segments is obtained.

[0024] Please see Figure 3 The specific steps of S2 are as follows: S201: Based on the set of ambient brightness segments, extract the segment numbers and sort them in chronological order to obtain the segment number sequence. Determine the direction of adjacent numbers, identify the direction of change based on the increasing and decreasing relationship of the numbers, and write the corresponding directions of adjacent numbers into the direction sequence to obtain the segment direction sequence. First, segment numbers are extracted sequentially from the set of ambient brightness segments and arranged according to their timestamps to form a segment number sequence. For adjacent numbers in the sequence, directional attributes are determined by calculating the difference between the average brightness of the segment corresponding to the next number and the average brightness of the segment corresponding to the previous number, identifying the trend of change. If the difference is greater than 0, it is considered an increasing relationship, and the direction is recorded as upward; if the difference is less than 0, it is considered a decreasing relationship, and the direction is recorded as downward; if the difference is equal to 0, it is recorded as stable. These directional text labels are then sequentially written into the direction sequence. For example, if the average brightness of segment 1 to segment 2 increases from 135 lux to 155 lux, it is determined as upward; if the average brightness of segment 2 to segment 3 increases from 155 lux to 180 lux, it is also determined as upward. The resulting direction sequence is upward, upward, thus obtaining the final segment direction sequence.

[0025] S202: Based on the segment direction sequence, positions with consecutive directions are grouped into the same path number, and the path numbers corresponding to positions with changed directions are incremented to obtain the segment path set; First, the direction sequence of segments is read, and adjacent positions with the same direction feature are merged. If multiple consecutive positions all have the direction indicator "up," then all segment indices corresponding to these positions are grouped into the same path number. Once a change in direction indicator is detected, such as from up to down or remaining constant, the path number is incremented by 1, and this is used as the starting point of the new path. In this way, the entire direction sequence is scanned, and segments with consistent trends are logically clustered. For example, a sequence containing five indicators—up, up, down, down, up—will be divided into path 1, path 2, and path 3, where path 1 covers the first two consecutive upward-changing segments, ultimately resulting in a set of segment paths.

[0026] S203: Call the segment path set, extract the brightness value of the starting segment and the brightness value of the ending segment for each path, calculate the change range between the two and combine it with the direction sequence analysis to describe the change direction, associate the path number with the change range and the direction description to obtain the brightness change path; First, the set of segment paths is accessed. For each path number in the set, the starting brightness value of the starting segment and the ending brightness value of the ending segment covered by the path are extracted. By calculating the absolute value of the difference between the brightness value of the ending segment and the brightness value of the starting segment, the variation amplitude under that path is obtained. Then, combined with the directional description corresponding to the path in the directional sequence, the path number, the variation amplitude value, and the directional feature are associated and encapsulated. For example, if path 1 starts at 120 lux and ends at 155 lux, the variation amplitude is calculated to be 35 lux, and the direction is upward, then a data item described as "Path 1: Amplitude 35 lux, Direction Upward" is generated, ultimately yielding the brightness variation path.

[0027] Please see Figure 4 The specific steps of S3 are as follows: S301: Based on the brightness change path, extract the current time window segment number and the adjacent time window segment number, pair the numbers in time order, and match the current window number with the adjacent window number item by item to obtain the segment pair sequence; First, based on the brightness change path, extract all segment numbers within the current preset time window, and simultaneously extract the segment numbers within the next adjacent time window. Following a linear progression in time, logically pair the numbers in the current window with those in the adjacent window one-to-one. If the current window contains numbers 1 and 2, and the adjacent window contains numbers 3 and 4, the resulting pairings are 1 to 3 and 2 to 4. Organize these paired number groups chronologically to establish a topological relationship of brightness changes along the time axis, ultimately obtaining a sequence of segment pairs.

[0028] S302: Based on the segment pair sequence, extract the corresponding start brightness value and end brightness value for each pair, calculate the change range between the two, and call the preset brightness change range for interval comparison, map the change range to the interval range, and obtain the interval correspondence result; First, for each pair of data in the segment pair sequence, the starting brightness value of the corresponding starting segment and the ending brightness value of the ending segment are extracted, and the change range between the two is calculated. Then, a preset brightness change range standard is used for comparison. This standard is divided into: 0 to 30 lux is the slight fluctuation range, 31 to 100 lux is the normal change range, and above 101 lux is the abrupt change range. The calculated change range value is matched to the corresponding range. For example, if the brightness of a pair of segments changes from 200 lux to 350 lux, the change range is 150 lux, and after comparison, it is classified into the abrupt change range, thus obtaining the final range correspondence result.

[0029] S303: Call the interval corresponding results, divide each pair of segment types, write the interval range corresponding type identifier into the segment pair, and correspond the type results with the brightness change path to obtain the segment cross-association result set; First, the interval correspondence results are retrieved, and the evolution characteristics of each pair of segments are categorized. Based on the interval range to which they belong, specific type identifiers are assigned, such as type 1 for minor fluctuations, type 2 for regular changes, and type 3 for dramatic jumps. These type identifiers are written into the segment pair data structure, and the categorized type results are cross-indexed with the original brightness change paths. This adds a logical dimension reflecting the environmental photodynamic characteristics to the physical change values, ultimately yielding a set of segment cross-correlation results.

[0030] Please see Figure 5 The specific steps of S4 are as follows: S401: Based on the cross-association result set of segments, read the corresponding type identifiers of segments and extract the segment number sequence according to the path order, classify and identify the type identifiers, and group segments of the same type into the same category path to obtain a set of type paths; First, based on the cross-association result set of segments, the type identifier corresponding to each segment is extracted, and the segment number sequence is rearranged according to the path order. Classification and identification logic is then executed, merging segment paths with the same type identifier into the same category path. For example, all paths belonging to type 3 are extracted to form a high-frequency response path group, and all paths belonging to type 1 are extracted to form a silent maintenance path group. By decoupling the changing characteristics, classification management of complex lighting scenes is achieved, ultimately resulting in a set of type paths.

[0031] S402: Based on the type path set, connect the segment order within the category path, extract the starting brightness state and ending brightness state at the boundary of adjacent segments and analyze their consistency to obtain a state consistency sequence. First, based on the set of type paths, the segment connection logic within each category path is processed. The brightness state of two adjacent segments at their boundary time point is extracted, i.e., the ending brightness value of the previous segment and the starting brightness value of the next segment. A consistency analysis operation is performed, checking whether the absolute value of the difference between the two values ​​is within a preset tolerance range, here set to 2 lux. If the absolute value of the difference is less than or equal to 2 lux, the state is considered consistent and recorded as 1; if the absolute value of the difference is greater than 2 lux, the state is considered inconsistent and recorded as 0. For example, if segment 1 ends at 150 lux and segment 2 starts at 155 lux, the difference is 5, exceeding the tolerance, and is recorded as 0, ultimately resulting in a consistent state sequence.

[0032] S403: Call the state consistency sequence to correct the brightness state at locations with differences, adjust the corresponding state values ​​according to the brightness change relationship between adjacent sections, and sort the corrected states according to the path order to obtain the lighting state adjustment sequence. First, the state consistency sequence is invoked. For inconsistencies marked as 0, a brightness state correction operation is performed. The correction logic employs a smoothing compensation method, calculating the corrected starting value by multiplying the last value of the previous segment by the difference between the two segments and a weighting coefficient of 0.5. By adjusting the brightness state values ​​at corresponding positions, the brightness transition at the boundary between adjacent segments conforms to physical continuity. All corrected brightness states are then sorted according to the original execution order of the path to eliminate the visual abruptness caused by data segmentation, ultimately yielding the lighting state adjustment sequence.

[0033] Please see Figure 6 The specific steps of S5 are as follows: S501: Based on the lighting state adjustment sequence, extract the corresponding state value of the segment and call the corresponding index position in the timestamp sequence. Match the state value with the corresponding timestamp item by item to obtain the state time matching sequence. First, based on the lighting state adjustment sequence, the target lighting state value corresponding to each segment is extracted. Simultaneously, the absolute time coordinates corresponding to these segment indices are retrieved from the timestamp sequence. Through item-by-item matching logic, each target state value is precisely bound to its corresponding timestamp. For example, the corrected 200 lux adjustment command is bound to the timestamp 08:35:10.500 on April 14, 2020, ensuring the precise timing of command execution, ultimately resulting in a state-time matching sequence.

[0034] S502: Based on the state time matching sequence, extract the segment number order information, correct the matching result order, compare the timestamp order with the segment number order and adjust the corresponding positional relationship to obtain the order correction sequence; First, based on the state time matching sequence, the original segment number sequence information is extracted again. A sequence correction operation is performed, double-checking the chronological order of the timestamps against the logical order of the segment numbers. If time reversal or logical overlap is detected—that is, if a later timestamp is earlier than a previous timestamp but its numbering order is later—the time coordinates are rearranged according to the numbering order to ensure the logical rigor of control instructions during actual execution and prevent instruction disorder caused by calculation delays. The final sequence is then the corrected sequence.

[0035] S503: Call the sequence correction sequence, identify the position of change of adjacent state values, divide the corresponding time range interval according to the position of change, and associate the interval with the state value to obtain the lighting state time series; First, the sequential correction sequence is invoked, and the moments when adjacent state values ​​change are identified through iteration, i.e., state transition points. Using these transition points as boundaries, the continuous time axis is divided into several independent time range intervals, and each interval is finally mapped and associated with the corresponding target lighting state value. For example, in the interval from 08:40:00 to 08:45:00, the instruction to maintain the lighting at 180 lux is output to achieve dynamic tracking and precise compensation for changes in ambient light, ultimately obtaining the lighting state time series.

[0036] Please see Figure 7 An environment-aware lighting data processing system includes: The segment division module acquires the brightness value sequence and timestamp sequence output by the light sensor, the ascending timestamp sequence, compares the interval between adjacent timestamps and the sampling time interval, divides the segment number, groups the brightness value sequence, extracts the start brightness value and end brightness value, and obtains the set of ambient brightness segments. The path recognition module extracts the segment number sequence based on the set of ambient brightness segments, identifies the direction of change of adjacent segment numbers, divides continuous directional paths, identifies the direction of change of the starting brightness value and the ending brightness value, and obtains the brightness change path. The cross-mapping module extracts the segment number of the current time window and the segment number of the adjacent time window based on the brightness change path, pairs the segment numbers, reads the starting brightness value and the ending brightness value, identifies the change direction and compares it with the brightness change interval, distinguishes the type and matches it with the path number, and obtains the segment cross-association result set; The status adjustment module reads the segment type identifier based on the segment cross-association result set, classifies and identifies the type identifier, connects the segments according to the path sequence, and verifies the consistency of the starting brightness value and ending brightness value of adjacent segments to obtain the lighting status adjustment sequence. The time matching module, based on the lighting state adjustment sequence, calls the corresponding position of the timestamp sequence, matches the lighting state adjustment sequence with the timestamp sequence, corrects the order according to the segment number, divides the time range corresponding to the state, and obtains the lighting state time sequence.

[0037] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A lighting data processing method based on environmental perception, characterized in that, Includes the following steps: S1: Obtain the brightness value sequence and timestamp sequence output by the light sensor, the ascending timestamp sequence, compare the interval between adjacent timestamps and the sampling time interval, divide the area into segments and obtain the set of ambient brightness segments; S2: Based on the set of ambient brightness segments, extract the segment number sequence, identify the direction of change of adjacent segment numbers, divide the continuous directional path, identify the direction of change of the starting brightness value and the ending brightness value, and obtain the brightness change path; S3: Based on the brightness change path, extract the current and adjacent time window segment numbers, pair the segment numbers, identify the changes in the starting and ending brightness values ​​and compare them with the brightness change intervals, classify the types and correspond them with the path numbers, and obtain the segment cross-association result set; S4: Based on the cross-association result set of the segments, read the segment type identifier, classify and identify the type identifier, connect the segments in the path order, check the consistency of the starting brightness value and the ending brightness value of adjacent segments, and obtain the lighting state adjustment sequence. S5: Based on the lighting state adjustment sequence, call the corresponding position of the timestamp sequence, match the lighting state adjustment sequence and the timestamp sequence, and correct the order according to the segment number to obtain the lighting state time sequence.

2. The lighting data processing method based on environmental perception according to claim 1, characterized in that, The set of ambient brightness segments includes a segment number set, segment start brightness, segment end brightness, segment duration, and segment stability identifier. The brightness change path includes a path number, path direction identifier, path start segment, path end segment, path change amplitude, and path continuity identifier. The segment cross-association result set includes segment pair identifier, segment type label, segment matching relationship, segment change level, and path association index. The lighting state adjustment sequence includes a state number, state type identifier, state connection order, state correction mark, and state continuous interval. The lighting state time series includes a time interval range, state time mapping, time sequence index, state duration, and time segment identifier.

3. The lighting data processing method based on environmental perception according to claim 1, characterized in that, The ascending timestamp sequence refers to a set of timestamps arranged in ascending order of time, ensuring that the data time monotonically increases. The continuous directional path refers to the set of continuous segments formed when adjacent segments change in the same direction.

4. The lighting data processing method based on environmental perception according to claim 1, characterized in that, The connecting section refers to adjacent sections that are connected in the order of the path and must ensure that the brightness state before and after is consistent. The process of correcting the sequence according to the segment number refers to the process of reordering and correcting the time and state sequence based on the logical order of the segment numbers.

5. The lighting data processing method based on environmental perception according to claim 1, characterized in that, The specific steps of S1 are as follows: S101: Obtain the brightness value sequence and timestamp sequence output by the light sensor. For the ascending timestamp sequence, calculate the interval value between adjacent timestamps one by one and compare it with the preset sampling time interval. Assign a consistent label to the position where the interval value is equal to the sampling time interval, and assign a difference label to the position where the interval value is not equal. Organize the label sequence in chronological order to obtain the time interval consistency sequence. S102: According to the time interval consistency sequence, the indexes corresponding to the consecutive consistent identifiers are assigned to the same number, the indexes corresponding to the difference identifiers are used as the starting point of the new number, the numbering is assigned to all indexes and associated with the numbering, and the correspondence between the indexes and the numbering is mapped to obtain the segment numbering mapping relationship; S103: Based on the segment number mapping relationship, the brightness values ​​corresponding to the same number are assigned to the same segment data, the first and last brightness values ​​of the segment data are extracted, and the starting and ending brightness values ​​are described in numerical order to obtain the set of ambient brightness segments.

6. The lighting data processing method based on environmental perception according to claim 1, characterized in that, The specific steps of S2 are as follows: S201: Based on the set of ambient brightness segments, extract the segment numbers and sort them in chronological order to obtain the segment number sequence, determine the direction of adjacent numbers, identify the direction of change based on the increasing and decreasing relationship of the numbers, and write the direction corresponding to the adjacent numbers into the direction sequence to obtain the segment direction sequence. S202: Based on the segment direction sequence, positions with consecutive directions are grouped into the same path number, and the path numbers corresponding to positions with changed directions are incremented to obtain a segment path set; S203: Call the set of segment paths, extract the brightness value of the starting segment and the brightness value of the ending segment for each path, calculate the change range between the two and combine it with the direction sequence analysis to describe the change direction, associate the path number with the change range and the direction description to obtain the brightness change path.

7. The lighting data processing method based on environmental perception according to claim 1, characterized in that, The specific steps for S3 are as follows: S301: Based on the brightness change path, extract the current time window segment number and the adjacent time window segment number, pair the numbers in time order, and match the current window number with the adjacent window number item by item to obtain the segment pair sequence; S302: Based on the segment pair sequence, extract the corresponding start brightness value and end brightness value for each pair, calculate the change range between the two, and call the preset brightness change range for interval comparison, map the change range to the interval range, and obtain the interval correspondence result. S303: Call the interval correspondence result, divide each pair of segment types, write the interval range corresponding type identifier into the segment pair, and correspond the type result with the brightness change path to obtain the segment cross-association result set.

8. The lighting data processing method based on environmental perception according to claim 1, characterized in that, The specific steps of S4 are as follows: S401: Based on the cross-association result set of the segments, read the corresponding type identifiers of the segments and extract the segment number sequence according to the path order, classify and identify the type identifiers, and group segments of the same type into the same category path to obtain a set of type paths; S402: Based on the set of type paths, connect the segment order within the category path, extract the starting brightness state and ending brightness state at the boundary position of adjacent segments and analyze their consistency to obtain a state consistency sequence. S403: Call the state consistency sequence to correct the brightness state at the location with differences, adjust the corresponding state value according to the brightness change relationship of adjacent segments, and sort the corrected states in the path order to obtain the lighting state adjustment sequence.

9. The lighting data processing method based on environmental perception according to claim 1, characterized in that, The specific steps of S5 are as follows: S501: Based on the lighting state adjustment sequence, extract the corresponding state value of the segment and call the corresponding index position in the timestamp sequence, match the state value with the corresponding timestamp item by item to obtain the state time matching sequence. S502: Based on the state time matching sequence, extract the segment number order information, correct the matching result order, compare the timestamp order with the segment number order and adjust the corresponding positional relationship to obtain the order correction sequence; S503: Call the sequence correction sequence, identify the position of change of adjacent state values, divide the corresponding time range interval according to the position of change, and associate the interval with the state value to obtain the lighting state time series.

10. A lighting data processing system based on environmental perception, characterized in that, The system is used to implement the lighting data processing method based on environmental perception as described in any one of claims 1-9, and the system comprises: The segment division module acquires the brightness value sequence and timestamp sequence output by the light sensor, the ascending timestamp sequence, compares the interval between adjacent timestamps and the sampling time interval, divides the segment number, groups the brightness value sequence, extracts the start brightness value and end brightness value, and obtains the set of ambient brightness segments. The path recognition module extracts the segment number sequence based on the set of ambient brightness segments, identifies the direction of change of adjacent segment numbers, divides the continuous directional path, identifies the direction of change of the starting brightness value and the ending brightness value, and obtains the brightness change path. The cross-mapping module extracts the current time window segment number and the adjacent time window segment number based on the brightness change path, pairs the segment numbers, reads the starting brightness value and the ending brightness value, identifies the change direction and compares it with the brightness change interval, distinguishes the type and matches it with the path number, and obtains the segment cross-association result set. The state adjustment module, based on the segment cross-association result set, reads the segment type identifier, classifies and identifies the type identifier, connects the segments in the path order, and verifies the consistency between the starting brightness value and the ending brightness value of adjacent segments to obtain the lighting state adjustment sequence; The time matching module, based on the lighting state adjustment sequence, calls the corresponding position of the timestamp sequence, matches the lighting state adjustment sequence with the timestamp sequence, corrects the order according to the segment number, divides the time range corresponding to the state, and obtains the lighting state time sequence.