Automatic lamp grouping method and device, electronic equipment and storage medium

By calculating the associated feature vectors and costs using lamp sensing data, the automatic marshalling of lamps for intelligent lighting systems is realized, solving the problems of high composition costs and low efficiency in the prior art, and improving the flexibility and energy efficiency of the system.

CN119497286AActive Publication Date: 2025-02-21E SURFING IOT CO LTD

Patent Information

Application Number
CN202411465782.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-21
Estimated Expiration
2044-10-21

AI Technical Summary

Technical Problem

The existing intelligent lighting systems are costly and inefficient in the lamp numbering and marshalling process, and rely on indoor positioning terminals with high cost and low efficiency.

Method used

By obtaining the induction data of all lamps in the target area at the preset period, the correlation feature vector and correlation feature cost between each two lamps are calculated, and all lamps are automatically grouped in combination with the preset grouping parameters.

Benefits of technology

The automatic marshalling of lamps is realized, which reduces the cost and time of manual marshalling and location confirmation, improves grouping efficiency and accuracy, enhances the flexibility and scalability of the lighting system, optimizes the lighting experience and reduces energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119497286A_ABST
    Figure CN119497286A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic lamp grouping method and device, electronic equipment and a storage medium. The method comprises the steps of obtaining induction data of all lamps in a target area within a preset time limit; traversing the sensing data of all the lamps to obtain an associated characteristic vector between every two lamps; performing arrangement based on the associated feature vectors to obtain the associated feature cost between every two lamps; and based on the associated feature cost, grouping all the lamps in combination with preset grouping parameters to obtain lamp groups. According to the method, the sensing data of the lamps are collected and analyzed, and then the associated characteristics of the lamps are constructed, so that automatic grouping and intelligent management of the lamps can be realized without depending on the positions of the lamps, and the problems of high cost and low efficiency of lamp numbering and grouping in the prior art are effectively solved; and meanwhile, the flexibility and the expandability of the illumination system are enhanced, the illumination experience is optimized, the energy consumption is reduced, and the method can be widely applied to the technical field of data processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic equipment and storage medium for automatic lamp grouping. Background Art

[0002] Generally, energy-saving renovation will be equipped with an intelligent lighting system to intelligently control the lighting, thereby achieving energy-saving effects. At present, there is a problem with the intelligent lighting system. In order to improve the lighting experience, reduce energy consumption and facilitate management, the lamps need to be numbered and grouped. However, this process is time-consuming and labor-intensive because it is necessary to repeatedly confirm the location of each lamp on the map, and this implementation cost accounts for a large part. Using indoor positioning devices to obtain the location of lamps can also achieve automatic grouping, but the cost of indoor positioning terminals is too high, and the efficiency of manually screening and registering the location of lamps to achieve coding is particularly low. Summary of the invention

[0003] The present invention proposes a method, device, electronic device and storage medium for automatic grouping of lamps, aiming to solve at least one of the technical problems in the related art to a certain extent. The embodiments of the present invention can conveniently realize automatic grouping of lamps.

[0004] On the one hand, an embodiment of the present invention provides a method for automatic grouping of lamps, comprising:

[0005] Obtain the sensing data of all lamps in the target area within a preset period;

[0006] The sensing data includes the lamp identification and sensing time of each lamp; the sensing time represents the moment when the lamp is sensed and illuminated within a preset period;

[0007] Traverse the sensing data of all lamps to obtain the associated feature vector between every two lamps;

[0008] The associated feature vector includes the number of times the second lamp is illuminated in each time window within a preset time range corresponding to the first lamp; the preset time range is determined based on the sensing time of the first lamp;

[0009] Based on the correlation feature vector, the correlation feature cost between every two lamps is obtained;

[0010] Based on the associated feature cost and the preset grouping parameters, all lamps are grouped to obtain lamp groups.

[0011] Optionally, traversing the sensing data of all lamps to obtain the associated feature vector between every two lamps includes the following steps:

[0012] Organize all the lamps in the target area into lamp sets;

[0013] Take a lamp from the lamp set as the first lamp;

[0014] The other lamps in the target area except the first lamp are used as the second lamps;

[0015] Based on the sensing data, the number of sensing illuminations occurring in each time window within a preset time range corresponding to each second lamp and the first lamp is obtained, and a correlation feature vector between the first lamp and each second lamp is obtained;

[0016] The next lamp of the first lamp in the lamp set is taken as the first lamp, and the step of taking other lamps in the target area except the first lamp as the second lamp is executed again until the associated feature vectors between every two lamps in the target area are obtained.

[0017] Optionally, obtaining the number of times the sensing illumination occurs in each time window within a preset time range corresponding to each second lamp and the first lamp based on the sensing data, and obtaining the associated feature vector between the first lamp and each second lamp includes the following steps:

[0018] Initializing the associated feature component table of the first lamp and each second lamp in sequence;

[0019] The horizontal axis of the correlation feature component table corresponds to each time window of the preset time range, and the vertical axis of the correlation feature component table corresponds to the number of induction times;

[0020] Based on the lamp identification of the first lamp, acquiring all sensing times of the first lamp from the sensing data;

[0021] All sensing data are traversed and determined. When there is a target time window in which the sensing time of the second lamp is within the preset time range corresponding to the sensing time of the first lamp, the sensing number corresponding to the target time window of the corresponding associated feature component table is incremented according to the lamp identification of the second lamp;

[0022] After all the sensing data are 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, and the components correspond to the number of times the induced illumination occurs in the time window; and obtaining the associated feature cost between every two lamps based on the associated feature vector, including the following steps:

[0024] All components of the associated feature vector are averaged to obtain an average value;

[0025] Based on the average value, a preset normalization operation is performed on all components of the associated feature vector to obtain a first component corresponding to each component;

[0026] Summing all first components to obtain a first score;

