A smart lighting control method, system, program product and storage medium

By sending clock calibration requests regularly in the intelligent lighting system and calculating the load status index, the problem of lighting equipment responses is solved in cross-regional linkage scenarios, and lower response delay and higher synergy are achieved.

CN119277613BActive Publication Date: 2025-05-23ZHUHAI HAIKANG ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411715626.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-05-23
Estimated Expiration
2044-11-27

AI Technical Summary

Technical Problem

In cross-regional linkage scenarios, the existing intelligent lighting systems are not synchronized due to the congestion of TCP/IP communication links and the complex network topology of the network, which affects the visual experience of the lighting scene.

Method used

By sending clock calibration requests regularly and recording multiple time points, the network delay of each lighting controller is accurately calculated, and the controller is grouped according to the physical distance, and the controller with the smallest delay is selected as the clock source in the group for clock calibration. At the same time, the load status index is calculated and the control range is dynamically adjusted to balance the load of each controller.

Benefits of technology

It reduces the timing difference between controllers, reduces the response delay during cross-region scene switching, solves the problem of lighting out-synchronization, and improves the coordination and visual experience of the lighting system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119277613B_ABST
    Figure CN119277613B_ABST
Patent Text Reader

Abstract

The present application provides a smart lighting control method, system, program product and storage medium, which relate to the field of lighting control technology. By regularly sending clock calibration requests and recording multiple time points, the network delay of each lighting controller can be accurately calculated. When the network delay exceeds the threshold, the system will group the controllers according to the physical distance, and select the controller with the smallest delay as the clock source in the group to achieve accurate calibration within the group. At the same time, the load of each controller can be balanced by calculating the load state index and dynamically adjusting the control range. This hierarchical clock synchronization mechanism combined with the load balancing strategy reduces the timing differences between controllers, reduces the response delay when switching scenes across regions, and solves the problem of lighting asynchrony.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of lighting control technology, and in particular to an intelligent lighting control method, system, program product and storage medium. Background Art

[0002] In modern large-scale office buildings, intelligent lighting systems have become an important infrastructure for improving the quality of office environment and energy management efficiency. Such buildings need to realize cross-regional linkage scenes such as sunset gradient and emergency evacuation. Sunset gradient can help employees gradually adapt to the changes of day and night and improve work comfort; emergency evacuation scenes need to quickly guide people to evacuate safely in emergencies. These scenes put forward extremely high requirements on the accuracy and coordination of lighting control.

[0003] The current intelligent lighting system generally uses rail-type lighting controllers, which build network topology through TCP / IP communication. Each controller is equipped with an independent clock module and control processing unit, which is responsible for executing the preset control strategy. After receiving the scene command issued by the system, the controller first parses the command into specific control parameters, and then drives the lighting equipment it manages to complete the corresponding dimming or switching actions according to the timing node of the built-in clock. The overall coordination of the system is maintained through regular status broadcasts between the regional controllers.

[0004] However, in actual operation, when a large number of controllers process cross-region linkage commands at the same time, the TCP / IP communication link will experience channel congestion. Due to the complex network topology, the command transmission paths and processing delays of different controllers are different. Even the dimming response time of lighting equipment in adjacent areas may differ by hundreds of milliseconds, resulting in obvious asynchrony in the overall lighting switching effect, which seriously affects the visual experience of the lighting scene. Summary of the invention

[0005] The present application provides a smart lighting control method, system, program product and storage medium for reducing response delays during cross-region scene switching and solving the problem of lighting asynchrony.

[0006] In a first aspect, the present application provides a smart lighting control method, comprising: upon receiving a lighting control instruction, sending a clock calibration request to a lighting controller at a preset time interval, the lighting control instruction including a target lighting parameter; receiving a response instruction replied by the lighting controller, the response instruction including the lighting controller recording a first moment of receiving the clock calibration request and a second moment of sending the response instruction; recording a third moment of sending the clock calibration request and a fourth moment of receiving the response instruction; calculating a network delay of each lighting controller according to the first moment, the second moment, the third moment, and the fourth moment; and in the case where any network delay is greater than a first preset threshold, arranging the lighting controllers to be connected according to the distance between the lighting controllers. The lighting controllers are divided into multiple calibration groups, each calibration group selects the lighting controller with the smallest network delay as the clock source within the group, and calibrates the clocks of other lighting controllers in the calibration group with the clock source within the group; the load state index of each lighting controller is calculated separately, and the load state index is obtained by the lighting controller multiplying the power value of each lighting device managed by it with the corresponding operation activity and summing them up; when the difference in load state indexes of adjacent lighting controllers is greater than a second preset threshold, part of the control range of the lighting controller with a relatively large load state index is divided to the lighting controller with a relatively small load state index; and each lighting controller is controlled according to the target lighting parameters to adjust the lighting state of its corresponding lighting device.

[0007] By adopting the above technical solution, the network delay of each lighting controller can be accurately calculated by regularly sending clock calibration requests and recording multiple time points. When the network delay exceeds the threshold, the system will group the controllers according to the physical distance and select the controller with the smallest delay as the clock source in the group to achieve accurate calibration within the group. At the same time, the load of each controller can be balanced by calculating the load state index and dynamically adjusting the control range. This hierarchical clock synchronization mechanism combined with the load balancing strategy reduces the timing differences between controllers, reduces the response delay when switching scenes across regions, and solves the problem of lighting asynchrony.

