Atmosphere lamp brightness intelligent control method and system based on Internet of Things technology
By installing lighting terminals with unique address identifiers in the ambient lighting system, an ambient lighting matrix with spatial coordinate attributes is generated, the brightness deviation vector is calculated, and a smooth transition is performed, which solves the problem of the disconnect between lighting data and spatial location, and realizes precise brightness adjustment and coordinated control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG LAIHE TECH CO LTD
- Filing Date
- 2026-03-17
- Publication Date
- 2026-04-21
AI Technical Summary
In existing ambient lighting brightness control systems, the lighting data is disconnected from the spatial location, resulting in the inability to accurately match the lighting needs of different areas within the target space. Furthermore, the brightness adjustment lacks scientific basis, easily leading to localized over-brightness or under-brightness, and sudden changes are prone to occur during the brightness adjustment process.
Lighting terminals with unique address identifiers are installed in the target space to form a wireless lighting grid. The terminals collect and summarize light intensity attenuation and color temperature shift data with address identifiers to generate an ambient lighting matrix with spatial coordinate attributes. The brightness deviation vector is calculated by combining it with a preset lighting reference table, and a targeted brightness adjustment command is initiated. A smooth transition is achieved through the drive current curve.
It achieves precise correlation between illumination data and spatial location, and the brightness adjustment commands are targeted, avoiding sudden brightness changes and ensuring coordinated and unified brightness adjustment to meet the actual illumination needs of the target space.
Smart Images