[0027] Multiply each first component by a preset time weight to obtain a second component corresponding to each component;

[0028] Among them, the time weight is positively correlated with the sequence number of the time window where the component is located;

[0029] Summing all second components to obtain a second score;

[0030] A third score is obtained by summing the first score and the first parameter, and an associated feature cost is obtained by summing the ratio of the second score to the third score and the penalty function;

[0031] The value of the penalty function is determined based on the numerical range of the average value.

[0032] Optionally, all lamps are grouped based on the associated feature cost and preset grouping parameters to obtain lamp groups, including the following steps:

[0033] Determine the number of groups based on the grouping parameter, and initialize the original grouping of the number of groups;

[0034] The sum of the squares of the cost of each lamp is obtained based on the sum of the squares of the associated feature costs of each lamp and all other lamps;

[0035] The lamps with the largest number of groups with the largest sum of squared costs are sequentially assigned as the first lamp in each original group, and then the lowest total cost score of all original groups is taken as the planning goal. The remaining lamps are assigned to each original group through the preset planning algorithm to obtain the final lamp grouping;

[0036] Among them, the total group cost score is obtained by summing up the group cost scores of all groups; the group cost score is obtained by summing up the sum of the squares of the costs corresponding to all lamps included in the group and the balance function, and the value of the balance function is determined based on the number of lamps in the group; the planning algorithm includes a dynamic programming algorithm and a greedy algorithm.

[0037] Optionally, the method further comprises the following steps:

[0038] Iterative optimization of the grouping of lamps is performed based on the sum of squared costs.

[0039] Optionally, performing iterative optimization processing on the grouping of lamps based on the sum of squared costs comprises the following steps:

[0040] Randomly select a first number of groups from the lamp groups as optimized groups; the first number is 1 less than the number of lamp groups;

[0041] The first lamp in the optimized group is retained, and all other lamps are taken out and redistributed;

[0042] Initialize an empty optimization group, and obtain a fixture from the reallocated fixtures as the first fixture of the optimization group;

[0043] The planning goal is to minimize the total grouping cost of all optimized groups, and the remaining reallocated lamps are allocated to each optimized group through a preset planning algorithm to obtain the target grouping;

[0044] When the total grouping cost score of the target grouping is lower than the total grouping cost score of the lamp grouping, the target grouping is output; otherwise, the number of iterations is increased by 1, and the step of arbitrarily selecting a first number of groups from the lamp grouping as the optimized grouping is returned to be executed until the number of iterations exceeds a preset iteration threshold;

[0045] The number of iterations is initialized to 0.

[0046] On the other hand, an embodiment of the present invention provides a lighting automatic grouping device, comprising:

[0047] The first module is used to obtain the sensing data of all lamps in the target area within a preset period;

[0048] The sensing data includes the lamp identification and sensing time of each lamp; the sensing time represents the moment when the lamp is sensed 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 is illuminated in each time window within a preset time range 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 every two lamps based on the associated feature vector;

[0052] The fourth module is used to group all lamps based on the associated feature cost and the preset grouping parameters to obtain lamp groups.

[0053] Optionally, the device further comprises:

[0054] The fifth module is used to iteratively optimize the grouping of lamps based on the sum of squared costs.

[0055] On the other hand, an embodiment of the present invention provides an electronic device, including: a processor and a memory; the memory is used to store programs; the processor executes the program to implement the above-mentioned automatic lamp grouping method.

[0056] On the other hand, an embodiment of the present invention provides a computer storage medium, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the above-mentioned automatic grouping method of lamps.

[0057] The embodiment of the present invention obtains the sensing data of all lamps in the target area within a preset period; wherein the sensing data includes the lamp identification and sensing time of each lamp; the sensing time represents the moment when the lamp is induced to illuminate within the preset period; the sensing data of all lamps are traversed to obtain the associated feature vector between every two lamps; wherein the associated feature vector includes the number of times the second lamp is induced to illuminate in each time window within 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 associated feature cost between every two lamps is obtained based on the associated feature vector; based on the associated feature cost, all lamps are grouped in combination with the preset grouping parameters to obtain lamp groups. The present invention includes the following beneficial effects: the technical solution of the present invention collects and analyzes the sensing data of the lamps, and then constructs the associated features between each lamp, which can realize the automatic grouping and intelligent management of the lamps without relying on the location of the lamps, effectively solving the problems of high cost and low efficiency of 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. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.

[0059] Figure 1 A schematic diagram of an implementation environment for automatic grouping of lamps provided by an embodiment of the present invention;

[0060] Figure 2 A schematic diagram of a flow chart of a method for automatically grouping lamps provided by an embodiment of the present invention;

[0061] Figure 3 A schematic diagram of a data example of an associated feature vector provided in an embodiment of the present invention;

[0062] Figure 4 A schematic diagram of data examples of various calculation links of the associated feature cost provided in an embodiment of the present invention;

[0063] Figure 5 A schematic diagram of an example of a relative cost list of two lamps provided in an embodiment of the present invention;

[0064] Figure 6A schematic diagram of an extended process of the automatic lamp grouping method provided by an embodiment of the present invention;

[0065] Figure 7 A schematic diagram of a system architecture for implementing the logic of a method for automatically grouping lamps provided in an embodiment of the present invention;

[0066] Figure 8 A logical diagram of a specific application process of the lighting fixture automatic grouping method provided by an embodiment of the present invention;

[0067] Fig. 9 A schematic diagram of the structure of a lighting automation grouping device provided by an embodiment of the present invention;

[0068] Fig.10 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0069] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0070] It should be noted that, although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed 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 above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0071] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0072] To facilitate the understanding of the technical solution of the present invention, the proprietary technical features that may be applied to the technical solution of the present invention are first explained:

[0073] Intelligent lighting system: The intelligent lighting system is a lighting control system that uses advanced electromagnetic voltage regulation and electronic sensing technology to improve the additional power consumption caused by unbalanced loads in lighting circuits, improve power factor, reduce the operating temperature of lamps and lines, and achieve the purpose of optimizing power supply.

[0074] It is understandable that the lighting automation grouping method provided in the embodiment of the present invention can be applied to any computer device with data processing and computing capabilities, and this computer device can be various 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 communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal is a smart phone, a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to this.

[0075] like Figure 1 FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present invention. 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 to a network wirelessly or wired to complete data transmission and exchange.

[0076] Server 101 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.

[0077] In addition, the server 101 can also be a node server in the blockchain network. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, and encryption algorithm.

[0078] The terminal 102 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal 102 and the server 101 may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiment of the present invention.

[0079] Based on the example Figure 1 In the implementation environment shown, an embodiment of the present invention provides a method for automatic grouping of lamps. The following is an example of applying the method for automatic grouping of lamps in a terminal 102 . It can be understood that the method for automatic grouping of lamps can also be applied to a server 101 .

[0080] Reference Figure 2 , Figure 2 The flowchart of the automatic lamp grouping method applied to the terminal provided by the embodiment of the present invention, the execution subject of the automatic lamp grouping method can be any of the aforementioned computer devices (including servers or terminals). Figure 2 , the method comprises the following steps:

[0081] S100, obtaining sensing data of all lamps in the target area within a preset period;

[0082] The sensing data includes the lamp identification and sensing time of each lamp; the sensing time represents the moment when the lamp is sensed and illuminated within a preset period;

[0083] For example, in some specific implementations, the lamp sensing trigger data D of the most recent period (i.e., a preset period, such as one week or five days) can be mined and processed according to the subsequent process. Each data in D only needs to include the triggered terminal identifier (i.e., lamp identifier) ​​and the trigger time (i.e., sensing time).

[0084] S200, traversing 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 is illuminated in each time window within a preset time range 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 a lamp from the lamp set as the first lamp; taking the lamps other than the first lamp in the target area as the second lamp; obtaining the number of sensing illumination occurring in each time window within a preset time range corresponding to each second lamp and the first lamp based on the sensing data, and obtaining the associated characteristic vector between the first lamp and each second lamp; taking the next lamp of the first lamp in the lamp set as the first lamp, and returning to execute the step of taking the lamps other than the first lamp in the target area as the second lamp, until the associated characteristic vector between every two lamps in the target area is obtained.

[0087] In some embodiments, the number of times the sensing illumination occurs in each time window within the preset time range corresponding to each second lamp and the first lamp is obtained based on the sensing data, and the associated feature vector between the first lamp and each second lamp is obtained, which may include the following steps: initializing the associated feature component table of the first lamp and each second lamp in turn; wherein the horizontal axis of the associated feature component table corresponds to each time window within the preset time range, and the vertical axis of the associated feature component table corresponds to the number of sensing times; based on the lamp identification of the first lamp, all the sensing times of the first lamp are obtained from the sensing data; all the sensing data are traversed and determined, and when there is a target time window whose sensing time of the second lamp is within the preset time range corresponding to the sensing time of the first lamp, the number of sensing times corresponding to the target time window in the corresponding associated feature component table is incremented according to the lamp identification of the second lamp; until all the sensing data are traversed, the associated feature vector between the first lamp and each second lamp is obtained according to the associated feature component table.

[0088] For example, in some specific implementations, based on the sensing data obtained above, the sensing feature vector (ie, the associated feature vector) between every two lamps is first calculated, which can be specifically implemented as follows:

[0089] a) Given a start time Tstart, generally -0.5 seconds (can be adjusted adaptively according to actual needs). Given an end time Tend, generally 25 seconds (can be adjusted adaptively according to actual needs). Given a window length w, generally 0.1 seconds. For every two lamps, initialize a feature vector with a length of (Tend-Tstart) / w, and the value is 0.

[0090] b) Take out one sensing data d in turn, including the lamp identification 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 identification is not equal to did, then add 1 to the kth component of the vector of lamp did and d2id, where d2id is the lamp identification of d2, k = (d2t-dt-Tstart) / w, and d2t is the sensing time of d2.

[0091] Optionally, in some specific application scenarios, you can first obtain a piece of sensing trigger data. Each piece of data has only two values: the sensing terminal ID, such as "38 3B 26FD 77EC", and the sensing time, such as 1720516042079, which is the UTC timestamp accurate to milliseconds. Given parameters Tstart = -0.4, Tend = 30, w = 0.2. For each sensing trigger, such as "38 3B 26FD77EC / 1720516042079", for the sensing triggers of all other terminals in the time window from 1720516042079+(-0.4*1000) to 1720516042079+(30*1000), count the number of sensing times of each terminal in a small window of 0.2 seconds. Note that the sensing times of different terminals are not superimposed. Finally, the feature vectors of each pair of terminals are obtained. As shown in the attached figure Figure 3 As shown, among the 2714 inductions of "38 3B26FD 77EC", they appeared in the time from -0.4 seconds to 30 seconds, and the number of inductions of "383B 26FD 77 32" was counted in a small window of 0.2 seconds.

[0092] S300, obtaining the correlation feature cost between every two lamps based on the correlation feature vector arrangement;

[0093] It should be noted that the associated feature vector includes multiple components, and the components correspond to the number of times the induced illumination occurs in the 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; based on the average value, performing a preset standardization operation on all components of the associated feature vector to obtain a first component corresponding to each component; summing up 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 up all second components to obtain a second score; obtaining a third score by summing the first score and the first parameter, and obtaining an associated feature cost by summing the ratio of the second score to the third score and the penalty function; 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 associated feature cost) of every two lamps is further calculated based on the associated feature vector:

[0095] a) For every two lamps, calculate the average value avg of all components of their characteristic vectors.