[0008] In combination with some embodiments of the first aspect, in some embodiments, after the step of allocating part of the control range of a lighting controller with a relatively large load state index to a lighting controller with a relatively small load state index, the method also includes: calculating the load state index difference between adjacent lighting controllers; multiplying the load state index difference by a preset proportional coefficient to obtain a buffer area width; establishing a buffer area of ​​the buffer area width between the control ranges of adjacent lighting controllers; obtaining target lighting parameters of adjacent lighting controllers; for each lighting device controlled by one lighting controller within the buffer area, calculating the shortest distance between it and the control range of another lighting controller; and using a linear interpolation algorithm to calculate the transition lighting parameters of each lighting device in the buffer area based on the shortest distance and the target lighting parameters, so that the transition lighting parameters gradually transition from the target lighting parameters of one lighting controller to the target lighting parameters of another lighting controller.

[0009] By adopting the above technical solution, the system establishes a dynamic buffer area between adjacent controllers. The width of the buffer area is adaptively determined by the load state difference. For the lighting equipment in the buffer area, a linear interpolation algorithm is used to calculate the transition lighting parameters so that the lighting effect can transition smoothly. This distance-based gradient processing mechanism ensures that there will be no sudden changes between lighting equipment managed by different controllers. Even in large-scale linkage scenarios, the entire lighting system can present a coherent and unified visual effect.

[0010] In combination with some embodiments of the first aspect, in some embodiments, after the step of calculating the transition lighting parameters of each lighting device in the buffer area using a linear interpolation algorithm based on the shortest distance and the target lighting parameters, the method also includes: collecting the actual lighting parameters of each lighting device in the buffer area; calculating the difference in actual lighting parameters between adjacent lighting devices in the buffer area; when the difference in actual lighting parameters is greater than a preset lighting threshold, increasing the buffer area width and reducing the gradient rate of the linear interpolation algorithm until the difference in actual lighting parameters is less than or equal to the preset lighting threshold.

[0011] By adopting the above technical solution, the system monitors the actual parameters of the lighting equipment in the buffer area in real time. When the lighting difference between adjacent devices exceeds the threshold, it automatically adjusts the buffer area width and gradient rate. This dynamic feedback mechanism can optimize the transition strategy according to the actual operating conditions, making the lighting gradient process more delicate and natural. At the same time, the system continues to adjust until the preset threshold requirements are met, ensuring the visual continuity and comfort of lighting switching.

[0012] In combination with some embodiments of the first aspect, in some embodiments, after the step of receiving the lighting control instruction, the method also includes: entering the lighting control instruction into a priority queue according to the start time and the end time; when there are multiple lighting control instructions in the priority queue at the same time, executing the lighting control instructions with higher priority first; for lighting control instructions of the same priority, executing them in order from shortest to longest execution time.

[0013] By adopting the above technical solution, lighting control instructions are included in the priority queue management, and the system can process multiple concurrent instructions in order according to time attributes and priorities. For instructions with the same priority, the instructions with shorter execution time are given priority. This strategy not only ensures timely response to high-priority scenes, but also improves the efficiency of instruction processing by sorting by execution time. The overall design improves the system's scheduling ability and response speed in complex scenarios.

[0014] In combination with some embodiments of the first aspect, in some embodiments, after the step of inputting the lighting control instructions into the priority queue according to the start time and the end time, the method also includes: when the number of lighting control instructions in the priority queue reaches the maximum number of instructions that can be accommodated, the priority queue is reordered according to the priority and execution time of the lighting control instructions, and the lighting control instructions with the longest execution time are removed from the priority queue; the maximum number of instructions that can be accommodated is inversely proportional to the number of lighting devices controlled by the lighting controller.

[0015] By adopting the above technical solutions, the system realizes dynamic adaptation of queue capacity and number of devices. When the number of instructions reaches the upper limit, the system reorders them by priority and execution time and removes the longest instructions. This mechanism avoids queue congestion and ensures that the controller can always maintain efficient instruction processing capabilities. At the same time, the inverse relationship between queue capacity and number of devices enables the controller to reasonably allocate computing resources according to its own load capacity.

[0016] In combination with some embodiments of the first aspect, in some embodiments, after the step of controlling each lighting controller to adjust the lighting state of its corresponding lighting device according to the target lighting parameter, the method also includes: monitoring the communication quality parameters of each lighting controller; when the communication quality parameter of the current lighting controller is lower than the first fault tolerance threshold, the current lighting controller synchronizes data with the adjacent lighting controllers in its calibration group, the current lighting controller being any lighting controller; when the communication quality parameter of the current lighting controller is lower than the second fault tolerance threshold, the adjacent lighting controllers take over the lighting devices controlled by the current lighting controller in turn according to their load state indexes, until the communication quality parameter of the current lighting controller is higher than or equal to the second fault tolerance threshold, and the second fault tolerance threshold is lower than the first fault tolerance threshold; when communication interruption of the current lighting controller is detected, the adjacent lighting controller takes over all lighting devices controlled by the current lighting controller.

[0017] By adopting the above technical solutions, the system has established a three-level fault-tolerant mechanism: when the communication quality drops to the first threshold, data synchronization is started; when it drops below the second threshold, control authority is gradually transferred; when communication is interrupted, full takeover occurs. This progressive fault-tolerant strategy, combined with the scheduling mechanism of the load state index, enables the system to smoothly transition in the face of communication failures, avoiding lighting interruptions caused by controller failures and improving system reliability.

[0018] In combination with some embodiments of the first aspect, in some embodiments, the network delay is half of the time difference between the fourth moment and the third moment minus the time difference between the second moment and the first moment.

[0019] By adopting the above technical solution, the network delay is calculated using four time points, which offsets the time difference in the round-trip communication process and obtains a more accurate one-way network delay value.

[0020] In a second aspect, the present application provides a smart lighting control system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and one or more processors call the computer instructions to enable the smart lighting control system to execute the method described in the first aspect and any possible implementation method of the first aspect.

[0021] In a third aspect, the present application provides a computer program product comprising instructions, which, when executed on a smart lighting control system, enables the smart lighting control system to execute the method described in the first aspect and any possible implementation of the first aspect.