Figure CN121908444A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of Internet of Things (IoT) lighting control technology, specifically an intelligent control method and system for ambient light brightness based on IoT technology. Background Technology
[0002] Currently, ambient lighting brightness control mostly employs centralized light acquisition or independent acquisition by a single terminal. Lighting terminals are often randomly networked or simply connected in series, without assigning a unique, identifiable address to each terminal. The acquired light data only contains basic luminous intensity information, lacking terminal-specific information and failing to establish a correspondence with the specific location of the target space. After data acquisition, it is often directly transmitted to a remote server for processing, lacking edge-side aggregation and grouping processing, making it difficult to quickly form a complete dataset reflecting the spatial light distribution.
[0003] In existing technologies, the disconnect between illumination data and spatial location leads to brightness adjustment commands failing to accurately match the illumination needs of different areas within the target space, easily resulting in localized over-brightness or under-brightness. Furthermore, brightness adjustment often employs a direct switching of target brightness without setting transition time parameters or specifically adjusting the driving current curve of the lighting terminal. This can cause sudden brightness changes during switching, impacting the user experience. In addition, the lack of effective integration of scattered illumination data prevents the formation of a precise ambient light distribution matrix, resulting in a lack of scientific basis for brightness adjustment and hindering the achievement of uniform and coordinated control throughout the entire space. Summary of the Invention
[0004] This invention aims to solve at least one of the technical problems existing in the prior art; Therefore, this invention proposes an intelligent brightness control method for ambient lights based on Internet of Things (IoT) technology, comprising: A set of lighting terminals with unique address identifiers are installed in the target space, and the lighting terminals together constitute the wireless lighting grid of the target space; Through each lighting terminal in the wireless lighting grid, the original light intensity attenuation data and original color temperature offset data of the location are collected. Both the original light intensity attenuation data and the original color temperature offset data carry the corresponding terminal address identifier. The original light intensity attenuation data and the original color temperature offset data are aggregated into an edge aggregation node. The edge aggregation node is then grouped according to the terminal address identifier to generate an ambient lighting matrix with spatial coordinate attributes. The ambient lighting matrix is compared with a preset lighting reference table to calculate the brightness deviation vector of each spatial coordinate point; Based on the brightness deviation vector, a brightness adjustment command for a specific lighting terminal is initiated in an IoT protocol stack. The brightness adjustment command includes the target brightness value and transition duration parameters. After receiving the brightness adjustment command, the lighting terminal in the wireless lighting grid adjusts its own drive current curve according to the transition duration parameter to complete the smooth transition of brightness.
[0005] Furthermore, the original light intensity attenuation data and the original color temperature offset data are aggregated into an edge aggregation node. This edge aggregation node then groups the data according to the terminal address identifier, generating an ambient lighting matrix with spatial coordinate attributes, including: The edge aggregation node listens to broadcast messages from the wireless lighting grid and extracts the original light intensity attenuation data and the original color temperature offset data from the messages. Parse the terminal address identifier in each data packet, and query a preset device topology mapping table based on the terminal address identifier to obtain the three-dimensional spatial coordinates of the lighting terminal during installation; By binding all the original light intensity attenuation data received at the same time with their corresponding three-dimensional spatial coordinates, a sparse three-dimensional light intensity distribution point cloud is constructed. The three-dimensional light intensity distribution point cloud is interpolated and completed to fill in the estimated light intensity values of the spatial areas not directly covered by the lighting terminal. The interpolated and completed three-dimensional light intensity distribution data is merged with the corresponding original color temperature offset data to generate the ambient lighting matrix.
[0006] Further, the ambient lighting matrix is compared with a preset lighting reference table to calculate the brightness deviation vector for each spatial coordinate point, including: Read the standard light intensity value stored in the illumination reference table. The standard light intensity value is preset according to the functional mode of the target space. Traverse each spatial coordinate point in the ambient lighting matrix and extract the current ambient light intensity value of the spatial coordinate point; The difference between the ambient light intensity value and the standard light intensity value is calculated and used as the brightness deviation scalar of the spatial coordinate point; Simultaneously, the brightness gradient between adjacent coordinate points in the ambient illumination matrix is analyzed, and the brightness deviation scalar and the brightness gradient are combined to form the brightness deviation vector.
[0007] Furthermore, based on the brightness deviation vector, a brightness adjustment command for a specific lighting terminal is initiated within an IoT protocol stack, including: Threshold filtering is applied to the brightness deviation vector to remove deviation components whose absolute value is lower than the set dead zone; Based on the magnitude of the remaining deviation components, the required brightness compensation coefficient is calculated, where the brightness compensation coefficient is a positive real number; A control frame is generated at the application layer of the IoT protocol stack, and the payload field of the control frame is filled with the product of the brightness compensation coefficient and the target brightness value; The control frame is encapsulated into a message queue in the transport layer, and the transition duration parameter is set to the highest priority field in the message queue. After the physical layer of the IoT protocol stack confirms that the channel is idle, the encapsulated control frame is sent to the corresponding lighting terminal.
[0008] Furthermore, after receiving the brightness adjustment command, the lighting terminal in the wireless lighting grid adjusts its own drive current curve according to the transition duration parameter, including: The microcontroller unit of the lighting terminal parses the brightness adjustment command and extracts the target brightness value and transition duration parameters; Read the current operating current value of the lighting terminal and calculate the total current change required to reach the target brightness value; The transition time parameter is divided into several discrete time steps, and the current increment corresponding to each time step is calculated. The duty cycle of the pulse width modulation signal is adjusted sequentially according to the current increment to generate a stepped drive current curve. At the end of each time step, the actual luminous intensity is detected. If the actual luminous intensity deviates from the expected value, the current increment for the next time step is finely adjusted.
[0009] Furthermore, it also includes: After completing the brightness adjustment, the lighting terminal collects the current actual light intensity data again and feeds it back to the edge aggregation node; The edge aggregation node uses the actual light intensity data to correct the ambient lighting matrix, forming a feedback dataset for closed-loop control. The feedback dataset is uploaded to the cloud policy engine, which then updates the parameter mapping relationship in the illumination baseline table by combining the historical feedback dataset. The cloud-based policy engine sends the updated lighting reference table to the edge aggregation node, replacing the original lighting reference table and completing one round of control loop. After completing the brightness adjustment, the lighting terminal collects the current actual light intensity data again and feeds it back to the edge aggregation node, including: After completing the current adjustment for the last time step, the lighting terminal immediately activates its built-in photoelectric sensor to perform a sampling. The sampled analog voltage signal is converted into a digital light intensity reading, and the digital light intensity reading is corrected for temperature drift. Generate a feedback message, which includes the address identifier of the lighting terminal, the corrected digital light intensity reading, and the sequence number of this adjustment; The feedback message is unicast to the edge aggregation node using the self-organizing network routing protocol of the wireless lighting mesh.
[0010] Furthermore, the edge aggregation node uses the actual light intensity data to correct the ambient lighting matrix, forming a feedback dataset for closed-loop control, including: After receiving the feedback message, the edge aggregation node locates the corresponding coordinate point in the ambient lighting matrix based on the address identifier therein; Replace the original value of the corresponding coordinate point in the ambient illumination matrix with the digital light intensity reading in the feedback message; Check the data timestamps of all coordinate points in the ambient lighting matrix and remove outdated data that has exceeded the set validity period; The updated ambient lighting matrix and the brightness deviation vector used in this adjustment are packaged together and associated into an independent record entry, which is then stored in the feedback dataset.
[0011] Furthermore, the feedback dataset is uploaded to the cloud-based policy engine, which then updates the parameter mapping relationships in the illumination baseline table in conjunction with the historical feedback dataset, including: The edge aggregation node initiates data compression when the set upload cycle is met or when the feedback dataset capacity reaches a threshold. The compressed feedback dataset is transmitted to the cloud-based policy engine via a cellular network link; The cloud strategy engine retrieves the historical feedback dataset of the controlled target space corresponding to the edge aggregation node of the current uploaded feedback data, and aligns and overlays the compressed feedback dataset with the historical feedback dataset on the time axis. Analyze the statistical distribution characteristics of the brightness deviation vector under the same functional mode in the superimposed dataset; Based on the statistical distribution characteristics, the range of standard light intensity values in the illumination reference table is dynamically adjusted to generate an updated illumination reference table.
[0012] Furthermore, the cloud-based policy engine distributes the updated illumination reference table to the edge aggregation node, replacing the original illumination reference table, including: The cloud-based policy engine generates a configuration update transaction, which includes version number verification information and the updated illumination baseline table body. The configuration update transaction is broadcast to all edge aggregation nodes that have registered the target space identifier corresponding to the current feedback dataset via message push service; After receiving the configuration update transaction, the edge aggregation node verifies whether the version number verification information is higher than the version number stored locally. If the verification passes, the local lighting reference table is marked as invalid, and the updated lighting reference table is loaded into the memory cache. At the beginning of the next control loop, the edge aggregation node switches its data source and begins calculations using the lighting reference table loaded in the memory cache.
[0013] Furthermore, the present invention also includes an intelligent control system for ambient light brightness based on Internet of Things (IoT) technology. The system includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of the above-described intelligent control method for ambient light brightness based on IoT technology.
[0014] Compared with the prior art, the beneficial effects of the present invention are: Each lighting terminal within the target space is equipped with a unique address identifier and forms a wireless lighting grid. Each lighting terminal collects raw light intensity attenuation data and raw color temperature offset data carrying its own terminal address identifier. After being aggregated at the edge aggregation node, the data is grouped according to the terminal address identifier to generate an ambient lighting matrix with spatial coordinate attributes. The data carrying the terminal address identifier enables precise correlation between the collected data and the specific lighting terminal and spatial location. The grouping processing of the edge aggregation node integrates the scattered lighting data into a matrix with spatial coordinate attributes, which can accurately present the differences in lighting distribution at different locations within the target space. This avoids the problem of lighting data being disconnected from spatial location and failing to accurately reflect local lighting conditions, allowing brightness adjustment commands to be formulated for specific spatial coordinate points, and achieving differentiated brightness control in different areas.
[0015] The ambient lighting matrix is compared with a preset lighting reference table to calculate the brightness deviation vector for each spatial coordinate point. Based on this brightness deviation vector, a brightness adjustment command containing the target brightness value and transition duration parameter is issued. Upon receiving the command, the lighting terminal adjusts its own drive current curve according to the transition duration parameter. The brightness deviation vector can accurately locate the lighting deviation at each spatial coordinate point, making the brightness adjustment command more targeted and avoiding blind adjustment. The coordinated adjustment of the transition duration parameter and the drive current curve can achieve a smooth brightness transition, avoiding the discomfort caused by sudden brightness changes. At the same time, the targeted adjustment of the drive current curve can keep the brightness change rhythm of each lighting terminal consistent, ensuring coordinated and unified brightness adjustment of the entire wireless lighting grid, which conforms to the actual lighting needs of the target space. Attached Figure Description
[0016] Figure 1This is a flowchart illustrating the steps of the intelligent ambient light brightness control method based on Internet of Things technology described in this invention. Figure 2 A flowchart for generating an ambient lighting matrix with spatial coordinate attributes; Figure 3 A flowchart for calculating the brightness deviation vector at each spatial coordinate point; Figure 4 This is a graph showing the relationship between the driving current curve and the light intensity feedback. Figure 5 This is a three-dimensional distribution map of the ambient lighting matrix. Detailed Implementation
[0017] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] See Figure 1 A set of lighting terminals with unique address identifiers is installed within the target space, forming a wireless lighting grid. Each lighting terminal in the grid collects raw light intensity attenuation data and raw color temperature shift data for its location; both data carry a corresponding terminal address identifier. This data is aggregated to an edge aggregation node, which groups the data according to the terminal address identifier, generating an ambient lighting matrix with spatial coordinate attributes. The ambient lighting matrix is compared with a preset lighting reference table to calculate the brightness deviation vector for each spatial coordinate point. Based on the brightness deviation vector, a brightness adjustment command is initiated within an IoT protocol stack for a specific lighting terminal. This command includes the target brightness value and a transition duration parameter. Upon receiving the brightness adjustment command, the lighting terminal in the wireless lighting grid adjusts its drive current curve according to the transition duration parameter to achieve a smooth brightness transition.
[0019] See Figure 2In one embodiment of the present invention, the edge aggregation node continuously runs a listening service that captures broadcast messages periodically sent by all lighting terminals in the wireless lighting grid. The wireless lighting grid consists of multiple lighting terminals deployed in a target space, such as twelve lighting terminals evenly distributed in a standard conference room. Each lighting terminal has a globally unique Media Access Control (MAC) address as its address identifier. The payload of the broadcast message encapsulates the raw light intensity attenuation data and raw color temperature offset data collected by the lighting terminal's own sensors. The raw light intensity attenuation data is a 16-bit integer representing the amount of attenuation of the light intensity received by the sensor relative to a preset reference. The raw color temperature offset data is also a 16-bit integer representing the amount of offset of the ambient light color temperature relative to standard white light. In some embodiments, the edge aggregation node extracts the raw light intensity attenuation data and raw color temperature offset data from the captured broadcast messages. The extraction process is performed according to a predefined communication protocol stack. First, the checksum information in the message header and trailer is removed, and then specific fields in the payload are extracted. These fields are arranged in a fixed format to ensure the correctness of data parsing.
[0020] In practice, the edge aggregation node parses each stripped data packet. The packet header contains a unique address identifier for the lighting terminal. The edge aggregation node then uses this unique address identifier to query the locally persistent device topology mapping table. This table is a relational database table that records the three-dimensional spatial coordinates of each lighting terminal, measured and entered during the installation phase using a laser rangefinder. The coordinates are in meters with millimeter-level precision. The query operation is executed using a structured query language statement, which uses the unique address identifier as the index key and returns the corresponding three-dimensional spatial coordinate value. Essentially, the device topology mapping table is loaded into the edge aggregation node's memory during system initialization, ensuring low latency and high efficiency for coordinate queries. The three-dimensional spatial coordinates include X-axis, Y-axis, and Z-axis coordinates, corresponding to the length, width, and height of the target space, respectively.
[0021] In practical implementation, the edge aggregation node binds all raw light intensity attenuation data received at the same millisecond timestamp with their corresponding three-dimensional spatial coordinates. This binding operation generates a data pair containing a three-dimensional spatial coordinate vector and a scalar of the raw light intensity attenuation data. The set of all data pairs constitutes a sparse three-dimensional light intensity distribution point cloud. The number of points in the three-dimensional light intensity distribution point cloud equals the number of lighting terminals that successfully reported data at the current moment. The spatial distribution of the points reflects the physical layout of the lighting terminals in the target space. The edge aggregation node performs interpolation completion processing on the sparse three-dimensional light intensity distribution point cloud. The goal of this interpolation completion processing is to fill in the estimated light intensity values of spatial regions in the three-dimensional light intensity distribution point cloud that are not directly covered by lighting terminals. The processing is based on the known spatial location and light intensity values of data points, and uses a mathematical model to calculate the light intensity values at unknown locations. The mathematical model used is the inverse distance weighted interpolation method, and its calculation formula is as follows: Where: symbol This represents the estimated light intensity value at the location P to be determined, with the symbol [symbol missing]. The negative power weight represents the distance from location point P to the i-th known data point, calculated as follows: ,in It is the Euclidean distance from location point P to the i-th known data point. The exponentiation parameter is usually set to 2, sign... This represents the original light intensity attenuation data value of the i-th known data point, with the symbol... This represents the number of known data points within a preset neighborhood radius of location point P. Through this interpolation process, the 3D light intensity distribution point cloud is transformed from a state containing only discrete known points into a dense data field covering a continuous region of the entire target space. Each grid point in the dense data field has an estimated light intensity value.
[0022] In specific implementation, the edge aggregation node merges the estimated light intensity value of each grid point in the dense data field obtained after interpolation with the original color temperature offset data of the corresponding position obtained through mapping the same spatial coordinates. The merging operation is used to generate the ambient lighting matrix. For the grid points obtained through interpolation, their color temperature data directly adopts the original color temperature offset data reported by the lighting terminal with the nearest Euclidean distance. The ambient lighting matrix is a three-dimensional array. The first dimension index of the array corresponds to the discretized encoding of the X-axis coordinate, the second dimension index corresponds to the discretized encoding of the Y-axis coordinate, and the third dimension index corresponds to the discretized encoding of the Z-axis coordinate. Each element of the array is a binary tuple containing a light intensity value member and a color temperature value member. The light intensity value member comes from the estimated light intensity value obtained by interpolation calculation, and the color temperature value member comes from the original color temperature offset data obtained by direct measurement or nearest neighbor mapping. In some embodiments, the ambient lighting matrix is stored in the random access memory of the edge aggregation node in row-major order, and the dimension size of the matrix is determined according to the physical size of the target space and the preset spatial resolution.
[0023] See Figure 3 In one embodiment of the present invention, the edge aggregation node loads a preset illumination reference table from local memory. The illumination reference table is stored in key-value pairs, where the key is the functional mode identifier of the target space, and the value is the standard light intensity value. The standard light intensity value is a preset integer constant representing the ambient light intensity expected to be achieved in the corresponding functional mode. The edge aggregation node traverses each spatial coordinate point in the ambient illumination matrix, extracts the current ambient light intensity value of the spatial coordinate point, and stores the ambient light intensity value in the binary tuple of the corresponding element in the ambient illumination matrix. The extraction operation is completed through matrix indexing. The difference between the ambient light intensity value and the standard light intensity value is calculated. The difference is used as the brightness deviation scalar of the spatial coordinate point. The brightness deviation scalar is a signed integer, where a positive value indicates that the ambient light intensity is lower than the standard, and a negative value indicates that the ambient light intensity is higher than the standard. Simultaneously, the brightness gradient between adjacent coordinate points in the ambient illumination matrix is analyzed. The brightness gradient is obtained by calculating the absolute value of the difference between the current coordinate point and the ambient light intensity values of the six adjacent points (up, down, left, right, front, and back). The brightness deviation scalar and the calculated three-dimensional brightness gradient are combined into a four-dimensional vector, which is the brightness deviation vector of the spatial coordinate point.
[0024] In specific implementation, a threshold filtering operation is performed on the brightness deviation vector of all calculated spatial coordinate points. This threshold filtering operation is based on a set dead zone, which is a non-negative integer threshold. The absolute value of each dimension of the brightness deviation vector is compared with the set dead zone, and deviation components with absolute values lower than the set dead zone are eliminated, with the values of these components set to zero. Based on the magnitude of the remaining deviation components, the required brightness compensation coefficient is calculated. The brightness compensation coefficient is a positive real number. In some embodiments, the brightness compensation coefficient... The magnitude of the brightness deviation vector after threshold filtering is determined by the following formula: Where: symbol This represents the brightness compensation coefficient to be determined, with the sign... This represents a preset system gain constant, with the symbol... This represents the brightness deviation vector after threshold filtering, with the symbol... Representing vectors The Euclidean norm, symbol Indicates the standard luminous intensity value. Luminous compensation coefficient. This will be used to calculate the target brightness value that will ultimately be sent to the lighting terminal.
[0025] In practice, the edge aggregation node generates a control frame at the application layer of the IoT protocol stack. The payload field of the control frame contains multiple subfields, which are filled with the calculated brightness compensation coefficient. The result of multiplying the control frame with the target brightness value read from the illumination reference table is the final brightness value that the lighting terminal is required to achieve, as instructed. In practice, the edge aggregation node encapsulates the complete control frame into a message queue in the IoT protocol stack's transport layer. The message queue follows a first-in, first-out (FIFO) principle, but the transition duration parameter is set as the highest priority field in the message queue; messages with high priority are scheduled for transmission first. Essentially, the edge aggregation node continuously monitors the channel status of the IoT protocol stack's physical layer. Once the physical layer confirms that the wireless channel is idle, it sends the encapsulated control frame, containing the high-priority transition duration parameter, to the corresponding specific lighting terminal via the physical layer's radio frequency module.
[0026] In one embodiment of the present invention, the lighting terminal receives a brightness adjustment command sent by an edge aggregation node via a wireless communication module. The microcontroller unit of the lighting terminal parses the brightness adjustment command and extracts the target brightness value and transition duration parameter encoded in the command. In specific implementations, the target brightness value is a numerical value representing the desired luminous intensity, such as an integer ranging from 0 to 4095, and the transition duration parameter is a numerical value representing the total time of brightness change, typically in milliseconds. The microcontroller unit reads the operating current value in the current driving circuit of the lighting terminal, which is obtained by sampling the voltage across the current sensing resistor by the analog-to-digital converter. It can be understood that the microcontroller unit calculates the algebraic difference between the desired driving current corresponding to the target brightness value and the current operating current value; the absolute value of the algebraic difference is the total current change required to reach the target brightness value.
[0027] In practical implementation, the microcontroller divides the transition duration parameter into several discrete time steps, based on a fixed step length base. The number of time steps is equal to the transition duration parameter divided by the step length base and rounded up. The current increment corresponding to each time step is calculated; this current increment is a uniformly or non-uniformly distributed current change. In some embodiments, the current increment... The calculation formula is: Where: symbol This represents the current increment corresponding to each time step, with the symbol... This represents the calculated total change in current, with the symbol... This represents the total number of discrete time steps in the partition. ,in Indicates the transition duration parameter. This indicates the preset time step duration. In practice, the microcontroller adjusts the duty cycle of the pulse width modulation (PWM) signal output to the LED driver circuit sequentially according to the calculated current increment for each time step. By changing the duty cycle of the PWM signal, the average drive current is linearly adjusted. Each duty cycle adjustment generates a current step, and the current steps for all time steps are connected sequentially to form a stepped drive current curve. Optionally, the frequency of the PWM signal is fixed, and the adjustment accuracy of the duty cycle is determined by the timer resolution of the microcontroller.
[0028] In specific implementations, at the end of each time step, the microcontroller triggers the photoelectric sensor built into the primary lighting terminal to detect the actual luminous intensity. The actual luminous intensity is converted into a digital reading and compared with the expected luminous intensity based on the current driving current. It can be understood that the microcontroller determines whether the actual luminous intensity reading deviates from the expected value. The criterion for deviation is whether the absolute value of the difference between the actual reading and the expected value exceeds a preset tolerance threshold. In some embodiments, if the actual luminous intensity deviates from the expected value, the microcontroller uses a proportional adjustment algorithm to fine-tune the current increment for the next time step based on the direction and magnitude of the deviation. This fine-tuning is achieved by modifying the height of the next current step to ensure that the final luminous intensity smoothly and accurately converges to the level corresponding to the target brightness value.
[0029] In one embodiment of the present invention, after the lighting terminal completes the current adjustment for the last time step, the microcontroller immediately triggers the built-in photoelectric sensor to perform a high-precision sampling. The photoelectric sensor converts the sensed light intensity into an analog voltage signal. In a specific implementation, the analog voltage signal is converted into a raw digital light intensity reading by an analog-to-digital converter. The raw digital light intensity reading may drift due to changes in the temperature of the sensor chip. Optionally, temperature drift correction is performed on the digital light intensity reading. The correction process is based on the temperature-voltage characteristic parameters provided in the photoelectric sensor datasheet, and compensates for the temperature effect through a lookup table method or a calculation method. The correction formula used in the calculation method is as follows: Where: symbol Indicates the corrected digital light intensity reading, symbol This represents the raw digital light intensity reading acquired by the analog-to-digital converter, denoted by [symbol]. The temperature drift coefficient of a photoelectric sensor is represented by the symbol [symbol missing]. This indicates the ambient temperature sensor value read by the microcontroller during this sampling process, with the symbol... This indicates the reference temperature value used for sensor factory calibration. Temperature drift correction ensures the accuracy of the feedback data.
[0030] In some embodiments, the lighting terminal generates a feedback message containing specific data fields assembled according to a preset communication protocol format. See Table 1 for an example of the field structure of the feedback message.
[0031] Table 1: Field Structure Table of Feedback Message In practical implementation, the lighting terminal utilizes the self-organizing network routing protocol of the wireless lighting mesh to send the assembled feedback message to the edge aggregation node via unicast. The self-organizing network routing protocol is based on a distance-vector algorithm, and each lighting terminal maintains a routing table. The feedback message is forwarded hop-by-hop until it reaches the edge aggregation node, which acts as the aggregation node. The edge aggregation node uses the received actual light intensity data to correct the ambient illumination matrix, forming a closed-loop control feedback dataset. After receiving the feedback message, the edge aggregation node parses the address identifier field and queries the device topology mapping table based on the address identifier field to locate the corresponding three-dimensional spatial coordinates of the lighting terminal in the ambient illumination matrix. Essentially, the edge aggregation node replaces the original light intensity value of the corresponding coordinate point in the ambient illumination matrix with the digital light intensity reading from the feedback message, completing the real-time update of the data for that point.
[0032] In practice, the edge aggregation node checks the data timestamps of all coordinate points in the ambient lighting matrix. These timestamps are recorded in the metadata of each element in the matrix. The edge aggregation node compares the current system time with each data timestamp, discarding outdated data whose time difference exceeds a set validity period. This validity period is, for example, five seconds; data exceeding five seconds is marked as invalid and excluded from the current calculation. In some embodiments, the edge aggregation node packages the updated ambient lighting matrix (after removing outdated data) with the brightness deviation vector used to trigger the adjustment. The two are associated with a common transaction identifier. The packaged data forms an independent record entry, which is appended to a dedicated local circular buffer or database table. This structured collection constitutes the feedback dataset for closed-loop control.
[0033] See Figure 4 This is a graph showing the relationship between the drive current curve and the light intensity feedback, intuitively reflecting the closed-loop control effect of a smooth transition from command issuance to actual brightness. The linear curve of the smoothly rising target drive current represents the ideal current target issued by the system. The actual drive current closely follows the target drive current curve, with slight fluctuations, representing the actual current value executed by the terminal. The actual light intensity feedback is highly synchronized with the current curve, with slightly larger fluctuations, representing the light intensity data collected and corrected by the photoelectric sensor. All three curves rise smoothly in a step-like manner, conforming to the design of "adjusting the drive current curve according to the transition time parameter" in the patent, avoiding sudden changes in brightness. The deviation between the actual drive current and the target current remains within ±5mA, indicating that the terminal has high response accuracy to control commands and good control stability. By comparing the target and actual curves, the response speed, accuracy, and stability of the control algorithm can be quantitatively evaluated.
[0034] In one embodiment of the present invention, the edge aggregation node initiates a data compression operation when a set upload period is met or when the capacity of the locally stored feedback dataset reaches a predetermined threshold. The upload period is, for example, set to thirty minutes, and the capacity threshold is, for example, set to one hundred records. In a specific implementation, the data compression operation employs a lossless encoding algorithm, such as Huffman coding of the recurring brightness deviation vector values in the feedback dataset and differential coding of the timestamp information. The compressed feedback dataset forms a binary data packet. The edge aggregation node transmits the compressed feedback dataset to a cloud policy engine located on a cloud server via a cellular network link, such as a 4G or 5G mobile communication module. The transmission control protocol ensures reliable data delivery during the transmission process.
[0035] In practical implementation, after receiving the compressed feedback dataset, the cloud strategy engine first performs a decompression operation to restore the original data structure. The cloud strategy engine then retrieves the historical feedback dataset of the controlled target space corresponding to the edge aggregation node of the currently uploaded feedback data. This historical feedback dataset is stored in a time-series database in the cloud and is indexed using the unique identifier of the target space. Essentially, the cloud strategy engine aligns and overlays the decompressed latest feedback dataset with the retrieved historical feedback dataset on the timeline. The timeline alignment is based on the timestamp of the adjusted transaction, arranging records belonging to the same functional mode and similar time periods in chronological order to form an extended time-series data set. In some embodiments, the cloud strategy engine analyzes the overlaid extended time-series data set, statistically analyzing the distribution characteristics of the brightness deviation vectors of all records under the same functional mode. These statistical distribution characteristics include the mean, standard deviation, and confidence interval of each dimension of the brightness deviation vector. Optionally, based on the statistical distribution characteristics, the value range of the standard light intensity value for the corresponding functional mode in the illumination reference table is dynamically adjusted. The adjustment rule can be expressed by the following formula: Where: symbol Indicates the updated standard light intensity value, symbol This represents the original standard luminous intensity value in the illumination reference table, with the symbol... This represents a preset learning rate coefficient, with the symbol... The function represents the arithmetic mean of the scalar components of brightness deviation in the superimposed dataset. For the sign function, the function For the function that takes the minimum value, the symbol is... The standard deviation of the scalar component of the brightness deviation is represented by the sign. This represents a preset deviation range constraint coefficient. The cloud-based policy engine generates an updated lighting reference table based on this rule, which includes the corrected standard light intensity values.
[0036] In implementation, the cloud-based policy engine generates a configuration update transaction. This transaction is a structured data object containing an incrementing version number verification and the updated illumination baseline table body. The cloud-based policy engine broadcasts this transaction to all edge aggregation nodes registered in the network with the target space identifier corresponding to the current feedback dataset via a push service, such as a service based on a message queue telemetry transport protocol. It can be understood that edge aggregation nodes subscribe to configuration update topics related to the target space identifiers they manage upon initial registration. In some embodiments, upon receiving the configuration update transaction from the push service, the edge aggregation node immediately parses the version number verification, which is a monotonically increasing integer. The edge aggregation node verifies whether this version number verification is higher than the version number of the locally persistent illumination baseline table. If the verification passes, the edge aggregation node marks the locally stored old illumination baseline table file as invalid and loads the updated illumination baseline table body from the configuration update transaction into its memory cache. At the beginning of the next control loop, when the edge aggregation node needs to read the illumination reference table to compare the ambient illumination matrix, the edge aggregation node switches its data source and reads the standard light intensity value from the loaded updated illumination reference table memory cache to complete the online update of the strategy.
[0037] See Figure 5 This is a 3D distribution map of the ambient lighting matrix, intuitively presenting the spatial distribution of ambient light intensity within the target space. It serves as a visual representation of the "ambient lighting matrix" in IoT ambient lighting intelligent control. The curved surface, composed of multiple triangular facets, is the result of interpolating and completing the data collected from discrete lighting terminals, reflecting the continuous distribution of light intensity in space. The surface exhibits distinct "peaks" and "valleys," reflecting the actual layout of the lighting terminals in space and physical effects such as light attenuation and occlusion, perfectly corresponding to the "ambient lighting matrix with spatial coordinate attributes" in the patent. The smooth transition of the surface indicates that the system effectively estimates areas not directly covered by the terminals, verifying the feasibility of the "3D light intensity distribution point cloud interpolation completion" algorithm. Through 3D visualization, the rationality of the ambient lighting matrix can be quickly assessed, and locally overly bright / dark areas can be identified, providing a basis for threshold filtering of the "brightness deviation vector."
[0038] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. A method for intelligent control of ambient light brightness based on Internet of Things (IoT) technology, characterized in that, The method includes: A set of lighting terminals with unique address identifiers are installed in the target space, and the lighting terminals together constitute the wireless lighting grid of the target space; Through each lighting terminal in the wireless lighting grid, the original light intensity attenuation data and original color temperature offset data of the location are collected. Both the original light intensity attenuation data and the original color temperature offset data carry the corresponding terminal address identifier. The original light intensity attenuation data and the original color temperature offset data are aggregated into an edge aggregation node. The edge aggregation node is then grouped according to the terminal address identifier to generate an ambient lighting matrix with spatial coordinate attributes. The ambient lighting matrix is compared with a preset lighting reference table to calculate the brightness deviation vector of each spatial coordinate point; Based on the brightness deviation vector, a brightness adjustment command for a specific lighting terminal is initiated in an IoT protocol stack. The brightness adjustment command includes the target brightness value and transition duration parameters. After receiving the brightness adjustment command, the lighting terminal in the wireless lighting grid adjusts its own drive current curve according to the transition duration parameter to complete the smooth transition of brightness.
2. The ambient light brightness intelligent control method based on Internet of Things technology as described in claim 1, characterized in that, The original light intensity attenuation data and the original color temperature offset data are aggregated into an edge aggregation node. The edge aggregation node groups the data according to the terminal address identifier to generate an ambient lighting matrix with spatial coordinate attributes, including: The edge aggregation node listens to broadcast messages from the wireless lighting grid and extracts the original light intensity attenuation data and the original color temperature offset data from the messages. Parse the terminal address identifier in each data packet, and query a preset device topology mapping table based on the terminal address identifier to obtain the three-dimensional spatial coordinates of the lighting terminal during installation; By binding all the original light intensity attenuation data received at the same time with their corresponding three-dimensional spatial coordinates, a sparse three-dimensional light intensity distribution point cloud is constructed. The three-dimensional light intensity distribution point cloud is interpolated and completed to fill in the estimated light intensity values of the spatial areas not directly covered by the lighting terminal. The interpolated and completed three-dimensional light intensity distribution data is merged with the corresponding original color temperature offset data to generate the ambient lighting matrix.
3. The ambient light brightness intelligent control method based on Internet of Things technology as described in claim 2, characterized in that, The ambient lighting matrix is compared with a preset lighting reference table to calculate the brightness deviation vector for each spatial coordinate point, including: Read the standard light intensity value stored in the illumination reference table. The standard light intensity value is preset according to the functional mode of the target space. Traverse each spatial coordinate point in the ambient lighting matrix and extract the current ambient light intensity value of the spatial coordinate point; The difference between the ambient light intensity value and the standard light intensity value is calculated and used as the brightness deviation scalar of the spatial coordinate point; Simultaneously, the brightness gradient between adjacent coordinate points in the ambient illumination matrix is analyzed, and the brightness deviation scalar and the brightness gradient are combined to form the brightness deviation vector.
4. The ambient light brightness intelligent control method based on Internet of Things technology as described in claim 3, characterized in that, Based on the brightness deviation vector, a brightness adjustment command for a specific lighting terminal is initiated within an IoT protocol stack, including: Threshold filtering is applied to the brightness deviation vector to remove deviation components whose absolute value is lower than the set dead zone; Based on the magnitude of the remaining deviation components, the required brightness compensation coefficient is calculated, where the brightness compensation coefficient is a positive real number; A control frame is generated at the application layer of the IoT protocol stack, and the payload field of the control frame is filled with the product of the brightness compensation coefficient and the target brightness value; The control frame is encapsulated into a message queue in the transport layer, and the transition duration parameter is set to the highest priority field in the message queue. After the physical layer of the IoT protocol stack confirms that the channel is idle, the encapsulated control frame is sent to the corresponding lighting terminal.
5. The ambient light brightness intelligent control method based on Internet of Things technology as described in claim 4, characterized in that, After receiving the brightness adjustment command, the lighting terminals in the wireless lighting grid adjust their own drive current curves according to the transition duration parameter, including: The microcontroller unit of the lighting terminal parses the brightness adjustment command and extracts the target brightness value and transition duration parameters; Read the current operating current value of the lighting terminal and calculate the total current change required to reach the target brightness value; The transition duration parameter is divided into several discrete time steps, and the current increment corresponding to each time step is calculated. The duty cycle of the pulse width modulation signal is adjusted sequentially according to the current increment to generate a stepped drive current curve. At the end of each time step, the actual luminous intensity is detected. If the actual luminous intensity deviates from the expected value, the current increment for the next time step is finely adjusted.
6. The ambient light brightness intelligent control method based on Internet of Things technology as described in claim 5, characterized in that, Also includes: After completing the brightness adjustment, the lighting terminal collects the current actual light intensity data again and feeds it back to the edge aggregation node; The edge aggregation node uses the actual light intensity data to correct the ambient lighting matrix, forming a feedback dataset for closed-loop control. The feedback dataset is uploaded to the cloud policy engine, which then updates the parameter mapping relationship in the illumination baseline table by combining the historical feedback dataset. The cloud-based policy engine sends the updated lighting reference table to the edge aggregation node, replacing the original lighting reference table and completing one round of control loop. After completing the brightness adjustment, the lighting terminal collects the current actual light intensity data again and feeds it back to the edge aggregation node, including: After completing the current adjustment for the last time step, the lighting terminal immediately activates its built-in photoelectric sensor to perform a sampling. The sampled analog voltage signal is converted into a digital light intensity reading, and the digital light intensity reading is corrected for temperature drift. Generate a feedback message, which includes the address identifier of the lighting terminal, the corrected digital light intensity reading, and the sequence number of this adjustment; The feedback message is unicast to the edge aggregation node using the self-organizing network routing protocol of the wireless lighting mesh.
7. The ambient light brightness intelligent control method based on Internet of Things technology as described in claim 6, characterized in that, The edge aggregation node uses the actual light intensity data to correct the ambient lighting matrix, forming a feedback dataset for closed-loop control, including: After receiving the feedback message, the edge aggregation node locates the corresponding coordinate point in the ambient lighting matrix based on the address identifier therein; Replace the original value of the corresponding coordinate point in the ambient illumination matrix with the digital light intensity reading in the feedback message; Check the data timestamps of all coordinate points in the ambient lighting matrix and remove outdated data that has exceeded the set validity period; The updated ambient lighting matrix and the brightness deviation vector used in this adjustment are packaged together and associated into an independent record entry, which is then stored in the feedback dataset.
8. The intelligent brightness control method for ambient lights based on Internet of Things technology as described in claim 7, characterized in that, The feedback dataset is uploaded to the cloud-based policy engine, which then updates the parameter mapping relationships in the illumination baseline table based on the historical feedback dataset, including: The edge aggregation node initiates data compression when the set upload cycle is met or when the feedback dataset capacity reaches a threshold. The compressed feedback dataset is transmitted to the cloud-based policy engine via a cellular network link; The cloud strategy engine retrieves the historical feedback dataset of the controlled target space corresponding to the edge aggregation node of the current uploaded feedback data, and aligns and overlays the compressed feedback dataset with the historical feedback dataset on the time axis. Analyze the statistical distribution characteristics of the brightness deviation vector under the same functional mode in the superimposed dataset; Based on the statistical distribution characteristics, the range of standard light intensity values in the illumination reference table is dynamically adjusted to generate an updated illumination reference table.
9. The ambient light brightness intelligent control method based on Internet of Things technology as described in claim 8, characterized in that, The cloud-based policy engine distributes the updated illumination reference table to the edge aggregation nodes, replacing the original illumination reference table, including: The cloud-based policy engine generates a configuration update transaction, which includes version number verification information and the updated illumination baseline table body. The configuration update transaction is broadcast to all edge aggregation nodes that have registered the target space identifier corresponding to the current feedback dataset via message push service; After receiving the configuration update transaction, the edge aggregation node verifies whether the version number verification information is higher than the version number stored locally. If the verification passes, the local lighting reference table is marked as invalid, and the updated lighting reference table is loaded into the memory cache. At the beginning of the next control loop, the edge aggregation node switches its data source and begins calculations using the lighting reference table loaded in the memory cache.
10. An intelligent control system for ambient light brightness based on Internet of Things (IoT) technology, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the ambient light brightness intelligent control method based on Internet of Things technology as described in any one of claims 1 to 9.