[0096] b) For every two lamps, subtract wt from each component of their characteristic vector. wt is generally 0.9 multiplied by avg.

[0097] c) For every two lamps, change all components of their characteristic vectors that are less than 0 to 0.

[0098] d) For every two lamps, all components of their characteristic vectors are squared. The standardization operation includes steps b), c) and d).

[0099] e) For every two lamps, sum up all components of their characteristic vectors to obtain S1 (ie, the first score).

[0100] f) For every two lamps, multiply each component of their feature vector by the time weight, where 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 up all components of their characteristic vectors to obtain S2 (ie, the second score).

[0102] h) For every two lamps, calculate the cost as S2 / (S1+0.01)+P1(avg,amin,amax). Among them, 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) Where amin and amax are two thresholds, generally amin = 0.5, amax = 2. P1 is a penalty function used to reduce the weight of accidental adjacent triggering between unrelated lamps. The execution logic of the penalty function is as follows:

[0104] 1. P1(avg,amin,amax)=cmax, when avg<=amin, cmax is a threshold, usually 6;

[0105] 2.P1(avg,amin,amax)=cmin, when avg>=amax, cmin is a threshold, usually 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, Figure 3 The feature vector of is calculated, and the average value of each component is 14.15. Then each component is subtracted by 14.15*0.9=12.74. The negative components are set to 0, and each component is multiplied by itself and then multiplied by the time window weight. Figure 4As shown, the final sum multiplied by the time weight is 121483.42, the sum multiplied by itself is 44641.85, and the sum divided is 2.73. Since the average value of each component 14.15 exceeds 2, the penalty function P1 (avg, amin, amax) is 0, so the final Cost is 2.73. The penalty function is used when the average value is too small, that is, the number of triggers is too small to be judged. In this case, accidental interference is prone to occur, so the Cost will be increased according to the penalty function, thereby increasing the robustness of the algorithm.

[0108] S400: Group all lamps based on the associated feature cost and preset grouping parameters 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 grouping of the number of groups; obtaining the sum of the square costs of each lamp based on the sum of the squares of the associated characteristic costs of each lamp and all other lamps; sequentially allocating the lamps with the largest number of groups with the sum of the squared costs as the first lamp of each original group, and then taking the lowest total grouping cost score of all original groups as the planning goal, allocating the remaining lamps to each original group through a preset planning algorithm to obtain the final lamp grouping; wherein the total grouping cost score is obtained by summing up the grouping cost scores of all groups; the grouping cost score is obtained by summing up the sum of the sum of the squared costs corresponding to all lamps included in the group and the balance function, and the value of the balance function is determined based on the number of lamps in the group; the planning algorithm includes a dynamic programming algorithm and a greedy algorithm.

[0110] For example, in some specific implementations, the grouping of lamps can be implemented as follows:

[0111] a) The user can specify that an average group contains about C lights. If the user has no special requirements, C is generally equal to 4 / 5 / 6. The number of groups required 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, exit this method.

[0112] b) For each lamp, calculate the sum of the squares of its cost and that of all other lamps, and put the lamp with the largest sum of squares into the first group.

[0113] c) For the lamps that have not been put into any group, take out the lamps with the largest square sum and put them into the next group.

[0114] d) Repeat the previous step until all groups have a lamp.

[0115] e) Use dynamic programming or the greedy algorithm to place the lamps that have not been placed in 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) refers 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 (which can be adaptively adjusted according to actual needs);

[0118] 2. P2(n) = 0, when C - 1 ≤ n ≤ C + 1.

[0119] Optionally, in some specific application scenarios, after calculating the relative Cost between every two lamps, start to search for a grouping method that minimizes the sum of the group Costs of all groups. The group Cost is the sum of the squares of the relative Costs between the first lamp in the group and other lamps plus a penalty function. Taking "38 3B 26FD 77EC" as the first lamp in the group, it is advisable to place the lamps with relatively smaller Costs into the same group. For Figure 5 example, starting from the second row on the left side of the figure are the relative Costs between 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, 1.43 and 0.84 respectively, and they are suitable to be placed in 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, so they are not suitable to be in the same group as "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 large gap in the number of lamps between groups, which is inconvenient for users to operate.

[0120] Assume that there are 1, 2, 3...40 lamps, which need to be divided into 9 groups. In order to search for the grouping method with the lowest cost for all groups, a grouping scheme is initialized first. The initialization method is to select 9 lamps with relatively large costs as the first lamps in each group, assuming they are 1, 2, 3...9, so as to establish the required 9 groups. Then, the other lamps 10, 11, 12...40 are placed into the 9 groups through the dynamic programming algorithm to minimize the total cost. When the source of the value is clear, the corresponding grouping operation can be directly implemented through the existing dynamic programming algorithm, and the algorithm implementation logic will not be repeated.

[0121] In some preferred embodiments, Figure 6 As shown, the method may further include the following steps: S500, performing iterative optimization processing on 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 grouping as optimization groups; the first number is 1 less than the number of lamp groups; retaining the first lamp in the optimization group, and taking out all other lamps for reallocation; initializing an empty optimization group, and obtaining a lamp from the reallocated lamps as the first lamp of the optimization group; taking the lowest total grouping cost score of all optimization groups as the planning goal, and allocating the remaining reallocated lamps to each optimization group through a preset planning algorithm to obtain a target group; when the total grouping cost score of the target group is lower than the total grouping cost score of the lamp grouping, outputting the target group; otherwise, adding 1 to the number of iterations, and returning to execute the step of arbitrarily selecting the first number of groups from the lamp grouping as the optimization group, until the number of iterations exceeds the preset iteration threshold; wherein the number of iterations is initialized to 0.

[0123] For example, in some specific implementations, the grouping can be optimized iteratively, and each iteration searches for a solution with a lower cost than the sum of the costs of all the groups in the existing grouping from the following solutions. This can be implemented as follows:

[0124] a) Randomly select G-1 groups from the existing G groups, and put the first lamps of these G-1 groups into the first G-1 groups of the new solution.

[0125] b) Select a lamp from the remaining lamps and put it into the Gth group.

[0126] c) Use dynamic programming or greedy algorithm to put 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 the same as 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 groupings as an example, the iterative approach is to keep the first lamps of the 8 groups of the existing solution unchanged. If the first lamp of one group can be replaced with other lamps to make the total cost lower, then iterate on the new solution. For example, replace 3 with 25, and then regroup all the lamps that are not the first lamp of a group, that is, 3, 10, 11, 12...24, 26, 27...40, using dynamic specifications. If the total cost is lower, then iterate on the solution. If the first lamp of any group is replaced with another lamp and the dynamic specification grouping cannot make the total cost lower, then stop iterating. In order to prevent the search from taking too long, the number of iterations can be limited.

[0129] In order to explain the principle of the technical solution of the present invention in detail, the overall process of the present invention is described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.

[0130] First of all, it should be noted that sensing terminals such as infrared sensors and human microwave radars are sensing devices for people, cars or other moving objects. Lighting terminals refer to lamps such as LEDs. Each sensing terminal has several associated lighting terminals. Once the sensing terminal senses the target object, it will trigger the associated lighting terminal to light up. In common cases, a sensing terminal and a lighting terminal are integrated together to facilitate the sensing terminal to draw power, and the sensing terminal triggers the lighting terminal through a signal line.

[0131] Once the sensing terminal senses a person, car or other object, it will trigger a sensing event, activate the lighting terminal, and report the sensing trigger event to the lighting system. The sensing trigger event generally has only two valid information: the lighting equipment identification and the trigger time.

[0132] In view of the shortcomings of the prior art, the present invention provides a method for automatic grouping of lamps based on sensing data. By mining historical sensing data, the lamps can be intelligently and automatically grouped without positioning information. Figure 7 As shown, the embodiment of the present invention can be based on Figure 7 The architecture shown in the figure is implemented, and the system includes a lighting terminal, a sensing terminal, a data collection 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) Take out the sensor data of lamps over a period of time;

[0134] b) Calculate the sensing characteristic vector between every two lamps;

[0135] c) Calculate the induction cost between every two lamps;

[0136] d) Select one lamp from each group and put it in;

[0137] e) Put the remaining lamps into a group so that the total cost is the lowest;

[0138] f) Iterate and search for a grouping method that reduces 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 the present invention first mines and processes the lamp sensing trigger data D of the recent period of time (such as one week or five days) according to the following process. Each data in D only needs to contain the triggering terminal identifier and the triggering time. Then the execution process steps are as follows:

[0142] 1) The first step is to calculate the sensing feature vector between every two lamps:

[0143] a) Given a start time Tstart, usually -0.5 seconds. Given an end time Tend, usually 25 seconds. Given a window length w, usually 0.1 seconds. For every two lamps, initialize a feature vector with a length of (Tend-Tstart) / w, and the value is 0.

[0144] b) Take out one sensing data d in turn, including the lamp identification 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 identification is not equal to did, then add 1 to the kth component of the vector of lamp did and d2id, where d2id is the lamp identification 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 of every two lamps:

[0146] a) For every two lamps, calculate the average value avg of all components of their characteristic vectors.

[0147] b) For every two lamps, subtract wt from each component of their characteristic vector. wt is generally 0.9 multiplied by avg.

[0148] c) For every two lamps, change all components of their characteristic vectors that are less than 0 to 0.

[0149] d) For every two lamps, multiply all components of their characteristic vectors by themselves.

[0150] e) For every two lamps, sum up all components of their characteristic vectors to obtain S1.

[0151] f) For every two lamps, multiply each component of their feature vector by the time weight, where 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 characteristic vectors to obtain S2.

[0153] h) For every two lamps, calculate their cost as S2 / (S1+0.01)+P1(avg,amin,amax).

[0154] i) Where amin and amax are two thresholds, generally amin = 0.5, amax = 2. P1 is a penalty function used to reduce the weight of accidental adjacent triggering between unrelated lamps. The penalty function execution logic is as follows:

[0155] 1. P1(avg,amin,amax)=cmax, when avg<=amin, cmax is a threshold, usually 6;

[0156] 2.P1(avg,amin,amax)=cmin, when avg>=amax, cmin is a threshold, usually 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) The user can specify that an average group contains about C lights. If the user has no special requirements, C is generally equal to 4 / 5 / 6. The number of groups required 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, exit this method.

[0160] b) For each lamp, calculate the sum of the squares of its cost and that of all other lamps, and put the lamp with the largest sum of squares into the first group.

[0161] c) For the lamps that have not been put into any group, calculate the sum of the squares of their costs with the lamps that have been put into the group, take out the lamp with the largest sum of squares, and put it into the next group.

[0162] d) Repeat the previous step until all groups have a lamp.

[0163] e) Use dynamic programming or the greedy algorithm to put the lamps that have not been assigned to any group into one of the groups, so that the total Cost of all groups is minimized. The Cost calculation method for each group is as follows.

[0164] f) Assume 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, 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 as follows:

[0165] 1. P2(n) = μ(n - C)*(n - C), when n < C - 1 or n > C + 1, where μ is a constant, generally 1.5;

[0166] 2. P2(n) = 0, when C - 1 ≤ n ≤ C + 1.

[0167] 4) The fourth step is iterative optimization of the grouping. Each iteration searches for a solution 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 solution.