[0022] In a fourth aspect, the present application provides a computer-readable storage medium comprising instructions, which, when executed on a smart lighting control system, enables the smart lighting control system to execute the method described in the first aspect and any possible implementation of the first aspect.

[0023] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:

[0024] 1. By regularly sending clock calibration requests and recording multiple time points, the network delay of each lighting controller can be accurately calculated. When the network delay exceeds the threshold, the system will group the controllers according to the physical distance and select the controller with the smallest delay as the clock source within the group to achieve accurate calibration within the group. At the same time, the load of each controller can be balanced by calculating the load state index and dynamically adjusting the control range. This hierarchical clock synchronization mechanism combined with the load balancing strategy reduces the timing differences between controllers, reduces the response delay when switching scenes across regions, and solves the problem of lighting asynchrony.

[0025] 2. The system establishes a dynamic buffer area between adjacent controllers. The width of the buffer area is adaptively determined by the load state difference. For lighting equipment in the buffer area, a linear interpolation algorithm is used to calculate the transition lighting parameters so that the lighting effect can transition smoothly. This distance-based gradient processing mechanism ensures that there will be no sudden changes between lighting equipment managed by different controllers. Even in large-scale linkage scenarios, the entire lighting system can present a coherent and unified visual effect.

[0026] 3. The system monitors the actual parameters of the lighting equipment in the buffer area in real time. When the lighting difference between adjacent equipment exceeds the threshold, it automatically adjusts the buffer area width and gradient rate. This dynamic feedback mechanism can optimize the transition strategy according to the actual operating conditions, making the lighting gradient process more delicate and natural. At the same time, the system continues to adjust until the preset threshold requirements are met, ensuring the visual continuity and comfort of lighting switching. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 This is a flow chart of the intelligent lighting control method in the embodiment of the present application;

[0028] Figure 2 is another flowchart of the intelligent lighting control method in an embodiment of the present application;

[0029] Figure 3 is another flowchart of the intelligent lighting control method in an embodiment of the present application;

[0030] Figure 4 is another flowchart of the intelligent lighting control method in an embodiment of the present application;

[0031] Figure 5 It is a schematic diagram of an exemplary hardware structure of the smart lighting control system in an embodiment of the present application. DETAILED DESCRIPTION

[0032] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to and includes any or all possible combinations of one or more listed items.

[0033] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0034] See also Figure 1 , Figure 1 This is a flow chart of the intelligent lighting control method in the embodiment of the present application;

[0035] S101, upon receiving a lighting control instruction, sending a clock calibration request to a lighting controller at a preset time interval, the lighting control instruction including a target lighting parameter;

[0036] Among them, the lighting control instruction represents the instruction information used to control the operation of the lighting system, including the target lighting parameters; the target lighting parameters refer to the operating state parameters that the lighting equipment is expected to achieve, such as specific values ​​such as brightness and color temperature.

[0037] When the intelligent lighting system receives a lighting control instruction to be executed, it needs to ensure that the clocks of each controller are synchronized to achieve accurate control of the lighting effect. In some embodiments, the system first parses the received lighting control instruction, extracts the target lighting parameters, and then sends a clock calibration request to all lighting controllers in the system in a cycle at a preset fixed time interval (such as 100ms). This regular calibration mechanism ensures that the clocks of each controller remain synchronized during the lighting control process.

[0038] S102, receiving a response instruction replied by the lighting controller, the response instruction including the lighting controller recording a first time of receiving the clock calibration request and a second time of sending the response instruction;

[0039] Among them, the response instruction represents the reply information of the lighting controller to the clock calibration request; the first moment refers to the precise time point when the lighting controller receives the calibration request; the second moment represents the precise time point when the lighting controller issues the response instruction; these time information are used for the subsequent calculation of network delay.

[0040] S103, recording a third time of sending the clock calibration request and a fourth time of receiving the response instruction;

[0041] The third moment indicates the precise time point when the clock calibration request is sent; the fourth moment indicates the precise time point when the response instruction is received;

[0042] S104, calculating the network delay of each lighting controller according to the first moment, the second moment, the third moment, and the fourth moment;

[0043] Among them, network delay refers to the time required for data to be transmitted over the network.

[0044] In some specific embodiments, the request transmission time (first moment - third moment) is calculated; the response transmission time (fourth moment - second moment) is calculated; the total transmission delay is calculated; the system processing time is compensated; and the average network delay is obtained, which is not limited here.

[0045] In some other specific embodiments, the network delay is half of the time difference between the fourth moment and the third moment minus the time difference between the second moment and the first moment.

[0046] It can be seen that using four time points to calculate the network delay offsets the time difference in the round-trip communication process and obtains a more accurate one-way network delay value.

[0047] S105. When any network delay is greater than a first preset threshold, the lighting controllers are divided into a plurality of calibration groups according to the distances between the lighting controllers. Each calibration group selects a lighting controller with the smallest network delay as a clock source within the group, and other lighting controllers within the calibration group perform clock calibration with the clock source within the group.

[0048] Among them, the first preset threshold represents the acceptable upper limit of network delay; the calibration group refers to a collection of lighting controllers with similar network characteristics; the clock source in the group represents the lighting controller used as the time reference; the distance between lighting controllers can be the physical distance or the number of network hops.

[0049] This step is triggered when an abnormal network delay is found, and is used to optimize the clock synchronization strategy. In some embodiments, the system first checks whether the network delay of each controller exceeds a preset threshold. If there is an over-limit situation, the controllers are grouped based on the distance information between them. Each group selects the controller with the best network performance as the clock source in the group, and other controllers perform local clock synchronization with this clock source, thereby improving synchronization efficiency and accuracy.

