A lamp automation marshalling method and device, electronic equipment and storage medium
By acquiring the sensor data of the lamps and calculating the associated feature vectors and costs, and combining grouping parameters and planning algorithms, the automated grouping of lamps in the intelligent lighting system is realized, which solves the problems of time-consuming, labor-intensive and costly in the existing technology, and improves efficiency and system flexibility.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- E SURFING IOT CO LTD
- Filing Date
- 2024-10-21
- Publication Date
- 2026-06-02
AI Technical Summary
In existing intelligent lighting systems, the process of numbering and grouping lamps is time-consuming and labor-intensive, indoor positioning terminals are costly, and manual screening is inefficient, resulting in high implementation costs and low efficiency.
By acquiring the sensing data of all lamps in the target area, calculating the correlation feature vector and correlation feature cost between every two lamps, and combining the preset grouping parameters for automatic grouping, the grouping is optimized using dynamic programming and greedy algorithms to achieve intelligent management of lamps.
Without relying on the location of the luminaires, it enables automatic grouping and intelligent management of luminaires, reduces implementation costs, improves efficiency, enhances the flexibility and scalability of the lighting system, and optimizes the lighting experience and energy consumption.
Smart Images

Figure CN119497286B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology, and in particular to an automated grouping method, apparatus, electronic device, and storage medium for lighting fixtures. Background Technology
[0002] Energy-saving renovations typically involve installing a smart lighting system to intelligently control lighting and achieve energy savings. However, a current issue with smart lighting systems is that to improve the lighting experience, reduce energy consumption, and facilitate management, light fixtures need to be numbered and grouped. This process is time-consuming and labor-intensive, requiring repeated verification of each fixture's location on a map, and this aspect accounts for a significant portion of the implementation cost. While using indoor positioning devices to obtain the location of light fixtures can also achieve automatic grouping, the cost of indoor positioning terminals is too high, and manually screening and registering light fixture locations for coding is extremely inefficient. Summary of the Invention
[0003] This invention proposes a method, apparatus, electronic device, and storage medium for automated grouping of lighting fixtures, aiming to at least partially solve one of the technical problems in related technologies. The embodiments of this invention can conveniently realize automated grouping of lighting fixtures.
[0004] On one hand, embodiments of the present invention provide an automated grouping method for lighting fixtures, including:
[0005] Acquire sensing data of all lights within the target area for a preset period of time;
[0006] The sensing data includes the lamp identifier and sensing time for each lamp; the sensing time represents the moment when the lamp is activated and illuminated within a preset period.
[0007] Iterate through the sensing data of all lamps to obtain the correlation feature vector between every two lamps;
[0008] The associated feature vector includes the number of times the second lamp illuminates the first lamp within a preset time window corresponding to the first lamp; the preset time range is determined based on the sensing time of the first lamp.
[0009] The associated feature cost between each pair of lamps is obtained by organizing the associated feature vectors.
[0010] Based on the associated feature cost, and combined with preset grouping parameters, all lamps are grouped to obtain lamp groups.
[0011] Optionally, the sensing data of all lamps is traversed to obtain the correlation feature vector between every two lamps, including the following steps:
[0012] Organize all the lights in the target area into a light fixture set;
[0013] Take one lamp from the lamp collection and designate it as the first lamp;
[0014] All other lamps within the target area besides the first lamp are designated as the second lamps.
[0015] Based on the processing of the sensing data, the number of times each second lamp is illuminated within each time window within the preset time range corresponding to the first lamp is obtained, and the correlation feature vector between the first lamp and each second lamp is obtained;
[0016] The next luminaire in the luminaire set is designated as the first luminaire. The process then returns to the previous step of designating all other luminaires in the target area as second luminaires, until the associated feature vector between every two luminaires in the target area is obtained.
[0017] Optionally, based on the sensor data, the number of times each second lamp illuminates within a preset time window corresponding to the first lamp is obtained, and the association feature vector between the first lamp and each second lamp is obtained, including the following steps:
[0018] Initialize the associated feature component tables of the first lamp and each second lamp in sequence;
[0019] Among them, the horizontal axis of the associated feature component table corresponds to each time window of the preset time range, and the vertical axis of the associated feature component table corresponds to the number of sensing times.
[0020] Based on the lamp identifier of the first lamp, obtain all the sensing times of the first lamp from the sensing data;
[0021] All sensing data are iterated and judged. When the sensing time of the second lamp is within the target time window corresponding to the sensing time of the first lamp in the preset time range, the sensing count corresponding to the target time window of the corresponding associated feature component table is incremented according to the lamp identifier of the second lamp.
[0022] Until all sensing data has been traversed, the associated feature vector between the first lamp and each second lamp is obtained according to the associated feature component table.
[0023] Optionally, the associated feature vector includes multiple components, each corresponding to the number of times the light is illuminated within a time window; the associated feature cost between each pair of lights is obtained based on the associated feature vector, including the following steps:
[0024] The average value is obtained by averaging all components of the associated feature vector.
[0025] Based on the average value, a pre-defined standardization operation is performed on all components of the associated feature vector to obtain the first component corresponding to each component;
[0026] The first fraction is obtained by summing all the first components.
[0027] Each first component is multiplied by a preset time weight to obtain the second component corresponding to each component;
[0028] Among them, the time weight is positively correlated with the sequence number of the time window in which the component is located;
[0029] The second fraction is obtained by summing all the second components.
[0030] The third score is obtained by summing the first score and the first parameter, and the associated feature cost is obtained by summing the ratio of the second score and the third score with the penalty function.
[0031] The value of the penalty function is determined based on the range of values within which the average value falls.
[0032] Optionally, based on the associated feature cost and combined with preset grouping parameters, all lamps are grouped to obtain lamp groups, including the following steps:
[0033] The number of groups is determined based on the grouping parameters, and the original groups are initialized to the required number.
[0034] The sum of squared costs for each luminaire is obtained by summing the squared costs of each luminaire's associated features with all other luminaires.
[0035] The lamps with the largest sum of squared costs are assigned as the first lamps in each original group. Then, with the goal of minimizing the total cost of all original groups, the remaining lamps are assigned to each original group using a pre-defined planning algorithm to obtain the final lamp grouping.
[0036] The total cost score for each group is obtained by summing the cost scores of all groups; the cost score for each group is obtained by summing the sum of the squares of the costs of all lamps included in the group and the equilibrium function, the value of which is determined by the number of lamps in the group; the planning algorithms include dynamic programming and greedy algorithms.
[0037] Optionally, the method further includes the following steps:
[0038] The lighting fixtures are grouped and iteratively optimized based on the sum of squared costs.
[0039] Optionally, the luminaire grouping is iteratively optimized based on the sum of squared costs, including the following steps:
[0040] Select the first number of groups from the lighting fixture groups as the optimized group; the first number is 1 less than the number of lighting fixture groups.
[0041] The first luminaire in the optimized group is retained, and all other luminaires are removed and redistributed.
[0042] Initialize an empty optimization group, and take a lamp from the reassigned lamps as the first lamp of the optimization group;
[0043] With the goal of minimizing the total cost of all optimized groups, the remaining redistributed lights are assigned to each optimized group using a pre-defined planning algorithm to obtain the target group.
[0044] If the total cost score of the target group is lower than the total cost score of the lighting group, output the target group; otherwise, increment the iteration count by 1 and return to the step of arbitrarily selecting the first number of groups from the lighting group as the optimization group, until the iteration count exceeds the preset iteration threshold.
[0045] The number of iterations is initialized to 0.
[0046] On the other hand, embodiments of the present invention provide an automated lamp grouping device, comprising:
[0047] The first module is used to acquire the sensing data of all lights in the target area within a preset period.
[0048] The sensing data includes the lamp identifier and sensing time for each lamp; the sensing time represents the moment when the lamp is activated and illuminated within a preset period.
[0049] The second module is used to traverse the sensing data of all lamps and obtain the correlation feature vector between every two lamps;
[0050] The associated feature vector includes the number of times the second lamp illuminates the first lamp within a preset time window corresponding to the first lamp; the preset time range is determined based on the sensing time of the first lamp.
[0051] The third module is used to obtain the associated feature cost between each pair of lamps based on the associated feature vector.
[0052] The fourth module is used to group all lamps based on the associated feature cost and in combination with preset grouping parameters to obtain lamp groups.
[0053] Optionally, the device further includes:
[0054] The fifth module is used for iterative optimization of lighting fixture grouping based on the sum of squared costs.
[0055] On the other hand, embodiments of the present invention provide an electronic device, including: a processor and a memory; the memory is used to store a program; the processor executes the program to implement the above-described automated grouping method for lamps.
[0056] On the other hand, embodiments of the present invention provide a computer storage medium storing a processor-executable program, which, when executed by a processor, is used to implement the above-described automated grouping method for lighting fixtures.
[0057] This invention acquires sensing data of all lamps within a target area over a preset period. The sensing data includes the lamp identifier and sensing time for each lamp. The sensing time represents the moment a lamp illuminates within the preset period. The sensing data of all lamps is traversed to obtain a correlation feature vector between each pair of lamps. This correlation feature vector includes the number of times the second lamp illuminates within each time window of the preset time range corresponding to the first lamp. The preset time range is determined based on the sensing time of the first lamp. The correlation feature vector is used to calculate the correlation feature cost between each pair of lamps. Based on the correlation feature cost and preset grouping parameters, all lamps are grouped to obtain lamp groups. This invention offers the following advantages: By collecting and analyzing the sensing data of lamps, and then constructing correlation features between each lamp, the invention enables automatic grouping and intelligent management of lamps without relying on lamp location. This effectively solves the problems of high cost and low efficiency in lamp numbering and grouping in the prior art, while enhancing the flexibility and scalability of the lighting system, optimizing the lighting experience, and reducing energy consumption. Attached Figure Description
[0058] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation on the technical solutions of the present invention.
[0059] Figure 1 This is a schematic diagram of an implementation environment for automated grouping of lighting fixtures provided in an embodiment of the present invention;
[0060] Figure 2 A flowchart illustrating an automated grouping method for lighting fixtures provided in an embodiment of the present invention;
[0061] Figure 3 A schematic diagram illustrating an example of associated feature vector data provided in an embodiment of the present invention;
[0062] Figure 4 A schematic diagram illustrating data examples for each stage of calculating the associated feature cost provided in an embodiment of the present invention;
[0063] Figure 5 This is a schematic diagram illustrating an example of a relative cost list for two lamps provided in an embodiment of the present invention;
[0064] Figure 6This is a schematic diagram of an extended process for the automated grouping method for lighting fixtures provided in an embodiment of the present invention;
[0065] Figure 7 This is a schematic diagram of the system architecture for implementing the automated grouping method for lighting fixtures, provided in an embodiment of the present invention.
[0066] Figure 8 This is a schematic diagram illustrating the specific application process logic of the automated lamp grouping method provided in this embodiment of the invention.
[0067] Figure 9 This is a schematic diagram of the structure of an automated lamp grouping device provided in an embodiment of the present invention;
[0068] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0069] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0070] It should be noted that although functional modules are divided in the system diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100," "second / S200," etc., in the specification, claims, and the aforementioned figures are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0071] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0072] To facilitate understanding of the technical solution of this invention, the proprietary technical features that may be applied to the technical solution of this invention will first be explained:
[0073] Intelligent lighting system: Intelligent lighting system is a lighting control system that uses advanced electromagnetic voltage regulation and electronic induction technology to improve the extra power consumption caused by unbalanced loads in lighting circuits, improve the power factor, reduce the operating temperature of lamps and circuits, and achieve the purpose of optimizing power supply.
[0074] It is understood that the automated grouping method for lighting fixtures provided in this embodiment of the invention can be applied to any computer device with data processing and computing capabilities, and this computer device can be various types of terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal can be a smartphone, tablet computer, laptop computer, or desktop computer, but it is not limited to these.
[0075] like Figure 1 The diagram shown is a schematic representation of an implementation environment provided by an embodiment of the present invention. (Refer to...) Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected via a network, either wirelessly or via a wired connection, to complete data transmission and exchange.
[0076] Server 101 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0077] Additionally, server 101 can also be a node server in a blockchain network. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms.
[0078] Terminal 102 can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. Terminal 102 and server 101 can be directly or indirectly connected via wired or wireless communication, and this embodiment of the invention does not impose any limitations.
[0079] Exemplary based on Figure 1 The implementation environment shown in this embodiment of the invention provides an automated grouping method for lighting fixtures. The following description uses the application of this automated grouping method for lighting fixtures in terminal 102 as an example. It can be understood that this automated grouping method for lighting fixtures can also be applied to server 101.
[0080] Reference Figure 2 , Figure 2 This is a flowchart illustrating an automated lighting fixture grouping method applied to a terminal, provided by an embodiment of the present invention. The executing entity of this automated lighting fixture grouping method can be any of the aforementioned computer devices (including servers or terminals). (Refer to...) Figure 2 The method includes the following steps:
[0081] S100: Obtain the sensing data of all lights in the target area within a preset period;
[0082] The sensing data includes the lamp identifier and sensing time for each lamp; the sensing time represents the moment when the lamp is activated and illuminated within a preset period.
[0083] For example, in some specific implementations, the lighting fixture sensing trigger data D from a recent period (i.e., a preset period, such as one week or five days) can be mined and processed according to subsequent procedures. Each data entry in D only needs to include the triggering terminal identifier (i.e., lighting fixture identifier) and the triggering time (i.e., sensing time).
[0084] S200: Traverse the sensing data of all lamps to obtain the correlation feature vector between every two lamps;
[0085] The associated feature vector includes the number of times the second lamp illuminates the first lamp within a preset time window corresponding to the first lamp; the preset time range is determined based on the sensing time of the first lamp.
[0086] It should be noted that in some embodiments, step S200 may include the following steps: organizing all lamps in the target area into a lamp set; taking one lamp from the lamp set as a first lamp; taking the other lamps in the target area other than the first lamp as second lamps; based on the sensing data, organizing the number of times each second lamp and the first lamp are illuminated in each time window within a preset time range, and obtaining the association feature vector between the first lamp and each second lamp; taking the next lamp in the lamp set as the first lamp, and returning to execute the step of taking the other lamps in the target area other than the first lamp as second lamps, until the association feature vector between every two lamps in the target area is obtained.
[0087] In some embodiments, the number of times each second lamp illuminates within a preset time window corresponding to the first lamp is obtained based on the sensor data, and the association feature vector between the first lamp and each second lamp is obtained. This can include the following steps: sequentially initializing the association feature component table between the first lamp and each second lamp; wherein the horizontal axis of the association feature component table corresponds to each time window within the preset time range, and the vertical axis of the association feature component table corresponds to the number of times of illumination; obtaining all the sensing times of the first lamp from the sensor data based on the lamp identifier of the first lamp; traversing and judging all the sensing data, when there is a second lamp whose sensing time falls within a target time window within the preset time range corresponding to the sensing time of the first lamp, incrementing the number of times of illumination corresponding to the target time window of the corresponding association feature component table according to the lamp identifier of the second lamp; until all the sensing data has been traversed, the association feature vector between the first lamp and each second lamp is obtained according to the association feature component table.
[0088] For example, in some specific embodiments, based on the aforementioned acquired sensing data, the sensing feature vector (i.e., the correlation feature vector) between every two lamps is first calculated, which can be implemented as follows:
[0089] a) Given a start time Tstart, typically -0.5 seconds (adjustable adaptively based on actual needs). Given an end time Tend, typically 25 seconds (adjustable adaptively based on actual needs). Given a window length w, typically 0.1 seconds. For every two lights, initialize a feature vector with a length of (Tend - Tstart) / w, all with a value of 0.
[0090] b) Take out a sensing data d in sequence, including the lamp identifier did and the sensing time dt. For each lamp sensing trigger data d2 in the time period from dt+Tstart to dt+Tend (i.e., the preset time range), if its lamp identifier is not equal to did, then add one to the k-th component of the vector between lamp did and d2id, where d2id is the lamp identifier of d2, k = (d2t - dt - Tstart) / w, and d2t is the sensing time of d2.
[0091] Optionally, in some specific application scenarios, a segment of sensor trigger data can be acquired first. Each data segment has only two values: the sensor terminal ID, such as "38 3B 26FD 77EC", and the sensing time, such as 1720516042079, which is a UTC timestamp accurate to milliseconds. Given parameters Tstart = -0.4, Tend = 30, w = 0.2. For each sensor trigger, such as "38 3B 26FD77EC / 1720516042079", for all other terminal sensor triggers within the time window from 1720516042079 + (-0.4 * 1000) to 1720516042079 + (30 * 1000), the number of times each terminal senses the sensor trigger is counted in a small window of 0.2 seconds. Note that the number of sense triggers from different terminals are not added together. Finally, the feature vectors of each pair of terminals are obtained. See attached. Figure 3 As shown, among the 2714 sensing events for “38 3B26FD 77EC”, the number of sensing events for “383B 26FD 77 32” was counted in a small window of 0.2 seconds, occurring between -0.4 seconds and 30 seconds.
[0092] S300. Based on the association feature vector, the association feature cost between each pair of lamps is obtained;
[0093] It should be noted that the associated feature vector includes multiple components, each corresponding to the number of times the illumination occurs within a time window. In some embodiments, step S300 may include the following steps: averaging all components of the associated feature vector to obtain an average value; performing a preset standardization operation on all components of the associated feature vector based on the average value to obtain a first component corresponding to each component; summing all first components to obtain a first score; multiplying each first component by a preset time weight to obtain a second component corresponding to each component; wherein the time weight is positively correlated with the sequence number of the time window in which the component is located; summing all second components to obtain a second score; summing the first score with a first parameter to obtain a third score; and summing the ratio of the second score and the third score with a penalty function to obtain the associated feature cost; wherein the value of the penalty function is determined based on the numerical range of the average value.
[0094] For example, in some specific implementations, the feature cost (i.e., the cost of associated features) for every two lamps is further calculated based on the associated feature vector:
[0095] a) For every two luminaires, calculate the average value avg of the full components of their eigenvectors.
[0096] b) For every two lamps, subtract wt from each component of its feature vector. wt is typically 0.9 multiplied by avg.
[0097] c) For every two lamps, change all components of their eigenvector that are less than 0 to 0.
[0098] d) For every two luminaires, multiply all components of their eigenvectors by themselves. The normalization operation includes steps b), c), and d).
[0099] e) For every two lamps, sum all components of their characteristic vectors to obtain S1 (i.e., the first fraction).
[0100] f) For every two lamps, multiply each component of their feature vector by a time weight. The time weight of the nth component is (Tstart + w * (n + 0.5)), where n starts from 0.
[0101] g) For every two lamps, sum all components of their characteristic vectors to obtain S2 (i.e., the second fraction).
[0102] h) For every two lamps, calculate their Cost as S2 / (S1+0.01)+P1(avg,amin,amax). Here, 0.01 is the first parameter, and the specific value can be adjusted adaptively according to actual needs. S1+0.01 is the third score.
[0103] i) Here, amin and amax are two thresholds, typically amin = 0.5 and amax = 2. P1 is a penalty function used to reduce the weight of accidental adjacent triggering between unrelated light fixtures. The execution logic of the penalty function is as follows:
[0104] 1. P1(avg, amin, amax) = cmax, where avg <= amin, and cmax is a threshold, typically 6;
[0105] 2. P1(avg, amin, amax) = cmin, where avg >= amax, and cmin is a threshold, typically 1.5;
[0106] 3.P1(avg,amin,amax)=(avg-amin)*cmax+(amax-avg)*cmin, when amax>avg>amin.
[0107] Optionally, in some specific application scenarios, for example, the attached... Figure 3 The eigenvector is calculated, and the average value of its components is 14.15. Then, 14.15 * 0.9 = 12.74 is subtracted from each component. Negative components are set to 0, each component is multiplied by itself, and then multiplied by the time window weight. (See attached diagram.) Figure 4As shown, the final sum multiplied by the time weight is 121483.42, and the sum multiplied by itself is 44641.85, which gives 2.73. Since the average value of each component, 14.15, exceeds 2, the penalty function P1(avg, amin, amax) is 0, resulting in a final Cost of 2.73. The penalty function is used when the average value is too small, meaning the number of triggers is too few to be easily determined. In such cases, random interference is likely to occur, so the Cost is increased based on the penalty function to enhance the robustness of the algorithm.
[0108] S400. Based on the associated feature cost, and combined with the preset grouping parameters, all lamps are grouped to obtain lamp groups.
[0109] It should be noted that in some embodiments, step S400 may include the following steps: determining the number of groups based on grouping parameters, and initializing the original groups of the number of groups; obtaining the cost sum of each lamp based on the sum of the squares of the associated feature costs of each lamp and all other lamps; sequentially assigning the lamps in the group with the largest cost sum of the number of groups as the first lamps in each original group, and then, with the goal of minimizing the total cost score of all original groups, allocating the remaining lamps to each original group through a preset planning algorithm to obtain the final lamp groups; wherein, the total cost score of the groups is obtained by summing the cost scores of all groups; the cost score of the groups is obtained by summing the sum of the cost sums of all lamps included in the group and the equilibrium function, and the value of the equilibrium function is determined based on the number of lamps in the group; the planning algorithm includes dynamic programming algorithm and greedy algorithm.
[0110] For example, in some specific embodiments, the grouping of lamps can be achieved as follows:
[0111] a) Users can specify that an average group contains approximately C lights. If the user has no special requirements, C is generally equal to 4 / 5 / 6. The required number of groups can be calculated by dividing the total number of lights by C. In some specific scenarios, if the number of groups is less than 2, the method should be terminated.
[0112] b) For each luminaire, calculate the sum of squares of its cost with all other luminaires, and take the luminaire with the largest sum of squares and put it into the first group.
[0113] c) For lamps that have not yet been placed into any group, take out the lamps with the largest sum of squares and place them into the next group.
[0114] d) Repeat the previous step until all groups have a light fixture.
[0115] e) Use dynamic programming or the greedy algorithm to place the lamps that have not been put into any group into a certain group, so that the total Cost of all groups (i.e., the total grouping cost score) is the lowest. The calculation method of the Cost of each group (i.e., the grouping cost score) is referred to the subsequent process.
[0116] f) Assume that the lamps in the group are L0, L1, …… Ln. Then the group Cost = where is the Cost between lamp L0 and Li in the previous step. P2 is a function on the non - negative integer domain (i.e., the balancing function), which is used to balance the number of lamps in each group to avoid a large disparity in the number of lamps between groups. An optional function is shown as follows.
[0117] 1. P2(n) = μ(n - C)*(n - C), when n < C - 1 or n > C + 1, where μ is a constant, generally 1.5 (can be adaptively adjusted according to actual requirements);
[0118] 2. P2(n) = 0, when C - 1 ≤ n ≤ C + 1.
[0119] Optionally, in some specific application scenarios, after calculating the relative Cost of every two lamps, start to search for a grouping method that makes the sum of the group Costs of all groups the smallest. The group Cost is the sum of the squares of the relative Costs between the first lamp in the group and other lamps plus the penalty function. Taking "38 3B 26FD 77EC" as the first lamp in the group, it is appropriate to put the lamps with relatively small relative Costs with it into the same group. For Figure 5 example, starting from the second row on the left side of the figure are the relative Costs of other lamps and "38 3B 26FD 77EC". As shown in the third row of the figure, "38 3B 26FD 77 32 / 2.73" means that the Cost between "38 3B 26FD 77 32" and "38 3B 26FD77EC" is 2.73. Then the Costs of "38 3B 26F8 41 69" and "38 3B 26F8 3D 93" are relatively small, which are 1.43 and 0.84 respectively, and are suitable to be put into this group. On the contrary, the Costs of "38 3B 26F8 3F DE" and "38 3B 26F8 41 5C" with "383B 26FD 77EC" are as high as 7.48 and 10.5, and are not suitable to be in the same group with "38 3B 26FD 77EC". The penalty function is to prevent the number of lamps in a group from being too many or too few, resulting in a too large gap in the number of lamps between groups, which is inconvenient for users to operate.
[0120] Assuming there are 1, 2, 3...40 lights that need to be divided into 9 groups, to find the grouping method that minimizes the group cost, we first initialize a grouping scheme. The initialization method is to select the 9 lights with relatively high costs as the first light in each group, let's say 1, 2, 3...9, thus establishing the required 9 groups. Then, using a dynamic programming algorithm, the other lights (10, 11, 12...40) are placed into the 9 groups to minimize the total cost. When the numerical data is readily available, the corresponding grouping operations can be directly implemented using existing dynamic programming algorithms; the algorithm implementation logic will not be elaborated further.
[0121] In some preferred embodiments, such as Figure 6 As shown, the method may also include the following steps: S500, iterative optimization processing of the lamp grouping based on the sum of squared costs.
[0122] It should be noted that in some embodiments, step S500 may include the following steps: arbitrarily selecting a first number of groups from the lamp groups as optimized groups; the first number is 1 less than the number of lamp groups; retaining the first lamp in the optimized group and removing all other lamps for redistribution; initializing an empty optimized group, and obtaining one lamp from the redistributed lamps as the first lamp in the optimized group; using the lowest total group cost score of all optimized groups as the planning objective, allocating the remaining redistributed lamps to each optimized group through a preset planning algorithm to obtain the target group; when the total group cost score of the target group is lower than the total group cost score of the lamp groups, outputting the target group; otherwise, incrementing the iteration count by 1 and returning to execute the step of arbitrarily selecting a first number of groups from the lamp groups as optimized groups, until the iteration count exceeds a preset iteration threshold; wherein, the iteration count is initialized to 0.
[0123] For example, in some specific implementations, the grouping can also be iteratively optimized, with each iteration finding a scheme from each of the following options that has a lower total cost than the sum of the costs of all existing groups:
[0124] a) Randomly select G-1 groups from the existing G groups, and put the first lamp of each of these G-1 groups into the first G-1 groups of the new scheme.
[0125] b) Select one more lamp from the remaining lamps and put it into the Gth group.
[0126] c) Using dynamic programming or a greedy algorithm, add the light fixtures that have not yet been added to any group to a certain group, so that the total cost of all groups is minimized. The cost calculation method for each group is as in step 3.
[0127] d) If the number of iterations exceeds the threshold or there is no better solution, stop the iteration and output the existing solution.
[0128] Optionally, in some specific application scenarios, taking the aforementioned 9 groups as an example, the iterative approach is to keep the first lamp of the existing 8 groups unchanged. If replacing the first lamp of one group with another lamp can lower the total cost, then iterate on the new scheme. For example, replace 3 with 25, and then regroup all lamps that are not the first lamp of any group (i.e., 3, 10, 11, 12...24, 26, 27...40) using dynamic normalization. If the total cost is lower, then iterate on the scheme. If replacing the first lamp of any group with another lamp and regrouping dynamically normalizes the group, the total cost cannot be lowered, then the iteration stops. To prevent the search from taking too long, the number of iterations can be limited.
[0129] To explain in detail the principle of the technical solution of the present invention, the overall process of the present invention will be described below with reference to some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and should not be regarded as a limitation of the present invention.
[0130] First, it's important to clarify that sensing terminals, such as infrared sensors and microwave radar, are devices that detect people, vehicles, or other moving objects. Lighting terminals refer to LED lights and similar fixtures. Each sensing terminal has several associated lighting terminals; once a sensing terminal detects a target object, it triggers the associated lighting terminals to illuminate. Typically, a sensing terminal and a lighting terminal are integrated together for convenient power supply, with the sensing terminal triggering the lighting terminal via a signal line.
[0131] Once the sensor terminal detects a person, vehicle, or other object, it triggers a sensing event, activates the lighting terminal, and simultaneously reports the sensing trigger event to the lighting system. A sensing trigger event typically contains only two valid pieces of information: the lighting equipment identifier and the trigger time.
[0132] In view of the shortcomings of existing technologies, this invention provides a method for automated grouping of lighting fixtures based on sensor data. By mining historical sensor data, intelligent and automated grouping of lighting fixtures can be achieved without the need for location information. Figure 7 As shown, embodiments of the present invention can be based on Figure 7 The architecture shown includes a lighting terminal, a sensing terminal, a data aggregation terminal, and a data mining module. Figure 8 As shown, the process steps of the method of the present invention can be implemented as follows:
[0133] a) Obtain lighting sensor data over a period of time;
[0134] b) Calculate the induction characteristic vector between every two lamps;
[0135] c) Calculate the induction cost between every two light fixtures;
[0136] d) Select one light fixture from each group and place it inside;
[0137] e) Place the remaining light fixtures into a group to minimize the total cost;
[0138] f) Iterative search for grouping methods to reduce cost;
[0139] g) Output grouping scheme.
[0140] Specifically, the process logic of the method of the present invention can be implemented as follows:
[0141] The method of this invention first mines and processes the lighting fixture sensor trigger data D from a recent period (e.g., one week or five days) according to the following process. Each data entry in D only needs to contain the trigger terminal identifier and the trigger time. The subsequent execution steps are as follows:
[0142] 1) The first step is to calculate the induction characteristic vector between every two lamps:
[0143] a) Given a start time Tstart, typically -0.5 seconds. Given an end time Tend, typically 25 seconds. Given a window length w, typically 0.1 seconds. For every two lights, initialize a feature vector with a length of (Tend - Tstart) / w, all with a value of 0.
[0144] b) Take out a sensing data d in sequence, including the lamp identifier did and the sensing time dt. For each lamp sensing trigger data d2 in the time period from dt+Tstart to dt+Tend, if its lamp identifier is not equal to did, add one to the k-th component of the vector between lamp did and d2id, where d2id is the lamp identifier of d2, k = (d2t - dt - Tstart) / w, and d2t is the sensing time of d2.
[0145] 2) The second step is to calculate the characteristic cost for every two light fixtures:
[0146] a) For every two luminaires, calculate the average value avg of the full components of their eigenvectors.
[0147] b) For every two lamps, subtract wt from each component of its feature vector. wt is typically 0.9 multiplied by avg.
[0148] c) For every two lamps, change all components of their eigenvector that are less than 0 to 0.
[0149] d) For every two luminaires, multiply all components of their eigenvectors by themselves.
[0150] e) For every two lamps, sum all components of their eigenvectors to obtain S1.
[0151] f) For every two lamps, multiply each component of their feature vector by a time weight. The time weight of the nth component is (Tstart + w * (n + 0.5)), where n starts from 0.
[0152] g) For every two lamps, sum all components of their eigenvectors to obtain S2.
[0153] h) For every two lamps, calculate their Cost as S2 / (S1+0.01)+P1(avg,amin,amax).
[0154] i) Here, amin and amax are two thresholds, typically amin = 0.5 and amax = 2. P1 is a penalty function used to reduce the weight of accidental adjacent triggering between unrelated light fixtures. The execution logic of the penalty function is as follows:
[0155] 1. P1(avg, amin, amax) = cmax, where avg <= amin, and cmax is a threshold, typically 6;
[0156] 2. P1(avg, amin, amax) = cmin, where avg >= amax, and cmin is a threshold, typically 1.5;
[0157] 3.P1(avg,amin,amax)=(avg-amin)*cmax+(amax-avg)*cmin, when amax>avg>amin.
[0158] 3) The third step is to initialize each group:
[0159] a) Users can specify that an average group contains approximately C lights. If the user has no special requirements, C is generally equal to 4 / 5 / 6. The required number of groups can be calculated by dividing the total number of lights by C. In some specific scenarios, if the number of groups is less than 2, the method should be terminated.
[0160] b) For each luminaire, calculate the sum of squares of its cost with all other luminaires, and take the luminaire with the largest sum of squares and put it into the first group.
[0161] c) For luminaires that have not yet been placed into any group, calculate the sum of squares of their cost and that of luminaires that have already been placed into groups, and take out the luminaire with the largest sum of squares and place it into the next group.
[0162] d) Repeat the previous step until all groups have a light fixture.
[0163] e) Use dynamic programming or the greedy algorithm to place the lamps that have not been put into any group into a certain group, so that the total Cost of all groups is the lowest. The Cost calculation method for each group is as follows.
[0164] f) Assume that the lamps in the group are L0, L1, …… Ln, then the group Cost = where is the Cost of the lamp L0 and Li in the previous step. P2 is a function on the non - negative integer domain, used to balance the number of lamps in each group to avoid a large difference in the number of lamps between groups. An optional function is as follows:
[0165] 1. P2(n) = μ(n - C)*(n - C), when n < C - 1 or n > C + 1, where μ is a constant, usually 1.5;
[0166] 2. P2(n) = 0, when C - 1 ≤ n ≤ C + 1.
[0167] 4) The fourth step is to iteratively optimize the grouping. Each iteration finds a grouping with a lower total Cost of all groups than the existing grouping from each of the following scenarios:
[0168] a) Arbitrarily select G - 1 groups from the existing G groups, and put the first lamp of each of these G - 1 groups into the first G - 1 groups of the new plan.
[0169] b) Then select one lamp from the remaining lamps and put it into the Gth group.
[0170] c) Use dynamic programming or the greedy algorithm to place the lamps that have not been put into any group into a certain group, so that the total Cost of all groups is the lowest. The Cost calculation method for each group is as in the third step.
[0171] d) If the number of iterations exceeds the threshold or there is no better plan, stop the iteration and output the existing plan.
[0172] Optionally, in some specific application scenarios, taking the lighting system of a parking lot as an example, assume that there are more than two hundred lamp brackets in the parking lot, and there are three lamp tubes in each lamp bracket. The lamps in the same lamp bracket are either all on or all off, and can be regarded as one lamp
[0173] According to the previous implementation plan, the construction personnel need to get accurate drawings. Since it is an upgrade and renovation project, the parking lot has also changed somewhat over the past decade or so. So the user searched for a long time and only found drawings from a few years ago, and then went to the site for error correction. After a busy day, the drawings were given to the construction personnel.
[0174] 1) The construction personnel get the drawings, mark the lamps on them, ask the property management about the general flow of people and vehicles, design a grouping plan, and review the grouping plan with the property management personnel.
[0175] 2) Construction workers assigned each light to a designated group according to the grouping plan, and at the same time numbered and recorded the light fixture information.
[0176] 3) The user verifies the code to see if the construction workers have made any mistakes. If so, the construction workers should correct it. However, in reality, repeated adjustments and verifications are often required, which is a time-consuming and labor-intensive process.
[0177] After using the method of this invention, construction workers can leave once they have installed the lights, confirmed that all lights are working, and that all data has been reported to the platform. After a period of use, property management can use this invention to mine historical data on sensor triggering and generate intelligent grouping schemes. Manual adjustments can be made to lights in less frequently triggered peripheral areas. Then, the scheme can be applied with a single click on the intelligent lighting platform. This scheme groups the lights and allows for sequential numbering of the lights according to the grouping results, setting the grouping results for intelligent linkage. After applying this scheme, property management can manage and configure various lighting fixtures by group on the platform, which is faster than operating individual lights.
[0178] For example, in some specific embodiments, the present invention can be implemented as follows:
[0179] (I) In implementing this invention, a segment of sensor trigger data is first acquired. Each data segment has only two values: the sensor terminal ID, such as "383B 26FD 77EC", and the sensing time, such as 1720516042079, which is a UTC timestamp accurate to milliseconds. Given parameters Tstart = -0.4, Tend = 30, w = 0.2. For each sensor trigger, such as "38 3B 26FD 77EC / 1720516042079", the sensor triggers of all other terminals within the time window from 1720516042079 + (-0.4 * 1000) to 1720516042079 + (30 * 1000) are counted in 0.2-second increments to count the number of times each terminal senses the trigger. Note that the number of senses from different terminals are not cumulative. Finally, the feature vectors of each pair of terminals are obtained. (See attached...) Figure 3 As shown, among the 2714 sensing events of “38 3B26FD77EC”, the number of sensing events of “38 3B26FD 77 32” is counted in a small window of 0.2 seconds, occurring between -0.4 seconds and 30 seconds.
[0180] (II) Regarding the attached document Figure 3 The eigenvector is calculated, and the average value of its components is 14.15. Then, 14.15 * 0.9 = 12.74 is subtracted from each component. Negative components are set to 0, each component is multiplied by itself, and then multiplied by the time window weight. (See attached diagram.) Figure 4As shown, the final sum multiplied by the time weight is 121483.42, and the sum multiplied by itself is 44641.85, which gives 2.73. Since the average value of each component, 14.15, exceeds 2, the penalty function P1(avg, amin, amax) is 0, resulting in a final Cost of 2.73. The penalty function is used when the average value is too small, meaning the number of triggers is too few to be easily determined. In such cases, random interference is likely to occur, so the Cost is increased based on the penalty function to enhance the robustness of the algorithm.
[0181] (III) After calculating the relative cost of each pair of lamps, begin searching for a grouping method that minimizes the sum of the group costs. The group cost is the sum of the squares of the relative costs of the first lamp in the group and all other lamps, plus a penalty function. If "383B 26FD 77EC" is the first lamp in the group, then it is advisable to place lamps with smaller relative costs into the same group. Figure 5 For example, starting from the second row in the diagram, the relative costs of other lights compared to "38 3B 26FD 77EC" are shown. "38 3B 26F8 4169" and "383B 26F8 3D 93" have lower costs and are suitable for this group, while "38 3B 26F8 3F DE" and "38 3B26F8 41 5C" are not. The penalty function prevents a group from having too many or too few lights, leading to large discrepancies in the number of lights between groups, which would be inconvenient for users.
[0182] (iv) Assuming there are 1, 2, 3...40 lights that need to be divided into 9 groups, to find the grouping scheme that minimizes the group cost, we first initialize a grouping scheme. The initialization method is to select the 9 lights with relatively high costs as the first light in each group, let's say they are 1, 2, 3...9, thus establishing the required 9 groups. Then, using a dynamic programming algorithm, we place the other lights (10, 11, 12...40) into the 9 groups to minimize the total cost.
[0183] (V) After initializing the grouping scheme, begin iteratively searching for a better scheme. The iterative process involves keeping the first light fixture in each of the existing 8 groups unchanged. If replacing the first light fixture in one group with another light fixture lowers the total cost, then iterate on that new scheme. For example, replace 3 with 25, and then regroup all the lights that are not the first light fixture in any group (i.e., 3, 10, 11, 12…24, 26, 27…40) using dynamic normalization. If this results in a lower total cost, then iterate on that scheme. If replacing the first light fixture in any group with another light fixture and regrouping dynamically normalizes the group, but still fails to lower the total cost, then the iteration stops. To prevent the search from taking too long, the number of iterations can be limited.
[0184] In summary, this invention proposes an automated grouping method for lighting fixtures, which can automatically group lighting equipment based solely on historical sensor trigger data without requiring location information. This enables various convenient operations such as group control, automatic numbering, and intelligent linkage, significantly reducing the implementation cost of intelligent lighting systems in large-scale application scenarios.
[0185] Specifically, this invention avoids manual grouping and the work of marking lights on maps for grouping, improving implementation efficiency and reducing project implementation costs. Furthermore, based on this grouping information, it can automatically send grouping information to terminals and automatically number them, further reducing costs and increasing efficiency. Simultaneously, this invention only requires two pieces of information—terminal number and trigger time—from the historical data of sensor triggering, eliminating the need for location information. It also allows for manual specification of the average number of lights per group or the number of groups. Moreover, this invention can estimate the correlation feature vector between terminals using historical data of sensor triggering with only terminal number and trigger time information, and generate a grouping scheme through iterative optimization based on the feature vector.
[0186] Compared with the prior art, the present invention has at least the following beneficial effects:
[0187] Significantly reducing the implementation cost of lamp numbering and grouping: In traditional methods, to carry out energy-saving renovations and optimize the management of lighting systems, it is necessary to accurately confirm the location and number each lamp, a process that is often time-consuming, labor-intensive, and costly. The technical solution of this invention, however, collects sensor data from all lamps within a target area over a preset period and uses this data to automatically analyze the correlation characteristics between lamps, thereby achieving automatic lamp grouping. This greatly reduces the workload of manual confirmation and numbering, and lowers implementation costs.
[0188] Improving the efficiency and accuracy of lamp grouping: Compared to using indoor positioning devices to obtain lamp locations for automatic grouping (high cost) or manually screening and registering lamp locations (inefficient), the technical solution of this invention calculates the correlation feature vector between every two lamps by traversing the sensing data of all lamps, and groups them based on these feature vectors. This method not only improves grouping efficiency but also more accurately reflects the actual usage and interrelationships between lamps, thus obtaining more reasonable grouping results.
[0189] Enhancing the flexibility and scalability of lighting systems: The technical solution of this invention does not rely on specific lamp location information or indoor positioning technology, but rather groups the lamps based on their actual usage (sensor data). This means that when lamp locations change or new lamps are added, the system can automatically adapt and regroup without requiring additional location confirmation and numbering. This enhances the flexibility and scalability of the lighting system, enabling it to better adapt to different scenarios and needs.
[0190] Optimize the lighting experience and reduce energy consumption: By grouping lighting fixtures appropriately, lighting systems can be controlled and managed more effectively and intelligently. For example, more precise lighting strategies can be developed based on the lighting needs of different areas and the interrelationships between fixtures, thereby reducing energy consumption while maintaining a good lighting experience.
[0191] In summary, the technical solution of this invention achieves automatic grouping and intelligent management of lamps by collecting and analyzing the sensing data of lamps, effectively solving the problems of high cost and low efficiency in lamp numbering and grouping in the prior art. At the same time, it enhances the flexibility and scalability of the lighting system, optimizes the lighting experience and reduces energy consumption.
[0192] On the other hand, such as Figure 9 As shown, this embodiment of the invention provides an automated lamp grouping device 900, which may include:
[0193] The first module 901 is used to acquire the sensing data of all lamps in the target area within a preset period.
[0194] The sensing data includes the lamp identifier and sensing time for each lamp; the sensing time represents the moment when the lamp is activated and illuminated within a preset period.
[0195] The second module 902 is used to traverse the sensing data of all lamps and obtain the correlation feature vector between every two lamps;
[0196] The associated feature vector includes the number of times the second lamp illuminates the first lamp within a preset time window corresponding to the first lamp; the preset time range is determined based on the sensing time of the first lamp.
[0197] The third module 903 is used to obtain the associated feature cost between every two lamps based on the associated feature vector;
[0198] The fourth module 904 is used to group all lamps based on the associated feature cost and in combination with preset grouping parameters to obtain lamp groups.
[0199] Optionally, the device may further include:
[0200] The fifth module is used for iterative optimization of lighting fixture grouping based on the sum of squared costs.
[0201] The content of the method embodiments of the present invention is applicable to the device embodiments. The specific functions implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.
[0202] On the other hand, embodiments of the present invention also provide an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned sensitive information method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0203] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0204] like Figure 10 As shown, Figure 10 This illustration shows a specific example of the hardware structure of an electronic device 1000 according to one embodiment. The electronic device 1000 includes:
[0205] The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.
[0206] The memory 1002 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1002 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 to execute the network node population optimization method of the embodiments of this invention.
[0207] Input / output interface 1003 is used to implement information input and output;
[0208] The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0209] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);
[0210] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.
[0211] The electronic device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0212] The content of the method embodiments of the present invention is applicable to the embodiments of the present electronic device. The specific functions implemented by the embodiments of the present electronic device are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.
[0213] Another aspect of this invention provides a computer-readable storage medium storing a program that is executed by a processor to implement the aforementioned method.
[0214] It should be noted that the computer-readable medium shown in the embodiments of the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD to ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, wherein computer-readable program code is carried. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0215] The content of the method embodiments of the present invention is applicable to the computer-readable storage medium embodiments. The specific functions implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.
[0216] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.
[0217] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0218] It should be noted that although several modules for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0219] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of the present invention.
[0220] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.
[0221] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.
[0222] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art or the part of this invention itself, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0223] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution means, apparatus, or device (such as a computer-based device, a processor-including device, or other means that can fetch and execute instructions from, or in conjunction with, an instruction execution means, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution means, apparatus, or device.
[0224] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0225] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution device. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0226] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0227] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
[0228] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.
Claims
1. A method for automated grouping of lighting fixtures, characterized in that, Includes the following steps: Acquire sensing data of all lights within the target area for a preset period of time; The sensing data includes the lamp identifier and sensing time for each lamp; the sensing time represents the moment when the lamp is activated within the preset period. By iterating through the sensing data of all the lamps, the associated feature vector between every two lamps is obtained; The associated feature vector includes the number of times the second lamp illuminates the first lamp within a preset time range corresponding to the first lamp in each time window; the preset time range is determined based on the sensing time of the first lamp. Based on the association feature vector, the association feature cost between each pair of the lamps is obtained; The associated feature vector includes multiple components, each corresponding to the number of times the luminaire is illuminated within the time window. The step of obtaining the associated feature cost between each pair of luminaires based on the associated feature vector includes the following steps: The average value is obtained by averaging all the components of the associated feature vector. Based on the average value, a preset standardization operation is performed on all components of the associated feature vector to obtain a first component corresponding to each component; The first score is obtained by summing all the first components. Each first component is multiplied by a preset time weight to obtain a second component corresponding to each component; The time weight is positively correlated with the sequence number of the time window in which the component is located; Summing all the second components yields the second fraction; The third score is obtained by summing the first score and the first parameter, and the cost of the associated feature is obtained by summing the ratio of the second score and the third score with the penalty function. The value of the penalty function is determined based on the numerical range of the average value. Based on the associated feature cost, all the lamps are grouped according to the preset grouping parameters to obtain lamp groups.
2. The automated grouping method for lighting fixtures according to claim 1, characterized in that, The step of traversing the sensing data of all the lamps to obtain the correlation feature vector between every two lamps includes the following steps: Organize all the lamps within the target area into a lamp set; One of the lamps is selected from the set of lamps and used as the first lamp; The other lamps in the target area besides the first lamp are designated as the second lamps; Based on the sensor data, the number of times the sensor illumination occurs in each time window within a preset time range corresponding to each second lamp and the first lamp is obtained, and the correlation feature vector between the first lamp and each second lamp is obtained; The next lamp in the lamp set is designated as the first lamp, and the process returns to the step of designating all other lamps in the target area except the first lamp as the second lamp, until the associated feature vector between every two lamps in the target area is obtained.
3. The automated grouping method for lighting fixtures according to claim 2, characterized in that, The process of processing the sensor data to obtain the number of times the sensor illumination occurs in each time window within a preset time range corresponding to each second lamp and the first lamp, and obtaining the correlation feature vector between the first lamp and each second lamp, includes the following steps: The association feature component tables of the first lamp and each of the second lamps are initialized sequentially; Wherein, the horizontal axis of the associated feature component table corresponds to each time window of the preset time range, and the vertical axis of the associated feature component table corresponds to the number of sensing operations; Based on the lamp identifier of the first lamp, all the sensing times of the first lamp are obtained from the sensing data; All the sensing data are iterated and determined. When the sensing time of the second lamp is within the target time window of the preset time range corresponding to the sensing time of the first lamp, the number of sensing times corresponding to the target time window of the corresponding associated feature component table is incremented according to the lamp identifier of the second lamp. Until all the sensing data has been traversed, the associated feature vector between the first lamp and each of the second lamps is obtained according to the associated feature component table.
4. The automated grouping method for lighting fixtures according to claim 1, characterized in that, The process of grouping all the lamps based on the associated feature cost and in conjunction with preset grouping parameters to obtain lamp groups includes the following steps: The number of groups is determined based on the grouping parameters, and the original number of groups is initialized. The cost square of each luminaire is obtained by summing the squares of the associated feature costs of each luminaire with all other luminaires; The lamps with the largest sum of squared costs in the number of groups are sequentially assigned as the first lamp in each original group. Then, with the goal of minimizing the total cost score of all original groups, the remaining lamps are assigned to each original group using a preset planning algorithm to obtain the final lamp grouping. The total cost score for each group is obtained by summing the cost scores of all groups; the cost score of each group is obtained by summing the sum of the squares of the costs of all the lamps included in the group and the equilibrium function, the value of which is determined based on the number of lamps in the group; the planning algorithm includes dynamic programming and greedy algorithm.
5. The automated grouping method for lighting fixtures according to claim 4, characterized in that, The method further includes the following steps: The lighting fixture grouping is iteratively optimized based on the sum of squared costs.
6. The automated grouping method for lighting fixtures according to claim 5, characterized in that, The iterative optimization process for grouping the lighting fixtures based on the sum of squared costs includes the following steps: A first number of groups are randomly selected from the lamp groups as optimized groups; the first number is 1 less than the number of lamp groups. The first lamp in the optimized group is retained, and all other lamps are removed and redistributed. Initialize an empty optimized group, and obtain one of the lamps from the reassigned lamps as the first lamp of the optimized group; With the goal of minimizing the total cost score of all optimized groups, the remaining redistributed lamps are assigned to each optimized group using a preset planning algorithm to obtain the target group; If the total cost score of the target group is lower than the total cost score of the lighting group, the target group is output; otherwise, the iteration count is incremented by 1, and the process returns to the step of arbitrarily selecting a first number of groups from the lighting group as the optimized group, until the iteration count exceeds the preset iteration threshold. The number of iterations is initialized to 0.
7. An automated grouping device for lighting fixtures, characterized in that, include: The first module is used to acquire the sensing data of all lights in the target area within a preset period. The sensing data includes the lamp identifier and sensing time for each lamp; the sensing time represents the moment when the lamp is activated within the preset period. The second module is used to traverse the sensing data of all the lamps and obtain the correlation feature vector between every two lamps; The associated feature vector includes the number of times the second lamp illuminates the first lamp within a preset time range corresponding to the first lamp in each time window; the preset time range is determined based on the sensing time of the first lamp. The third module is used to obtain the association feature cost between each pair of lamps based on the association feature vector; The associated feature vector includes multiple components, each corresponding to the number of times the luminaire is illuminated within the time window. The step of obtaining the associated feature cost between each pair of luminaires based on the associated feature vector includes the following steps: The average value is obtained by averaging all the components of the associated feature vector. Based on the average value, a preset standardization operation is performed on all components of the associated feature vector to obtain a first component corresponding to each component; The first score is obtained by summing all the first components. Each first component is multiplied by a preset time weight to obtain a second component corresponding to each component; The time weight is positively correlated with the sequence number of the time window in which the component is located; Summing all the second components yields the second fraction; The third score is obtained by summing the first score and the first parameter, and the cost of the associated feature is obtained by summing the ratio of the second score and the third score with the penalty function. The value of the penalty function is determined based on the numerical range of the average value. The fourth module is used to group all the lamps based on the associated feature cost and in combination with preset grouping parameters to obtain lamp groups.
8. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the method as described in any one of claims 1 to 6.
9. A computer storage medium storing a processor-executable program, characterized in that, The processor-executable program, when executed by the processor, is used to implement the method as described in any one of claims 1 to 6.