[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 put the lamps that have not been assigned to any group into one of the groups, so that the total Cost of all groups is minimized. 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 solution, stop the iteration and output the existing solution.

[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 posts in the parking lot, and there are three fluorescent tubes in each lamp post. The lamps in the same lamp post are either all on or all off, and can be regarded as one lamp.

[0173] According to the previous implementation plan, the construction workers need to get accurate drawings. Since this is an upgrade and renovation project, there have been some changes in this parking lot over the past decade or so. Therefore, 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 finally given to the construction workers.

[0174] 1) The construction workers 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 staff.

[0175] 2) Construction workers divide the lights into designated groups one by one according to the grouping plan, and number them and record the lighting information.

[0176] 3) The user verifies the configuration to see if the constructor has made any mistakes. If so, the constructor can adjust the configuration. However, in reality, repeated adjustments and verifications are often required, which is a time-consuming and laborious process.

[0177] After using the method of the present invention, the construction workers can leave after installing the lamps, confirming that the lights can all be turned on, and reporting the data to the platform. After being put into use for a period of time, the property can use the present invention to mine the historical data of induction triggering and generate an intelligent grouping scheme. Make manual corrections to some lamps with fewer induction triggers in the corners of the scheme. Then apply the scheme with one click on the intelligent lighting platform. Apply the scheme to group the lamps, and at the same time, the lamps can be numbered in the order of the groups according to the grouping results, and the grouping results can be set to the lamps for intelligent linkage. After applying the scheme, the property can manage and set various lighting fixtures by group on the platform, which is faster than operating a single lamp.

[0178] Exemplarily, in some specific implementation modes, the present invention can be implemented as follows:

[0179] (I) When the present invention is implemented, a section of sensing trigger data is first obtained. Each piece of data has only two values: the sensing 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 sensing trigger, such as "38 3B 26FD 77EC / 1720516042079", the sensing triggers of all other terminals in the time window from 1720516042079+(-0.4*1000) to 1720516042079+(30*1000) are counted according to a small window of 0.2 seconds. Note that the sensing times of different terminals are not superimposed. Finally, the feature vectors of each pair of terminals are obtained. As shown in the attached figure Figure 3 As shown, among the 2714 inductions of "38 3B26FD77EC", they appeared in the time from -0.4 seconds to 30 seconds, and the number of inductions of "38 3B26FD 77 32" was counted in a small window of 0.2 seconds.

[0180] (ii) For the following Figure 3 The feature vector of is calculated, and the average value of each component is 14.15. Then each component is subtracted by 14.15*0.9=12.74. The negative components are set to 0, and each component is multiplied by itself and then multiplied by the time window weight. Figure 4As shown, the final sum multiplied by the time weight is 121483.42, the sum multiplied by itself is 44641.85, and the sum divided is 2.73. Since the average value of each component 14.15 exceeds 2, the penalty function P1 (avg, amin, amax) is 0, so the final Cost is 2.73. The penalty function is used when the average value is too small, that is, the number of triggers is too small to be judged. In this case, accidental interference is prone to occur, so the Cost will be increased according to the penalty function, thereby increasing the robustness of the algorithm.

[0181] (III) After calculating the relative cost of every two lamps, start searching for a grouping that minimizes the sum of the group costs of all groups. The group cost is the sum of the squares of the relative costs of the first lamp in the group and the other lamps plus a penalty function. If "383B 26FD 77EC" is the first lamp in the group, then it is advisable to put lamps with smaller relative costs into the same group to minimize the group cost. Figure 5 For example, the second row in the figure shows the relative cost of other lamps and "38 3B 26FD 77EC". "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 suitable. The penalty function is to prevent too many or too few lamps in a group, resulting in a large difference in the number of lamps between groups, which is inconvenient for users to operate.

[0182] (IV) Assuming there are 1, 2, 3, ... 40 lamps, which need to be divided into 9 groups, then in order to search for a grouping method with the lowest cost for all groups, a grouping scheme is initialized first. The initialization method is to select 9 lamps with relatively large costs as the first lamps in each group, assuming they are 1, 2, 3, ... 9, so as to establish the required 9 groups. Then, through the dynamic programming algorithm, the other lamps 10, 11, 12, ... 40 are placed in the 9 groups to minimize the total cost.

[0183] (V) After initializing the grouping scheme, start iterating to find a better scheme. The iterative approach is to keep the first lamps of the 8 groups of the existing scheme unchanged. If the first lamp of one group can be replaced with other lamps to make the total cost lower, then iterate on the new scheme. For example, replace 3 with 25, and then regroup all the lamps that are not the first lamps of a group, that is, 3, 10, 11, 12...24, 26, 27...40 using dynamic specifications. If the total cost is lower, then iterate on the scheme. If the first lamp of any group is replaced with another lamp and the dynamic specification grouping is re-established, the total cost cannot be lowered, then stop iterating. In order to prevent the search from taking too long, the number of iterations can be limited.

[0184] In summary, the present invention proposes a method for automatic grouping of lamps, which can automatically group lighting equipment based on historical sensing trigger data alone, without the need for positioning information, thereby realizing various convenient operations such as group control, automatic numbering, and intelligent linkage, greatly reducing the implementation cost of intelligent lighting systems in large-scale application scenarios.

[0185] Specifically, the present invention avoids manual grouping and the work of marking lamps on maps required for grouping, thereby improving implementation efficiency and reducing project implementation costs. Moreover, based on this grouping information, functions such as automatic sending of grouping information to terminals and automatic numbering can be realized, further reducing costs and increasing efficiency. At the same time, the present invention only requires two pieces of information, terminal number and trigger time, through induction triggering historical data, without location information. It is also possible to manually specify the average number of lights in each group or the number of groups. Furthermore, the present invention can estimate the associated feature vectors between terminals through induction triggering historical data with only two pieces of information, terminal number and trigger time, 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 reduce the implementation cost of lamp numbering and grouping: In traditional methods, in order to carry out energy-saving transformation and optimize management of lighting systems, it is necessary to accurately confirm the location and number each lamp, which is often time-consuming, labor-intensive and costly. The technical solution of the present invention collects the sensing data of all lamps in the target area within a preset period, and uses this data to automatically analyze the correlation characteristics between lamps, thereby realizing automatic grouping of lamps, greatly reducing the workload of manual confirmation and numbering, and reducing implementation costs.