[0050] In some specific embodiments, the three-dimensional coordinate data of the lighting controllers are obtained, including the specific installation locations in the building. Based on these coordinate information, the actual distance between any two controllers is calculated using a three-dimensional space distance formula. The distance data between all controllers are organized into a distance matrix and stored in the system configuration database as a basis for subsequent grouping.

[0051] Set a reasonable distance threshold. Analyze the controller pairs in the distance matrix that are less than the threshold, and divide these controllers with close distances into the same initial group. For controllers at the group boundary, calculate their average distances to each adjacent group and divide them into the group with the closest distance. Each calibration group selects the lighting controller with the smallest network delay as the clock source within the group.

[0052] With the clock source controller as the center, establish the clock synchronization network topology within the group, configure the transmission parameters of the synchronization data, and start to perform regular clock synchronization operations.

[0053] It should be noted that, in the case where any of the network delays is not greater than the first preset threshold:

[0054] Select the controller with the smallest network delay from all lighting controllers as the global clock source. This global clock source will serve as the time base of the entire system and provide clock synchronization services for all other controllers.

[0055] All other lighting controllers are directly connected to the global clock source to establish a clock synchronization relationship, forming a star-shaped synchronization network topology. Each controller obtains time synchronization information directly from the global clock source.

[0056] According to the actual measured network delay, configure appropriate synchronization cycle and timeout parameters for each controller.

[0057] Activate the clock service function of the global clock source and start sending clock synchronization information to other controllers according to the configured synchronization period. After receiving the synchronization information, each controller adjusts the local clock according to the network delay compensation algorithm.

[0058] The time deviation between each controller and the global clock source is continuously monitored to ensure that the synchronization accuracy meets the system requirements. If the network delay of a controller is found to start to increase and exceed the preset threshold, the group calibration mechanism is triggered.

[0059] S106, respectively calculating the load state index of each lighting controller, where the load state index is obtained by multiplying the power value of each lighting device managed by the lighting controller by the corresponding operation activity and summing the results;

[0060] The load status index indicates the current load level of the lighting controller; the power value refers to the actual power consumption data of the lighting device; the operating activity indicates the frequency and intensity of use of the lighting device; and the management scope refers to all lighting devices controlled by a single lighting controller. In some embodiments, the system collects the operating data of all lighting devices managed by each lighting controller in real time, including real-time power consumption and usage. By multiplying the power of the device by its operating activity and summing them up, a comprehensive indicator reflecting the actual load level of the controller is obtained, which provides a basis for subsequent load balancing.

[0061] S107, when the difference in load state indexes between adjacent lighting controllers is greater than a second preset threshold, dividing part of the control range of the lighting controller with a relatively larger load state index to the lighting controller with a relatively smaller load state index;

[0062] Wherein, adjacent lighting controllers refer to controllers that are adjacent in physical location or network topology; the second preset threshold represents the upper limit of the load difference that triggers load balancing.

[0063] This step is triggered when a significant load imbalance is detected to optimize system resource allocation. In some embodiments, the system continuously monitors the difference in load state index between adjacent controllers, and when the difference exceeds a preset threshold, the load balancing mechanism is activated. By re-dividing part of the control range of the controller with a higher load and allocating it to the adjacent controller with a lower load, a dynamic balance of the system load is achieved.

[0064] In some specific embodiments, the load amount to be transferred is calculated based on the load state index difference between two adjacent controllers with higher load and lower load. For example, the load of controller A is 3000W·h, the load of controller B is 1000W·h, and the difference is 2000W·h. The theoretical optimal transfer load is about 1000W·h, so that the two controllers reach a balanced state of 2000W·h.

[0065] Analyze all lighting devices currently managed by the controller with high load, and evaluate the real-time power, location information and usage pattern of each device. Prioritize lighting devices that are close to the target controller, have appropriate power and relatively stable usage patterns, and select the most suitable set of devices for migration so that their total load is close to the target transfer load calculated in the first step.

[0066] Create a migration task description for the selected lighting device, including data such as device identification, current controller information, target controller information, device configuration parameters, and current operating status. According to the migration task description, execute the control transfer of the devices one by one. First, create the device configuration in the target controller, establish and verify the communication connection with the device. After confirming that the connection is normal, synchronize the current operating parameters and status information of the device to the target controller. Finally, notify the original controller to release the control of the device and complete the control transfer.

[0067] Monitor the actual load changes of the two controllers after the migration is completed. Collect the operating data of the migrated devices under the new controller to verify whether the control function is normal.

[0068] S108. Control each lighting controller to adjust the lighting state of its corresponding lighting device according to the target lighting parameter.

[0069] This step is performed after clock synchronization and load balancing are completed to achieve the ultimate goal of lighting control. In some embodiments, the system distributes the parsed target lighting parameters to each lighting controller, and the controller sends control commands to the lighting devices it manages through the communication protocol according to the parameter requirements to adjust the working status of the device and achieve the expected lighting effect.

[0070] It can be seen that by regularly sending clock calibration requests and recording multiple time points, the network delay of each lighting controller can be accurately calculated. When the network delay exceeds the threshold, the system will group the controllers according to the physical distance and select the controller with the smallest delay as the clock source in the group to achieve accurate calibration within the group. At the same time, by calculating the load state index and dynamically adjusting the control range, the load of each controller can be balanced. This hierarchical clock synchronization mechanism combined with the load balancing strategy reduces the timing differences between controllers, reduces the response delay when switching scenes across regions, and solves the problem of lighting asynchrony.

[0071] In actual use, when lighting devices managed by different lighting controllers adopt different target lighting parameters, sudden changes in lighting brightness or color temperature will occur at the boundary of the control range. This mutation not only affects the overall lighting effect and visual comfort, but will also be exacerbated as the difference in target lighting parameters of adjacent controllers increases.

[0072] See also Figure 2 , Figure 2 is another flowchart of the intelligent lighting control method in an embodiment of the present application;

[0073] Therefore, in some embodiments, step S107 further includes:

[0074] S201, calculating the load state index difference between adjacent lighting controllers;

[0075] The load state index difference refers to the difference in load state indexes of two adjacent lighting controllers;

[0076] After the system detects that the loads between lighting controllers are unbalanced and completes the initial load balancing adjustment, it is necessary to evaluate the actual load differences between adjacent controllers after the adjustment. In some embodiments, the system periodically obtains the real-time load status index of each lighting controller, calculates the load difference for any adjacent controller pair, and records the calculation results in the system database for subsequent buffer area planning.

[0077] In some embodiments, for each lighting device managed by the controller, its real-time power data and recent switch status records are collected, the operating activity of the device is calculated, the device power is multiplied by the operating activity to obtain the device load value, and finally the load values ​​of all devices managed by the controller are summed to obtain the load status index of the controller.

[0078] S202, multiplying the load state index difference by a preset proportionality coefficient to obtain a buffer area width;

[0079] Wherein, the preset proportional coefficient represents a conversion factor for converting the load difference into a physical distance; the buffer area width refers to the physical width of the transition area between the control ranges of two adjacent controllers;

[0080] After obtaining the load state index difference of adjacent controllers, this load difference needs to be converted into an actual physical buffer distance. In some embodiments, the system will pre-set an appropriate proportional coefficient based on the actual situation of the building and the lighting requirements, and determine a reasonable buffer area width by multiplying it with the load difference, so as to ensure a natural transition effect and avoid a buffer area that is too large to affect control efficiency.

[0081] S203, establishing a buffer area with a buffer area width between control ranges of adjacent lighting controllers;

[0082] In some embodiments, a buffer area of ​​a specified width is established at the management boundary of adjacent controllers, and the boundary coordinates and range information of the area are recorded in the system for subsequent lighting control and parameter calculation.

[0083] In some specific embodiments, based on the Cartesian coordinate system of the building plane, the starting and ending coordinates of the common boundary line segments of adjacent controllers are extracted, and their direction vectors and normal vectors are calculated. Then, the points on the boundary line are translated in the positive and negative directions of the normal vector by half the width of the buffer area, and arc transitions are added at the end points to avoid sharp corners, and finally the expanded point sets are connected to form the outline of the buffer area.

[0084] Use ordered point sets to describe the outer contour of the buffer area and establish a spatial index structure to generate a mathematical expression for spatial position judgment. Determine whether the lighting device is within the buffer area, calculate the shortest distance from the device to the boundary line in the area, and establish and store the data structure of the subordinate relationship between the device and the controller and the necessary parameter configuration information.

[0085] S204, obtaining target lighting parameters of adjacent lighting controllers;

[0086] Among them, the target lighting parameters refer to the lighting effect parameters that the corresponding controller specifically expects to achieve, including brightness, color temperature, etc.; the acquisition process means reading or receiving relevant parameter data from the control system;

[0087] In some embodiments, the system will obtain lighting control instructions and parameter settings of adjacent controllers in real time, including parameters such as target brightness and color temperature. These parameters will be used as the basis for calculating transition parameters of lighting equipment in the buffer area.

[0088] S205. For each lighting device controlled by one lighting controller in the buffer area, calculate the shortest distance between it and the control range of another lighting controller;

[0089] Among them, the shortest distance refers to the shortest straight-line distance from the lighting equipment in the buffer area to the control range boundary of the adjacent controller; the control range boundary represents the boundary line of the lighting controller management area.

[0090] After obtaining the target lighting parameters, it is necessary to determine the positional relationship of each lighting device in the buffer area. In some embodiments, the system obtains the spatial coordinates of all lighting devices in the buffer area and calculates their shortest distances to the boundaries of the control ranges of adjacent controllers. These distance values ​​will be used for subsequent lighting parameter interpolation calculations.

[0091] In some specific embodiments, in the Cartesian coordinate system of the building plane, the position coordinates and boundary segment parameters of the lighting equipment in the buffer area are extracted, and the perpendicular distance from the device to the boundary line is calculated by the normal vector to determine whether the foot of the perpendicular falls on the boundary segment. If it is not on the segment, the distance to the endpoint needs to be calculated and the minimum value is taken. Finally, the shortest distance value of the device is associated and stored in the data structure of the controller, which is not limited here.

[0092] In some specific embodiments, the device position is determined based on an established buffer area spatial index structure, and the distance from each device to the boundary is calculated using a pre-generated spatial position judgment mathematical expression. Meanwhile, the special case of the arc transition area is taken into consideration, and a shortest distance mapping relationship to the boundary point is established for each lighting device. These distance data are stored in association with the corresponding controller configuration information.

[0093] S206. Calculate transition lighting parameters of each lighting device in the buffer area using a linear interpolation algorithm based on the shortest distance and the target lighting parameters, so that the transition lighting parameters gradually transition from the target lighting parameters of one lighting controller to the target lighting parameters of another lighting controller.

[0094] Among them, the linear interpolation algorithm refers to a mathematical method for linear transition calculation of lighting parameters based on position; the transition lighting parameters represent the parameter values ​​that the lighting equipment in the buffer area should actually execute; and the gradual transition refers to the process in which the lighting parameters change smoothly from the target value of one controller to the target value of another controller.

[0095] After obtaining the distance data and target parameters, it is necessary to calculate appropriate transition parameters for each lighting device in the buffer area. In some embodiments, the system uses a linear interpolation algorithm to calculate the lighting parameters that should be executed at that location based on the distance ratio of the device to the boundary to ensure that the lighting effect in the entire buffer area can smoothly transition and avoid sudden changes.