[0188] Improve the efficiency and accuracy of lamp grouping: Compared with using indoor positioning devices to obtain lamp positions for automatic grouping (high cost) or manually screening and registering lamp positions (low efficiency), the technical solution of the present invention traverses the sensing data of all lamps, calculates the associated feature vectors between every two lamps, and groups them based on these feature vectors. This method not only improves the grouping efficiency, but also can more accurately reflect the actual usage and mutual correlation between lamps, thereby obtaining a more reasonable grouping result.

[0189] Enhanced flexibility and scalability of lighting systems: The technical solution of the present invention does not rely on specific lamp location information or indoor positioning technology, but groups lamps based on their actual usage (sensing data). This means that when the location of lamps changes or new lamps are added, the system can automatically adapt and regroup them without the need for 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 lighting experience and reduce energy consumption: Through reasonable grouping of lamps, the lighting system can be more effectively controlled and managed intelligently. For example, more precise lighting strategies can be formulated based on the lighting needs of different areas and the correlation characteristics between lamps, thereby reducing energy consumption while ensuring the lighting experience.

[0191] In summary, the technical solution of the present invention realizes 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 of 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.

[0192] On the other hand, Fig. 9 As shown, the embodiment of the present invention provides a lighting automatic grouping device 900, which may include:

[0193] The first module 901 is used to obtain sensing data of all lamps in the target area within a preset period;

[0194] The sensing data includes the lamp identification and sensing time of each lamp; the sensing time represents the moment when the lamp is sensed and illuminated within a preset period;

[0195] The second module 902 is used to traverse the sensing data of all lamps to obtain the correlation feature vector between every two lamps;

[0196] The associated feature vector includes the number of times the second lamp is illuminated in each time window within a preset time range 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 correlation feature cost between every two lamps based on the correlation feature vector arrangement;

[0198] The fourth module 904 is used to group all lamps based on the associated feature cost and the preset grouping parameters to obtain lamp groups.

[0199] Optionally, the device may further include:

[0200] The fifth module is used to iteratively optimize the grouping of lamps based on the sum of squared costs.

[0201] The contents of the method embodiments of the present invention are all applicable to the device embodiments. The functions specifically 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 method embodiments.

[0202] On the other hand, an embodiment of the present invention further provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above sensitive information method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0203] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present 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 method embodiments.

[0204] like Fig.10 As shown, Fig.10 A specific example of the hardware structure of an electronic device 1000 according to an embodiment is shown. The electronic device 1000 includes:

[0205] The processor 1001 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an 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 in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1002, and the processor 1001 calls and executes the network node population optimization method of the embodiment of the present invention;

[0207] Input / output interface 1003, used to implement information input and output;

[0208] The communication interface 1004 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0209] A bus 1005 , which transmits information between various components of the device (e.g., the processor 1001 , the memory 1002 , the input / output interface 1003 , and the communication interface 1004 );

[0210] The processor 1001 , the memory 1002 , the input / output interface 1003 and the communication interface 1004 are connected to each other in communication within the device via the bus 1005 .

[0211] The electronic device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0212] The contents of the method embodiments of the present invention are all applicable to the electronic device embodiments. The functions specifically implemented by the electronic 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 method embodiments.

[0213] Another aspect of an embodiment of the present invention further provides a computer-readable storage medium, the storage medium stores a program, and the program is executed by a processor to implement the above method.

[0214] It should be noted that the computer-readable medium shown in the embodiment of the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read to Only Memory, CD to ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0215] The contents of the method embodiments of the present invention are all applicable to the computer-readable storage medium embodiments. The functions specifically 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 method embodiments.

[0216] The embodiment of the present invention also discloses a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device can read the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the above method.

[0217] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0218] It should be noted that, although several modules of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to an embodiment 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. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.

[0219] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD to ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation of the present invention.

[0220] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part for which is described as a larger operation is performed independently.

[0221] In addition, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can 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 present invention. More specifically, in view of the properties, functions and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional skills of the engineer. Therefore, those skilled in the art can implement the present invention set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0222] If the function is implemented in the form of 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 the present invention, or the part that contributes to the prior art or the part of the present invention, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0223] The logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be embodied in any computer-readable medium for use by an instruction execution device, apparatus or device (such as a computer-based device, a device including a processor, or other device that can fetch instructions from an instruction execution device, apparatus or device and execute the instructions), or in conjunction with such instruction execution device, apparatus or device. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution device, apparatus or device, or in conjunction with such instruction execution device, apparatus or device.

[0224] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0225] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution device. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0226] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0227] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

[0228] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.

Claims

1. A method for automatic grouping of lamps, characterized in that: The following steps are involved: Obtain the sensing data of all lamps in the target area within a preset period; The sensing data includes the lamp identification and sensing time of each lamp; the sensing time represents the moment when the lamp is sensed and illuminated within the preset period; Traversing the sensing data of all the lamps to obtain a correlation feature vector between every two lamps; The associated feature vector includes the number of times the second lamp senses the sensed illumination in each time window within a preset time range corresponding to the first lamp; the preset time range is determined based on the sensing time of the first lamp; Obtaining an associated feature cost between every two lamps based on the associated feature vector; Based on the associated feature cost and in combination with preset grouping parameters, all the lamps are grouped to obtain lamp groups.