[0096] In some specific embodiments, the relative position proportional coefficient is obtained based on the shortest distance from the lighting device to the boundary line divided by the total width of the buffer area. The coefficient is multiplied by the difference between the target lighting parameters of the two controllers, and then added to the target lighting parameters of the first controller to obtain the transition lighting parameters of the position. The calculated transition parameters are converted into control instructions executable by the device, sent to the corresponding lighting device, and the execution effect is monitored in real time to ensure that the entire buffer area presents a smooth lighting transition effect, which is not limited here.

[0097] In some specific embodiments, a smooth transition function based on an S-curve is constructed, the normalized position coefficient of the device in the buffer area is calculated, the position is mapped to a nonlinear weight value through a smooth function, and the weighted average of the two target parameters is calculated using the weight. The transition effect is optimized by adjusting the curve parameters to ensure the continuity of the lighting device execution parameters, and a real-time parameter update mechanism is established to respond to dynamic changes in the target value, which is not limited here.

[0098] It can be seen that the system has established a dynamic buffer area between adjacent controllers, and the width of the buffer area is adaptively determined by the load state difference. For the lighting equipment in the buffer area, a linear interpolation algorithm is used to calculate the transition lighting parameters so that the lighting effect can transition smoothly. This distance-based gradient processing mechanism ensures that there will be no sudden changes between lighting equipment managed by different controllers, and the entire lighting system can present a coherent and unified visual effect even in large-scale linkage scenarios.

[0099] S207, collecting actual lighting parameters of each lighting device in the buffer area;

[0100] The actual lighting parameters refer to the actual parameter values ​​of the lighting equipment during its current operation, including brightness value, color temperature value, power value, etc.

[0101] This step is performed after the lighting parameter transition calculation is completed and the corresponding control instructions are executed, and is used to verify the parameter transition effect. In some embodiments, by collecting the operating parameters of all lighting devices in the buffer area in real time, a parameter collection database is established to provide a data basis for subsequent difference calculation and threshold judgment. The collection process needs to consider the timeliness, accuracy and completeness of the data.

[0102] S208, calculating the difference in actual lighting parameters between adjacent lighting devices in the buffer area;

[0103] Among them, adjacent lighting devices refer to lighting devices that are close to each other in space; the actual lighting parameter difference refers to the numerical difference in the actual operating parameters between two adjacent devices.

[0104] This step is performed after the parameter collection is completed to evaluate the uniformity of the lighting transition effect. In some embodiments, based on the actual parameter data collected, the parameter difference between each pair of adjacent lighting devices in the buffer area is calculated, and a difference distribution matrix is ​​established to provide a basis for subsequent threshold judgment.

[0105] S209: When the difference of the actual lighting parameters is greater than the preset lighting threshold, increase the width of the buffer area and reduce the gradient rate of the linear interpolation algorithm until the difference of the actual lighting parameters is less than or equal to the preset lighting threshold.

[0106] This step is performed after the difference calculation is completed to dynamically optimize the transition effect. In some embodiments, by comparing the actual difference with the preset threshold, when the difference is too large, the transition effect is optimized by adjusting the buffer area width and the gradient rate until the threshold requirement is met. The adjustment process needs to consider the continuity and space limitations of the parameters.

[0107] It can be seen that the system monitors the actual parameters of the lighting equipment in the buffer area in real time. When the lighting difference between adjacent devices exceeds the threshold, it automatically adjusts the buffer area width and gradient rate. This dynamic feedback mechanism can optimize the transition strategy according to the actual operating conditions, making the lighting gradient process more delicate and natural. At the same time, the system continues to adjust until the preset threshold requirements are met, ensuring the visual continuity and comfort of lighting switching.

[0108] In actual use, when the control system receives multiple lighting control instructions at the same time, due to the lack of an instruction management mechanism based on the time dimension, execution confusion or conflicts are likely to occur, affecting the orderliness of lighting control.

[0109] See also Figure 3 , Figure 3 is another flowchart of the intelligent lighting control method in an embodiment of the present application;

[0110] In some embodiments, after step S101, the method further includes:

[0111] S301, input the lighting control instruction into the priority queue according to the start time and the end time;

[0112] The start time indicates the time when the lighting control instruction is expected to start executing; the deadline refers to the time point when the control instruction must end; the priority queue represents a data structure sorted by priority, which is used to manage and schedule control instructions.

[0113] This step is performed after the system receives the lighting control instruction, and is used to establish a timing management mechanism for the instruction. In some embodiments, the system parses the time information in the received lighting control instruction, sorts the instructions according to the time attribute and stores them in the priority queue to establish an ordered set of instructions to be executed. The storage process needs to maintain the timing and integrity of the queue to ensure that the instructions can be processed according to the time requirements.

[0114] S302: When there are multiple lighting control instructions in the priority queue at the same time, the lighting control instructions with higher priority are executed first;

[0115] The same time refers to time periods that overlap or intersect on the time axis.

[0116] This step is triggered when multiple instructions are found at the same time, and is used to resolve instruction execution conflicts. In some embodiments, the system detects time-overlapping instructions in the queue, compares their priority values, and allocates system resources to high-priority instructions first to ensure that important instructions can be executed in time. The processing process needs to consider the accuracy of priority judgment and the real-time nature of execution switching.

[0117] In some specific embodiments, a device classification method is adopted, and the priority of the device is the priority of the instruction. For example, the control equipment is divided into three levels: A / B / C, where Class A includes key equipment such as fire controllers and emergency controllers, Class B includes management equipment such as smart gateways and centralized controllers, and Class C includes common equipment such as control panels and sensors. The instruction priority is determined according to the level of the sending device, and high-priority instructions are executed.

[0118] S303: For lighting control instructions of the same priority, execute them in order of execution time from shortest to longest.

[0119] This step is performed when multiple instructions of the same priority are found to optimize instruction processing efficiency. In some embodiments, the system performs a duration analysis on instructions of the same priority, sorts them from short to long execution time, and prioritizes instructions with short execution time to improve the system's task processing efficiency.

[0120] It can be seen that by incorporating lighting control instructions into priority queue management, the system can process multiple concurrent instructions in order according to time attributes and priorities. For instructions with the same priority, instructions with shorter execution time are given priority. This strategy not only ensures timely response to high-priority scenarios, but also improves instruction processing efficiency by sorting execution time. The overall design improves the system's scheduling capabilities and response speed in complex scenarios.

[0121] During actual use, users may frequently input lighting control commands, or multiple control devices may send commands at the same time, causing the system to frequently process and switch lighting states, which may easily cause frequent fluctuations in lighting effects and affect user experience.

[0122] S304. When the number of lighting control instructions in the priority queue reaches the maximum number of instructions that can be accommodated, the priority queue is reordered according to the priority and execution time of the lighting control instructions, and the lighting control instructions with the longest execution time are removed from the priority queue; the maximum number of instructions that can be accommodated is inversely proportional to the number of lighting devices controlled by the lighting controller.

[0123] The number of instructions refers to the number of lighting control instructions currently stored in the priority queue; the maximum number of instructions that can be accommodated refers to the maximum number of instructions that the priority queue can store.

[0124] In some embodiments, the system monitors the number of instructions in the queue in real time. When the number reaches a threshold, the system reorders the instructions by comprehensively considering the priority and execution time of the instructions to ensure that important and efficient instructions are retained. For the instructions with the longest execution time, considering that they occupy system resources for a long time and may affect the timely execution of other instructions, they are removed from the queue. At the same time, the system dynamically adjusts the maximum capacity of the queue according to the number of lighting devices currently controlled. The more devices there are, the smaller the queue capacity is set to ensure the real-time control response.

[0125] It can be seen that the system realizes dynamic adaptation of queue capacity and number of devices. When the number of instructions reaches the upper limit, the system reorders them by priority and execution time and removes the longest instructions. This mechanism avoids queue congestion and ensures that the controller can always maintain efficient instruction processing capabilities. At the same time, the inverse relationship between queue capacity and number of devices enables the controller to reasonably allocate computing resources according to its own load capacity.

[0126] See also Figure 4 , Figure 4 is another flowchart of the intelligent lighting control method in an embodiment of the present application;

[0127] In some embodiments, after step S108, the method further includes:

[0128] S401, monitoring the communication quality parameters of each lighting controller;

[0129] Among them, communication quality parameters refer to indicators that reflect the communication status of the lighting controller, such as communication delay, packet loss rate, signal strength, etc.

[0130] In some embodiments, the system periodically collects communication indicator data of each lighting controller, including but not limited to signal strength, response time, data transmission success rate and other parameters, and evaluates the communication quality of the controller by comprehensively analyzing these parameters to provide a decision-making basis for subsequent fault-tolerant processing.

[0131] S402: When the communication quality parameter of the current lighting controller is lower than the first fault tolerance threshold, the current lighting controller synchronizes data with an adjacent lighting controller in the calibration group to which it belongs, the current lighting controller being any lighting controller;

[0132] This step is performed when the controller communication quality is detected to be degraded, to ensure the reliability of the control data. In some embodiments, the system compares the communication quality parameter of the controller with a preset first fault tolerance threshold. When it is lower than the threshold, a data synchronization mechanism with an adjacent controller is triggered, including synchronization of current control instructions, device status, control parameters and other information, to ensure that the adjacent controller has the ability to take over when the communication quality further deteriorates.

[0133] S403: When the communication quality parameter of the current lighting controller is lower than the second fault tolerance threshold, the adjacent lighting controllers take over the lighting devices controlled by the current lighting controller in turn according to their load state indexes until the communication quality parameter of the current lighting controller is higher than or equal to the second fault tolerance threshold, and the second fault tolerance threshold is lower than the first fault tolerance threshold;

[0134] This step is performed when the communication quality of the controller is seriously degraded, and is used to achieve a smooth transition of the control function. In some embodiments, when the communication quality is lower than the second fault tolerance threshold, the system calculates the load state index of the adjacent controller, and gradually transfers the lighting equipment of the current controller to the adjacent controller in order from low to high load. When the communication quality returns to above the threshold, the equipment transfer is stopped to ensure the continuous and stable operation of the system.

[0135] S404: When it is detected that the communication of the current lighting controller is interrupted, the adjacent lighting controller takes over all lighting devices controlled by the current lighting controller.

[0136] This step is performed when the controller communication is completely interrupted to ensure the continuous operation of the lighting system. In some embodiments, after the system detects that the controller communication is completely interrupted, it immediately activates the emergency takeover mechanism to transfer all lighting devices of the controller as a whole to the adjacent controller to ensure that the lighting control function will not be interrupted due to the failure of a single controller.

[0137] It can be seen that the system has established a three-level fault-tolerance mechanism: when the communication quality drops to the first threshold, data synchronization is started; when it is lower than the second threshold, control authority is gradually transferred; when communication is interrupted, full takeover occurs. This progressive fault-tolerance strategy, combined with the scheduling mechanism of the load state index, enables the system to smoothly transition in the face of communication failures, avoids lighting interruptions caused by controller failure, and improves system reliability.

[0138] The following introduces an exemplary smart lighting control system 500 provided in an embodiment of the present application. Figure 5 It is a schematic diagram of an exemplary hardware structure of the smart lighting control system 500 provided in an embodiment of the present application.