2. The automatic lamp grouping method according to claim 1, characterized in that: The step of traversing the sensing data of all the lamps to obtain the associated feature vector between every two lamps comprises the following steps: Arrange all the lamps in the target area into a lamp set; Taking out one of the lamps from the lamp set as the first lamp; Using other lamps in the target area except the first lamp as the second lamp; Based on the sensing data, the number of sensing times of the sensing illumination occurring in each time window within a preset time range corresponding to each of the second lamps and the first lamp is obtained, and the correlation feature vector between the first lamp and each of the second lamps is obtained; The next lamp of the first lamp in the lamp set is taken as the first lamp, and the step of taking the lamps other than the first lamp in the target area as the second lamp is returned to be executed until the association feature vector between every two lamps in the target area is obtained.

3. The automatic lamp grouping method according to claim 2, characterized in that: The step of obtaining the number of times the induced illumination occurs in each time window within a preset time range corresponding to each of the second lamps and the first lamp based on the collating of the sensing data, and obtaining the associated feature vector between the first lamp and each of the second lamps, comprises the following steps: Initializing the associated feature component table of the first lamp and each of the second lamps in sequence; Wherein, the horizontal axis of the associated feature component table corresponds to each of the time windows of the preset time range, and the vertical axis of the associated feature component table corresponds to the number of sensing times; Based on the lamp identification of the first lamp, acquiring all the sensing times of the first lamp from the sensing data; Performing a traversal and determination on all the sensing data, when there is a target time window in which the sensing time of the second lamp is within the preset time range corresponding to the sensing time of the first lamp, performing an increment operation on the sensing times corresponding to the target time window in the corresponding associated feature component table according to the lamp identification of the second lamp; Until all the sensing data are 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 automatic lamp grouping method according to claim 1, characterized in that: The associated feature vector includes a plurality of components, and the components correspond to the number of times the induced illumination occurs in the time window; the associated feature cost between each two lamps is obtained based on the associated feature vector, including the following steps: Averaging all the components of the associated feature vector to obtain an average value; Based on the average value, performing a preset standardization operation on all the components of the associated feature vector to obtain a first component corresponding to each component; Summing all of the first components to obtain a first score; Multiply each of the first components by a preset time weight to obtain a second component corresponding to each of the components; Wherein, the time weight is positively correlated with the sequence number of the time window where the component is located; summing all of the second components to obtain a second score; A 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 to the third score and the penalty function; The value of the penalty function is determined based on the numerical range of the average value.

5. The automatic lamp grouping method according to claim 1, characterized in that: The step of grouping all the lamps based on the associated feature cost and in combination with preset grouping parameters to obtain lamp groups includes the following steps: Determine the number of groups based on the grouping parameters, and initialize original groups of the number of groups; Obtaining the sum of the squares of the costs of each lamp according to the sum of the squares of the associated feature costs of each lamp and all other lamps; The lamps of the group number with the largest sum of squared costs are sequentially allocated as the first lamp of each of the original groups, and then the total score of group costs of all the original groups is minimized as the planning goal, and the remaining lamps are allocated to each of the original groups through a preset planning algorithm to obtain the final lamp grouping; Among them, the total group cost score is obtained by summing up the group cost scores of all groups; the group cost score is obtained by summing up the sum of the squares of the costs corresponding to all the lamps included in the group and the balance function, and the value of the balance function is determined based on the number of the lamps in the group; the planning algorithm includes a dynamic programming algorithm and a greedy algorithm.

6. The automatic lamp grouping method according to claim 5, characterized in that: The method further comprises the following steps: An iterative optimization process is performed on the lamp grouping based on the sum of squared costs.

7. The automatic lamp grouping method according to claim 6, characterized in that: The iterative optimization process of grouping the lamps based on the sum of squared costs comprises the following steps: Randomly select a first number of groups from the lamp groups as optimized groups; the first number is 1 less than the number of the lamp groups; The first lamp in the optimization group is reserved, and all other lamps are taken out for redistribution; Initializing an empty optimization group, and obtaining one of the lamps from the reallocated lamps as the first lamp of the optimization group; Taking the lowest total group cost score of all the optimized groups as a planning goal, the remaining reallocated lamps are allocated to each of the optimized groups through the preset planning algorithm to obtain a target group; When the total group cost score of the target group is lower than the total group cost score of the lamp group, the target group is output; otherwise, the number of iterations is increased by 1, and the step of arbitrarily selecting a first number of groups from the lamp group as the optimized group is returned to be executed until the number of iterations exceeds a preset iteration threshold; The number of iterations is initialized to 0.

8. A lighting automatic grouping device, characterized in that: include: The first module is used to obtain the sensing data of all lamps in the target area within a preset period; The sensing data includes the lamp identification and sensing time of each lamp; the sensing time represents the moment when the lamp is sensed and illuminated within the preset period; The second module is used to traverse the sensing data of all the lamps to obtain the associated feature vector between every two lamps; The associated feature vector includes the number of times the second lamp senses the sensed illumination in each time window within a preset time range corresponding to the first lamp; the preset time range is determined based on the sensing time of the first lamp; A third module is used to obtain the correlation feature cost between every two lamps based on the correlation feature vector; The fourth module is used to group all the lamps based on the associated feature cost and preset grouping parameters to obtain lamp groups.

9. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 7.

10. A computer storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the method according to any one of claims 1 to 7 when executed by the processor.

Citation Information

Patent Citations

  • Method and device for determining incidence relation of lamps, storage medium and electronic device

    CN115167161A

  • Large-scale flow scheduling method based on dynamic grouping for time delay sensitive industrial Internet of Things

    CN115766596A

  • Intelligent linkage control method, device and equipment of lighting system and medium

    CN117881051A

  • Power Management Unit with Modular Sensor Bus

    US20100295474A1

  • Networked lighting control system with lighting value tracking protocol

    US20240023220A1

Cited By

  • Classification method, system and equipment of Internet of Things lamps and medium

    CN120724264A

  • A method, system, device and medium for classifying an internet of things luminaire

    CN120724264B