[0139] In some embodiments, the smart lighting control system 500 is a computer device or the smart lighting control system 500 includes a computer device. The computer device includes a processor, a memory and a network interface connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data. The network interface of the computer device is used to communicate with other external terminals or servers through a network connection. In some embodiments, the network interface can be a wired network interface, and in some embodiments, the network interface can also be a wireless network interface. When the computer program is executed by the processor, the method in the embodiment of the present application is implemented.

[0140] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0141] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0142] As used in the above embodiments, the term "when..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrases "upon determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "upon detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)", depending on the context.

[0143] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.

[0144] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

Claims

1. A smart lighting control method, characterized in that: include: sending a clock calibration request to the lighting controller at a preset time interval upon receiving a lighting control instruction, wherein the lighting control instruction includes a target lighting parameter; receiving a response instruction replied by the lighting controller, wherein the response instruction includes a first time when the lighting controller records receiving the clock calibration request and a second time when the response instruction is sent; Recording a third time of sending the clock calibration request and a fourth time of receiving the response instruction; The network delay of each lighting controller is calculated according to the first moment, the second moment, the third moment, and the fourth moment; the network delay is one half of the time difference between the fourth moment and the third moment minus the time difference between the second moment and the first moment; In the case where any of the network delays is greater than a first preset threshold, the lighting controllers are divided into a plurality of calibration groups according to the distances between the lighting controllers, each calibration group selects the lighting controller with the smallest network delay as the clock source within the group, and performs clock calibration on the other lighting controllers in the group with the clock source within the group; Calculating the load state index of each lighting controller respectively, wherein the load state index is obtained by multiplying the power value of each lighting device managed by the lighting controller by the corresponding operation activity and summing the results; The operation activity is the frequency and intensity of use of the lighting equipment; When the difference in the load state indexes of adjacent lighting controllers is greater than a second preset threshold, part of the control range of the lighting controller with a relatively larger load state index is allocated to the lighting controller with a relatively smaller load state index; and each lighting controller is controlled to adjust the lighting state of its corresponding lighting device according to the target lighting parameters.

2. The method according to claim 1, characterized in that: After the step of allocating part of the control range of the lighting controller having a relatively large load state index to the lighting controller having a relatively small load state index, the method further includes: Calculating the load state index difference between adjacent lighting controllers; Multiplying the load state index difference by a preset proportionality coefficient to obtain a buffer area width; Establishing a buffer area of ​​the buffer area width between control ranges of adjacent lighting controllers; Acquire target lighting parameters of the adjacent lighting controller; For each lighting device controlled by one lighting controller in the buffer area, calculating the shortest distance between the lighting device and the control range of another lighting controller; According to the shortest distance and the target lighting parameters, a linear interpolation algorithm is used to calculate the transition lighting parameters of each lighting device in the buffer area, so that the transition lighting parameters gradually transition from the target lighting parameters of one lighting controller to the target lighting parameters of another lighting controller.

3. The method according to claim 2, characterized in that After the step of calculating the transition lighting parameters of each lighting device in the buffer area using a linear interpolation algorithm according to the shortest distance and the target lighting parameters, the method further includes: Collecting actual lighting parameters of each of the lighting devices in the buffer area; Calculating the difference of the actual lighting parameters between adjacent lighting devices in the buffer area; When the difference of the actual lighting parameters is greater than the preset lighting threshold, the buffer area width is increased and the gradient rate of the linear interpolation algorithm is reduced until the difference of the actual lighting parameters is less than or equal to the preset lighting threshold.

4. The method according to claim 1, characterized in that After the step of receiving the lighting control instruction, the method further comprises: Input the lighting control instruction into a priority queue according to a start time and an end time; When there are multiple lighting control instructions in the priority queue at the same time, the lighting control instructions with higher priority are executed first; The lighting control instructions of the same priority are executed in order from shortest execution time to longest execution time.

5. The method according to claim 4, characterized in that After the step of inputting the lighting control instruction into a priority queue according to the start time and the end time, the method further includes: When the number of lighting control instructions in the priority queue reaches the maximum number of instructions that can be accommodated, the priority queue is reordered according to the priority and execution time of the lighting control instructions, and the lighting control instructions with the longest execution time are removed from the priority queue; the maximum number of instructions that can be accommodated is inversely proportional to the number of lighting devices controlled by the lighting controller.

6. The method according to claim 1, characterized in that After the step of controlling each lighting controller to adjust the lighting state of its corresponding lighting device according to the target lighting parameter, the method further includes: monitoring communication quality parameters of each of the lighting controllers; When the communication quality parameter of the current lighting controller is lower than the first fault tolerance threshold, the current lighting controller performs data synchronization with the adjacent lighting controller in the calibration group to which it belongs, and the current lighting controller is any lighting controller; when the communication quality parameter of the current lighting controller is lower than the second fault tolerance threshold, the adjacent lighting controllers take over the lighting equipment controlled by the current lighting controller in turn according to their load state indexes, until the communication quality parameter of the current lighting controller is higher than or equal to the second fault tolerance threshold, and the second fault tolerance threshold is lower than the first fault tolerance threshold; When it is detected that the communication of the current lighting controller is interrupted, the adjacent lighting controller takes over all lighting devices controlled by the current lighting controller.

7. The method according to claim 1, characterized in that The network delay is one half of the time difference between the fourth moment and the third moment minus the time difference between the second moment and the first moment.

8. A smart lighting control system, characterized in that: The smart lighting control system includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the smart lighting control system to execute the method described in any one of claims 1-7.

9. A computer program product comprising instructions, characterized in that When the computer program product runs on a smart lighting control system, the smart lighting control system executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium comprising instructions, characterized in that: When the instruction is executed on a smart lighting control system, the smart lighting control system executes the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Smart city lighting ecological system

    CN110708808A

  • Intelligent Lighting System

    US20170257935A1